From 5f27717b0e89ba4aa46672642d7405ba9e7d6b7d Mon Sep 17 00:00:00 2001 From: Rin Date: Mon, 11 Jul 2022 14:48:39 +0100 Subject: [PATCH] Replace game proto definitions with something more robust --- convert_game_protos.js | 29 + src/modules/startup.ts | 20 +- src/proto/message.ts | 4056 --- src/proto/proto/game.ts | 1133 - src/proto/service.ts | 2378 -- src/proto/system.ts | 1085 - src/proto/wm.ts | 19897 ------------ src/wmmt/game.proto.d.ts | 196 + src/wmmt/game.proto.js | 420 + src/wmmt/message.proto.d.ts | 20608 ++++++++++++ src/wmmt/message.proto.js | 58500 ++++++++++++++++++++++++++++++++++ src/wmmt/service.proto.d.ts | 20922 ++++++++++++ src/wmmt/service.proto.js | 56887 +++++++++++++++++++++++++++++++++ src/wmmt/system.proto.d.ts | 19142 +++++++++++ src/wmmt/system.proto.js | 53569 +++++++++++++++++++++++++++++++ src/wmmt/wm.proto.d.ts | 18146 +++++++++++ src/wmmt/wm.proto.js | 50956 +++++++++++++++++++++++++++++ 17 files changed, 299383 insertions(+), 28561 deletions(-) create mode 100644 convert_game_protos.js delete mode 100644 src/proto/message.ts delete mode 100644 src/proto/proto/game.ts delete mode 100644 src/proto/service.ts delete mode 100644 src/proto/system.ts delete mode 100644 src/proto/wm.ts create mode 100644 src/wmmt/game.proto.d.ts create mode 100644 src/wmmt/game.proto.js create mode 100644 src/wmmt/message.proto.d.ts create mode 100644 src/wmmt/message.proto.js create mode 100644 src/wmmt/service.proto.d.ts create mode 100644 src/wmmt/service.proto.js create mode 100644 src/wmmt/system.proto.d.ts create mode 100644 src/wmmt/system.proto.js create mode 100644 src/wmmt/wm.proto.d.ts create mode 100644 src/wmmt/wm.proto.js diff --git a/convert_game_protos.js b/convert_game_protos.js new file mode 100644 index 0000000..368e899 --- /dev/null +++ b/convert_game_protos.js @@ -0,0 +1,29 @@ +const pbjs = require('protobufjs-cli/pbjs'); +const pbts = require('protobufjs-cli/pbts'); +const fs = require('fs'); +const path = require('path'); + +fs.mkdirSync('src/wmmt', {recursive:true}); + +function generateProto(proto, out) { + pbjs.main(['--target', 'static-module', '--wrap', 'es6', '--out', out, proto], (err, o) => { + if (err) + throw err; + }); +} + +function generateTypescript(proto, out) { + pbts.main(['--out', out, proto], (err, o) => { + if (err) + throw err; + }); +} + +let dir = fs.readdirSync('proto'); +for (let i of dir) { + let n = path.basename(i); + console.log(`generating src/wmmt/${n}.js (proto/${n})`); + generateProto(`proto/${i}`, `src/wmmt/${n}.js`); + console.log(`generating src/wmmt/${n}.d.ts (src/wmmt/${n}.js)`); + generateTypescript(`src/wmmt/${n}.js`, `src/wmmt/${n}.d.ts`) +} \ No newline at end of file diff --git a/src/modules/startup.ts b/src/modules/startup.ts index 948205e..2177b5a 100644 --- a/src/modules/startup.ts +++ b/src/modules/startup.ts @@ -1,30 +1,26 @@ import { Application } from "express"; import {Module} from "module"; -import {ClientLogType, ErrorCode, Place, PlaceList, RegisterSystemInfoRequest, RegisterSystemInfoResponse} from "../proto/wm"; +import * as wm from "../wmmt/wm.proto"; export default class StartupModule extends Module { register(app: Application): void { app.post('/method/register_system_info', (req, res) => { let msg = { - error: ErrorCode.ERR_SUCCESS, + error: wm.wm.protobuf.ErrorCode.ERR_SUCCESS, regionId: 1, placeId: "123", allowedClientLogTypes: [], ghostSelectionMinRedoWait: 30, ghostSelectionMaxRedoWait: 4000, - inviteFriendCampaignSchedule: undefined, featureVersion: { version: 9, year: 2022, month: 7, pluses: 0, releaseAt: 0 // idk what this is - }, - latestCompetitionId: 0, - competitionSchedule: undefined, - scratchNotes: "" // null + } } - let resp = RegisterSystemInfoResponse.encode(msg); + let resp = wm.wm.protobuf.RegisterSystemInfoResponse.encode(msg); let end = resp.finish(); let r = res .header('Server', 'v388 wangan') @@ -35,14 +31,14 @@ export default class StartupModule extends Module { app.get('/resource/place_list', (req, res) => { console.log('place list'); - let places: Place[] = []; - places.push({ + let places: wm.wm.protobuf.Place[] = []; + places.push(new wm.wm.protobuf.Place({ placeId: "123", regionId: 1, shopName: "WMMT6", country: "JPN" - }); - let resp = PlaceList.encode({places}); + })); + let resp = wm.wm.protobuf.PlaceList.encode({places}); let r = res .header('Server', 'v388 wangan') .header('Content-Type', 'application/x-protobuf; revision=8053') diff --git a/src/proto/message.ts b/src/proto/message.ts deleted file mode 100644 index c1d0a7c..0000000 --- a/src/proto/message.ts +++ /dev/null @@ -1,4056 +0,0 @@ -/* eslint-disable */ -import { Car, GameFeatureVersion } from "./wm"; -import * as _m0 from "protobufjs/minimal"; - -export const protobufPackage = "wm.protobuf"; - -export interface Course { - episodeId: number; - timeAttackId: number; - extremeId: number; - runAreaId: number; - startRampId: number; - timezoneId: number; - bgmId: number; - autoSelect: boolean; - assistOff: boolean; - playerMax: number; - vsRankList: string; - distBase: number; - distAdd: number; - distBonus: number; - randomSeed: number; -} - -export interface HeartBeat { - frameNumber: number; - pcbSerial: string; - serverComm: number; -} - -export interface DriveCabinetState { - iccardRwState: number; - venderState: number; - ffbState: number; - allnetAttestation: number; - updateAttestation: number; - softwareRevision: number; - downloadState: number; - downloadRevision: number; - downloadProgress: number; - updateRevision: number; - eventMode: number; - eventModeDist: number; - eventMode2on2: number; -} - -export interface BatchSetting { - coinChute: number; - buycardCost: number; - gameCost: number; - continueCost: number; - fullcourseCost: number; - freeplay: number; - winsAndRemains: number; - eventMode: number; - eventModeDist: number; - closeType: number; - closeSun: number; - closeMon: number; - closeTue: number; - closeWed: number; - closeThu: number; - closeFri: number; - closeSat: number; - closeDay: number; - softwareRevision: number; - syncTime: number; - eventModeCount: number; - timeZoneType: number; - timeDayLight: number; - clockOffset: number; - eventModeSerial: string; - eventModeSerialEndAt: number; - eventModeSerialErrorcode: number; - eventMode2on2: number; - wasTournamentScheduleSet: number; -} - -export interface Information { - systemMode: number; - syncId: number; - attractMovieId: number; - attractRankingId: number; - attractRandomSeed: number; -} - -export interface RaceCar { - car: Car | undefined; - rank: number; - vsStarCount: number; - vsConsecutiveWins: number; - vsMedalsRankLevel: number; - wasClearedStoryWhithoutLosing: boolean; - rgRegionMapScore: number[]; -} - -export interface TournamentCar { - name: string; - carId: number; - entryNumber: number; -} - -export interface TournamentCarList { - car00: TournamentCar | undefined; - car01: TournamentCar | undefined; - car02: TournamentCar | undefined; - car03: TournamentCar | undefined; - car04: TournamentCar | undefined; - car05: TournamentCar | undefined; - car06: TournamentCar | undefined; - car07: TournamentCar | undefined; - car08: TournamentCar | undefined; - car09: TournamentCar | undefined; - car10: TournamentCar | undefined; - car11: TournamentCar | undefined; - car12: TournamentCar | undefined; - car13: TournamentCar | undefined; - car14: TournamentCar | undefined; - car15: TournamentCar | undefined; - car16: TournamentCar | undefined; - car17: TournamentCar | undefined; - car18: TournamentCar | undefined; - car19: TournamentCar | undefined; - car20: TournamentCar | undefined; - car21: TournamentCar | undefined; - car22: TournamentCar | undefined; - car23: TournamentCar | undefined; - car24: TournamentCar | undefined; - car25: TournamentCar | undefined; - car26: TournamentCar | undefined; - car27: TournamentCar | undefined; - car28: TournamentCar | undefined; - car29: TournamentCar | undefined; - car30: TournamentCar | undefined; - car31: TournamentCar | undefined; -} - -export interface TournamentRaceData { - raceNumber: number; - roundNumber: number; - gameNumber: number; - player00: number; - player01: number; - player02: number; - player03: number; - result00: number; - result01: number; - result02: number; - result03: number; -} - -export interface TournamentRaceDataList { - raceData00: TournamentRaceData | undefined; - raceData01: TournamentRaceData | undefined; - raceData02: TournamentRaceData | undefined; - raceData03: TournamentRaceData | undefined; - raceData04: TournamentRaceData | undefined; - raceData05: TournamentRaceData | undefined; - raceData06: TournamentRaceData | undefined; - raceData07: TournamentRaceData | undefined; - raceData08: TournamentRaceData | undefined; - raceData09: TournamentRaceData | undefined; - raceData10: TournamentRaceData | undefined; - raceData11: TournamentRaceData | undefined; - raceData12: TournamentRaceData | undefined; - raceData13: TournamentRaceData | undefined; - raceData14: TournamentRaceData | undefined; - raceData15: TournamentRaceData | undefined; - raceData16: TournamentRaceData | undefined; - raceData17: TournamentRaceData | undefined; - raceData18: TournamentRaceData | undefined; - raceData19: TournamentRaceData | undefined; - raceData20: TournamentRaceData | undefined; - raceData21: TournamentRaceData | undefined; - raceData22: TournamentRaceData | undefined; - raceData23: TournamentRaceData | undefined; - raceData24: TournamentRaceData | undefined; - raceData25: TournamentRaceData | undefined; - raceData26: TournamentRaceData | undefined; - raceData27: TournamentRaceData | undefined; - raceData28: TournamentRaceData | undefined; - raceData29: TournamentRaceData | undefined; - raceData30: TournamentRaceData | undefined; - raceData31: TournamentRaceData | undefined; - raceData32: TournamentRaceData | undefined; - raceData33: TournamentRaceData | undefined; - raceData34: TournamentRaceData | undefined; -} - -export interface TournamentResult { - car: Car | undefined; - rank: number; - entryNumber: number; -} - -export interface TournamentResultList { - result00: TournamentResult | undefined; - result01: TournamentResult | undefined; - result02: TournamentResult | undefined; - result03: TournamentResult | undefined; -} - -export interface Tournament { - isEnableTournament: boolean; - isClearTournament: boolean; - isEntryPlayerOnly: boolean; - carList: TournamentCarList | undefined; - raceDataList: TournamentRaceDataList | undefined; - isTournamentOn: boolean; - holdYear: number; - holdMonth: number; - holdDay: number; - entryHour: number; - entryMinute: number; - tournamentStartHour: number; - tournamentStartMinute: number; - competitionNum: number; - participantNum: number; - surviverNumOfFirstRace: number; - nowRound: number; - playingGameNumber: number; - isConfirmTournamentResult: boolean; - isTournamentEntry: boolean; - resultList: TournamentResultList | undefined; - hasCommendationStarted: boolean; - isCommendationRankAppeared: boolean; - isCommendationEnded: boolean; - isNextRank: boolean; - commendationPage: number; - showCommendationAgain: boolean; -} - -export interface Message { - racePacket: Uint8Array; - raceCar: Uint8Array; - course: Course | undefined; - vsOk: number; - heartBeat: HeartBeat | undefined; - batchSettingState: number; - driveCabinetState: DriveCabinetState | undefined; - batchSetting: BatchSetting | undefined; - information: Information | undefined; - featureVersion: GameFeatureVersion | undefined; - tournament: Tournament | undefined; -} - -function createBaseCourse(): Course { - return { - episodeId: 0, - timeAttackId: 0, - extremeId: 0, - runAreaId: 0, - startRampId: 0, - timezoneId: 0, - bgmId: 0, - autoSelect: false, - assistOff: false, - playerMax: 0, - vsRankList: "", - distBase: 0, - distAdd: 0, - distBonus: 0, - randomSeed: 0, - }; -} - -export const Course = { - encode( - message: Course, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.episodeId !== 0) { - writer.uint32(8).sint32(message.episodeId); - } - if (message.timeAttackId !== 0) { - writer.uint32(16).sint32(message.timeAttackId); - } - if (message.extremeId !== 0) { - writer.uint32(24).sint32(message.extremeId); - } - if (message.runAreaId !== 0) { - writer.uint32(32).sint32(message.runAreaId); - } - if (message.startRampId !== 0) { - writer.uint32(40).sint32(message.startRampId); - } - if (message.timezoneId !== 0) { - writer.uint32(48).sint32(message.timezoneId); - } - if (message.bgmId !== 0) { - writer.uint32(56).sint32(message.bgmId); - } - if (message.autoSelect === true) { - writer.uint32(64).bool(message.autoSelect); - } - if (message.assistOff === true) { - writer.uint32(72).bool(message.assistOff); - } - if (message.playerMax !== 0) { - writer.uint32(80).int32(message.playerMax); - } - if (message.vsRankList !== "") { - writer.uint32(90).string(message.vsRankList); - } - if (message.distBase !== 0) { - writer.uint32(101).float(message.distBase); - } - if (message.distAdd !== 0) { - writer.uint32(109).float(message.distAdd); - } - if (message.distBonus !== 0) { - writer.uint32(117).float(message.distBonus); - } - if (message.randomSeed !== 0) { - writer.uint32(120).int32(message.randomSeed); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Course { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCourse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.episodeId = reader.sint32(); - break; - case 2: - message.timeAttackId = reader.sint32(); - break; - case 3: - message.extremeId = reader.sint32(); - break; - case 4: - message.runAreaId = reader.sint32(); - break; - case 5: - message.startRampId = reader.sint32(); - break; - case 6: - message.timezoneId = reader.sint32(); - break; - case 7: - message.bgmId = reader.sint32(); - break; - case 8: - message.autoSelect = reader.bool(); - break; - case 9: - message.assistOff = reader.bool(); - break; - case 10: - message.playerMax = reader.int32(); - break; - case 11: - message.vsRankList = reader.string(); - break; - case 12: - message.distBase = reader.float(); - break; - case 13: - message.distAdd = reader.float(); - break; - case 14: - message.distBonus = reader.float(); - break; - case 15: - message.randomSeed = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Course { - return { - episodeId: isSet(object.episodeId) ? Number(object.episodeId) : 0, - timeAttackId: isSet(object.timeAttackId) - ? Number(object.timeAttackId) - : 0, - extremeId: isSet(object.extremeId) ? Number(object.extremeId) : 0, - runAreaId: isSet(object.runAreaId) ? Number(object.runAreaId) : 0, - startRampId: isSet(object.startRampId) ? Number(object.startRampId) : 0, - timezoneId: isSet(object.timezoneId) ? Number(object.timezoneId) : 0, - bgmId: isSet(object.bgmId) ? Number(object.bgmId) : 0, - autoSelect: isSet(object.autoSelect) ? Boolean(object.autoSelect) : false, - assistOff: isSet(object.assistOff) ? Boolean(object.assistOff) : false, - playerMax: isSet(object.playerMax) ? Number(object.playerMax) : 0, - vsRankList: isSet(object.vsRankList) ? String(object.vsRankList) : "", - distBase: isSet(object.distBase) ? Number(object.distBase) : 0, - distAdd: isSet(object.distAdd) ? Number(object.distAdd) : 0, - distBonus: isSet(object.distBonus) ? Number(object.distBonus) : 0, - randomSeed: isSet(object.randomSeed) ? Number(object.randomSeed) : 0, - }; - }, - - toJSON(message: Course): unknown { - const obj: any = {}; - message.episodeId !== undefined && - (obj.episodeId = Math.round(message.episodeId)); - message.timeAttackId !== undefined && - (obj.timeAttackId = Math.round(message.timeAttackId)); - message.extremeId !== undefined && - (obj.extremeId = Math.round(message.extremeId)); - message.runAreaId !== undefined && - (obj.runAreaId = Math.round(message.runAreaId)); - message.startRampId !== undefined && - (obj.startRampId = Math.round(message.startRampId)); - message.timezoneId !== undefined && - (obj.timezoneId = Math.round(message.timezoneId)); - message.bgmId !== undefined && (obj.bgmId = Math.round(message.bgmId)); - message.autoSelect !== undefined && (obj.autoSelect = message.autoSelect); - message.assistOff !== undefined && (obj.assistOff = message.assistOff); - message.playerMax !== undefined && - (obj.playerMax = Math.round(message.playerMax)); - message.vsRankList !== undefined && (obj.vsRankList = message.vsRankList); - message.distBase !== undefined && (obj.distBase = message.distBase); - message.distAdd !== undefined && (obj.distAdd = message.distAdd); - message.distBonus !== undefined && (obj.distBonus = message.distBonus); - message.randomSeed !== undefined && - (obj.randomSeed = Math.round(message.randomSeed)); - return obj; - }, - - fromPartial, I>>(object: I): Course { - const message = createBaseCourse(); - message.episodeId = object.episodeId ?? 0; - message.timeAttackId = object.timeAttackId ?? 0; - message.extremeId = object.extremeId ?? 0; - message.runAreaId = object.runAreaId ?? 0; - message.startRampId = object.startRampId ?? 0; - message.timezoneId = object.timezoneId ?? 0; - message.bgmId = object.bgmId ?? 0; - message.autoSelect = object.autoSelect ?? false; - message.assistOff = object.assistOff ?? false; - message.playerMax = object.playerMax ?? 0; - message.vsRankList = object.vsRankList ?? ""; - message.distBase = object.distBase ?? 0; - message.distAdd = object.distAdd ?? 0; - message.distBonus = object.distBonus ?? 0; - message.randomSeed = object.randomSeed ?? 0; - return message; - }, -}; - -function createBaseHeartBeat(): HeartBeat { - return { frameNumber: 0, pcbSerial: "", serverComm: 0 }; -} - -export const HeartBeat = { - encode( - message: HeartBeat, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.frameNumber !== 0) { - writer.uint32(8).uint32(message.frameNumber); - } - if (message.pcbSerial !== "") { - writer.uint32(18).string(message.pcbSerial); - } - if (message.serverComm !== 0) { - writer.uint32(24).int32(message.serverComm); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): HeartBeat { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHeartBeat(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.frameNumber = reader.uint32(); - break; - case 2: - message.pcbSerial = reader.string(); - break; - case 3: - message.serverComm = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): HeartBeat { - return { - frameNumber: isSet(object.frameNumber) ? Number(object.frameNumber) : 0, - pcbSerial: isSet(object.pcbSerial) ? String(object.pcbSerial) : "", - serverComm: isSet(object.serverComm) ? Number(object.serverComm) : 0, - }; - }, - - toJSON(message: HeartBeat): unknown { - const obj: any = {}; - message.frameNumber !== undefined && - (obj.frameNumber = Math.round(message.frameNumber)); - message.pcbSerial !== undefined && (obj.pcbSerial = message.pcbSerial); - message.serverComm !== undefined && - (obj.serverComm = Math.round(message.serverComm)); - return obj; - }, - - fromPartial, I>>( - object: I - ): HeartBeat { - const message = createBaseHeartBeat(); - message.frameNumber = object.frameNumber ?? 0; - message.pcbSerial = object.pcbSerial ?? ""; - message.serverComm = object.serverComm ?? 0; - return message; - }, -}; - -function createBaseDriveCabinetState(): DriveCabinetState { - return { - iccardRwState: 0, - venderState: 0, - ffbState: 0, - allnetAttestation: 0, - updateAttestation: 0, - softwareRevision: 0, - downloadState: 0, - downloadRevision: 0, - downloadProgress: 0, - updateRevision: 0, - eventMode: 0, - eventModeDist: 0, - eventMode2on2: 0, - }; -} - -export const DriveCabinetState = { - encode( - message: DriveCabinetState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.iccardRwState !== 0) { - writer.uint32(8).int32(message.iccardRwState); - } - if (message.venderState !== 0) { - writer.uint32(16).int32(message.venderState); - } - if (message.ffbState !== 0) { - writer.uint32(24).int32(message.ffbState); - } - if (message.allnetAttestation !== 0) { - writer.uint32(32).int32(message.allnetAttestation); - } - if (message.updateAttestation !== 0) { - writer.uint32(40).int32(message.updateAttestation); - } - if (message.softwareRevision !== 0) { - writer.uint32(48).int32(message.softwareRevision); - } - if (message.downloadState !== 0) { - writer.uint32(56).int32(message.downloadState); - } - if (message.downloadRevision !== 0) { - writer.uint32(64).int32(message.downloadRevision); - } - if (message.downloadProgress !== 0) { - writer.uint32(72).int32(message.downloadProgress); - } - if (message.updateRevision !== 0) { - writer.uint32(80).int32(message.updateRevision); - } - if (message.eventMode !== 0) { - writer.uint32(88).int32(message.eventMode); - } - if (message.eventModeDist !== 0) { - writer.uint32(96).int32(message.eventModeDist); - } - if (message.eventMode2on2 !== 0) { - writer.uint32(104).int32(message.eventMode2on2); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): DriveCabinetState { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDriveCabinetState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.iccardRwState = reader.int32(); - break; - case 2: - message.venderState = reader.int32(); - break; - case 3: - message.ffbState = reader.int32(); - break; - case 4: - message.allnetAttestation = reader.int32(); - break; - case 5: - message.updateAttestation = reader.int32(); - break; - case 6: - message.softwareRevision = reader.int32(); - break; - case 7: - message.downloadState = reader.int32(); - break; - case 8: - message.downloadRevision = reader.int32(); - break; - case 9: - message.downloadProgress = reader.int32(); - break; - case 10: - message.updateRevision = reader.int32(); - break; - case 11: - message.eventMode = reader.int32(); - break; - case 12: - message.eventModeDist = reader.int32(); - break; - case 13: - message.eventMode2on2 = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): DriveCabinetState { - return { - iccardRwState: isSet(object.iccardRwState) - ? Number(object.iccardRwState) - : 0, - venderState: isSet(object.venderState) ? Number(object.venderState) : 0, - ffbState: isSet(object.ffbState) ? Number(object.ffbState) : 0, - allnetAttestation: isSet(object.allnetAttestation) - ? Number(object.allnetAttestation) - : 0, - updateAttestation: isSet(object.updateAttestation) - ? Number(object.updateAttestation) - : 0, - softwareRevision: isSet(object.softwareRevision) - ? Number(object.softwareRevision) - : 0, - downloadState: isSet(object.downloadState) - ? Number(object.downloadState) - : 0, - downloadRevision: isSet(object.downloadRevision) - ? Number(object.downloadRevision) - : 0, - downloadProgress: isSet(object.downloadProgress) - ? Number(object.downloadProgress) - : 0, - updateRevision: isSet(object.updateRevision) - ? Number(object.updateRevision) - : 0, - eventMode: isSet(object.eventMode) ? Number(object.eventMode) : 0, - eventModeDist: isSet(object.eventModeDist) - ? Number(object.eventModeDist) - : 0, - eventMode2on2: isSet(object.eventMode2on2) - ? Number(object.eventMode2on2) - : 0, - }; - }, - - toJSON(message: DriveCabinetState): unknown { - const obj: any = {}; - message.iccardRwState !== undefined && - (obj.iccardRwState = Math.round(message.iccardRwState)); - message.venderState !== undefined && - (obj.venderState = Math.round(message.venderState)); - message.ffbState !== undefined && - (obj.ffbState = Math.round(message.ffbState)); - message.allnetAttestation !== undefined && - (obj.allnetAttestation = Math.round(message.allnetAttestation)); - message.updateAttestation !== undefined && - (obj.updateAttestation = Math.round(message.updateAttestation)); - message.softwareRevision !== undefined && - (obj.softwareRevision = Math.round(message.softwareRevision)); - message.downloadState !== undefined && - (obj.downloadState = Math.round(message.downloadState)); - message.downloadRevision !== undefined && - (obj.downloadRevision = Math.round(message.downloadRevision)); - message.downloadProgress !== undefined && - (obj.downloadProgress = Math.round(message.downloadProgress)); - message.updateRevision !== undefined && - (obj.updateRevision = Math.round(message.updateRevision)); - message.eventMode !== undefined && - (obj.eventMode = Math.round(message.eventMode)); - message.eventModeDist !== undefined && - (obj.eventModeDist = Math.round(message.eventModeDist)); - message.eventMode2on2 !== undefined && - (obj.eventMode2on2 = Math.round(message.eventMode2on2)); - return obj; - }, - - fromPartial, I>>( - object: I - ): DriveCabinetState { - const message = createBaseDriveCabinetState(); - message.iccardRwState = object.iccardRwState ?? 0; - message.venderState = object.venderState ?? 0; - message.ffbState = object.ffbState ?? 0; - message.allnetAttestation = object.allnetAttestation ?? 0; - message.updateAttestation = object.updateAttestation ?? 0; - message.softwareRevision = object.softwareRevision ?? 0; - message.downloadState = object.downloadState ?? 0; - message.downloadRevision = object.downloadRevision ?? 0; - message.downloadProgress = object.downloadProgress ?? 0; - message.updateRevision = object.updateRevision ?? 0; - message.eventMode = object.eventMode ?? 0; - message.eventModeDist = object.eventModeDist ?? 0; - message.eventMode2on2 = object.eventMode2on2 ?? 0; - return message; - }, -}; - -function createBaseBatchSetting(): BatchSetting { - return { - coinChute: 0, - buycardCost: 0, - gameCost: 0, - continueCost: 0, - fullcourseCost: 0, - freeplay: 0, - winsAndRemains: 0, - eventMode: 0, - eventModeDist: 0, - closeType: 0, - closeSun: 0, - closeMon: 0, - closeTue: 0, - closeWed: 0, - closeThu: 0, - closeFri: 0, - closeSat: 0, - closeDay: 0, - softwareRevision: 0, - syncTime: 0, - eventModeCount: 0, - timeZoneType: 0, - timeDayLight: 0, - clockOffset: 0, - eventModeSerial: "", - eventModeSerialEndAt: 0, - eventModeSerialErrorcode: 0, - eventMode2on2: 0, - wasTournamentScheduleSet: 0, - }; -} - -export const BatchSetting = { - encode( - message: BatchSetting, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.coinChute !== 0) { - writer.uint32(8).int32(message.coinChute); - } - if (message.buycardCost !== 0) { - writer.uint32(16).int32(message.buycardCost); - } - if (message.gameCost !== 0) { - writer.uint32(24).int32(message.gameCost); - } - if (message.continueCost !== 0) { - writer.uint32(32).int32(message.continueCost); - } - if (message.fullcourseCost !== 0) { - writer.uint32(40).int32(message.fullcourseCost); - } - if (message.freeplay !== 0) { - writer.uint32(48).int32(message.freeplay); - } - if (message.winsAndRemains !== 0) { - writer.uint32(56).int32(message.winsAndRemains); - } - if (message.eventMode !== 0) { - writer.uint32(64).int32(message.eventMode); - } - if (message.eventModeDist !== 0) { - writer.uint32(72).int32(message.eventModeDist); - } - if (message.closeType !== 0) { - writer.uint32(80).int32(message.closeType); - } - if (message.closeSun !== 0) { - writer.uint32(88).int32(message.closeSun); - } - if (message.closeMon !== 0) { - writer.uint32(96).int32(message.closeMon); - } - if (message.closeTue !== 0) { - writer.uint32(104).int32(message.closeTue); - } - if (message.closeWed !== 0) { - writer.uint32(112).int32(message.closeWed); - } - if (message.closeThu !== 0) { - writer.uint32(120).int32(message.closeThu); - } - if (message.closeFri !== 0) { - writer.uint32(128).int32(message.closeFri); - } - if (message.closeSat !== 0) { - writer.uint32(136).int32(message.closeSat); - } - if (message.closeDay !== 0) { - writer.uint32(144).int32(message.closeDay); - } - if (message.softwareRevision !== 0) { - writer.uint32(152).int32(message.softwareRevision); - } - if (message.syncTime !== 0) { - writer.uint32(160).int32(message.syncTime); - } - if (message.eventModeCount !== 0) { - writer.uint32(168).int32(message.eventModeCount); - } - if (message.timeZoneType !== 0) { - writer.uint32(176).uint32(message.timeZoneType); - } - if (message.timeDayLight !== 0) { - writer.uint32(184).uint32(message.timeDayLight); - } - if (message.clockOffset !== 0) { - writer.uint32(192).int32(message.clockOffset); - } - if (message.eventModeSerial !== "") { - writer.uint32(202).string(message.eventModeSerial); - } - if (message.eventModeSerialEndAt !== 0) { - writer.uint32(208).uint32(message.eventModeSerialEndAt); - } - if (message.eventModeSerialErrorcode !== 0) { - writer.uint32(216).int32(message.eventModeSerialErrorcode); - } - if (message.eventMode2on2 !== 0) { - writer.uint32(224).int32(message.eventMode2on2); - } - if (message.wasTournamentScheduleSet !== 0) { - writer.uint32(232).int32(message.wasTournamentScheduleSet); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): BatchSetting { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBatchSetting(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.coinChute = reader.int32(); - break; - case 2: - message.buycardCost = reader.int32(); - break; - case 3: - message.gameCost = reader.int32(); - break; - case 4: - message.continueCost = reader.int32(); - break; - case 5: - message.fullcourseCost = reader.int32(); - break; - case 6: - message.freeplay = reader.int32(); - break; - case 7: - message.winsAndRemains = reader.int32(); - break; - case 8: - message.eventMode = reader.int32(); - break; - case 9: - message.eventModeDist = reader.int32(); - break; - case 10: - message.closeType = reader.int32(); - break; - case 11: - message.closeSun = reader.int32(); - break; - case 12: - message.closeMon = reader.int32(); - break; - case 13: - message.closeTue = reader.int32(); - break; - case 14: - message.closeWed = reader.int32(); - break; - case 15: - message.closeThu = reader.int32(); - break; - case 16: - message.closeFri = reader.int32(); - break; - case 17: - message.closeSat = reader.int32(); - break; - case 18: - message.closeDay = reader.int32(); - break; - case 19: - message.softwareRevision = reader.int32(); - break; - case 20: - message.syncTime = reader.int32(); - break; - case 21: - message.eventModeCount = reader.int32(); - break; - case 22: - message.timeZoneType = reader.uint32(); - break; - case 23: - message.timeDayLight = reader.uint32(); - break; - case 24: - message.clockOffset = reader.int32(); - break; - case 25: - message.eventModeSerial = reader.string(); - break; - case 26: - message.eventModeSerialEndAt = reader.uint32(); - break; - case 27: - message.eventModeSerialErrorcode = reader.int32(); - break; - case 28: - message.eventMode2on2 = reader.int32(); - break; - case 29: - message.wasTournamentScheduleSet = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BatchSetting { - return { - coinChute: isSet(object.coinChute) ? Number(object.coinChute) : 0, - buycardCost: isSet(object.buycardCost) ? Number(object.buycardCost) : 0, - gameCost: isSet(object.gameCost) ? Number(object.gameCost) : 0, - continueCost: isSet(object.continueCost) - ? Number(object.continueCost) - : 0, - fullcourseCost: isSet(object.fullcourseCost) - ? Number(object.fullcourseCost) - : 0, - freeplay: isSet(object.freeplay) ? Number(object.freeplay) : 0, - winsAndRemains: isSet(object.winsAndRemains) - ? Number(object.winsAndRemains) - : 0, - eventMode: isSet(object.eventMode) ? Number(object.eventMode) : 0, - eventModeDist: isSet(object.eventModeDist) - ? Number(object.eventModeDist) - : 0, - closeType: isSet(object.closeType) ? Number(object.closeType) : 0, - closeSun: isSet(object.closeSun) ? Number(object.closeSun) : 0, - closeMon: isSet(object.closeMon) ? Number(object.closeMon) : 0, - closeTue: isSet(object.closeTue) ? Number(object.closeTue) : 0, - closeWed: isSet(object.closeWed) ? Number(object.closeWed) : 0, - closeThu: isSet(object.closeThu) ? Number(object.closeThu) : 0, - closeFri: isSet(object.closeFri) ? Number(object.closeFri) : 0, - closeSat: isSet(object.closeSat) ? Number(object.closeSat) : 0, - closeDay: isSet(object.closeDay) ? Number(object.closeDay) : 0, - softwareRevision: isSet(object.softwareRevision) - ? Number(object.softwareRevision) - : 0, - syncTime: isSet(object.syncTime) ? Number(object.syncTime) : 0, - eventModeCount: isSet(object.eventModeCount) - ? Number(object.eventModeCount) - : 0, - timeZoneType: isSet(object.timeZoneType) - ? Number(object.timeZoneType) - : 0, - timeDayLight: isSet(object.timeDayLight) - ? Number(object.timeDayLight) - : 0, - clockOffset: isSet(object.clockOffset) ? Number(object.clockOffset) : 0, - eventModeSerial: isSet(object.eventModeSerial) - ? String(object.eventModeSerial) - : "", - eventModeSerialEndAt: isSet(object.eventModeSerialEndAt) - ? Number(object.eventModeSerialEndAt) - : 0, - eventModeSerialErrorcode: isSet(object.eventModeSerialErrorcode) - ? Number(object.eventModeSerialErrorcode) - : 0, - eventMode2on2: isSet(object.eventMode2on2) - ? Number(object.eventMode2on2) - : 0, - wasTournamentScheduleSet: isSet(object.wasTournamentScheduleSet) - ? Number(object.wasTournamentScheduleSet) - : 0, - }; - }, - - toJSON(message: BatchSetting): unknown { - const obj: any = {}; - message.coinChute !== undefined && - (obj.coinChute = Math.round(message.coinChute)); - message.buycardCost !== undefined && - (obj.buycardCost = Math.round(message.buycardCost)); - message.gameCost !== undefined && - (obj.gameCost = Math.round(message.gameCost)); - message.continueCost !== undefined && - (obj.continueCost = Math.round(message.continueCost)); - message.fullcourseCost !== undefined && - (obj.fullcourseCost = Math.round(message.fullcourseCost)); - message.freeplay !== undefined && - (obj.freeplay = Math.round(message.freeplay)); - message.winsAndRemains !== undefined && - (obj.winsAndRemains = Math.round(message.winsAndRemains)); - message.eventMode !== undefined && - (obj.eventMode = Math.round(message.eventMode)); - message.eventModeDist !== undefined && - (obj.eventModeDist = Math.round(message.eventModeDist)); - message.closeType !== undefined && - (obj.closeType = Math.round(message.closeType)); - message.closeSun !== undefined && - (obj.closeSun = Math.round(message.closeSun)); - message.closeMon !== undefined && - (obj.closeMon = Math.round(message.closeMon)); - message.closeTue !== undefined && - (obj.closeTue = Math.round(message.closeTue)); - message.closeWed !== undefined && - (obj.closeWed = Math.round(message.closeWed)); - message.closeThu !== undefined && - (obj.closeThu = Math.round(message.closeThu)); - message.closeFri !== undefined && - (obj.closeFri = Math.round(message.closeFri)); - message.closeSat !== undefined && - (obj.closeSat = Math.round(message.closeSat)); - message.closeDay !== undefined && - (obj.closeDay = Math.round(message.closeDay)); - message.softwareRevision !== undefined && - (obj.softwareRevision = Math.round(message.softwareRevision)); - message.syncTime !== undefined && - (obj.syncTime = Math.round(message.syncTime)); - message.eventModeCount !== undefined && - (obj.eventModeCount = Math.round(message.eventModeCount)); - message.timeZoneType !== undefined && - (obj.timeZoneType = Math.round(message.timeZoneType)); - message.timeDayLight !== undefined && - (obj.timeDayLight = Math.round(message.timeDayLight)); - message.clockOffset !== undefined && - (obj.clockOffset = Math.round(message.clockOffset)); - message.eventModeSerial !== undefined && - (obj.eventModeSerial = message.eventModeSerial); - message.eventModeSerialEndAt !== undefined && - (obj.eventModeSerialEndAt = Math.round(message.eventModeSerialEndAt)); - message.eventModeSerialErrorcode !== undefined && - (obj.eventModeSerialErrorcode = Math.round( - message.eventModeSerialErrorcode - )); - message.eventMode2on2 !== undefined && - (obj.eventMode2on2 = Math.round(message.eventMode2on2)); - message.wasTournamentScheduleSet !== undefined && - (obj.wasTournamentScheduleSet = Math.round( - message.wasTournamentScheduleSet - )); - return obj; - }, - - fromPartial, I>>( - object: I - ): BatchSetting { - const message = createBaseBatchSetting(); - message.coinChute = object.coinChute ?? 0; - message.buycardCost = object.buycardCost ?? 0; - message.gameCost = object.gameCost ?? 0; - message.continueCost = object.continueCost ?? 0; - message.fullcourseCost = object.fullcourseCost ?? 0; - message.freeplay = object.freeplay ?? 0; - message.winsAndRemains = object.winsAndRemains ?? 0; - message.eventMode = object.eventMode ?? 0; - message.eventModeDist = object.eventModeDist ?? 0; - message.closeType = object.closeType ?? 0; - message.closeSun = object.closeSun ?? 0; - message.closeMon = object.closeMon ?? 0; - message.closeTue = object.closeTue ?? 0; - message.closeWed = object.closeWed ?? 0; - message.closeThu = object.closeThu ?? 0; - message.closeFri = object.closeFri ?? 0; - message.closeSat = object.closeSat ?? 0; - message.closeDay = object.closeDay ?? 0; - message.softwareRevision = object.softwareRevision ?? 0; - message.syncTime = object.syncTime ?? 0; - message.eventModeCount = object.eventModeCount ?? 0; - message.timeZoneType = object.timeZoneType ?? 0; - message.timeDayLight = object.timeDayLight ?? 0; - message.clockOffset = object.clockOffset ?? 0; - message.eventModeSerial = object.eventModeSerial ?? ""; - message.eventModeSerialEndAt = object.eventModeSerialEndAt ?? 0; - message.eventModeSerialErrorcode = object.eventModeSerialErrorcode ?? 0; - message.eventMode2on2 = object.eventMode2on2 ?? 0; - message.wasTournamentScheduleSet = object.wasTournamentScheduleSet ?? 0; - return message; - }, -}; - -function createBaseInformation(): Information { - return { - systemMode: 0, - syncId: 0, - attractMovieId: 0, - attractRankingId: 0, - attractRandomSeed: 0, - }; -} - -export const Information = { - encode( - message: Information, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.systemMode !== 0) { - writer.uint32(8).uint32(message.systemMode); - } - if (message.syncId !== 0) { - writer.uint32(16).sint32(message.syncId); - } - if (message.attractMovieId !== 0) { - writer.uint32(24).sint32(message.attractMovieId); - } - if (message.attractRankingId !== 0) { - writer.uint32(32).sint32(message.attractRankingId); - } - if (message.attractRandomSeed !== 0) { - writer.uint32(40).int32(message.attractRandomSeed); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Information { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInformation(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.systemMode = reader.uint32(); - break; - case 2: - message.syncId = reader.sint32(); - break; - case 3: - message.attractMovieId = reader.sint32(); - break; - case 4: - message.attractRankingId = reader.sint32(); - break; - case 5: - message.attractRandomSeed = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Information { - return { - systemMode: isSet(object.systemMode) ? Number(object.systemMode) : 0, - syncId: isSet(object.syncId) ? Number(object.syncId) : 0, - attractMovieId: isSet(object.attractMovieId) - ? Number(object.attractMovieId) - : 0, - attractRankingId: isSet(object.attractRankingId) - ? Number(object.attractRankingId) - : 0, - attractRandomSeed: isSet(object.attractRandomSeed) - ? Number(object.attractRandomSeed) - : 0, - }; - }, - - toJSON(message: Information): unknown { - const obj: any = {}; - message.systemMode !== undefined && - (obj.systemMode = Math.round(message.systemMode)); - message.syncId !== undefined && (obj.syncId = Math.round(message.syncId)); - message.attractMovieId !== undefined && - (obj.attractMovieId = Math.round(message.attractMovieId)); - message.attractRankingId !== undefined && - (obj.attractRankingId = Math.round(message.attractRankingId)); - message.attractRandomSeed !== undefined && - (obj.attractRandomSeed = Math.round(message.attractRandomSeed)); - return obj; - }, - - fromPartial, I>>( - object: I - ): Information { - const message = createBaseInformation(); - message.systemMode = object.systemMode ?? 0; - message.syncId = object.syncId ?? 0; - message.attractMovieId = object.attractMovieId ?? 0; - message.attractRankingId = object.attractRankingId ?? 0; - message.attractRandomSeed = object.attractRandomSeed ?? 0; - return message; - }, -}; - -function createBaseRaceCar(): RaceCar { - return { - car: undefined, - rank: 0, - vsStarCount: 0, - vsConsecutiveWins: 0, - vsMedalsRankLevel: 0, - wasClearedStoryWhithoutLosing: false, - rgRegionMapScore: [], - }; -} - -export const RaceCar = { - encode( - message: RaceCar, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(10).fork()).ldelim(); - } - if (message.rank !== 0) { - writer.uint32(16).uint32(message.rank); - } - if (message.vsStarCount !== 0) { - writer.uint32(24).uint32(message.vsStarCount); - } - if (message.vsConsecutiveWins !== 0) { - writer.uint32(32).uint32(message.vsConsecutiveWins); - } - if (message.vsMedalsRankLevel !== 0) { - writer.uint32(40).uint32(message.vsMedalsRankLevel); - } - if (message.wasClearedStoryWhithoutLosing === true) { - writer.uint32(48).bool(message.wasClearedStoryWhithoutLosing); - } - writer.uint32(58).fork(); - for (const v of message.rgRegionMapScore) { - writer.uint32(v); - } - writer.ldelim(); - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): RaceCar { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRaceCar(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.car = Car.decode(reader, reader.uint32()); - break; - case 2: - message.rank = reader.uint32(); - break; - case 3: - message.vsStarCount = reader.uint32(); - break; - case 4: - message.vsConsecutiveWins = reader.uint32(); - break; - case 5: - message.vsMedalsRankLevel = reader.uint32(); - break; - case 6: - message.wasClearedStoryWhithoutLosing = reader.bool(); - break; - case 7: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.rgRegionMapScore.push(reader.uint32()); - } - } else { - message.rgRegionMapScore.push(reader.uint32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RaceCar { - return { - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - rank: isSet(object.rank) ? Number(object.rank) : 0, - vsStarCount: isSet(object.vsStarCount) ? Number(object.vsStarCount) : 0, - vsConsecutiveWins: isSet(object.vsConsecutiveWins) - ? Number(object.vsConsecutiveWins) - : 0, - vsMedalsRankLevel: isSet(object.vsMedalsRankLevel) - ? Number(object.vsMedalsRankLevel) - : 0, - wasClearedStoryWhithoutLosing: isSet(object.wasClearedStoryWhithoutLosing) - ? Boolean(object.wasClearedStoryWhithoutLosing) - : false, - rgRegionMapScore: Array.isArray(object?.rgRegionMapScore) - ? object.rgRegionMapScore.map((e: any) => Number(e)) - : [], - }; - }, - - toJSON(message: RaceCar): unknown { - const obj: any = {}; - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - message.rank !== undefined && (obj.rank = Math.round(message.rank)); - message.vsStarCount !== undefined && - (obj.vsStarCount = Math.round(message.vsStarCount)); - message.vsConsecutiveWins !== undefined && - (obj.vsConsecutiveWins = Math.round(message.vsConsecutiveWins)); - message.vsMedalsRankLevel !== undefined && - (obj.vsMedalsRankLevel = Math.round(message.vsMedalsRankLevel)); - message.wasClearedStoryWhithoutLosing !== undefined && - (obj.wasClearedStoryWhithoutLosing = - message.wasClearedStoryWhithoutLosing); - if (message.rgRegionMapScore) { - obj.rgRegionMapScore = message.rgRegionMapScore.map((e) => Math.round(e)); - } else { - obj.rgRegionMapScore = []; - } - return obj; - }, - - fromPartial, I>>(object: I): RaceCar { - const message = createBaseRaceCar(); - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - message.rank = object.rank ?? 0; - message.vsStarCount = object.vsStarCount ?? 0; - message.vsConsecutiveWins = object.vsConsecutiveWins ?? 0; - message.vsMedalsRankLevel = object.vsMedalsRankLevel ?? 0; - message.wasClearedStoryWhithoutLosing = - object.wasClearedStoryWhithoutLosing ?? false; - message.rgRegionMapScore = object.rgRegionMapScore?.map((e) => e) || []; - return message; - }, -}; - -function createBaseTournamentCar(): TournamentCar { - return { name: "", carId: 0, entryNumber: 0 }; -} - -export const TournamentCar = { - encode( - message: TournamentCar, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.carId !== 0) { - writer.uint32(16).sint32(message.carId); - } - if (message.entryNumber !== 0) { - writer.uint32(24).sint32(message.entryNumber); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TournamentCar { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTournamentCar(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.carId = reader.sint32(); - break; - case 3: - message.entryNumber = reader.sint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TournamentCar { - return { - name: isSet(object.name) ? String(object.name) : "", - carId: isSet(object.carId) ? Number(object.carId) : 0, - entryNumber: isSet(object.entryNumber) ? Number(object.entryNumber) : 0, - }; - }, - - toJSON(message: TournamentCar): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.entryNumber !== undefined && - (obj.entryNumber = Math.round(message.entryNumber)); - return obj; - }, - - fromPartial, I>>( - object: I - ): TournamentCar { - const message = createBaseTournamentCar(); - message.name = object.name ?? ""; - message.carId = object.carId ?? 0; - message.entryNumber = object.entryNumber ?? 0; - return message; - }, -}; - -function createBaseTournamentCarList(): TournamentCarList { - return { - car00: undefined, - car01: undefined, - car02: undefined, - car03: undefined, - car04: undefined, - car05: undefined, - car06: undefined, - car07: undefined, - car08: undefined, - car09: undefined, - car10: undefined, - car11: undefined, - car12: undefined, - car13: undefined, - car14: undefined, - car15: undefined, - car16: undefined, - car17: undefined, - car18: undefined, - car19: undefined, - car20: undefined, - car21: undefined, - car22: undefined, - car23: undefined, - car24: undefined, - car25: undefined, - car26: undefined, - car27: undefined, - car28: undefined, - car29: undefined, - car30: undefined, - car31: undefined, - }; -} - -export const TournamentCarList = { - encode( - message: TournamentCarList, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.car00 !== undefined) { - TournamentCar.encode(message.car00, writer.uint32(10).fork()).ldelim(); - } - if (message.car01 !== undefined) { - TournamentCar.encode(message.car01, writer.uint32(18).fork()).ldelim(); - } - if (message.car02 !== undefined) { - TournamentCar.encode(message.car02, writer.uint32(26).fork()).ldelim(); - } - if (message.car03 !== undefined) { - TournamentCar.encode(message.car03, writer.uint32(34).fork()).ldelim(); - } - if (message.car04 !== undefined) { - TournamentCar.encode(message.car04, writer.uint32(42).fork()).ldelim(); - } - if (message.car05 !== undefined) { - TournamentCar.encode(message.car05, writer.uint32(50).fork()).ldelim(); - } - if (message.car06 !== undefined) { - TournamentCar.encode(message.car06, writer.uint32(58).fork()).ldelim(); - } - if (message.car07 !== undefined) { - TournamentCar.encode(message.car07, writer.uint32(66).fork()).ldelim(); - } - if (message.car08 !== undefined) { - TournamentCar.encode(message.car08, writer.uint32(74).fork()).ldelim(); - } - if (message.car09 !== undefined) { - TournamentCar.encode(message.car09, writer.uint32(82).fork()).ldelim(); - } - if (message.car10 !== undefined) { - TournamentCar.encode(message.car10, writer.uint32(90).fork()).ldelim(); - } - if (message.car11 !== undefined) { - TournamentCar.encode(message.car11, writer.uint32(98).fork()).ldelim(); - } - if (message.car12 !== undefined) { - TournamentCar.encode(message.car12, writer.uint32(106).fork()).ldelim(); - } - if (message.car13 !== undefined) { - TournamentCar.encode(message.car13, writer.uint32(114).fork()).ldelim(); - } - if (message.car14 !== undefined) { - TournamentCar.encode(message.car14, writer.uint32(122).fork()).ldelim(); - } - if (message.car15 !== undefined) { - TournamentCar.encode(message.car15, writer.uint32(130).fork()).ldelim(); - } - if (message.car16 !== undefined) { - TournamentCar.encode(message.car16, writer.uint32(138).fork()).ldelim(); - } - if (message.car17 !== undefined) { - TournamentCar.encode(message.car17, writer.uint32(146).fork()).ldelim(); - } - if (message.car18 !== undefined) { - TournamentCar.encode(message.car18, writer.uint32(154).fork()).ldelim(); - } - if (message.car19 !== undefined) { - TournamentCar.encode(message.car19, writer.uint32(162).fork()).ldelim(); - } - if (message.car20 !== undefined) { - TournamentCar.encode(message.car20, writer.uint32(170).fork()).ldelim(); - } - if (message.car21 !== undefined) { - TournamentCar.encode(message.car21, writer.uint32(178).fork()).ldelim(); - } - if (message.car22 !== undefined) { - TournamentCar.encode(message.car22, writer.uint32(186).fork()).ldelim(); - } - if (message.car23 !== undefined) { - TournamentCar.encode(message.car23, writer.uint32(194).fork()).ldelim(); - } - if (message.car24 !== undefined) { - TournamentCar.encode(message.car24, writer.uint32(202).fork()).ldelim(); - } - if (message.car25 !== undefined) { - TournamentCar.encode(message.car25, writer.uint32(210).fork()).ldelim(); - } - if (message.car26 !== undefined) { - TournamentCar.encode(message.car26, writer.uint32(218).fork()).ldelim(); - } - if (message.car27 !== undefined) { - TournamentCar.encode(message.car27, writer.uint32(226).fork()).ldelim(); - } - if (message.car28 !== undefined) { - TournamentCar.encode(message.car28, writer.uint32(234).fork()).ldelim(); - } - if (message.car29 !== undefined) { - TournamentCar.encode(message.car29, writer.uint32(242).fork()).ldelim(); - } - if (message.car30 !== undefined) { - TournamentCar.encode(message.car30, writer.uint32(250).fork()).ldelim(); - } - if (message.car31 !== undefined) { - TournamentCar.encode(message.car31, writer.uint32(258).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TournamentCarList { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTournamentCarList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.car00 = TournamentCar.decode(reader, reader.uint32()); - break; - case 2: - message.car01 = TournamentCar.decode(reader, reader.uint32()); - break; - case 3: - message.car02 = TournamentCar.decode(reader, reader.uint32()); - break; - case 4: - message.car03 = TournamentCar.decode(reader, reader.uint32()); - break; - case 5: - message.car04 = TournamentCar.decode(reader, reader.uint32()); - break; - case 6: - message.car05 = TournamentCar.decode(reader, reader.uint32()); - break; - case 7: - message.car06 = TournamentCar.decode(reader, reader.uint32()); - break; - case 8: - message.car07 = TournamentCar.decode(reader, reader.uint32()); - break; - case 9: - message.car08 = TournamentCar.decode(reader, reader.uint32()); - break; - case 10: - message.car09 = TournamentCar.decode(reader, reader.uint32()); - break; - case 11: - message.car10 = TournamentCar.decode(reader, reader.uint32()); - break; - case 12: - message.car11 = TournamentCar.decode(reader, reader.uint32()); - break; - case 13: - message.car12 = TournamentCar.decode(reader, reader.uint32()); - break; - case 14: - message.car13 = TournamentCar.decode(reader, reader.uint32()); - break; - case 15: - message.car14 = TournamentCar.decode(reader, reader.uint32()); - break; - case 16: - message.car15 = TournamentCar.decode(reader, reader.uint32()); - break; - case 17: - message.car16 = TournamentCar.decode(reader, reader.uint32()); - break; - case 18: - message.car17 = TournamentCar.decode(reader, reader.uint32()); - break; - case 19: - message.car18 = TournamentCar.decode(reader, reader.uint32()); - break; - case 20: - message.car19 = TournamentCar.decode(reader, reader.uint32()); - break; - case 21: - message.car20 = TournamentCar.decode(reader, reader.uint32()); - break; - case 22: - message.car21 = TournamentCar.decode(reader, reader.uint32()); - break; - case 23: - message.car22 = TournamentCar.decode(reader, reader.uint32()); - break; - case 24: - message.car23 = TournamentCar.decode(reader, reader.uint32()); - break; - case 25: - message.car24 = TournamentCar.decode(reader, reader.uint32()); - break; - case 26: - message.car25 = TournamentCar.decode(reader, reader.uint32()); - break; - case 27: - message.car26 = TournamentCar.decode(reader, reader.uint32()); - break; - case 28: - message.car27 = TournamentCar.decode(reader, reader.uint32()); - break; - case 29: - message.car28 = TournamentCar.decode(reader, reader.uint32()); - break; - case 30: - message.car29 = TournamentCar.decode(reader, reader.uint32()); - break; - case 31: - message.car30 = TournamentCar.decode(reader, reader.uint32()); - break; - case 32: - message.car31 = TournamentCar.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TournamentCarList { - return { - car00: isSet(object.car00) - ? TournamentCar.fromJSON(object.car00) - : undefined, - car01: isSet(object.car01) - ? TournamentCar.fromJSON(object.car01) - : undefined, - car02: isSet(object.car02) - ? TournamentCar.fromJSON(object.car02) - : undefined, - car03: isSet(object.car03) - ? TournamentCar.fromJSON(object.car03) - : undefined, - car04: isSet(object.car04) - ? TournamentCar.fromJSON(object.car04) - : undefined, - car05: isSet(object.car05) - ? TournamentCar.fromJSON(object.car05) - : undefined, - car06: isSet(object.car06) - ? TournamentCar.fromJSON(object.car06) - : undefined, - car07: isSet(object.car07) - ? TournamentCar.fromJSON(object.car07) - : undefined, - car08: isSet(object.car08) - ? TournamentCar.fromJSON(object.car08) - : undefined, - car09: isSet(object.car09) - ? TournamentCar.fromJSON(object.car09) - : undefined, - car10: isSet(object.car10) - ? TournamentCar.fromJSON(object.car10) - : undefined, - car11: isSet(object.car11) - ? TournamentCar.fromJSON(object.car11) - : undefined, - car12: isSet(object.car12) - ? TournamentCar.fromJSON(object.car12) - : undefined, - car13: isSet(object.car13) - ? TournamentCar.fromJSON(object.car13) - : undefined, - car14: isSet(object.car14) - ? TournamentCar.fromJSON(object.car14) - : undefined, - car15: isSet(object.car15) - ? TournamentCar.fromJSON(object.car15) - : undefined, - car16: isSet(object.car16) - ? TournamentCar.fromJSON(object.car16) - : undefined, - car17: isSet(object.car17) - ? TournamentCar.fromJSON(object.car17) - : undefined, - car18: isSet(object.car18) - ? TournamentCar.fromJSON(object.car18) - : undefined, - car19: isSet(object.car19) - ? TournamentCar.fromJSON(object.car19) - : undefined, - car20: isSet(object.car20) - ? TournamentCar.fromJSON(object.car20) - : undefined, - car21: isSet(object.car21) - ? TournamentCar.fromJSON(object.car21) - : undefined, - car22: isSet(object.car22) - ? TournamentCar.fromJSON(object.car22) - : undefined, - car23: isSet(object.car23) - ? TournamentCar.fromJSON(object.car23) - : undefined, - car24: isSet(object.car24) - ? TournamentCar.fromJSON(object.car24) - : undefined, - car25: isSet(object.car25) - ? TournamentCar.fromJSON(object.car25) - : undefined, - car26: isSet(object.car26) - ? TournamentCar.fromJSON(object.car26) - : undefined, - car27: isSet(object.car27) - ? TournamentCar.fromJSON(object.car27) - : undefined, - car28: isSet(object.car28) - ? TournamentCar.fromJSON(object.car28) - : undefined, - car29: isSet(object.car29) - ? TournamentCar.fromJSON(object.car29) - : undefined, - car30: isSet(object.car30) - ? TournamentCar.fromJSON(object.car30) - : undefined, - car31: isSet(object.car31) - ? TournamentCar.fromJSON(object.car31) - : undefined, - }; - }, - - toJSON(message: TournamentCarList): unknown { - const obj: any = {}; - message.car00 !== undefined && - (obj.car00 = message.car00 - ? TournamentCar.toJSON(message.car00) - : undefined); - message.car01 !== undefined && - (obj.car01 = message.car01 - ? TournamentCar.toJSON(message.car01) - : undefined); - message.car02 !== undefined && - (obj.car02 = message.car02 - ? TournamentCar.toJSON(message.car02) - : undefined); - message.car03 !== undefined && - (obj.car03 = message.car03 - ? TournamentCar.toJSON(message.car03) - : undefined); - message.car04 !== undefined && - (obj.car04 = message.car04 - ? TournamentCar.toJSON(message.car04) - : undefined); - message.car05 !== undefined && - (obj.car05 = message.car05 - ? TournamentCar.toJSON(message.car05) - : undefined); - message.car06 !== undefined && - (obj.car06 = message.car06 - ? TournamentCar.toJSON(message.car06) - : undefined); - message.car07 !== undefined && - (obj.car07 = message.car07 - ? TournamentCar.toJSON(message.car07) - : undefined); - message.car08 !== undefined && - (obj.car08 = message.car08 - ? TournamentCar.toJSON(message.car08) - : undefined); - message.car09 !== undefined && - (obj.car09 = message.car09 - ? TournamentCar.toJSON(message.car09) - : undefined); - message.car10 !== undefined && - (obj.car10 = message.car10 - ? TournamentCar.toJSON(message.car10) - : undefined); - message.car11 !== undefined && - (obj.car11 = message.car11 - ? TournamentCar.toJSON(message.car11) - : undefined); - message.car12 !== undefined && - (obj.car12 = message.car12 - ? TournamentCar.toJSON(message.car12) - : undefined); - message.car13 !== undefined && - (obj.car13 = message.car13 - ? TournamentCar.toJSON(message.car13) - : undefined); - message.car14 !== undefined && - (obj.car14 = message.car14 - ? TournamentCar.toJSON(message.car14) - : undefined); - message.car15 !== undefined && - (obj.car15 = message.car15 - ? TournamentCar.toJSON(message.car15) - : undefined); - message.car16 !== undefined && - (obj.car16 = message.car16 - ? TournamentCar.toJSON(message.car16) - : undefined); - message.car17 !== undefined && - (obj.car17 = message.car17 - ? TournamentCar.toJSON(message.car17) - : undefined); - message.car18 !== undefined && - (obj.car18 = message.car18 - ? TournamentCar.toJSON(message.car18) - : undefined); - message.car19 !== undefined && - (obj.car19 = message.car19 - ? TournamentCar.toJSON(message.car19) - : undefined); - message.car20 !== undefined && - (obj.car20 = message.car20 - ? TournamentCar.toJSON(message.car20) - : undefined); - message.car21 !== undefined && - (obj.car21 = message.car21 - ? TournamentCar.toJSON(message.car21) - : undefined); - message.car22 !== undefined && - (obj.car22 = message.car22 - ? TournamentCar.toJSON(message.car22) - : undefined); - message.car23 !== undefined && - (obj.car23 = message.car23 - ? TournamentCar.toJSON(message.car23) - : undefined); - message.car24 !== undefined && - (obj.car24 = message.car24 - ? TournamentCar.toJSON(message.car24) - : undefined); - message.car25 !== undefined && - (obj.car25 = message.car25 - ? TournamentCar.toJSON(message.car25) - : undefined); - message.car26 !== undefined && - (obj.car26 = message.car26 - ? TournamentCar.toJSON(message.car26) - : undefined); - message.car27 !== undefined && - (obj.car27 = message.car27 - ? TournamentCar.toJSON(message.car27) - : undefined); - message.car28 !== undefined && - (obj.car28 = message.car28 - ? TournamentCar.toJSON(message.car28) - : undefined); - message.car29 !== undefined && - (obj.car29 = message.car29 - ? TournamentCar.toJSON(message.car29) - : undefined); - message.car30 !== undefined && - (obj.car30 = message.car30 - ? TournamentCar.toJSON(message.car30) - : undefined); - message.car31 !== undefined && - (obj.car31 = message.car31 - ? TournamentCar.toJSON(message.car31) - : undefined); - return obj; - }, - - fromPartial, I>>( - object: I - ): TournamentCarList { - const message = createBaseTournamentCarList(); - message.car00 = - object.car00 !== undefined && object.car00 !== null - ? TournamentCar.fromPartial(object.car00) - : undefined; - message.car01 = - object.car01 !== undefined && object.car01 !== null - ? TournamentCar.fromPartial(object.car01) - : undefined; - message.car02 = - object.car02 !== undefined && object.car02 !== null - ? TournamentCar.fromPartial(object.car02) - : undefined; - message.car03 = - object.car03 !== undefined && object.car03 !== null - ? TournamentCar.fromPartial(object.car03) - : undefined; - message.car04 = - object.car04 !== undefined && object.car04 !== null - ? TournamentCar.fromPartial(object.car04) - : undefined; - message.car05 = - object.car05 !== undefined && object.car05 !== null - ? TournamentCar.fromPartial(object.car05) - : undefined; - message.car06 = - object.car06 !== undefined && object.car06 !== null - ? TournamentCar.fromPartial(object.car06) - : undefined; - message.car07 = - object.car07 !== undefined && object.car07 !== null - ? TournamentCar.fromPartial(object.car07) - : undefined; - message.car08 = - object.car08 !== undefined && object.car08 !== null - ? TournamentCar.fromPartial(object.car08) - : undefined; - message.car09 = - object.car09 !== undefined && object.car09 !== null - ? TournamentCar.fromPartial(object.car09) - : undefined; - message.car10 = - object.car10 !== undefined && object.car10 !== null - ? TournamentCar.fromPartial(object.car10) - : undefined; - message.car11 = - object.car11 !== undefined && object.car11 !== null - ? TournamentCar.fromPartial(object.car11) - : undefined; - message.car12 = - object.car12 !== undefined && object.car12 !== null - ? TournamentCar.fromPartial(object.car12) - : undefined; - message.car13 = - object.car13 !== undefined && object.car13 !== null - ? TournamentCar.fromPartial(object.car13) - : undefined; - message.car14 = - object.car14 !== undefined && object.car14 !== null - ? TournamentCar.fromPartial(object.car14) - : undefined; - message.car15 = - object.car15 !== undefined && object.car15 !== null - ? TournamentCar.fromPartial(object.car15) - : undefined; - message.car16 = - object.car16 !== undefined && object.car16 !== null - ? TournamentCar.fromPartial(object.car16) - : undefined; - message.car17 = - object.car17 !== undefined && object.car17 !== null - ? TournamentCar.fromPartial(object.car17) - : undefined; - message.car18 = - object.car18 !== undefined && object.car18 !== null - ? TournamentCar.fromPartial(object.car18) - : undefined; - message.car19 = - object.car19 !== undefined && object.car19 !== null - ? TournamentCar.fromPartial(object.car19) - : undefined; - message.car20 = - object.car20 !== undefined && object.car20 !== null - ? TournamentCar.fromPartial(object.car20) - : undefined; - message.car21 = - object.car21 !== undefined && object.car21 !== null - ? TournamentCar.fromPartial(object.car21) - : undefined; - message.car22 = - object.car22 !== undefined && object.car22 !== null - ? TournamentCar.fromPartial(object.car22) - : undefined; - message.car23 = - object.car23 !== undefined && object.car23 !== null - ? TournamentCar.fromPartial(object.car23) - : undefined; - message.car24 = - object.car24 !== undefined && object.car24 !== null - ? TournamentCar.fromPartial(object.car24) - : undefined; - message.car25 = - object.car25 !== undefined && object.car25 !== null - ? TournamentCar.fromPartial(object.car25) - : undefined; - message.car26 = - object.car26 !== undefined && object.car26 !== null - ? TournamentCar.fromPartial(object.car26) - : undefined; - message.car27 = - object.car27 !== undefined && object.car27 !== null - ? TournamentCar.fromPartial(object.car27) - : undefined; - message.car28 = - object.car28 !== undefined && object.car28 !== null - ? TournamentCar.fromPartial(object.car28) - : undefined; - message.car29 = - object.car29 !== undefined && object.car29 !== null - ? TournamentCar.fromPartial(object.car29) - : undefined; - message.car30 = - object.car30 !== undefined && object.car30 !== null - ? TournamentCar.fromPartial(object.car30) - : undefined; - message.car31 = - object.car31 !== undefined && object.car31 !== null - ? TournamentCar.fromPartial(object.car31) - : undefined; - return message; - }, -}; - -function createBaseTournamentRaceData(): TournamentRaceData { - return { - raceNumber: 0, - roundNumber: 0, - gameNumber: 0, - player00: 0, - player01: 0, - player02: 0, - player03: 0, - result00: 0, - result01: 0, - result02: 0, - result03: 0, - }; -} - -export const TournamentRaceData = { - encode( - message: TournamentRaceData, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.raceNumber !== 0) { - writer.uint32(8).uint32(message.raceNumber); - } - if (message.roundNumber !== 0) { - writer.uint32(16).uint32(message.roundNumber); - } - if (message.gameNumber !== 0) { - writer.uint32(24).uint32(message.gameNumber); - } - if (message.player00 !== 0) { - writer.uint32(32).sint32(message.player00); - } - if (message.player01 !== 0) { - writer.uint32(40).sint32(message.player01); - } - if (message.player02 !== 0) { - writer.uint32(48).sint32(message.player02); - } - if (message.player03 !== 0) { - writer.uint32(56).sint32(message.player03); - } - if (message.result00 !== 0) { - writer.uint32(64).sint32(message.result00); - } - if (message.result01 !== 0) { - writer.uint32(72).sint32(message.result01); - } - if (message.result02 !== 0) { - writer.uint32(80).sint32(message.result02); - } - if (message.result03 !== 0) { - writer.uint32(88).sint32(message.result03); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TournamentRaceData { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTournamentRaceData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.raceNumber = reader.uint32(); - break; - case 2: - message.roundNumber = reader.uint32(); - break; - case 3: - message.gameNumber = reader.uint32(); - break; - case 4: - message.player00 = reader.sint32(); - break; - case 5: - message.player01 = reader.sint32(); - break; - case 6: - message.player02 = reader.sint32(); - break; - case 7: - message.player03 = reader.sint32(); - break; - case 8: - message.result00 = reader.sint32(); - break; - case 9: - message.result01 = reader.sint32(); - break; - case 10: - message.result02 = reader.sint32(); - break; - case 11: - message.result03 = reader.sint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TournamentRaceData { - return { - raceNumber: isSet(object.raceNumber) ? Number(object.raceNumber) : 0, - roundNumber: isSet(object.roundNumber) ? Number(object.roundNumber) : 0, - gameNumber: isSet(object.gameNumber) ? Number(object.gameNumber) : 0, - player00: isSet(object.player00) ? Number(object.player00) : 0, - player01: isSet(object.player01) ? Number(object.player01) : 0, - player02: isSet(object.player02) ? Number(object.player02) : 0, - player03: isSet(object.player03) ? Number(object.player03) : 0, - result00: isSet(object.result00) ? Number(object.result00) : 0, - result01: isSet(object.result01) ? Number(object.result01) : 0, - result02: isSet(object.result02) ? Number(object.result02) : 0, - result03: isSet(object.result03) ? Number(object.result03) : 0, - }; - }, - - toJSON(message: TournamentRaceData): unknown { - const obj: any = {}; - message.raceNumber !== undefined && - (obj.raceNumber = Math.round(message.raceNumber)); - message.roundNumber !== undefined && - (obj.roundNumber = Math.round(message.roundNumber)); - message.gameNumber !== undefined && - (obj.gameNumber = Math.round(message.gameNumber)); - message.player00 !== undefined && - (obj.player00 = Math.round(message.player00)); - message.player01 !== undefined && - (obj.player01 = Math.round(message.player01)); - message.player02 !== undefined && - (obj.player02 = Math.round(message.player02)); - message.player03 !== undefined && - (obj.player03 = Math.round(message.player03)); - message.result00 !== undefined && - (obj.result00 = Math.round(message.result00)); - message.result01 !== undefined && - (obj.result01 = Math.round(message.result01)); - message.result02 !== undefined && - (obj.result02 = Math.round(message.result02)); - message.result03 !== undefined && - (obj.result03 = Math.round(message.result03)); - return obj; - }, - - fromPartial, I>>( - object: I - ): TournamentRaceData { - const message = createBaseTournamentRaceData(); - message.raceNumber = object.raceNumber ?? 0; - message.roundNumber = object.roundNumber ?? 0; - message.gameNumber = object.gameNumber ?? 0; - message.player00 = object.player00 ?? 0; - message.player01 = object.player01 ?? 0; - message.player02 = object.player02 ?? 0; - message.player03 = object.player03 ?? 0; - message.result00 = object.result00 ?? 0; - message.result01 = object.result01 ?? 0; - message.result02 = object.result02 ?? 0; - message.result03 = object.result03 ?? 0; - return message; - }, -}; - -function createBaseTournamentRaceDataList(): TournamentRaceDataList { - return { - raceData00: undefined, - raceData01: undefined, - raceData02: undefined, - raceData03: undefined, - raceData04: undefined, - raceData05: undefined, - raceData06: undefined, - raceData07: undefined, - raceData08: undefined, - raceData09: undefined, - raceData10: undefined, - raceData11: undefined, - raceData12: undefined, - raceData13: undefined, - raceData14: undefined, - raceData15: undefined, - raceData16: undefined, - raceData17: undefined, - raceData18: undefined, - raceData19: undefined, - raceData20: undefined, - raceData21: undefined, - raceData22: undefined, - raceData23: undefined, - raceData24: undefined, - raceData25: undefined, - raceData26: undefined, - raceData27: undefined, - raceData28: undefined, - raceData29: undefined, - raceData30: undefined, - raceData31: undefined, - raceData32: undefined, - raceData33: undefined, - raceData34: undefined, - }; -} - -export const TournamentRaceDataList = { - encode( - message: TournamentRaceDataList, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.raceData00 !== undefined) { - TournamentRaceData.encode( - message.raceData00, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.raceData01 !== undefined) { - TournamentRaceData.encode( - message.raceData01, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.raceData02 !== undefined) { - TournamentRaceData.encode( - message.raceData02, - writer.uint32(26).fork() - ).ldelim(); - } - if (message.raceData03 !== undefined) { - TournamentRaceData.encode( - message.raceData03, - writer.uint32(34).fork() - ).ldelim(); - } - if (message.raceData04 !== undefined) { - TournamentRaceData.encode( - message.raceData04, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.raceData05 !== undefined) { - TournamentRaceData.encode( - message.raceData05, - writer.uint32(50).fork() - ).ldelim(); - } - if (message.raceData06 !== undefined) { - TournamentRaceData.encode( - message.raceData06, - writer.uint32(58).fork() - ).ldelim(); - } - if (message.raceData07 !== undefined) { - TournamentRaceData.encode( - message.raceData07, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.raceData08 !== undefined) { - TournamentRaceData.encode( - message.raceData08, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.raceData09 !== undefined) { - TournamentRaceData.encode( - message.raceData09, - writer.uint32(82).fork() - ).ldelim(); - } - if (message.raceData10 !== undefined) { - TournamentRaceData.encode( - message.raceData10, - writer.uint32(90).fork() - ).ldelim(); - } - if (message.raceData11 !== undefined) { - TournamentRaceData.encode( - message.raceData11, - writer.uint32(98).fork() - ).ldelim(); - } - if (message.raceData12 !== undefined) { - TournamentRaceData.encode( - message.raceData12, - writer.uint32(106).fork() - ).ldelim(); - } - if (message.raceData13 !== undefined) { - TournamentRaceData.encode( - message.raceData13, - writer.uint32(114).fork() - ).ldelim(); - } - if (message.raceData14 !== undefined) { - TournamentRaceData.encode( - message.raceData14, - writer.uint32(122).fork() - ).ldelim(); - } - if (message.raceData15 !== undefined) { - TournamentRaceData.encode( - message.raceData15, - writer.uint32(130).fork() - ).ldelim(); - } - if (message.raceData16 !== undefined) { - TournamentRaceData.encode( - message.raceData16, - writer.uint32(138).fork() - ).ldelim(); - } - if (message.raceData17 !== undefined) { - TournamentRaceData.encode( - message.raceData17, - writer.uint32(146).fork() - ).ldelim(); - } - if (message.raceData18 !== undefined) { - TournamentRaceData.encode( - message.raceData18, - writer.uint32(154).fork() - ).ldelim(); - } - if (message.raceData19 !== undefined) { - TournamentRaceData.encode( - message.raceData19, - writer.uint32(162).fork() - ).ldelim(); - } - if (message.raceData20 !== undefined) { - TournamentRaceData.encode( - message.raceData20, - writer.uint32(170).fork() - ).ldelim(); - } - if (message.raceData21 !== undefined) { - TournamentRaceData.encode( - message.raceData21, - writer.uint32(178).fork() - ).ldelim(); - } - if (message.raceData22 !== undefined) { - TournamentRaceData.encode( - message.raceData22, - writer.uint32(186).fork() - ).ldelim(); - } - if (message.raceData23 !== undefined) { - TournamentRaceData.encode( - message.raceData23, - writer.uint32(194).fork() - ).ldelim(); - } - if (message.raceData24 !== undefined) { - TournamentRaceData.encode( - message.raceData24, - writer.uint32(202).fork() - ).ldelim(); - } - if (message.raceData25 !== undefined) { - TournamentRaceData.encode( - message.raceData25, - writer.uint32(210).fork() - ).ldelim(); - } - if (message.raceData26 !== undefined) { - TournamentRaceData.encode( - message.raceData26, - writer.uint32(218).fork() - ).ldelim(); - } - if (message.raceData27 !== undefined) { - TournamentRaceData.encode( - message.raceData27, - writer.uint32(226).fork() - ).ldelim(); - } - if (message.raceData28 !== undefined) { - TournamentRaceData.encode( - message.raceData28, - writer.uint32(234).fork() - ).ldelim(); - } - if (message.raceData29 !== undefined) { - TournamentRaceData.encode( - message.raceData29, - writer.uint32(242).fork() - ).ldelim(); - } - if (message.raceData30 !== undefined) { - TournamentRaceData.encode( - message.raceData30, - writer.uint32(250).fork() - ).ldelim(); - } - if (message.raceData31 !== undefined) { - TournamentRaceData.encode( - message.raceData31, - writer.uint32(258).fork() - ).ldelim(); - } - if (message.raceData32 !== undefined) { - TournamentRaceData.encode( - message.raceData32, - writer.uint32(266).fork() - ).ldelim(); - } - if (message.raceData33 !== undefined) { - TournamentRaceData.encode( - message.raceData33, - writer.uint32(274).fork() - ).ldelim(); - } - if (message.raceData34 !== undefined) { - TournamentRaceData.encode( - message.raceData34, - writer.uint32(282).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): TournamentRaceDataList { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTournamentRaceDataList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.raceData00 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.raceData01 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 3: - message.raceData02 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 4: - message.raceData03 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 5: - message.raceData04 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 6: - message.raceData05 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 7: - message.raceData06 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 8: - message.raceData07 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 9: - message.raceData08 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 10: - message.raceData09 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 11: - message.raceData10 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.raceData11 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 13: - message.raceData12 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 14: - message.raceData13 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 15: - message.raceData14 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 16: - message.raceData15 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 17: - message.raceData16 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 18: - message.raceData17 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 19: - message.raceData18 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 20: - message.raceData19 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 21: - message.raceData20 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 22: - message.raceData21 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 23: - message.raceData22 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 24: - message.raceData23 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 25: - message.raceData24 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 26: - message.raceData25 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 27: - message.raceData26 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 28: - message.raceData27 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 29: - message.raceData28 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 30: - message.raceData29 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 31: - message.raceData30 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 32: - message.raceData31 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 33: - message.raceData32 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 34: - message.raceData33 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - case 35: - message.raceData34 = TournamentRaceData.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TournamentRaceDataList { - return { - raceData00: isSet(object.raceData00) - ? TournamentRaceData.fromJSON(object.raceData00) - : undefined, - raceData01: isSet(object.raceData01) - ? TournamentRaceData.fromJSON(object.raceData01) - : undefined, - raceData02: isSet(object.raceData02) - ? TournamentRaceData.fromJSON(object.raceData02) - : undefined, - raceData03: isSet(object.raceData03) - ? TournamentRaceData.fromJSON(object.raceData03) - : undefined, - raceData04: isSet(object.raceData04) - ? TournamentRaceData.fromJSON(object.raceData04) - : undefined, - raceData05: isSet(object.raceData05) - ? TournamentRaceData.fromJSON(object.raceData05) - : undefined, - raceData06: isSet(object.raceData06) - ? TournamentRaceData.fromJSON(object.raceData06) - : undefined, - raceData07: isSet(object.raceData07) - ? TournamentRaceData.fromJSON(object.raceData07) - : undefined, - raceData08: isSet(object.raceData08) - ? TournamentRaceData.fromJSON(object.raceData08) - : undefined, - raceData09: isSet(object.raceData09) - ? TournamentRaceData.fromJSON(object.raceData09) - : undefined, - raceData10: isSet(object.raceData10) - ? TournamentRaceData.fromJSON(object.raceData10) - : undefined, - raceData11: isSet(object.raceData11) - ? TournamentRaceData.fromJSON(object.raceData11) - : undefined, - raceData12: isSet(object.raceData12) - ? TournamentRaceData.fromJSON(object.raceData12) - : undefined, - raceData13: isSet(object.raceData13) - ? TournamentRaceData.fromJSON(object.raceData13) - : undefined, - raceData14: isSet(object.raceData14) - ? TournamentRaceData.fromJSON(object.raceData14) - : undefined, - raceData15: isSet(object.raceData15) - ? TournamentRaceData.fromJSON(object.raceData15) - : undefined, - raceData16: isSet(object.raceData16) - ? TournamentRaceData.fromJSON(object.raceData16) - : undefined, - raceData17: isSet(object.raceData17) - ? TournamentRaceData.fromJSON(object.raceData17) - : undefined, - raceData18: isSet(object.raceData18) - ? TournamentRaceData.fromJSON(object.raceData18) - : undefined, - raceData19: isSet(object.raceData19) - ? TournamentRaceData.fromJSON(object.raceData19) - : undefined, - raceData20: isSet(object.raceData20) - ? TournamentRaceData.fromJSON(object.raceData20) - : undefined, - raceData21: isSet(object.raceData21) - ? TournamentRaceData.fromJSON(object.raceData21) - : undefined, - raceData22: isSet(object.raceData22) - ? TournamentRaceData.fromJSON(object.raceData22) - : undefined, - raceData23: isSet(object.raceData23) - ? TournamentRaceData.fromJSON(object.raceData23) - : undefined, - raceData24: isSet(object.raceData24) - ? TournamentRaceData.fromJSON(object.raceData24) - : undefined, - raceData25: isSet(object.raceData25) - ? TournamentRaceData.fromJSON(object.raceData25) - : undefined, - raceData26: isSet(object.raceData26) - ? TournamentRaceData.fromJSON(object.raceData26) - : undefined, - raceData27: isSet(object.raceData27) - ? TournamentRaceData.fromJSON(object.raceData27) - : undefined, - raceData28: isSet(object.raceData28) - ? TournamentRaceData.fromJSON(object.raceData28) - : undefined, - raceData29: isSet(object.raceData29) - ? TournamentRaceData.fromJSON(object.raceData29) - : undefined, - raceData30: isSet(object.raceData30) - ? TournamentRaceData.fromJSON(object.raceData30) - : undefined, - raceData31: isSet(object.raceData31) - ? TournamentRaceData.fromJSON(object.raceData31) - : undefined, - raceData32: isSet(object.raceData32) - ? TournamentRaceData.fromJSON(object.raceData32) - : undefined, - raceData33: isSet(object.raceData33) - ? TournamentRaceData.fromJSON(object.raceData33) - : undefined, - raceData34: isSet(object.raceData34) - ? TournamentRaceData.fromJSON(object.raceData34) - : undefined, - }; - }, - - toJSON(message: TournamentRaceDataList): unknown { - const obj: any = {}; - message.raceData00 !== undefined && - (obj.raceData00 = message.raceData00 - ? TournamentRaceData.toJSON(message.raceData00) - : undefined); - message.raceData01 !== undefined && - (obj.raceData01 = message.raceData01 - ? TournamentRaceData.toJSON(message.raceData01) - : undefined); - message.raceData02 !== undefined && - (obj.raceData02 = message.raceData02 - ? TournamentRaceData.toJSON(message.raceData02) - : undefined); - message.raceData03 !== undefined && - (obj.raceData03 = message.raceData03 - ? TournamentRaceData.toJSON(message.raceData03) - : undefined); - message.raceData04 !== undefined && - (obj.raceData04 = message.raceData04 - ? TournamentRaceData.toJSON(message.raceData04) - : undefined); - message.raceData05 !== undefined && - (obj.raceData05 = message.raceData05 - ? TournamentRaceData.toJSON(message.raceData05) - : undefined); - message.raceData06 !== undefined && - (obj.raceData06 = message.raceData06 - ? TournamentRaceData.toJSON(message.raceData06) - : undefined); - message.raceData07 !== undefined && - (obj.raceData07 = message.raceData07 - ? TournamentRaceData.toJSON(message.raceData07) - : undefined); - message.raceData08 !== undefined && - (obj.raceData08 = message.raceData08 - ? TournamentRaceData.toJSON(message.raceData08) - : undefined); - message.raceData09 !== undefined && - (obj.raceData09 = message.raceData09 - ? TournamentRaceData.toJSON(message.raceData09) - : undefined); - message.raceData10 !== undefined && - (obj.raceData10 = message.raceData10 - ? TournamentRaceData.toJSON(message.raceData10) - : undefined); - message.raceData11 !== undefined && - (obj.raceData11 = message.raceData11 - ? TournamentRaceData.toJSON(message.raceData11) - : undefined); - message.raceData12 !== undefined && - (obj.raceData12 = message.raceData12 - ? TournamentRaceData.toJSON(message.raceData12) - : undefined); - message.raceData13 !== undefined && - (obj.raceData13 = message.raceData13 - ? TournamentRaceData.toJSON(message.raceData13) - : undefined); - message.raceData14 !== undefined && - (obj.raceData14 = message.raceData14 - ? TournamentRaceData.toJSON(message.raceData14) - : undefined); - message.raceData15 !== undefined && - (obj.raceData15 = message.raceData15 - ? TournamentRaceData.toJSON(message.raceData15) - : undefined); - message.raceData16 !== undefined && - (obj.raceData16 = message.raceData16 - ? TournamentRaceData.toJSON(message.raceData16) - : undefined); - message.raceData17 !== undefined && - (obj.raceData17 = message.raceData17 - ? TournamentRaceData.toJSON(message.raceData17) - : undefined); - message.raceData18 !== undefined && - (obj.raceData18 = message.raceData18 - ? TournamentRaceData.toJSON(message.raceData18) - : undefined); - message.raceData19 !== undefined && - (obj.raceData19 = message.raceData19 - ? TournamentRaceData.toJSON(message.raceData19) - : undefined); - message.raceData20 !== undefined && - (obj.raceData20 = message.raceData20 - ? TournamentRaceData.toJSON(message.raceData20) - : undefined); - message.raceData21 !== undefined && - (obj.raceData21 = message.raceData21 - ? TournamentRaceData.toJSON(message.raceData21) - : undefined); - message.raceData22 !== undefined && - (obj.raceData22 = message.raceData22 - ? TournamentRaceData.toJSON(message.raceData22) - : undefined); - message.raceData23 !== undefined && - (obj.raceData23 = message.raceData23 - ? TournamentRaceData.toJSON(message.raceData23) - : undefined); - message.raceData24 !== undefined && - (obj.raceData24 = message.raceData24 - ? TournamentRaceData.toJSON(message.raceData24) - : undefined); - message.raceData25 !== undefined && - (obj.raceData25 = message.raceData25 - ? TournamentRaceData.toJSON(message.raceData25) - : undefined); - message.raceData26 !== undefined && - (obj.raceData26 = message.raceData26 - ? TournamentRaceData.toJSON(message.raceData26) - : undefined); - message.raceData27 !== undefined && - (obj.raceData27 = message.raceData27 - ? TournamentRaceData.toJSON(message.raceData27) - : undefined); - message.raceData28 !== undefined && - (obj.raceData28 = message.raceData28 - ? TournamentRaceData.toJSON(message.raceData28) - : undefined); - message.raceData29 !== undefined && - (obj.raceData29 = message.raceData29 - ? TournamentRaceData.toJSON(message.raceData29) - : undefined); - message.raceData30 !== undefined && - (obj.raceData30 = message.raceData30 - ? TournamentRaceData.toJSON(message.raceData30) - : undefined); - message.raceData31 !== undefined && - (obj.raceData31 = message.raceData31 - ? TournamentRaceData.toJSON(message.raceData31) - : undefined); - message.raceData32 !== undefined && - (obj.raceData32 = message.raceData32 - ? TournamentRaceData.toJSON(message.raceData32) - : undefined); - message.raceData33 !== undefined && - (obj.raceData33 = message.raceData33 - ? TournamentRaceData.toJSON(message.raceData33) - : undefined); - message.raceData34 !== undefined && - (obj.raceData34 = message.raceData34 - ? TournamentRaceData.toJSON(message.raceData34) - : undefined); - return obj; - }, - - fromPartial, I>>( - object: I - ): TournamentRaceDataList { - const message = createBaseTournamentRaceDataList(); - message.raceData00 = - object.raceData00 !== undefined && object.raceData00 !== null - ? TournamentRaceData.fromPartial(object.raceData00) - : undefined; - message.raceData01 = - object.raceData01 !== undefined && object.raceData01 !== null - ? TournamentRaceData.fromPartial(object.raceData01) - : undefined; - message.raceData02 = - object.raceData02 !== undefined && object.raceData02 !== null - ? TournamentRaceData.fromPartial(object.raceData02) - : undefined; - message.raceData03 = - object.raceData03 !== undefined && object.raceData03 !== null - ? TournamentRaceData.fromPartial(object.raceData03) - : undefined; - message.raceData04 = - object.raceData04 !== undefined && object.raceData04 !== null - ? TournamentRaceData.fromPartial(object.raceData04) - : undefined; - message.raceData05 = - object.raceData05 !== undefined && object.raceData05 !== null - ? TournamentRaceData.fromPartial(object.raceData05) - : undefined; - message.raceData06 = - object.raceData06 !== undefined && object.raceData06 !== null - ? TournamentRaceData.fromPartial(object.raceData06) - : undefined; - message.raceData07 = - object.raceData07 !== undefined && object.raceData07 !== null - ? TournamentRaceData.fromPartial(object.raceData07) - : undefined; - message.raceData08 = - object.raceData08 !== undefined && object.raceData08 !== null - ? TournamentRaceData.fromPartial(object.raceData08) - : undefined; - message.raceData09 = - object.raceData09 !== undefined && object.raceData09 !== null - ? TournamentRaceData.fromPartial(object.raceData09) - : undefined; - message.raceData10 = - object.raceData10 !== undefined && object.raceData10 !== null - ? TournamentRaceData.fromPartial(object.raceData10) - : undefined; - message.raceData11 = - object.raceData11 !== undefined && object.raceData11 !== null - ? TournamentRaceData.fromPartial(object.raceData11) - : undefined; - message.raceData12 = - object.raceData12 !== undefined && object.raceData12 !== null - ? TournamentRaceData.fromPartial(object.raceData12) - : undefined; - message.raceData13 = - object.raceData13 !== undefined && object.raceData13 !== null - ? TournamentRaceData.fromPartial(object.raceData13) - : undefined; - message.raceData14 = - object.raceData14 !== undefined && object.raceData14 !== null - ? TournamentRaceData.fromPartial(object.raceData14) - : undefined; - message.raceData15 = - object.raceData15 !== undefined && object.raceData15 !== null - ? TournamentRaceData.fromPartial(object.raceData15) - : undefined; - message.raceData16 = - object.raceData16 !== undefined && object.raceData16 !== null - ? TournamentRaceData.fromPartial(object.raceData16) - : undefined; - message.raceData17 = - object.raceData17 !== undefined && object.raceData17 !== null - ? TournamentRaceData.fromPartial(object.raceData17) - : undefined; - message.raceData18 = - object.raceData18 !== undefined && object.raceData18 !== null - ? TournamentRaceData.fromPartial(object.raceData18) - : undefined; - message.raceData19 = - object.raceData19 !== undefined && object.raceData19 !== null - ? TournamentRaceData.fromPartial(object.raceData19) - : undefined; - message.raceData20 = - object.raceData20 !== undefined && object.raceData20 !== null - ? TournamentRaceData.fromPartial(object.raceData20) - : undefined; - message.raceData21 = - object.raceData21 !== undefined && object.raceData21 !== null - ? TournamentRaceData.fromPartial(object.raceData21) - : undefined; - message.raceData22 = - object.raceData22 !== undefined && object.raceData22 !== null - ? TournamentRaceData.fromPartial(object.raceData22) - : undefined; - message.raceData23 = - object.raceData23 !== undefined && object.raceData23 !== null - ? TournamentRaceData.fromPartial(object.raceData23) - : undefined; - message.raceData24 = - object.raceData24 !== undefined && object.raceData24 !== null - ? TournamentRaceData.fromPartial(object.raceData24) - : undefined; - message.raceData25 = - object.raceData25 !== undefined && object.raceData25 !== null - ? TournamentRaceData.fromPartial(object.raceData25) - : undefined; - message.raceData26 = - object.raceData26 !== undefined && object.raceData26 !== null - ? TournamentRaceData.fromPartial(object.raceData26) - : undefined; - message.raceData27 = - object.raceData27 !== undefined && object.raceData27 !== null - ? TournamentRaceData.fromPartial(object.raceData27) - : undefined; - message.raceData28 = - object.raceData28 !== undefined && object.raceData28 !== null - ? TournamentRaceData.fromPartial(object.raceData28) - : undefined; - message.raceData29 = - object.raceData29 !== undefined && object.raceData29 !== null - ? TournamentRaceData.fromPartial(object.raceData29) - : undefined; - message.raceData30 = - object.raceData30 !== undefined && object.raceData30 !== null - ? TournamentRaceData.fromPartial(object.raceData30) - : undefined; - message.raceData31 = - object.raceData31 !== undefined && object.raceData31 !== null - ? TournamentRaceData.fromPartial(object.raceData31) - : undefined; - message.raceData32 = - object.raceData32 !== undefined && object.raceData32 !== null - ? TournamentRaceData.fromPartial(object.raceData32) - : undefined; - message.raceData33 = - object.raceData33 !== undefined && object.raceData33 !== null - ? TournamentRaceData.fromPartial(object.raceData33) - : undefined; - message.raceData34 = - object.raceData34 !== undefined && object.raceData34 !== null - ? TournamentRaceData.fromPartial(object.raceData34) - : undefined; - return message; - }, -}; - -function createBaseTournamentResult(): TournamentResult { - return { car: undefined, rank: 0, entryNumber: 0 }; -} - -export const TournamentResult = { - encode( - message: TournamentResult, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(10).fork()).ldelim(); - } - if (message.rank !== 0) { - writer.uint32(16).sint32(message.rank); - } - if (message.entryNumber !== 0) { - writer.uint32(24).sint32(message.entryNumber); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TournamentResult { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTournamentResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.car = Car.decode(reader, reader.uint32()); - break; - case 2: - message.rank = reader.sint32(); - break; - case 3: - message.entryNumber = reader.sint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TournamentResult { - return { - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - rank: isSet(object.rank) ? Number(object.rank) : 0, - entryNumber: isSet(object.entryNumber) ? Number(object.entryNumber) : 0, - }; - }, - - toJSON(message: TournamentResult): unknown { - const obj: any = {}; - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - message.rank !== undefined && (obj.rank = Math.round(message.rank)); - message.entryNumber !== undefined && - (obj.entryNumber = Math.round(message.entryNumber)); - return obj; - }, - - fromPartial, I>>( - object: I - ): TournamentResult { - const message = createBaseTournamentResult(); - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - message.rank = object.rank ?? 0; - message.entryNumber = object.entryNumber ?? 0; - return message; - }, -}; - -function createBaseTournamentResultList(): TournamentResultList { - return { - result00: undefined, - result01: undefined, - result02: undefined, - result03: undefined, - }; -} - -export const TournamentResultList = { - encode( - message: TournamentResultList, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.result00 !== undefined) { - TournamentResult.encode( - message.result00, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.result01 !== undefined) { - TournamentResult.encode( - message.result01, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.result02 !== undefined) { - TournamentResult.encode( - message.result02, - writer.uint32(26).fork() - ).ldelim(); - } - if (message.result03 !== undefined) { - TournamentResult.encode( - message.result03, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): TournamentResultList { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTournamentResultList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result00 = TournamentResult.decode(reader, reader.uint32()); - break; - case 2: - message.result01 = TournamentResult.decode(reader, reader.uint32()); - break; - case 3: - message.result02 = TournamentResult.decode(reader, reader.uint32()); - break; - case 4: - message.result03 = TournamentResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TournamentResultList { - return { - result00: isSet(object.result00) - ? TournamentResult.fromJSON(object.result00) - : undefined, - result01: isSet(object.result01) - ? TournamentResult.fromJSON(object.result01) - : undefined, - result02: isSet(object.result02) - ? TournamentResult.fromJSON(object.result02) - : undefined, - result03: isSet(object.result03) - ? TournamentResult.fromJSON(object.result03) - : undefined, - }; - }, - - toJSON(message: TournamentResultList): unknown { - const obj: any = {}; - message.result00 !== undefined && - (obj.result00 = message.result00 - ? TournamentResult.toJSON(message.result00) - : undefined); - message.result01 !== undefined && - (obj.result01 = message.result01 - ? TournamentResult.toJSON(message.result01) - : undefined); - message.result02 !== undefined && - (obj.result02 = message.result02 - ? TournamentResult.toJSON(message.result02) - : undefined); - message.result03 !== undefined && - (obj.result03 = message.result03 - ? TournamentResult.toJSON(message.result03) - : undefined); - return obj; - }, - - fromPartial, I>>( - object: I - ): TournamentResultList { - const message = createBaseTournamentResultList(); - message.result00 = - object.result00 !== undefined && object.result00 !== null - ? TournamentResult.fromPartial(object.result00) - : undefined; - message.result01 = - object.result01 !== undefined && object.result01 !== null - ? TournamentResult.fromPartial(object.result01) - : undefined; - message.result02 = - object.result02 !== undefined && object.result02 !== null - ? TournamentResult.fromPartial(object.result02) - : undefined; - message.result03 = - object.result03 !== undefined && object.result03 !== null - ? TournamentResult.fromPartial(object.result03) - : undefined; - return message; - }, -}; - -function createBaseTournament(): Tournament { - return { - isEnableTournament: false, - isClearTournament: false, - isEntryPlayerOnly: false, - carList: undefined, - raceDataList: undefined, - isTournamentOn: false, - holdYear: 0, - holdMonth: 0, - holdDay: 0, - entryHour: 0, - entryMinute: 0, - tournamentStartHour: 0, - tournamentStartMinute: 0, - competitionNum: 0, - participantNum: 0, - surviverNumOfFirstRace: 0, - nowRound: 0, - playingGameNumber: 0, - isConfirmTournamentResult: false, - isTournamentEntry: false, - resultList: undefined, - hasCommendationStarted: false, - isCommendationRankAppeared: false, - isCommendationEnded: false, - isNextRank: false, - commendationPage: 0, - showCommendationAgain: false, - }; -} - -export const Tournament = { - encode( - message: Tournament, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.isEnableTournament === true) { - writer.uint32(8).bool(message.isEnableTournament); - } - if (message.isClearTournament === true) { - writer.uint32(16).bool(message.isClearTournament); - } - if (message.isEntryPlayerOnly === true) { - writer.uint32(24).bool(message.isEntryPlayerOnly); - } - if (message.carList !== undefined) { - TournamentCarList.encode( - message.carList, - writer.uint32(34).fork() - ).ldelim(); - } - if (message.raceDataList !== undefined) { - TournamentRaceDataList.encode( - message.raceDataList, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.isTournamentOn === true) { - writer.uint32(48).bool(message.isTournamentOn); - } - if (message.holdYear !== 0) { - writer.uint32(56).uint32(message.holdYear); - } - if (message.holdMonth !== 0) { - writer.uint32(64).uint32(message.holdMonth); - } - if (message.holdDay !== 0) { - writer.uint32(72).uint32(message.holdDay); - } - if (message.entryHour !== 0) { - writer.uint32(80).uint32(message.entryHour); - } - if (message.entryMinute !== 0) { - writer.uint32(88).uint32(message.entryMinute); - } - if (message.tournamentStartHour !== 0) { - writer.uint32(96).uint32(message.tournamentStartHour); - } - if (message.tournamentStartMinute !== 0) { - writer.uint32(104).uint32(message.tournamentStartMinute); - } - if (message.competitionNum !== 0) { - writer.uint32(112).uint32(message.competitionNum); - } - if (message.participantNum !== 0) { - writer.uint32(120).uint32(message.participantNum); - } - if (message.surviverNumOfFirstRace !== 0) { - writer.uint32(128).uint32(message.surviverNumOfFirstRace); - } - if (message.nowRound !== 0) { - writer.uint32(136).uint32(message.nowRound); - } - if (message.playingGameNumber !== 0) { - writer.uint32(144).sint32(message.playingGameNumber); - } - if (message.isConfirmTournamentResult === true) { - writer.uint32(152).bool(message.isConfirmTournamentResult); - } - if (message.isTournamentEntry === true) { - writer.uint32(160).bool(message.isTournamentEntry); - } - if (message.resultList !== undefined) { - TournamentResultList.encode( - message.resultList, - writer.uint32(170).fork() - ).ldelim(); - } - if (message.hasCommendationStarted === true) { - writer.uint32(176).bool(message.hasCommendationStarted); - } - if (message.isCommendationRankAppeared === true) { - writer.uint32(184).bool(message.isCommendationRankAppeared); - } - if (message.isCommendationEnded === true) { - writer.uint32(192).bool(message.isCommendationEnded); - } - if (message.isNextRank === true) { - writer.uint32(200).bool(message.isNextRank); - } - if (message.commendationPage !== 0) { - writer.uint32(208).uint32(message.commendationPage); - } - if (message.showCommendationAgain === true) { - writer.uint32(216).bool(message.showCommendationAgain); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Tournament { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTournament(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.isEnableTournament = reader.bool(); - break; - case 2: - message.isClearTournament = reader.bool(); - break; - case 3: - message.isEntryPlayerOnly = reader.bool(); - break; - case 4: - message.carList = TournamentCarList.decode(reader, reader.uint32()); - break; - case 5: - message.raceDataList = TournamentRaceDataList.decode( - reader, - reader.uint32() - ); - break; - case 6: - message.isTournamentOn = reader.bool(); - break; - case 7: - message.holdYear = reader.uint32(); - break; - case 8: - message.holdMonth = reader.uint32(); - break; - case 9: - message.holdDay = reader.uint32(); - break; - case 10: - message.entryHour = reader.uint32(); - break; - case 11: - message.entryMinute = reader.uint32(); - break; - case 12: - message.tournamentStartHour = reader.uint32(); - break; - case 13: - message.tournamentStartMinute = reader.uint32(); - break; - case 14: - message.competitionNum = reader.uint32(); - break; - case 15: - message.participantNum = reader.uint32(); - break; - case 16: - message.surviverNumOfFirstRace = reader.uint32(); - break; - case 17: - message.nowRound = reader.uint32(); - break; - case 18: - message.playingGameNumber = reader.sint32(); - break; - case 19: - message.isConfirmTournamentResult = reader.bool(); - break; - case 20: - message.isTournamentEntry = reader.bool(); - break; - case 21: - message.resultList = TournamentResultList.decode( - reader, - reader.uint32() - ); - break; - case 22: - message.hasCommendationStarted = reader.bool(); - break; - case 23: - message.isCommendationRankAppeared = reader.bool(); - break; - case 24: - message.isCommendationEnded = reader.bool(); - break; - case 25: - message.isNextRank = reader.bool(); - break; - case 26: - message.commendationPage = reader.uint32(); - break; - case 27: - message.showCommendationAgain = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Tournament { - return { - isEnableTournament: isSet(object.isEnableTournament) - ? Boolean(object.isEnableTournament) - : false, - isClearTournament: isSet(object.isClearTournament) - ? Boolean(object.isClearTournament) - : false, - isEntryPlayerOnly: isSet(object.isEntryPlayerOnly) - ? Boolean(object.isEntryPlayerOnly) - : false, - carList: isSet(object.carList) - ? TournamentCarList.fromJSON(object.carList) - : undefined, - raceDataList: isSet(object.raceDataList) - ? TournamentRaceDataList.fromJSON(object.raceDataList) - : undefined, - isTournamentOn: isSet(object.isTournamentOn) - ? Boolean(object.isTournamentOn) - : false, - holdYear: isSet(object.holdYear) ? Number(object.holdYear) : 0, - holdMonth: isSet(object.holdMonth) ? Number(object.holdMonth) : 0, - holdDay: isSet(object.holdDay) ? Number(object.holdDay) : 0, - entryHour: isSet(object.entryHour) ? Number(object.entryHour) : 0, - entryMinute: isSet(object.entryMinute) ? Number(object.entryMinute) : 0, - tournamentStartHour: isSet(object.tournamentStartHour) - ? Number(object.tournamentStartHour) - : 0, - tournamentStartMinute: isSet(object.tournamentStartMinute) - ? Number(object.tournamentStartMinute) - : 0, - competitionNum: isSet(object.competitionNum) - ? Number(object.competitionNum) - : 0, - participantNum: isSet(object.participantNum) - ? Number(object.participantNum) - : 0, - surviverNumOfFirstRace: isSet(object.surviverNumOfFirstRace) - ? Number(object.surviverNumOfFirstRace) - : 0, - nowRound: isSet(object.nowRound) ? Number(object.nowRound) : 0, - playingGameNumber: isSet(object.playingGameNumber) - ? Number(object.playingGameNumber) - : 0, - isConfirmTournamentResult: isSet(object.isConfirmTournamentResult) - ? Boolean(object.isConfirmTournamentResult) - : false, - isTournamentEntry: isSet(object.isTournamentEntry) - ? Boolean(object.isTournamentEntry) - : false, - resultList: isSet(object.resultList) - ? TournamentResultList.fromJSON(object.resultList) - : undefined, - hasCommendationStarted: isSet(object.hasCommendationStarted) - ? Boolean(object.hasCommendationStarted) - : false, - isCommendationRankAppeared: isSet(object.isCommendationRankAppeared) - ? Boolean(object.isCommendationRankAppeared) - : false, - isCommendationEnded: isSet(object.isCommendationEnded) - ? Boolean(object.isCommendationEnded) - : false, - isNextRank: isSet(object.isNextRank) ? Boolean(object.isNextRank) : false, - commendationPage: isSet(object.commendationPage) - ? Number(object.commendationPage) - : 0, - showCommendationAgain: isSet(object.showCommendationAgain) - ? Boolean(object.showCommendationAgain) - : false, - }; - }, - - toJSON(message: Tournament): unknown { - const obj: any = {}; - message.isEnableTournament !== undefined && - (obj.isEnableTournament = message.isEnableTournament); - message.isClearTournament !== undefined && - (obj.isClearTournament = message.isClearTournament); - message.isEntryPlayerOnly !== undefined && - (obj.isEntryPlayerOnly = message.isEntryPlayerOnly); - message.carList !== undefined && - (obj.carList = message.carList - ? TournamentCarList.toJSON(message.carList) - : undefined); - message.raceDataList !== undefined && - (obj.raceDataList = message.raceDataList - ? TournamentRaceDataList.toJSON(message.raceDataList) - : undefined); - message.isTournamentOn !== undefined && - (obj.isTournamentOn = message.isTournamentOn); - message.holdYear !== undefined && - (obj.holdYear = Math.round(message.holdYear)); - message.holdMonth !== undefined && - (obj.holdMonth = Math.round(message.holdMonth)); - message.holdDay !== undefined && - (obj.holdDay = Math.round(message.holdDay)); - message.entryHour !== undefined && - (obj.entryHour = Math.round(message.entryHour)); - message.entryMinute !== undefined && - (obj.entryMinute = Math.round(message.entryMinute)); - message.tournamentStartHour !== undefined && - (obj.tournamentStartHour = Math.round(message.tournamentStartHour)); - message.tournamentStartMinute !== undefined && - (obj.tournamentStartMinute = Math.round(message.tournamentStartMinute)); - message.competitionNum !== undefined && - (obj.competitionNum = Math.round(message.competitionNum)); - message.participantNum !== undefined && - (obj.participantNum = Math.round(message.participantNum)); - message.surviverNumOfFirstRace !== undefined && - (obj.surviverNumOfFirstRace = Math.round(message.surviverNumOfFirstRace)); - message.nowRound !== undefined && - (obj.nowRound = Math.round(message.nowRound)); - message.playingGameNumber !== undefined && - (obj.playingGameNumber = Math.round(message.playingGameNumber)); - message.isConfirmTournamentResult !== undefined && - (obj.isConfirmTournamentResult = message.isConfirmTournamentResult); - message.isTournamentEntry !== undefined && - (obj.isTournamentEntry = message.isTournamentEntry); - message.resultList !== undefined && - (obj.resultList = message.resultList - ? TournamentResultList.toJSON(message.resultList) - : undefined); - message.hasCommendationStarted !== undefined && - (obj.hasCommendationStarted = message.hasCommendationStarted); - message.isCommendationRankAppeared !== undefined && - (obj.isCommendationRankAppeared = message.isCommendationRankAppeared); - message.isCommendationEnded !== undefined && - (obj.isCommendationEnded = message.isCommendationEnded); - message.isNextRank !== undefined && (obj.isNextRank = message.isNextRank); - message.commendationPage !== undefined && - (obj.commendationPage = Math.round(message.commendationPage)); - message.showCommendationAgain !== undefined && - (obj.showCommendationAgain = message.showCommendationAgain); - return obj; - }, - - fromPartial, I>>( - object: I - ): Tournament { - const message = createBaseTournament(); - message.isEnableTournament = object.isEnableTournament ?? false; - message.isClearTournament = object.isClearTournament ?? false; - message.isEntryPlayerOnly = object.isEntryPlayerOnly ?? false; - message.carList = - object.carList !== undefined && object.carList !== null - ? TournamentCarList.fromPartial(object.carList) - : undefined; - message.raceDataList = - object.raceDataList !== undefined && object.raceDataList !== null - ? TournamentRaceDataList.fromPartial(object.raceDataList) - : undefined; - message.isTournamentOn = object.isTournamentOn ?? false; - message.holdYear = object.holdYear ?? 0; - message.holdMonth = object.holdMonth ?? 0; - message.holdDay = object.holdDay ?? 0; - message.entryHour = object.entryHour ?? 0; - message.entryMinute = object.entryMinute ?? 0; - message.tournamentStartHour = object.tournamentStartHour ?? 0; - message.tournamentStartMinute = object.tournamentStartMinute ?? 0; - message.competitionNum = object.competitionNum ?? 0; - message.participantNum = object.participantNum ?? 0; - message.surviverNumOfFirstRace = object.surviverNumOfFirstRace ?? 0; - message.nowRound = object.nowRound ?? 0; - message.playingGameNumber = object.playingGameNumber ?? 0; - message.isConfirmTournamentResult = - object.isConfirmTournamentResult ?? false; - message.isTournamentEntry = object.isTournamentEntry ?? false; - message.resultList = - object.resultList !== undefined && object.resultList !== null - ? TournamentResultList.fromPartial(object.resultList) - : undefined; - message.hasCommendationStarted = object.hasCommendationStarted ?? false; - message.isCommendationRankAppeared = - object.isCommendationRankAppeared ?? false; - message.isCommendationEnded = object.isCommendationEnded ?? false; - message.isNextRank = object.isNextRank ?? false; - message.commendationPage = object.commendationPage ?? 0; - message.showCommendationAgain = object.showCommendationAgain ?? false; - return message; - }, -}; - -function createBaseMessage(): Message { - return { - racePacket: new Uint8Array(), - raceCar: new Uint8Array(), - course: undefined, - vsOk: 0, - heartBeat: undefined, - batchSettingState: 0, - driveCabinetState: undefined, - batchSetting: undefined, - information: undefined, - featureVersion: undefined, - tournament: undefined, - }; -} - -export const Message = { - encode( - message: Message, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.racePacket.length !== 0) { - writer.uint32(10).bytes(message.racePacket); - } - if (message.raceCar.length !== 0) { - writer.uint32(18).bytes(message.raceCar); - } - if (message.course !== undefined) { - Course.encode(message.course, writer.uint32(26).fork()).ldelim(); - } - if (message.vsOk !== 0) { - writer.uint32(32).int32(message.vsOk); - } - if (message.heartBeat !== undefined) { - HeartBeat.encode(message.heartBeat, writer.uint32(42).fork()).ldelim(); - } - if (message.batchSettingState !== 0) { - writer.uint32(48).int32(message.batchSettingState); - } - if (message.driveCabinetState !== undefined) { - DriveCabinetState.encode( - message.driveCabinetState, - writer.uint32(58).fork() - ).ldelim(); - } - if (message.batchSetting !== undefined) { - BatchSetting.encode( - message.batchSetting, - writer.uint32(66).fork() - ).ldelim(); - } - if (message.information !== undefined) { - Information.encode( - message.information, - writer.uint32(74).fork() - ).ldelim(); - } - if (message.featureVersion !== undefined) { - GameFeatureVersion.encode( - message.featureVersion, - writer.uint32(82).fork() - ).ldelim(); - } - if (message.tournament !== undefined) { - Tournament.encode(message.tournament, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Message { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMessage(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.racePacket = reader.bytes(); - break; - case 2: - message.raceCar = reader.bytes(); - break; - case 3: - message.course = Course.decode(reader, reader.uint32()); - break; - case 4: - message.vsOk = reader.int32(); - break; - case 5: - message.heartBeat = HeartBeat.decode(reader, reader.uint32()); - break; - case 6: - message.batchSettingState = reader.int32(); - break; - case 7: - message.driveCabinetState = DriveCabinetState.decode( - reader, - reader.uint32() - ); - break; - case 8: - message.batchSetting = BatchSetting.decode(reader, reader.uint32()); - break; - case 9: - message.information = Information.decode(reader, reader.uint32()); - break; - case 10: - message.featureVersion = GameFeatureVersion.decode( - reader, - reader.uint32() - ); - break; - case 11: - message.tournament = Tournament.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Message { - return { - racePacket: isSet(object.racePacket) - ? bytesFromBase64(object.racePacket) - : new Uint8Array(), - raceCar: isSet(object.raceCar) - ? bytesFromBase64(object.raceCar) - : new Uint8Array(), - course: isSet(object.course) ? Course.fromJSON(object.course) : undefined, - vsOk: isSet(object.vsOk) ? Number(object.vsOk) : 0, - heartBeat: isSet(object.heartBeat) - ? HeartBeat.fromJSON(object.heartBeat) - : undefined, - batchSettingState: isSet(object.batchSettingState) - ? Number(object.batchSettingState) - : 0, - driveCabinetState: isSet(object.driveCabinetState) - ? DriveCabinetState.fromJSON(object.driveCabinetState) - : undefined, - batchSetting: isSet(object.batchSetting) - ? BatchSetting.fromJSON(object.batchSetting) - : undefined, - information: isSet(object.information) - ? Information.fromJSON(object.information) - : undefined, - featureVersion: isSet(object.featureVersion) - ? GameFeatureVersion.fromJSON(object.featureVersion) - : undefined, - tournament: isSet(object.tournament) - ? Tournament.fromJSON(object.tournament) - : undefined, - }; - }, - - toJSON(message: Message): unknown { - const obj: any = {}; - message.racePacket !== undefined && - (obj.racePacket = base64FromBytes( - message.racePacket !== undefined ? message.racePacket : new Uint8Array() - )); - message.raceCar !== undefined && - (obj.raceCar = base64FromBytes( - message.raceCar !== undefined ? message.raceCar : new Uint8Array() - )); - message.course !== undefined && - (obj.course = message.course ? Course.toJSON(message.course) : undefined); - message.vsOk !== undefined && (obj.vsOk = Math.round(message.vsOk)); - message.heartBeat !== undefined && - (obj.heartBeat = message.heartBeat - ? HeartBeat.toJSON(message.heartBeat) - : undefined); - message.batchSettingState !== undefined && - (obj.batchSettingState = Math.round(message.batchSettingState)); - message.driveCabinetState !== undefined && - (obj.driveCabinetState = message.driveCabinetState - ? DriveCabinetState.toJSON(message.driveCabinetState) - : undefined); - message.batchSetting !== undefined && - (obj.batchSetting = message.batchSetting - ? BatchSetting.toJSON(message.batchSetting) - : undefined); - message.information !== undefined && - (obj.information = message.information - ? Information.toJSON(message.information) - : undefined); - message.featureVersion !== undefined && - (obj.featureVersion = message.featureVersion - ? GameFeatureVersion.toJSON(message.featureVersion) - : undefined); - message.tournament !== undefined && - (obj.tournament = message.tournament - ? Tournament.toJSON(message.tournament) - : undefined); - return obj; - }, - - fromPartial, I>>(object: I): Message { - const message = createBaseMessage(); - message.racePacket = object.racePacket ?? new Uint8Array(); - message.raceCar = object.raceCar ?? new Uint8Array(); - message.course = - object.course !== undefined && object.course !== null - ? Course.fromPartial(object.course) - : undefined; - message.vsOk = object.vsOk ?? 0; - message.heartBeat = - object.heartBeat !== undefined && object.heartBeat !== null - ? HeartBeat.fromPartial(object.heartBeat) - : undefined; - message.batchSettingState = object.batchSettingState ?? 0; - message.driveCabinetState = - object.driveCabinetState !== undefined && - object.driveCabinetState !== null - ? DriveCabinetState.fromPartial(object.driveCabinetState) - : undefined; - message.batchSetting = - object.batchSetting !== undefined && object.batchSetting !== null - ? BatchSetting.fromPartial(object.batchSetting) - : undefined; - message.information = - object.information !== undefined && object.information !== null - ? Information.fromPartial(object.information) - : undefined; - message.featureVersion = - object.featureVersion !== undefined && object.featureVersion !== null - ? GameFeatureVersion.fromPartial(object.featureVersion) - : undefined; - message.tournament = - object.tournament !== undefined && object.tournament !== null - ? Tournament.fromPartial(object.tournament) - : undefined; - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return btoa(bin.join("")); -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude>, - never - >; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/proto/proto/game.ts b/src/proto/proto/game.ts deleted file mode 100644 index 7d42682..0000000 --- a/src/proto/proto/game.ts +++ /dev/null @@ -1,1133 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "game"; - -export enum gidArea { - GID_AREA_TOKYO = 0, - GID_AREA_HAKONE = 1, - GID_AREA_NAGOYA = 2, - GID_AREA_OSAKA = 3, - GID_AREA_FUKUOKA = 4, - GID_AREA_SUBTOKYO_3_4 = 5, - GID_AREA_SUBTOKYO_5 = 6, - GID_AREA_TURNPIKE = 7, - GID_AREA_KOBE = 8, - GID_AREA_HIROSHIMA = 9, - GID_AREA_STORY = 10, - UNRECOGNIZED = -1, -} - -export function gidAreaFromJSON(object: any): gidArea { - switch (object) { - case 0: - case "GID_AREA_TOKYO": - return gidArea.GID_AREA_TOKYO; - case 1: - case "GID_AREA_HAKONE": - return gidArea.GID_AREA_HAKONE; - case 2: - case "GID_AREA_NAGOYA": - return gidArea.GID_AREA_NAGOYA; - case 3: - case "GID_AREA_OSAKA": - return gidArea.GID_AREA_OSAKA; - case 4: - case "GID_AREA_FUKUOKA": - return gidArea.GID_AREA_FUKUOKA; - case 5: - case "GID_AREA_SUBTOKYO_3_4": - return gidArea.GID_AREA_SUBTOKYO_3_4; - case 6: - case "GID_AREA_SUBTOKYO_5": - return gidArea.GID_AREA_SUBTOKYO_5; - case 7: - case "GID_AREA_TURNPIKE": - return gidArea.GID_AREA_TURNPIKE; - case 8: - case "GID_AREA_KOBE": - return gidArea.GID_AREA_KOBE; - case 9: - case "GID_AREA_HIROSHIMA": - return gidArea.GID_AREA_HIROSHIMA; - case 10: - case "GID_AREA_STORY": - return gidArea.GID_AREA_STORY; - case -1: - case "UNRECOGNIZED": - default: - return gidArea.UNRECOGNIZED; - } -} - -export function gidAreaToJSON(object: gidArea): string { - switch (object) { - case gidArea.GID_AREA_TOKYO: - return "GID_AREA_TOKYO"; - case gidArea.GID_AREA_HAKONE: - return "GID_AREA_HAKONE"; - case gidArea.GID_AREA_NAGOYA: - return "GID_AREA_NAGOYA"; - case gidArea.GID_AREA_OSAKA: - return "GID_AREA_OSAKA"; - case gidArea.GID_AREA_FUKUOKA: - return "GID_AREA_FUKUOKA"; - case gidArea.GID_AREA_SUBTOKYO_3_4: - return "GID_AREA_SUBTOKYO_3_4"; - case gidArea.GID_AREA_SUBTOKYO_5: - return "GID_AREA_SUBTOKYO_5"; - case gidArea.GID_AREA_TURNPIKE: - return "GID_AREA_TURNPIKE"; - case gidArea.GID_AREA_KOBE: - return "GID_AREA_KOBE"; - case gidArea.GID_AREA_HIROSHIMA: - return "GID_AREA_HIROSHIMA"; - case gidArea.GID_AREA_STORY: - return "GID_AREA_STORY"; - case gidArea.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum gidTacourse { - GID_TACOURSE_C1IN = 0, - GID_TACOURSE_C1OUT = 1, - GID_TACOURSE_RINGLEFT = 2, - GID_TACOURSE_RINGRIGHT = 3, - GID_TACOURSE_SUBTOKYO_3_4 = 4, - GID_TACOURSE_SUBTOKYO_5 = 5, - GID_TACOURSE_WANGANEAST = 6, - GID_TACOURSE_WANGANWEST = 7, - GID_TACOURSE_K1_DOWN = 8, - GID_TACOURSE_K1_UP = 9, - GID_TACOURSE_YAESUIN = 10, - GID_TACOURSE_YAESUOUT = 11, - GID_TACOURSE_YOKOHAMAIN = 12, - GID_TACOURSE_YOKOHAMAOUT = 13, - GID_TACOURSE_NAGOYA = 14, - GID_TACOURSE_OSAKA = 15, - GID_TACOURSE_KOBE = 16, - GID_TACOURSE_FUKUOKA = 17, - GID_TACOURSE_HAKONEFOR = 18, - GID_TACOURSE_HAKONEBACK = 19, - GID_TACOURSE_TURNPIKE_UP = 20, - GID_TACOURSE_TURNPIKE_DOWN = 21, - GID_TACOURSE_TOKYOALL = 22, - GID_TACOURSE_KANAGAWAALL = 23, - GID_TACOURSE_HIROSHIMA = 24, - UNRECOGNIZED = -1, -} - -export function gidTacourseFromJSON(object: any): gidTacourse { - switch (object) { - case 0: - case "GID_TACOURSE_C1IN": - return gidTacourse.GID_TACOURSE_C1IN; - case 1: - case "GID_TACOURSE_C1OUT": - return gidTacourse.GID_TACOURSE_C1OUT; - case 2: - case "GID_TACOURSE_RINGLEFT": - return gidTacourse.GID_TACOURSE_RINGLEFT; - case 3: - case "GID_TACOURSE_RINGRIGHT": - return gidTacourse.GID_TACOURSE_RINGRIGHT; - case 4: - case "GID_TACOURSE_SUBTOKYO_3_4": - return gidTacourse.GID_TACOURSE_SUBTOKYO_3_4; - case 5: - case "GID_TACOURSE_SUBTOKYO_5": - return gidTacourse.GID_TACOURSE_SUBTOKYO_5; - case 6: - case "GID_TACOURSE_WANGANEAST": - return gidTacourse.GID_TACOURSE_WANGANEAST; - case 7: - case "GID_TACOURSE_WANGANWEST": - return gidTacourse.GID_TACOURSE_WANGANWEST; - case 8: - case "GID_TACOURSE_K1_DOWN": - return gidTacourse.GID_TACOURSE_K1_DOWN; - case 9: - case "GID_TACOURSE_K1_UP": - return gidTacourse.GID_TACOURSE_K1_UP; - case 10: - case "GID_TACOURSE_YAESUIN": - return gidTacourse.GID_TACOURSE_YAESUIN; - case 11: - case "GID_TACOURSE_YAESUOUT": - return gidTacourse.GID_TACOURSE_YAESUOUT; - case 12: - case "GID_TACOURSE_YOKOHAMAIN": - return gidTacourse.GID_TACOURSE_YOKOHAMAIN; - case 13: - case "GID_TACOURSE_YOKOHAMAOUT": - return gidTacourse.GID_TACOURSE_YOKOHAMAOUT; - case 14: - case "GID_TACOURSE_NAGOYA": - return gidTacourse.GID_TACOURSE_NAGOYA; - case 15: - case "GID_TACOURSE_OSAKA": - return gidTacourse.GID_TACOURSE_OSAKA; - case 16: - case "GID_TACOURSE_KOBE": - return gidTacourse.GID_TACOURSE_KOBE; - case 17: - case "GID_TACOURSE_FUKUOKA": - return gidTacourse.GID_TACOURSE_FUKUOKA; - case 18: - case "GID_TACOURSE_HAKONEFOR": - return gidTacourse.GID_TACOURSE_HAKONEFOR; - case 19: - case "GID_TACOURSE_HAKONEBACK": - return gidTacourse.GID_TACOURSE_HAKONEBACK; - case 20: - case "GID_TACOURSE_TURNPIKE_UP": - return gidTacourse.GID_TACOURSE_TURNPIKE_UP; - case 21: - case "GID_TACOURSE_TURNPIKE_DOWN": - return gidTacourse.GID_TACOURSE_TURNPIKE_DOWN; - case 22: - case "GID_TACOURSE_TOKYOALL": - return gidTacourse.GID_TACOURSE_TOKYOALL; - case 23: - case "GID_TACOURSE_KANAGAWAALL": - return gidTacourse.GID_TACOURSE_KANAGAWAALL; - case 24: - case "GID_TACOURSE_HIROSHIMA": - return gidTacourse.GID_TACOURSE_HIROSHIMA; - case -1: - case "UNRECOGNIZED": - default: - return gidTacourse.UNRECOGNIZED; - } -} - -export function gidTacourseToJSON(object: gidTacourse): string { - switch (object) { - case gidTacourse.GID_TACOURSE_C1IN: - return "GID_TACOURSE_C1IN"; - case gidTacourse.GID_TACOURSE_C1OUT: - return "GID_TACOURSE_C1OUT"; - case gidTacourse.GID_TACOURSE_RINGLEFT: - return "GID_TACOURSE_RINGLEFT"; - case gidTacourse.GID_TACOURSE_RINGRIGHT: - return "GID_TACOURSE_RINGRIGHT"; - case gidTacourse.GID_TACOURSE_SUBTOKYO_3_4: - return "GID_TACOURSE_SUBTOKYO_3_4"; - case gidTacourse.GID_TACOURSE_SUBTOKYO_5: - return "GID_TACOURSE_SUBTOKYO_5"; - case gidTacourse.GID_TACOURSE_WANGANEAST: - return "GID_TACOURSE_WANGANEAST"; - case gidTacourse.GID_TACOURSE_WANGANWEST: - return "GID_TACOURSE_WANGANWEST"; - case gidTacourse.GID_TACOURSE_K1_DOWN: - return "GID_TACOURSE_K1_DOWN"; - case gidTacourse.GID_TACOURSE_K1_UP: - return "GID_TACOURSE_K1_UP"; - case gidTacourse.GID_TACOURSE_YAESUIN: - return "GID_TACOURSE_YAESUIN"; - case gidTacourse.GID_TACOURSE_YAESUOUT: - return "GID_TACOURSE_YAESUOUT"; - case gidTacourse.GID_TACOURSE_YOKOHAMAIN: - return "GID_TACOURSE_YOKOHAMAIN"; - case gidTacourse.GID_TACOURSE_YOKOHAMAOUT: - return "GID_TACOURSE_YOKOHAMAOUT"; - case gidTacourse.GID_TACOURSE_NAGOYA: - return "GID_TACOURSE_NAGOYA"; - case gidTacourse.GID_TACOURSE_OSAKA: - return "GID_TACOURSE_OSAKA"; - case gidTacourse.GID_TACOURSE_KOBE: - return "GID_TACOURSE_KOBE"; - case gidTacourse.GID_TACOURSE_FUKUOKA: - return "GID_TACOURSE_FUKUOKA"; - case gidTacourse.GID_TACOURSE_HAKONEFOR: - return "GID_TACOURSE_HAKONEFOR"; - case gidTacourse.GID_TACOURSE_HAKONEBACK: - return "GID_TACOURSE_HAKONEBACK"; - case gidTacourse.GID_TACOURSE_TURNPIKE_UP: - return "GID_TACOURSE_TURNPIKE_UP"; - case gidTacourse.GID_TACOURSE_TURNPIKE_DOWN: - return "GID_TACOURSE_TURNPIKE_DOWN"; - case gidTacourse.GID_TACOURSE_TOKYOALL: - return "GID_TACOURSE_TOKYOALL"; - case gidTacourse.GID_TACOURSE_KANAGAWAALL: - return "GID_TACOURSE_KANAGAWAALL"; - case gidTacourse.GID_TACOURSE_HIROSHIMA: - return "GID_TACOURSE_HIROSHIMA"; - case gidTacourse.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum gidRunarea { - GID_RUNAREA_C1 = 0, - GID_RUNAREA_RING = 1, - GID_RUNAREA_SUBTOKYO_3_4 = 2, - GID_RUNAREA_SUBTOKYO_5 = 3, - GID_RUNAREA_WANGAN = 4, - GID_RUNAREA_K1 = 5, - GID_RUNAREA_YAESU = 6, - GID_RUNAREA_YOKOHAMA = 7, - GID_RUNAREA_NAGOYA = 8, - GID_RUNAREA_OSAKA = 9, - GID_RUNAREA_KOBE = 10, - GID_RUNAREA_FUKUOKA = 11, - GID_RUNAREA_HAKONE = 12, - GID_RUNAREA_TURNPIKE = 13, - GID_RUNAREA_DUMMY1 = 14, - GID_RUNAREA_DUMMY2 = 15, - GID_RUNAREA_DUMMY3 = 16, - GID_RUNAREA_C1_CLOSED = 17, - GID_RUNAREA_HIROSHIMA = 18, - UNRECOGNIZED = -1, -} - -export function gidRunareaFromJSON(object: any): gidRunarea { - switch (object) { - case 0: - case "GID_RUNAREA_C1": - return gidRunarea.GID_RUNAREA_C1; - case 1: - case "GID_RUNAREA_RING": - return gidRunarea.GID_RUNAREA_RING; - case 2: - case "GID_RUNAREA_SUBTOKYO_3_4": - return gidRunarea.GID_RUNAREA_SUBTOKYO_3_4; - case 3: - case "GID_RUNAREA_SUBTOKYO_5": - return gidRunarea.GID_RUNAREA_SUBTOKYO_5; - case 4: - case "GID_RUNAREA_WANGAN": - return gidRunarea.GID_RUNAREA_WANGAN; - case 5: - case "GID_RUNAREA_K1": - return gidRunarea.GID_RUNAREA_K1; - case 6: - case "GID_RUNAREA_YAESU": - return gidRunarea.GID_RUNAREA_YAESU; - case 7: - case "GID_RUNAREA_YOKOHAMA": - return gidRunarea.GID_RUNAREA_YOKOHAMA; - case 8: - case "GID_RUNAREA_NAGOYA": - return gidRunarea.GID_RUNAREA_NAGOYA; - case 9: - case "GID_RUNAREA_OSAKA": - return gidRunarea.GID_RUNAREA_OSAKA; - case 10: - case "GID_RUNAREA_KOBE": - return gidRunarea.GID_RUNAREA_KOBE; - case 11: - case "GID_RUNAREA_FUKUOKA": - return gidRunarea.GID_RUNAREA_FUKUOKA; - case 12: - case "GID_RUNAREA_HAKONE": - return gidRunarea.GID_RUNAREA_HAKONE; - case 13: - case "GID_RUNAREA_TURNPIKE": - return gidRunarea.GID_RUNAREA_TURNPIKE; - case 14: - case "GID_RUNAREA_DUMMY1": - return gidRunarea.GID_RUNAREA_DUMMY1; - case 15: - case "GID_RUNAREA_DUMMY2": - return gidRunarea.GID_RUNAREA_DUMMY2; - case 16: - case "GID_RUNAREA_DUMMY3": - return gidRunarea.GID_RUNAREA_DUMMY3; - case 17: - case "GID_RUNAREA_C1_CLOSED": - return gidRunarea.GID_RUNAREA_C1_CLOSED; - case 18: - case "GID_RUNAREA_HIROSHIMA": - return gidRunarea.GID_RUNAREA_HIROSHIMA; - case -1: - case "UNRECOGNIZED": - default: - return gidRunarea.UNRECOGNIZED; - } -} - -export function gidRunareaToJSON(object: gidRunarea): string { - switch (object) { - case gidRunarea.GID_RUNAREA_C1: - return "GID_RUNAREA_C1"; - case gidRunarea.GID_RUNAREA_RING: - return "GID_RUNAREA_RING"; - case gidRunarea.GID_RUNAREA_SUBTOKYO_3_4: - return "GID_RUNAREA_SUBTOKYO_3_4"; - case gidRunarea.GID_RUNAREA_SUBTOKYO_5: - return "GID_RUNAREA_SUBTOKYO_5"; - case gidRunarea.GID_RUNAREA_WANGAN: - return "GID_RUNAREA_WANGAN"; - case gidRunarea.GID_RUNAREA_K1: - return "GID_RUNAREA_K1"; - case gidRunarea.GID_RUNAREA_YAESU: - return "GID_RUNAREA_YAESU"; - case gidRunarea.GID_RUNAREA_YOKOHAMA: - return "GID_RUNAREA_YOKOHAMA"; - case gidRunarea.GID_RUNAREA_NAGOYA: - return "GID_RUNAREA_NAGOYA"; - case gidRunarea.GID_RUNAREA_OSAKA: - return "GID_RUNAREA_OSAKA"; - case gidRunarea.GID_RUNAREA_KOBE: - return "GID_RUNAREA_KOBE"; - case gidRunarea.GID_RUNAREA_FUKUOKA: - return "GID_RUNAREA_FUKUOKA"; - case gidRunarea.GID_RUNAREA_HAKONE: - return "GID_RUNAREA_HAKONE"; - case gidRunarea.GID_RUNAREA_TURNPIKE: - return "GID_RUNAREA_TURNPIKE"; - case gidRunarea.GID_RUNAREA_DUMMY1: - return "GID_RUNAREA_DUMMY1"; - case gidRunarea.GID_RUNAREA_DUMMY2: - return "GID_RUNAREA_DUMMY2"; - case gidRunarea.GID_RUNAREA_DUMMY3: - return "GID_RUNAREA_DUMMY3"; - case gidRunarea.GID_RUNAREA_C1_CLOSED: - return "GID_RUNAREA_C1_CLOSED"; - case gidRunarea.GID_RUNAREA_HIROSHIMA: - return "GID_RUNAREA_HIROSHIMA"; - case gidRunarea.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum gidRamp { - GID_RAMP_C1_IN_KANDABASHI = 0, - GID_RAMP_C1_IN_SHIODOME = 1, - GID_RAMP_C1_OUT_KANDABASHI = 2, - GID_RAMP_C1_OUT_SHIBA = 3, - GID_RAMP_RING_LEFT_ARIAKE = 4, - GID_RAMP_RING_RIGHT_KIBA = 5, - GID_RAMP_SUBTOKYO_SHIBUYA = 6, - GID_RAMP_SUBTOKYO_GAIEN = 7, - GID_RAMP_SUBTOKYO_DAIKANCHOU = 8, - GID_RAMP_SUBTOKYO_SHINJUKU = 9, - GID_RAMP_WANGAN_EAST_AIRPORT = 10, - GID_RAMP_WANGAN_EAST_DAIKOKU = 11, - GID_RAMP_WANGAN_WEST_RINKAI = 12, - GID_RAMP_WANGAN_WEST_AIRPORT = 13, - GID_RAMP_K1_DOWN_SHIBAURA = 14, - GID_RAMP_K1_DOWN_HANEDA = 15, - GID_RAMP_K1_UP_HANEDA = 16, - GID_RAMP_K1_UP_SHIOIRI = 17, - GID_RAMP_YAESU_SHIODOME = 18, - GID_RAMP_YAESU_KYOBASHI = 19, - GID_RAMP_YAESU_KANDABASHI = 20, - GID_RAMP_MINATOMIRAI_IN_HIGASHIKANAGAWA = 21, - GID_RAMP_MINATOMIRAI_IN_MINATOMIRAI = 22, - GID_RAMP_MINATOMIRAI_OUT_SHINYAMASHITA = 23, - GID_RAMP_MINATOMIRAI_OUT_MINATOMIRAI = 24, - GID_RAMP_NAGOYA_MARUNOUCHI = 25, - GID_RAMP_OOSAKA_DOUTONBORI = 26, - GID_RAMP_KOBE_SHINKOUCHOU = 27, - GID_RAMP_KOBE_NADAOOHASHI = 28, - GID_RAMP_FUKUOKA_WEST_MEIHAMA = 29, - GID_RAMP_FUKUOKA_WEST_HAKATA = 30, - GID_RAMP_FUKUOKA_EAST_NISHI = 31, - GID_RAMP_FUKUOKA_EAST_HANDOUBASHI = 32, - GID_RAMP_HAKONE_FOR = 33, - GID_RAMP_HAKONE_BACK = 34, - GID_RAMP_TURNPIKE_UP = 35, - GID_RAMP_TURNPIKE_DOWN = 36, - GID_RAMP_HIROSHIMA_SHINONOME = 37, - GID_RAMP_HIROSHIMA_UJINA = 38, - UNRECOGNIZED = -1, -} - -export function gidRampFromJSON(object: any): gidRamp { - switch (object) { - case 0: - case "GID_RAMP_C1_IN_KANDABASHI": - return gidRamp.GID_RAMP_C1_IN_KANDABASHI; - case 1: - case "GID_RAMP_C1_IN_SHIODOME": - return gidRamp.GID_RAMP_C1_IN_SHIODOME; - case 2: - case "GID_RAMP_C1_OUT_KANDABASHI": - return gidRamp.GID_RAMP_C1_OUT_KANDABASHI; - case 3: - case "GID_RAMP_C1_OUT_SHIBA": - return gidRamp.GID_RAMP_C1_OUT_SHIBA; - case 4: - case "GID_RAMP_RING_LEFT_ARIAKE": - return gidRamp.GID_RAMP_RING_LEFT_ARIAKE; - case 5: - case "GID_RAMP_RING_RIGHT_KIBA": - return gidRamp.GID_RAMP_RING_RIGHT_KIBA; - case 6: - case "GID_RAMP_SUBTOKYO_SHIBUYA": - return gidRamp.GID_RAMP_SUBTOKYO_SHIBUYA; - case 7: - case "GID_RAMP_SUBTOKYO_GAIEN": - return gidRamp.GID_RAMP_SUBTOKYO_GAIEN; - case 8: - case "GID_RAMP_SUBTOKYO_DAIKANCHOU": - return gidRamp.GID_RAMP_SUBTOKYO_DAIKANCHOU; - case 9: - case "GID_RAMP_SUBTOKYO_SHINJUKU": - return gidRamp.GID_RAMP_SUBTOKYO_SHINJUKU; - case 10: - case "GID_RAMP_WANGAN_EAST_AIRPORT": - return gidRamp.GID_RAMP_WANGAN_EAST_AIRPORT; - case 11: - case "GID_RAMP_WANGAN_EAST_DAIKOKU": - return gidRamp.GID_RAMP_WANGAN_EAST_DAIKOKU; - case 12: - case "GID_RAMP_WANGAN_WEST_RINKAI": - return gidRamp.GID_RAMP_WANGAN_WEST_RINKAI; - case 13: - case "GID_RAMP_WANGAN_WEST_AIRPORT": - return gidRamp.GID_RAMP_WANGAN_WEST_AIRPORT; - case 14: - case "GID_RAMP_K1_DOWN_SHIBAURA": - return gidRamp.GID_RAMP_K1_DOWN_SHIBAURA; - case 15: - case "GID_RAMP_K1_DOWN_HANEDA": - return gidRamp.GID_RAMP_K1_DOWN_HANEDA; - case 16: - case "GID_RAMP_K1_UP_HANEDA": - return gidRamp.GID_RAMP_K1_UP_HANEDA; - case 17: - case "GID_RAMP_K1_UP_SHIOIRI": - return gidRamp.GID_RAMP_K1_UP_SHIOIRI; - case 18: - case "GID_RAMP_YAESU_SHIODOME": - return gidRamp.GID_RAMP_YAESU_SHIODOME; - case 19: - case "GID_RAMP_YAESU_KYOBASHI": - return gidRamp.GID_RAMP_YAESU_KYOBASHI; - case 20: - case "GID_RAMP_YAESU_KANDABASHI": - return gidRamp.GID_RAMP_YAESU_KANDABASHI; - case 21: - case "GID_RAMP_MINATOMIRAI_IN_HIGASHIKANAGAWA": - return gidRamp.GID_RAMP_MINATOMIRAI_IN_HIGASHIKANAGAWA; - case 22: - case "GID_RAMP_MINATOMIRAI_IN_MINATOMIRAI": - return gidRamp.GID_RAMP_MINATOMIRAI_IN_MINATOMIRAI; - case 23: - case "GID_RAMP_MINATOMIRAI_OUT_SHINYAMASHITA": - return gidRamp.GID_RAMP_MINATOMIRAI_OUT_SHINYAMASHITA; - case 24: - case "GID_RAMP_MINATOMIRAI_OUT_MINATOMIRAI": - return gidRamp.GID_RAMP_MINATOMIRAI_OUT_MINATOMIRAI; - case 25: - case "GID_RAMP_NAGOYA_MARUNOUCHI": - return gidRamp.GID_RAMP_NAGOYA_MARUNOUCHI; - case 26: - case "GID_RAMP_OOSAKA_DOUTONBORI": - return gidRamp.GID_RAMP_OOSAKA_DOUTONBORI; - case 27: - case "GID_RAMP_KOBE_SHINKOUCHOU": - return gidRamp.GID_RAMP_KOBE_SHINKOUCHOU; - case 28: - case "GID_RAMP_KOBE_NADAOOHASHI": - return gidRamp.GID_RAMP_KOBE_NADAOOHASHI; - case 29: - case "GID_RAMP_FUKUOKA_WEST_MEIHAMA": - return gidRamp.GID_RAMP_FUKUOKA_WEST_MEIHAMA; - case 30: - case "GID_RAMP_FUKUOKA_WEST_HAKATA": - return gidRamp.GID_RAMP_FUKUOKA_WEST_HAKATA; - case 31: - case "GID_RAMP_FUKUOKA_EAST_NISHI": - return gidRamp.GID_RAMP_FUKUOKA_EAST_NISHI; - case 32: - case "GID_RAMP_FUKUOKA_EAST_HANDOUBASHI": - return gidRamp.GID_RAMP_FUKUOKA_EAST_HANDOUBASHI; - case 33: - case "GID_RAMP_HAKONE_FOR": - return gidRamp.GID_RAMP_HAKONE_FOR; - case 34: - case "GID_RAMP_HAKONE_BACK": - return gidRamp.GID_RAMP_HAKONE_BACK; - case 35: - case "GID_RAMP_TURNPIKE_UP": - return gidRamp.GID_RAMP_TURNPIKE_UP; - case 36: - case "GID_RAMP_TURNPIKE_DOWN": - return gidRamp.GID_RAMP_TURNPIKE_DOWN; - case 37: - case "GID_RAMP_HIROSHIMA_SHINONOME": - return gidRamp.GID_RAMP_HIROSHIMA_SHINONOME; - case 38: - case "GID_RAMP_HIROSHIMA_UJINA": - return gidRamp.GID_RAMP_HIROSHIMA_UJINA; - case -1: - case "UNRECOGNIZED": - default: - return gidRamp.UNRECOGNIZED; - } -} - -export function gidRampToJSON(object: gidRamp): string { - switch (object) { - case gidRamp.GID_RAMP_C1_IN_KANDABASHI: - return "GID_RAMP_C1_IN_KANDABASHI"; - case gidRamp.GID_RAMP_C1_IN_SHIODOME: - return "GID_RAMP_C1_IN_SHIODOME"; - case gidRamp.GID_RAMP_C1_OUT_KANDABASHI: - return "GID_RAMP_C1_OUT_KANDABASHI"; - case gidRamp.GID_RAMP_C1_OUT_SHIBA: - return "GID_RAMP_C1_OUT_SHIBA"; - case gidRamp.GID_RAMP_RING_LEFT_ARIAKE: - return "GID_RAMP_RING_LEFT_ARIAKE"; - case gidRamp.GID_RAMP_RING_RIGHT_KIBA: - return "GID_RAMP_RING_RIGHT_KIBA"; - case gidRamp.GID_RAMP_SUBTOKYO_SHIBUYA: - return "GID_RAMP_SUBTOKYO_SHIBUYA"; - case gidRamp.GID_RAMP_SUBTOKYO_GAIEN: - return "GID_RAMP_SUBTOKYO_GAIEN"; - case gidRamp.GID_RAMP_SUBTOKYO_DAIKANCHOU: - return "GID_RAMP_SUBTOKYO_DAIKANCHOU"; - case gidRamp.GID_RAMP_SUBTOKYO_SHINJUKU: - return "GID_RAMP_SUBTOKYO_SHINJUKU"; - case gidRamp.GID_RAMP_WANGAN_EAST_AIRPORT: - return "GID_RAMP_WANGAN_EAST_AIRPORT"; - case gidRamp.GID_RAMP_WANGAN_EAST_DAIKOKU: - return "GID_RAMP_WANGAN_EAST_DAIKOKU"; - case gidRamp.GID_RAMP_WANGAN_WEST_RINKAI: - return "GID_RAMP_WANGAN_WEST_RINKAI"; - case gidRamp.GID_RAMP_WANGAN_WEST_AIRPORT: - return "GID_RAMP_WANGAN_WEST_AIRPORT"; - case gidRamp.GID_RAMP_K1_DOWN_SHIBAURA: - return "GID_RAMP_K1_DOWN_SHIBAURA"; - case gidRamp.GID_RAMP_K1_DOWN_HANEDA: - return "GID_RAMP_K1_DOWN_HANEDA"; - case gidRamp.GID_RAMP_K1_UP_HANEDA: - return "GID_RAMP_K1_UP_HANEDA"; - case gidRamp.GID_RAMP_K1_UP_SHIOIRI: - return "GID_RAMP_K1_UP_SHIOIRI"; - case gidRamp.GID_RAMP_YAESU_SHIODOME: - return "GID_RAMP_YAESU_SHIODOME"; - case gidRamp.GID_RAMP_YAESU_KYOBASHI: - return "GID_RAMP_YAESU_KYOBASHI"; - case gidRamp.GID_RAMP_YAESU_KANDABASHI: - return "GID_RAMP_YAESU_KANDABASHI"; - case gidRamp.GID_RAMP_MINATOMIRAI_IN_HIGASHIKANAGAWA: - return "GID_RAMP_MINATOMIRAI_IN_HIGASHIKANAGAWA"; - case gidRamp.GID_RAMP_MINATOMIRAI_IN_MINATOMIRAI: - return "GID_RAMP_MINATOMIRAI_IN_MINATOMIRAI"; - case gidRamp.GID_RAMP_MINATOMIRAI_OUT_SHINYAMASHITA: - return "GID_RAMP_MINATOMIRAI_OUT_SHINYAMASHITA"; - case gidRamp.GID_RAMP_MINATOMIRAI_OUT_MINATOMIRAI: - return "GID_RAMP_MINATOMIRAI_OUT_MINATOMIRAI"; - case gidRamp.GID_RAMP_NAGOYA_MARUNOUCHI: - return "GID_RAMP_NAGOYA_MARUNOUCHI"; - case gidRamp.GID_RAMP_OOSAKA_DOUTONBORI: - return "GID_RAMP_OOSAKA_DOUTONBORI"; - case gidRamp.GID_RAMP_KOBE_SHINKOUCHOU: - return "GID_RAMP_KOBE_SHINKOUCHOU"; - case gidRamp.GID_RAMP_KOBE_NADAOOHASHI: - return "GID_RAMP_KOBE_NADAOOHASHI"; - case gidRamp.GID_RAMP_FUKUOKA_WEST_MEIHAMA: - return "GID_RAMP_FUKUOKA_WEST_MEIHAMA"; - case gidRamp.GID_RAMP_FUKUOKA_WEST_HAKATA: - return "GID_RAMP_FUKUOKA_WEST_HAKATA"; - case gidRamp.GID_RAMP_FUKUOKA_EAST_NISHI: - return "GID_RAMP_FUKUOKA_EAST_NISHI"; - case gidRamp.GID_RAMP_FUKUOKA_EAST_HANDOUBASHI: - return "GID_RAMP_FUKUOKA_EAST_HANDOUBASHI"; - case gidRamp.GID_RAMP_HAKONE_FOR: - return "GID_RAMP_HAKONE_FOR"; - case gidRamp.GID_RAMP_HAKONE_BACK: - return "GID_RAMP_HAKONE_BACK"; - case gidRamp.GID_RAMP_TURNPIKE_UP: - return "GID_RAMP_TURNPIKE_UP"; - case gidRamp.GID_RAMP_TURNPIKE_DOWN: - return "GID_RAMP_TURNPIKE_DOWN"; - case gidRamp.GID_RAMP_HIROSHIMA_SHINONOME: - return "GID_RAMP_HIROSHIMA_SHINONOME"; - case gidRamp.GID_RAMP_HIROSHIMA_UJINA: - return "GID_RAMP_HIROSHIMA_UJINA"; - case gidRamp.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum gidPath { - GID_PATH_C1IN_KANDABASHI01 = 0, - GID_PATH_C1IN_KANDABASHI02 = 1, - GID_PATH_C1IN_KANDABASHI03 = 2, - GID_PATH_C1IN_SHIODOME01 = 3, - GID_PATH_C1OUT_KANDABASHI01 = 4, - GID_PATH_C1OUT_KANDABASHI02 = 5, - GID_PATH_C1OUT_KANDABASHI03 = 6, - GID_PATH_C1OUT_SHIBAKOUEN01 = 7, - GID_PATH_C1OUT_SHIBAKOUEN02 = 8, - GID_PATH_C1OUT_SHIBAKOUEN03 = 9, - GID_PATH_N9IN_ARIAKE01 = 10, - GID_PATH_N9IN_ARIAKE02 = 11, - GID_PATH_N9IN_ARIAKE03 = 12, - GID_PATH_N9OUT_KIBA01 = 13, - GID_PATH_N9OUT_KIBA02 = 14, - GID_PATH_N9OUT_KIBA03 = 15, - GID_PATH_WTEAST_SHIBUYA = 16, - GID_PATH_WTWEST_GAIEN = 17, - GID_PATH_WTUP_DAIKANCHOU = 18, - GID_PATH_WTDOWN_SHINJYUKU = 19, - GID_PATH_WGIN_AIRPORT01 = 20, - GID_PATH_WGIN_AIRPORT02 = 21, - GID_PATH_WGIN_AIRPORT03 = 22, - GID_PATH_WGIN_DAIKOKU01 = 23, - GID_PATH_WGOUT_13_01 = 24, - GID_PATH_WGOUT_AIRPORT01 = 25, - GID_PATH_WGOUT_AIRPORT02 = 26, - GID_PATH_KGDOWN_SHIBAURA01 = 27, - GID_PATH_KGDOWN_HANEDA01 = 28, - GID_PATH_KGDOWN_HANEDA02 = 29, - GID_PATH_KGUP_HANEDA01 = 30, - GID_PATH_KGUP_HANEDA02 = 31, - GID_PATH_KGUP_SHIOIRI01 = 32, - GID_PATH_KGUP_SHIOIRI02 = 33, - GID_PATH_YSIN_SHIODOME01 = 34, - GID_PATH_YSIN_SHIODOME02 = 35, - GID_PATH_YSOUT_KYOBASHI01 = 36, - GID_PATH_YSOUT_KANDABASHI01 = 37, - GID_PATH_KGDOWN_HIGASHIKANAGAWA01 = 38, - GID_PATH_KGDOWN_HIGASHIKANAGAWA02 = 39, - GID_PATH_KGDOWN_MINATOMIRAI01 = 40, - GID_PATH_KGDOWN_MINATOMIRAI02 = 41, - GID_PATH_KGDOWN_MINATOMIRAI03 = 42, - GID_PATH_KGUP_SHINYAMASHITA01 = 43, - GID_PATH_KGUP_SHINYAMASHITA02 = 44, - GID_PATH_KGUP_SHINYAMASHITA03 = 45, - GID_PATH_KGUP_MINATOMIRAI01 = 46, - GID_PATH_KGUP_MINATOMIRAI02 = 47, - GID_PATH_KGUP_MINATOMIRAI03 = 48, - GID_PATH_NGR_MARUNOUCHI = 49, - GID_PATH_OS_TONBORI01 = 50, - GID_PATH_OS_TONBORI02 = 51, - GID_PATH_OS_TONBORI03 = 52, - GID_PATH_OS_TONBORI04 = 53, - GID_PATH_KB_SHINKOUCHOU = 54, - GID_PATH_KB_NADA = 55, - GID_PATH_HS_SHINONOME = 56, - GID_PATH_HS_UJINA = 57, - GID_PATH_FK_MEINOHAMA = 58, - GID_PATH_FK_HAKATA = 59, - GID_PATH_FK_NISHIKOUEN = 60, - GID_PATH_FK_HANMICHIBASHI = 61, - GID_PATH_HKFOR = 62, - GID_PATH_HKBACK = 63, - GID_PATH_TP_BOTTOM = 64, - GID_PATH_TP_TOP = 65, - UNRECOGNIZED = -1, -} - -export function gidPathFromJSON(object: any): gidPath { - switch (object) { - case 0: - case "GID_PATH_C1IN_KANDABASHI01": - return gidPath.GID_PATH_C1IN_KANDABASHI01; - case 1: - case "GID_PATH_C1IN_KANDABASHI02": - return gidPath.GID_PATH_C1IN_KANDABASHI02; - case 2: - case "GID_PATH_C1IN_KANDABASHI03": - return gidPath.GID_PATH_C1IN_KANDABASHI03; - case 3: - case "GID_PATH_C1IN_SHIODOME01": - return gidPath.GID_PATH_C1IN_SHIODOME01; - case 4: - case "GID_PATH_C1OUT_KANDABASHI01": - return gidPath.GID_PATH_C1OUT_KANDABASHI01; - case 5: - case "GID_PATH_C1OUT_KANDABASHI02": - return gidPath.GID_PATH_C1OUT_KANDABASHI02; - case 6: - case "GID_PATH_C1OUT_KANDABASHI03": - return gidPath.GID_PATH_C1OUT_KANDABASHI03; - case 7: - case "GID_PATH_C1OUT_SHIBAKOUEN01": - return gidPath.GID_PATH_C1OUT_SHIBAKOUEN01; - case 8: - case "GID_PATH_C1OUT_SHIBAKOUEN02": - return gidPath.GID_PATH_C1OUT_SHIBAKOUEN02; - case 9: - case "GID_PATH_C1OUT_SHIBAKOUEN03": - return gidPath.GID_PATH_C1OUT_SHIBAKOUEN03; - case 10: - case "GID_PATH_N9IN_ARIAKE01": - return gidPath.GID_PATH_N9IN_ARIAKE01; - case 11: - case "GID_PATH_N9IN_ARIAKE02": - return gidPath.GID_PATH_N9IN_ARIAKE02; - case 12: - case "GID_PATH_N9IN_ARIAKE03": - return gidPath.GID_PATH_N9IN_ARIAKE03; - case 13: - case "GID_PATH_N9OUT_KIBA01": - return gidPath.GID_PATH_N9OUT_KIBA01; - case 14: - case "GID_PATH_N9OUT_KIBA02": - return gidPath.GID_PATH_N9OUT_KIBA02; - case 15: - case "GID_PATH_N9OUT_KIBA03": - return gidPath.GID_PATH_N9OUT_KIBA03; - case 16: - case "GID_PATH_WTEAST_SHIBUYA": - return gidPath.GID_PATH_WTEAST_SHIBUYA; - case 17: - case "GID_PATH_WTWEST_GAIEN": - return gidPath.GID_PATH_WTWEST_GAIEN; - case 18: - case "GID_PATH_WTUP_DAIKANCHOU": - return gidPath.GID_PATH_WTUP_DAIKANCHOU; - case 19: - case "GID_PATH_WTDOWN_SHINJYUKU": - return gidPath.GID_PATH_WTDOWN_SHINJYUKU; - case 20: - case "GID_PATH_WGIN_AIRPORT01": - return gidPath.GID_PATH_WGIN_AIRPORT01; - case 21: - case "GID_PATH_WGIN_AIRPORT02": - return gidPath.GID_PATH_WGIN_AIRPORT02; - case 22: - case "GID_PATH_WGIN_AIRPORT03": - return gidPath.GID_PATH_WGIN_AIRPORT03; - case 23: - case "GID_PATH_WGIN_DAIKOKU01": - return gidPath.GID_PATH_WGIN_DAIKOKU01; - case 24: - case "GID_PATH_WGOUT_13_01": - return gidPath.GID_PATH_WGOUT_13_01; - case 25: - case "GID_PATH_WGOUT_AIRPORT01": - return gidPath.GID_PATH_WGOUT_AIRPORT01; - case 26: - case "GID_PATH_WGOUT_AIRPORT02": - return gidPath.GID_PATH_WGOUT_AIRPORT02; - case 27: - case "GID_PATH_KGDOWN_SHIBAURA01": - return gidPath.GID_PATH_KGDOWN_SHIBAURA01; - case 28: - case "GID_PATH_KGDOWN_HANEDA01": - return gidPath.GID_PATH_KGDOWN_HANEDA01; - case 29: - case "GID_PATH_KGDOWN_HANEDA02": - return gidPath.GID_PATH_KGDOWN_HANEDA02; - case 30: - case "GID_PATH_KGUP_HANEDA01": - return gidPath.GID_PATH_KGUP_HANEDA01; - case 31: - case "GID_PATH_KGUP_HANEDA02": - return gidPath.GID_PATH_KGUP_HANEDA02; - case 32: - case "GID_PATH_KGUP_SHIOIRI01": - return gidPath.GID_PATH_KGUP_SHIOIRI01; - case 33: - case "GID_PATH_KGUP_SHIOIRI02": - return gidPath.GID_PATH_KGUP_SHIOIRI02; - case 34: - case "GID_PATH_YSIN_SHIODOME01": - return gidPath.GID_PATH_YSIN_SHIODOME01; - case 35: - case "GID_PATH_YSIN_SHIODOME02": - return gidPath.GID_PATH_YSIN_SHIODOME02; - case 36: - case "GID_PATH_YSOUT_KYOBASHI01": - return gidPath.GID_PATH_YSOUT_KYOBASHI01; - case 37: - case "GID_PATH_YSOUT_KANDABASHI01": - return gidPath.GID_PATH_YSOUT_KANDABASHI01; - case 38: - case "GID_PATH_KGDOWN_HIGASHIKANAGAWA01": - return gidPath.GID_PATH_KGDOWN_HIGASHIKANAGAWA01; - case 39: - case "GID_PATH_KGDOWN_HIGASHIKANAGAWA02": - return gidPath.GID_PATH_KGDOWN_HIGASHIKANAGAWA02; - case 40: - case "GID_PATH_KGDOWN_MINATOMIRAI01": - return gidPath.GID_PATH_KGDOWN_MINATOMIRAI01; - case 41: - case "GID_PATH_KGDOWN_MINATOMIRAI02": - return gidPath.GID_PATH_KGDOWN_MINATOMIRAI02; - case 42: - case "GID_PATH_KGDOWN_MINATOMIRAI03": - return gidPath.GID_PATH_KGDOWN_MINATOMIRAI03; - case 43: - case "GID_PATH_KGUP_SHINYAMASHITA01": - return gidPath.GID_PATH_KGUP_SHINYAMASHITA01; - case 44: - case "GID_PATH_KGUP_SHINYAMASHITA02": - return gidPath.GID_PATH_KGUP_SHINYAMASHITA02; - case 45: - case "GID_PATH_KGUP_SHINYAMASHITA03": - return gidPath.GID_PATH_KGUP_SHINYAMASHITA03; - case 46: - case "GID_PATH_KGUP_MINATOMIRAI01": - return gidPath.GID_PATH_KGUP_MINATOMIRAI01; - case 47: - case "GID_PATH_KGUP_MINATOMIRAI02": - return gidPath.GID_PATH_KGUP_MINATOMIRAI02; - case 48: - case "GID_PATH_KGUP_MINATOMIRAI03": - return gidPath.GID_PATH_KGUP_MINATOMIRAI03; - case 49: - case "GID_PATH_NGR_MARUNOUCHI": - return gidPath.GID_PATH_NGR_MARUNOUCHI; - case 50: - case "GID_PATH_OS_TONBORI01": - return gidPath.GID_PATH_OS_TONBORI01; - case 51: - case "GID_PATH_OS_TONBORI02": - return gidPath.GID_PATH_OS_TONBORI02; - case 52: - case "GID_PATH_OS_TONBORI03": - return gidPath.GID_PATH_OS_TONBORI03; - case 53: - case "GID_PATH_OS_TONBORI04": - return gidPath.GID_PATH_OS_TONBORI04; - case 54: - case "GID_PATH_KB_SHINKOUCHOU": - return gidPath.GID_PATH_KB_SHINKOUCHOU; - case 55: - case "GID_PATH_KB_NADA": - return gidPath.GID_PATH_KB_NADA; - case 56: - case "GID_PATH_HS_SHINONOME": - return gidPath.GID_PATH_HS_SHINONOME; - case 57: - case "GID_PATH_HS_UJINA": - return gidPath.GID_PATH_HS_UJINA; - case 58: - case "GID_PATH_FK_MEINOHAMA": - return gidPath.GID_PATH_FK_MEINOHAMA; - case 59: - case "GID_PATH_FK_HAKATA": - return gidPath.GID_PATH_FK_HAKATA; - case 60: - case "GID_PATH_FK_NISHIKOUEN": - return gidPath.GID_PATH_FK_NISHIKOUEN; - case 61: - case "GID_PATH_FK_HANMICHIBASHI": - return gidPath.GID_PATH_FK_HANMICHIBASHI; - case 62: - case "GID_PATH_HKFOR": - return gidPath.GID_PATH_HKFOR; - case 63: - case "GID_PATH_HKBACK": - return gidPath.GID_PATH_HKBACK; - case 64: - case "GID_PATH_TP_BOTTOM": - return gidPath.GID_PATH_TP_BOTTOM; - case 65: - case "GID_PATH_TP_TOP": - return gidPath.GID_PATH_TP_TOP; - case -1: - case "UNRECOGNIZED": - default: - return gidPath.UNRECOGNIZED; - } -} - -export function gidPathToJSON(object: gidPath): string { - switch (object) { - case gidPath.GID_PATH_C1IN_KANDABASHI01: - return "GID_PATH_C1IN_KANDABASHI01"; - case gidPath.GID_PATH_C1IN_KANDABASHI02: - return "GID_PATH_C1IN_KANDABASHI02"; - case gidPath.GID_PATH_C1IN_KANDABASHI03: - return "GID_PATH_C1IN_KANDABASHI03"; - case gidPath.GID_PATH_C1IN_SHIODOME01: - return "GID_PATH_C1IN_SHIODOME01"; - case gidPath.GID_PATH_C1OUT_KANDABASHI01: - return "GID_PATH_C1OUT_KANDABASHI01"; - case gidPath.GID_PATH_C1OUT_KANDABASHI02: - return "GID_PATH_C1OUT_KANDABASHI02"; - case gidPath.GID_PATH_C1OUT_KANDABASHI03: - return "GID_PATH_C1OUT_KANDABASHI03"; - case gidPath.GID_PATH_C1OUT_SHIBAKOUEN01: - return "GID_PATH_C1OUT_SHIBAKOUEN01"; - case gidPath.GID_PATH_C1OUT_SHIBAKOUEN02: - return "GID_PATH_C1OUT_SHIBAKOUEN02"; - case gidPath.GID_PATH_C1OUT_SHIBAKOUEN03: - return "GID_PATH_C1OUT_SHIBAKOUEN03"; - case gidPath.GID_PATH_N9IN_ARIAKE01: - return "GID_PATH_N9IN_ARIAKE01"; - case gidPath.GID_PATH_N9IN_ARIAKE02: - return "GID_PATH_N9IN_ARIAKE02"; - case gidPath.GID_PATH_N9IN_ARIAKE03: - return "GID_PATH_N9IN_ARIAKE03"; - case gidPath.GID_PATH_N9OUT_KIBA01: - return "GID_PATH_N9OUT_KIBA01"; - case gidPath.GID_PATH_N9OUT_KIBA02: - return "GID_PATH_N9OUT_KIBA02"; - case gidPath.GID_PATH_N9OUT_KIBA03: - return "GID_PATH_N9OUT_KIBA03"; - case gidPath.GID_PATH_WTEAST_SHIBUYA: - return "GID_PATH_WTEAST_SHIBUYA"; - case gidPath.GID_PATH_WTWEST_GAIEN: - return "GID_PATH_WTWEST_GAIEN"; - case gidPath.GID_PATH_WTUP_DAIKANCHOU: - return "GID_PATH_WTUP_DAIKANCHOU"; - case gidPath.GID_PATH_WTDOWN_SHINJYUKU: - return "GID_PATH_WTDOWN_SHINJYUKU"; - case gidPath.GID_PATH_WGIN_AIRPORT01: - return "GID_PATH_WGIN_AIRPORT01"; - case gidPath.GID_PATH_WGIN_AIRPORT02: - return "GID_PATH_WGIN_AIRPORT02"; - case gidPath.GID_PATH_WGIN_AIRPORT03: - return "GID_PATH_WGIN_AIRPORT03"; - case gidPath.GID_PATH_WGIN_DAIKOKU01: - return "GID_PATH_WGIN_DAIKOKU01"; - case gidPath.GID_PATH_WGOUT_13_01: - return "GID_PATH_WGOUT_13_01"; - case gidPath.GID_PATH_WGOUT_AIRPORT01: - return "GID_PATH_WGOUT_AIRPORT01"; - case gidPath.GID_PATH_WGOUT_AIRPORT02: - return "GID_PATH_WGOUT_AIRPORT02"; - case gidPath.GID_PATH_KGDOWN_SHIBAURA01: - return "GID_PATH_KGDOWN_SHIBAURA01"; - case gidPath.GID_PATH_KGDOWN_HANEDA01: - return "GID_PATH_KGDOWN_HANEDA01"; - case gidPath.GID_PATH_KGDOWN_HANEDA02: - return "GID_PATH_KGDOWN_HANEDA02"; - case gidPath.GID_PATH_KGUP_HANEDA01: - return "GID_PATH_KGUP_HANEDA01"; - case gidPath.GID_PATH_KGUP_HANEDA02: - return "GID_PATH_KGUP_HANEDA02"; - case gidPath.GID_PATH_KGUP_SHIOIRI01: - return "GID_PATH_KGUP_SHIOIRI01"; - case gidPath.GID_PATH_KGUP_SHIOIRI02: - return "GID_PATH_KGUP_SHIOIRI02"; - case gidPath.GID_PATH_YSIN_SHIODOME01: - return "GID_PATH_YSIN_SHIODOME01"; - case gidPath.GID_PATH_YSIN_SHIODOME02: - return "GID_PATH_YSIN_SHIODOME02"; - case gidPath.GID_PATH_YSOUT_KYOBASHI01: - return "GID_PATH_YSOUT_KYOBASHI01"; - case gidPath.GID_PATH_YSOUT_KANDABASHI01: - return "GID_PATH_YSOUT_KANDABASHI01"; - case gidPath.GID_PATH_KGDOWN_HIGASHIKANAGAWA01: - return "GID_PATH_KGDOWN_HIGASHIKANAGAWA01"; - case gidPath.GID_PATH_KGDOWN_HIGASHIKANAGAWA02: - return "GID_PATH_KGDOWN_HIGASHIKANAGAWA02"; - case gidPath.GID_PATH_KGDOWN_MINATOMIRAI01: - return "GID_PATH_KGDOWN_MINATOMIRAI01"; - case gidPath.GID_PATH_KGDOWN_MINATOMIRAI02: - return "GID_PATH_KGDOWN_MINATOMIRAI02"; - case gidPath.GID_PATH_KGDOWN_MINATOMIRAI03: - return "GID_PATH_KGDOWN_MINATOMIRAI03"; - case gidPath.GID_PATH_KGUP_SHINYAMASHITA01: - return "GID_PATH_KGUP_SHINYAMASHITA01"; - case gidPath.GID_PATH_KGUP_SHINYAMASHITA02: - return "GID_PATH_KGUP_SHINYAMASHITA02"; - case gidPath.GID_PATH_KGUP_SHINYAMASHITA03: - return "GID_PATH_KGUP_SHINYAMASHITA03"; - case gidPath.GID_PATH_KGUP_MINATOMIRAI01: - return "GID_PATH_KGUP_MINATOMIRAI01"; - case gidPath.GID_PATH_KGUP_MINATOMIRAI02: - return "GID_PATH_KGUP_MINATOMIRAI02"; - case gidPath.GID_PATH_KGUP_MINATOMIRAI03: - return "GID_PATH_KGUP_MINATOMIRAI03"; - case gidPath.GID_PATH_NGR_MARUNOUCHI: - return "GID_PATH_NGR_MARUNOUCHI"; - case gidPath.GID_PATH_OS_TONBORI01: - return "GID_PATH_OS_TONBORI01"; - case gidPath.GID_PATH_OS_TONBORI02: - return "GID_PATH_OS_TONBORI02"; - case gidPath.GID_PATH_OS_TONBORI03: - return "GID_PATH_OS_TONBORI03"; - case gidPath.GID_PATH_OS_TONBORI04: - return "GID_PATH_OS_TONBORI04"; - case gidPath.GID_PATH_KB_SHINKOUCHOU: - return "GID_PATH_KB_SHINKOUCHOU"; - case gidPath.GID_PATH_KB_NADA: - return "GID_PATH_KB_NADA"; - case gidPath.GID_PATH_HS_SHINONOME: - return "GID_PATH_HS_SHINONOME"; - case gidPath.GID_PATH_HS_UJINA: - return "GID_PATH_HS_UJINA"; - case gidPath.GID_PATH_FK_MEINOHAMA: - return "GID_PATH_FK_MEINOHAMA"; - case gidPath.GID_PATH_FK_HAKATA: - return "GID_PATH_FK_HAKATA"; - case gidPath.GID_PATH_FK_NISHIKOUEN: - return "GID_PATH_FK_NISHIKOUEN"; - case gidPath.GID_PATH_FK_HANMICHIBASHI: - return "GID_PATH_FK_HANMICHIBASHI"; - case gidPath.GID_PATH_HKFOR: - return "GID_PATH_HKFOR"; - case gidPath.GID_PATH_HKBACK: - return "GID_PATH_HKBACK"; - case gidPath.GID_PATH_TP_BOTTOM: - return "GID_PATH_TP_BOTTOM"; - case gidPath.GID_PATH_TP_TOP: - return "GID_PATH_TP_TOP"; - case gidPath.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum gidTimezone { - GID_TIMEZONE_DAY = 0, - GID_TIMEZONE_NIGHT = 1, - UNRECOGNIZED = -1, -} - -export function gidTimezoneFromJSON(object: any): gidTimezone { - switch (object) { - case 0: - case "GID_TIMEZONE_DAY": - return gidTimezone.GID_TIMEZONE_DAY; - case 1: - case "GID_TIMEZONE_NIGHT": - return gidTimezone.GID_TIMEZONE_NIGHT; - case -1: - case "UNRECOGNIZED": - default: - return gidTimezone.UNRECOGNIZED; - } -} - -export function gidTimezoneToJSON(object: gidTimezone): string { - switch (object) { - case gidTimezone.GID_TIMEZONE_DAY: - return "GID_TIMEZONE_DAY"; - case gidTimezone.GID_TIMEZONE_NIGHT: - return "GID_TIMEZONE_NIGHT"; - case gidTimezone.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum gidExtreme { - GID_EXTREME_NORMAL = 0, - GID_EXTREME_REVERSE = 1, - UNRECOGNIZED = -1, -} - -export function gidExtremeFromJSON(object: any): gidExtreme { - switch (object) { - case 0: - case "GID_EXTREME_NORMAL": - return gidExtreme.GID_EXTREME_NORMAL; - case 1: - case "GID_EXTREME_REVERSE": - return gidExtreme.GID_EXTREME_REVERSE; - case -1: - case "UNRECOGNIZED": - default: - return gidExtreme.UNRECOGNIZED; - } -} - -export function gidExtremeToJSON(object: gidExtreme): string { - switch (object) { - case gidExtreme.GID_EXTREME_NORMAL: - return "GID_EXTREME_NORMAL"; - case gidExtreme.GID_EXTREME_REVERSE: - return "GID_EXTREME_REVERSE"; - case gidExtreme.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} diff --git a/src/proto/service.ts b/src/proto/service.ts deleted file mode 100644 index 79f28a5..0000000 --- a/src/proto/service.ts +++ /dev/null @@ -1,2378 +0,0 @@ -/* eslint-disable */ -import { - ErrorCode, - Car, - RegisterSystemInfoResponse, - RegisterSystemStatsResponse, - RegisterGhostTrailResponse, - LoadUserResponse, - UpdateUserSessionResponse, - LoadDriveInformationResponse, - LoadCarResponse, - CreateCarResponse, - LoadGameHistoryResponse, - UpdateCarResponse, - SaveGameResultResponse, - SaveChargeResponse, - LoadGhostBattleInfoResponse, - LoadStampTargetResponse, - LockStampTargetResponse, - LoadGhostCompetitionInfoResponse, - LoadTimeAttackRecordResponse, - SaveTerminalResultResponse, - PingResponse, - LoadTerminalInformationResponse, - CreateUserResponse, - AskAccessCodeResponse, - RegisterOpponentGhostResponse, - LoadBookmarksResponse, - SaveBookmarksResponse, - GrantCarRightResponse, - LoadGhostCompetitionRankingResponse, - LoadUnreceivedUserItemsResponse, - StartTransferResponse, - SaveScreenshotResponse, - LoadScratchInformationResponse, - SaveScratchSheetResponse, - TurnScratchSheetResponse, - CheckItemReceivableCarsResponse, - ReceiveUserItemsResponse, - UpdateEventModeSerialResponse, - ConsumeUserItemResponse, - SearchCarsByLevelResponse, - LoadPathsAndTuningsResponse, - LoadGhostDriveDataResponse, - ParticipateInInviteFriendCampaignResponse, - SubmitClientLogResponse, - GhostTrail, - PlaceList, - GhostList, - CarSummary, - FileList, - GhostCompetitionTarget, - errorCodeFromJSON, - errorCodeToJSON, - RegisterSystemInfoRequest, - RegisterSystemStatsRequest, - RegisterGhostTrailRequest, - LoadUserRequest, - UpdateUserSessionRequest, - LoadDriveInformationRequest, - LoadCarRequest, - CreateCarRequest, - LoadGameHistoryRequest, - UpdateCarRequest, - SaveGameResultRequest, - SaveChargeRequest, - LoadGhostBattleInfoRequest, - LoadStampTargetRequest, - LockStampTargetRequest, - LoadGhostCompetitionInfoRequest, - LoadTimeAttackRecordRequest, - SaveTerminalResultRequest, - PingRequest, - LoadTerminalInformationRequest, - CreateUserRequest, - AskAccessCodeRequest, - RegisterOpponentGhostRequest, - LoadBookmarksRequest, - SaveBookmarksRequest, - GrantCarRightRequest, - LoadGhostCompetitionRankingRequest, - LoadUnreceivedUserItemsRequest, - StartTransferRequest, - SaveScreenshotRequest, - LoadScratchInformationRequest, - SaveScratchSheetRequest, - TurnScratchSheetRequest, - CheckItemReceivableCarsRequest, - ReceiveUserItemsRequest, - UpdateEventModeSerialRequest, - ConsumeUserItemRequest, - SearchCarsByLevelRequest, - LoadPathsAndTuningsRequest, - LoadGhostDriveDataRequest, - ParticipateInInviteFriendCampaignRequest, - SubmitClientLogRequest, -} from "./wm"; -import Long from "long"; -import * as _m0 from "protobufjs/minimal"; - -export const protobufPackage = "wm.protobuf"; - -export enum RankingType { - RANKING_TA_C1IN = 0, - RANKING_TA_C1OUT = 1, - RANKING_TA_RINGLEFT = 2, - RANKING_TA_RINGRIGHT = 3, - RANKING_TA_SUBTOKYO_3_4 = 4, - RANKING_TA_SUBTOKYO_5 = 5, - RANKING_TA_WANGANEAST = 6, - RANKING_TA_WANGANWEST = 7, - RANKING_TA_K1_DOWN = 8, - RANKING_TA_K1_UP = 9, - RANKING_TA_YAESUIN = 10, - RANKING_TA_YAESUOUT = 11, - RANKING_TA_YOKOHAMAIN = 12, - RANKING_TA_YOKOHAMAOUT = 13, - RANKING_TA_NAGOYA = 14, - RANKING_TA_OSAKA = 15, - RANKING_TA_KOBE = 16, - RANKING_TA_FUKUOKA = 17, - RANKING_TA_HAKONEFOR = 18, - RANKING_TA_HAKONEBACK = 19, - RANKING_TA_TURNPIKE_UP = 20, - RANKING_TA_TURNPIKE_DOWN = 21, - RANKING_TA_TOKYOALL = 22, - RANKING_TA_KANAGAWAALL = 23, - RANKING_TA_HIROSHIMA = 24, - RANKING_VS_STAR = 100, - RANKING_GHOST_DEFEATED_COUNT = 101, - UNRECOGNIZED = -1, -} - -export function rankingTypeFromJSON(object: any): RankingType { - switch (object) { - case 0: - case "RANKING_TA_C1IN": - return RankingType.RANKING_TA_C1IN; - case 1: - case "RANKING_TA_C1OUT": - return RankingType.RANKING_TA_C1OUT; - case 2: - case "RANKING_TA_RINGLEFT": - return RankingType.RANKING_TA_RINGLEFT; - case 3: - case "RANKING_TA_RINGRIGHT": - return RankingType.RANKING_TA_RINGRIGHT; - case 4: - case "RANKING_TA_SUBTOKYO_3_4": - return RankingType.RANKING_TA_SUBTOKYO_3_4; - case 5: - case "RANKING_TA_SUBTOKYO_5": - return RankingType.RANKING_TA_SUBTOKYO_5; - case 6: - case "RANKING_TA_WANGANEAST": - return RankingType.RANKING_TA_WANGANEAST; - case 7: - case "RANKING_TA_WANGANWEST": - return RankingType.RANKING_TA_WANGANWEST; - case 8: - case "RANKING_TA_K1_DOWN": - return RankingType.RANKING_TA_K1_DOWN; - case 9: - case "RANKING_TA_K1_UP": - return RankingType.RANKING_TA_K1_UP; - case 10: - case "RANKING_TA_YAESUIN": - return RankingType.RANKING_TA_YAESUIN; - case 11: - case "RANKING_TA_YAESUOUT": - return RankingType.RANKING_TA_YAESUOUT; - case 12: - case "RANKING_TA_YOKOHAMAIN": - return RankingType.RANKING_TA_YOKOHAMAIN; - case 13: - case "RANKING_TA_YOKOHAMAOUT": - return RankingType.RANKING_TA_YOKOHAMAOUT; - case 14: - case "RANKING_TA_NAGOYA": - return RankingType.RANKING_TA_NAGOYA; - case 15: - case "RANKING_TA_OSAKA": - return RankingType.RANKING_TA_OSAKA; - case 16: - case "RANKING_TA_KOBE": - return RankingType.RANKING_TA_KOBE; - case 17: - case "RANKING_TA_FUKUOKA": - return RankingType.RANKING_TA_FUKUOKA; - case 18: - case "RANKING_TA_HAKONEFOR": - return RankingType.RANKING_TA_HAKONEFOR; - case 19: - case "RANKING_TA_HAKONEBACK": - return RankingType.RANKING_TA_HAKONEBACK; - case 20: - case "RANKING_TA_TURNPIKE_UP": - return RankingType.RANKING_TA_TURNPIKE_UP; - case 21: - case "RANKING_TA_TURNPIKE_DOWN": - return RankingType.RANKING_TA_TURNPIKE_DOWN; - case 22: - case "RANKING_TA_TOKYOALL": - return RankingType.RANKING_TA_TOKYOALL; - case 23: - case "RANKING_TA_KANAGAWAALL": - return RankingType.RANKING_TA_KANAGAWAALL; - case 24: - case "RANKING_TA_HIROSHIMA": - return RankingType.RANKING_TA_HIROSHIMA; - case 100: - case "RANKING_VS_STAR": - return RankingType.RANKING_VS_STAR; - case 101: - case "RANKING_GHOST_DEFEATED_COUNT": - return RankingType.RANKING_GHOST_DEFEATED_COUNT; - case -1: - case "UNRECOGNIZED": - default: - return RankingType.UNRECOGNIZED; - } -} - -export function rankingTypeToJSON(object: RankingType): string { - switch (object) { - case RankingType.RANKING_TA_C1IN: - return "RANKING_TA_C1IN"; - case RankingType.RANKING_TA_C1OUT: - return "RANKING_TA_C1OUT"; - case RankingType.RANKING_TA_RINGLEFT: - return "RANKING_TA_RINGLEFT"; - case RankingType.RANKING_TA_RINGRIGHT: - return "RANKING_TA_RINGRIGHT"; - case RankingType.RANKING_TA_SUBTOKYO_3_4: - return "RANKING_TA_SUBTOKYO_3_4"; - case RankingType.RANKING_TA_SUBTOKYO_5: - return "RANKING_TA_SUBTOKYO_5"; - case RankingType.RANKING_TA_WANGANEAST: - return "RANKING_TA_WANGANEAST"; - case RankingType.RANKING_TA_WANGANWEST: - return "RANKING_TA_WANGANWEST"; - case RankingType.RANKING_TA_K1_DOWN: - return "RANKING_TA_K1_DOWN"; - case RankingType.RANKING_TA_K1_UP: - return "RANKING_TA_K1_UP"; - case RankingType.RANKING_TA_YAESUIN: - return "RANKING_TA_YAESUIN"; - case RankingType.RANKING_TA_YAESUOUT: - return "RANKING_TA_YAESUOUT"; - case RankingType.RANKING_TA_YOKOHAMAIN: - return "RANKING_TA_YOKOHAMAIN"; - case RankingType.RANKING_TA_YOKOHAMAOUT: - return "RANKING_TA_YOKOHAMAOUT"; - case RankingType.RANKING_TA_NAGOYA: - return "RANKING_TA_NAGOYA"; - case RankingType.RANKING_TA_OSAKA: - return "RANKING_TA_OSAKA"; - case RankingType.RANKING_TA_KOBE: - return "RANKING_TA_KOBE"; - case RankingType.RANKING_TA_FUKUOKA: - return "RANKING_TA_FUKUOKA"; - case RankingType.RANKING_TA_HAKONEFOR: - return "RANKING_TA_HAKONEFOR"; - case RankingType.RANKING_TA_HAKONEBACK: - return "RANKING_TA_HAKONEBACK"; - case RankingType.RANKING_TA_TURNPIKE_UP: - return "RANKING_TA_TURNPIKE_UP"; - case RankingType.RANKING_TA_TURNPIKE_DOWN: - return "RANKING_TA_TURNPIKE_DOWN"; - case RankingType.RANKING_TA_TOKYOALL: - return "RANKING_TA_TOKYOALL"; - case RankingType.RANKING_TA_KANAGAWAALL: - return "RANKING_TA_KANAGAWAALL"; - case RankingType.RANKING_TA_HIROSHIMA: - return "RANKING_TA_HIROSHIMA"; - case RankingType.RANKING_VS_STAR: - return "RANKING_VS_STAR"; - case RankingType.RANKING_GHOST_DEFEATED_COUNT: - return "RANKING_GHOST_DEFEATED_COUNT"; - case RankingType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export interface PlaceListQuery { - regionId: number; -} - -export interface GhostListQuery { - carId: number; - area: number; -} - -export interface GhostTrailQuery { - carId: number; - area: number; - trailId: number; -} - -export interface CarSummaryQuery { - regionId: number; - ghostLevel: number; - manufacturer: number; - model: number; - name: string; - searchCode: string; - lastPlayedPlaceId: string; - limit: number; -} - -export interface FileListQuery {} - -export interface GhostCompetitionTargetQuery { - competitionId: number; - periodId: number; -} - -export interface LockCrownRequest { - carId: number; - area: number; - lockTime: number; -} - -export interface LockCrownResponse { - error: ErrorCode; -} - -export interface Crown { - carId: number; - area: number; - unlockAt: number; - car: Car | undefined; -} - -export interface CrownListQuery { - carId: number; - area: number; -} - -export interface CrownList { - crowns: Crown[]; -} - -export interface RankingQuery { - rankingType: RankingType; -} - -export interface Ranking { - lists: Ranking_List[]; -} - -export interface Ranking_List { - rankingType: RankingType; - topRecords: Ranking_Entry[]; -} - -export interface Ranking_Entry { - rank: number; - result: number; - carId: number; - name: string; - regionId: number; - model: number; - visualModel: number; - defaultColor: number; - tunePower: number; - tuneHandling: number; - title: string; - level: number; -} - -function createBasePlaceListQuery(): PlaceListQuery { - return { regionId: 0 }; -} - -export const PlaceListQuery = { - encode( - message: PlaceListQuery, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.regionId !== 0) { - writer.uint32(8).uint32(message.regionId); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): PlaceListQuery { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePlaceListQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.regionId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PlaceListQuery { - return { - regionId: isSet(object.regionId) ? Number(object.regionId) : 0, - }; - }, - - toJSON(message: PlaceListQuery): unknown { - const obj: any = {}; - message.regionId !== undefined && - (obj.regionId = Math.round(message.regionId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): PlaceListQuery { - const message = createBasePlaceListQuery(); - message.regionId = object.regionId ?? 0; - return message; - }, -}; - -function createBaseGhostListQuery(): GhostListQuery { - return { carId: 0, area: 0 }; -} - -export const GhostListQuery = { - encode( - message: GhostListQuery, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.area !== 0) { - writer.uint32(16).uint32(message.area); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GhostListQuery { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGhostListQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.area = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GhostListQuery { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - area: isSet(object.area) ? Number(object.area) : 0, - }; - }, - - toJSON(message: GhostListQuery): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.area !== undefined && (obj.area = Math.round(message.area)); - return obj; - }, - - fromPartial, I>>( - object: I - ): GhostListQuery { - const message = createBaseGhostListQuery(); - message.carId = object.carId ?? 0; - message.area = object.area ?? 0; - return message; - }, -}; - -function createBaseGhostTrailQuery(): GhostTrailQuery { - return { carId: 0, area: 0, trailId: 0 }; -} - -export const GhostTrailQuery = { - encode( - message: GhostTrailQuery, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.area !== 0) { - writer.uint32(16).uint32(message.area); - } - if (message.trailId !== 0) { - writer.uint32(24).uint64(message.trailId); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GhostTrailQuery { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGhostTrailQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.area = reader.uint32(); - break; - case 3: - message.trailId = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GhostTrailQuery { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - area: isSet(object.area) ? Number(object.area) : 0, - trailId: isSet(object.trailId) ? Number(object.trailId) : 0, - }; - }, - - toJSON(message: GhostTrailQuery): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.area !== undefined && (obj.area = Math.round(message.area)); - message.trailId !== undefined && - (obj.trailId = Math.round(message.trailId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): GhostTrailQuery { - const message = createBaseGhostTrailQuery(); - message.carId = object.carId ?? 0; - message.area = object.area ?? 0; - message.trailId = object.trailId ?? 0; - return message; - }, -}; - -function createBaseCarSummaryQuery(): CarSummaryQuery { - return { - regionId: 0, - ghostLevel: 0, - manufacturer: 0, - model: 0, - name: "", - searchCode: "", - lastPlayedPlaceId: "", - limit: 0, - }; -} - -export const CarSummaryQuery = { - encode( - message: CarSummaryQuery, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.regionId !== 0) { - writer.uint32(8).uint32(message.regionId); - } - if (message.ghostLevel !== 0) { - writer.uint32(16).uint32(message.ghostLevel); - } - if (message.manufacturer !== 0) { - writer.uint32(24).uint32(message.manufacturer); - } - if (message.model !== 0) { - writer.uint32(32).uint32(message.model); - } - if (message.name !== "") { - writer.uint32(42).string(message.name); - } - if (message.searchCode !== "") { - writer.uint32(50).string(message.searchCode); - } - if (message.lastPlayedPlaceId !== "") { - writer.uint32(58).string(message.lastPlayedPlaceId); - } - if (message.limit !== 0) { - writer.uint32(64).uint32(message.limit); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CarSummaryQuery { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCarSummaryQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.regionId = reader.uint32(); - break; - case 2: - message.ghostLevel = reader.uint32(); - break; - case 3: - message.manufacturer = reader.uint32(); - break; - case 4: - message.model = reader.uint32(); - break; - case 5: - message.name = reader.string(); - break; - case 6: - message.searchCode = reader.string(); - break; - case 7: - message.lastPlayedPlaceId = reader.string(); - break; - case 8: - message.limit = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CarSummaryQuery { - return { - regionId: isSet(object.regionId) ? Number(object.regionId) : 0, - ghostLevel: isSet(object.ghostLevel) ? Number(object.ghostLevel) : 0, - manufacturer: isSet(object.manufacturer) - ? Number(object.manufacturer) - : 0, - model: isSet(object.model) ? Number(object.model) : 0, - name: isSet(object.name) ? String(object.name) : "", - searchCode: isSet(object.searchCode) ? String(object.searchCode) : "", - lastPlayedPlaceId: isSet(object.lastPlayedPlaceId) - ? String(object.lastPlayedPlaceId) - : "", - limit: isSet(object.limit) ? Number(object.limit) : 0, - }; - }, - - toJSON(message: CarSummaryQuery): unknown { - const obj: any = {}; - message.regionId !== undefined && - (obj.regionId = Math.round(message.regionId)); - message.ghostLevel !== undefined && - (obj.ghostLevel = Math.round(message.ghostLevel)); - message.manufacturer !== undefined && - (obj.manufacturer = Math.round(message.manufacturer)); - message.model !== undefined && (obj.model = Math.round(message.model)); - message.name !== undefined && (obj.name = message.name); - message.searchCode !== undefined && (obj.searchCode = message.searchCode); - message.lastPlayedPlaceId !== undefined && - (obj.lastPlayedPlaceId = message.lastPlayedPlaceId); - message.limit !== undefined && (obj.limit = Math.round(message.limit)); - return obj; - }, - - fromPartial, I>>( - object: I - ): CarSummaryQuery { - const message = createBaseCarSummaryQuery(); - message.regionId = object.regionId ?? 0; - message.ghostLevel = object.ghostLevel ?? 0; - message.manufacturer = object.manufacturer ?? 0; - message.model = object.model ?? 0; - message.name = object.name ?? ""; - message.searchCode = object.searchCode ?? ""; - message.lastPlayedPlaceId = object.lastPlayedPlaceId ?? ""; - message.limit = object.limit ?? 0; - return message; - }, -}; - -function createBaseFileListQuery(): FileListQuery { - return {}; -} - -export const FileListQuery = { - encode( - _: FileListQuery, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FileListQuery { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileListQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): FileListQuery { - return {}; - }, - - toJSON(_: FileListQuery): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial, I>>( - _: I - ): FileListQuery { - const message = createBaseFileListQuery(); - return message; - }, -}; - -function createBaseGhostCompetitionTargetQuery(): GhostCompetitionTargetQuery { - return { competitionId: 0, periodId: 0 }; -} - -export const GhostCompetitionTargetQuery = { - encode( - message: GhostCompetitionTargetQuery, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.competitionId !== 0) { - writer.uint32(8).uint32(message.competitionId); - } - if (message.periodId !== 0) { - writer.uint32(16).uint32(message.periodId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GhostCompetitionTargetQuery { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGhostCompetitionTargetQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.competitionId = reader.uint32(); - break; - case 2: - message.periodId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GhostCompetitionTargetQuery { - return { - competitionId: isSet(object.competitionId) - ? Number(object.competitionId) - : 0, - periodId: isSet(object.periodId) ? Number(object.periodId) : 0, - }; - }, - - toJSON(message: GhostCompetitionTargetQuery): unknown { - const obj: any = {}; - message.competitionId !== undefined && - (obj.competitionId = Math.round(message.competitionId)); - message.periodId !== undefined && - (obj.periodId = Math.round(message.periodId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): GhostCompetitionTargetQuery { - const message = createBaseGhostCompetitionTargetQuery(); - message.competitionId = object.competitionId ?? 0; - message.periodId = object.periodId ?? 0; - return message; - }, -}; - -function createBaseLockCrownRequest(): LockCrownRequest { - return { carId: 0, area: 0, lockTime: 0 }; -} - -export const LockCrownRequest = { - encode( - message: LockCrownRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.area !== 0) { - writer.uint32(16).uint32(message.area); - } - if (message.lockTime !== 0) { - writer.uint32(24).uint32(message.lockTime); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): LockCrownRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLockCrownRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.area = reader.uint32(); - break; - case 3: - message.lockTime = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LockCrownRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - area: isSet(object.area) ? Number(object.area) : 0, - lockTime: isSet(object.lockTime) ? Number(object.lockTime) : 0, - }; - }, - - toJSON(message: LockCrownRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.area !== undefined && (obj.area = Math.round(message.area)); - message.lockTime !== undefined && - (obj.lockTime = Math.round(message.lockTime)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LockCrownRequest { - const message = createBaseLockCrownRequest(); - message.carId = object.carId ?? 0; - message.area = object.area ?? 0; - message.lockTime = object.lockTime ?? 0; - return message; - }, -}; - -function createBaseLockCrownResponse(): LockCrownResponse { - return { error: 0 }; -} - -export const LockCrownResponse = { - encode( - message: LockCrownResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): LockCrownResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLockCrownResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LockCrownResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: LockCrownResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LockCrownResponse { - const message = createBaseLockCrownResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseCrown(): Crown { - return { carId: 0, area: 0, unlockAt: 0, car: undefined }; -} - -export const Crown = { - encode(message: Crown, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.area !== 0) { - writer.uint32(16).uint32(message.area); - } - if (message.unlockAt !== 0) { - writer.uint32(24).uint32(message.unlockAt); - } - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Crown { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCrown(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.area = reader.uint32(); - break; - case 3: - message.unlockAt = reader.uint32(); - break; - case 4: - message.car = Car.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Crown { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - area: isSet(object.area) ? Number(object.area) : 0, - unlockAt: isSet(object.unlockAt) ? Number(object.unlockAt) : 0, - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - }; - }, - - toJSON(message: Crown): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.area !== undefined && (obj.area = Math.round(message.area)); - message.unlockAt !== undefined && - (obj.unlockAt = Math.round(message.unlockAt)); - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - return obj; - }, - - fromPartial, I>>(object: I): Crown { - const message = createBaseCrown(); - message.carId = object.carId ?? 0; - message.area = object.area ?? 0; - message.unlockAt = object.unlockAt ?? 0; - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - return message; - }, -}; - -function createBaseCrownListQuery(): CrownListQuery { - return { carId: 0, area: 0 }; -} - -export const CrownListQuery = { - encode( - message: CrownListQuery, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.area !== 0) { - writer.uint32(16).uint32(message.area); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CrownListQuery { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCrownListQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.area = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CrownListQuery { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - area: isSet(object.area) ? Number(object.area) : 0, - }; - }, - - toJSON(message: CrownListQuery): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.area !== undefined && (obj.area = Math.round(message.area)); - return obj; - }, - - fromPartial, I>>( - object: I - ): CrownListQuery { - const message = createBaseCrownListQuery(); - message.carId = object.carId ?? 0; - message.area = object.area ?? 0; - return message; - }, -}; - -function createBaseCrownList(): CrownList { - return { crowns: [] }; -} - -export const CrownList = { - encode( - message: CrownList, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - for (const v of message.crowns) { - Crown.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CrownList { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCrownList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.crowns.push(Crown.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CrownList { - return { - crowns: Array.isArray(object?.crowns) - ? object.crowns.map((e: any) => Crown.fromJSON(e)) - : [], - }; - }, - - toJSON(message: CrownList): unknown { - const obj: any = {}; - if (message.crowns) { - obj.crowns = message.crowns.map((e) => (e ? Crown.toJSON(e) : undefined)); - } else { - obj.crowns = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): CrownList { - const message = createBaseCrownList(); - message.crowns = object.crowns?.map((e) => Crown.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseRankingQuery(): RankingQuery { - return { rankingType: 0 }; -} - -export const RankingQuery = { - encode( - message: RankingQuery, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.rankingType !== 0) { - writer.uint32(8).int32(message.rankingType); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): RankingQuery { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRankingQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rankingType = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RankingQuery { - return { - rankingType: isSet(object.rankingType) - ? rankingTypeFromJSON(object.rankingType) - : 0, - }; - }, - - toJSON(message: RankingQuery): unknown { - const obj: any = {}; - message.rankingType !== undefined && - (obj.rankingType = rankingTypeToJSON(message.rankingType)); - return obj; - }, - - fromPartial, I>>( - object: I - ): RankingQuery { - const message = createBaseRankingQuery(); - message.rankingType = object.rankingType ?? 0; - return message; - }, -}; - -function createBaseRanking(): Ranking { - return { lists: [] }; -} - -export const Ranking = { - encode( - message: Ranking, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - for (const v of message.lists) { - Ranking_List.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Ranking { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRanking(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lists.push(Ranking_List.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Ranking { - return { - lists: Array.isArray(object?.lists) - ? object.lists.map((e: any) => Ranking_List.fromJSON(e)) - : [], - }; - }, - - toJSON(message: Ranking): unknown { - const obj: any = {}; - if (message.lists) { - obj.lists = message.lists.map((e) => - e ? Ranking_List.toJSON(e) : undefined - ); - } else { - obj.lists = []; - } - return obj; - }, - - fromPartial, I>>(object: I): Ranking { - const message = createBaseRanking(); - message.lists = object.lists?.map((e) => Ranking_List.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseRanking_List(): Ranking_List { - return { rankingType: 0, topRecords: [] }; -} - -export const Ranking_List = { - encode( - message: Ranking_List, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.rankingType !== 0) { - writer.uint32(8).int32(message.rankingType); - } - for (const v of message.topRecords) { - Ranking_Entry.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Ranking_List { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRanking_List(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rankingType = reader.int32() as any; - break; - case 2: - message.topRecords.push( - Ranking_Entry.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Ranking_List { - return { - rankingType: isSet(object.rankingType) - ? rankingTypeFromJSON(object.rankingType) - : 0, - topRecords: Array.isArray(object?.topRecords) - ? object.topRecords.map((e: any) => Ranking_Entry.fromJSON(e)) - : [], - }; - }, - - toJSON(message: Ranking_List): unknown { - const obj: any = {}; - message.rankingType !== undefined && - (obj.rankingType = rankingTypeToJSON(message.rankingType)); - if (message.topRecords) { - obj.topRecords = message.topRecords.map((e) => - e ? Ranking_Entry.toJSON(e) : undefined - ); - } else { - obj.topRecords = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): Ranking_List { - const message = createBaseRanking_List(); - message.rankingType = object.rankingType ?? 0; - message.topRecords = - object.topRecords?.map((e) => Ranking_Entry.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseRanking_Entry(): Ranking_Entry { - return { - rank: 0, - result: 0, - carId: 0, - name: "", - regionId: 0, - model: 0, - visualModel: 0, - defaultColor: 0, - tunePower: 0, - tuneHandling: 0, - title: "", - level: 0, - }; -} - -export const Ranking_Entry = { - encode( - message: Ranking_Entry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.rank !== 0) { - writer.uint32(8).uint32(message.rank); - } - if (message.result !== 0) { - writer.uint32(16).uint32(message.result); - } - if (message.carId !== 0) { - writer.uint32(24).uint32(message.carId); - } - if (message.name !== "") { - writer.uint32(34).string(message.name); - } - if (message.regionId !== 0) { - writer.uint32(40).uint32(message.regionId); - } - if (message.model !== 0) { - writer.uint32(48).uint32(message.model); - } - if (message.visualModel !== 0) { - writer.uint32(56).uint32(message.visualModel); - } - if (message.defaultColor !== 0) { - writer.uint32(64).uint32(message.defaultColor); - } - if (message.tunePower !== 0) { - writer.uint32(72).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(80).uint32(message.tuneHandling); - } - if (message.title !== "") { - writer.uint32(90).string(message.title); - } - if (message.level !== 0) { - writer.uint32(96).uint32(message.level); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Ranking_Entry { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRanking_Entry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rank = reader.uint32(); - break; - case 2: - message.result = reader.uint32(); - break; - case 3: - message.carId = reader.uint32(); - break; - case 4: - message.name = reader.string(); - break; - case 5: - message.regionId = reader.uint32(); - break; - case 6: - message.model = reader.uint32(); - break; - case 7: - message.visualModel = reader.uint32(); - break; - case 8: - message.defaultColor = reader.uint32(); - break; - case 9: - message.tunePower = reader.uint32(); - break; - case 10: - message.tuneHandling = reader.uint32(); - break; - case 11: - message.title = reader.string(); - break; - case 12: - message.level = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Ranking_Entry { - return { - rank: isSet(object.rank) ? Number(object.rank) : 0, - result: isSet(object.result) ? Number(object.result) : 0, - carId: isSet(object.carId) ? Number(object.carId) : 0, - name: isSet(object.name) ? String(object.name) : "", - regionId: isSet(object.regionId) ? Number(object.regionId) : 0, - model: isSet(object.model) ? Number(object.model) : 0, - visualModel: isSet(object.visualModel) ? Number(object.visualModel) : 0, - defaultColor: isSet(object.defaultColor) - ? Number(object.defaultColor) - : 0, - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - title: isSet(object.title) ? String(object.title) : "", - level: isSet(object.level) ? Number(object.level) : 0, - }; - }, - - toJSON(message: Ranking_Entry): unknown { - const obj: any = {}; - message.rank !== undefined && (obj.rank = Math.round(message.rank)); - message.result !== undefined && (obj.result = Math.round(message.result)); - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.name !== undefined && (obj.name = message.name); - message.regionId !== undefined && - (obj.regionId = Math.round(message.regionId)); - message.model !== undefined && (obj.model = Math.round(message.model)); - message.visualModel !== undefined && - (obj.visualModel = Math.round(message.visualModel)); - message.defaultColor !== undefined && - (obj.defaultColor = Math.round(message.defaultColor)); - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.title !== undefined && (obj.title = message.title); - message.level !== undefined && (obj.level = Math.round(message.level)); - return obj; - }, - - fromPartial, I>>( - object: I - ): Ranking_Entry { - const message = createBaseRanking_Entry(); - message.rank = object.rank ?? 0; - message.result = object.result ?? 0; - message.carId = object.carId ?? 0; - message.name = object.name ?? ""; - message.regionId = object.regionId ?? 0; - message.model = object.model ?? 0; - message.visualModel = object.visualModel ?? 0; - message.defaultColor = object.defaultColor ?? 0; - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.title = object.title ?? ""; - message.level = object.level ?? 0; - return message; - }, -}; - -export interface Rpc { - register_system_info( - request: RegisterSystemInfoRequest - ): Promise; - register_system_stats( - request: RegisterSystemStatsRequest - ): Promise; - register_ghost_trail( - request: RegisterGhostTrailRequest - ): Promise; - load_user(request: LoadUserRequest): Promise; - update_user_session( - request: UpdateUserSessionRequest - ): Promise; - load_drive_information( - request: LoadDriveInformationRequest - ): Promise; - load_car(request: LoadCarRequest): Promise; - create_car(request: CreateCarRequest): Promise; - load_game_history( - request: LoadGameHistoryRequest - ): Promise; - update_car(request: UpdateCarRequest): Promise; - save_game_result( - request: SaveGameResultRequest - ): Promise; - save_charge(request: SaveChargeRequest): Promise; - load_ghost_battle_info( - request: LoadGhostBattleInfoRequest - ): Promise; - load_stamp_target( - request: LoadStampTargetRequest - ): Promise; - lock_stamp_target( - request: LockStampTargetRequest - ): Promise; - load_ghost_competition_info( - request: LoadGhostCompetitionInfoRequest - ): Promise; - load_time_attack_record( - request: LoadTimeAttackRecordRequest - ): Promise; - save_terminal_result( - request: SaveTerminalResultRequest - ): Promise; - ping(request: PingRequest): Promise; - load_terminal_information( - request: LoadTerminalInformationRequest - ): Promise; - create_user(request: CreateUserRequest): Promise; - ask_access_code( - request: AskAccessCodeRequest - ): Promise; - register_opponent_ghost( - request: RegisterOpponentGhostRequest - ): Promise; - load_bookmarks(request: LoadBookmarksRequest): Promise; - save_bookmarks(request: SaveBookmarksRequest): Promise; - grant_car_right( - request: GrantCarRightRequest - ): Promise; - load_ghost_competition_ranking( - request: LoadGhostCompetitionRankingRequest - ): Promise; - load_unreceived_user_items( - request: LoadUnreceivedUserItemsRequest - ): Promise; - start_transfer(request: StartTransferRequest): Promise; - save_screenshot( - request: SaveScreenshotRequest - ): Promise; - load_scratch_information( - request: LoadScratchInformationRequest - ): Promise; - save_scratch_sheet( - request: SaveScratchSheetRequest - ): Promise; - turn_scratch_sheet( - request: TurnScratchSheetRequest - ): Promise; - check_item_receivable_cars( - request: CheckItemReceivableCarsRequest - ): Promise; - receive_user_items( - request: ReceiveUserItemsRequest - ): Promise; - update_event_mode_serial( - request: UpdateEventModeSerialRequest - ): Promise; - consume_user_item( - request: ConsumeUserItemRequest - ): Promise; - search_cars_by_level( - request: SearchCarsByLevelRequest - ): Promise; - load_paths_and_tunings( - request: LoadPathsAndTuningsRequest - ): Promise; - load_ghost_drive_data( - request: LoadGhostDriveDataRequest - ): Promise; - participate_in_invite_friend_campaign( - request: ParticipateInInviteFriendCampaignRequest - ): Promise; - lock_crown(request: LockCrownRequest): Promise; - submit_client_log( - request: SubmitClientLogRequest - ): Promise; -} - -export class RpcClientImpl implements Rpc { - private readonly rpc: _Rpc; - constructor(rpc: _Rpc) { - this.rpc = rpc; - this.register_system_info = this.register_system_info.bind(this); - this.register_system_stats = this.register_system_stats.bind(this); - this.register_ghost_trail = this.register_ghost_trail.bind(this); - this.load_user = this.load_user.bind(this); - this.update_user_session = this.update_user_session.bind(this); - this.load_drive_information = this.load_drive_information.bind(this); - this.load_car = this.load_car.bind(this); - this.create_car = this.create_car.bind(this); - this.load_game_history = this.load_game_history.bind(this); - this.update_car = this.update_car.bind(this); - this.save_game_result = this.save_game_result.bind(this); - this.save_charge = this.save_charge.bind(this); - this.load_ghost_battle_info = this.load_ghost_battle_info.bind(this); - this.load_stamp_target = this.load_stamp_target.bind(this); - this.lock_stamp_target = this.lock_stamp_target.bind(this); - this.load_ghost_competition_info = - this.load_ghost_competition_info.bind(this); - this.load_time_attack_record = this.load_time_attack_record.bind(this); - this.save_terminal_result = this.save_terminal_result.bind(this); - this.ping = this.ping.bind(this); - this.load_terminal_information = this.load_terminal_information.bind(this); - this.create_user = this.create_user.bind(this); - this.ask_access_code = this.ask_access_code.bind(this); - this.register_opponent_ghost = this.register_opponent_ghost.bind(this); - this.load_bookmarks = this.load_bookmarks.bind(this); - this.save_bookmarks = this.save_bookmarks.bind(this); - this.grant_car_right = this.grant_car_right.bind(this); - this.load_ghost_competition_ranking = - this.load_ghost_competition_ranking.bind(this); - this.load_unreceived_user_items = - this.load_unreceived_user_items.bind(this); - this.start_transfer = this.start_transfer.bind(this); - this.save_screenshot = this.save_screenshot.bind(this); - this.load_scratch_information = this.load_scratch_information.bind(this); - this.save_scratch_sheet = this.save_scratch_sheet.bind(this); - this.turn_scratch_sheet = this.turn_scratch_sheet.bind(this); - this.check_item_receivable_cars = - this.check_item_receivable_cars.bind(this); - this.receive_user_items = this.receive_user_items.bind(this); - this.update_event_mode_serial = this.update_event_mode_serial.bind(this); - this.consume_user_item = this.consume_user_item.bind(this); - this.search_cars_by_level = this.search_cars_by_level.bind(this); - this.load_paths_and_tunings = this.load_paths_and_tunings.bind(this); - this.load_ghost_drive_data = this.load_ghost_drive_data.bind(this); - this.participate_in_invite_friend_campaign = - this.participate_in_invite_friend_campaign.bind(this); - this.lock_crown = this.lock_crown.bind(this); - this.submit_client_log = this.submit_client_log.bind(this); - } - register_system_info( - request: RegisterSystemInfoRequest - ): Promise { - const data = RegisterSystemInfoRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "register_system_info", - data - ); - return promise.then((data) => - RegisterSystemInfoResponse.decode(new _m0.Reader(data)) - ); - } - - register_system_stats( - request: RegisterSystemStatsRequest - ): Promise { - const data = RegisterSystemStatsRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "register_system_stats", - data - ); - return promise.then((data) => - RegisterSystemStatsResponse.decode(new _m0.Reader(data)) - ); - } - - register_ghost_trail( - request: RegisterGhostTrailRequest - ): Promise { - const data = RegisterGhostTrailRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "register_ghost_trail", - data - ); - return promise.then((data) => - RegisterGhostTrailResponse.decode(new _m0.Reader(data)) - ); - } - - load_user(request: LoadUserRequest): Promise { - const data = LoadUserRequest.encode(request).finish(); - const promise = this.rpc.request("wm.protobuf.Rpc", "load_user", data); - return promise.then((data) => - LoadUserResponse.decode(new _m0.Reader(data)) - ); - } - - update_user_session( - request: UpdateUserSessionRequest - ): Promise { - const data = UpdateUserSessionRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "update_user_session", - data - ); - return promise.then((data) => - UpdateUserSessionResponse.decode(new _m0.Reader(data)) - ); - } - - load_drive_information( - request: LoadDriveInformationRequest - ): Promise { - const data = LoadDriveInformationRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "load_drive_information", - data - ); - return promise.then((data) => - LoadDriveInformationResponse.decode(new _m0.Reader(data)) - ); - } - - load_car(request: LoadCarRequest): Promise { - const data = LoadCarRequest.encode(request).finish(); - const promise = this.rpc.request("wm.protobuf.Rpc", "load_car", data); - return promise.then((data) => LoadCarResponse.decode(new _m0.Reader(data))); - } - - create_car(request: CreateCarRequest): Promise { - const data = CreateCarRequest.encode(request).finish(); - const promise = this.rpc.request("wm.protobuf.Rpc", "create_car", data); - return promise.then((data) => - CreateCarResponse.decode(new _m0.Reader(data)) - ); - } - - load_game_history( - request: LoadGameHistoryRequest - ): Promise { - const data = LoadGameHistoryRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "load_game_history", - data - ); - return promise.then((data) => - LoadGameHistoryResponse.decode(new _m0.Reader(data)) - ); - } - - update_car(request: UpdateCarRequest): Promise { - const data = UpdateCarRequest.encode(request).finish(); - const promise = this.rpc.request("wm.protobuf.Rpc", "update_car", data); - return promise.then((data) => - UpdateCarResponse.decode(new _m0.Reader(data)) - ); - } - - save_game_result( - request: SaveGameResultRequest - ): Promise { - const data = SaveGameResultRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "save_game_result", - data - ); - return promise.then((data) => - SaveGameResultResponse.decode(new _m0.Reader(data)) - ); - } - - save_charge(request: SaveChargeRequest): Promise { - const data = SaveChargeRequest.encode(request).finish(); - const promise = this.rpc.request("wm.protobuf.Rpc", "save_charge", data); - return promise.then((data) => - SaveChargeResponse.decode(new _m0.Reader(data)) - ); - } - - load_ghost_battle_info( - request: LoadGhostBattleInfoRequest - ): Promise { - const data = LoadGhostBattleInfoRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "load_ghost_battle_info", - data - ); - return promise.then((data) => - LoadGhostBattleInfoResponse.decode(new _m0.Reader(data)) - ); - } - - load_stamp_target( - request: LoadStampTargetRequest - ): Promise { - const data = LoadStampTargetRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "load_stamp_target", - data - ); - return promise.then((data) => - LoadStampTargetResponse.decode(new _m0.Reader(data)) - ); - } - - lock_stamp_target( - request: LockStampTargetRequest - ): Promise { - const data = LockStampTargetRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "lock_stamp_target", - data - ); - return promise.then((data) => - LockStampTargetResponse.decode(new _m0.Reader(data)) - ); - } - - load_ghost_competition_info( - request: LoadGhostCompetitionInfoRequest - ): Promise { - const data = LoadGhostCompetitionInfoRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "load_ghost_competition_info", - data - ); - return promise.then((data) => - LoadGhostCompetitionInfoResponse.decode(new _m0.Reader(data)) - ); - } - - load_time_attack_record( - request: LoadTimeAttackRecordRequest - ): Promise { - const data = LoadTimeAttackRecordRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "load_time_attack_record", - data - ); - return promise.then((data) => - LoadTimeAttackRecordResponse.decode(new _m0.Reader(data)) - ); - } - - save_terminal_result( - request: SaveTerminalResultRequest - ): Promise { - const data = SaveTerminalResultRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "save_terminal_result", - data - ); - return promise.then((data) => - SaveTerminalResultResponse.decode(new _m0.Reader(data)) - ); - } - - ping(request: PingRequest): Promise { - const data = PingRequest.encode(request).finish(); - const promise = this.rpc.request("wm.protobuf.Rpc", "ping", data); - return promise.then((data) => PingResponse.decode(new _m0.Reader(data))); - } - - load_terminal_information( - request: LoadTerminalInformationRequest - ): Promise { - const data = LoadTerminalInformationRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "load_terminal_information", - data - ); - return promise.then((data) => - LoadTerminalInformationResponse.decode(new _m0.Reader(data)) - ); - } - - create_user(request: CreateUserRequest): Promise { - const data = CreateUserRequest.encode(request).finish(); - const promise = this.rpc.request("wm.protobuf.Rpc", "create_user", data); - return promise.then((data) => - CreateUserResponse.decode(new _m0.Reader(data)) - ); - } - - ask_access_code( - request: AskAccessCodeRequest - ): Promise { - const data = AskAccessCodeRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "ask_access_code", - data - ); - return promise.then((data) => - AskAccessCodeResponse.decode(new _m0.Reader(data)) - ); - } - - register_opponent_ghost( - request: RegisterOpponentGhostRequest - ): Promise { - const data = RegisterOpponentGhostRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "register_opponent_ghost", - data - ); - return promise.then((data) => - RegisterOpponentGhostResponse.decode(new _m0.Reader(data)) - ); - } - - load_bookmarks( - request: LoadBookmarksRequest - ): Promise { - const data = LoadBookmarksRequest.encode(request).finish(); - const promise = this.rpc.request("wm.protobuf.Rpc", "load_bookmarks", data); - return promise.then((data) => - LoadBookmarksResponse.decode(new _m0.Reader(data)) - ); - } - - save_bookmarks( - request: SaveBookmarksRequest - ): Promise { - const data = SaveBookmarksRequest.encode(request).finish(); - const promise = this.rpc.request("wm.protobuf.Rpc", "save_bookmarks", data); - return promise.then((data) => - SaveBookmarksResponse.decode(new _m0.Reader(data)) - ); - } - - grant_car_right( - request: GrantCarRightRequest - ): Promise { - const data = GrantCarRightRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "grant_car_right", - data - ); - return promise.then((data) => - GrantCarRightResponse.decode(new _m0.Reader(data)) - ); - } - - load_ghost_competition_ranking( - request: LoadGhostCompetitionRankingRequest - ): Promise { - const data = LoadGhostCompetitionRankingRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "load_ghost_competition_ranking", - data - ); - return promise.then((data) => - LoadGhostCompetitionRankingResponse.decode(new _m0.Reader(data)) - ); - } - - load_unreceived_user_items( - request: LoadUnreceivedUserItemsRequest - ): Promise { - const data = LoadUnreceivedUserItemsRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "load_unreceived_user_items", - data - ); - return promise.then((data) => - LoadUnreceivedUserItemsResponse.decode(new _m0.Reader(data)) - ); - } - - start_transfer( - request: StartTransferRequest - ): Promise { - const data = StartTransferRequest.encode(request).finish(); - const promise = this.rpc.request("wm.protobuf.Rpc", "start_transfer", data); - return promise.then((data) => - StartTransferResponse.decode(new _m0.Reader(data)) - ); - } - - save_screenshot( - request: SaveScreenshotRequest - ): Promise { - const data = SaveScreenshotRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "save_screenshot", - data - ); - return promise.then((data) => - SaveScreenshotResponse.decode(new _m0.Reader(data)) - ); - } - - load_scratch_information( - request: LoadScratchInformationRequest - ): Promise { - const data = LoadScratchInformationRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "load_scratch_information", - data - ); - return promise.then((data) => - LoadScratchInformationResponse.decode(new _m0.Reader(data)) - ); - } - - save_scratch_sheet( - request: SaveScratchSheetRequest - ): Promise { - const data = SaveScratchSheetRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "save_scratch_sheet", - data - ); - return promise.then((data) => - SaveScratchSheetResponse.decode(new _m0.Reader(data)) - ); - } - - turn_scratch_sheet( - request: TurnScratchSheetRequest - ): Promise { - const data = TurnScratchSheetRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "turn_scratch_sheet", - data - ); - return promise.then((data) => - TurnScratchSheetResponse.decode(new _m0.Reader(data)) - ); - } - - check_item_receivable_cars( - request: CheckItemReceivableCarsRequest - ): Promise { - const data = CheckItemReceivableCarsRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "check_item_receivable_cars", - data - ); - return promise.then((data) => - CheckItemReceivableCarsResponse.decode(new _m0.Reader(data)) - ); - } - - receive_user_items( - request: ReceiveUserItemsRequest - ): Promise { - const data = ReceiveUserItemsRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "receive_user_items", - data - ); - return promise.then((data) => - ReceiveUserItemsResponse.decode(new _m0.Reader(data)) - ); - } - - update_event_mode_serial( - request: UpdateEventModeSerialRequest - ): Promise { - const data = UpdateEventModeSerialRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "update_event_mode_serial", - data - ); - return promise.then((data) => - UpdateEventModeSerialResponse.decode(new _m0.Reader(data)) - ); - } - - consume_user_item( - request: ConsumeUserItemRequest - ): Promise { - const data = ConsumeUserItemRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "consume_user_item", - data - ); - return promise.then((data) => - ConsumeUserItemResponse.decode(new _m0.Reader(data)) - ); - } - - search_cars_by_level( - request: SearchCarsByLevelRequest - ): Promise { - const data = SearchCarsByLevelRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "search_cars_by_level", - data - ); - return promise.then((data) => - SearchCarsByLevelResponse.decode(new _m0.Reader(data)) - ); - } - - load_paths_and_tunings( - request: LoadPathsAndTuningsRequest - ): Promise { - const data = LoadPathsAndTuningsRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "load_paths_and_tunings", - data - ); - return promise.then((data) => - LoadPathsAndTuningsResponse.decode(new _m0.Reader(data)) - ); - } - - load_ghost_drive_data( - request: LoadGhostDriveDataRequest - ): Promise { - const data = LoadGhostDriveDataRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "load_ghost_drive_data", - data - ); - return promise.then((data) => - LoadGhostDriveDataResponse.decode(new _m0.Reader(data)) - ); - } - - participate_in_invite_friend_campaign( - request: ParticipateInInviteFriendCampaignRequest - ): Promise { - const data = - ParticipateInInviteFriendCampaignRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "participate_in_invite_friend_campaign", - data - ); - return promise.then((data) => - ParticipateInInviteFriendCampaignResponse.decode(new _m0.Reader(data)) - ); - } - - lock_crown(request: LockCrownRequest): Promise { - const data = LockCrownRequest.encode(request).finish(); - const promise = this.rpc.request("wm.protobuf.Rpc", "lock_crown", data); - return promise.then((data) => - LockCrownResponse.decode(new _m0.Reader(data)) - ); - } - - submit_client_log( - request: SubmitClientLogRequest - ): Promise { - const data = SubmitClientLogRequest.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Rpc", - "submit_client_log", - data - ); - return promise.then((data) => - SubmitClientLogResponse.decode(new _m0.Reader(data)) - ); - } -} - -export interface Resource { - ghost_trail(request: GhostTrailQuery): Promise; - place_list(request: PlaceListQuery): Promise; - ghost_list(request: GhostListQuery): Promise; - car_summary(request: CarSummaryQuery): Promise; - file_list(request: FileListQuery): Promise; - ghost_competition_target( - request: GhostCompetitionTargetQuery - ): Promise; - crown_list(request: CrownListQuery): Promise; - ranking(request: RankingQuery): Promise; -} - -export class ResourceClientImpl implements Resource { - private readonly rpc: _Rpc; - constructor(rpc: _Rpc) { - this.rpc = rpc; - this.ghost_trail = this.ghost_trail.bind(this); - this.place_list = this.place_list.bind(this); - this.ghost_list = this.ghost_list.bind(this); - this.car_summary = this.car_summary.bind(this); - this.file_list = this.file_list.bind(this); - this.ghost_competition_target = this.ghost_competition_target.bind(this); - this.crown_list = this.crown_list.bind(this); - this.ranking = this.ranking.bind(this); - } - ghost_trail(request: GhostTrailQuery): Promise { - const data = GhostTrailQuery.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Resource", - "ghost_trail", - data - ); - return promise.then((data) => GhostTrail.decode(new _m0.Reader(data))); - } - - place_list(request: PlaceListQuery): Promise { - const data = PlaceListQuery.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Resource", - "place_list", - data - ); - return promise.then((data) => PlaceList.decode(new _m0.Reader(data))); - } - - ghost_list(request: GhostListQuery): Promise { - const data = GhostListQuery.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Resource", - "ghost_list", - data - ); - return promise.then((data) => GhostList.decode(new _m0.Reader(data))); - } - - car_summary(request: CarSummaryQuery): Promise { - const data = CarSummaryQuery.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Resource", - "car_summary", - data - ); - return promise.then((data) => CarSummary.decode(new _m0.Reader(data))); - } - - file_list(request: FileListQuery): Promise { - const data = FileListQuery.encode(request).finish(); - const promise = this.rpc.request("wm.protobuf.Resource", "file_list", data); - return promise.then((data) => FileList.decode(new _m0.Reader(data))); - } - - ghost_competition_target( - request: GhostCompetitionTargetQuery - ): Promise { - const data = GhostCompetitionTargetQuery.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Resource", - "ghost_competition_target", - data - ); - return promise.then((data) => - GhostCompetitionTarget.decode(new _m0.Reader(data)) - ); - } - - crown_list(request: CrownListQuery): Promise { - const data = CrownListQuery.encode(request).finish(); - const promise = this.rpc.request( - "wm.protobuf.Resource", - "crown_list", - data - ); - return promise.then((data) => CrownList.decode(new _m0.Reader(data))); - } - - ranking(request: RankingQuery): Promise { - const data = RankingQuery.encode(request).finish(); - const promise = this.rpc.request("wm.protobuf.Resource", "ranking", data); - return promise.then((data) => Ranking.decode(new _m0.Reader(data))); - } -} - -interface _Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude>, - never - >; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/proto/system.ts b/src/proto/system.ts deleted file mode 100644 index 786f674..0000000 --- a/src/proto/system.ts +++ /dev/null @@ -1,1085 +0,0 @@ -/* eslint-disable */ -import { GameFeatureVersion } from "./wm"; -import * as _m0 from "protobufjs/minimal"; - -export const protobufPackage = "sys.protobuf"; - -export enum State { - State_None = 0, - State_Checking = 1, - State_NG = 2, - State_OK = 3, - UNRECOGNIZED = -1, -} - -export function stateFromJSON(object: any): State { - switch (object) { - case 0: - case "State_None": - return State.State_None; - case 1: - case "State_Checking": - return State.State_Checking; - case 2: - case "State_NG": - return State.State_NG; - case 3: - case "State_OK": - return State.State_OK; - case -1: - case "UNRECOGNIZED": - default: - return State.UNRECOGNIZED; - } -} - -export function stateToJSON(object: State): string { - switch (object) { - case State.State_None: - return "State_None"; - case State.State_Checking: - return "State_Checking"; - case State.State_NG: - return "State_NG"; - case State.State_OK: - return "State_OK"; - case State.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum BanaCoinPaymentState { - BC_SUCCESS = 0, - BC_SHORTAGE = 1, - BC_BNID_MEMBER_ERROR = 2, - BC_UNKNOWN_ERROR = 3, - BC_BNID_SYSTEM_ERROR = 4, - BC_BNID_VERIFY_ERROR = 5, - BC_BNID_EXECUTE_ERROR = 6, - BC_BNID_SERVER_UNAVAILABLE = 99, - UNRECOGNIZED = -1, -} - -export function banaCoinPaymentStateFromJSON( - object: any -): BanaCoinPaymentState { - switch (object) { - case 0: - case "BC_SUCCESS": - return BanaCoinPaymentState.BC_SUCCESS; - case 1: - case "BC_SHORTAGE": - return BanaCoinPaymentState.BC_SHORTAGE; - case 2: - case "BC_BNID_MEMBER_ERROR": - return BanaCoinPaymentState.BC_BNID_MEMBER_ERROR; - case 3: - case "BC_UNKNOWN_ERROR": - return BanaCoinPaymentState.BC_UNKNOWN_ERROR; - case 4: - case "BC_BNID_SYSTEM_ERROR": - return BanaCoinPaymentState.BC_BNID_SYSTEM_ERROR; - case 5: - case "BC_BNID_VERIFY_ERROR": - return BanaCoinPaymentState.BC_BNID_VERIFY_ERROR; - case 6: - case "BC_BNID_EXECUTE_ERROR": - return BanaCoinPaymentState.BC_BNID_EXECUTE_ERROR; - case 99: - case "BC_BNID_SERVER_UNAVAILABLE": - return BanaCoinPaymentState.BC_BNID_SERVER_UNAVAILABLE; - case -1: - case "UNRECOGNIZED": - default: - return BanaCoinPaymentState.UNRECOGNIZED; - } -} - -export function banaCoinPaymentStateToJSON( - object: BanaCoinPaymentState -): string { - switch (object) { - case BanaCoinPaymentState.BC_SUCCESS: - return "BC_SUCCESS"; - case BanaCoinPaymentState.BC_SHORTAGE: - return "BC_SHORTAGE"; - case BanaCoinPaymentState.BC_BNID_MEMBER_ERROR: - return "BC_BNID_MEMBER_ERROR"; - case BanaCoinPaymentState.BC_UNKNOWN_ERROR: - return "BC_UNKNOWN_ERROR"; - case BanaCoinPaymentState.BC_BNID_SYSTEM_ERROR: - return "BC_BNID_SYSTEM_ERROR"; - case BanaCoinPaymentState.BC_BNID_VERIFY_ERROR: - return "BC_BNID_VERIFY_ERROR"; - case BanaCoinPaymentState.BC_BNID_EXECUTE_ERROR: - return "BC_BNID_EXECUTE_ERROR"; - case BanaCoinPaymentState.BC_BNID_SERVER_UNAVAILABLE: - return "BC_BNID_SERVER_UNAVAILABLE"; - case BanaCoinPaymentState.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export interface Log { - errors: Log_Error[]; -} - -export interface Log_Error { - timestamp: number; - code: number; -} - -export interface BanaCoinPaymentLog { - payments: BanaCoinPaymentLog_Payment[]; -} - -export interface BanaCoinPaymentLog_Payment { - date: number; - contactNumber: string; - state: BanaCoinPaymentState; - cost: number; - accessCode: string; - personId: string; -} - -export interface Operation { - authorizationAt: number; - featureVersion: GameFeatureVersion | undefined; -} - -export interface Status { - state: State; - name: string; - address: number; - value: number; - value2: number; -} - -export interface Command { - sequence: number; - ntp: string; - checkCable: string; - renewDhcp: string; - setDate: number; - syncDate: string; - ping: number[]; - traceRoute: number; - checkPacket: string; - reboot: string; - checkPkg: string; -} - -export interface Reply { - sequence: number; - ntp: Status | undefined; - checkCable: Status | undefined; - renewDhcp: Status | undefined; - setDate: Status | undefined; - syncDate: Status | undefined; - ping: Status[]; - traceRoute: Status | undefined; - checkPacket: Status | undefined; - reboot: Status | undefined; - checkPkg: Status | undefined; -} - -function createBaseLog(): Log { - return { errors: [] }; -} - -export const Log = { - encode(message: Log, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.errors) { - Log_Error.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Log { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLog(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.errors.push(Log_Error.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Log { - return { - errors: Array.isArray(object?.errors) - ? object.errors.map((e: any) => Log_Error.fromJSON(e)) - : [], - }; - }, - - toJSON(message: Log): unknown { - const obj: any = {}; - if (message.errors) { - obj.errors = message.errors.map((e) => - e ? Log_Error.toJSON(e) : undefined - ); - } else { - obj.errors = []; - } - return obj; - }, - - fromPartial, I>>(object: I): Log { - const message = createBaseLog(); - message.errors = object.errors?.map((e) => Log_Error.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseLog_Error(): Log_Error { - return { timestamp: 0, code: 0 }; -} - -export const Log_Error = { - encode( - message: Log_Error, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.timestamp !== 0) { - writer.uint32(8).uint32(message.timestamp); - } - if (message.code !== 0) { - writer.uint32(16).uint32(message.code); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Log_Error { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLog_Error(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timestamp = reader.uint32(); - break; - case 2: - message.code = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Log_Error { - return { - timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0, - code: isSet(object.code) ? Number(object.code) : 0, - }; - }, - - toJSON(message: Log_Error): unknown { - const obj: any = {}; - message.timestamp !== undefined && - (obj.timestamp = Math.round(message.timestamp)); - message.code !== undefined && (obj.code = Math.round(message.code)); - return obj; - }, - - fromPartial, I>>( - object: I - ): Log_Error { - const message = createBaseLog_Error(); - message.timestamp = object.timestamp ?? 0; - message.code = object.code ?? 0; - return message; - }, -}; - -function createBaseBanaCoinPaymentLog(): BanaCoinPaymentLog { - return { payments: [] }; -} - -export const BanaCoinPaymentLog = { - encode( - message: BanaCoinPaymentLog, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - for (const v of message.payments) { - BanaCoinPaymentLog_Payment.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): BanaCoinPaymentLog { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBanaCoinPaymentLog(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.payments.push( - BanaCoinPaymentLog_Payment.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BanaCoinPaymentLog { - return { - payments: Array.isArray(object?.payments) - ? object.payments.map((e: any) => - BanaCoinPaymentLog_Payment.fromJSON(e) - ) - : [], - }; - }, - - toJSON(message: BanaCoinPaymentLog): unknown { - const obj: any = {}; - if (message.payments) { - obj.payments = message.payments.map((e) => - e ? BanaCoinPaymentLog_Payment.toJSON(e) : undefined - ); - } else { - obj.payments = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): BanaCoinPaymentLog { - const message = createBaseBanaCoinPaymentLog(); - message.payments = - object.payments?.map((e) => BanaCoinPaymentLog_Payment.fromPartial(e)) || - []; - return message; - }, -}; - -function createBaseBanaCoinPaymentLog_Payment(): BanaCoinPaymentLog_Payment { - return { - date: 0, - contactNumber: "", - state: 0, - cost: 0, - accessCode: "", - personId: "", - }; -} - -export const BanaCoinPaymentLog_Payment = { - encode( - message: BanaCoinPaymentLog_Payment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.date !== 0) { - writer.uint32(8).uint32(message.date); - } - if (message.contactNumber !== "") { - writer.uint32(18).string(message.contactNumber); - } - if (message.state !== 0) { - writer.uint32(24).int32(message.state); - } - if (message.cost !== 0) { - writer.uint32(32).uint32(message.cost); - } - if (message.accessCode !== "") { - writer.uint32(50).string(message.accessCode); - } - if (message.personId !== "") { - writer.uint32(58).string(message.personId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): BanaCoinPaymentLog_Payment { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBanaCoinPaymentLog_Payment(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.date = reader.uint32(); - break; - case 2: - message.contactNumber = reader.string(); - break; - case 3: - message.state = reader.int32() as any; - break; - case 4: - message.cost = reader.uint32(); - break; - case 6: - message.accessCode = reader.string(); - break; - case 7: - message.personId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BanaCoinPaymentLog_Payment { - return { - date: isSet(object.date) ? Number(object.date) : 0, - contactNumber: isSet(object.contactNumber) - ? String(object.contactNumber) - : "", - state: isSet(object.state) - ? banaCoinPaymentStateFromJSON(object.state) - : 0, - cost: isSet(object.cost) ? Number(object.cost) : 0, - accessCode: isSet(object.accessCode) ? String(object.accessCode) : "", - personId: isSet(object.personId) ? String(object.personId) : "", - }; - }, - - toJSON(message: BanaCoinPaymentLog_Payment): unknown { - const obj: any = {}; - message.date !== undefined && (obj.date = Math.round(message.date)); - message.contactNumber !== undefined && - (obj.contactNumber = message.contactNumber); - message.state !== undefined && - (obj.state = banaCoinPaymentStateToJSON(message.state)); - message.cost !== undefined && (obj.cost = Math.round(message.cost)); - message.accessCode !== undefined && (obj.accessCode = message.accessCode); - message.personId !== undefined && (obj.personId = message.personId); - return obj; - }, - - fromPartial, I>>( - object: I - ): BanaCoinPaymentLog_Payment { - const message = createBaseBanaCoinPaymentLog_Payment(); - message.date = object.date ?? 0; - message.contactNumber = object.contactNumber ?? ""; - message.state = object.state ?? 0; - message.cost = object.cost ?? 0; - message.accessCode = object.accessCode ?? ""; - message.personId = object.personId ?? ""; - return message; - }, -}; - -function createBaseOperation(): Operation { - return { authorizationAt: 0, featureVersion: undefined }; -} - -export const Operation = { - encode( - message: Operation, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.authorizationAt !== 0) { - writer.uint32(8).uint32(message.authorizationAt); - } - if (message.featureVersion !== undefined) { - GameFeatureVersion.encode( - message.featureVersion, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Operation { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOperation(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authorizationAt = reader.uint32(); - break; - case 2: - message.featureVersion = GameFeatureVersion.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Operation { - return { - authorizationAt: isSet(object.authorizationAt) - ? Number(object.authorizationAt) - : 0, - featureVersion: isSet(object.featureVersion) - ? GameFeatureVersion.fromJSON(object.featureVersion) - : undefined, - }; - }, - - toJSON(message: Operation): unknown { - const obj: any = {}; - message.authorizationAt !== undefined && - (obj.authorizationAt = Math.round(message.authorizationAt)); - message.featureVersion !== undefined && - (obj.featureVersion = message.featureVersion - ? GameFeatureVersion.toJSON(message.featureVersion) - : undefined); - return obj; - }, - - fromPartial, I>>( - object: I - ): Operation { - const message = createBaseOperation(); - message.authorizationAt = object.authorizationAt ?? 0; - message.featureVersion = - object.featureVersion !== undefined && object.featureVersion !== null - ? GameFeatureVersion.fromPartial(object.featureVersion) - : undefined; - return message; - }, -}; - -function createBaseStatus(): Status { - return { state: 0, name: "", address: 0, value: 0, value2: 0 }; -} - -export const Status = { - encode( - message: Status, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.state !== 0) { - writer.uint32(8).int32(message.state); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.address !== 0) { - writer.uint32(24).uint32(message.address); - } - if (message.value !== 0) { - writer.uint32(32).int32(message.value); - } - if (message.value2 !== 0) { - writer.uint32(40).int32(message.value2); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Status { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStatus(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.state = reader.int32() as any; - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.address = reader.uint32(); - break; - case 4: - message.value = reader.int32(); - break; - case 5: - message.value2 = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Status { - return { - state: isSet(object.state) ? stateFromJSON(object.state) : 0, - name: isSet(object.name) ? String(object.name) : "", - address: isSet(object.address) ? Number(object.address) : 0, - value: isSet(object.value) ? Number(object.value) : 0, - value2: isSet(object.value2) ? Number(object.value2) : 0, - }; - }, - - toJSON(message: Status): unknown { - const obj: any = {}; - message.state !== undefined && (obj.state = stateToJSON(message.state)); - message.name !== undefined && (obj.name = message.name); - message.address !== undefined && - (obj.address = Math.round(message.address)); - message.value !== undefined && (obj.value = Math.round(message.value)); - message.value2 !== undefined && (obj.value2 = Math.round(message.value2)); - return obj; - }, - - fromPartial, I>>(object: I): Status { - const message = createBaseStatus(); - message.state = object.state ?? 0; - message.name = object.name ?? ""; - message.address = object.address ?? 0; - message.value = object.value ?? 0; - message.value2 = object.value2 ?? 0; - return message; - }, -}; - -function createBaseCommand(): Command { - return { - sequence: 0, - ntp: "", - checkCable: "", - renewDhcp: "", - setDate: 0, - syncDate: "", - ping: [], - traceRoute: 0, - checkPacket: "", - reboot: "", - checkPkg: "", - }; -} - -export const Command = { - encode( - message: Command, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.sequence !== 0) { - writer.uint32(8).uint32(message.sequence); - } - if (message.ntp !== "") { - writer.uint32(18).string(message.ntp); - } - if (message.checkCable !== "") { - writer.uint32(26).string(message.checkCable); - } - if (message.renewDhcp !== "") { - writer.uint32(34).string(message.renewDhcp); - } - if (message.setDate !== 0) { - writer.uint32(40).uint32(message.setDate); - } - if (message.syncDate !== "") { - writer.uint32(50).string(message.syncDate); - } - writer.uint32(58).fork(); - for (const v of message.ping) { - writer.uint32(v); - } - writer.ldelim(); - if (message.traceRoute !== 0) { - writer.uint32(64).uint32(message.traceRoute); - } - if (message.checkPacket !== "") { - writer.uint32(74).string(message.checkPacket); - } - if (message.reboot !== "") { - writer.uint32(82).string(message.reboot); - } - if (message.checkPkg !== "") { - writer.uint32(90).string(message.checkPkg); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Command { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCommand(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint32(); - break; - case 2: - message.ntp = reader.string(); - break; - case 3: - message.checkCable = reader.string(); - break; - case 4: - message.renewDhcp = reader.string(); - break; - case 5: - message.setDate = reader.uint32(); - break; - case 6: - message.syncDate = reader.string(); - break; - case 7: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.ping.push(reader.uint32()); - } - } else { - message.ping.push(reader.uint32()); - } - break; - case 8: - message.traceRoute = reader.uint32(); - break; - case 9: - message.checkPacket = reader.string(); - break; - case 10: - message.reboot = reader.string(); - break; - case 11: - message.checkPkg = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Command { - return { - sequence: isSet(object.sequence) ? Number(object.sequence) : 0, - ntp: isSet(object.ntp) ? String(object.ntp) : "", - checkCable: isSet(object.checkCable) ? String(object.checkCable) : "", - renewDhcp: isSet(object.renewDhcp) ? String(object.renewDhcp) : "", - setDate: isSet(object.setDate) ? Number(object.setDate) : 0, - syncDate: isSet(object.syncDate) ? String(object.syncDate) : "", - ping: Array.isArray(object?.ping) - ? object.ping.map((e: any) => Number(e)) - : [], - traceRoute: isSet(object.traceRoute) ? Number(object.traceRoute) : 0, - checkPacket: isSet(object.checkPacket) ? String(object.checkPacket) : "", - reboot: isSet(object.reboot) ? String(object.reboot) : "", - checkPkg: isSet(object.checkPkg) ? String(object.checkPkg) : "", - }; - }, - - toJSON(message: Command): unknown { - const obj: any = {}; - message.sequence !== undefined && - (obj.sequence = Math.round(message.sequence)); - message.ntp !== undefined && (obj.ntp = message.ntp); - message.checkCable !== undefined && (obj.checkCable = message.checkCable); - message.renewDhcp !== undefined && (obj.renewDhcp = message.renewDhcp); - message.setDate !== undefined && - (obj.setDate = Math.round(message.setDate)); - message.syncDate !== undefined && (obj.syncDate = message.syncDate); - if (message.ping) { - obj.ping = message.ping.map((e) => Math.round(e)); - } else { - obj.ping = []; - } - message.traceRoute !== undefined && - (obj.traceRoute = Math.round(message.traceRoute)); - message.checkPacket !== undefined && - (obj.checkPacket = message.checkPacket); - message.reboot !== undefined && (obj.reboot = message.reboot); - message.checkPkg !== undefined && (obj.checkPkg = message.checkPkg); - return obj; - }, - - fromPartial, I>>(object: I): Command { - const message = createBaseCommand(); - message.sequence = object.sequence ?? 0; - message.ntp = object.ntp ?? ""; - message.checkCable = object.checkCable ?? ""; - message.renewDhcp = object.renewDhcp ?? ""; - message.setDate = object.setDate ?? 0; - message.syncDate = object.syncDate ?? ""; - message.ping = object.ping?.map((e) => e) || []; - message.traceRoute = object.traceRoute ?? 0; - message.checkPacket = object.checkPacket ?? ""; - message.reboot = object.reboot ?? ""; - message.checkPkg = object.checkPkg ?? ""; - return message; - }, -}; - -function createBaseReply(): Reply { - return { - sequence: 0, - ntp: undefined, - checkCable: undefined, - renewDhcp: undefined, - setDate: undefined, - syncDate: undefined, - ping: [], - traceRoute: undefined, - checkPacket: undefined, - reboot: undefined, - checkPkg: undefined, - }; -} - -export const Reply = { - encode(message: Reply, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.sequence !== 0) { - writer.uint32(8).uint32(message.sequence); - } - if (message.ntp !== undefined) { - Status.encode(message.ntp, writer.uint32(18).fork()).ldelim(); - } - if (message.checkCable !== undefined) { - Status.encode(message.checkCable, writer.uint32(26).fork()).ldelim(); - } - if (message.renewDhcp !== undefined) { - Status.encode(message.renewDhcp, writer.uint32(34).fork()).ldelim(); - } - if (message.setDate !== undefined) { - Status.encode(message.setDate, writer.uint32(42).fork()).ldelim(); - } - if (message.syncDate !== undefined) { - Status.encode(message.syncDate, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.ping) { - Status.encode(v!, writer.uint32(58).fork()).ldelim(); - } - if (message.traceRoute !== undefined) { - Status.encode(message.traceRoute, writer.uint32(66).fork()).ldelim(); - } - if (message.checkPacket !== undefined) { - Status.encode(message.checkPacket, writer.uint32(74).fork()).ldelim(); - } - if (message.reboot !== undefined) { - Status.encode(message.reboot, writer.uint32(82).fork()).ldelim(); - } - if (message.checkPkg !== undefined) { - Status.encode(message.checkPkg, writer.uint32(90).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Reply { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseReply(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint32(); - break; - case 2: - message.ntp = Status.decode(reader, reader.uint32()); - break; - case 3: - message.checkCable = Status.decode(reader, reader.uint32()); - break; - case 4: - message.renewDhcp = Status.decode(reader, reader.uint32()); - break; - case 5: - message.setDate = Status.decode(reader, reader.uint32()); - break; - case 6: - message.syncDate = Status.decode(reader, reader.uint32()); - break; - case 7: - message.ping.push(Status.decode(reader, reader.uint32())); - break; - case 8: - message.traceRoute = Status.decode(reader, reader.uint32()); - break; - case 9: - message.checkPacket = Status.decode(reader, reader.uint32()); - break; - case 10: - message.reboot = Status.decode(reader, reader.uint32()); - break; - case 11: - message.checkPkg = Status.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Reply { - return { - sequence: isSet(object.sequence) ? Number(object.sequence) : 0, - ntp: isSet(object.ntp) ? Status.fromJSON(object.ntp) : undefined, - checkCable: isSet(object.checkCable) - ? Status.fromJSON(object.checkCable) - : undefined, - renewDhcp: isSet(object.renewDhcp) - ? Status.fromJSON(object.renewDhcp) - : undefined, - setDate: isSet(object.setDate) - ? Status.fromJSON(object.setDate) - : undefined, - syncDate: isSet(object.syncDate) - ? Status.fromJSON(object.syncDate) - : undefined, - ping: Array.isArray(object?.ping) - ? object.ping.map((e: any) => Status.fromJSON(e)) - : [], - traceRoute: isSet(object.traceRoute) - ? Status.fromJSON(object.traceRoute) - : undefined, - checkPacket: isSet(object.checkPacket) - ? Status.fromJSON(object.checkPacket) - : undefined, - reboot: isSet(object.reboot) ? Status.fromJSON(object.reboot) : undefined, - checkPkg: isSet(object.checkPkg) - ? Status.fromJSON(object.checkPkg) - : undefined, - }; - }, - - toJSON(message: Reply): unknown { - const obj: any = {}; - message.sequence !== undefined && - (obj.sequence = Math.round(message.sequence)); - message.ntp !== undefined && - (obj.ntp = message.ntp ? Status.toJSON(message.ntp) : undefined); - message.checkCable !== undefined && - (obj.checkCable = message.checkCable - ? Status.toJSON(message.checkCable) - : undefined); - message.renewDhcp !== undefined && - (obj.renewDhcp = message.renewDhcp - ? Status.toJSON(message.renewDhcp) - : undefined); - message.setDate !== undefined && - (obj.setDate = message.setDate - ? Status.toJSON(message.setDate) - : undefined); - message.syncDate !== undefined && - (obj.syncDate = message.syncDate - ? Status.toJSON(message.syncDate) - : undefined); - if (message.ping) { - obj.ping = message.ping.map((e) => (e ? Status.toJSON(e) : undefined)); - } else { - obj.ping = []; - } - message.traceRoute !== undefined && - (obj.traceRoute = message.traceRoute - ? Status.toJSON(message.traceRoute) - : undefined); - message.checkPacket !== undefined && - (obj.checkPacket = message.checkPacket - ? Status.toJSON(message.checkPacket) - : undefined); - message.reboot !== undefined && - (obj.reboot = message.reboot ? Status.toJSON(message.reboot) : undefined); - message.checkPkg !== undefined && - (obj.checkPkg = message.checkPkg - ? Status.toJSON(message.checkPkg) - : undefined); - return obj; - }, - - fromPartial, I>>(object: I): Reply { - const message = createBaseReply(); - message.sequence = object.sequence ?? 0; - message.ntp = - object.ntp !== undefined && object.ntp !== null - ? Status.fromPartial(object.ntp) - : undefined; - message.checkCable = - object.checkCable !== undefined && object.checkCable !== null - ? Status.fromPartial(object.checkCable) - : undefined; - message.renewDhcp = - object.renewDhcp !== undefined && object.renewDhcp !== null - ? Status.fromPartial(object.renewDhcp) - : undefined; - message.setDate = - object.setDate !== undefined && object.setDate !== null - ? Status.fromPartial(object.setDate) - : undefined; - message.syncDate = - object.syncDate !== undefined && object.syncDate !== null - ? Status.fromPartial(object.syncDate) - : undefined; - message.ping = object.ping?.map((e) => Status.fromPartial(e)) || []; - message.traceRoute = - object.traceRoute !== undefined && object.traceRoute !== null - ? Status.fromPartial(object.traceRoute) - : undefined; - message.checkPacket = - object.checkPacket !== undefined && object.checkPacket !== null - ? Status.fromPartial(object.checkPacket) - : undefined; - message.reboot = - object.reboot !== undefined && object.reboot !== null - ? Status.fromPartial(object.reboot) - : undefined; - message.checkPkg = - object.checkPkg !== undefined && object.checkPkg !== null - ? Status.fromPartial(object.checkPkg) - : undefined; - return message; - }, -}; - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude>, - never - >; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/proto/wm.ts b/src/proto/wm.ts deleted file mode 100644 index d31b083..0000000 --- a/src/proto/wm.ts +++ /dev/null @@ -1,19897 +0,0 @@ -/* eslint-disable */ -import Long from "long"; -import * as _m0 from "protobufjs/minimal"; - -export const protobufPackage = "wm.protobuf"; - -export enum SystemConstant { - PROTOBUF_MESSAGE_REVISION = 8053, - UNRECOGNIZED = -1, -} - -export function systemConstantFromJSON(object: any): SystemConstant { - switch (object) { - case 8053: - case "PROTOBUF_MESSAGE_REVISION": - return SystemConstant.PROTOBUF_MESSAGE_REVISION; - case -1: - case "UNRECOGNIZED": - default: - return SystemConstant.UNRECOGNIZED; - } -} - -export function systemConstantToJSON(object: SystemConstant): string { - switch (object) { - case SystemConstant.PROTOBUF_MESSAGE_REVISION: - return "PROTOBUF_MESSAGE_REVISION"; - case SystemConstant.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum ErrorCode { - ERR_SUCCESS = 0, - ERR_REQUEST = 1, - ERR_NOT_FOUND = 2, - ERR_ID_SERVER = 3, - ERR_ID_BANNED = 4, - ERR_USER_LOCKED = 5, - ERR_USER_VERSION = 6, - ERR_NAME_CONFLICTED = 7, - ERR_FORBIDDEN = 9, - ERR_USER_SUCCEEDED = 11, - ERR_BEING_TRANSFERRED = 12, - ERR_SCRATCH_LOCKED = 13, - UNRECOGNIZED = -1, -} - -export function errorCodeFromJSON(object: any): ErrorCode { - switch (object) { - case 0: - case "ERR_SUCCESS": - return ErrorCode.ERR_SUCCESS; - case 1: - case "ERR_REQUEST": - return ErrorCode.ERR_REQUEST; - case 2: - case "ERR_NOT_FOUND": - return ErrorCode.ERR_NOT_FOUND; - case 3: - case "ERR_ID_SERVER": - return ErrorCode.ERR_ID_SERVER; - case 4: - case "ERR_ID_BANNED": - return ErrorCode.ERR_ID_BANNED; - case 5: - case "ERR_USER_LOCKED": - return ErrorCode.ERR_USER_LOCKED; - case 6: - case "ERR_USER_VERSION": - return ErrorCode.ERR_USER_VERSION; - case 7: - case "ERR_NAME_CONFLICTED": - return ErrorCode.ERR_NAME_CONFLICTED; - case 9: - case "ERR_FORBIDDEN": - return ErrorCode.ERR_FORBIDDEN; - case 11: - case "ERR_USER_SUCCEEDED": - return ErrorCode.ERR_USER_SUCCEEDED; - case 12: - case "ERR_BEING_TRANSFERRED": - return ErrorCode.ERR_BEING_TRANSFERRED; - case 13: - case "ERR_SCRATCH_LOCKED": - return ErrorCode.ERR_SCRATCH_LOCKED; - case -1: - case "UNRECOGNIZED": - default: - return ErrorCode.UNRECOGNIZED; - } -} - -export function errorCodeToJSON(object: ErrorCode): string { - switch (object) { - case ErrorCode.ERR_SUCCESS: - return "ERR_SUCCESS"; - case ErrorCode.ERR_REQUEST: - return "ERR_REQUEST"; - case ErrorCode.ERR_NOT_FOUND: - return "ERR_NOT_FOUND"; - case ErrorCode.ERR_ID_SERVER: - return "ERR_ID_SERVER"; - case ErrorCode.ERR_ID_BANNED: - return "ERR_ID_BANNED"; - case ErrorCode.ERR_USER_LOCKED: - return "ERR_USER_LOCKED"; - case ErrorCode.ERR_USER_VERSION: - return "ERR_USER_VERSION"; - case ErrorCode.ERR_NAME_CONFLICTED: - return "ERR_NAME_CONFLICTED"; - case ErrorCode.ERR_FORBIDDEN: - return "ERR_FORBIDDEN"; - case ErrorCode.ERR_USER_SUCCEEDED: - return "ERR_USER_SUCCEEDED"; - case ErrorCode.ERR_BEING_TRANSFERRED: - return "ERR_BEING_TRANSFERRED"; - case ErrorCode.ERR_SCRATCH_LOCKED: - return "ERR_SCRATCH_LOCKED"; - case ErrorCode.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum LineType { - L_UNKNOWN = 0, - L_MOBILE = 1, - L_ISDN = 2, - L_BFLETS = 3, - L_ADSL = 4, - L_WIRED = 5, - UNRECOGNIZED = -1, -} - -export function lineTypeFromJSON(object: any): LineType { - switch (object) { - case 0: - case "L_UNKNOWN": - return LineType.L_UNKNOWN; - case 1: - case "L_MOBILE": - return LineType.L_MOBILE; - case 2: - case "L_ISDN": - return LineType.L_ISDN; - case 3: - case "L_BFLETS": - return LineType.L_BFLETS; - case 4: - case "L_ADSL": - return LineType.L_ADSL; - case 5: - case "L_WIRED": - return LineType.L_WIRED; - case -1: - case "UNRECOGNIZED": - default: - return LineType.UNRECOGNIZED; - } -} - -export function lineTypeToJSON(object: LineType): string { - switch (object) { - case LineType.L_UNKNOWN: - return "L_UNKNOWN"; - case LineType.L_MOBILE: - return "L_MOBILE"; - case LineType.L_ISDN: - return "L_ISDN"; - case LineType.L_BFLETS: - return "L_BFLETS"; - case LineType.L_ADSL: - return "L_ADSL"; - case LineType.L_WIRED: - return "L_WIRED"; - case LineType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum TerminalType { - T_DRIVE = 0, - T_TERMINAL = 1, - UNRECOGNIZED = -1, -} - -export function terminalTypeFromJSON(object: any): TerminalType { - switch (object) { - case 0: - case "T_DRIVE": - return TerminalType.T_DRIVE; - case 1: - case "T_TERMINAL": - return TerminalType.T_TERMINAL; - case -1: - case "UNRECOGNIZED": - default: - return TerminalType.UNRECOGNIZED; - } -} - -export function terminalTypeToJSON(object: TerminalType): string { - switch (object) { - case TerminalType.T_DRIVE: - return "T_DRIVE"; - case TerminalType.T_TERMINAL: - return "T_TERMINAL"; - case TerminalType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum DeviceType { - DEVICE_CARD = 0, - DEVICE_PHONE = 1, - UNRECOGNIZED = -1, -} - -export function deviceTypeFromJSON(object: any): DeviceType { - switch (object) { - case 0: - case "DEVICE_CARD": - return DeviceType.DEVICE_CARD; - case 1: - case "DEVICE_PHONE": - return DeviceType.DEVICE_PHONE; - case -1: - case "UNRECOGNIZED": - default: - return DeviceType.UNRECOGNIZED; - } -} - -export function deviceTypeToJSON(object: DeviceType): string { - switch (object) { - case DeviceType.DEVICE_CARD: - return "DEVICE_CARD"; - case DeviceType.DEVICE_PHONE: - return "DEVICE_PHONE"; - case DeviceType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum ItemCategory { - CAT_CUSTOM_COLOR = 1, - CAT_WHEEL = 2, - CAT_AERO = 3, - CAT_BONNET = 4, - CAT_WING = 5, - CAT_MIRROR = 6, - CAT_NEON = 8, - CAT_TRUNK = 9, - CAT_NUMBER_PLATE = 10, - CAT_GT_WING = 12, - CAT_AURA_MOTIF = 14, - CAT_METER = 15, - CAT_BGM = 16, - CAT_NAME_PLATE = 17, - CAT_NUMBER = 19, - CAT_BGM_TRACK = 22, - CAT_WINDOW_STICKER_FONT = 24, - CAT_WINDOW_DECORATION = 25, - CAT_RIVAL_MARKER = 26, - CAT_STAMP = 27, - CAT_TERMINAL_BACKGROUND = 28, - CAT_CAR_TICKET = 201, - CAT_CONSUMPTION_ITEM = 202, - CAT_CAR_TICKET_FREE = 203, - CAT_AERO_FULLSET = 300, - CAT_AERO_LIMITED = 301, - UNRECOGNIZED = -1, -} - -export function itemCategoryFromJSON(object: any): ItemCategory { - switch (object) { - case 1: - case "CAT_CUSTOM_COLOR": - return ItemCategory.CAT_CUSTOM_COLOR; - case 2: - case "CAT_WHEEL": - return ItemCategory.CAT_WHEEL; - case 3: - case "CAT_AERO": - return ItemCategory.CAT_AERO; - case 4: - case "CAT_BONNET": - return ItemCategory.CAT_BONNET; - case 5: - case "CAT_WING": - return ItemCategory.CAT_WING; - case 6: - case "CAT_MIRROR": - return ItemCategory.CAT_MIRROR; - case 8: - case "CAT_NEON": - return ItemCategory.CAT_NEON; - case 9: - case "CAT_TRUNK": - return ItemCategory.CAT_TRUNK; - case 10: - case "CAT_NUMBER_PLATE": - return ItemCategory.CAT_NUMBER_PLATE; - case 12: - case "CAT_GT_WING": - return ItemCategory.CAT_GT_WING; - case 14: - case "CAT_AURA_MOTIF": - return ItemCategory.CAT_AURA_MOTIF; - case 15: - case "CAT_METER": - return ItemCategory.CAT_METER; - case 16: - case "CAT_BGM": - return ItemCategory.CAT_BGM; - case 17: - case "CAT_NAME_PLATE": - return ItemCategory.CAT_NAME_PLATE; - case 19: - case "CAT_NUMBER": - return ItemCategory.CAT_NUMBER; - case 22: - case "CAT_BGM_TRACK": - return ItemCategory.CAT_BGM_TRACK; - case 24: - case "CAT_WINDOW_STICKER_FONT": - return ItemCategory.CAT_WINDOW_STICKER_FONT; - case 25: - case "CAT_WINDOW_DECORATION": - return ItemCategory.CAT_WINDOW_DECORATION; - case 26: - case "CAT_RIVAL_MARKER": - return ItemCategory.CAT_RIVAL_MARKER; - case 27: - case "CAT_STAMP": - return ItemCategory.CAT_STAMP; - case 28: - case "CAT_TERMINAL_BACKGROUND": - return ItemCategory.CAT_TERMINAL_BACKGROUND; - case 201: - case "CAT_CAR_TICKET": - return ItemCategory.CAT_CAR_TICKET; - case 202: - case "CAT_CONSUMPTION_ITEM": - return ItemCategory.CAT_CONSUMPTION_ITEM; - case 203: - case "CAT_CAR_TICKET_FREE": - return ItemCategory.CAT_CAR_TICKET_FREE; - case 300: - case "CAT_AERO_FULLSET": - return ItemCategory.CAT_AERO_FULLSET; - case 301: - case "CAT_AERO_LIMITED": - return ItemCategory.CAT_AERO_LIMITED; - case -1: - case "UNRECOGNIZED": - default: - return ItemCategory.UNRECOGNIZED; - } -} - -export function itemCategoryToJSON(object: ItemCategory): string { - switch (object) { - case ItemCategory.CAT_CUSTOM_COLOR: - return "CAT_CUSTOM_COLOR"; - case ItemCategory.CAT_WHEEL: - return "CAT_WHEEL"; - case ItemCategory.CAT_AERO: - return "CAT_AERO"; - case ItemCategory.CAT_BONNET: - return "CAT_BONNET"; - case ItemCategory.CAT_WING: - return "CAT_WING"; - case ItemCategory.CAT_MIRROR: - return "CAT_MIRROR"; - case ItemCategory.CAT_NEON: - return "CAT_NEON"; - case ItemCategory.CAT_TRUNK: - return "CAT_TRUNK"; - case ItemCategory.CAT_NUMBER_PLATE: - return "CAT_NUMBER_PLATE"; - case ItemCategory.CAT_GT_WING: - return "CAT_GT_WING"; - case ItemCategory.CAT_AURA_MOTIF: - return "CAT_AURA_MOTIF"; - case ItemCategory.CAT_METER: - return "CAT_METER"; - case ItemCategory.CAT_BGM: - return "CAT_BGM"; - case ItemCategory.CAT_NAME_PLATE: - return "CAT_NAME_PLATE"; - case ItemCategory.CAT_NUMBER: - return "CAT_NUMBER"; - case ItemCategory.CAT_BGM_TRACK: - return "CAT_BGM_TRACK"; - case ItemCategory.CAT_WINDOW_STICKER_FONT: - return "CAT_WINDOW_STICKER_FONT"; - case ItemCategory.CAT_WINDOW_DECORATION: - return "CAT_WINDOW_DECORATION"; - case ItemCategory.CAT_RIVAL_MARKER: - return "CAT_RIVAL_MARKER"; - case ItemCategory.CAT_STAMP: - return "CAT_STAMP"; - case ItemCategory.CAT_TERMINAL_BACKGROUND: - return "CAT_TERMINAL_BACKGROUND"; - case ItemCategory.CAT_CAR_TICKET: - return "CAT_CAR_TICKET"; - case ItemCategory.CAT_CONSUMPTION_ITEM: - return "CAT_CONSUMPTION_ITEM"; - case ItemCategory.CAT_CAR_TICKET_FREE: - return "CAT_CAR_TICKET_FREE"; - case ItemCategory.CAT_AERO_FULLSET: - return "CAT_AERO_FULLSET"; - case ItemCategory.CAT_AERO_LIMITED: - return "CAT_AERO_LIMITED"; - case ItemCategory.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum TutorialType { - TUTORIAL_ID_STORY = 0, - TUTORIAL_ID_TIME_ATTACK = 1, - TUTORIAL_ID_GHOST = 2, - TUTORIAL_ID_GHOST_CHALLENGE = 3, - TUTORIAL_ID_GHOST_LEVEL = 4, - TUTORIAL_ID_UNUSED_5 = 5, - TUTORIAL_ID_GHOST_SEARCH = 6, - TUTORIAL_ID_GHOST_COMPETITION = 7, - TUTORIAL_ID_HP600_CARD = 8, - TUTORIAL_ID_UNUSED_9 = 9, - TUTORIAL_ID_COMPETITION_QUALIFIED = 10, - TUTORIAL_ID_COMPETITION_TERMINAL = 11, - TUTORIAL_ID_COMPETITION_NOTICE = 12, - TUTORIAL_ID_COMPETITION_FINISHED = 13, - TUTORIAL_ID_UNUSED_14 = 14, - TUTORIAL_ID_UNUSED_15 = 15, - TUTORIAL_ID_UNUSED_16 = 16, - TUTORIAL_ID_UNUSED_17 = 17, - TUTORIAL_ID_UNUSED_18 = 18, - TUTORIAL_ID_UNUSED_19 = 19, - TUTORIAL_ID_GHOST_STAMP = 20, - TUTORIAL_ID_GHOST_STAMP_DECLINED = 21, - TUTORIAL_ID_GHOST_STAMP_FRIENDS = 22, - TUTORIAL_ID_TERMINAL_SCRATCH = 23, - TUTORIAL_ID_TURN_SCRATCH_SHEET = 24, - TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN = 25, - TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE = 26, - TUTORIAL_ID_VS_CONTINUE_TICKET = 27, - TUTORIAL_ID_UNUSED_28 = 28, - TUTORIAL_ID_UNUSED_29 = 29, - TUTORIAL_ID_UNUSED_30 = 30, - TUTORIAL_ID_DRESS_UP = 31, - TUTORIAL_ID_MULTI_GHOST = 32, - TUTORIAL_ID_STORY_NEW_FEATURE = 33, - TUTORIAL_ID_GHOST_NEW_FEATURE = 34, - TUTORIAL_ID_GHOST_REGION_MAP = 35, - UNRECOGNIZED = -1, -} - -export function tutorialTypeFromJSON(object: any): TutorialType { - switch (object) { - case 0: - case "TUTORIAL_ID_STORY": - return TutorialType.TUTORIAL_ID_STORY; - case 1: - case "TUTORIAL_ID_TIME_ATTACK": - return TutorialType.TUTORIAL_ID_TIME_ATTACK; - case 2: - case "TUTORIAL_ID_GHOST": - return TutorialType.TUTORIAL_ID_GHOST; - case 3: - case "TUTORIAL_ID_GHOST_CHALLENGE": - return TutorialType.TUTORIAL_ID_GHOST_CHALLENGE; - case 4: - case "TUTORIAL_ID_GHOST_LEVEL": - return TutorialType.TUTORIAL_ID_GHOST_LEVEL; - case 5: - case "TUTORIAL_ID_UNUSED_5": - return TutorialType.TUTORIAL_ID_UNUSED_5; - case 6: - case "TUTORIAL_ID_GHOST_SEARCH": - return TutorialType.TUTORIAL_ID_GHOST_SEARCH; - case 7: - case "TUTORIAL_ID_GHOST_COMPETITION": - return TutorialType.TUTORIAL_ID_GHOST_COMPETITION; - case 8: - case "TUTORIAL_ID_HP600_CARD": - return TutorialType.TUTORIAL_ID_HP600_CARD; - case 9: - case "TUTORIAL_ID_UNUSED_9": - return TutorialType.TUTORIAL_ID_UNUSED_9; - case 10: - case "TUTORIAL_ID_COMPETITION_QUALIFIED": - return TutorialType.TUTORIAL_ID_COMPETITION_QUALIFIED; - case 11: - case "TUTORIAL_ID_COMPETITION_TERMINAL": - return TutorialType.TUTORIAL_ID_COMPETITION_TERMINAL; - case 12: - case "TUTORIAL_ID_COMPETITION_NOTICE": - return TutorialType.TUTORIAL_ID_COMPETITION_NOTICE; - case 13: - case "TUTORIAL_ID_COMPETITION_FINISHED": - return TutorialType.TUTORIAL_ID_COMPETITION_FINISHED; - case 14: - case "TUTORIAL_ID_UNUSED_14": - return TutorialType.TUTORIAL_ID_UNUSED_14; - case 15: - case "TUTORIAL_ID_UNUSED_15": - return TutorialType.TUTORIAL_ID_UNUSED_15; - case 16: - case "TUTORIAL_ID_UNUSED_16": - return TutorialType.TUTORIAL_ID_UNUSED_16; - case 17: - case "TUTORIAL_ID_UNUSED_17": - return TutorialType.TUTORIAL_ID_UNUSED_17; - case 18: - case "TUTORIAL_ID_UNUSED_18": - return TutorialType.TUTORIAL_ID_UNUSED_18; - case 19: - case "TUTORIAL_ID_UNUSED_19": - return TutorialType.TUTORIAL_ID_UNUSED_19; - case 20: - case "TUTORIAL_ID_GHOST_STAMP": - return TutorialType.TUTORIAL_ID_GHOST_STAMP; - case 21: - case "TUTORIAL_ID_GHOST_STAMP_DECLINED": - return TutorialType.TUTORIAL_ID_GHOST_STAMP_DECLINED; - case 22: - case "TUTORIAL_ID_GHOST_STAMP_FRIENDS": - return TutorialType.TUTORIAL_ID_GHOST_STAMP_FRIENDS; - case 23: - case "TUTORIAL_ID_TERMINAL_SCRATCH": - return TutorialType.TUTORIAL_ID_TERMINAL_SCRATCH; - case 24: - case "TUTORIAL_ID_TURN_SCRATCH_SHEET": - return TutorialType.TUTORIAL_ID_TURN_SCRATCH_SHEET; - case 25: - case "TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN": - return TutorialType.TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN; - case 26: - case "TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE": - return TutorialType.TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE; - case 27: - case "TUTORIAL_ID_VS_CONTINUE_TICKET": - return TutorialType.TUTORIAL_ID_VS_CONTINUE_TICKET; - case 28: - case "TUTORIAL_ID_UNUSED_28": - return TutorialType.TUTORIAL_ID_UNUSED_28; - case 29: - case "TUTORIAL_ID_UNUSED_29": - return TutorialType.TUTORIAL_ID_UNUSED_29; - case 30: - case "TUTORIAL_ID_UNUSED_30": - return TutorialType.TUTORIAL_ID_UNUSED_30; - case 31: - case "TUTORIAL_ID_DRESS_UP": - return TutorialType.TUTORIAL_ID_DRESS_UP; - case 32: - case "TUTORIAL_ID_MULTI_GHOST": - return TutorialType.TUTORIAL_ID_MULTI_GHOST; - case 33: - case "TUTORIAL_ID_STORY_NEW_FEATURE": - return TutorialType.TUTORIAL_ID_STORY_NEW_FEATURE; - case 34: - case "TUTORIAL_ID_GHOST_NEW_FEATURE": - return TutorialType.TUTORIAL_ID_GHOST_NEW_FEATURE; - case 35: - case "TUTORIAL_ID_GHOST_REGION_MAP": - return TutorialType.TUTORIAL_ID_GHOST_REGION_MAP; - case -1: - case "UNRECOGNIZED": - default: - return TutorialType.UNRECOGNIZED; - } -} - -export function tutorialTypeToJSON(object: TutorialType): string { - switch (object) { - case TutorialType.TUTORIAL_ID_STORY: - return "TUTORIAL_ID_STORY"; - case TutorialType.TUTORIAL_ID_TIME_ATTACK: - return "TUTORIAL_ID_TIME_ATTACK"; - case TutorialType.TUTORIAL_ID_GHOST: - return "TUTORIAL_ID_GHOST"; - case TutorialType.TUTORIAL_ID_GHOST_CHALLENGE: - return "TUTORIAL_ID_GHOST_CHALLENGE"; - case TutorialType.TUTORIAL_ID_GHOST_LEVEL: - return "TUTORIAL_ID_GHOST_LEVEL"; - case TutorialType.TUTORIAL_ID_UNUSED_5: - return "TUTORIAL_ID_UNUSED_5"; - case TutorialType.TUTORIAL_ID_GHOST_SEARCH: - return "TUTORIAL_ID_GHOST_SEARCH"; - case TutorialType.TUTORIAL_ID_GHOST_COMPETITION: - return "TUTORIAL_ID_GHOST_COMPETITION"; - case TutorialType.TUTORIAL_ID_HP600_CARD: - return "TUTORIAL_ID_HP600_CARD"; - case TutorialType.TUTORIAL_ID_UNUSED_9: - return "TUTORIAL_ID_UNUSED_9"; - case TutorialType.TUTORIAL_ID_COMPETITION_QUALIFIED: - return "TUTORIAL_ID_COMPETITION_QUALIFIED"; - case TutorialType.TUTORIAL_ID_COMPETITION_TERMINAL: - return "TUTORIAL_ID_COMPETITION_TERMINAL"; - case TutorialType.TUTORIAL_ID_COMPETITION_NOTICE: - return "TUTORIAL_ID_COMPETITION_NOTICE"; - case TutorialType.TUTORIAL_ID_COMPETITION_FINISHED: - return "TUTORIAL_ID_COMPETITION_FINISHED"; - case TutorialType.TUTORIAL_ID_UNUSED_14: - return "TUTORIAL_ID_UNUSED_14"; - case TutorialType.TUTORIAL_ID_UNUSED_15: - return "TUTORIAL_ID_UNUSED_15"; - case TutorialType.TUTORIAL_ID_UNUSED_16: - return "TUTORIAL_ID_UNUSED_16"; - case TutorialType.TUTORIAL_ID_UNUSED_17: - return "TUTORIAL_ID_UNUSED_17"; - case TutorialType.TUTORIAL_ID_UNUSED_18: - return "TUTORIAL_ID_UNUSED_18"; - case TutorialType.TUTORIAL_ID_UNUSED_19: - return "TUTORIAL_ID_UNUSED_19"; - case TutorialType.TUTORIAL_ID_GHOST_STAMP: - return "TUTORIAL_ID_GHOST_STAMP"; - case TutorialType.TUTORIAL_ID_GHOST_STAMP_DECLINED: - return "TUTORIAL_ID_GHOST_STAMP_DECLINED"; - case TutorialType.TUTORIAL_ID_GHOST_STAMP_FRIENDS: - return "TUTORIAL_ID_GHOST_STAMP_FRIENDS"; - case TutorialType.TUTORIAL_ID_TERMINAL_SCRATCH: - return "TUTORIAL_ID_TERMINAL_SCRATCH"; - case TutorialType.TUTORIAL_ID_TURN_SCRATCH_SHEET: - return "TUTORIAL_ID_TURN_SCRATCH_SHEET"; - case TutorialType.TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN: - return "TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN"; - case TutorialType.TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE: - return "TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE"; - case TutorialType.TUTORIAL_ID_VS_CONTINUE_TICKET: - return "TUTORIAL_ID_VS_CONTINUE_TICKET"; - case TutorialType.TUTORIAL_ID_UNUSED_28: - return "TUTORIAL_ID_UNUSED_28"; - case TutorialType.TUTORIAL_ID_UNUSED_29: - return "TUTORIAL_ID_UNUSED_29"; - case TutorialType.TUTORIAL_ID_UNUSED_30: - return "TUTORIAL_ID_UNUSED_30"; - case TutorialType.TUTORIAL_ID_DRESS_UP: - return "TUTORIAL_ID_DRESS_UP"; - case TutorialType.TUTORIAL_ID_MULTI_GHOST: - return "TUTORIAL_ID_MULTI_GHOST"; - case TutorialType.TUTORIAL_ID_STORY_NEW_FEATURE: - return "TUTORIAL_ID_STORY_NEW_FEATURE"; - case TutorialType.TUTORIAL_ID_GHOST_NEW_FEATURE: - return "TUTORIAL_ID_GHOST_NEW_FEATURE"; - case TutorialType.TUTORIAL_ID_GHOST_REGION_MAP: - return "TUTORIAL_ID_GHOST_REGION_MAP"; - case TutorialType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum GameMode { - MODE_STORY = 1, - MODE_TIME_ATTACK = 2, - MODE_VS_BATTLE = 3, - MODE_GHOST_BATTLE = 4, - MODE_EVENT = 5, - UNRECOGNIZED = -1, -} - -export function gameModeFromJSON(object: any): GameMode { - switch (object) { - case 1: - case "MODE_STORY": - return GameMode.MODE_STORY; - case 2: - case "MODE_TIME_ATTACK": - return GameMode.MODE_TIME_ATTACK; - case 3: - case "MODE_VS_BATTLE": - return GameMode.MODE_VS_BATTLE; - case 4: - case "MODE_GHOST_BATTLE": - return GameMode.MODE_GHOST_BATTLE; - case 5: - case "MODE_EVENT": - return GameMode.MODE_EVENT; - case -1: - case "UNRECOGNIZED": - default: - return GameMode.UNRECOGNIZED; - } -} - -export function gameModeToJSON(object: GameMode): string { - switch (object) { - case GameMode.MODE_STORY: - return "MODE_STORY"; - case GameMode.MODE_TIME_ATTACK: - return "MODE_TIME_ATTACK"; - case GameMode.MODE_VS_BATTLE: - return "MODE_VS_BATTLE"; - case GameMode.MODE_GHOST_BATTLE: - return "MODE_GHOST_BATTLE"; - case GameMode.MODE_EVENT: - return "MODE_EVENT"; - case GameMode.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum GhostType { - GHOST_NORMAL = 1, - GHOST_PINCH_RUNNER = 2, - GHOST_DEFAULT = 3, - UNRECOGNIZED = -1, -} - -export function ghostTypeFromJSON(object: any): GhostType { - switch (object) { - case 1: - case "GHOST_NORMAL": - return GhostType.GHOST_NORMAL; - case 2: - case "GHOST_PINCH_RUNNER": - return GhostType.GHOST_PINCH_RUNNER; - case 3: - case "GHOST_DEFAULT": - return GhostType.GHOST_DEFAULT; - case -1: - case "UNRECOGNIZED": - default: - return GhostType.UNRECOGNIZED; - } -} - -export function ghostTypeToJSON(object: GhostType): string { - switch (object) { - case GhostType.GHOST_NORMAL: - return "GHOST_NORMAL"; - case GhostType.GHOST_PINCH_RUNNER: - return "GHOST_PINCH_RUNNER"; - case GhostType.GHOST_DEFAULT: - return "GHOST_DEFAULT"; - case GhostType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum GhostSelectionMethod { - GHOST_SEARCH_BY_REGION = 1, - GHOST_SELECT_BY_LEVEL = 2, - GHOST_SELECT_CROWN_MATCH = 3, - GHOST_SELECT_STAMP_MATCH = 4, - GHOST_SELECT_FROM_HISTORY = 5, - GHOST_SEARCH_BY_SHOP = 6, - GHOST_SEARCH_BY_NAME = 7, - GHOST_ACCEPT_CHALLENGER = 8, - GHOST_APPOINTMENT = 9, - GHOST_DEFAULT_OPPONENT = 10, - GHOST_COMPETITION = 11, - GHOST_SELECT_FROM_BOOKMARKS = 12, - UNRECOGNIZED = -1, -} - -export function ghostSelectionMethodFromJSON( - object: any -): GhostSelectionMethod { - switch (object) { - case 1: - case "GHOST_SEARCH_BY_REGION": - return GhostSelectionMethod.GHOST_SEARCH_BY_REGION; - case 2: - case "GHOST_SELECT_BY_LEVEL": - return GhostSelectionMethod.GHOST_SELECT_BY_LEVEL; - case 3: - case "GHOST_SELECT_CROWN_MATCH": - return GhostSelectionMethod.GHOST_SELECT_CROWN_MATCH; - case 4: - case "GHOST_SELECT_STAMP_MATCH": - return GhostSelectionMethod.GHOST_SELECT_STAMP_MATCH; - case 5: - case "GHOST_SELECT_FROM_HISTORY": - return GhostSelectionMethod.GHOST_SELECT_FROM_HISTORY; - case 6: - case "GHOST_SEARCH_BY_SHOP": - return GhostSelectionMethod.GHOST_SEARCH_BY_SHOP; - case 7: - case "GHOST_SEARCH_BY_NAME": - return GhostSelectionMethod.GHOST_SEARCH_BY_NAME; - case 8: - case "GHOST_ACCEPT_CHALLENGER": - return GhostSelectionMethod.GHOST_ACCEPT_CHALLENGER; - case 9: - case "GHOST_APPOINTMENT": - return GhostSelectionMethod.GHOST_APPOINTMENT; - case 10: - case "GHOST_DEFAULT_OPPONENT": - return GhostSelectionMethod.GHOST_DEFAULT_OPPONENT; - case 11: - case "GHOST_COMPETITION": - return GhostSelectionMethod.GHOST_COMPETITION; - case 12: - case "GHOST_SELECT_FROM_BOOKMARKS": - return GhostSelectionMethod.GHOST_SELECT_FROM_BOOKMARKS; - case -1: - case "UNRECOGNIZED": - default: - return GhostSelectionMethod.UNRECOGNIZED; - } -} - -export function ghostSelectionMethodToJSON( - object: GhostSelectionMethod -): string { - switch (object) { - case GhostSelectionMethod.GHOST_SEARCH_BY_REGION: - return "GHOST_SEARCH_BY_REGION"; - case GhostSelectionMethod.GHOST_SELECT_BY_LEVEL: - return "GHOST_SELECT_BY_LEVEL"; - case GhostSelectionMethod.GHOST_SELECT_CROWN_MATCH: - return "GHOST_SELECT_CROWN_MATCH"; - case GhostSelectionMethod.GHOST_SELECT_STAMP_MATCH: - return "GHOST_SELECT_STAMP_MATCH"; - case GhostSelectionMethod.GHOST_SELECT_FROM_HISTORY: - return "GHOST_SELECT_FROM_HISTORY"; - case GhostSelectionMethod.GHOST_SEARCH_BY_SHOP: - return "GHOST_SEARCH_BY_SHOP"; - case GhostSelectionMethod.GHOST_SEARCH_BY_NAME: - return "GHOST_SEARCH_BY_NAME"; - case GhostSelectionMethod.GHOST_ACCEPT_CHALLENGER: - return "GHOST_ACCEPT_CHALLENGER"; - case GhostSelectionMethod.GHOST_APPOINTMENT: - return "GHOST_APPOINTMENT"; - case GhostSelectionMethod.GHOST_DEFAULT_OPPONENT: - return "GHOST_DEFAULT_OPPONENT"; - case GhostSelectionMethod.GHOST_COMPETITION: - return "GHOST_COMPETITION"; - case GhostSelectionMethod.GHOST_SELECT_FROM_BOOKMARKS: - return "GHOST_SELECT_FROM_BOOKMARKS"; - case GhostSelectionMethod.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum GhostRateType { - GHOST_RATE_UNKNOWN = 1, - GHOST_RATE_INVALID = 2, - GHOST_RATE_VALID = 3, - UNRECOGNIZED = -1, -} - -export function ghostRateTypeFromJSON(object: any): GhostRateType { - switch (object) { - case 1: - case "GHOST_RATE_UNKNOWN": - return GhostRateType.GHOST_RATE_UNKNOWN; - case 2: - case "GHOST_RATE_INVALID": - return GhostRateType.GHOST_RATE_INVALID; - case 3: - case "GHOST_RATE_VALID": - return GhostRateType.GHOST_RATE_VALID; - case -1: - case "UNRECOGNIZED": - default: - return GhostRateType.UNRECOGNIZED; - } -} - -export function ghostRateTypeToJSON(object: GhostRateType): string { - switch (object) { - case GhostRateType.GHOST_RATE_UNKNOWN: - return "GHOST_RATE_UNKNOWN"; - case GhostRateType.GHOST_RATE_INVALID: - return "GHOST_RATE_INVALID"; - case GhostRateType.GHOST_RATE_VALID: - return "GHOST_RATE_VALID"; - case GhostRateType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum PathSelectionMethod { - PATH_NEW = 1, - PATH_PLAIN = 2, - PATH_FRIEND = 3, - PATH_NORMAL = 4, - PATH_CHALLENGER = 5, - UNRECOGNIZED = -1, -} - -export function pathSelectionMethodFromJSON(object: any): PathSelectionMethod { - switch (object) { - case 1: - case "PATH_NEW": - return PathSelectionMethod.PATH_NEW; - case 2: - case "PATH_PLAIN": - return PathSelectionMethod.PATH_PLAIN; - case 3: - case "PATH_FRIEND": - return PathSelectionMethod.PATH_FRIEND; - case 4: - case "PATH_NORMAL": - return PathSelectionMethod.PATH_NORMAL; - case 5: - case "PATH_CHALLENGER": - return PathSelectionMethod.PATH_CHALLENGER; - case -1: - case "UNRECOGNIZED": - default: - return PathSelectionMethod.UNRECOGNIZED; - } -} - -export function pathSelectionMethodToJSON(object: PathSelectionMethod): string { - switch (object) { - case PathSelectionMethod.PATH_NEW: - return "PATH_NEW"; - case PathSelectionMethod.PATH_PLAIN: - return "PATH_PLAIN"; - case PathSelectionMethod.PATH_FRIEND: - return "PATH_FRIEND"; - case PathSelectionMethod.PATH_NORMAL: - return "PATH_NORMAL"; - case PathSelectionMethod.PATH_CHALLENGER: - return "PATH_CHALLENGER"; - case PathSelectionMethod.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum NoticeEntry { - NOTICE_UNUSED_1 = 1, - NOTICE_UNUSED_2 = 2, - NOTICE_UNUSED_3 = 3, - NOTICE_UNUSED_4 = 4, - NOTICE_UNUSED_5 = 5, - NOTICE_UNUSED_6 = 6, - NOTICE_UNUSED_7 = 7, - NOTICE_UNUSED_8 = 8, - NOTICE_UNUSED_9 = 9, - NOTICE_UNUSED_10 = 10, - NOTICE_UNUSED_11 = 11, - NOTICE_UNUSED_12 = 12, - UNRECOGNIZED = -1, -} - -export function noticeEntryFromJSON(object: any): NoticeEntry { - switch (object) { - case 1: - case "NOTICE_UNUSED_1": - return NoticeEntry.NOTICE_UNUSED_1; - case 2: - case "NOTICE_UNUSED_2": - return NoticeEntry.NOTICE_UNUSED_2; - case 3: - case "NOTICE_UNUSED_3": - return NoticeEntry.NOTICE_UNUSED_3; - case 4: - case "NOTICE_UNUSED_4": - return NoticeEntry.NOTICE_UNUSED_4; - case 5: - case "NOTICE_UNUSED_5": - return NoticeEntry.NOTICE_UNUSED_5; - case 6: - case "NOTICE_UNUSED_6": - return NoticeEntry.NOTICE_UNUSED_6; - case 7: - case "NOTICE_UNUSED_7": - return NoticeEntry.NOTICE_UNUSED_7; - case 8: - case "NOTICE_UNUSED_8": - return NoticeEntry.NOTICE_UNUSED_8; - case 9: - case "NOTICE_UNUSED_9": - return NoticeEntry.NOTICE_UNUSED_9; - case 10: - case "NOTICE_UNUSED_10": - return NoticeEntry.NOTICE_UNUSED_10; - case 11: - case "NOTICE_UNUSED_11": - return NoticeEntry.NOTICE_UNUSED_11; - case 12: - case "NOTICE_UNUSED_12": - return NoticeEntry.NOTICE_UNUSED_12; - case -1: - case "UNRECOGNIZED": - default: - return NoticeEntry.UNRECOGNIZED; - } -} - -export function noticeEntryToJSON(object: NoticeEntry): string { - switch (object) { - case NoticeEntry.NOTICE_UNUSED_1: - return "NOTICE_UNUSED_1"; - case NoticeEntry.NOTICE_UNUSED_2: - return "NOTICE_UNUSED_2"; - case NoticeEntry.NOTICE_UNUSED_3: - return "NOTICE_UNUSED_3"; - case NoticeEntry.NOTICE_UNUSED_4: - return "NOTICE_UNUSED_4"; - case NoticeEntry.NOTICE_UNUSED_5: - return "NOTICE_UNUSED_5"; - case NoticeEntry.NOTICE_UNUSED_6: - return "NOTICE_UNUSED_6"; - case NoticeEntry.NOTICE_UNUSED_7: - return "NOTICE_UNUSED_7"; - case NoticeEntry.NOTICE_UNUSED_8: - return "NOTICE_UNUSED_8"; - case NoticeEntry.NOTICE_UNUSED_9: - return "NOTICE_UNUSED_9"; - case NoticeEntry.NOTICE_UNUSED_10: - return "NOTICE_UNUSED_10"; - case NoticeEntry.NOTICE_UNUSED_11: - return "NOTICE_UNUSED_11"; - case NoticeEntry.NOTICE_UNUSED_12: - return "NOTICE_UNUSED_12"; - case NoticeEntry.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum FileType { - FILE_PROMOTION_ANNOUNCEMENT = 1, - FILE_FEATURE_ANNOUNCEMENT = 4, - FILE_SPAPP_ANNOUNCEMENT = 6, - UNRECOGNIZED = -1, -} - -export function fileTypeFromJSON(object: any): FileType { - switch (object) { - case 1: - case "FILE_PROMOTION_ANNOUNCEMENT": - return FileType.FILE_PROMOTION_ANNOUNCEMENT; - case 4: - case "FILE_FEATURE_ANNOUNCEMENT": - return FileType.FILE_FEATURE_ANNOUNCEMENT; - case 6: - case "FILE_SPAPP_ANNOUNCEMENT": - return FileType.FILE_SPAPP_ANNOUNCEMENT; - case -1: - case "UNRECOGNIZED": - default: - return FileType.UNRECOGNIZED; - } -} - -export function fileTypeToJSON(object: FileType): string { - switch (object) { - case FileType.FILE_PROMOTION_ANNOUNCEMENT: - return "FILE_PROMOTION_ANNOUNCEMENT"; - case FileType.FILE_FEATURE_ANNOUNCEMENT: - return "FILE_FEATURE_ANNOUNCEMENT"; - case FileType.FILE_SPAPP_ANNOUNCEMENT: - return "FILE_SPAPP_ANNOUNCEMENT"; - case FileType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum GhostCompetitionParticipantState { - COMPETITION_NOT_PARTICIPATED = 1, - COMPETITION_QUALIFIED = 2, - COMPETITION_PARTICIPATED = 3, - COMPETITION_WON = 4, - UNRECOGNIZED = -1, -} - -export function ghostCompetitionParticipantStateFromJSON( - object: any -): GhostCompetitionParticipantState { - switch (object) { - case 1: - case "COMPETITION_NOT_PARTICIPATED": - return GhostCompetitionParticipantState.COMPETITION_NOT_PARTICIPATED; - case 2: - case "COMPETITION_QUALIFIED": - return GhostCompetitionParticipantState.COMPETITION_QUALIFIED; - case 3: - case "COMPETITION_PARTICIPATED": - return GhostCompetitionParticipantState.COMPETITION_PARTICIPATED; - case 4: - case "COMPETITION_WON": - return GhostCompetitionParticipantState.COMPETITION_WON; - case -1: - case "UNRECOGNIZED": - default: - return GhostCompetitionParticipantState.UNRECOGNIZED; - } -} - -export function ghostCompetitionParticipantStateToJSON( - object: GhostCompetitionParticipantState -): string { - switch (object) { - case GhostCompetitionParticipantState.COMPETITION_NOT_PARTICIPATED: - return "COMPETITION_NOT_PARTICIPATED"; - case GhostCompetitionParticipantState.COMPETITION_QUALIFIED: - return "COMPETITION_QUALIFIED"; - case GhostCompetitionParticipantState.COMPETITION_PARTICIPATED: - return "COMPETITION_PARTICIPATED"; - case GhostCompetitionParticipantState.COMPETITION_WON: - return "COMPETITION_WON"; - case GhostCompetitionParticipantState.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum ScreenshotType { - SS_GHOST_BATTLE = 1, - SS_VERSUS_BATTLE = 2, - SS_TERMINAL = 3, - SS_ACQUIRING_VERSUS_STAR = 4, - SS_ACQUIRING_AURA_MOTIF = 5, - SS_GHOST_REGION_MAP = 6, - SS_ACQUIRING_CROWN = 7, - SS_GHOST_COMPETITION_RESULT = 8, - SS_TIME_ATTACK_RESULT = 9, - SS_LEVEL_UP = 10, - UNRECOGNIZED = -1, -} - -export function screenshotTypeFromJSON(object: any): ScreenshotType { - switch (object) { - case 1: - case "SS_GHOST_BATTLE": - return ScreenshotType.SS_GHOST_BATTLE; - case 2: - case "SS_VERSUS_BATTLE": - return ScreenshotType.SS_VERSUS_BATTLE; - case 3: - case "SS_TERMINAL": - return ScreenshotType.SS_TERMINAL; - case 4: - case "SS_ACQUIRING_VERSUS_STAR": - return ScreenshotType.SS_ACQUIRING_VERSUS_STAR; - case 5: - case "SS_ACQUIRING_AURA_MOTIF": - return ScreenshotType.SS_ACQUIRING_AURA_MOTIF; - case 6: - case "SS_GHOST_REGION_MAP": - return ScreenshotType.SS_GHOST_REGION_MAP; - case 7: - case "SS_ACQUIRING_CROWN": - return ScreenshotType.SS_ACQUIRING_CROWN; - case 8: - case "SS_GHOST_COMPETITION_RESULT": - return ScreenshotType.SS_GHOST_COMPETITION_RESULT; - case 9: - case "SS_TIME_ATTACK_RESULT": - return ScreenshotType.SS_TIME_ATTACK_RESULT; - case 10: - case "SS_LEVEL_UP": - return ScreenshotType.SS_LEVEL_UP; - case -1: - case "UNRECOGNIZED": - default: - return ScreenshotType.UNRECOGNIZED; - } -} - -export function screenshotTypeToJSON(object: ScreenshotType): string { - switch (object) { - case ScreenshotType.SS_GHOST_BATTLE: - return "SS_GHOST_BATTLE"; - case ScreenshotType.SS_VERSUS_BATTLE: - return "SS_VERSUS_BATTLE"; - case ScreenshotType.SS_TERMINAL: - return "SS_TERMINAL"; - case ScreenshotType.SS_ACQUIRING_VERSUS_STAR: - return "SS_ACQUIRING_VERSUS_STAR"; - case ScreenshotType.SS_ACQUIRING_AURA_MOTIF: - return "SS_ACQUIRING_AURA_MOTIF"; - case ScreenshotType.SS_GHOST_REGION_MAP: - return "SS_GHOST_REGION_MAP"; - case ScreenshotType.SS_ACQUIRING_CROWN: - return "SS_ACQUIRING_CROWN"; - case ScreenshotType.SS_GHOST_COMPETITION_RESULT: - return "SS_GHOST_COMPETITION_RESULT"; - case ScreenshotType.SS_TIME_ATTACK_RESULT: - return "SS_TIME_ATTACK_RESULT"; - case ScreenshotType.SS_LEVEL_UP: - return "SS_LEVEL_UP"; - case ScreenshotType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum TransferState { - NOT_REGISTERED = 0, - NEW_REGISTRATION = 1, - TRANSFER_REQUIRED = 2, - TRANSFERRING = 3, - TRANSFERRED = 4, - UNRECOGNIZED = -1, -} - -export function transferStateFromJSON(object: any): TransferState { - switch (object) { - case 0: - case "NOT_REGISTERED": - return TransferState.NOT_REGISTERED; - case 1: - case "NEW_REGISTRATION": - return TransferState.NEW_REGISTRATION; - case 2: - case "TRANSFER_REQUIRED": - return TransferState.TRANSFER_REQUIRED; - case 3: - case "TRANSFERRING": - return TransferState.TRANSFERRING; - case 4: - case "TRANSFERRED": - return TransferState.TRANSFERRED; - case -1: - case "UNRECOGNIZED": - default: - return TransferState.UNRECOGNIZED; - } -} - -export function transferStateToJSON(object: TransferState): string { - switch (object) { - case TransferState.NOT_REGISTERED: - return "NOT_REGISTERED"; - case TransferState.NEW_REGISTRATION: - return "NEW_REGISTRATION"; - case TransferState.TRANSFER_REQUIRED: - return "TRANSFER_REQUIRED"; - case TransferState.TRANSFERRING: - return "TRANSFERRING"; - case TransferState.TRANSFERRED: - return "TRANSFERRED"; - case TransferState.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum EventModeSerialErrorCode { - SERIAL_SUCCESS = 0, - SERIAL_ATTEMPT_TO_CHANGE = 1, - SERIAL_NO_INPUT = 2, - SERIAL_INVALID = 3, - SERIAL_EXPIRED = 4, - SERIAL_OTHER_PLACE = 5, - UNRECOGNIZED = -1, -} - -export function eventModeSerialErrorCodeFromJSON( - object: any -): EventModeSerialErrorCode { - switch (object) { - case 0: - case "SERIAL_SUCCESS": - return EventModeSerialErrorCode.SERIAL_SUCCESS; - case 1: - case "SERIAL_ATTEMPT_TO_CHANGE": - return EventModeSerialErrorCode.SERIAL_ATTEMPT_TO_CHANGE; - case 2: - case "SERIAL_NO_INPUT": - return EventModeSerialErrorCode.SERIAL_NO_INPUT; - case 3: - case "SERIAL_INVALID": - return EventModeSerialErrorCode.SERIAL_INVALID; - case 4: - case "SERIAL_EXPIRED": - return EventModeSerialErrorCode.SERIAL_EXPIRED; - case 5: - case "SERIAL_OTHER_PLACE": - return EventModeSerialErrorCode.SERIAL_OTHER_PLACE; - case -1: - case "UNRECOGNIZED": - default: - return EventModeSerialErrorCode.UNRECOGNIZED; - } -} - -export function eventModeSerialErrorCodeToJSON( - object: EventModeSerialErrorCode -): string { - switch (object) { - case EventModeSerialErrorCode.SERIAL_SUCCESS: - return "SERIAL_SUCCESS"; - case EventModeSerialErrorCode.SERIAL_ATTEMPT_TO_CHANGE: - return "SERIAL_ATTEMPT_TO_CHANGE"; - case EventModeSerialErrorCode.SERIAL_NO_INPUT: - return "SERIAL_NO_INPUT"; - case EventModeSerialErrorCode.SERIAL_INVALID: - return "SERIAL_INVALID"; - case EventModeSerialErrorCode.SERIAL_EXPIRED: - return "SERIAL_EXPIRED"; - case EventModeSerialErrorCode.SERIAL_OTHER_PLACE: - return "SERIAL_OTHER_PLACE"; - case EventModeSerialErrorCode.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum ClientLogType { - LOG_LOAD_REPORT = 0, - LOG_ERROR = 1, - UNRECOGNIZED = -1, -} - -export function clientLogTypeFromJSON(object: any): ClientLogType { - switch (object) { - case 0: - case "LOG_LOAD_REPORT": - return ClientLogType.LOG_LOAD_REPORT; - case 1: - case "LOG_ERROR": - return ClientLogType.LOG_ERROR; - case -1: - case "UNRECOGNIZED": - default: - return ClientLogType.UNRECOGNIZED; - } -} - -export function clientLogTypeToJSON(object: ClientLogType): string { - switch (object) { - case ClientLogType.LOG_LOAD_REPORT: - return "LOG_LOAD_REPORT"; - case ClientLogType.LOG_ERROR: - return "LOG_ERROR"; - case ClientLogType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum SmartphoneAppState { - SPAPP_UNREGISTERED = 0, - SPAPP_KTID = 1, - SPAPP_BNID = 2, - UNRECOGNIZED = -1, -} - -export function smartphoneAppStateFromJSON(object: any): SmartphoneAppState { - switch (object) { - case 0: - case "SPAPP_UNREGISTERED": - return SmartphoneAppState.SPAPP_UNREGISTERED; - case 1: - case "SPAPP_KTID": - return SmartphoneAppState.SPAPP_KTID; - case 2: - case "SPAPP_BNID": - return SmartphoneAppState.SPAPP_BNID; - case -1: - case "UNRECOGNIZED": - default: - return SmartphoneAppState.UNRECOGNIZED; - } -} - -export function smartphoneAppStateToJSON(object: SmartphoneAppState): string { - switch (object) { - case SmartphoneAppState.SPAPP_UNREGISTERED: - return "SPAPP_UNREGISTERED"; - case SmartphoneAppState.SPAPP_KTID: - return "SPAPP_KTID"; - case SmartphoneAppState.SPAPP_BNID: - return "SPAPP_BNID"; - case SmartphoneAppState.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export interface RegisterSystemInfoRequest { - pcbSerial: string; - terminalType: TerminalType; - romVersion: number; - country: string; - lineType: LineType; - shopName: string; - shopNickname: string; - allnetPlaceId: number; - allnetRegion0: number; - muchaPlaceId: string; - muchaPrefectureId: number; - regionName0: string; - regionName1: string; - regionName2: string; - regionName3: string; - timezoneOffset: number; - systemSetting: SystemSetting | undefined; - errorLogs: RegisterSystemInfoRequest_ErrorLogEntry[]; -} - -export interface RegisterSystemInfoRequest_ErrorLogEntry { - datetime: number; - message: string; -} - -export interface RegisterSystemInfoResponse { - error: ErrorCode; - regionId: number; - placeId: string; - allowedClientLogTypes: ClientLogType[]; - featureVersion: GameFeatureVersion | undefined; - latestCompetitionId: number; - competitionSchedule: GhostCompetitionSchedule | undefined; - scratchNotes: string | undefined; - inviteFriendCampaignSchedule: InviteFriendCampaignSchedule | undefined; - ghostSelectionMinRedoWait: number; - ghostSelectionMaxRedoWait: number; -} - -export interface RegisterSystemStatsRequest { - pcbSerial: string; - driveStats: RegisterSystemStatsRequest_DriveStats | undefined; - terminalStats: RegisterSystemStatsRequest_TerminalStats | undefined; -} - -export interface RegisterSystemStatsRequest_DriveStats { - operation: number[]; - story: number[]; - versus: number[]; - ghost: number[]; - timeAttack: number[]; - event: number[]; -} - -export interface RegisterSystemStatsRequest_TerminalStats { - operation: number[]; -} - -export interface RegisterSystemStatsResponse { - error: ErrorCode; -} - -export interface RegisterGhostTrailRequest { - ghostSessionId: number; - ghost: GhostCar | undefined; - trail: Buffer; - time: number; - driveData: BinaryData | undefined; - trendBinaryByArea: BinaryData | undefined; - trendBinaryByCar: BinaryData | undefined; - trendBinaryByUser: BinaryData | undefined; -} - -export interface RegisterGhostTrailResponse { - error: ErrorCode; -} - -export interface LoadUserRequest { - cardChipId: string; - accessCode: string; - cardTypeCode: number; - cardRegionCode: number; - device: DeviceType; - userId: number; - romVersion: number; - maxCars: number; - createUser: boolean; -} - -export interface LoadUserResponse { - error: ErrorCode; - unlockAt: number; - accessCode: string; - banapassportAmId: number; - mbid: number; - userId: number; - numOfOwnedCars: number; - cars: Car[]; - carStates: LoadUserResponse_CarState[]; - unusedCarTickets: UserItem[]; - tutorials: boolean[]; - competitionUserState: GhostCompetitionParticipantState; - windowStickerString: string; - windowStickerFont: number; - spappState: SmartphoneAppState; - transferState: TransferState; - totalVsStarCount: number; - totalVsMedalPoint: number; - copiedCar: CopiedCar | undefined; - wasCreatedToday: boolean; - participatedInInviteFriendCampaign: boolean; -} - -export interface LoadUserResponse_CarState { - hasOpponentGhost: boolean; - competitionState: GhostCompetitionParticipantState; - toBeDeleted: boolean; - eventJoined: boolean; - transferred: boolean; - driveLastPlayedAt: number; -} - -export interface UpdateUserSessionRequest { - userId: number; - cardChipId: string; - accessCode: string; - cardTypeCode: number; - cardRegionCode: number; - device: DeviceType; - unlockAt: number; - acceptVs: boolean; -} - -export interface UpdateUserSessionResponse { - error: ErrorCode; -} - -export interface LoadDriveInformationRequest { - userId: number; -} - -export interface LoadDriveInformationResponse { - error: ErrorCode; - noticeWindow: NoticeEntry[]; - noticeWindowMessage: string[]; - transferNotice: TransferNotice | undefined; - restrictedModels: number[]; - announceFeature: boolean; - announceMobile: boolean; - availableTickets: UserItem[]; -} - -export interface LoadCarRequest { - carId: number; - eventMode: boolean; - eventModeSerial: string; -} - -export interface LoadCarResponse { - error: ErrorCode; - car: Car | undefined; - tuningPoint: number; - odometer: number; - playCount: number; - earnedCustomColor: boolean; - setting: CarSetting | undefined; - vsPlayCount: number; - vsBurstCount: number; - vsStarCount: number; - vsStarCountMax: number; - vsCoolOrWild: number; - vsSmoothOrRough: number; - vsTripleStarMedals: number; - vsDoubleStarMedals: number; - vsSingleStarMedals: number; - vsPlainMedals: number; - rgPlayCount: number; - rgWinCount: number; - rgTrophy: number; - rgPreviousVersionPlayCount: number; - rgScore: number; - rgRegionMapScore: number[]; - rgRegions: number[]; - rgStamp: number; - rgAcquireAllCrowns: boolean; - dressupLevel: number; - dressupPoint: number; - stPlayCount: number; - stClearBits: number; - stClearDivCount: number; - stClearCount: number; - stLoseBits: number; - stConsecutiveWins: number; - stConsecutiveWinsMax: number; - stCompleted100Episodes: boolean; - challenger: ChallengerCar | undefined; - challengerReturnCount: number; - numOfChallengers: number; - opponentGhost: GhostCar | undefined; - opponentTrailId: number; - opponentCompetitionId: number; - competitionParameter: GhostCompetitionParameter | undefined; - specialTitles: string[]; - earnedTitles: string[]; - ownedItems: CarItem[]; - auraMotifAutoChange: boolean; - screenshotCount: number; - announceEventModePrize: boolean; - transferred: boolean; - driveLastPlayedAt: number; - insurance: LoadCarResponse_StoryInsurance | undefined; -} - -export interface LoadCarResponse_StoryInsurance { - numOfRemains: number; -} - -export interface CreateCarRequest { - userId: number; - banapassportAmId: number; - cardChipId: string; - accessCode: string; - cardTypeCode: number; - cardRegionCode: number; - device: DeviceType; - car: Car | undefined; - transmission: boolean; - timestamp: number; - userItemId: number; - deletedCarId: number; -} - -export interface CreateCarResponse { - error: ErrorCode; - accessCode: string; - banapassportAmId: number; - mbid: number; - userId: number; - carId: number; - stClearBits: number; - stClearDivCount: number; - stClearCount: number; - stLoseBits: number; - stConsecutiveWins: number; - stConsecutiveWinsMax: number; - fullTunedCarCouponUnreceivableAt: number; -} - -export interface LoadGameHistoryRequest { - carId: number; -} - -export interface LoadGameHistoryResponse { - error: ErrorCode; - taRecords: LoadGameHistoryResponse_TimeAttackRecord[]; - taRankingUpdatedAt: number; - ghostHistory: LoadGameHistoryResponse_GhostBattleRecord[]; - ghostBattleCount: number; - ghostBattleWinCount: number; - stampSheetCount: number; - stampSheet: number[]; -} - -export interface LoadGameHistoryResponse_TimeAttackRecord { - course: number; - time: number; - tunePower: number; - tuneHandling: number; - wholeRank: number; - wholeParticipants: number; - modelRank: number; - modelParticipants: number; -} - -export interface LoadGameHistoryResponse_GhostBattleRecord { - carSetting: - | LoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting - | undefined; - opponent: - | LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar - | undefined; - mobs: LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar[]; - area: number; - playedAt: number; - playedShopName: string; -} - -export interface LoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting { - tunePower: number; - tuneHandling: number; -} - -export interface LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar { - car: Car | undefined; - result: number; -} - -export interface UpdateCarRequest { - carId: number; - car: Car | undefined; - earnedItems: CarItem[]; - setting: CarSetting | undefined; - toBeDeleted: boolean; - auraMotifAutoChange: boolean; - rgStamp: number; - timestamp: number; -} - -export interface UpdateCarResponse { - error: ErrorCode; -} - -export interface SaveGameResultRequest { - carId: number; - gameMode: GameMode; - playedAt: number; - playCount: number; - retired: boolean; - timeup: boolean; - car: Car | undefined; - setting: CarSetting | undefined; - odometer: number; - earnedCustomColor: boolean; - confirmedTutorials: TutorialType[]; - earnedItems: CarItem[]; - earnedUserItems: UserItem[]; - preservedTitles: string[]; - neighborCars: number[]; - stResult: SaveGameResultRequest_StoryResult | undefined; - taResult: SaveGameResultRequest_TimeAttackResult | undefined; - vsResult: SaveGameResultRequest_VersusBattleResult | undefined; - rgResult: SaveGameResultRequest_GhostBattleResult | undefined; -} - -export interface SaveGameResultRequest_StoryResult { - stPlayCount: number; - stPlayedStory: number; - tuningPoint: number; - stClearBits: number; - stClearDivCount: number; - stClearCount: number; - stLoseBits: number; - stConsecutiveWins: number; - stCompleted100Episodes: boolean; - isInsuranceUsed: boolean; -} - -export interface SaveGameResultRequest_TimeAttackResult { - time: number; - course: number; - isMorning: boolean; - section1Time: number; - section2Time: number; - section3Time: number; - section4Time: number; - section5Time: number; - section6Time: number; - section7Time: number; - wholeRank: number; - modelRank: number; -} - -export interface SaveGameResultRequest_VersusBattleResult { - result: number; - survived: boolean; - opponentCarId: number[]; - numOfPlayers: number; - area: number; - isMorning: boolean; - vsPlayCount: number; - vsBurstCount: number; - vsStarCount: number; - vsCoolOrWild: number; - vsSmoothOrRough: number; - vsTripleStarMedals: number; - vsDoubleStarMedals: number; - vsSingleStarMedals: number; - vsPlainMedals: number; -} - -export interface SaveGameResultRequest_GhostBattleResult { - opponents: SaveGameResultRequest_GhostBattleResult_GhostBattleOpponent[]; - path: number; - isMorning: boolean; - selectionMethod: GhostSelectionMethod; - stampSheetCount: number; - stampSheet: number[]; - rgStamp: number; - confirmedTransferredStampTargetCarIds: number[]; - rgPlayCount: number; - dressupLevel: number; - dressupPoint: number; - rgRegionMapScore: number[]; - competitionId: number; - periodId: number; - brakingPoint: number; - acquireCrown: boolean; - acquireAllCrowns: boolean; -} - -export interface SaveGameResultRequest_GhostBattleResult_GhostBattleOpponent { - result: number; - carId: number; - tunePower: number; - tuneHandling: number; - receiveStamp: boolean; -} - -export interface SaveGameResultResponse { - error: ErrorCode; - ghostSessionId: number; - availableTickets: UserItem[]; -} - -export interface SaveChargeRequest { - chargeLogs: SaveChargeRequest_ChargeLog[]; -} - -export interface SaveChargeRequest_ChargeLog { - datetime: number; - pcbSerial: string; - placeId: string; - userId: number; -} - -export interface SaveChargeResponse { - error: ErrorCode; -} - -export interface LoadGhostBattleInfoRequest { - carId: number; -} - -export interface LoadGhostBattleInfoResponse { - error: ErrorCode; - friendCars: FriendCar[]; - challengers: ChallengerCar[]; - stampTargetCars: StampTargetCar[]; - previousVersionStampTargetCars: PreviousVersionStampTargetCar[]; - bookmarkedCars: BookmarkedCar[]; - history: Car[]; - weakenedCars: LoadGhostBattleInfoResponse_WeakenedCar[]; - stampSheetCount: number; - stampSheet: number[]; - stampReturnStats: number[]; -} - -export interface LoadGhostBattleInfoResponse_WeakenedCar { - carId: number; - consecutiveLosses: number; -} - -export interface LoadStampTargetRequest { - carId: number; - needToPromote: boolean; -} - -export interface LoadStampTargetResponse { - error: ErrorCode; - cars: StampTargetCar[]; - challengers: ChallengerCar[]; -} - -export interface LockStampTargetRequest { - carId: number; - targetCars: number[]; -} - -export interface LockStampTargetResponse { - error: ErrorCode; -} - -export interface LoadGhostCompetitionInfoRequest { - carId: number; - competitionId: number; -} - -export interface LoadGhostCompetitionInfoResponse { - error: ErrorCode; - periodId: number; - closed: boolean; - brakingPoint: number; - qualified: boolean; - topResults: number[]; - result: number; - rank: number; - parameters1: number[]; - parameters2: boolean; -} - -export interface LoadTimeAttackRecordRequest { - carId: number; - model: number; - course: number; -} - -export interface LoadTimeAttackRecordResponse { - error: ErrorCode; - wholeRanking: number[]; - modelRanking: number[]; - personalBestTime: number; - pbSection1Time: number; - pbSection2Time: number; - pbSection3Time: number; - pbSection4Time: number; - pbSection5Time: number; - pbSection6Time: number; - pbSection7Time: number; -} - -export interface SaveTerminalResultRequest { - userId: number; - timestamp: number; - carOrder: number[]; - confirmedTutorials: TutorialType[]; - garageMenuEntered: boolean; -} - -export interface SaveTerminalResultResponse { - error: ErrorCode; -} - -export interface PingRequest { - ping: number; -} - -export interface PingResponse { - error: ErrorCode; - pong: number; -} - -export interface LoadTerminalInformationRequest { - userId: number; -} - -export interface LoadTerminalInformationResponse { - error: ErrorCode; - prizeReceivable: boolean; - noticeEntries: LoadTerminalInformationResponse_TerminalNotice[]; - noticeMessage: string[]; - noticeWindow: NoticeEntry[]; - noticeWindowMessage: string[]; - transferNotice: TransferNotice | undefined; - announceFeature: boolean; - freeScratched: boolean; - restrictedModels: number[]; -} - -export interface LoadTerminalInformationResponse_TerminalNotice { - noticeType: NoticeEntry; - field1: string; - field2: number; - field3: number; -} - -export interface CreateUserRequest { - banapassportAmId: number; - cardChipId: string; - accessCode: string; - cardTypeCode: number; - cardRegionCode: number; - device: DeviceType; - timestamp: number; -} - -export interface CreateUserResponse { - error: ErrorCode; - accessCode: string; - banapassportAmId: number; - mbid: number; - userId: number; -} - -export interface AskAccessCodeRequest { - cardChipId: string; -} - -export interface AskAccessCodeResponse { - error: ErrorCode; - accessCode: string; -} - -export interface RegisterOpponentGhostRequest { - carId: number; - specialGhostId: number; -} - -export interface RegisterOpponentGhostResponse { - error: ErrorCode; -} - -export interface GrantCarRightRequest { - userId: number; - targetUserId: number; - timestamp: number; -} - -export interface GrantCarRightResponse { - error: ErrorCode; -} - -export interface LoadGhostCompetitionRankingRequest { - carId: number; - competitionId: number; -} - -export interface LoadGhostCompetitionRankingResponse { - error: ErrorCode; - periodId: number; - numOfParticipants: number; - competitionSchedule: GhostCompetitionSchedule | undefined; - ownRecord: LoadGhostCompetitionRankingResponse_Entry | undefined; - topRecords: LoadGhostCompetitionRankingResponse_Entry[]; -} - -export interface LoadGhostCompetitionRankingResponse_Entry { - rank: number; - result: number; - carId: number; - name: string; - regionId: number; - model: number; - visualModel: number; - defaultColor: number; - title: string; - level: number; - windowStickerString: string; - playedShopName: string; - playedAt: number; -} - -export interface LoadUnreceivedUserItemsRequest { - userId: number; -} - -export interface LoadUnreceivedUserItemsResponse { - error: ErrorCode; - ownedUserItems: UserItem[]; -} - -export interface LoadBookmarksRequest { - userId: number; -} - -export interface LoadBookmarksResponse { - error: ErrorCode; - cars: Car[]; -} - -export interface SaveBookmarksRequest { - userId: number; - cars: number[]; -} - -export interface SaveBookmarksResponse { - error: ErrorCode; -} - -export interface StartTransferRequest { - banapassportAmId: number; -} - -export interface StartTransferResponse { - error: ErrorCode; - userId: number; - pollingInterval: number; -} - -export interface SaveScreenshotRequest { - carId: number; - timestamp: number; - playedAt: number; - transparent: boolean; - imageType: ScreenshotType; - image: Buffer; - ghostMetadata: SaveScreenshotRequest_GhostBattleMetadata | undefined; - versusMetadata: SaveScreenshotRequest_VersusBattleMetadata | undefined; - terminalMetadata: SaveScreenshotRequest_TerminalMetadata | undefined; - acquiringVsStarMetadata: - | SaveScreenshotRequest_AcquiringVersusStarMetadata - | undefined; - acquiringAuraMotifMetadata: - | SaveScreenshotRequest_AcquiringAuraMotifMetadata - | undefined; - ghostRegionMapMetadata: - | SaveScreenshotRequest_GhostRegionMapMetadata - | undefined; - acquiringCrownMetadata: - | SaveScreenshotRequest_AcquiringCrownMetadata - | undefined; - competitionResultMetadata: - | SaveScreenshotRequest_GhostCompetitionResultMetadata - | undefined; - timeAttackResultMetadata: - | SaveScreenshotRequest_TimeAttackResultMetadata - | undefined; - levelUpMetadata: SaveScreenshotRequest_LevelUpMetadata | undefined; -} - -export interface SaveScreenshotRequest_GhostBattleMetadata { - tunePower: number; - tuneHandling: number; - area: number; - stampReturnCount: number; - opponents: SaveScreenshotRequest_OpponentCar[]; -} - -export interface SaveScreenshotRequest_VersusBattleMetadata { - tunePower: number; - tuneHandling: number; - area: number; - opponents: SaveScreenshotRequest_OpponentCar[]; -} - -export interface SaveScreenshotRequest_TerminalMetadata { - tunePower: number; - tuneHandling: number; - name: string; - title: string; - level: number; -} - -export interface SaveScreenshotRequest_AcquiringVersusStarMetadata { - tunePower: number; - tuneHandling: number; - vsStarCount: number; -} - -export interface SaveScreenshotRequest_AcquiringAuraMotifMetadata { - tunePower: number; - tuneHandling: number; - auraMotif: number; -} - -export interface SaveScreenshotRequest_GhostRegionMapMetadata { - tunePower: number; - tuneHandling: number; - rgScore: number; - rgRegionMapScore: number[]; -} - -export interface SaveScreenshotRequest_AcquiringCrownMetadata { - tunePower: number; - tuneHandling: number; - area: number; -} - -export interface SaveScreenshotRequest_GhostCompetitionResultMetadata { - tunePower: number; - tuneHandling: number; - rank: number; - result: number; -} - -export interface SaveScreenshotRequest_TimeAttackResultMetadata { - tunePower: number; - tuneHandling: number; - course: number; - wholeRank: number; - modelRank: number; -} - -export interface SaveScreenshotRequest_LevelUpMetadata { - tunePower: number; - tuneHandling: number; - level: number; -} - -export interface SaveScreenshotRequest_OpponentCar { - carId: number; - tunePower: number; - tuneHandling: number; -} - -export interface SaveScreenshotResponse { - error: ErrorCode; -} - -export interface SubmitClientLogRequest { - data: Buffer; - modifiedAt: number; - logType: ClientLogType; -} - -export interface SubmitClientLogResponse { - error: ErrorCode; -} - -export interface LoadScratchInformationRequest { - userId: number; -} - -export interface LoadScratchInformationResponse { - error: ErrorCode; - scratchSheets: ScratchSheet[]; - currentSheet: number; - numOfScratched: number; - ownedUserItems: UserItem[]; -} - -export interface SaveScratchSheetRequest { - timestamp: number; - targetSheet: number; - targetSquare: number; - userId: number; -} - -export interface SaveScratchSheetResponse { - error: ErrorCode; - scratchSheets: ScratchSheet[]; - currentSheet: number; - numOfScratched: number; - earnedItem: UserItem | undefined; -} - -export interface TurnScratchSheetRequest { - userId: number; - targetSheet: number; -} - -export interface TurnScratchSheetResponse { - error: ErrorCode; -} - -export interface CheckItemReceivableCarsRequest { - userId: number; - itemsToBeEarned: UserItem[]; -} - -export interface CheckItemReceivableCarsResponse { - error: ErrorCode; - carIds: number[]; -} - -export interface ReceiveUserItemsRequest { - carId: number; - targetItemIds: number[]; -} - -export interface ReceiveUserItemsResponse { - error: ErrorCode; -} - -export interface UpdateEventModeSerialRequest { - eventModeSerial: string; -} - -export interface UpdateEventModeSerialResponse { - error: ErrorCode; - serialError: EventModeSerialErrorCode; - eventModeSerial: string; - startAt: number; - endAt: number; -} - -export interface ParticipateInInviteFriendCampaignRequest { - invitingUserId: number; - invitedUserId: number; - sourceCarId: number; - transmission: boolean; -} - -export interface ParticipateInInviteFriendCampaignResponse { - error: ErrorCode; -} - -export interface ConsumeUserItemRequest { - userId: number; - carId: number; - userItemId: number; -} - -export interface ConsumeUserItemResponse { - error: ErrorCode; -} - -export interface SearchCarsByLevelRequest { - carId: number; - ghostLevel: number; - area: number; - regionId: number; -} - -export interface SearchCarsByLevelResponse { - error: ErrorCode; - ramp: number; - path: number; - ghosts: GhostCar[]; - selectionMethod: PathSelectionMethod; - rates: SearchCarsByLevelResponse_Rate[]; -} - -export interface SearchCarsByLevelResponse_Rate { - carId: number; - type: GhostRateType; - rate: number; -} - -export interface LoadPathsAndTuningsRequest { - carId: number; - selectedCars: number[]; - returnImmediately: boolean; - stampTargetArea: number; -} - -export interface LoadPathsAndTuningsResponse { - error: ErrorCode; - data: LoadPathsAndTuningsResponse_CarTuningsByPath[]; -} - -export interface LoadPathsAndTuningsResponse_CarTuningsByPath { - area: number; - ramp: number; - path: number; - carTunings: CarTuning[]; - selectionMethod: PathSelectionMethod; -} - -export interface LoadGhostDriveDataRequest { - path: number; - carTunings: CarTuning[]; -} - -export interface LoadGhostDriveDataResponse { - error: ErrorCode; - data: LoadGhostDriveDataResponse_GhostDriveData[]; -} - -export interface LoadGhostDriveDataResponse_GhostDriveData { - carId: number; - type: GhostType; - driveData: BinaryData | undefined; - trendBinaryByUser: BinaryData | undefined; - trendBinaryByCar: BinaryData | undefined; - trendBinaryByArea: BinaryData | undefined; -} - -export interface Car { - carId: number; - userId: number; - regionId: number; - name: string; - manufacturer: number; - model: number; - visualModel: number; - defaultColor: number; - customColor: number; - wheel: number; - wheelColor: number; - aero: number; - bonnet: number; - wing: number; - gtWing: GTWing | undefined; - mirror: number; - neon: number; - trunk: number; - plate: number; - plateColor: number; - plateNumber: number; - tunePower: number; - tuneHandling: number; - title: string; - level: number; - windowSticker: boolean; - windowStickerString: string; - windowStickerFont: number; - windowDecoration: number; - rivalMarker: number; - lastPlayedAt: number; - lastPlayedPlace: Place | undefined; - aura: number; - auraMotif: number; - ghostLevel: number; - country: string; - searchCode: string; -} - -export interface CarSetting { - carId: number; - view: boolean; - transmission: boolean; - retire: boolean; - meter: number; - navigationMap: boolean; - volume: number; - bgm: number; - nameplate: number; - nameplateColor: number; - terminalBackground: number; -} - -export interface GTWing { - pillar: number; - pillarMaterial: number; - mainWing: number; - mainWingColor: number; - wingTip: number; - material: number; -} - -export interface CarItem { - category: ItemCategory; - itemId: number; - amount: number; -} - -export interface CopiedCar { - car: Car | undefined; - remainingPlayCounts: number; -} - -export interface FriendCar { - car: Car | undefined; - friendshipLevel: number; - nonhuman: boolean; -} - -export interface ChallengerCar { - car: Car | undefined; - stamp: number; - result: number; - area: number; -} - -export interface StampTargetCar { - car: Car | undefined; - returnCount: number; - locked: boolean; - recommended: boolean; -} - -export interface BookmarkedCar { - car: Car | undefined; - returnCount: number; -} - -export interface PreviousVersionStampTargetCar { - car: Car | undefined; - returnCount: number; - currentCarId: number; -} - -export interface GhostCar { - car: Car | undefined; - area: number; - ramp: number; - path: number; - nonhuman: boolean; - type: GhostType; - trailId: number; -} - -export interface Place { - placeId: string; - shopName: string; - regionId: number; - country: string; -} - -export interface SystemSetting { - mCoinChute: number; - mBuyCardCost: number; - mGameCost: number; - mContinueCost: number; - mFullCourseCost: number; - mFreePlay: boolean; - mPcbId: number; - mIcCardRw: boolean; - mIcCardVender: boolean; - mMgCardRw: boolean; - mForceFeedback: boolean; - mWinsAndRemains: boolean; - mEventMode: number; - mEventModeDist: boolean; - mCloseType: number; - mCloseSun: number; - mCloseMon: number; - mCloseTue: number; - mCloseWed: number; - mCloseThu: number; - mCloseFri: number; - mCloseSat: number; - mCloseDay: number; - mTouchPanel: boolean; - mGameVol: number; - mAttractVol: number; - mCalibHandleCenter: number; - mCalibAccelCenter: number; - mCalibBrakeCenter: number; - mCalibTouchLeft: number; - mCalibTouchRight: number; - mCalibTouchTop: number; - mCalibTouchBottom: number; -} - -export interface GhostCompetitionSchedule { - competitionId: number; - qualifyingPeriodStartAt: number; - qualifyingPeriodCloseAt: number; - competitionStartAt: number; - competitionCloseAt: number; - competitionEndAt: number; - lengthOfPeriod: number; - lengthOfInterval: number; - area: number; - minigamePatternId: number; -} - -export interface GhostCompetitionParameter { - parameters1: number[]; - parameters2: boolean; -} - -export interface TransferNotice { - needToSeeTransferred: boolean; - totalMaxiGold: number; - numOfPorscheCars: number; - porscheModels: number[]; - hasR35: boolean; -} - -export interface GameFeatureVersion { - version: number; - year: number; - month: number; - pluses: number; - releaseAt: number; -} - -export interface ScratchSheet { - squares: ScratchSheet_ScratchSquare[]; -} - -export interface ScratchSheet_ScratchSquare { - category: ItemCategory; - itemId: number; - earned: boolean; -} - -export interface UserItem { - category: ItemCategory; - itemId: number; - userItemId: number; - earnedAt: number; - expireAt: number; -} - -export interface InviteFriendCampaignSchedule { - campaignId: number; - startAt: number; - endAt: number; - couponUnreceivableAt: number; -} - -export interface CarTuning { - carId: number; - tunePower: number; - tuneHandling: number; - lastPlayedAt: number; -} - -export interface BinaryData { - data: Buffer; - mergeSerial: number; -} - -export interface GhostTrail { - carId: number; - area: number; - ramp: number; - path: number; - playedAt: number; - playedPlace: Place | undefined; - trail: Buffer; -} - -export interface PlaceList { - places: Place[]; -} - -export interface GhostList { - ghosts: GhostCar[]; -} - -export interface CarSummary { - hitCount: number; - cars: Car[]; -} - -export interface FileList { - files: FileList_FileInfo[]; - interval: number; -} - -export interface FileList_FileInfo { - fileId: number; - fileType: FileType; - fileSize: number; - url: string; - sha1sum: Buffer; - notBefore: number; - notAfter: number; -} - -export interface GhostCompetitionTarget { - competitionId: number; - specialGhostId: number; - ghostCar: GhostCar | undefined; - trailId: number; - updatedAt: number; - competitionSchedule: GhostCompetitionSchedule | undefined; -} - -function createBaseRegisterSystemInfoRequest(): RegisterSystemInfoRequest { - return { - pcbSerial: "", - terminalType: 0, - romVersion: 0, - country: "", - lineType: 0, - shopName: "", - shopNickname: "", - allnetPlaceId: 0, - allnetRegion0: 0, - muchaPlaceId: "", - muchaPrefectureId: 0, - regionName0: "", - regionName1: "", - regionName2: "", - regionName3: "", - timezoneOffset: 0, - systemSetting: undefined, - errorLogs: [], - }; -} - -export const RegisterSystemInfoRequest = { - encode( - message: RegisterSystemInfoRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.pcbSerial !== "") { - writer.uint32(10).string(message.pcbSerial); - } - if (message.terminalType !== 0) { - writer.uint32(16).int32(message.terminalType); - } - if (message.romVersion !== 0) { - writer.uint32(24).uint32(message.romVersion); - } - if (message.country !== "") { - writer.uint32(34).string(message.country); - } - if (message.lineType !== 0) { - writer.uint32(40).int32(message.lineType); - } - if (message.shopName !== "") { - writer.uint32(50).string(message.shopName); - } - if (message.shopNickname !== "") { - writer.uint32(58).string(message.shopNickname); - } - if (message.allnetPlaceId !== 0) { - writer.uint32(64).uint32(message.allnetPlaceId); - } - if (message.allnetRegion0 !== 0) { - writer.uint32(72).uint32(message.allnetRegion0); - } - if (message.muchaPlaceId !== "") { - writer.uint32(82).string(message.muchaPlaceId); - } - if (message.muchaPrefectureId !== 0) { - writer.uint32(88).uint32(message.muchaPrefectureId); - } - if (message.regionName0 !== "") { - writer.uint32(98).string(message.regionName0); - } - if (message.regionName1 !== "") { - writer.uint32(106).string(message.regionName1); - } - if (message.regionName2 !== "") { - writer.uint32(114).string(message.regionName2); - } - if (message.regionName3 !== "") { - writer.uint32(122).string(message.regionName3); - } - if (message.timezoneOffset !== 0) { - writer.uint32(128).sint32(message.timezoneOffset); - } - if (message.systemSetting !== undefined) { - SystemSetting.encode( - message.systemSetting, - writer.uint32(138).fork() - ).ldelim(); - } - for (const v of message.errorLogs) { - RegisterSystemInfoRequest_ErrorLogEntry.encode( - v!, - writer.uint32(146).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): RegisterSystemInfoRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRegisterSystemInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pcbSerial = reader.string(); - break; - case 2: - message.terminalType = reader.int32() as any; - break; - case 3: - message.romVersion = reader.uint32(); - break; - case 4: - message.country = reader.string(); - break; - case 5: - message.lineType = reader.int32() as any; - break; - case 6: - message.shopName = reader.string(); - break; - case 7: - message.shopNickname = reader.string(); - break; - case 8: - message.allnetPlaceId = reader.uint32(); - break; - case 9: - message.allnetRegion0 = reader.uint32(); - break; - case 10: - message.muchaPlaceId = reader.string(); - break; - case 11: - message.muchaPrefectureId = reader.uint32(); - break; - case 12: - message.regionName0 = reader.string(); - break; - case 13: - message.regionName1 = reader.string(); - break; - case 14: - message.regionName2 = reader.string(); - break; - case 15: - message.regionName3 = reader.string(); - break; - case 16: - message.timezoneOffset = reader.sint32(); - break; - case 17: - message.systemSetting = SystemSetting.decode(reader, reader.uint32()); - break; - case 18: - message.errorLogs.push( - RegisterSystemInfoRequest_ErrorLogEntry.decode( - reader, - reader.uint32() - ) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RegisterSystemInfoRequest { - return { - pcbSerial: isSet(object.pcbSerial) ? String(object.pcbSerial) : "", - terminalType: isSet(object.terminalType) - ? terminalTypeFromJSON(object.terminalType) - : 0, - romVersion: isSet(object.romVersion) ? Number(object.romVersion) : 0, - country: isSet(object.country) ? String(object.country) : "", - lineType: isSet(object.lineType) ? lineTypeFromJSON(object.lineType) : 0, - shopName: isSet(object.shopName) ? String(object.shopName) : "", - shopNickname: isSet(object.shopNickname) - ? String(object.shopNickname) - : "", - allnetPlaceId: isSet(object.allnetPlaceId) - ? Number(object.allnetPlaceId) - : 0, - allnetRegion0: isSet(object.allnetRegion0) - ? Number(object.allnetRegion0) - : 0, - muchaPlaceId: isSet(object.muchaPlaceId) - ? String(object.muchaPlaceId) - : "", - muchaPrefectureId: isSet(object.muchaPrefectureId) - ? Number(object.muchaPrefectureId) - : 0, - regionName0: isSet(object.regionName0) ? String(object.regionName0) : "", - regionName1: isSet(object.regionName1) ? String(object.regionName1) : "", - regionName2: isSet(object.regionName2) ? String(object.regionName2) : "", - regionName3: isSet(object.regionName3) ? String(object.regionName3) : "", - timezoneOffset: isSet(object.timezoneOffset) - ? Number(object.timezoneOffset) - : 0, - systemSetting: isSet(object.systemSetting) - ? SystemSetting.fromJSON(object.systemSetting) - : undefined, - errorLogs: Array.isArray(object?.errorLogs) - ? object.errorLogs.map((e: any) => - RegisterSystemInfoRequest_ErrorLogEntry.fromJSON(e) - ) - : [], - }; - }, - - toJSON(message: RegisterSystemInfoRequest): unknown { - const obj: any = {}; - message.pcbSerial !== undefined && (obj.pcbSerial = message.pcbSerial); - message.terminalType !== undefined && - (obj.terminalType = terminalTypeToJSON(message.terminalType)); - message.romVersion !== undefined && - (obj.romVersion = Math.round(message.romVersion)); - message.country !== undefined && (obj.country = message.country); - message.lineType !== undefined && - (obj.lineType = lineTypeToJSON(message.lineType)); - message.shopName !== undefined && (obj.shopName = message.shopName); - message.shopNickname !== undefined && - (obj.shopNickname = message.shopNickname); - message.allnetPlaceId !== undefined && - (obj.allnetPlaceId = Math.round(message.allnetPlaceId)); - message.allnetRegion0 !== undefined && - (obj.allnetRegion0 = Math.round(message.allnetRegion0)); - message.muchaPlaceId !== undefined && - (obj.muchaPlaceId = message.muchaPlaceId); - message.muchaPrefectureId !== undefined && - (obj.muchaPrefectureId = Math.round(message.muchaPrefectureId)); - message.regionName0 !== undefined && - (obj.regionName0 = message.regionName0); - message.regionName1 !== undefined && - (obj.regionName1 = message.regionName1); - message.regionName2 !== undefined && - (obj.regionName2 = message.regionName2); - message.regionName3 !== undefined && - (obj.regionName3 = message.regionName3); - message.timezoneOffset !== undefined && - (obj.timezoneOffset = Math.round(message.timezoneOffset)); - message.systemSetting !== undefined && - (obj.systemSetting = message.systemSetting - ? SystemSetting.toJSON(message.systemSetting) - : undefined); - if (message.errorLogs) { - obj.errorLogs = message.errorLogs.map((e) => - e ? RegisterSystemInfoRequest_ErrorLogEntry.toJSON(e) : undefined - ); - } else { - obj.errorLogs = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): RegisterSystemInfoRequest { - const message = createBaseRegisterSystemInfoRequest(); - message.pcbSerial = object.pcbSerial ?? ""; - message.terminalType = object.terminalType ?? 0; - message.romVersion = object.romVersion ?? 0; - message.country = object.country ?? ""; - message.lineType = object.lineType ?? 0; - message.shopName = object.shopName ?? ""; - message.shopNickname = object.shopNickname ?? ""; - message.allnetPlaceId = object.allnetPlaceId ?? 0; - message.allnetRegion0 = object.allnetRegion0 ?? 0; - message.muchaPlaceId = object.muchaPlaceId ?? ""; - message.muchaPrefectureId = object.muchaPrefectureId ?? 0; - message.regionName0 = object.regionName0 ?? ""; - message.regionName1 = object.regionName1 ?? ""; - message.regionName2 = object.regionName2 ?? ""; - message.regionName3 = object.regionName3 ?? ""; - message.timezoneOffset = object.timezoneOffset ?? 0; - message.systemSetting = - object.systemSetting !== undefined && object.systemSetting !== null - ? SystemSetting.fromPartial(object.systemSetting) - : undefined; - message.errorLogs = - object.errorLogs?.map((e) => - RegisterSystemInfoRequest_ErrorLogEntry.fromPartial(e) - ) || []; - return message; - }, -}; - -function createBaseRegisterSystemInfoRequest_ErrorLogEntry(): RegisterSystemInfoRequest_ErrorLogEntry { - return { datetime: 0, message: "" }; -} - -export const RegisterSystemInfoRequest_ErrorLogEntry = { - encode( - message: RegisterSystemInfoRequest_ErrorLogEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.datetime !== 0) { - writer.uint32(8).uint32(message.datetime); - } - if (message.message !== "") { - writer.uint32(18).string(message.message); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): RegisterSystemInfoRequest_ErrorLogEntry { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRegisterSystemInfoRequest_ErrorLogEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.datetime = reader.uint32(); - break; - case 2: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RegisterSystemInfoRequest_ErrorLogEntry { - return { - datetime: isSet(object.datetime) ? Number(object.datetime) : 0, - message: isSet(object.message) ? String(object.message) : "", - }; - }, - - toJSON(message: RegisterSystemInfoRequest_ErrorLogEntry): unknown { - const obj: any = {}; - message.datetime !== undefined && - (obj.datetime = Math.round(message.datetime)); - message.message !== undefined && (obj.message = message.message); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): RegisterSystemInfoRequest_ErrorLogEntry { - const message = createBaseRegisterSystemInfoRequest_ErrorLogEntry(); - message.datetime = object.datetime ?? 0; - message.message = object.message ?? ""; - return message; - }, -}; - -function createBaseRegisterSystemInfoResponse(): RegisterSystemInfoResponse { - return { - error: 0, - regionId: 0, - placeId: "", - allowedClientLogTypes: [], - featureVersion: undefined, - latestCompetitionId: 0, - competitionSchedule: undefined, - scratchNotes: "", - inviteFriendCampaignSchedule: undefined, - ghostSelectionMinRedoWait: 0, - ghostSelectionMaxRedoWait: 0, - }; -} - -export const RegisterSystemInfoResponse = { - encode( - message: RegisterSystemInfoResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - writer.uint32(8).int32(message.error); - writer.uint32(16).uint32(message.regionId); - writer.uint32(26).string(message.placeId); - writer.uint32(34).fork(); - for (const v of message.allowedClientLogTypes) { - writer.int32(v); - } - writer.ldelim(); - if (message.featureVersion !== undefined) { - GameFeatureVersion.encode( - message.featureVersion, - writer.uint32(82).fork() - ).ldelim(); - } - if (message.latestCompetitionId !== 0) { - writer.uint32(88).uint32(message.latestCompetitionId); - } - if (message.competitionSchedule !== undefined) { - GhostCompetitionSchedule.encode( - message.competitionSchedule, - writer.uint32(98).fork() - ).ldelim(); - } - if (message.scratchNotes !== undefined && message.scratchNotes !== "") { - writer.uint32(154).string(message.scratchNotes as any as string); - } - if (message.inviteFriendCampaignSchedule !== undefined) { - InviteFriendCampaignSchedule.encode( - message.inviteFriendCampaignSchedule, - writer.uint32(218).fork() - ).ldelim(); - } - writer.uint32(224).uint32(message.ghostSelectionMinRedoWait); - writer.uint32(232).uint32(message.ghostSelectionMaxRedoWait); - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): RegisterSystemInfoResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRegisterSystemInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.regionId = reader.uint32(); - break; - case 3: - message.placeId = reader.string(); - break; - case 4: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.allowedClientLogTypes.push(reader.int32() as any); - } - } else { - message.allowedClientLogTypes.push(reader.int32() as any); - } - break; - case 10: - message.featureVersion = GameFeatureVersion.decode( - reader, - reader.uint32() - ); - break; - case 11: - message.latestCompetitionId = reader.uint32(); - break; - case 12: - message.competitionSchedule = GhostCompetitionSchedule.decode( - reader, - reader.uint32() - ); - break; - case 19: - message.scratchNotes = reader.string(); - break; - case 27: - message.inviteFriendCampaignSchedule = - InviteFriendCampaignSchedule.decode(reader, reader.uint32()); - break; - case 28: - message.ghostSelectionMinRedoWait = reader.uint32(); - break; - case 29: - message.ghostSelectionMaxRedoWait = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RegisterSystemInfoResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - regionId: isSet(object.regionId) ? Number(object.regionId) : 0, - placeId: isSet(object.placeId) ? String(object.placeId) : "", - allowedClientLogTypes: Array.isArray(object?.allowedClientLogTypes) - ? object.allowedClientLogTypes.map((e: any) => clientLogTypeFromJSON(e)) - : [], - featureVersion: isSet(object.featureVersion) - ? GameFeatureVersion.fromJSON(object.featureVersion) - : undefined, - latestCompetitionId: isSet(object.latestCompetitionId) - ? Number(object.latestCompetitionId) - : 0, - competitionSchedule: isSet(object.competitionSchedule) - ? GhostCompetitionSchedule.fromJSON(object.competitionSchedule) - : undefined, - scratchNotes: isSet(object.scratchNotes) - ? String(object.scratchNotes) - : "", - inviteFriendCampaignSchedule: isSet(object.inviteFriendCampaignSchedule) - ? InviteFriendCampaignSchedule.fromJSON( - object.inviteFriendCampaignSchedule - ) - : undefined, - ghostSelectionMinRedoWait: isSet(object.ghostSelectionMinRedoWait) - ? Number(object.ghostSelectionMinRedoWait) - : 0, - ghostSelectionMaxRedoWait: isSet(object.ghostSelectionMaxRedoWait) - ? Number(object.ghostSelectionMaxRedoWait) - : 0, - }; - }, - - toJSON(message: RegisterSystemInfoResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - message.regionId !== undefined && - (obj.regionId = Math.round(message.regionId)); - message.placeId !== undefined && (obj.placeId = message.placeId); - if (message.allowedClientLogTypes) { - obj.allowedClientLogTypes = message.allowedClientLogTypes.map((e) => - clientLogTypeToJSON(e) - ); - } else { - obj.allowedClientLogTypes = []; - } - message.featureVersion !== undefined && - (obj.featureVersion = message.featureVersion - ? GameFeatureVersion.toJSON(message.featureVersion) - : undefined); - message.latestCompetitionId !== undefined && - (obj.latestCompetitionId = Math.round(message.latestCompetitionId)); - message.competitionSchedule !== undefined && - (obj.competitionSchedule = message.competitionSchedule - ? GhostCompetitionSchedule.toJSON(message.competitionSchedule) - : undefined); - message.scratchNotes !== undefined && - (obj.scratchNotes = message.scratchNotes); - message.inviteFriendCampaignSchedule !== undefined && - (obj.inviteFriendCampaignSchedule = message.inviteFriendCampaignSchedule - ? InviteFriendCampaignSchedule.toJSON( - message.inviteFriendCampaignSchedule - ) - : undefined); - message.ghostSelectionMinRedoWait !== undefined && - (obj.ghostSelectionMinRedoWait = Math.round( - message.ghostSelectionMinRedoWait - )); - message.ghostSelectionMaxRedoWait !== undefined && - (obj.ghostSelectionMaxRedoWait = Math.round( - message.ghostSelectionMaxRedoWait - )); - return obj; - }, - - fromPartial, I>>( - object: I - ): RegisterSystemInfoResponse { - const message = createBaseRegisterSystemInfoResponse(); - message.error = object.error ?? 0; - message.regionId = object.regionId ?? 0; - message.placeId = object.placeId ?? ""; - message.allowedClientLogTypes = - object.allowedClientLogTypes?.map((e) => e) || []; - message.featureVersion = - object.featureVersion !== undefined && object.featureVersion !== null - ? GameFeatureVersion.fromPartial(object.featureVersion) - : undefined; - message.latestCompetitionId = object.latestCompetitionId ?? 0; - message.competitionSchedule = - object.competitionSchedule !== undefined && - object.competitionSchedule !== null - ? GhostCompetitionSchedule.fromPartial(object.competitionSchedule) - : undefined; - message.scratchNotes = object.scratchNotes ?? ""; - message.inviteFriendCampaignSchedule = - object.inviteFriendCampaignSchedule !== undefined && - object.inviteFriendCampaignSchedule !== null - ? InviteFriendCampaignSchedule.fromPartial( - object.inviteFriendCampaignSchedule - ) - : undefined; - message.ghostSelectionMinRedoWait = object.ghostSelectionMinRedoWait ?? 0; - message.ghostSelectionMaxRedoWait = object.ghostSelectionMaxRedoWait ?? 0; - return message; - }, -}; - -function createBaseRegisterSystemStatsRequest(): RegisterSystemStatsRequest { - return { pcbSerial: "", driveStats: undefined, terminalStats: undefined }; -} - -export const RegisterSystemStatsRequest = { - encode( - message: RegisterSystemStatsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.pcbSerial !== "") { - writer.uint32(10).string(message.pcbSerial); - } - if (message.driveStats !== undefined) { - RegisterSystemStatsRequest_DriveStats.encode( - message.driveStats, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.terminalStats !== undefined) { - RegisterSystemStatsRequest_TerminalStats.encode( - message.terminalStats, - writer.uint32(26).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): RegisterSystemStatsRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRegisterSystemStatsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pcbSerial = reader.string(); - break; - case 2: - message.driveStats = RegisterSystemStatsRequest_DriveStats.decode( - reader, - reader.uint32() - ); - break; - case 3: - message.terminalStats = - RegisterSystemStatsRequest_TerminalStats.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RegisterSystemStatsRequest { - return { - pcbSerial: isSet(object.pcbSerial) ? String(object.pcbSerial) : "", - driveStats: isSet(object.driveStats) - ? RegisterSystemStatsRequest_DriveStats.fromJSON(object.driveStats) - : undefined, - terminalStats: isSet(object.terminalStats) - ? RegisterSystemStatsRequest_TerminalStats.fromJSON( - object.terminalStats - ) - : undefined, - }; - }, - - toJSON(message: RegisterSystemStatsRequest): unknown { - const obj: any = {}; - message.pcbSerial !== undefined && (obj.pcbSerial = message.pcbSerial); - message.driveStats !== undefined && - (obj.driveStats = message.driveStats - ? RegisterSystemStatsRequest_DriveStats.toJSON(message.driveStats) - : undefined); - message.terminalStats !== undefined && - (obj.terminalStats = message.terminalStats - ? RegisterSystemStatsRequest_TerminalStats.toJSON(message.terminalStats) - : undefined); - return obj; - }, - - fromPartial, I>>( - object: I - ): RegisterSystemStatsRequest { - const message = createBaseRegisterSystemStatsRequest(); - message.pcbSerial = object.pcbSerial ?? ""; - message.driveStats = - object.driveStats !== undefined && object.driveStats !== null - ? RegisterSystemStatsRequest_DriveStats.fromPartial(object.driveStats) - : undefined; - message.terminalStats = - object.terminalStats !== undefined && object.terminalStats !== null - ? RegisterSystemStatsRequest_TerminalStats.fromPartial( - object.terminalStats - ) - : undefined; - return message; - }, -}; - -function createBaseRegisterSystemStatsRequest_DriveStats(): RegisterSystemStatsRequest_DriveStats { - return { - operation: [], - story: [], - versus: [], - ghost: [], - timeAttack: [], - event: [], - }; -} - -export const RegisterSystemStatsRequest_DriveStats = { - encode( - message: RegisterSystemStatsRequest_DriveStats, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - writer.uint32(10).fork(); - for (const v of message.operation) { - writer.uint32(v); - } - writer.ldelim(); - writer.uint32(18).fork(); - for (const v of message.story) { - writer.uint32(v); - } - writer.ldelim(); - writer.uint32(26).fork(); - for (const v of message.versus) { - writer.uint32(v); - } - writer.ldelim(); - writer.uint32(34).fork(); - for (const v of message.ghost) { - writer.uint32(v); - } - writer.ldelim(); - writer.uint32(42).fork(); - for (const v of message.timeAttack) { - writer.uint32(v); - } - writer.ldelim(); - writer.uint32(50).fork(); - for (const v of message.event) { - writer.uint32(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): RegisterSystemStatsRequest_DriveStats { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRegisterSystemStatsRequest_DriveStats(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.operation.push(reader.uint32()); - } - } else { - message.operation.push(reader.uint32()); - } - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.story.push(reader.uint32()); - } - } else { - message.story.push(reader.uint32()); - } - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.versus.push(reader.uint32()); - } - } else { - message.versus.push(reader.uint32()); - } - break; - case 4: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.ghost.push(reader.uint32()); - } - } else { - message.ghost.push(reader.uint32()); - } - break; - case 5: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.timeAttack.push(reader.uint32()); - } - } else { - message.timeAttack.push(reader.uint32()); - } - break; - case 6: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.event.push(reader.uint32()); - } - } else { - message.event.push(reader.uint32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RegisterSystemStatsRequest_DriveStats { - return { - operation: Array.isArray(object?.operation) - ? object.operation.map((e: any) => Number(e)) - : [], - story: Array.isArray(object?.story) - ? object.story.map((e: any) => Number(e)) - : [], - versus: Array.isArray(object?.versus) - ? object.versus.map((e: any) => Number(e)) - : [], - ghost: Array.isArray(object?.ghost) - ? object.ghost.map((e: any) => Number(e)) - : [], - timeAttack: Array.isArray(object?.timeAttack) - ? object.timeAttack.map((e: any) => Number(e)) - : [], - event: Array.isArray(object?.event) - ? object.event.map((e: any) => Number(e)) - : [], - }; - }, - - toJSON(message: RegisterSystemStatsRequest_DriveStats): unknown { - const obj: any = {}; - if (message.operation) { - obj.operation = message.operation.map((e) => Math.round(e)); - } else { - obj.operation = []; - } - if (message.story) { - obj.story = message.story.map((e) => Math.round(e)); - } else { - obj.story = []; - } - if (message.versus) { - obj.versus = message.versus.map((e) => Math.round(e)); - } else { - obj.versus = []; - } - if (message.ghost) { - obj.ghost = message.ghost.map((e) => Math.round(e)); - } else { - obj.ghost = []; - } - if (message.timeAttack) { - obj.timeAttack = message.timeAttack.map((e) => Math.round(e)); - } else { - obj.timeAttack = []; - } - if (message.event) { - obj.event = message.event.map((e) => Math.round(e)); - } else { - obj.event = []; - } - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): RegisterSystemStatsRequest_DriveStats { - const message = createBaseRegisterSystemStatsRequest_DriveStats(); - message.operation = object.operation?.map((e) => e) || []; - message.story = object.story?.map((e) => e) || []; - message.versus = object.versus?.map((e) => e) || []; - message.ghost = object.ghost?.map((e) => e) || []; - message.timeAttack = object.timeAttack?.map((e) => e) || []; - message.event = object.event?.map((e) => e) || []; - return message; - }, -}; - -function createBaseRegisterSystemStatsRequest_TerminalStats(): RegisterSystemStatsRequest_TerminalStats { - return { operation: [] }; -} - -export const RegisterSystemStatsRequest_TerminalStats = { - encode( - message: RegisterSystemStatsRequest_TerminalStats, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - writer.uint32(10).fork(); - for (const v of message.operation) { - writer.uint32(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): RegisterSystemStatsRequest_TerminalStats { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRegisterSystemStatsRequest_TerminalStats(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.operation.push(reader.uint32()); - } - } else { - message.operation.push(reader.uint32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RegisterSystemStatsRequest_TerminalStats { - return { - operation: Array.isArray(object?.operation) - ? object.operation.map((e: any) => Number(e)) - : [], - }; - }, - - toJSON(message: RegisterSystemStatsRequest_TerminalStats): unknown { - const obj: any = {}; - if (message.operation) { - obj.operation = message.operation.map((e) => Math.round(e)); - } else { - obj.operation = []; - } - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): RegisterSystemStatsRequest_TerminalStats { - const message = createBaseRegisterSystemStatsRequest_TerminalStats(); - message.operation = object.operation?.map((e) => e) || []; - return message; - }, -}; - -function createBaseRegisterSystemStatsResponse(): RegisterSystemStatsResponse { - return { error: 0 }; -} - -export const RegisterSystemStatsResponse = { - encode( - message: RegisterSystemStatsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): RegisterSystemStatsResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRegisterSystemStatsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RegisterSystemStatsResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: RegisterSystemStatsResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): RegisterSystemStatsResponse { - const message = createBaseRegisterSystemStatsResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseRegisterGhostTrailRequest(): RegisterGhostTrailRequest { - return { - ghostSessionId: 0, - ghost: undefined, - trail: Buffer.alloc(0), - time: 0, - driveData: undefined, - trendBinaryByArea: undefined, - trendBinaryByCar: undefined, - trendBinaryByUser: undefined, - }; -} - -export const RegisterGhostTrailRequest = { - encode( - message: RegisterGhostTrailRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.ghostSessionId !== 0) { - writer.uint32(8).uint64(message.ghostSessionId); - } - if (message.ghost !== undefined) { - GhostCar.encode(message.ghost, writer.uint32(18).fork()).ldelim(); - } - if (message.trail.length !== 0) { - writer.uint32(26).bytes(message.trail); - } - if (message.time !== 0) { - writer.uint32(32).uint32(message.time); - } - if (message.driveData !== undefined) { - BinaryData.encode(message.driveData, writer.uint32(42).fork()).ldelim(); - } - if (message.trendBinaryByArea !== undefined) { - BinaryData.encode( - message.trendBinaryByArea, - writer.uint32(50).fork() - ).ldelim(); - } - if (message.trendBinaryByCar !== undefined) { - BinaryData.encode( - message.trendBinaryByCar, - writer.uint32(58).fork() - ).ldelim(); - } - if (message.trendBinaryByUser !== undefined) { - BinaryData.encode( - message.trendBinaryByUser, - writer.uint32(66).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): RegisterGhostTrailRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRegisterGhostTrailRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ghostSessionId = longToNumber(reader.uint64() as Long); - break; - case 2: - message.ghost = GhostCar.decode(reader, reader.uint32()); - break; - case 3: - message.trail = reader.bytes() as Buffer; - break; - case 4: - message.time = reader.uint32(); - break; - case 5: - message.driveData = BinaryData.decode(reader, reader.uint32()); - break; - case 6: - message.trendBinaryByArea = BinaryData.decode( - reader, - reader.uint32() - ); - break; - case 7: - message.trendBinaryByCar = BinaryData.decode(reader, reader.uint32()); - break; - case 8: - message.trendBinaryByUser = BinaryData.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RegisterGhostTrailRequest { - return { - ghostSessionId: isSet(object.ghostSessionId) - ? Number(object.ghostSessionId) - : 0, - ghost: isSet(object.ghost) ? GhostCar.fromJSON(object.ghost) : undefined, - trail: isSet(object.trail) - ? Buffer.from(bytesFromBase64(object.trail)) - : Buffer.alloc(0), - time: isSet(object.time) ? Number(object.time) : 0, - driveData: isSet(object.driveData) - ? BinaryData.fromJSON(object.driveData) - : undefined, - trendBinaryByArea: isSet(object.trendBinaryByArea) - ? BinaryData.fromJSON(object.trendBinaryByArea) - : undefined, - trendBinaryByCar: isSet(object.trendBinaryByCar) - ? BinaryData.fromJSON(object.trendBinaryByCar) - : undefined, - trendBinaryByUser: isSet(object.trendBinaryByUser) - ? BinaryData.fromJSON(object.trendBinaryByUser) - : undefined, - }; - }, - - toJSON(message: RegisterGhostTrailRequest): unknown { - const obj: any = {}; - message.ghostSessionId !== undefined && - (obj.ghostSessionId = Math.round(message.ghostSessionId)); - message.ghost !== undefined && - (obj.ghost = message.ghost ? GhostCar.toJSON(message.ghost) : undefined); - message.trail !== undefined && - (obj.trail = base64FromBytes( - message.trail !== undefined ? message.trail : Buffer.alloc(0) - )); - message.time !== undefined && (obj.time = Math.round(message.time)); - message.driveData !== undefined && - (obj.driveData = message.driveData - ? BinaryData.toJSON(message.driveData) - : undefined); - message.trendBinaryByArea !== undefined && - (obj.trendBinaryByArea = message.trendBinaryByArea - ? BinaryData.toJSON(message.trendBinaryByArea) - : undefined); - message.trendBinaryByCar !== undefined && - (obj.trendBinaryByCar = message.trendBinaryByCar - ? BinaryData.toJSON(message.trendBinaryByCar) - : undefined); - message.trendBinaryByUser !== undefined && - (obj.trendBinaryByUser = message.trendBinaryByUser - ? BinaryData.toJSON(message.trendBinaryByUser) - : undefined); - return obj; - }, - - fromPartial, I>>( - object: I - ): RegisterGhostTrailRequest { - const message = createBaseRegisterGhostTrailRequest(); - message.ghostSessionId = object.ghostSessionId ?? 0; - message.ghost = - object.ghost !== undefined && object.ghost !== null - ? GhostCar.fromPartial(object.ghost) - : undefined; - message.trail = object.trail ?? Buffer.alloc(0); - message.time = object.time ?? 0; - message.driveData = - object.driveData !== undefined && object.driveData !== null - ? BinaryData.fromPartial(object.driveData) - : undefined; - message.trendBinaryByArea = - object.trendBinaryByArea !== undefined && - object.trendBinaryByArea !== null - ? BinaryData.fromPartial(object.trendBinaryByArea) - : undefined; - message.trendBinaryByCar = - object.trendBinaryByCar !== undefined && object.trendBinaryByCar !== null - ? BinaryData.fromPartial(object.trendBinaryByCar) - : undefined; - message.trendBinaryByUser = - object.trendBinaryByUser !== undefined && - object.trendBinaryByUser !== null - ? BinaryData.fromPartial(object.trendBinaryByUser) - : undefined; - return message; - }, -}; - -function createBaseRegisterGhostTrailResponse(): RegisterGhostTrailResponse { - return { error: 0 }; -} - -export const RegisterGhostTrailResponse = { - encode( - message: RegisterGhostTrailResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): RegisterGhostTrailResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRegisterGhostTrailResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RegisterGhostTrailResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: RegisterGhostTrailResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): RegisterGhostTrailResponse { - const message = createBaseRegisterGhostTrailResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseLoadUserRequest(): LoadUserRequest { - return { - cardChipId: "", - accessCode: "", - cardTypeCode: 0, - cardRegionCode: 0, - device: 0, - userId: 0, - romVersion: 0, - maxCars: 0, - createUser: false, - }; -} - -export const LoadUserRequest = { - encode( - message: LoadUserRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.cardChipId !== "") { - writer.uint32(10).string(message.cardChipId); - } - if (message.accessCode !== "") { - writer.uint32(18).string(message.accessCode); - } - if (message.cardTypeCode !== 0) { - writer.uint32(24).uint32(message.cardTypeCode); - } - if (message.cardRegionCode !== 0) { - writer.uint32(32).uint32(message.cardRegionCode); - } - if (message.device !== 0) { - writer.uint32(40).int32(message.device); - } - if (message.userId !== 0) { - writer.uint32(48).uint32(message.userId); - } - if (message.romVersion !== 0) { - writer.uint32(56).uint32(message.romVersion); - } - if (message.maxCars !== 0) { - writer.uint32(64).uint32(message.maxCars); - } - if (message.createUser === true) { - writer.uint32(72).bool(message.createUser); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): LoadUserRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadUserRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cardChipId = reader.string(); - break; - case 2: - message.accessCode = reader.string(); - break; - case 3: - message.cardTypeCode = reader.uint32(); - break; - case 4: - message.cardRegionCode = reader.uint32(); - break; - case 5: - message.device = reader.int32() as any; - break; - case 6: - message.userId = reader.uint32(); - break; - case 7: - message.romVersion = reader.uint32(); - break; - case 8: - message.maxCars = reader.uint32(); - break; - case 9: - message.createUser = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadUserRequest { - return { - cardChipId: isSet(object.cardChipId) ? String(object.cardChipId) : "", - accessCode: isSet(object.accessCode) ? String(object.accessCode) : "", - cardTypeCode: isSet(object.cardTypeCode) - ? Number(object.cardTypeCode) - : 0, - cardRegionCode: isSet(object.cardRegionCode) - ? Number(object.cardRegionCode) - : 0, - device: isSet(object.device) ? deviceTypeFromJSON(object.device) : 0, - userId: isSet(object.userId) ? Number(object.userId) : 0, - romVersion: isSet(object.romVersion) ? Number(object.romVersion) : 0, - maxCars: isSet(object.maxCars) ? Number(object.maxCars) : 0, - createUser: isSet(object.createUser) ? Boolean(object.createUser) : false, - }; - }, - - toJSON(message: LoadUserRequest): unknown { - const obj: any = {}; - message.cardChipId !== undefined && (obj.cardChipId = message.cardChipId); - message.accessCode !== undefined && (obj.accessCode = message.accessCode); - message.cardTypeCode !== undefined && - (obj.cardTypeCode = Math.round(message.cardTypeCode)); - message.cardRegionCode !== undefined && - (obj.cardRegionCode = Math.round(message.cardRegionCode)); - message.device !== undefined && - (obj.device = deviceTypeToJSON(message.device)); - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - message.romVersion !== undefined && - (obj.romVersion = Math.round(message.romVersion)); - message.maxCars !== undefined && - (obj.maxCars = Math.round(message.maxCars)); - message.createUser !== undefined && (obj.createUser = message.createUser); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadUserRequest { - const message = createBaseLoadUserRequest(); - message.cardChipId = object.cardChipId ?? ""; - message.accessCode = object.accessCode ?? ""; - message.cardTypeCode = object.cardTypeCode ?? 0; - message.cardRegionCode = object.cardRegionCode ?? 0; - message.device = object.device ?? 0; - message.userId = object.userId ?? 0; - message.romVersion = object.romVersion ?? 0; - message.maxCars = object.maxCars ?? 0; - message.createUser = object.createUser ?? false; - return message; - }, -}; - -function createBaseLoadUserResponse(): LoadUserResponse { - return { - error: 0, - unlockAt: 0, - accessCode: "", - banapassportAmId: 0, - mbid: 0, - userId: 0, - numOfOwnedCars: 0, - cars: [], - carStates: [], - unusedCarTickets: [], - tutorials: [], - competitionUserState: 1, - windowStickerString: "", - windowStickerFont: 0, - spappState: 0, - transferState: 0, - totalVsStarCount: 0, - totalVsMedalPoint: 0, - copiedCar: undefined, - wasCreatedToday: false, - participatedInInviteFriendCampaign: false, - }; -} - -export const LoadUserResponse = { - encode( - message: LoadUserResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - if (message.unlockAt !== 0) { - writer.uint32(16).uint32(message.unlockAt); - } - if (message.accessCode !== "") { - writer.uint32(26).string(message.accessCode); - } - if (message.banapassportAmId !== 0) { - writer.uint32(32).uint32(message.banapassportAmId); - } - if (message.mbid !== 0) { - writer.uint32(40).uint32(message.mbid); - } - if (message.userId !== 0) { - writer.uint32(48).uint32(message.userId); - } - if (message.numOfOwnedCars !== 0) { - writer.uint32(80).uint32(message.numOfOwnedCars); - } - for (const v of message.cars) { - Car.encode(v!, writer.uint32(90).fork()).ldelim(); - } - for (const v of message.carStates) { - LoadUserResponse_CarState.encode(v!, writer.uint32(98).fork()).ldelim(); - } - for (const v of message.unusedCarTickets) { - UserItem.encode(v!, writer.uint32(106).fork()).ldelim(); - } - writer.uint32(122).fork(); - for (const v of message.tutorials) { - writer.bool(v); - } - writer.ldelim(); - if (message.competitionUserState !== 1) { - writer.uint32(136).int32(message.competitionUserState); - } - if (message.windowStickerString !== "") { - writer.uint32(154).string(message.windowStickerString); - } - if (message.windowStickerFont !== 0) { - writer.uint32(160).uint32(message.windowStickerFont); - } - if (message.spappState !== 0) { - writer.uint32(168).int32(message.spappState); - } - if (message.transferState !== 0) { - writer.uint32(176).int32(message.transferState); - } - if (message.totalVsStarCount !== 0) { - writer.uint32(200).uint32(message.totalVsStarCount); - } - if (message.totalVsMedalPoint !== 0) { - writer.uint32(208).uint32(message.totalVsMedalPoint); - } - if (message.copiedCar !== undefined) { - CopiedCar.encode(message.copiedCar, writer.uint32(218).fork()).ldelim(); - } - if (message.wasCreatedToday === true) { - writer.uint32(224).bool(message.wasCreatedToday); - } - if (message.participatedInInviteFriendCampaign === true) { - writer.uint32(232).bool(message.participatedInInviteFriendCampaign); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): LoadUserResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadUserResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.unlockAt = reader.uint32(); - break; - case 3: - message.accessCode = reader.string(); - break; - case 4: - message.banapassportAmId = reader.uint32(); - break; - case 5: - message.mbid = reader.uint32(); - break; - case 6: - message.userId = reader.uint32(); - break; - case 10: - message.numOfOwnedCars = reader.uint32(); - break; - case 11: - message.cars.push(Car.decode(reader, reader.uint32())); - break; - case 12: - message.carStates.push( - LoadUserResponse_CarState.decode(reader, reader.uint32()) - ); - break; - case 13: - message.unusedCarTickets.push( - UserItem.decode(reader, reader.uint32()) - ); - break; - case 15: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.tutorials.push(reader.bool()); - } - } else { - message.tutorials.push(reader.bool()); - } - break; - case 17: - message.competitionUserState = reader.int32() as any; - break; - case 19: - message.windowStickerString = reader.string(); - break; - case 20: - message.windowStickerFont = reader.uint32(); - break; - case 21: - message.spappState = reader.int32() as any; - break; - case 22: - message.transferState = reader.int32() as any; - break; - case 25: - message.totalVsStarCount = reader.uint32(); - break; - case 26: - message.totalVsMedalPoint = reader.uint32(); - break; - case 27: - message.copiedCar = CopiedCar.decode(reader, reader.uint32()); - break; - case 28: - message.wasCreatedToday = reader.bool(); - break; - case 29: - message.participatedInInviteFriendCampaign = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadUserResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - unlockAt: isSet(object.unlockAt) ? Number(object.unlockAt) : 0, - accessCode: isSet(object.accessCode) ? String(object.accessCode) : "", - banapassportAmId: isSet(object.banapassportAmId) - ? Number(object.banapassportAmId) - : 0, - mbid: isSet(object.mbid) ? Number(object.mbid) : 0, - userId: isSet(object.userId) ? Number(object.userId) : 0, - numOfOwnedCars: isSet(object.numOfOwnedCars) - ? Number(object.numOfOwnedCars) - : 0, - cars: Array.isArray(object?.cars) - ? object.cars.map((e: any) => Car.fromJSON(e)) - : [], - carStates: Array.isArray(object?.carStates) - ? object.carStates.map((e: any) => - LoadUserResponse_CarState.fromJSON(e) - ) - : [], - unusedCarTickets: Array.isArray(object?.unusedCarTickets) - ? object.unusedCarTickets.map((e: any) => UserItem.fromJSON(e)) - : [], - tutorials: Array.isArray(object?.tutorials) - ? object.tutorials.map((e: any) => Boolean(e)) - : [], - competitionUserState: isSet(object.competitionUserState) - ? ghostCompetitionParticipantStateFromJSON(object.competitionUserState) - : 1, - windowStickerString: isSet(object.windowStickerString) - ? String(object.windowStickerString) - : "", - windowStickerFont: isSet(object.windowStickerFont) - ? Number(object.windowStickerFont) - : 0, - spappState: isSet(object.spappState) - ? smartphoneAppStateFromJSON(object.spappState) - : 0, - transferState: isSet(object.transferState) - ? transferStateFromJSON(object.transferState) - : 0, - totalVsStarCount: isSet(object.totalVsStarCount) - ? Number(object.totalVsStarCount) - : 0, - totalVsMedalPoint: isSet(object.totalVsMedalPoint) - ? Number(object.totalVsMedalPoint) - : 0, - copiedCar: isSet(object.copiedCar) - ? CopiedCar.fromJSON(object.copiedCar) - : undefined, - wasCreatedToday: isSet(object.wasCreatedToday) - ? Boolean(object.wasCreatedToday) - : false, - participatedInInviteFriendCampaign: isSet( - object.participatedInInviteFriendCampaign - ) - ? Boolean(object.participatedInInviteFriendCampaign) - : false, - }; - }, - - toJSON(message: LoadUserResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - message.unlockAt !== undefined && - (obj.unlockAt = Math.round(message.unlockAt)); - message.accessCode !== undefined && (obj.accessCode = message.accessCode); - message.banapassportAmId !== undefined && - (obj.banapassportAmId = Math.round(message.banapassportAmId)); - message.mbid !== undefined && (obj.mbid = Math.round(message.mbid)); - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - message.numOfOwnedCars !== undefined && - (obj.numOfOwnedCars = Math.round(message.numOfOwnedCars)); - if (message.cars) { - obj.cars = message.cars.map((e) => (e ? Car.toJSON(e) : undefined)); - } else { - obj.cars = []; - } - if (message.carStates) { - obj.carStates = message.carStates.map((e) => - e ? LoadUserResponse_CarState.toJSON(e) : undefined - ); - } else { - obj.carStates = []; - } - if (message.unusedCarTickets) { - obj.unusedCarTickets = message.unusedCarTickets.map((e) => - e ? UserItem.toJSON(e) : undefined - ); - } else { - obj.unusedCarTickets = []; - } - if (message.tutorials) { - obj.tutorials = message.tutorials.map((e) => e); - } else { - obj.tutorials = []; - } - message.competitionUserState !== undefined && - (obj.competitionUserState = ghostCompetitionParticipantStateToJSON( - message.competitionUserState - )); - message.windowStickerString !== undefined && - (obj.windowStickerString = message.windowStickerString); - message.windowStickerFont !== undefined && - (obj.windowStickerFont = Math.round(message.windowStickerFont)); - message.spappState !== undefined && - (obj.spappState = smartphoneAppStateToJSON(message.spappState)); - message.transferState !== undefined && - (obj.transferState = transferStateToJSON(message.transferState)); - message.totalVsStarCount !== undefined && - (obj.totalVsStarCount = Math.round(message.totalVsStarCount)); - message.totalVsMedalPoint !== undefined && - (obj.totalVsMedalPoint = Math.round(message.totalVsMedalPoint)); - message.copiedCar !== undefined && - (obj.copiedCar = message.copiedCar - ? CopiedCar.toJSON(message.copiedCar) - : undefined); - message.wasCreatedToday !== undefined && - (obj.wasCreatedToday = message.wasCreatedToday); - message.participatedInInviteFriendCampaign !== undefined && - (obj.participatedInInviteFriendCampaign = - message.participatedInInviteFriendCampaign); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadUserResponse { - const message = createBaseLoadUserResponse(); - message.error = object.error ?? 0; - message.unlockAt = object.unlockAt ?? 0; - message.accessCode = object.accessCode ?? ""; - message.banapassportAmId = object.banapassportAmId ?? 0; - message.mbid = object.mbid ?? 0; - message.userId = object.userId ?? 0; - message.numOfOwnedCars = object.numOfOwnedCars ?? 0; - message.cars = object.cars?.map((e) => Car.fromPartial(e)) || []; - message.carStates = - object.carStates?.map((e) => LoadUserResponse_CarState.fromPartial(e)) || - []; - message.unusedCarTickets = - object.unusedCarTickets?.map((e) => UserItem.fromPartial(e)) || []; - message.tutorials = object.tutorials?.map((e) => e) || []; - message.competitionUserState = object.competitionUserState ?? 1; - message.windowStickerString = object.windowStickerString ?? ""; - message.windowStickerFont = object.windowStickerFont ?? 0; - message.spappState = object.spappState ?? 0; - message.transferState = object.transferState ?? 0; - message.totalVsStarCount = object.totalVsStarCount ?? 0; - message.totalVsMedalPoint = object.totalVsMedalPoint ?? 0; - message.copiedCar = - object.copiedCar !== undefined && object.copiedCar !== null - ? CopiedCar.fromPartial(object.copiedCar) - : undefined; - message.wasCreatedToday = object.wasCreatedToday ?? false; - message.participatedInInviteFriendCampaign = - object.participatedInInviteFriendCampaign ?? false; - return message; - }, -}; - -function createBaseLoadUserResponse_CarState(): LoadUserResponse_CarState { - return { - hasOpponentGhost: false, - competitionState: 1, - toBeDeleted: false, - eventJoined: false, - transferred: false, - driveLastPlayedAt: 0, - }; -} - -export const LoadUserResponse_CarState = { - encode( - message: LoadUserResponse_CarState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.hasOpponentGhost === true) { - writer.uint32(8).bool(message.hasOpponentGhost); - } - if (message.competitionState !== 1) { - writer.uint32(16).int32(message.competitionState); - } - if (message.toBeDeleted === true) { - writer.uint32(32).bool(message.toBeDeleted); - } - if (message.eventJoined === true) { - writer.uint32(40).bool(message.eventJoined); - } - if (message.transferred === true) { - writer.uint32(48).bool(message.transferred); - } - if (message.driveLastPlayedAt !== 0) { - writer.uint32(56).uint32(message.driveLastPlayedAt); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadUserResponse_CarState { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadUserResponse_CarState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hasOpponentGhost = reader.bool(); - break; - case 2: - message.competitionState = reader.int32() as any; - break; - case 4: - message.toBeDeleted = reader.bool(); - break; - case 5: - message.eventJoined = reader.bool(); - break; - case 6: - message.transferred = reader.bool(); - break; - case 7: - message.driveLastPlayedAt = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadUserResponse_CarState { - return { - hasOpponentGhost: isSet(object.hasOpponentGhost) - ? Boolean(object.hasOpponentGhost) - : false, - competitionState: isSet(object.competitionState) - ? ghostCompetitionParticipantStateFromJSON(object.competitionState) - : 1, - toBeDeleted: isSet(object.toBeDeleted) - ? Boolean(object.toBeDeleted) - : false, - eventJoined: isSet(object.eventJoined) - ? Boolean(object.eventJoined) - : false, - transferred: isSet(object.transferred) - ? Boolean(object.transferred) - : false, - driveLastPlayedAt: isSet(object.driveLastPlayedAt) - ? Number(object.driveLastPlayedAt) - : 0, - }; - }, - - toJSON(message: LoadUserResponse_CarState): unknown { - const obj: any = {}; - message.hasOpponentGhost !== undefined && - (obj.hasOpponentGhost = message.hasOpponentGhost); - message.competitionState !== undefined && - (obj.competitionState = ghostCompetitionParticipantStateToJSON( - message.competitionState - )); - message.toBeDeleted !== undefined && - (obj.toBeDeleted = message.toBeDeleted); - message.eventJoined !== undefined && - (obj.eventJoined = message.eventJoined); - message.transferred !== undefined && - (obj.transferred = message.transferred); - message.driveLastPlayedAt !== undefined && - (obj.driveLastPlayedAt = Math.round(message.driveLastPlayedAt)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadUserResponse_CarState { - const message = createBaseLoadUserResponse_CarState(); - message.hasOpponentGhost = object.hasOpponentGhost ?? false; - message.competitionState = object.competitionState ?? 1; - message.toBeDeleted = object.toBeDeleted ?? false; - message.eventJoined = object.eventJoined ?? false; - message.transferred = object.transferred ?? false; - message.driveLastPlayedAt = object.driveLastPlayedAt ?? 0; - return message; - }, -}; - -function createBaseUpdateUserSessionRequest(): UpdateUserSessionRequest { - return { - userId: 0, - cardChipId: "", - accessCode: "", - cardTypeCode: 0, - cardRegionCode: 0, - device: 0, - unlockAt: 0, - acceptVs: false, - }; -} - -export const UpdateUserSessionRequest = { - encode( - message: UpdateUserSessionRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.userId !== 0) { - writer.uint32(8).uint32(message.userId); - } - if (message.cardChipId !== "") { - writer.uint32(18).string(message.cardChipId); - } - if (message.accessCode !== "") { - writer.uint32(26).string(message.accessCode); - } - if (message.cardTypeCode !== 0) { - writer.uint32(32).uint32(message.cardTypeCode); - } - if (message.cardRegionCode !== 0) { - writer.uint32(40).uint32(message.cardRegionCode); - } - if (message.device !== 0) { - writer.uint32(48).int32(message.device); - } - if (message.unlockAt !== 0) { - writer.uint32(56).uint32(message.unlockAt); - } - if (message.acceptVs === true) { - writer.uint32(64).bool(message.acceptVs); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): UpdateUserSessionRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateUserSessionRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userId = reader.uint32(); - break; - case 2: - message.cardChipId = reader.string(); - break; - case 3: - message.accessCode = reader.string(); - break; - case 4: - message.cardTypeCode = reader.uint32(); - break; - case 5: - message.cardRegionCode = reader.uint32(); - break; - case 6: - message.device = reader.int32() as any; - break; - case 7: - message.unlockAt = reader.uint32(); - break; - case 8: - message.acceptVs = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateUserSessionRequest { - return { - userId: isSet(object.userId) ? Number(object.userId) : 0, - cardChipId: isSet(object.cardChipId) ? String(object.cardChipId) : "", - accessCode: isSet(object.accessCode) ? String(object.accessCode) : "", - cardTypeCode: isSet(object.cardTypeCode) - ? Number(object.cardTypeCode) - : 0, - cardRegionCode: isSet(object.cardRegionCode) - ? Number(object.cardRegionCode) - : 0, - device: isSet(object.device) ? deviceTypeFromJSON(object.device) : 0, - unlockAt: isSet(object.unlockAt) ? Number(object.unlockAt) : 0, - acceptVs: isSet(object.acceptVs) ? Boolean(object.acceptVs) : false, - }; - }, - - toJSON(message: UpdateUserSessionRequest): unknown { - const obj: any = {}; - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - message.cardChipId !== undefined && (obj.cardChipId = message.cardChipId); - message.accessCode !== undefined && (obj.accessCode = message.accessCode); - message.cardTypeCode !== undefined && - (obj.cardTypeCode = Math.round(message.cardTypeCode)); - message.cardRegionCode !== undefined && - (obj.cardRegionCode = Math.round(message.cardRegionCode)); - message.device !== undefined && - (obj.device = deviceTypeToJSON(message.device)); - message.unlockAt !== undefined && - (obj.unlockAt = Math.round(message.unlockAt)); - message.acceptVs !== undefined && (obj.acceptVs = message.acceptVs); - return obj; - }, - - fromPartial, I>>( - object: I - ): UpdateUserSessionRequest { - const message = createBaseUpdateUserSessionRequest(); - message.userId = object.userId ?? 0; - message.cardChipId = object.cardChipId ?? ""; - message.accessCode = object.accessCode ?? ""; - message.cardTypeCode = object.cardTypeCode ?? 0; - message.cardRegionCode = object.cardRegionCode ?? 0; - message.device = object.device ?? 0; - message.unlockAt = object.unlockAt ?? 0; - message.acceptVs = object.acceptVs ?? false; - return message; - }, -}; - -function createBaseUpdateUserSessionResponse(): UpdateUserSessionResponse { - return { error: 0 }; -} - -export const UpdateUserSessionResponse = { - encode( - message: UpdateUserSessionResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): UpdateUserSessionResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateUserSessionResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateUserSessionResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: UpdateUserSessionResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): UpdateUserSessionResponse { - const message = createBaseUpdateUserSessionResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseLoadDriveInformationRequest(): LoadDriveInformationRequest { - return { userId: 0 }; -} - -export const LoadDriveInformationRequest = { - encode( - message: LoadDriveInformationRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.userId !== 0) { - writer.uint32(8).uint32(message.userId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadDriveInformationRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadDriveInformationRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadDriveInformationRequest { - return { - userId: isSet(object.userId) ? Number(object.userId) : 0, - }; - }, - - toJSON(message: LoadDriveInformationRequest): unknown { - const obj: any = {}; - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadDriveInformationRequest { - const message = createBaseLoadDriveInformationRequest(); - message.userId = object.userId ?? 0; - return message; - }, -}; - -function createBaseLoadDriveInformationResponse(): LoadDriveInformationResponse { - return { - error: 0, - noticeWindow: [], - noticeWindowMessage: [], - transferNotice: undefined, - restrictedModels: [], - announceFeature: false, - announceMobile: false, - availableTickets: [], - }; -} - -export const LoadDriveInformationResponse = { - encode( - message: LoadDriveInformationResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - writer.uint32(18).fork(); - for (const v of message.noticeWindow) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.noticeWindowMessage) { - writer.uint32(26).string(v!); - } - if (message.transferNotice !== undefined) { - TransferNotice.encode( - message.transferNotice, - writer.uint32(34).fork() - ).ldelim(); - } - writer.uint32(50).fork(); - for (const v of message.restrictedModels) { - writer.uint32(v); - } - writer.ldelim(); - if (message.announceFeature === true) { - writer.uint32(56).bool(message.announceFeature); - } - if (message.announceMobile === true) { - writer.uint32(64).bool(message.announceMobile); - } - for (const v of message.availableTickets) { - UserItem.encode(v!, writer.uint32(74).fork()).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadDriveInformationResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadDriveInformationResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.noticeWindow.push(reader.int32() as any); - } - } else { - message.noticeWindow.push(reader.int32() as any); - } - break; - case 3: - message.noticeWindowMessage.push(reader.string()); - break; - case 4: - message.transferNotice = TransferNotice.decode( - reader, - reader.uint32() - ); - break; - case 6: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.restrictedModels.push(reader.uint32()); - } - } else { - message.restrictedModels.push(reader.uint32()); - } - break; - case 7: - message.announceFeature = reader.bool(); - break; - case 8: - message.announceMobile = reader.bool(); - break; - case 9: - message.availableTickets.push( - UserItem.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadDriveInformationResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - noticeWindow: Array.isArray(object?.noticeWindow) - ? object.noticeWindow.map((e: any) => noticeEntryFromJSON(e)) - : [], - noticeWindowMessage: Array.isArray(object?.noticeWindowMessage) - ? object.noticeWindowMessage.map((e: any) => String(e)) - : [], - transferNotice: isSet(object.transferNotice) - ? TransferNotice.fromJSON(object.transferNotice) - : undefined, - restrictedModels: Array.isArray(object?.restrictedModels) - ? object.restrictedModels.map((e: any) => Number(e)) - : [], - announceFeature: isSet(object.announceFeature) - ? Boolean(object.announceFeature) - : false, - announceMobile: isSet(object.announceMobile) - ? Boolean(object.announceMobile) - : false, - availableTickets: Array.isArray(object?.availableTickets) - ? object.availableTickets.map((e: any) => UserItem.fromJSON(e)) - : [], - }; - }, - - toJSON(message: LoadDriveInformationResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - if (message.noticeWindow) { - obj.noticeWindow = message.noticeWindow.map((e) => noticeEntryToJSON(e)); - } else { - obj.noticeWindow = []; - } - if (message.noticeWindowMessage) { - obj.noticeWindowMessage = message.noticeWindowMessage.map((e) => e); - } else { - obj.noticeWindowMessage = []; - } - message.transferNotice !== undefined && - (obj.transferNotice = message.transferNotice - ? TransferNotice.toJSON(message.transferNotice) - : undefined); - if (message.restrictedModels) { - obj.restrictedModels = message.restrictedModels.map((e) => Math.round(e)); - } else { - obj.restrictedModels = []; - } - message.announceFeature !== undefined && - (obj.announceFeature = message.announceFeature); - message.announceMobile !== undefined && - (obj.announceMobile = message.announceMobile); - if (message.availableTickets) { - obj.availableTickets = message.availableTickets.map((e) => - e ? UserItem.toJSON(e) : undefined - ); - } else { - obj.availableTickets = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadDriveInformationResponse { - const message = createBaseLoadDriveInformationResponse(); - message.error = object.error ?? 0; - message.noticeWindow = object.noticeWindow?.map((e) => e) || []; - message.noticeWindowMessage = - object.noticeWindowMessage?.map((e) => e) || []; - message.transferNotice = - object.transferNotice !== undefined && object.transferNotice !== null - ? TransferNotice.fromPartial(object.transferNotice) - : undefined; - message.restrictedModels = object.restrictedModels?.map((e) => e) || []; - message.announceFeature = object.announceFeature ?? false; - message.announceMobile = object.announceMobile ?? false; - message.availableTickets = - object.availableTickets?.map((e) => UserItem.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseLoadCarRequest(): LoadCarRequest { - return { carId: 0, eventMode: false, eventModeSerial: "" }; -} - -export const LoadCarRequest = { - encode( - message: LoadCarRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.eventMode === true) { - writer.uint32(16).bool(message.eventMode); - } - if (message.eventModeSerial !== "") { - writer.uint32(26).string(message.eventModeSerial); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): LoadCarRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadCarRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.eventMode = reader.bool(); - break; - case 3: - message.eventModeSerial = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadCarRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - eventMode: isSet(object.eventMode) ? Boolean(object.eventMode) : false, - eventModeSerial: isSet(object.eventModeSerial) - ? String(object.eventModeSerial) - : "", - }; - }, - - toJSON(message: LoadCarRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.eventMode !== undefined && (obj.eventMode = message.eventMode); - message.eventModeSerial !== undefined && - (obj.eventModeSerial = message.eventModeSerial); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadCarRequest { - const message = createBaseLoadCarRequest(); - message.carId = object.carId ?? 0; - message.eventMode = object.eventMode ?? false; - message.eventModeSerial = object.eventModeSerial ?? ""; - return message; - }, -}; - -function createBaseLoadCarResponse(): LoadCarResponse { - return { - error: 0, - car: undefined, - tuningPoint: 0, - odometer: 0, - playCount: 0, - earnedCustomColor: false, - setting: undefined, - vsPlayCount: 0, - vsBurstCount: 0, - vsStarCount: 0, - vsStarCountMax: 0, - vsCoolOrWild: 0, - vsSmoothOrRough: 0, - vsTripleStarMedals: 0, - vsDoubleStarMedals: 0, - vsSingleStarMedals: 0, - vsPlainMedals: 0, - rgPlayCount: 0, - rgWinCount: 0, - rgTrophy: 0, - rgPreviousVersionPlayCount: 0, - rgScore: 0, - rgRegionMapScore: [], - rgRegions: [], - rgStamp: 0, - rgAcquireAllCrowns: false, - dressupLevel: 0, - dressupPoint: 0, - stPlayCount: 0, - stClearBits: 0, - stClearDivCount: 0, - stClearCount: 0, - stLoseBits: 0, - stConsecutiveWins: 0, - stConsecutiveWinsMax: 0, - stCompleted100Episodes: false, - challenger: undefined, - challengerReturnCount: 0, - numOfChallengers: 0, - opponentGhost: undefined, - opponentTrailId: 0, - opponentCompetitionId: 0, - competitionParameter: undefined, - specialTitles: [], - earnedTitles: [], - ownedItems: [], - auraMotifAutoChange: false, - screenshotCount: 0, - announceEventModePrize: false, - transferred: false, - driveLastPlayedAt: 0, - insurance: undefined, - }; -} - -export const LoadCarResponse = { - encode( - message: LoadCarResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(18).fork()).ldelim(); - } - if (message.tuningPoint !== 0) { - writer.uint32(24).uint32(message.tuningPoint); - } - if (message.odometer !== 0) { - writer.uint32(48).uint32(message.odometer); - } - if (message.playCount !== 0) { - writer.uint32(56).uint32(message.playCount); - } - if (message.earnedCustomColor === true) { - writer.uint32(64).bool(message.earnedCustomColor); - } - if (message.setting !== undefined) { - CarSetting.encode(message.setting, writer.uint32(82).fork()).ldelim(); - } - if (message.vsPlayCount !== 0) { - writer.uint32(96).uint32(message.vsPlayCount); - } - if (message.vsBurstCount !== 0) { - writer.uint32(104).uint32(message.vsBurstCount); - } - if (message.vsStarCount !== 0) { - writer.uint32(112).uint32(message.vsStarCount); - } - if (message.vsStarCountMax !== 0) { - writer.uint32(120).uint32(message.vsStarCountMax); - } - if (message.vsCoolOrWild !== 0) { - writer.uint32(128).sint32(message.vsCoolOrWild); - } - if (message.vsSmoothOrRough !== 0) { - writer.uint32(136).sint32(message.vsSmoothOrRough); - } - if (message.vsTripleStarMedals !== 0) { - writer.uint32(144).uint32(message.vsTripleStarMedals); - } - if (message.vsDoubleStarMedals !== 0) { - writer.uint32(152).uint32(message.vsDoubleStarMedals); - } - if (message.vsSingleStarMedals !== 0) { - writer.uint32(160).uint32(message.vsSingleStarMedals); - } - if (message.vsPlainMedals !== 0) { - writer.uint32(168).uint32(message.vsPlainMedals); - } - if (message.rgPlayCount !== 0) { - writer.uint32(176).uint32(message.rgPlayCount); - } - if (message.rgWinCount !== 0) { - writer.uint32(184).uint32(message.rgWinCount); - } - if (message.rgTrophy !== 0) { - writer.uint32(192).uint32(message.rgTrophy); - } - if (message.rgPreviousVersionPlayCount !== 0) { - writer.uint32(512).uint32(message.rgPreviousVersionPlayCount); - } - if (message.rgScore !== 0) { - writer.uint32(200).uint32(message.rgScore); - } - writer.uint32(210).fork(); - for (const v of message.rgRegionMapScore) { - writer.uint32(v); - } - writer.ldelim(); - writer.uint32(242).fork(); - for (const v of message.rgRegions) { - writer.uint32(v); - } - writer.ldelim(); - if (message.rgStamp !== 0) { - writer.uint32(216).uint32(message.rgStamp); - } - if (message.rgAcquireAllCrowns === true) { - writer.uint32(472).bool(message.rgAcquireAllCrowns); - } - if (message.dressupLevel !== 0) { - writer.uint32(224).uint32(message.dressupLevel); - } - if (message.dressupPoint !== 0) { - writer.uint32(232).uint32(message.dressupPoint); - } - if (message.stPlayCount !== 0) { - writer.uint32(272).uint32(message.stPlayCount); - } - if (message.stClearBits !== 0) { - writer.uint32(280).uint32(message.stClearBits); - } - if (message.stClearDivCount !== 0) { - writer.uint32(288).uint32(message.stClearDivCount); - } - if (message.stClearCount !== 0) { - writer.uint32(296).uint32(message.stClearCount); - } - if (message.stLoseBits !== 0) { - writer.uint32(304).uint64(message.stLoseBits); - } - if (message.stConsecutiveWins !== 0) { - writer.uint32(320).uint32(message.stConsecutiveWins); - } - if (message.stConsecutiveWinsMax !== 0) { - writer.uint32(328).uint32(message.stConsecutiveWinsMax); - } - if (message.stCompleted100Episodes === true) { - writer.uint32(504).bool(message.stCompleted100Episodes); - } - if (message.challenger !== undefined) { - ChallengerCar.encode( - message.challenger, - writer.uint32(338).fork() - ).ldelim(); - } - if (message.challengerReturnCount !== 0) { - writer.uint32(344).uint32(message.challengerReturnCount); - } - if (message.numOfChallengers !== 0) { - writer.uint32(440).uint32(message.numOfChallengers); - } - if (message.opponentGhost !== undefined) { - GhostCar.encode( - message.opponentGhost, - writer.uint32(354).fork() - ).ldelim(); - } - if (message.opponentTrailId !== 0) { - writer.uint32(360).uint64(message.opponentTrailId); - } - if (message.opponentCompetitionId !== 0) { - writer.uint32(368).uint32(message.opponentCompetitionId); - } - if (message.competitionParameter !== undefined) { - GhostCompetitionParameter.encode( - message.competitionParameter, - writer.uint32(378).fork() - ).ldelim(); - } - for (const v of message.specialTitles) { - writer.uint32(386).string(v!); - } - for (const v of message.earnedTitles) { - writer.uint32(394).string(v!); - } - for (const v of message.ownedItems) { - CarItem.encode(v!, writer.uint32(402).fork()).ldelim(); - } - if (message.auraMotifAutoChange === true) { - writer.uint32(408).bool(message.auraMotifAutoChange); - } - if (message.screenshotCount !== 0) { - writer.uint32(424).uint32(message.screenshotCount); - } - if (message.announceEventModePrize === true) { - writer.uint32(464).bool(message.announceEventModePrize); - } - if (message.transferred === true) { - writer.uint32(480).bool(message.transferred); - } - if (message.driveLastPlayedAt !== 0) { - writer.uint32(488).uint32(message.driveLastPlayedAt); - } - if (message.insurance !== undefined) { - LoadCarResponse_StoryInsurance.encode( - message.insurance, - writer.uint32(498).fork() - ).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): LoadCarResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadCarResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.car = Car.decode(reader, reader.uint32()); - break; - case 3: - message.tuningPoint = reader.uint32(); - break; - case 6: - message.odometer = reader.uint32(); - break; - case 7: - message.playCount = reader.uint32(); - break; - case 8: - message.earnedCustomColor = reader.bool(); - break; - case 10: - message.setting = CarSetting.decode(reader, reader.uint32()); - break; - case 12: - message.vsPlayCount = reader.uint32(); - break; - case 13: - message.vsBurstCount = reader.uint32(); - break; - case 14: - message.vsStarCount = reader.uint32(); - break; - case 15: - message.vsStarCountMax = reader.uint32(); - break; - case 16: - message.vsCoolOrWild = reader.sint32(); - break; - case 17: - message.vsSmoothOrRough = reader.sint32(); - break; - case 18: - message.vsTripleStarMedals = reader.uint32(); - break; - case 19: - message.vsDoubleStarMedals = reader.uint32(); - break; - case 20: - message.vsSingleStarMedals = reader.uint32(); - break; - case 21: - message.vsPlainMedals = reader.uint32(); - break; - case 22: - message.rgPlayCount = reader.uint32(); - break; - case 23: - message.rgWinCount = reader.uint32(); - break; - case 24: - message.rgTrophy = reader.uint32(); - break; - case 64: - message.rgPreviousVersionPlayCount = reader.uint32(); - break; - case 25: - message.rgScore = reader.uint32(); - break; - case 26: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.rgRegionMapScore.push(reader.uint32()); - } - } else { - message.rgRegionMapScore.push(reader.uint32()); - } - break; - case 30: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.rgRegions.push(reader.uint32()); - } - } else { - message.rgRegions.push(reader.uint32()); - } - break; - case 27: - message.rgStamp = reader.uint32(); - break; - case 59: - message.rgAcquireAllCrowns = reader.bool(); - break; - case 28: - message.dressupLevel = reader.uint32(); - break; - case 29: - message.dressupPoint = reader.uint32(); - break; - case 34: - message.stPlayCount = reader.uint32(); - break; - case 35: - message.stClearBits = reader.uint32(); - break; - case 36: - message.stClearDivCount = reader.uint32(); - break; - case 37: - message.stClearCount = reader.uint32(); - break; - case 38: - message.stLoseBits = longToNumber(reader.uint64() as Long); - break; - case 40: - message.stConsecutiveWins = reader.uint32(); - break; - case 41: - message.stConsecutiveWinsMax = reader.uint32(); - break; - case 63: - message.stCompleted100Episodes = reader.bool(); - break; - case 42: - message.challenger = ChallengerCar.decode(reader, reader.uint32()); - break; - case 43: - message.challengerReturnCount = reader.uint32(); - break; - case 55: - message.numOfChallengers = reader.uint32(); - break; - case 44: - message.opponentGhost = GhostCar.decode(reader, reader.uint32()); - break; - case 45: - message.opponentTrailId = longToNumber(reader.uint64() as Long); - break; - case 46: - message.opponentCompetitionId = reader.uint32(); - break; - case 47: - message.competitionParameter = GhostCompetitionParameter.decode( - reader, - reader.uint32() - ); - break; - case 48: - message.specialTitles.push(reader.string()); - break; - case 49: - message.earnedTitles.push(reader.string()); - break; - case 50: - message.ownedItems.push(CarItem.decode(reader, reader.uint32())); - break; - case 51: - message.auraMotifAutoChange = reader.bool(); - break; - case 53: - message.screenshotCount = reader.uint32(); - break; - case 58: - message.announceEventModePrize = reader.bool(); - break; - case 60: - message.transferred = reader.bool(); - break; - case 61: - message.driveLastPlayedAt = reader.uint32(); - break; - case 62: - message.insurance = LoadCarResponse_StoryInsurance.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadCarResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - tuningPoint: isSet(object.tuningPoint) ? Number(object.tuningPoint) : 0, - odometer: isSet(object.odometer) ? Number(object.odometer) : 0, - playCount: isSet(object.playCount) ? Number(object.playCount) : 0, - earnedCustomColor: isSet(object.earnedCustomColor) - ? Boolean(object.earnedCustomColor) - : false, - setting: isSet(object.setting) - ? CarSetting.fromJSON(object.setting) - : undefined, - vsPlayCount: isSet(object.vsPlayCount) ? Number(object.vsPlayCount) : 0, - vsBurstCount: isSet(object.vsBurstCount) - ? Number(object.vsBurstCount) - : 0, - vsStarCount: isSet(object.vsStarCount) ? Number(object.vsStarCount) : 0, - vsStarCountMax: isSet(object.vsStarCountMax) - ? Number(object.vsStarCountMax) - : 0, - vsCoolOrWild: isSet(object.vsCoolOrWild) - ? Number(object.vsCoolOrWild) - : 0, - vsSmoothOrRough: isSet(object.vsSmoothOrRough) - ? Number(object.vsSmoothOrRough) - : 0, - vsTripleStarMedals: isSet(object.vsTripleStarMedals) - ? Number(object.vsTripleStarMedals) - : 0, - vsDoubleStarMedals: isSet(object.vsDoubleStarMedals) - ? Number(object.vsDoubleStarMedals) - : 0, - vsSingleStarMedals: isSet(object.vsSingleStarMedals) - ? Number(object.vsSingleStarMedals) - : 0, - vsPlainMedals: isSet(object.vsPlainMedals) - ? Number(object.vsPlainMedals) - : 0, - rgPlayCount: isSet(object.rgPlayCount) ? Number(object.rgPlayCount) : 0, - rgWinCount: isSet(object.rgWinCount) ? Number(object.rgWinCount) : 0, - rgTrophy: isSet(object.rgTrophy) ? Number(object.rgTrophy) : 0, - rgPreviousVersionPlayCount: isSet(object.rgPreviousVersionPlayCount) - ? Number(object.rgPreviousVersionPlayCount) - : 0, - rgScore: isSet(object.rgScore) ? Number(object.rgScore) : 0, - rgRegionMapScore: Array.isArray(object?.rgRegionMapScore) - ? object.rgRegionMapScore.map((e: any) => Number(e)) - : [], - rgRegions: Array.isArray(object?.rgRegions) - ? object.rgRegions.map((e: any) => Number(e)) - : [], - rgStamp: isSet(object.rgStamp) ? Number(object.rgStamp) : 0, - rgAcquireAllCrowns: isSet(object.rgAcquireAllCrowns) - ? Boolean(object.rgAcquireAllCrowns) - : false, - dressupLevel: isSet(object.dressupLevel) - ? Number(object.dressupLevel) - : 0, - dressupPoint: isSet(object.dressupPoint) - ? Number(object.dressupPoint) - : 0, - stPlayCount: isSet(object.stPlayCount) ? Number(object.stPlayCount) : 0, - stClearBits: isSet(object.stClearBits) ? Number(object.stClearBits) : 0, - stClearDivCount: isSet(object.stClearDivCount) - ? Number(object.stClearDivCount) - : 0, - stClearCount: isSet(object.stClearCount) - ? Number(object.stClearCount) - : 0, - stLoseBits: isSet(object.stLoseBits) ? Number(object.stLoseBits) : 0, - stConsecutiveWins: isSet(object.stConsecutiveWins) - ? Number(object.stConsecutiveWins) - : 0, - stConsecutiveWinsMax: isSet(object.stConsecutiveWinsMax) - ? Number(object.stConsecutiveWinsMax) - : 0, - stCompleted100Episodes: isSet(object.stCompleted100Episodes) - ? Boolean(object.stCompleted100Episodes) - : false, - challenger: isSet(object.challenger) - ? ChallengerCar.fromJSON(object.challenger) - : undefined, - challengerReturnCount: isSet(object.challengerReturnCount) - ? Number(object.challengerReturnCount) - : 0, - numOfChallengers: isSet(object.numOfChallengers) - ? Number(object.numOfChallengers) - : 0, - opponentGhost: isSet(object.opponentGhost) - ? GhostCar.fromJSON(object.opponentGhost) - : undefined, - opponentTrailId: isSet(object.opponentTrailId) - ? Number(object.opponentTrailId) - : 0, - opponentCompetitionId: isSet(object.opponentCompetitionId) - ? Number(object.opponentCompetitionId) - : 0, - competitionParameter: isSet(object.competitionParameter) - ? GhostCompetitionParameter.fromJSON(object.competitionParameter) - : undefined, - specialTitles: Array.isArray(object?.specialTitles) - ? object.specialTitles.map((e: any) => String(e)) - : [], - earnedTitles: Array.isArray(object?.earnedTitles) - ? object.earnedTitles.map((e: any) => String(e)) - : [], - ownedItems: Array.isArray(object?.ownedItems) - ? object.ownedItems.map((e: any) => CarItem.fromJSON(e)) - : [], - auraMotifAutoChange: isSet(object.auraMotifAutoChange) - ? Boolean(object.auraMotifAutoChange) - : false, - screenshotCount: isSet(object.screenshotCount) - ? Number(object.screenshotCount) - : 0, - announceEventModePrize: isSet(object.announceEventModePrize) - ? Boolean(object.announceEventModePrize) - : false, - transferred: isSet(object.transferred) - ? Boolean(object.transferred) - : false, - driveLastPlayedAt: isSet(object.driveLastPlayedAt) - ? Number(object.driveLastPlayedAt) - : 0, - insurance: isSet(object.insurance) - ? LoadCarResponse_StoryInsurance.fromJSON(object.insurance) - : undefined, - }; - }, - - toJSON(message: LoadCarResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - message.tuningPoint !== undefined && - (obj.tuningPoint = Math.round(message.tuningPoint)); - message.odometer !== undefined && - (obj.odometer = Math.round(message.odometer)); - message.playCount !== undefined && - (obj.playCount = Math.round(message.playCount)); - message.earnedCustomColor !== undefined && - (obj.earnedCustomColor = message.earnedCustomColor); - message.setting !== undefined && - (obj.setting = message.setting - ? CarSetting.toJSON(message.setting) - : undefined); - message.vsPlayCount !== undefined && - (obj.vsPlayCount = Math.round(message.vsPlayCount)); - message.vsBurstCount !== undefined && - (obj.vsBurstCount = Math.round(message.vsBurstCount)); - message.vsStarCount !== undefined && - (obj.vsStarCount = Math.round(message.vsStarCount)); - message.vsStarCountMax !== undefined && - (obj.vsStarCountMax = Math.round(message.vsStarCountMax)); - message.vsCoolOrWild !== undefined && - (obj.vsCoolOrWild = Math.round(message.vsCoolOrWild)); - message.vsSmoothOrRough !== undefined && - (obj.vsSmoothOrRough = Math.round(message.vsSmoothOrRough)); - message.vsTripleStarMedals !== undefined && - (obj.vsTripleStarMedals = Math.round(message.vsTripleStarMedals)); - message.vsDoubleStarMedals !== undefined && - (obj.vsDoubleStarMedals = Math.round(message.vsDoubleStarMedals)); - message.vsSingleStarMedals !== undefined && - (obj.vsSingleStarMedals = Math.round(message.vsSingleStarMedals)); - message.vsPlainMedals !== undefined && - (obj.vsPlainMedals = Math.round(message.vsPlainMedals)); - message.rgPlayCount !== undefined && - (obj.rgPlayCount = Math.round(message.rgPlayCount)); - message.rgWinCount !== undefined && - (obj.rgWinCount = Math.round(message.rgWinCount)); - message.rgTrophy !== undefined && - (obj.rgTrophy = Math.round(message.rgTrophy)); - message.rgPreviousVersionPlayCount !== undefined && - (obj.rgPreviousVersionPlayCount = Math.round( - message.rgPreviousVersionPlayCount - )); - message.rgScore !== undefined && - (obj.rgScore = Math.round(message.rgScore)); - if (message.rgRegionMapScore) { - obj.rgRegionMapScore = message.rgRegionMapScore.map((e) => Math.round(e)); - } else { - obj.rgRegionMapScore = []; - } - if (message.rgRegions) { - obj.rgRegions = message.rgRegions.map((e) => Math.round(e)); - } else { - obj.rgRegions = []; - } - message.rgStamp !== undefined && - (obj.rgStamp = Math.round(message.rgStamp)); - message.rgAcquireAllCrowns !== undefined && - (obj.rgAcquireAllCrowns = message.rgAcquireAllCrowns); - message.dressupLevel !== undefined && - (obj.dressupLevel = Math.round(message.dressupLevel)); - message.dressupPoint !== undefined && - (obj.dressupPoint = Math.round(message.dressupPoint)); - message.stPlayCount !== undefined && - (obj.stPlayCount = Math.round(message.stPlayCount)); - message.stClearBits !== undefined && - (obj.stClearBits = Math.round(message.stClearBits)); - message.stClearDivCount !== undefined && - (obj.stClearDivCount = Math.round(message.stClearDivCount)); - message.stClearCount !== undefined && - (obj.stClearCount = Math.round(message.stClearCount)); - message.stLoseBits !== undefined && - (obj.stLoseBits = Math.round(message.stLoseBits)); - message.stConsecutiveWins !== undefined && - (obj.stConsecutiveWins = Math.round(message.stConsecutiveWins)); - message.stConsecutiveWinsMax !== undefined && - (obj.stConsecutiveWinsMax = Math.round(message.stConsecutiveWinsMax)); - message.stCompleted100Episodes !== undefined && - (obj.stCompleted100Episodes = message.stCompleted100Episodes); - message.challenger !== undefined && - (obj.challenger = message.challenger - ? ChallengerCar.toJSON(message.challenger) - : undefined); - message.challengerReturnCount !== undefined && - (obj.challengerReturnCount = Math.round(message.challengerReturnCount)); - message.numOfChallengers !== undefined && - (obj.numOfChallengers = Math.round(message.numOfChallengers)); - message.opponentGhost !== undefined && - (obj.opponentGhost = message.opponentGhost - ? GhostCar.toJSON(message.opponentGhost) - : undefined); - message.opponentTrailId !== undefined && - (obj.opponentTrailId = Math.round(message.opponentTrailId)); - message.opponentCompetitionId !== undefined && - (obj.opponentCompetitionId = Math.round(message.opponentCompetitionId)); - message.competitionParameter !== undefined && - (obj.competitionParameter = message.competitionParameter - ? GhostCompetitionParameter.toJSON(message.competitionParameter) - : undefined); - if (message.specialTitles) { - obj.specialTitles = message.specialTitles.map((e) => e); - } else { - obj.specialTitles = []; - } - if (message.earnedTitles) { - obj.earnedTitles = message.earnedTitles.map((e) => e); - } else { - obj.earnedTitles = []; - } - if (message.ownedItems) { - obj.ownedItems = message.ownedItems.map((e) => - e ? CarItem.toJSON(e) : undefined - ); - } else { - obj.ownedItems = []; - } - message.auraMotifAutoChange !== undefined && - (obj.auraMotifAutoChange = message.auraMotifAutoChange); - message.screenshotCount !== undefined && - (obj.screenshotCount = Math.round(message.screenshotCount)); - message.announceEventModePrize !== undefined && - (obj.announceEventModePrize = message.announceEventModePrize); - message.transferred !== undefined && - (obj.transferred = message.transferred); - message.driveLastPlayedAt !== undefined && - (obj.driveLastPlayedAt = Math.round(message.driveLastPlayedAt)); - message.insurance !== undefined && - (obj.insurance = message.insurance - ? LoadCarResponse_StoryInsurance.toJSON(message.insurance) - : undefined); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadCarResponse { - const message = createBaseLoadCarResponse(); - message.error = object.error ?? 0; - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - message.tuningPoint = object.tuningPoint ?? 0; - message.odometer = object.odometer ?? 0; - message.playCount = object.playCount ?? 0; - message.earnedCustomColor = object.earnedCustomColor ?? false; - message.setting = - object.setting !== undefined && object.setting !== null - ? CarSetting.fromPartial(object.setting) - : undefined; - message.vsPlayCount = object.vsPlayCount ?? 0; - message.vsBurstCount = object.vsBurstCount ?? 0; - message.vsStarCount = object.vsStarCount ?? 0; - message.vsStarCountMax = object.vsStarCountMax ?? 0; - message.vsCoolOrWild = object.vsCoolOrWild ?? 0; - message.vsSmoothOrRough = object.vsSmoothOrRough ?? 0; - message.vsTripleStarMedals = object.vsTripleStarMedals ?? 0; - message.vsDoubleStarMedals = object.vsDoubleStarMedals ?? 0; - message.vsSingleStarMedals = object.vsSingleStarMedals ?? 0; - message.vsPlainMedals = object.vsPlainMedals ?? 0; - message.rgPlayCount = object.rgPlayCount ?? 0; - message.rgWinCount = object.rgWinCount ?? 0; - message.rgTrophy = object.rgTrophy ?? 0; - message.rgPreviousVersionPlayCount = object.rgPreviousVersionPlayCount ?? 0; - message.rgScore = object.rgScore ?? 0; - message.rgRegionMapScore = object.rgRegionMapScore?.map((e) => e) || []; - message.rgRegions = object.rgRegions?.map((e) => e) || []; - message.rgStamp = object.rgStamp ?? 0; - message.rgAcquireAllCrowns = object.rgAcquireAllCrowns ?? false; - message.dressupLevel = object.dressupLevel ?? 0; - message.dressupPoint = object.dressupPoint ?? 0; - message.stPlayCount = object.stPlayCount ?? 0; - message.stClearBits = object.stClearBits ?? 0; - message.stClearDivCount = object.stClearDivCount ?? 0; - message.stClearCount = object.stClearCount ?? 0; - message.stLoseBits = object.stLoseBits ?? 0; - message.stConsecutiveWins = object.stConsecutiveWins ?? 0; - message.stConsecutiveWinsMax = object.stConsecutiveWinsMax ?? 0; - message.stCompleted100Episodes = object.stCompleted100Episodes ?? false; - message.challenger = - object.challenger !== undefined && object.challenger !== null - ? ChallengerCar.fromPartial(object.challenger) - : undefined; - message.challengerReturnCount = object.challengerReturnCount ?? 0; - message.numOfChallengers = object.numOfChallengers ?? 0; - message.opponentGhost = - object.opponentGhost !== undefined && object.opponentGhost !== null - ? GhostCar.fromPartial(object.opponentGhost) - : undefined; - message.opponentTrailId = object.opponentTrailId ?? 0; - message.opponentCompetitionId = object.opponentCompetitionId ?? 0; - message.competitionParameter = - object.competitionParameter !== undefined && - object.competitionParameter !== null - ? GhostCompetitionParameter.fromPartial(object.competitionParameter) - : undefined; - message.specialTitles = object.specialTitles?.map((e) => e) || []; - message.earnedTitles = object.earnedTitles?.map((e) => e) || []; - message.ownedItems = - object.ownedItems?.map((e) => CarItem.fromPartial(e)) || []; - message.auraMotifAutoChange = object.auraMotifAutoChange ?? false; - message.screenshotCount = object.screenshotCount ?? 0; - message.announceEventModePrize = object.announceEventModePrize ?? false; - message.transferred = object.transferred ?? false; - message.driveLastPlayedAt = object.driveLastPlayedAt ?? 0; - message.insurance = - object.insurance !== undefined && object.insurance !== null - ? LoadCarResponse_StoryInsurance.fromPartial(object.insurance) - : undefined; - return message; - }, -}; - -function createBaseLoadCarResponse_StoryInsurance(): LoadCarResponse_StoryInsurance { - return { numOfRemains: 0 }; -} - -export const LoadCarResponse_StoryInsurance = { - encode( - message: LoadCarResponse_StoryInsurance, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.numOfRemains !== 0) { - writer.uint32(8).uint32(message.numOfRemains); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadCarResponse_StoryInsurance { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadCarResponse_StoryInsurance(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numOfRemains = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadCarResponse_StoryInsurance { - return { - numOfRemains: isSet(object.numOfRemains) - ? Number(object.numOfRemains) - : 0, - }; - }, - - toJSON(message: LoadCarResponse_StoryInsurance): unknown { - const obj: any = {}; - message.numOfRemains !== undefined && - (obj.numOfRemains = Math.round(message.numOfRemains)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadCarResponse_StoryInsurance { - const message = createBaseLoadCarResponse_StoryInsurance(); - message.numOfRemains = object.numOfRemains ?? 0; - return message; - }, -}; - -function createBaseCreateCarRequest(): CreateCarRequest { - return { - userId: 0, - banapassportAmId: 0, - cardChipId: "", - accessCode: "", - cardTypeCode: 0, - cardRegionCode: 0, - device: 0, - car: undefined, - transmission: false, - timestamp: 0, - userItemId: 0, - deletedCarId: 0, - }; -} - -export const CreateCarRequest = { - encode( - message: CreateCarRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.userId !== 0) { - writer.uint32(8).uint32(message.userId); - } - if (message.banapassportAmId !== 0) { - writer.uint32(16).uint32(message.banapassportAmId); - } - if (message.cardChipId !== "") { - writer.uint32(26).string(message.cardChipId); - } - if (message.accessCode !== "") { - writer.uint32(34).string(message.accessCode); - } - if (message.cardTypeCode !== 0) { - writer.uint32(40).uint32(message.cardTypeCode); - } - if (message.cardRegionCode !== 0) { - writer.uint32(48).uint32(message.cardRegionCode); - } - if (message.device !== 0) { - writer.uint32(56).int32(message.device); - } - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(66).fork()).ldelim(); - } - if (message.transmission === true) { - writer.uint32(72).bool(message.transmission); - } - if (message.timestamp !== 0) { - writer.uint32(88).uint32(message.timestamp); - } - if (message.userItemId !== 0) { - writer.uint32(96).uint32(message.userItemId); - } - if (message.deletedCarId !== 0) { - writer.uint32(104).uint32(message.deletedCarId); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CreateCarRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateCarRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userId = reader.uint32(); - break; - case 2: - message.banapassportAmId = reader.uint32(); - break; - case 3: - message.cardChipId = reader.string(); - break; - case 4: - message.accessCode = reader.string(); - break; - case 5: - message.cardTypeCode = reader.uint32(); - break; - case 6: - message.cardRegionCode = reader.uint32(); - break; - case 7: - message.device = reader.int32() as any; - break; - case 8: - message.car = Car.decode(reader, reader.uint32()); - break; - case 9: - message.transmission = reader.bool(); - break; - case 11: - message.timestamp = reader.uint32(); - break; - case 12: - message.userItemId = reader.uint32(); - break; - case 13: - message.deletedCarId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CreateCarRequest { - return { - userId: isSet(object.userId) ? Number(object.userId) : 0, - banapassportAmId: isSet(object.banapassportAmId) - ? Number(object.banapassportAmId) - : 0, - cardChipId: isSet(object.cardChipId) ? String(object.cardChipId) : "", - accessCode: isSet(object.accessCode) ? String(object.accessCode) : "", - cardTypeCode: isSet(object.cardTypeCode) - ? Number(object.cardTypeCode) - : 0, - cardRegionCode: isSet(object.cardRegionCode) - ? Number(object.cardRegionCode) - : 0, - device: isSet(object.device) ? deviceTypeFromJSON(object.device) : 0, - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - transmission: isSet(object.transmission) - ? Boolean(object.transmission) - : false, - timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0, - userItemId: isSet(object.userItemId) ? Number(object.userItemId) : 0, - deletedCarId: isSet(object.deletedCarId) - ? Number(object.deletedCarId) - : 0, - }; - }, - - toJSON(message: CreateCarRequest): unknown { - const obj: any = {}; - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - message.banapassportAmId !== undefined && - (obj.banapassportAmId = Math.round(message.banapassportAmId)); - message.cardChipId !== undefined && (obj.cardChipId = message.cardChipId); - message.accessCode !== undefined && (obj.accessCode = message.accessCode); - message.cardTypeCode !== undefined && - (obj.cardTypeCode = Math.round(message.cardTypeCode)); - message.cardRegionCode !== undefined && - (obj.cardRegionCode = Math.round(message.cardRegionCode)); - message.device !== undefined && - (obj.device = deviceTypeToJSON(message.device)); - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - message.transmission !== undefined && - (obj.transmission = message.transmission); - message.timestamp !== undefined && - (obj.timestamp = Math.round(message.timestamp)); - message.userItemId !== undefined && - (obj.userItemId = Math.round(message.userItemId)); - message.deletedCarId !== undefined && - (obj.deletedCarId = Math.round(message.deletedCarId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): CreateCarRequest { - const message = createBaseCreateCarRequest(); - message.userId = object.userId ?? 0; - message.banapassportAmId = object.banapassportAmId ?? 0; - message.cardChipId = object.cardChipId ?? ""; - message.accessCode = object.accessCode ?? ""; - message.cardTypeCode = object.cardTypeCode ?? 0; - message.cardRegionCode = object.cardRegionCode ?? 0; - message.device = object.device ?? 0; - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - message.transmission = object.transmission ?? false; - message.timestamp = object.timestamp ?? 0; - message.userItemId = object.userItemId ?? 0; - message.deletedCarId = object.deletedCarId ?? 0; - return message; - }, -}; - -function createBaseCreateCarResponse(): CreateCarResponse { - return { - error: 0, - accessCode: "", - banapassportAmId: 0, - mbid: 0, - userId: 0, - carId: 0, - stClearBits: 0, - stClearDivCount: 0, - stClearCount: 0, - stLoseBits: 0, - stConsecutiveWins: 0, - stConsecutiveWinsMax: 0, - fullTunedCarCouponUnreceivableAt: 0, - }; -} - -export const CreateCarResponse = { - encode( - message: CreateCarResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - if (message.accessCode !== "") { - writer.uint32(18).string(message.accessCode); - } - if (message.banapassportAmId !== 0) { - writer.uint32(24).uint32(message.banapassportAmId); - } - if (message.mbid !== 0) { - writer.uint32(32).uint32(message.mbid); - } - if (message.userId !== 0) { - writer.uint32(40).uint32(message.userId); - } - if (message.carId !== 0) { - writer.uint32(48).uint32(message.carId); - } - if (message.stClearBits !== 0) { - writer.uint32(64).uint32(message.stClearBits); - } - if (message.stClearDivCount !== 0) { - writer.uint32(72).uint32(message.stClearDivCount); - } - if (message.stClearCount !== 0) { - writer.uint32(80).uint32(message.stClearCount); - } - if (message.stLoseBits !== 0) { - writer.uint32(88).uint64(message.stLoseBits); - } - if (message.stConsecutiveWins !== 0) { - writer.uint32(104).uint32(message.stConsecutiveWins); - } - if (message.stConsecutiveWinsMax !== 0) { - writer.uint32(112).uint32(message.stConsecutiveWinsMax); - } - if (message.fullTunedCarCouponUnreceivableAt !== 0) { - writer.uint32(136).uint32(message.fullTunedCarCouponUnreceivableAt); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CreateCarResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateCarResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.accessCode = reader.string(); - break; - case 3: - message.banapassportAmId = reader.uint32(); - break; - case 4: - message.mbid = reader.uint32(); - break; - case 5: - message.userId = reader.uint32(); - break; - case 6: - message.carId = reader.uint32(); - break; - case 8: - message.stClearBits = reader.uint32(); - break; - case 9: - message.stClearDivCount = reader.uint32(); - break; - case 10: - message.stClearCount = reader.uint32(); - break; - case 11: - message.stLoseBits = longToNumber(reader.uint64() as Long); - break; - case 13: - message.stConsecutiveWins = reader.uint32(); - break; - case 14: - message.stConsecutiveWinsMax = reader.uint32(); - break; - case 17: - message.fullTunedCarCouponUnreceivableAt = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CreateCarResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - accessCode: isSet(object.accessCode) ? String(object.accessCode) : "", - banapassportAmId: isSet(object.banapassportAmId) - ? Number(object.banapassportAmId) - : 0, - mbid: isSet(object.mbid) ? Number(object.mbid) : 0, - userId: isSet(object.userId) ? Number(object.userId) : 0, - carId: isSet(object.carId) ? Number(object.carId) : 0, - stClearBits: isSet(object.stClearBits) ? Number(object.stClearBits) : 0, - stClearDivCount: isSet(object.stClearDivCount) - ? Number(object.stClearDivCount) - : 0, - stClearCount: isSet(object.stClearCount) - ? Number(object.stClearCount) - : 0, - stLoseBits: isSet(object.stLoseBits) ? Number(object.stLoseBits) : 0, - stConsecutiveWins: isSet(object.stConsecutiveWins) - ? Number(object.stConsecutiveWins) - : 0, - stConsecutiveWinsMax: isSet(object.stConsecutiveWinsMax) - ? Number(object.stConsecutiveWinsMax) - : 0, - fullTunedCarCouponUnreceivableAt: isSet( - object.fullTunedCarCouponUnreceivableAt - ) - ? Number(object.fullTunedCarCouponUnreceivableAt) - : 0, - }; - }, - - toJSON(message: CreateCarResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - message.accessCode !== undefined && (obj.accessCode = message.accessCode); - message.banapassportAmId !== undefined && - (obj.banapassportAmId = Math.round(message.banapassportAmId)); - message.mbid !== undefined && (obj.mbid = Math.round(message.mbid)); - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.stClearBits !== undefined && - (obj.stClearBits = Math.round(message.stClearBits)); - message.stClearDivCount !== undefined && - (obj.stClearDivCount = Math.round(message.stClearDivCount)); - message.stClearCount !== undefined && - (obj.stClearCount = Math.round(message.stClearCount)); - message.stLoseBits !== undefined && - (obj.stLoseBits = Math.round(message.stLoseBits)); - message.stConsecutiveWins !== undefined && - (obj.stConsecutiveWins = Math.round(message.stConsecutiveWins)); - message.stConsecutiveWinsMax !== undefined && - (obj.stConsecutiveWinsMax = Math.round(message.stConsecutiveWinsMax)); - message.fullTunedCarCouponUnreceivableAt !== undefined && - (obj.fullTunedCarCouponUnreceivableAt = Math.round( - message.fullTunedCarCouponUnreceivableAt - )); - return obj; - }, - - fromPartial, I>>( - object: I - ): CreateCarResponse { - const message = createBaseCreateCarResponse(); - message.error = object.error ?? 0; - message.accessCode = object.accessCode ?? ""; - message.banapassportAmId = object.banapassportAmId ?? 0; - message.mbid = object.mbid ?? 0; - message.userId = object.userId ?? 0; - message.carId = object.carId ?? 0; - message.stClearBits = object.stClearBits ?? 0; - message.stClearDivCount = object.stClearDivCount ?? 0; - message.stClearCount = object.stClearCount ?? 0; - message.stLoseBits = object.stLoseBits ?? 0; - message.stConsecutiveWins = object.stConsecutiveWins ?? 0; - message.stConsecutiveWinsMax = object.stConsecutiveWinsMax ?? 0; - message.fullTunedCarCouponUnreceivableAt = - object.fullTunedCarCouponUnreceivableAt ?? 0; - return message; - }, -}; - -function createBaseLoadGameHistoryRequest(): LoadGameHistoryRequest { - return { carId: 0 }; -} - -export const LoadGameHistoryRequest = { - encode( - message: LoadGameHistoryRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGameHistoryRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGameHistoryRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGameHistoryRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - }; - }, - - toJSON(message: LoadGameHistoryRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadGameHistoryRequest { - const message = createBaseLoadGameHistoryRequest(); - message.carId = object.carId ?? 0; - return message; - }, -}; - -function createBaseLoadGameHistoryResponse(): LoadGameHistoryResponse { - return { - error: 0, - taRecords: [], - taRankingUpdatedAt: 0, - ghostHistory: [], - ghostBattleCount: 0, - ghostBattleWinCount: 0, - stampSheetCount: 0, - stampSheet: [], - }; -} - -export const LoadGameHistoryResponse = { - encode( - message: LoadGameHistoryResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - for (const v of message.taRecords) { - LoadGameHistoryResponse_TimeAttackRecord.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - if (message.taRankingUpdatedAt !== 0) { - writer.uint32(24).uint32(message.taRankingUpdatedAt); - } - for (const v of message.ghostHistory) { - LoadGameHistoryResponse_GhostBattleRecord.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - if (message.ghostBattleCount !== 0) { - writer.uint32(40).uint32(message.ghostBattleCount); - } - if (message.ghostBattleWinCount !== 0) { - writer.uint32(48).uint32(message.ghostBattleWinCount); - } - if (message.stampSheetCount !== 0) { - writer.uint32(56).uint32(message.stampSheetCount); - } - writer.uint32(66).fork(); - for (const v of message.stampSheet) { - writer.uint32(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGameHistoryResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGameHistoryResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.taRecords.push( - LoadGameHistoryResponse_TimeAttackRecord.decode( - reader, - reader.uint32() - ) - ); - break; - case 3: - message.taRankingUpdatedAt = reader.uint32(); - break; - case 4: - message.ghostHistory.push( - LoadGameHistoryResponse_GhostBattleRecord.decode( - reader, - reader.uint32() - ) - ); - break; - case 5: - message.ghostBattleCount = reader.uint32(); - break; - case 6: - message.ghostBattleWinCount = reader.uint32(); - break; - case 7: - message.stampSheetCount = reader.uint32(); - break; - case 8: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.stampSheet.push(reader.uint32()); - } - } else { - message.stampSheet.push(reader.uint32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGameHistoryResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - taRecords: Array.isArray(object?.taRecords) - ? object.taRecords.map((e: any) => - LoadGameHistoryResponse_TimeAttackRecord.fromJSON(e) - ) - : [], - taRankingUpdatedAt: isSet(object.taRankingUpdatedAt) - ? Number(object.taRankingUpdatedAt) - : 0, - ghostHistory: Array.isArray(object?.ghostHistory) - ? object.ghostHistory.map((e: any) => - LoadGameHistoryResponse_GhostBattleRecord.fromJSON(e) - ) - : [], - ghostBattleCount: isSet(object.ghostBattleCount) - ? Number(object.ghostBattleCount) - : 0, - ghostBattleWinCount: isSet(object.ghostBattleWinCount) - ? Number(object.ghostBattleWinCount) - : 0, - stampSheetCount: isSet(object.stampSheetCount) - ? Number(object.stampSheetCount) - : 0, - stampSheet: Array.isArray(object?.stampSheet) - ? object.stampSheet.map((e: any) => Number(e)) - : [], - }; - }, - - toJSON(message: LoadGameHistoryResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - if (message.taRecords) { - obj.taRecords = message.taRecords.map((e) => - e ? LoadGameHistoryResponse_TimeAttackRecord.toJSON(e) : undefined - ); - } else { - obj.taRecords = []; - } - message.taRankingUpdatedAt !== undefined && - (obj.taRankingUpdatedAt = Math.round(message.taRankingUpdatedAt)); - if (message.ghostHistory) { - obj.ghostHistory = message.ghostHistory.map((e) => - e ? LoadGameHistoryResponse_GhostBattleRecord.toJSON(e) : undefined - ); - } else { - obj.ghostHistory = []; - } - message.ghostBattleCount !== undefined && - (obj.ghostBattleCount = Math.round(message.ghostBattleCount)); - message.ghostBattleWinCount !== undefined && - (obj.ghostBattleWinCount = Math.round(message.ghostBattleWinCount)); - message.stampSheetCount !== undefined && - (obj.stampSheetCount = Math.round(message.stampSheetCount)); - if (message.stampSheet) { - obj.stampSheet = message.stampSheet.map((e) => Math.round(e)); - } else { - obj.stampSheet = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadGameHistoryResponse { - const message = createBaseLoadGameHistoryResponse(); - message.error = object.error ?? 0; - message.taRecords = - object.taRecords?.map((e) => - LoadGameHistoryResponse_TimeAttackRecord.fromPartial(e) - ) || []; - message.taRankingUpdatedAt = object.taRankingUpdatedAt ?? 0; - message.ghostHistory = - object.ghostHistory?.map((e) => - LoadGameHistoryResponse_GhostBattleRecord.fromPartial(e) - ) || []; - message.ghostBattleCount = object.ghostBattleCount ?? 0; - message.ghostBattleWinCount = object.ghostBattleWinCount ?? 0; - message.stampSheetCount = object.stampSheetCount ?? 0; - message.stampSheet = object.stampSheet?.map((e) => e) || []; - return message; - }, -}; - -function createBaseLoadGameHistoryResponse_TimeAttackRecord(): LoadGameHistoryResponse_TimeAttackRecord { - return { - course: 0, - time: 0, - tunePower: 0, - tuneHandling: 0, - wholeRank: 0, - wholeParticipants: 0, - modelRank: 0, - modelParticipants: 0, - }; -} - -export const LoadGameHistoryResponse_TimeAttackRecord = { - encode( - message: LoadGameHistoryResponse_TimeAttackRecord, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.course !== 0) { - writer.uint32(8).uint32(message.course); - } - if (message.time !== 0) { - writer.uint32(16).uint32(message.time); - } - if (message.tunePower !== 0) { - writer.uint32(24).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(32).uint32(message.tuneHandling); - } - if (message.wholeRank !== 0) { - writer.uint32(40).uint32(message.wholeRank); - } - if (message.wholeParticipants !== 0) { - writer.uint32(48).uint32(message.wholeParticipants); - } - if (message.modelRank !== 0) { - writer.uint32(56).uint32(message.modelRank); - } - if (message.modelParticipants !== 0) { - writer.uint32(64).uint32(message.modelParticipants); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGameHistoryResponse_TimeAttackRecord { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGameHistoryResponse_TimeAttackRecord(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.course = reader.uint32(); - break; - case 2: - message.time = reader.uint32(); - break; - case 3: - message.tunePower = reader.uint32(); - break; - case 4: - message.tuneHandling = reader.uint32(); - break; - case 5: - message.wholeRank = reader.uint32(); - break; - case 6: - message.wholeParticipants = reader.uint32(); - break; - case 7: - message.modelRank = reader.uint32(); - break; - case 8: - message.modelParticipants = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGameHistoryResponse_TimeAttackRecord { - return { - course: isSet(object.course) ? Number(object.course) : 0, - time: isSet(object.time) ? Number(object.time) : 0, - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - wholeRank: isSet(object.wholeRank) ? Number(object.wholeRank) : 0, - wholeParticipants: isSet(object.wholeParticipants) - ? Number(object.wholeParticipants) - : 0, - modelRank: isSet(object.modelRank) ? Number(object.modelRank) : 0, - modelParticipants: isSet(object.modelParticipants) - ? Number(object.modelParticipants) - : 0, - }; - }, - - toJSON(message: LoadGameHistoryResponse_TimeAttackRecord): unknown { - const obj: any = {}; - message.course !== undefined && (obj.course = Math.round(message.course)); - message.time !== undefined && (obj.time = Math.round(message.time)); - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.wholeRank !== undefined && - (obj.wholeRank = Math.round(message.wholeRank)); - message.wholeParticipants !== undefined && - (obj.wholeParticipants = Math.round(message.wholeParticipants)); - message.modelRank !== undefined && - (obj.modelRank = Math.round(message.modelRank)); - message.modelParticipants !== undefined && - (obj.modelParticipants = Math.round(message.modelParticipants)); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): LoadGameHistoryResponse_TimeAttackRecord { - const message = createBaseLoadGameHistoryResponse_TimeAttackRecord(); - message.course = object.course ?? 0; - message.time = object.time ?? 0; - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.wholeRank = object.wholeRank ?? 0; - message.wholeParticipants = object.wholeParticipants ?? 0; - message.modelRank = object.modelRank ?? 0; - message.modelParticipants = object.modelParticipants ?? 0; - return message; - }, -}; - -function createBaseLoadGameHistoryResponse_GhostBattleRecord(): LoadGameHistoryResponse_GhostBattleRecord { - return { - carSetting: undefined, - opponent: undefined, - mobs: [], - area: 0, - playedAt: 0, - playedShopName: "", - }; -} - -export const LoadGameHistoryResponse_GhostBattleRecord = { - encode( - message: LoadGameHistoryResponse_GhostBattleRecord, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carSetting !== undefined) { - LoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting.encode( - message.carSetting, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.opponent !== undefined) { - LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar.encode( - message.opponent, - writer.uint32(18).fork() - ).ldelim(); - } - for (const v of message.mobs) { - LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar.encode( - v!, - writer.uint32(26).fork() - ).ldelim(); - } - if (message.area !== 0) { - writer.uint32(32).uint32(message.area); - } - if (message.playedAt !== 0) { - writer.uint32(40).uint32(message.playedAt); - } - if (message.playedShopName !== "") { - writer.uint32(50).string(message.playedShopName); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGameHistoryResponse_GhostBattleRecord { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGameHistoryResponse_GhostBattleRecord(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carSetting = - LoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting.decode( - reader, - reader.uint32() - ); - break; - case 2: - message.opponent = - LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar.decode( - reader, - reader.uint32() - ); - break; - case 3: - message.mobs.push( - LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar.decode( - reader, - reader.uint32() - ) - ); - break; - case 4: - message.area = reader.uint32(); - break; - case 5: - message.playedAt = reader.uint32(); - break; - case 6: - message.playedShopName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGameHistoryResponse_GhostBattleRecord { - return { - carSetting: isSet(object.carSetting) - ? LoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting.fromJSON( - object.carSetting - ) - : undefined, - opponent: isSet(object.opponent) - ? LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar.fromJSON( - object.opponent - ) - : undefined, - mobs: Array.isArray(object?.mobs) - ? object.mobs.map((e: any) => - LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar.fromJSON( - e - ) - ) - : [], - area: isSet(object.area) ? Number(object.area) : 0, - playedAt: isSet(object.playedAt) ? Number(object.playedAt) : 0, - playedShopName: isSet(object.playedShopName) - ? String(object.playedShopName) - : "", - }; - }, - - toJSON(message: LoadGameHistoryResponse_GhostBattleRecord): unknown { - const obj: any = {}; - message.carSetting !== undefined && - (obj.carSetting = message.carSetting - ? LoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting.toJSON( - message.carSetting - ) - : undefined); - message.opponent !== undefined && - (obj.opponent = message.opponent - ? LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar.toJSON( - message.opponent - ) - : undefined); - if (message.mobs) { - obj.mobs = message.mobs.map((e) => - e - ? LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar.toJSON( - e - ) - : undefined - ); - } else { - obj.mobs = []; - } - message.area !== undefined && (obj.area = Math.round(message.area)); - message.playedAt !== undefined && - (obj.playedAt = Math.round(message.playedAt)); - message.playedShopName !== undefined && - (obj.playedShopName = message.playedShopName); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): LoadGameHistoryResponse_GhostBattleRecord { - const message = createBaseLoadGameHistoryResponse_GhostBattleRecord(); - message.carSetting = - object.carSetting !== undefined && object.carSetting !== null - ? LoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting.fromPartial( - object.carSetting - ) - : undefined; - message.opponent = - object.opponent !== undefined && object.opponent !== null - ? LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar.fromPartial( - object.opponent - ) - : undefined; - message.mobs = - object.mobs?.map((e) => - LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar.fromPartial( - e - ) - ) || []; - message.area = object.area ?? 0; - message.playedAt = object.playedAt ?? 0; - message.playedShopName = object.playedShopName ?? ""; - return message; - }, -}; - -function createBaseLoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting(): LoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting { - return { tunePower: 0, tuneHandling: 0 }; -} - -export const LoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting = { - encode( - message: LoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.tunePower !== 0) { - writer.uint32(8).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(16).uint32(message.tuneHandling); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = - createBaseLoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tunePower = reader.uint32(); - break; - case 2: - message.tuneHandling = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON( - object: any - ): LoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting { - return { - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - }; - }, - - toJSON( - message: LoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting - ): unknown { - const obj: any = {}; - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - return obj; - }, - - fromPartial< - I extends Exact< - DeepPartial, - I - > - >(object: I): LoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting { - const message = - createBaseLoadGameHistoryResponse_GhostBattleRecord_GhostCarSetting(); - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - return message; - }, -}; - -function createBaseLoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar(): LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar { - return { car: undefined, result: 0 }; -} - -export const LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar = { - encode( - message: LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(10).fork()).ldelim(); - } - if (message.result !== 0) { - writer.uint32(16).int32(message.result); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = - createBaseLoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.car = Car.decode(reader, reader.uint32()); - break; - case 2: - message.result = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON( - object: any - ): LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar { - return { - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - result: isSet(object.result) ? Number(object.result) : 0, - }; - }, - - toJSON( - message: LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar - ): unknown { - const obj: any = {}; - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - message.result !== undefined && (obj.result = Math.round(message.result)); - return obj; - }, - - fromPartial< - I extends Exact< - DeepPartial, - I - > - >(object: I): LoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar { - const message = - createBaseLoadGameHistoryResponse_GhostBattleRecord_GhostBattleRecordCar(); - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - message.result = object.result ?? 0; - return message; - }, -}; - -function createBaseUpdateCarRequest(): UpdateCarRequest { - return { - carId: 0, - car: undefined, - earnedItems: [], - setting: undefined, - toBeDeleted: false, - auraMotifAutoChange: false, - rgStamp: 0, - timestamp: 0, - }; -} - -export const UpdateCarRequest = { - encode( - message: UpdateCarRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.earnedItems) { - CarItem.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.setting !== undefined) { - CarSetting.encode(message.setting, writer.uint32(42).fork()).ldelim(); - } - if (message.toBeDeleted === true) { - writer.uint32(72).bool(message.toBeDeleted); - } - if (message.auraMotifAutoChange === true) { - writer.uint32(80).bool(message.auraMotifAutoChange); - } - if (message.rgStamp !== 0) { - writer.uint32(96).uint32(message.rgStamp); - } - if (message.timestamp !== 0) { - writer.uint32(104).uint32(message.timestamp); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateCarRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateCarRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.car = Car.decode(reader, reader.uint32()); - break; - case 4: - message.earnedItems.push(CarItem.decode(reader, reader.uint32())); - break; - case 5: - message.setting = CarSetting.decode(reader, reader.uint32()); - break; - case 9: - message.toBeDeleted = reader.bool(); - break; - case 10: - message.auraMotifAutoChange = reader.bool(); - break; - case 12: - message.rgStamp = reader.uint32(); - break; - case 13: - message.timestamp = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateCarRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - earnedItems: Array.isArray(object?.earnedItems) - ? object.earnedItems.map((e: any) => CarItem.fromJSON(e)) - : [], - setting: isSet(object.setting) - ? CarSetting.fromJSON(object.setting) - : undefined, - toBeDeleted: isSet(object.toBeDeleted) - ? Boolean(object.toBeDeleted) - : false, - auraMotifAutoChange: isSet(object.auraMotifAutoChange) - ? Boolean(object.auraMotifAutoChange) - : false, - rgStamp: isSet(object.rgStamp) ? Number(object.rgStamp) : 0, - timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0, - }; - }, - - toJSON(message: UpdateCarRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - if (message.earnedItems) { - obj.earnedItems = message.earnedItems.map((e) => - e ? CarItem.toJSON(e) : undefined - ); - } else { - obj.earnedItems = []; - } - message.setting !== undefined && - (obj.setting = message.setting - ? CarSetting.toJSON(message.setting) - : undefined); - message.toBeDeleted !== undefined && - (obj.toBeDeleted = message.toBeDeleted); - message.auraMotifAutoChange !== undefined && - (obj.auraMotifAutoChange = message.auraMotifAutoChange); - message.rgStamp !== undefined && - (obj.rgStamp = Math.round(message.rgStamp)); - message.timestamp !== undefined && - (obj.timestamp = Math.round(message.timestamp)); - return obj; - }, - - fromPartial, I>>( - object: I - ): UpdateCarRequest { - const message = createBaseUpdateCarRequest(); - message.carId = object.carId ?? 0; - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - message.earnedItems = - object.earnedItems?.map((e) => CarItem.fromPartial(e)) || []; - message.setting = - object.setting !== undefined && object.setting !== null - ? CarSetting.fromPartial(object.setting) - : undefined; - message.toBeDeleted = object.toBeDeleted ?? false; - message.auraMotifAutoChange = object.auraMotifAutoChange ?? false; - message.rgStamp = object.rgStamp ?? 0; - message.timestamp = object.timestamp ?? 0; - return message; - }, -}; - -function createBaseUpdateCarResponse(): UpdateCarResponse { - return { error: 0 }; -} - -export const UpdateCarResponse = { - encode( - message: UpdateCarResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateCarResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateCarResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateCarResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: UpdateCarResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): UpdateCarResponse { - const message = createBaseUpdateCarResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseSaveGameResultRequest(): SaveGameResultRequest { - return { - carId: 0, - gameMode: 1, - playedAt: 0, - playCount: 0, - retired: false, - timeup: false, - car: undefined, - setting: undefined, - odometer: 0, - earnedCustomColor: false, - confirmedTutorials: [], - earnedItems: [], - earnedUserItems: [], - preservedTitles: [], - neighborCars: [], - stResult: undefined, - taResult: undefined, - vsResult: undefined, - rgResult: undefined, - }; -} - -export const SaveGameResultRequest = { - encode( - message: SaveGameResultRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.gameMode !== 1) { - writer.uint32(16).int32(message.gameMode); - } - if (message.playedAt !== 0) { - writer.uint32(24).uint32(message.playedAt); - } - if (message.playCount !== 0) { - writer.uint32(32).uint32(message.playCount); - } - if (message.retired === true) { - writer.uint32(40).bool(message.retired); - } - if (message.timeup === true) { - writer.uint32(48).bool(message.timeup); - } - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(58).fork()).ldelim(); - } - if (message.setting !== undefined) { - CarSetting.encode(message.setting, writer.uint32(66).fork()).ldelim(); - } - if (message.odometer !== 0) { - writer.uint32(72).uint32(message.odometer); - } - if (message.earnedCustomColor === true) { - writer.uint32(88).bool(message.earnedCustomColor); - } - writer.uint32(98).fork(); - for (const v of message.confirmedTutorials) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.earnedItems) { - CarItem.encode(v!, writer.uint32(106).fork()).ldelim(); - } - for (const v of message.earnedUserItems) { - UserItem.encode(v!, writer.uint32(114).fork()).ldelim(); - } - for (const v of message.preservedTitles) { - writer.uint32(122).string(v!); - } - writer.uint32(170).fork(); - for (const v of message.neighborCars) { - writer.uint32(v); - } - writer.ldelim(); - if (message.stResult !== undefined) { - SaveGameResultRequest_StoryResult.encode( - message.stResult, - writer.uint32(178).fork() - ).ldelim(); - } - if (message.taResult !== undefined) { - SaveGameResultRequest_TimeAttackResult.encode( - message.taResult, - writer.uint32(186).fork() - ).ldelim(); - } - if (message.vsResult !== undefined) { - SaveGameResultRequest_VersusBattleResult.encode( - message.vsResult, - writer.uint32(194).fork() - ).ldelim(); - } - if (message.rgResult !== undefined) { - SaveGameResultRequest_GhostBattleResult.encode( - message.rgResult, - writer.uint32(202).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveGameResultRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveGameResultRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.gameMode = reader.int32() as any; - break; - case 3: - message.playedAt = reader.uint32(); - break; - case 4: - message.playCount = reader.uint32(); - break; - case 5: - message.retired = reader.bool(); - break; - case 6: - message.timeup = reader.bool(); - break; - case 7: - message.car = Car.decode(reader, reader.uint32()); - break; - case 8: - message.setting = CarSetting.decode(reader, reader.uint32()); - break; - case 9: - message.odometer = reader.uint32(); - break; - case 11: - message.earnedCustomColor = reader.bool(); - break; - case 12: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.confirmedTutorials.push(reader.int32() as any); - } - } else { - message.confirmedTutorials.push(reader.int32() as any); - } - break; - case 13: - message.earnedItems.push(CarItem.decode(reader, reader.uint32())); - break; - case 14: - message.earnedUserItems.push( - UserItem.decode(reader, reader.uint32()) - ); - break; - case 15: - message.preservedTitles.push(reader.string()); - break; - case 21: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.neighborCars.push(reader.uint32()); - } - } else { - message.neighborCars.push(reader.uint32()); - } - break; - case 22: - message.stResult = SaveGameResultRequest_StoryResult.decode( - reader, - reader.uint32() - ); - break; - case 23: - message.taResult = SaveGameResultRequest_TimeAttackResult.decode( - reader, - reader.uint32() - ); - break; - case 24: - message.vsResult = SaveGameResultRequest_VersusBattleResult.decode( - reader, - reader.uint32() - ); - break; - case 25: - message.rgResult = SaveGameResultRequest_GhostBattleResult.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveGameResultRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - gameMode: isSet(object.gameMode) ? gameModeFromJSON(object.gameMode) : 1, - playedAt: isSet(object.playedAt) ? Number(object.playedAt) : 0, - playCount: isSet(object.playCount) ? Number(object.playCount) : 0, - retired: isSet(object.retired) ? Boolean(object.retired) : false, - timeup: isSet(object.timeup) ? Boolean(object.timeup) : false, - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - setting: isSet(object.setting) - ? CarSetting.fromJSON(object.setting) - : undefined, - odometer: isSet(object.odometer) ? Number(object.odometer) : 0, - earnedCustomColor: isSet(object.earnedCustomColor) - ? Boolean(object.earnedCustomColor) - : false, - confirmedTutorials: Array.isArray(object?.confirmedTutorials) - ? object.confirmedTutorials.map((e: any) => tutorialTypeFromJSON(e)) - : [], - earnedItems: Array.isArray(object?.earnedItems) - ? object.earnedItems.map((e: any) => CarItem.fromJSON(e)) - : [], - earnedUserItems: Array.isArray(object?.earnedUserItems) - ? object.earnedUserItems.map((e: any) => UserItem.fromJSON(e)) - : [], - preservedTitles: Array.isArray(object?.preservedTitles) - ? object.preservedTitles.map((e: any) => String(e)) - : [], - neighborCars: Array.isArray(object?.neighborCars) - ? object.neighborCars.map((e: any) => Number(e)) - : [], - stResult: isSet(object.stResult) - ? SaveGameResultRequest_StoryResult.fromJSON(object.stResult) - : undefined, - taResult: isSet(object.taResult) - ? SaveGameResultRequest_TimeAttackResult.fromJSON(object.taResult) - : undefined, - vsResult: isSet(object.vsResult) - ? SaveGameResultRequest_VersusBattleResult.fromJSON(object.vsResult) - : undefined, - rgResult: isSet(object.rgResult) - ? SaveGameResultRequest_GhostBattleResult.fromJSON(object.rgResult) - : undefined, - }; - }, - - toJSON(message: SaveGameResultRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.gameMode !== undefined && - (obj.gameMode = gameModeToJSON(message.gameMode)); - message.playedAt !== undefined && - (obj.playedAt = Math.round(message.playedAt)); - message.playCount !== undefined && - (obj.playCount = Math.round(message.playCount)); - message.retired !== undefined && (obj.retired = message.retired); - message.timeup !== undefined && (obj.timeup = message.timeup); - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - message.setting !== undefined && - (obj.setting = message.setting - ? CarSetting.toJSON(message.setting) - : undefined); - message.odometer !== undefined && - (obj.odometer = Math.round(message.odometer)); - message.earnedCustomColor !== undefined && - (obj.earnedCustomColor = message.earnedCustomColor); - if (message.confirmedTutorials) { - obj.confirmedTutorials = message.confirmedTutorials.map((e) => - tutorialTypeToJSON(e) - ); - } else { - obj.confirmedTutorials = []; - } - if (message.earnedItems) { - obj.earnedItems = message.earnedItems.map((e) => - e ? CarItem.toJSON(e) : undefined - ); - } else { - obj.earnedItems = []; - } - if (message.earnedUserItems) { - obj.earnedUserItems = message.earnedUserItems.map((e) => - e ? UserItem.toJSON(e) : undefined - ); - } else { - obj.earnedUserItems = []; - } - if (message.preservedTitles) { - obj.preservedTitles = message.preservedTitles.map((e) => e); - } else { - obj.preservedTitles = []; - } - if (message.neighborCars) { - obj.neighborCars = message.neighborCars.map((e) => Math.round(e)); - } else { - obj.neighborCars = []; - } - message.stResult !== undefined && - (obj.stResult = message.stResult - ? SaveGameResultRequest_StoryResult.toJSON(message.stResult) - : undefined); - message.taResult !== undefined && - (obj.taResult = message.taResult - ? SaveGameResultRequest_TimeAttackResult.toJSON(message.taResult) - : undefined); - message.vsResult !== undefined && - (obj.vsResult = message.vsResult - ? SaveGameResultRequest_VersusBattleResult.toJSON(message.vsResult) - : undefined); - message.rgResult !== undefined && - (obj.rgResult = message.rgResult - ? SaveGameResultRequest_GhostBattleResult.toJSON(message.rgResult) - : undefined); - return obj; - }, - - fromPartial, I>>( - object: I - ): SaveGameResultRequest { - const message = createBaseSaveGameResultRequest(); - message.carId = object.carId ?? 0; - message.gameMode = object.gameMode ?? 1; - message.playedAt = object.playedAt ?? 0; - message.playCount = object.playCount ?? 0; - message.retired = object.retired ?? false; - message.timeup = object.timeup ?? false; - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - message.setting = - object.setting !== undefined && object.setting !== null - ? CarSetting.fromPartial(object.setting) - : undefined; - message.odometer = object.odometer ?? 0; - message.earnedCustomColor = object.earnedCustomColor ?? false; - message.confirmedTutorials = object.confirmedTutorials?.map((e) => e) || []; - message.earnedItems = - object.earnedItems?.map((e) => CarItem.fromPartial(e)) || []; - message.earnedUserItems = - object.earnedUserItems?.map((e) => UserItem.fromPartial(e)) || []; - message.preservedTitles = object.preservedTitles?.map((e) => e) || []; - message.neighborCars = object.neighborCars?.map((e) => e) || []; - message.stResult = - object.stResult !== undefined && object.stResult !== null - ? SaveGameResultRequest_StoryResult.fromPartial(object.stResult) - : undefined; - message.taResult = - object.taResult !== undefined && object.taResult !== null - ? SaveGameResultRequest_TimeAttackResult.fromPartial(object.taResult) - : undefined; - message.vsResult = - object.vsResult !== undefined && object.vsResult !== null - ? SaveGameResultRequest_VersusBattleResult.fromPartial(object.vsResult) - : undefined; - message.rgResult = - object.rgResult !== undefined && object.rgResult !== null - ? SaveGameResultRequest_GhostBattleResult.fromPartial(object.rgResult) - : undefined; - return message; - }, -}; - -function createBaseSaveGameResultRequest_StoryResult(): SaveGameResultRequest_StoryResult { - return { - stPlayCount: 0, - stPlayedStory: 0, - tuningPoint: 0, - stClearBits: 0, - stClearDivCount: 0, - stClearCount: 0, - stLoseBits: 0, - stConsecutiveWins: 0, - stCompleted100Episodes: false, - isInsuranceUsed: false, - }; -} - -export const SaveGameResultRequest_StoryResult = { - encode( - message: SaveGameResultRequest_StoryResult, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.stPlayCount !== 0) { - writer.uint32(8).uint32(message.stPlayCount); - } - if (message.stPlayedStory !== 0) { - writer.uint32(72).uint32(message.stPlayedStory); - } - if (message.tuningPoint !== 0) { - writer.uint32(16).uint32(message.tuningPoint); - } - if (message.stClearBits !== 0) { - writer.uint32(24).uint32(message.stClearBits); - } - if (message.stClearDivCount !== 0) { - writer.uint32(32).uint32(message.stClearDivCount); - } - if (message.stClearCount !== 0) { - writer.uint32(40).uint32(message.stClearCount); - } - if (message.stLoseBits !== 0) { - writer.uint32(48).uint64(message.stLoseBits); - } - if (message.stConsecutiveWins !== 0) { - writer.uint32(64).uint32(message.stConsecutiveWins); - } - if (message.stCompleted100Episodes === true) { - writer.uint32(80).bool(message.stCompleted100Episodes); - } - if (message.isInsuranceUsed === true) { - writer.uint32(88).bool(message.isInsuranceUsed); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveGameResultRequest_StoryResult { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveGameResultRequest_StoryResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.stPlayCount = reader.uint32(); - break; - case 9: - message.stPlayedStory = reader.uint32(); - break; - case 2: - message.tuningPoint = reader.uint32(); - break; - case 3: - message.stClearBits = reader.uint32(); - break; - case 4: - message.stClearDivCount = reader.uint32(); - break; - case 5: - message.stClearCount = reader.uint32(); - break; - case 6: - message.stLoseBits = longToNumber(reader.uint64() as Long); - break; - case 8: - message.stConsecutiveWins = reader.uint32(); - break; - case 10: - message.stCompleted100Episodes = reader.bool(); - break; - case 11: - message.isInsuranceUsed = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveGameResultRequest_StoryResult { - return { - stPlayCount: isSet(object.stPlayCount) ? Number(object.stPlayCount) : 0, - stPlayedStory: isSet(object.stPlayedStory) - ? Number(object.stPlayedStory) - : 0, - tuningPoint: isSet(object.tuningPoint) ? Number(object.tuningPoint) : 0, - stClearBits: isSet(object.stClearBits) ? Number(object.stClearBits) : 0, - stClearDivCount: isSet(object.stClearDivCount) - ? Number(object.stClearDivCount) - : 0, - stClearCount: isSet(object.stClearCount) - ? Number(object.stClearCount) - : 0, - stLoseBits: isSet(object.stLoseBits) ? Number(object.stLoseBits) : 0, - stConsecutiveWins: isSet(object.stConsecutiveWins) - ? Number(object.stConsecutiveWins) - : 0, - stCompleted100Episodes: isSet(object.stCompleted100Episodes) - ? Boolean(object.stCompleted100Episodes) - : false, - isInsuranceUsed: isSet(object.isInsuranceUsed) - ? Boolean(object.isInsuranceUsed) - : false, - }; - }, - - toJSON(message: SaveGameResultRequest_StoryResult): unknown { - const obj: any = {}; - message.stPlayCount !== undefined && - (obj.stPlayCount = Math.round(message.stPlayCount)); - message.stPlayedStory !== undefined && - (obj.stPlayedStory = Math.round(message.stPlayedStory)); - message.tuningPoint !== undefined && - (obj.tuningPoint = Math.round(message.tuningPoint)); - message.stClearBits !== undefined && - (obj.stClearBits = Math.round(message.stClearBits)); - message.stClearDivCount !== undefined && - (obj.stClearDivCount = Math.round(message.stClearDivCount)); - message.stClearCount !== undefined && - (obj.stClearCount = Math.round(message.stClearCount)); - message.stLoseBits !== undefined && - (obj.stLoseBits = Math.round(message.stLoseBits)); - message.stConsecutiveWins !== undefined && - (obj.stConsecutiveWins = Math.round(message.stConsecutiveWins)); - message.stCompleted100Episodes !== undefined && - (obj.stCompleted100Episodes = message.stCompleted100Episodes); - message.isInsuranceUsed !== undefined && - (obj.isInsuranceUsed = message.isInsuranceUsed); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): SaveGameResultRequest_StoryResult { - const message = createBaseSaveGameResultRequest_StoryResult(); - message.stPlayCount = object.stPlayCount ?? 0; - message.stPlayedStory = object.stPlayedStory ?? 0; - message.tuningPoint = object.tuningPoint ?? 0; - message.stClearBits = object.stClearBits ?? 0; - message.stClearDivCount = object.stClearDivCount ?? 0; - message.stClearCount = object.stClearCount ?? 0; - message.stLoseBits = object.stLoseBits ?? 0; - message.stConsecutiveWins = object.stConsecutiveWins ?? 0; - message.stCompleted100Episodes = object.stCompleted100Episodes ?? false; - message.isInsuranceUsed = object.isInsuranceUsed ?? false; - return message; - }, -}; - -function createBaseSaveGameResultRequest_TimeAttackResult(): SaveGameResultRequest_TimeAttackResult { - return { - time: 0, - course: 0, - isMorning: false, - section1Time: 0, - section2Time: 0, - section3Time: 0, - section4Time: 0, - section5Time: 0, - section6Time: 0, - section7Time: 0, - wholeRank: 0, - modelRank: 0, - }; -} - -export const SaveGameResultRequest_TimeAttackResult = { - encode( - message: SaveGameResultRequest_TimeAttackResult, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.time !== 0) { - writer.uint32(8).uint32(message.time); - } - if (message.course !== 0) { - writer.uint32(16).uint32(message.course); - } - if (message.isMorning === true) { - writer.uint32(96).bool(message.isMorning); - } - if (message.section1Time !== 0) { - writer.uint32(24).uint32(message.section1Time); - } - if (message.section2Time !== 0) { - writer.uint32(32).uint32(message.section2Time); - } - if (message.section3Time !== 0) { - writer.uint32(40).uint32(message.section3Time); - } - if (message.section4Time !== 0) { - writer.uint32(48).uint32(message.section4Time); - } - if (message.section5Time !== 0) { - writer.uint32(56).uint32(message.section5Time); - } - if (message.section6Time !== 0) { - writer.uint32(64).uint32(message.section6Time); - } - if (message.section7Time !== 0) { - writer.uint32(72).uint32(message.section7Time); - } - if (message.wholeRank !== 0) { - writer.uint32(80).uint32(message.wholeRank); - } - if (message.modelRank !== 0) { - writer.uint32(88).uint32(message.modelRank); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveGameResultRequest_TimeAttackResult { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveGameResultRequest_TimeAttackResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.time = reader.uint32(); - break; - case 2: - message.course = reader.uint32(); - break; - case 12: - message.isMorning = reader.bool(); - break; - case 3: - message.section1Time = reader.uint32(); - break; - case 4: - message.section2Time = reader.uint32(); - break; - case 5: - message.section3Time = reader.uint32(); - break; - case 6: - message.section4Time = reader.uint32(); - break; - case 7: - message.section5Time = reader.uint32(); - break; - case 8: - message.section6Time = reader.uint32(); - break; - case 9: - message.section7Time = reader.uint32(); - break; - case 10: - message.wholeRank = reader.uint32(); - break; - case 11: - message.modelRank = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveGameResultRequest_TimeAttackResult { - return { - time: isSet(object.time) ? Number(object.time) : 0, - course: isSet(object.course) ? Number(object.course) : 0, - isMorning: isSet(object.isMorning) ? Boolean(object.isMorning) : false, - section1Time: isSet(object.section1Time) - ? Number(object.section1Time) - : 0, - section2Time: isSet(object.section2Time) - ? Number(object.section2Time) - : 0, - section3Time: isSet(object.section3Time) - ? Number(object.section3Time) - : 0, - section4Time: isSet(object.section4Time) - ? Number(object.section4Time) - : 0, - section5Time: isSet(object.section5Time) - ? Number(object.section5Time) - : 0, - section6Time: isSet(object.section6Time) - ? Number(object.section6Time) - : 0, - section7Time: isSet(object.section7Time) - ? Number(object.section7Time) - : 0, - wholeRank: isSet(object.wholeRank) ? Number(object.wholeRank) : 0, - modelRank: isSet(object.modelRank) ? Number(object.modelRank) : 0, - }; - }, - - toJSON(message: SaveGameResultRequest_TimeAttackResult): unknown { - const obj: any = {}; - message.time !== undefined && (obj.time = Math.round(message.time)); - message.course !== undefined && (obj.course = Math.round(message.course)); - message.isMorning !== undefined && (obj.isMorning = message.isMorning); - message.section1Time !== undefined && - (obj.section1Time = Math.round(message.section1Time)); - message.section2Time !== undefined && - (obj.section2Time = Math.round(message.section2Time)); - message.section3Time !== undefined && - (obj.section3Time = Math.round(message.section3Time)); - message.section4Time !== undefined && - (obj.section4Time = Math.round(message.section4Time)); - message.section5Time !== undefined && - (obj.section5Time = Math.round(message.section5Time)); - message.section6Time !== undefined && - (obj.section6Time = Math.round(message.section6Time)); - message.section7Time !== undefined && - (obj.section7Time = Math.round(message.section7Time)); - message.wholeRank !== undefined && - (obj.wholeRank = Math.round(message.wholeRank)); - message.modelRank !== undefined && - (obj.modelRank = Math.round(message.modelRank)); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): SaveGameResultRequest_TimeAttackResult { - const message = createBaseSaveGameResultRequest_TimeAttackResult(); - message.time = object.time ?? 0; - message.course = object.course ?? 0; - message.isMorning = object.isMorning ?? false; - message.section1Time = object.section1Time ?? 0; - message.section2Time = object.section2Time ?? 0; - message.section3Time = object.section3Time ?? 0; - message.section4Time = object.section4Time ?? 0; - message.section5Time = object.section5Time ?? 0; - message.section6Time = object.section6Time ?? 0; - message.section7Time = object.section7Time ?? 0; - message.wholeRank = object.wholeRank ?? 0; - message.modelRank = object.modelRank ?? 0; - return message; - }, -}; - -function createBaseSaveGameResultRequest_VersusBattleResult(): SaveGameResultRequest_VersusBattleResult { - return { - result: 0, - survived: false, - opponentCarId: [], - numOfPlayers: 0, - area: 0, - isMorning: false, - vsPlayCount: 0, - vsBurstCount: 0, - vsStarCount: 0, - vsCoolOrWild: 0, - vsSmoothOrRough: 0, - vsTripleStarMedals: 0, - vsDoubleStarMedals: 0, - vsSingleStarMedals: 0, - vsPlainMedals: 0, - }; -} - -export const SaveGameResultRequest_VersusBattleResult = { - encode( - message: SaveGameResultRequest_VersusBattleResult, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.result !== 0) { - writer.uint32(8).uint32(message.result); - } - if (message.survived === true) { - writer.uint32(16).bool(message.survived); - } - writer.uint32(26).fork(); - for (const v of message.opponentCarId) { - writer.uint32(v); - } - writer.ldelim(); - if (message.numOfPlayers !== 0) { - writer.uint32(40).uint32(message.numOfPlayers); - } - if (message.area !== 0) { - writer.uint32(136).uint32(message.area); - } - if (message.isMorning === true) { - writer.uint32(144).bool(message.isMorning); - } - if (message.vsPlayCount !== 0) { - writer.uint32(48).uint32(message.vsPlayCount); - } - if (message.vsBurstCount !== 0) { - writer.uint32(56).uint32(message.vsBurstCount); - } - if (message.vsStarCount !== 0) { - writer.uint32(64).uint32(message.vsStarCount); - } - if (message.vsCoolOrWild !== 0) { - writer.uint32(72).sint32(message.vsCoolOrWild); - } - if (message.vsSmoothOrRough !== 0) { - writer.uint32(80).sint32(message.vsSmoothOrRough); - } - if (message.vsTripleStarMedals !== 0) { - writer.uint32(88).uint32(message.vsTripleStarMedals); - } - if (message.vsDoubleStarMedals !== 0) { - writer.uint32(96).uint32(message.vsDoubleStarMedals); - } - if (message.vsSingleStarMedals !== 0) { - writer.uint32(104).uint32(message.vsSingleStarMedals); - } - if (message.vsPlainMedals !== 0) { - writer.uint32(112).uint32(message.vsPlainMedals); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveGameResultRequest_VersusBattleResult { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveGameResultRequest_VersusBattleResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.uint32(); - break; - case 2: - message.survived = reader.bool(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.opponentCarId.push(reader.uint32()); - } - } else { - message.opponentCarId.push(reader.uint32()); - } - break; - case 5: - message.numOfPlayers = reader.uint32(); - break; - case 17: - message.area = reader.uint32(); - break; - case 18: - message.isMorning = reader.bool(); - break; - case 6: - message.vsPlayCount = reader.uint32(); - break; - case 7: - message.vsBurstCount = reader.uint32(); - break; - case 8: - message.vsStarCount = reader.uint32(); - break; - case 9: - message.vsCoolOrWild = reader.sint32(); - break; - case 10: - message.vsSmoothOrRough = reader.sint32(); - break; - case 11: - message.vsTripleStarMedals = reader.uint32(); - break; - case 12: - message.vsDoubleStarMedals = reader.uint32(); - break; - case 13: - message.vsSingleStarMedals = reader.uint32(); - break; - case 14: - message.vsPlainMedals = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveGameResultRequest_VersusBattleResult { - return { - result: isSet(object.result) ? Number(object.result) : 0, - survived: isSet(object.survived) ? Boolean(object.survived) : false, - opponentCarId: Array.isArray(object?.opponentCarId) - ? object.opponentCarId.map((e: any) => Number(e)) - : [], - numOfPlayers: isSet(object.numOfPlayers) - ? Number(object.numOfPlayers) - : 0, - area: isSet(object.area) ? Number(object.area) : 0, - isMorning: isSet(object.isMorning) ? Boolean(object.isMorning) : false, - vsPlayCount: isSet(object.vsPlayCount) ? Number(object.vsPlayCount) : 0, - vsBurstCount: isSet(object.vsBurstCount) - ? Number(object.vsBurstCount) - : 0, - vsStarCount: isSet(object.vsStarCount) ? Number(object.vsStarCount) : 0, - vsCoolOrWild: isSet(object.vsCoolOrWild) - ? Number(object.vsCoolOrWild) - : 0, - vsSmoothOrRough: isSet(object.vsSmoothOrRough) - ? Number(object.vsSmoothOrRough) - : 0, - vsTripleStarMedals: isSet(object.vsTripleStarMedals) - ? Number(object.vsTripleStarMedals) - : 0, - vsDoubleStarMedals: isSet(object.vsDoubleStarMedals) - ? Number(object.vsDoubleStarMedals) - : 0, - vsSingleStarMedals: isSet(object.vsSingleStarMedals) - ? Number(object.vsSingleStarMedals) - : 0, - vsPlainMedals: isSet(object.vsPlainMedals) - ? Number(object.vsPlainMedals) - : 0, - }; - }, - - toJSON(message: SaveGameResultRequest_VersusBattleResult): unknown { - const obj: any = {}; - message.result !== undefined && (obj.result = Math.round(message.result)); - message.survived !== undefined && (obj.survived = message.survived); - if (message.opponentCarId) { - obj.opponentCarId = message.opponentCarId.map((e) => Math.round(e)); - } else { - obj.opponentCarId = []; - } - message.numOfPlayers !== undefined && - (obj.numOfPlayers = Math.round(message.numOfPlayers)); - message.area !== undefined && (obj.area = Math.round(message.area)); - message.isMorning !== undefined && (obj.isMorning = message.isMorning); - message.vsPlayCount !== undefined && - (obj.vsPlayCount = Math.round(message.vsPlayCount)); - message.vsBurstCount !== undefined && - (obj.vsBurstCount = Math.round(message.vsBurstCount)); - message.vsStarCount !== undefined && - (obj.vsStarCount = Math.round(message.vsStarCount)); - message.vsCoolOrWild !== undefined && - (obj.vsCoolOrWild = Math.round(message.vsCoolOrWild)); - message.vsSmoothOrRough !== undefined && - (obj.vsSmoothOrRough = Math.round(message.vsSmoothOrRough)); - message.vsTripleStarMedals !== undefined && - (obj.vsTripleStarMedals = Math.round(message.vsTripleStarMedals)); - message.vsDoubleStarMedals !== undefined && - (obj.vsDoubleStarMedals = Math.round(message.vsDoubleStarMedals)); - message.vsSingleStarMedals !== undefined && - (obj.vsSingleStarMedals = Math.round(message.vsSingleStarMedals)); - message.vsPlainMedals !== undefined && - (obj.vsPlainMedals = Math.round(message.vsPlainMedals)); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): SaveGameResultRequest_VersusBattleResult { - const message = createBaseSaveGameResultRequest_VersusBattleResult(); - message.result = object.result ?? 0; - message.survived = object.survived ?? false; - message.opponentCarId = object.opponentCarId?.map((e) => e) || []; - message.numOfPlayers = object.numOfPlayers ?? 0; - message.area = object.area ?? 0; - message.isMorning = object.isMorning ?? false; - message.vsPlayCount = object.vsPlayCount ?? 0; - message.vsBurstCount = object.vsBurstCount ?? 0; - message.vsStarCount = object.vsStarCount ?? 0; - message.vsCoolOrWild = object.vsCoolOrWild ?? 0; - message.vsSmoothOrRough = object.vsSmoothOrRough ?? 0; - message.vsTripleStarMedals = object.vsTripleStarMedals ?? 0; - message.vsDoubleStarMedals = object.vsDoubleStarMedals ?? 0; - message.vsSingleStarMedals = object.vsSingleStarMedals ?? 0; - message.vsPlainMedals = object.vsPlainMedals ?? 0; - return message; - }, -}; - -function createBaseSaveGameResultRequest_GhostBattleResult(): SaveGameResultRequest_GhostBattleResult { - return { - opponents: [], - path: 0, - isMorning: false, - selectionMethod: 1, - stampSheetCount: 0, - stampSheet: [], - rgStamp: 0, - confirmedTransferredStampTargetCarIds: [], - rgPlayCount: 0, - dressupLevel: 0, - dressupPoint: 0, - rgRegionMapScore: [], - competitionId: 0, - periodId: 0, - brakingPoint: 0, - acquireCrown: false, - acquireAllCrowns: false, - }; -} - -export const SaveGameResultRequest_GhostBattleResult = { - encode( - message: SaveGameResultRequest_GhostBattleResult, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - for (const v of message.opponents) { - SaveGameResultRequest_GhostBattleResult_GhostBattleOpponent.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); - } - if (message.path !== 0) { - writer.uint32(24).uint32(message.path); - } - if (message.isMorning === true) { - writer.uint32(200).bool(message.isMorning); - } - if (message.selectionMethod !== 1) { - writer.uint32(32).int32(message.selectionMethod); - } - if (message.stampSheetCount !== 0) { - writer.uint32(40).uint32(message.stampSheetCount); - } - writer.uint32(50).fork(); - for (const v of message.stampSheet) { - writer.uint32(v); - } - writer.ldelim(); - if (message.rgStamp !== 0) { - writer.uint32(184).uint32(message.rgStamp); - } - writer.uint32(194).fork(); - for (const v of message.confirmedTransferredStampTargetCarIds) { - writer.uint32(v); - } - writer.ldelim(); - if (message.rgPlayCount !== 0) { - writer.uint32(64).uint32(message.rgPlayCount); - } - if (message.dressupLevel !== 0) { - writer.uint32(80).uint32(message.dressupLevel); - } - if (message.dressupPoint !== 0) { - writer.uint32(88).uint32(message.dressupPoint); - } - writer.uint32(114).fork(); - for (const v of message.rgRegionMapScore) { - writer.uint32(v); - } - writer.ldelim(); - if (message.competitionId !== 0) { - writer.uint32(128).uint32(message.competitionId); - } - if (message.periodId !== 0) { - writer.uint32(136).uint32(message.periodId); - } - if (message.brakingPoint !== 0) { - writer.uint32(144).uint32(message.brakingPoint); - } - if (message.acquireCrown === true) { - writer.uint32(160).bool(message.acquireCrown); - } - if (message.acquireAllCrowns === true) { - writer.uint32(168).bool(message.acquireAllCrowns); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveGameResultRequest_GhostBattleResult { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveGameResultRequest_GhostBattleResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.opponents.push( - SaveGameResultRequest_GhostBattleResult_GhostBattleOpponent.decode( - reader, - reader.uint32() - ) - ); - break; - case 3: - message.path = reader.uint32(); - break; - case 25: - message.isMorning = reader.bool(); - break; - case 4: - message.selectionMethod = reader.int32() as any; - break; - case 5: - message.stampSheetCount = reader.uint32(); - break; - case 6: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.stampSheet.push(reader.uint32()); - } - } else { - message.stampSheet.push(reader.uint32()); - } - break; - case 23: - message.rgStamp = reader.uint32(); - break; - case 24: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.confirmedTransferredStampTargetCarIds.push( - reader.uint32() - ); - } - } else { - message.confirmedTransferredStampTargetCarIds.push(reader.uint32()); - } - break; - case 8: - message.rgPlayCount = reader.uint32(); - break; - case 10: - message.dressupLevel = reader.uint32(); - break; - case 11: - message.dressupPoint = reader.uint32(); - break; - case 14: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.rgRegionMapScore.push(reader.uint32()); - } - } else { - message.rgRegionMapScore.push(reader.uint32()); - } - break; - case 16: - message.competitionId = reader.uint32(); - break; - case 17: - message.periodId = reader.uint32(); - break; - case 18: - message.brakingPoint = reader.uint32(); - break; - case 20: - message.acquireCrown = reader.bool(); - break; - case 21: - message.acquireAllCrowns = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveGameResultRequest_GhostBattleResult { - return { - opponents: Array.isArray(object?.opponents) - ? object.opponents.map((e: any) => - SaveGameResultRequest_GhostBattleResult_GhostBattleOpponent.fromJSON( - e - ) - ) - : [], - path: isSet(object.path) ? Number(object.path) : 0, - isMorning: isSet(object.isMorning) ? Boolean(object.isMorning) : false, - selectionMethod: isSet(object.selectionMethod) - ? ghostSelectionMethodFromJSON(object.selectionMethod) - : 1, - stampSheetCount: isSet(object.stampSheetCount) - ? Number(object.stampSheetCount) - : 0, - stampSheet: Array.isArray(object?.stampSheet) - ? object.stampSheet.map((e: any) => Number(e)) - : [], - rgStamp: isSet(object.rgStamp) ? Number(object.rgStamp) : 0, - confirmedTransferredStampTargetCarIds: Array.isArray( - object?.confirmedTransferredStampTargetCarIds - ) - ? object.confirmedTransferredStampTargetCarIds.map((e: any) => - Number(e) - ) - : [], - rgPlayCount: isSet(object.rgPlayCount) ? Number(object.rgPlayCount) : 0, - dressupLevel: isSet(object.dressupLevel) - ? Number(object.dressupLevel) - : 0, - dressupPoint: isSet(object.dressupPoint) - ? Number(object.dressupPoint) - : 0, - rgRegionMapScore: Array.isArray(object?.rgRegionMapScore) - ? object.rgRegionMapScore.map((e: any) => Number(e)) - : [], - competitionId: isSet(object.competitionId) - ? Number(object.competitionId) - : 0, - periodId: isSet(object.periodId) ? Number(object.periodId) : 0, - brakingPoint: isSet(object.brakingPoint) - ? Number(object.brakingPoint) - : 0, - acquireCrown: isSet(object.acquireCrown) - ? Boolean(object.acquireCrown) - : false, - acquireAllCrowns: isSet(object.acquireAllCrowns) - ? Boolean(object.acquireAllCrowns) - : false, - }; - }, - - toJSON(message: SaveGameResultRequest_GhostBattleResult): unknown { - const obj: any = {}; - if (message.opponents) { - obj.opponents = message.opponents.map((e) => - e - ? SaveGameResultRequest_GhostBattleResult_GhostBattleOpponent.toJSON( - e - ) - : undefined - ); - } else { - obj.opponents = []; - } - message.path !== undefined && (obj.path = Math.round(message.path)); - message.isMorning !== undefined && (obj.isMorning = message.isMorning); - message.selectionMethod !== undefined && - (obj.selectionMethod = ghostSelectionMethodToJSON( - message.selectionMethod - )); - message.stampSheetCount !== undefined && - (obj.stampSheetCount = Math.round(message.stampSheetCount)); - if (message.stampSheet) { - obj.stampSheet = message.stampSheet.map((e) => Math.round(e)); - } else { - obj.stampSheet = []; - } - message.rgStamp !== undefined && - (obj.rgStamp = Math.round(message.rgStamp)); - if (message.confirmedTransferredStampTargetCarIds) { - obj.confirmedTransferredStampTargetCarIds = - message.confirmedTransferredStampTargetCarIds.map((e) => Math.round(e)); - } else { - obj.confirmedTransferredStampTargetCarIds = []; - } - message.rgPlayCount !== undefined && - (obj.rgPlayCount = Math.round(message.rgPlayCount)); - message.dressupLevel !== undefined && - (obj.dressupLevel = Math.round(message.dressupLevel)); - message.dressupPoint !== undefined && - (obj.dressupPoint = Math.round(message.dressupPoint)); - if (message.rgRegionMapScore) { - obj.rgRegionMapScore = message.rgRegionMapScore.map((e) => Math.round(e)); - } else { - obj.rgRegionMapScore = []; - } - message.competitionId !== undefined && - (obj.competitionId = Math.round(message.competitionId)); - message.periodId !== undefined && - (obj.periodId = Math.round(message.periodId)); - message.brakingPoint !== undefined && - (obj.brakingPoint = Math.round(message.brakingPoint)); - message.acquireCrown !== undefined && - (obj.acquireCrown = message.acquireCrown); - message.acquireAllCrowns !== undefined && - (obj.acquireAllCrowns = message.acquireAllCrowns); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): SaveGameResultRequest_GhostBattleResult { - const message = createBaseSaveGameResultRequest_GhostBattleResult(); - message.opponents = - object.opponents?.map((e) => - SaveGameResultRequest_GhostBattleResult_GhostBattleOpponent.fromPartial( - e - ) - ) || []; - message.path = object.path ?? 0; - message.isMorning = object.isMorning ?? false; - message.selectionMethod = object.selectionMethod ?? 1; - message.stampSheetCount = object.stampSheetCount ?? 0; - message.stampSheet = object.stampSheet?.map((e) => e) || []; - message.rgStamp = object.rgStamp ?? 0; - message.confirmedTransferredStampTargetCarIds = - object.confirmedTransferredStampTargetCarIds?.map((e) => e) || []; - message.rgPlayCount = object.rgPlayCount ?? 0; - message.dressupLevel = object.dressupLevel ?? 0; - message.dressupPoint = object.dressupPoint ?? 0; - message.rgRegionMapScore = object.rgRegionMapScore?.map((e) => e) || []; - message.competitionId = object.competitionId ?? 0; - message.periodId = object.periodId ?? 0; - message.brakingPoint = object.brakingPoint ?? 0; - message.acquireCrown = object.acquireCrown ?? false; - message.acquireAllCrowns = object.acquireAllCrowns ?? false; - return message; - }, -}; - -function createBaseSaveGameResultRequest_GhostBattleResult_GhostBattleOpponent(): SaveGameResultRequest_GhostBattleResult_GhostBattleOpponent { - return { - result: 0, - carId: 0, - tunePower: 0, - tuneHandling: 0, - receiveStamp: false, - }; -} - -export const SaveGameResultRequest_GhostBattleResult_GhostBattleOpponent = { - encode( - message: SaveGameResultRequest_GhostBattleResult_GhostBattleOpponent, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.result !== 0) { - writer.uint32(8).sint32(message.result); - } - if (message.carId !== 0) { - writer.uint32(16).uint32(message.carId); - } - if (message.tunePower !== 0) { - writer.uint32(24).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(32).uint32(message.tuneHandling); - } - if (message.receiveStamp === true) { - writer.uint32(40).bool(message.receiveStamp); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveGameResultRequest_GhostBattleResult_GhostBattleOpponent { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = - createBaseSaveGameResultRequest_GhostBattleResult_GhostBattleOpponent(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.sint32(); - break; - case 2: - message.carId = reader.uint32(); - break; - case 3: - message.tunePower = reader.uint32(); - break; - case 4: - message.tuneHandling = reader.uint32(); - break; - case 5: - message.receiveStamp = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON( - object: any - ): SaveGameResultRequest_GhostBattleResult_GhostBattleOpponent { - return { - result: isSet(object.result) ? Number(object.result) : 0, - carId: isSet(object.carId) ? Number(object.carId) : 0, - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - receiveStamp: isSet(object.receiveStamp) - ? Boolean(object.receiveStamp) - : false, - }; - }, - - toJSON( - message: SaveGameResultRequest_GhostBattleResult_GhostBattleOpponent - ): unknown { - const obj: any = {}; - message.result !== undefined && (obj.result = Math.round(message.result)); - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.receiveStamp !== undefined && - (obj.receiveStamp = message.receiveStamp); - return obj; - }, - - fromPartial< - I extends Exact< - DeepPartial, - I - > - >(object: I): SaveGameResultRequest_GhostBattleResult_GhostBattleOpponent { - const message = - createBaseSaveGameResultRequest_GhostBattleResult_GhostBattleOpponent(); - message.result = object.result ?? 0; - message.carId = object.carId ?? 0; - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.receiveStamp = object.receiveStamp ?? false; - return message; - }, -}; - -function createBaseSaveGameResultResponse(): SaveGameResultResponse { - return { error: 0, ghostSessionId: 0, availableTickets: [] }; -} - -export const SaveGameResultResponse = { - encode( - message: SaveGameResultResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - if (message.ghostSessionId !== 0) { - writer.uint32(16).uint64(message.ghostSessionId); - } - for (const v of message.availableTickets) { - UserItem.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveGameResultResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveGameResultResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.ghostSessionId = longToNumber(reader.uint64() as Long); - break; - case 3: - message.availableTickets.push( - UserItem.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveGameResultResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - ghostSessionId: isSet(object.ghostSessionId) - ? Number(object.ghostSessionId) - : 0, - availableTickets: Array.isArray(object?.availableTickets) - ? object.availableTickets.map((e: any) => UserItem.fromJSON(e)) - : [], - }; - }, - - toJSON(message: SaveGameResultResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - message.ghostSessionId !== undefined && - (obj.ghostSessionId = Math.round(message.ghostSessionId)); - if (message.availableTickets) { - obj.availableTickets = message.availableTickets.map((e) => - e ? UserItem.toJSON(e) : undefined - ); - } else { - obj.availableTickets = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): SaveGameResultResponse { - const message = createBaseSaveGameResultResponse(); - message.error = object.error ?? 0; - message.ghostSessionId = object.ghostSessionId ?? 0; - message.availableTickets = - object.availableTickets?.map((e) => UserItem.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseSaveChargeRequest(): SaveChargeRequest { - return { chargeLogs: [] }; -} - -export const SaveChargeRequest = { - encode( - message: SaveChargeRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - for (const v of message.chargeLogs) { - SaveChargeRequest_ChargeLog.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SaveChargeRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveChargeRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chargeLogs.push( - SaveChargeRequest_ChargeLog.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveChargeRequest { - return { - chargeLogs: Array.isArray(object?.chargeLogs) - ? object.chargeLogs.map((e: any) => - SaveChargeRequest_ChargeLog.fromJSON(e) - ) - : [], - }; - }, - - toJSON(message: SaveChargeRequest): unknown { - const obj: any = {}; - if (message.chargeLogs) { - obj.chargeLogs = message.chargeLogs.map((e) => - e ? SaveChargeRequest_ChargeLog.toJSON(e) : undefined - ); - } else { - obj.chargeLogs = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): SaveChargeRequest { - const message = createBaseSaveChargeRequest(); - message.chargeLogs = - object.chargeLogs?.map((e) => - SaveChargeRequest_ChargeLog.fromPartial(e) - ) || []; - return message; - }, -}; - -function createBaseSaveChargeRequest_ChargeLog(): SaveChargeRequest_ChargeLog { - return { datetime: 0, pcbSerial: "", placeId: "", userId: 0 }; -} - -export const SaveChargeRequest_ChargeLog = { - encode( - message: SaveChargeRequest_ChargeLog, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.datetime !== 0) { - writer.uint32(8).uint32(message.datetime); - } - if (message.pcbSerial !== "") { - writer.uint32(18).string(message.pcbSerial); - } - if (message.placeId !== "") { - writer.uint32(26).string(message.placeId); - } - if (message.userId !== 0) { - writer.uint32(32).uint32(message.userId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveChargeRequest_ChargeLog { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveChargeRequest_ChargeLog(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.datetime = reader.uint32(); - break; - case 2: - message.pcbSerial = reader.string(); - break; - case 3: - message.placeId = reader.string(); - break; - case 4: - message.userId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveChargeRequest_ChargeLog { - return { - datetime: isSet(object.datetime) ? Number(object.datetime) : 0, - pcbSerial: isSet(object.pcbSerial) ? String(object.pcbSerial) : "", - placeId: isSet(object.placeId) ? String(object.placeId) : "", - userId: isSet(object.userId) ? Number(object.userId) : 0, - }; - }, - - toJSON(message: SaveChargeRequest_ChargeLog): unknown { - const obj: any = {}; - message.datetime !== undefined && - (obj.datetime = Math.round(message.datetime)); - message.pcbSerial !== undefined && (obj.pcbSerial = message.pcbSerial); - message.placeId !== undefined && (obj.placeId = message.placeId); - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): SaveChargeRequest_ChargeLog { - const message = createBaseSaveChargeRequest_ChargeLog(); - message.datetime = object.datetime ?? 0; - message.pcbSerial = object.pcbSerial ?? ""; - message.placeId = object.placeId ?? ""; - message.userId = object.userId ?? 0; - return message; - }, -}; - -function createBaseSaveChargeResponse(): SaveChargeResponse { - return { error: 0 }; -} - -export const SaveChargeResponse = { - encode( - message: SaveChargeResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SaveChargeResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveChargeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveChargeResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: SaveChargeResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): SaveChargeResponse { - const message = createBaseSaveChargeResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseLoadGhostBattleInfoRequest(): LoadGhostBattleInfoRequest { - return { carId: 0 }; -} - -export const LoadGhostBattleInfoRequest = { - encode( - message: LoadGhostBattleInfoRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGhostBattleInfoRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGhostBattleInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGhostBattleInfoRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - }; - }, - - toJSON(message: LoadGhostBattleInfoRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadGhostBattleInfoRequest { - const message = createBaseLoadGhostBattleInfoRequest(); - message.carId = object.carId ?? 0; - return message; - }, -}; - -function createBaseLoadGhostBattleInfoResponse(): LoadGhostBattleInfoResponse { - return { - error: 0, - friendCars: [], - challengers: [], - stampTargetCars: [], - previousVersionStampTargetCars: [], - bookmarkedCars: [], - history: [], - weakenedCars: [], - stampSheetCount: 0, - stampSheet: [], - stampReturnStats: [], - }; -} - -export const LoadGhostBattleInfoResponse = { - encode( - message: LoadGhostBattleInfoResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - for (const v of message.friendCars) { - FriendCar.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.challengers) { - ChallengerCar.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.stampTargetCars) { - StampTargetCar.encode(v!, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.previousVersionStampTargetCars) { - PreviousVersionStampTargetCar.encode( - v!, - writer.uint32(98).fork() - ).ldelim(); - } - for (const v of message.bookmarkedCars) { - BookmarkedCar.encode(v!, writer.uint32(90).fork()).ldelim(); - } - for (const v of message.history) { - Car.encode(v!, writer.uint32(42).fork()).ldelim(); - } - for (const v of message.weakenedCars) { - LoadGhostBattleInfoResponse_WeakenedCar.encode( - v!, - writer.uint32(82).fork() - ).ldelim(); - } - if (message.stampSheetCount !== 0) { - writer.uint32(56).uint32(message.stampSheetCount); - } - writer.uint32(66).fork(); - for (const v of message.stampSheet) { - writer.uint32(v); - } - writer.ldelim(); - writer.uint32(74).fork(); - for (const v of message.stampReturnStats) { - writer.uint32(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGhostBattleInfoResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGhostBattleInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.friendCars.push(FriendCar.decode(reader, reader.uint32())); - break; - case 3: - message.challengers.push( - ChallengerCar.decode(reader, reader.uint32()) - ); - break; - case 4: - message.stampTargetCars.push( - StampTargetCar.decode(reader, reader.uint32()) - ); - break; - case 12: - message.previousVersionStampTargetCars.push( - PreviousVersionStampTargetCar.decode(reader, reader.uint32()) - ); - break; - case 11: - message.bookmarkedCars.push( - BookmarkedCar.decode(reader, reader.uint32()) - ); - break; - case 5: - message.history.push(Car.decode(reader, reader.uint32())); - break; - case 10: - message.weakenedCars.push( - LoadGhostBattleInfoResponse_WeakenedCar.decode( - reader, - reader.uint32() - ) - ); - break; - case 7: - message.stampSheetCount = reader.uint32(); - break; - case 8: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.stampSheet.push(reader.uint32()); - } - } else { - message.stampSheet.push(reader.uint32()); - } - break; - case 9: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.stampReturnStats.push(reader.uint32()); - } - } else { - message.stampReturnStats.push(reader.uint32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGhostBattleInfoResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - friendCars: Array.isArray(object?.friendCars) - ? object.friendCars.map((e: any) => FriendCar.fromJSON(e)) - : [], - challengers: Array.isArray(object?.challengers) - ? object.challengers.map((e: any) => ChallengerCar.fromJSON(e)) - : [], - stampTargetCars: Array.isArray(object?.stampTargetCars) - ? object.stampTargetCars.map((e: any) => StampTargetCar.fromJSON(e)) - : [], - previousVersionStampTargetCars: Array.isArray( - object?.previousVersionStampTargetCars - ) - ? object.previousVersionStampTargetCars.map((e: any) => - PreviousVersionStampTargetCar.fromJSON(e) - ) - : [], - bookmarkedCars: Array.isArray(object?.bookmarkedCars) - ? object.bookmarkedCars.map((e: any) => BookmarkedCar.fromJSON(e)) - : [], - history: Array.isArray(object?.history) - ? object.history.map((e: any) => Car.fromJSON(e)) - : [], - weakenedCars: Array.isArray(object?.weakenedCars) - ? object.weakenedCars.map((e: any) => - LoadGhostBattleInfoResponse_WeakenedCar.fromJSON(e) - ) - : [], - stampSheetCount: isSet(object.stampSheetCount) - ? Number(object.stampSheetCount) - : 0, - stampSheet: Array.isArray(object?.stampSheet) - ? object.stampSheet.map((e: any) => Number(e)) - : [], - stampReturnStats: Array.isArray(object?.stampReturnStats) - ? object.stampReturnStats.map((e: any) => Number(e)) - : [], - }; - }, - - toJSON(message: LoadGhostBattleInfoResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - if (message.friendCars) { - obj.friendCars = message.friendCars.map((e) => - e ? FriendCar.toJSON(e) : undefined - ); - } else { - obj.friendCars = []; - } - if (message.challengers) { - obj.challengers = message.challengers.map((e) => - e ? ChallengerCar.toJSON(e) : undefined - ); - } else { - obj.challengers = []; - } - if (message.stampTargetCars) { - obj.stampTargetCars = message.stampTargetCars.map((e) => - e ? StampTargetCar.toJSON(e) : undefined - ); - } else { - obj.stampTargetCars = []; - } - if (message.previousVersionStampTargetCars) { - obj.previousVersionStampTargetCars = - message.previousVersionStampTargetCars.map((e) => - e ? PreviousVersionStampTargetCar.toJSON(e) : undefined - ); - } else { - obj.previousVersionStampTargetCars = []; - } - if (message.bookmarkedCars) { - obj.bookmarkedCars = message.bookmarkedCars.map((e) => - e ? BookmarkedCar.toJSON(e) : undefined - ); - } else { - obj.bookmarkedCars = []; - } - if (message.history) { - obj.history = message.history.map((e) => (e ? Car.toJSON(e) : undefined)); - } else { - obj.history = []; - } - if (message.weakenedCars) { - obj.weakenedCars = message.weakenedCars.map((e) => - e ? LoadGhostBattleInfoResponse_WeakenedCar.toJSON(e) : undefined - ); - } else { - obj.weakenedCars = []; - } - message.stampSheetCount !== undefined && - (obj.stampSheetCount = Math.round(message.stampSheetCount)); - if (message.stampSheet) { - obj.stampSheet = message.stampSheet.map((e) => Math.round(e)); - } else { - obj.stampSheet = []; - } - if (message.stampReturnStats) { - obj.stampReturnStats = message.stampReturnStats.map((e) => Math.round(e)); - } else { - obj.stampReturnStats = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadGhostBattleInfoResponse { - const message = createBaseLoadGhostBattleInfoResponse(); - message.error = object.error ?? 0; - message.friendCars = - object.friendCars?.map((e) => FriendCar.fromPartial(e)) || []; - message.challengers = - object.challengers?.map((e) => ChallengerCar.fromPartial(e)) || []; - message.stampTargetCars = - object.stampTargetCars?.map((e) => StampTargetCar.fromPartial(e)) || []; - message.previousVersionStampTargetCars = - object.previousVersionStampTargetCars?.map((e) => - PreviousVersionStampTargetCar.fromPartial(e) - ) || []; - message.bookmarkedCars = - object.bookmarkedCars?.map((e) => BookmarkedCar.fromPartial(e)) || []; - message.history = object.history?.map((e) => Car.fromPartial(e)) || []; - message.weakenedCars = - object.weakenedCars?.map((e) => - LoadGhostBattleInfoResponse_WeakenedCar.fromPartial(e) - ) || []; - message.stampSheetCount = object.stampSheetCount ?? 0; - message.stampSheet = object.stampSheet?.map((e) => e) || []; - message.stampReturnStats = object.stampReturnStats?.map((e) => e) || []; - return message; - }, -}; - -function createBaseLoadGhostBattleInfoResponse_WeakenedCar(): LoadGhostBattleInfoResponse_WeakenedCar { - return { carId: 0, consecutiveLosses: 0 }; -} - -export const LoadGhostBattleInfoResponse_WeakenedCar = { - encode( - message: LoadGhostBattleInfoResponse_WeakenedCar, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.consecutiveLosses !== 0) { - writer.uint32(16).uint32(message.consecutiveLosses); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGhostBattleInfoResponse_WeakenedCar { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGhostBattleInfoResponse_WeakenedCar(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.consecutiveLosses = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGhostBattleInfoResponse_WeakenedCar { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - consecutiveLosses: isSet(object.consecutiveLosses) - ? Number(object.consecutiveLosses) - : 0, - }; - }, - - toJSON(message: LoadGhostBattleInfoResponse_WeakenedCar): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.consecutiveLosses !== undefined && - (obj.consecutiveLosses = Math.round(message.consecutiveLosses)); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): LoadGhostBattleInfoResponse_WeakenedCar { - const message = createBaseLoadGhostBattleInfoResponse_WeakenedCar(); - message.carId = object.carId ?? 0; - message.consecutiveLosses = object.consecutiveLosses ?? 0; - return message; - }, -}; - -function createBaseLoadStampTargetRequest(): LoadStampTargetRequest { - return { carId: 0, needToPromote: false }; -} - -export const LoadStampTargetRequest = { - encode( - message: LoadStampTargetRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.needToPromote === true) { - writer.uint32(16).bool(message.needToPromote); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadStampTargetRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadStampTargetRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.needToPromote = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadStampTargetRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - needToPromote: isSet(object.needToPromote) - ? Boolean(object.needToPromote) - : false, - }; - }, - - toJSON(message: LoadStampTargetRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.needToPromote !== undefined && - (obj.needToPromote = message.needToPromote); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadStampTargetRequest { - const message = createBaseLoadStampTargetRequest(); - message.carId = object.carId ?? 0; - message.needToPromote = object.needToPromote ?? false; - return message; - }, -}; - -function createBaseLoadStampTargetResponse(): LoadStampTargetResponse { - return { error: 0, cars: [], challengers: [] }; -} - -export const LoadStampTargetResponse = { - encode( - message: LoadStampTargetResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - for (const v of message.cars) { - StampTargetCar.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.challengers) { - ChallengerCar.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadStampTargetResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadStampTargetResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.cars.push(StampTargetCar.decode(reader, reader.uint32())); - break; - case 3: - message.challengers.push( - ChallengerCar.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadStampTargetResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - cars: Array.isArray(object?.cars) - ? object.cars.map((e: any) => StampTargetCar.fromJSON(e)) - : [], - challengers: Array.isArray(object?.challengers) - ? object.challengers.map((e: any) => ChallengerCar.fromJSON(e)) - : [], - }; - }, - - toJSON(message: LoadStampTargetResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - if (message.cars) { - obj.cars = message.cars.map((e) => - e ? StampTargetCar.toJSON(e) : undefined - ); - } else { - obj.cars = []; - } - if (message.challengers) { - obj.challengers = message.challengers.map((e) => - e ? ChallengerCar.toJSON(e) : undefined - ); - } else { - obj.challengers = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadStampTargetResponse { - const message = createBaseLoadStampTargetResponse(); - message.error = object.error ?? 0; - message.cars = object.cars?.map((e) => StampTargetCar.fromPartial(e)) || []; - message.challengers = - object.challengers?.map((e) => ChallengerCar.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseLockStampTargetRequest(): LockStampTargetRequest { - return { carId: 0, targetCars: [] }; -} - -export const LockStampTargetRequest = { - encode( - message: LockStampTargetRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - writer.uint32(18).fork(); - for (const v of message.targetCars) { - writer.uint32(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LockStampTargetRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLockStampTargetRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.targetCars.push(reader.uint32()); - } - } else { - message.targetCars.push(reader.uint32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LockStampTargetRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - targetCars: Array.isArray(object?.targetCars) - ? object.targetCars.map((e: any) => Number(e)) - : [], - }; - }, - - toJSON(message: LockStampTargetRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - if (message.targetCars) { - obj.targetCars = message.targetCars.map((e) => Math.round(e)); - } else { - obj.targetCars = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): LockStampTargetRequest { - const message = createBaseLockStampTargetRequest(); - message.carId = object.carId ?? 0; - message.targetCars = object.targetCars?.map((e) => e) || []; - return message; - }, -}; - -function createBaseLockStampTargetResponse(): LockStampTargetResponse { - return { error: 0 }; -} - -export const LockStampTargetResponse = { - encode( - message: LockStampTargetResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LockStampTargetResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLockStampTargetResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LockStampTargetResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: LockStampTargetResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LockStampTargetResponse { - const message = createBaseLockStampTargetResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseLoadGhostCompetitionInfoRequest(): LoadGhostCompetitionInfoRequest { - return { carId: 0, competitionId: 0 }; -} - -export const LoadGhostCompetitionInfoRequest = { - encode( - message: LoadGhostCompetitionInfoRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.competitionId !== 0) { - writer.uint32(16).uint32(message.competitionId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGhostCompetitionInfoRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGhostCompetitionInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.competitionId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGhostCompetitionInfoRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - competitionId: isSet(object.competitionId) - ? Number(object.competitionId) - : 0, - }; - }, - - toJSON(message: LoadGhostCompetitionInfoRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.competitionId !== undefined && - (obj.competitionId = Math.round(message.competitionId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadGhostCompetitionInfoRequest { - const message = createBaseLoadGhostCompetitionInfoRequest(); - message.carId = object.carId ?? 0; - message.competitionId = object.competitionId ?? 0; - return message; - }, -}; - -function createBaseLoadGhostCompetitionInfoResponse(): LoadGhostCompetitionInfoResponse { - return { - error: 0, - periodId: 0, - closed: false, - brakingPoint: 0, - qualified: false, - topResults: [], - result: 0, - rank: 0, - parameters1: [], - parameters2: false, - }; -} - -export const LoadGhostCompetitionInfoResponse = { - encode( - message: LoadGhostCompetitionInfoResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - if (message.periodId !== 0) { - writer.uint32(16).uint32(message.periodId); - } - if (message.closed === true) { - writer.uint32(24).bool(message.closed); - } - if (message.brakingPoint !== 0) { - writer.uint32(32).uint32(message.brakingPoint); - } - if (message.qualified === true) { - writer.uint32(40).bool(message.qualified); - } - writer.uint32(50).fork(); - for (const v of message.topResults) { - writer.sint32(v); - } - writer.ldelim(); - if (message.result !== 0) { - writer.uint32(56).sint32(message.result); - } - if (message.rank !== 0) { - writer.uint32(64).uint32(message.rank); - } - writer.uint32(74).fork(); - for (const v of message.parameters1) { - writer.float(v); - } - writer.ldelim(); - if (message.parameters2 === true) { - writer.uint32(80).bool(message.parameters2); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGhostCompetitionInfoResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGhostCompetitionInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.periodId = reader.uint32(); - break; - case 3: - message.closed = reader.bool(); - break; - case 4: - message.brakingPoint = reader.uint32(); - break; - case 5: - message.qualified = reader.bool(); - break; - case 6: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.topResults.push(reader.sint32()); - } - } else { - message.topResults.push(reader.sint32()); - } - break; - case 7: - message.result = reader.sint32(); - break; - case 8: - message.rank = reader.uint32(); - break; - case 9: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.parameters1.push(reader.float()); - } - } else { - message.parameters1.push(reader.float()); - } - break; - case 10: - message.parameters2 = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGhostCompetitionInfoResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - periodId: isSet(object.periodId) ? Number(object.periodId) : 0, - closed: isSet(object.closed) ? Boolean(object.closed) : false, - brakingPoint: isSet(object.brakingPoint) - ? Number(object.brakingPoint) - : 0, - qualified: isSet(object.qualified) ? Boolean(object.qualified) : false, - topResults: Array.isArray(object?.topResults) - ? object.topResults.map((e: any) => Number(e)) - : [], - result: isSet(object.result) ? Number(object.result) : 0, - rank: isSet(object.rank) ? Number(object.rank) : 0, - parameters1: Array.isArray(object?.parameters1) - ? object.parameters1.map((e: any) => Number(e)) - : [], - parameters2: isSet(object.parameters2) - ? Boolean(object.parameters2) - : false, - }; - }, - - toJSON(message: LoadGhostCompetitionInfoResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - message.periodId !== undefined && - (obj.periodId = Math.round(message.periodId)); - message.closed !== undefined && (obj.closed = message.closed); - message.brakingPoint !== undefined && - (obj.brakingPoint = Math.round(message.brakingPoint)); - message.qualified !== undefined && (obj.qualified = message.qualified); - if (message.topResults) { - obj.topResults = message.topResults.map((e) => Math.round(e)); - } else { - obj.topResults = []; - } - message.result !== undefined && (obj.result = Math.round(message.result)); - message.rank !== undefined && (obj.rank = Math.round(message.rank)); - if (message.parameters1) { - obj.parameters1 = message.parameters1.map((e) => e); - } else { - obj.parameters1 = []; - } - message.parameters2 !== undefined && - (obj.parameters2 = message.parameters2); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): LoadGhostCompetitionInfoResponse { - const message = createBaseLoadGhostCompetitionInfoResponse(); - message.error = object.error ?? 0; - message.periodId = object.periodId ?? 0; - message.closed = object.closed ?? false; - message.brakingPoint = object.brakingPoint ?? 0; - message.qualified = object.qualified ?? false; - message.topResults = object.topResults?.map((e) => e) || []; - message.result = object.result ?? 0; - message.rank = object.rank ?? 0; - message.parameters1 = object.parameters1?.map((e) => e) || []; - message.parameters2 = object.parameters2 ?? false; - return message; - }, -}; - -function createBaseLoadTimeAttackRecordRequest(): LoadTimeAttackRecordRequest { - return { carId: 0, model: 0, course: 0 }; -} - -export const LoadTimeAttackRecordRequest = { - encode( - message: LoadTimeAttackRecordRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.model !== 0) { - writer.uint32(16).uint32(message.model); - } - if (message.course !== 0) { - writer.uint32(24).uint32(message.course); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadTimeAttackRecordRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadTimeAttackRecordRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.model = reader.uint32(); - break; - case 3: - message.course = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadTimeAttackRecordRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - model: isSet(object.model) ? Number(object.model) : 0, - course: isSet(object.course) ? Number(object.course) : 0, - }; - }, - - toJSON(message: LoadTimeAttackRecordRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.model !== undefined && (obj.model = Math.round(message.model)); - message.course !== undefined && (obj.course = Math.round(message.course)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadTimeAttackRecordRequest { - const message = createBaseLoadTimeAttackRecordRequest(); - message.carId = object.carId ?? 0; - message.model = object.model ?? 0; - message.course = object.course ?? 0; - return message; - }, -}; - -function createBaseLoadTimeAttackRecordResponse(): LoadTimeAttackRecordResponse { - return { - error: 0, - wholeRanking: [], - modelRanking: [], - personalBestTime: 0, - pbSection1Time: 0, - pbSection2Time: 0, - pbSection3Time: 0, - pbSection4Time: 0, - pbSection5Time: 0, - pbSection6Time: 0, - pbSection7Time: 0, - }; -} - -export const LoadTimeAttackRecordResponse = { - encode( - message: LoadTimeAttackRecordResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - writer.uint32(18).fork(); - for (const v of message.wholeRanking) { - writer.uint32(v); - } - writer.ldelim(); - writer.uint32(26).fork(); - for (const v of message.modelRanking) { - writer.uint32(v); - } - writer.ldelim(); - if (message.personalBestTime !== 0) { - writer.uint32(32).uint32(message.personalBestTime); - } - if (message.pbSection1Time !== 0) { - writer.uint32(40).uint32(message.pbSection1Time); - } - if (message.pbSection2Time !== 0) { - writer.uint32(48).uint32(message.pbSection2Time); - } - if (message.pbSection3Time !== 0) { - writer.uint32(56).uint32(message.pbSection3Time); - } - if (message.pbSection4Time !== 0) { - writer.uint32(64).uint32(message.pbSection4Time); - } - if (message.pbSection5Time !== 0) { - writer.uint32(72).uint32(message.pbSection5Time); - } - if (message.pbSection6Time !== 0) { - writer.uint32(80).uint32(message.pbSection6Time); - } - if (message.pbSection7Time !== 0) { - writer.uint32(88).uint32(message.pbSection7Time); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadTimeAttackRecordResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadTimeAttackRecordResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.wholeRanking.push(reader.uint32()); - } - } else { - message.wholeRanking.push(reader.uint32()); - } - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.modelRanking.push(reader.uint32()); - } - } else { - message.modelRanking.push(reader.uint32()); - } - break; - case 4: - message.personalBestTime = reader.uint32(); - break; - case 5: - message.pbSection1Time = reader.uint32(); - break; - case 6: - message.pbSection2Time = reader.uint32(); - break; - case 7: - message.pbSection3Time = reader.uint32(); - break; - case 8: - message.pbSection4Time = reader.uint32(); - break; - case 9: - message.pbSection5Time = reader.uint32(); - break; - case 10: - message.pbSection6Time = reader.uint32(); - break; - case 11: - message.pbSection7Time = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadTimeAttackRecordResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - wholeRanking: Array.isArray(object?.wholeRanking) - ? object.wholeRanking.map((e: any) => Number(e)) - : [], - modelRanking: Array.isArray(object?.modelRanking) - ? object.modelRanking.map((e: any) => Number(e)) - : [], - personalBestTime: isSet(object.personalBestTime) - ? Number(object.personalBestTime) - : 0, - pbSection1Time: isSet(object.pbSection1Time) - ? Number(object.pbSection1Time) - : 0, - pbSection2Time: isSet(object.pbSection2Time) - ? Number(object.pbSection2Time) - : 0, - pbSection3Time: isSet(object.pbSection3Time) - ? Number(object.pbSection3Time) - : 0, - pbSection4Time: isSet(object.pbSection4Time) - ? Number(object.pbSection4Time) - : 0, - pbSection5Time: isSet(object.pbSection5Time) - ? Number(object.pbSection5Time) - : 0, - pbSection6Time: isSet(object.pbSection6Time) - ? Number(object.pbSection6Time) - : 0, - pbSection7Time: isSet(object.pbSection7Time) - ? Number(object.pbSection7Time) - : 0, - }; - }, - - toJSON(message: LoadTimeAttackRecordResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - if (message.wholeRanking) { - obj.wholeRanking = message.wholeRanking.map((e) => Math.round(e)); - } else { - obj.wholeRanking = []; - } - if (message.modelRanking) { - obj.modelRanking = message.modelRanking.map((e) => Math.round(e)); - } else { - obj.modelRanking = []; - } - message.personalBestTime !== undefined && - (obj.personalBestTime = Math.round(message.personalBestTime)); - message.pbSection1Time !== undefined && - (obj.pbSection1Time = Math.round(message.pbSection1Time)); - message.pbSection2Time !== undefined && - (obj.pbSection2Time = Math.round(message.pbSection2Time)); - message.pbSection3Time !== undefined && - (obj.pbSection3Time = Math.round(message.pbSection3Time)); - message.pbSection4Time !== undefined && - (obj.pbSection4Time = Math.round(message.pbSection4Time)); - message.pbSection5Time !== undefined && - (obj.pbSection5Time = Math.round(message.pbSection5Time)); - message.pbSection6Time !== undefined && - (obj.pbSection6Time = Math.round(message.pbSection6Time)); - message.pbSection7Time !== undefined && - (obj.pbSection7Time = Math.round(message.pbSection7Time)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadTimeAttackRecordResponse { - const message = createBaseLoadTimeAttackRecordResponse(); - message.error = object.error ?? 0; - message.wholeRanking = object.wholeRanking?.map((e) => e) || []; - message.modelRanking = object.modelRanking?.map((e) => e) || []; - message.personalBestTime = object.personalBestTime ?? 0; - message.pbSection1Time = object.pbSection1Time ?? 0; - message.pbSection2Time = object.pbSection2Time ?? 0; - message.pbSection3Time = object.pbSection3Time ?? 0; - message.pbSection4Time = object.pbSection4Time ?? 0; - message.pbSection5Time = object.pbSection5Time ?? 0; - message.pbSection6Time = object.pbSection6Time ?? 0; - message.pbSection7Time = object.pbSection7Time ?? 0; - return message; - }, -}; - -function createBaseSaveTerminalResultRequest(): SaveTerminalResultRequest { - return { - userId: 0, - timestamp: 0, - carOrder: [], - confirmedTutorials: [], - garageMenuEntered: false, - }; -} - -export const SaveTerminalResultRequest = { - encode( - message: SaveTerminalResultRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.userId !== 0) { - writer.uint32(8).uint32(message.userId); - } - if (message.timestamp !== 0) { - writer.uint32(16).uint32(message.timestamp); - } - writer.uint32(26).fork(); - for (const v of message.carOrder) { - writer.uint32(v); - } - writer.ldelim(); - writer.uint32(42).fork(); - for (const v of message.confirmedTutorials) { - writer.int32(v); - } - writer.ldelim(); - if (message.garageMenuEntered === true) { - writer.uint32(64).bool(message.garageMenuEntered); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveTerminalResultRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveTerminalResultRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userId = reader.uint32(); - break; - case 2: - message.timestamp = reader.uint32(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.carOrder.push(reader.uint32()); - } - } else { - message.carOrder.push(reader.uint32()); - } - break; - case 5: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.confirmedTutorials.push(reader.int32() as any); - } - } else { - message.confirmedTutorials.push(reader.int32() as any); - } - break; - case 8: - message.garageMenuEntered = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveTerminalResultRequest { - return { - userId: isSet(object.userId) ? Number(object.userId) : 0, - timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0, - carOrder: Array.isArray(object?.carOrder) - ? object.carOrder.map((e: any) => Number(e)) - : [], - confirmedTutorials: Array.isArray(object?.confirmedTutorials) - ? object.confirmedTutorials.map((e: any) => tutorialTypeFromJSON(e)) - : [], - garageMenuEntered: isSet(object.garageMenuEntered) - ? Boolean(object.garageMenuEntered) - : false, - }; - }, - - toJSON(message: SaveTerminalResultRequest): unknown { - const obj: any = {}; - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - message.timestamp !== undefined && - (obj.timestamp = Math.round(message.timestamp)); - if (message.carOrder) { - obj.carOrder = message.carOrder.map((e) => Math.round(e)); - } else { - obj.carOrder = []; - } - if (message.confirmedTutorials) { - obj.confirmedTutorials = message.confirmedTutorials.map((e) => - tutorialTypeToJSON(e) - ); - } else { - obj.confirmedTutorials = []; - } - message.garageMenuEntered !== undefined && - (obj.garageMenuEntered = message.garageMenuEntered); - return obj; - }, - - fromPartial, I>>( - object: I - ): SaveTerminalResultRequest { - const message = createBaseSaveTerminalResultRequest(); - message.userId = object.userId ?? 0; - message.timestamp = object.timestamp ?? 0; - message.carOrder = object.carOrder?.map((e) => e) || []; - message.confirmedTutorials = object.confirmedTutorials?.map((e) => e) || []; - message.garageMenuEntered = object.garageMenuEntered ?? false; - return message; - }, -}; - -function createBaseSaveTerminalResultResponse(): SaveTerminalResultResponse { - return { error: 0 }; -} - -export const SaveTerminalResultResponse = { - encode( - message: SaveTerminalResultResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveTerminalResultResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveTerminalResultResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveTerminalResultResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: SaveTerminalResultResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): SaveTerminalResultResponse { - const message = createBaseSaveTerminalResultResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBasePingRequest(): PingRequest { - return { ping: 0 }; -} - -export const PingRequest = { - encode( - message: PingRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.ping !== 0) { - writer.uint32(8).uint32(message.ping); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): PingRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePingRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ping = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PingRequest { - return { - ping: isSet(object.ping) ? Number(object.ping) : 0, - }; - }, - - toJSON(message: PingRequest): unknown { - const obj: any = {}; - message.ping !== undefined && (obj.ping = Math.round(message.ping)); - return obj; - }, - - fromPartial, I>>( - object: I - ): PingRequest { - const message = createBasePingRequest(); - message.ping = object.ping ?? 0; - return message; - }, -}; - -function createBasePingResponse(): PingResponse { - return { error: 0, pong: 0 }; -} - -export const PingResponse = { - encode( - message: PingResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - if (message.pong !== 0) { - writer.uint32(16).uint32(message.pong); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): PingResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePingResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.pong = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PingResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - pong: isSet(object.pong) ? Number(object.pong) : 0, - }; - }, - - toJSON(message: PingResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - message.pong !== undefined && (obj.pong = Math.round(message.pong)); - return obj; - }, - - fromPartial, I>>( - object: I - ): PingResponse { - const message = createBasePingResponse(); - message.error = object.error ?? 0; - message.pong = object.pong ?? 0; - return message; - }, -}; - -function createBaseLoadTerminalInformationRequest(): LoadTerminalInformationRequest { - return { userId: 0 }; -} - -export const LoadTerminalInformationRequest = { - encode( - message: LoadTerminalInformationRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.userId !== 0) { - writer.uint32(8).uint32(message.userId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadTerminalInformationRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadTerminalInformationRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadTerminalInformationRequest { - return { - userId: isSet(object.userId) ? Number(object.userId) : 0, - }; - }, - - toJSON(message: LoadTerminalInformationRequest): unknown { - const obj: any = {}; - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadTerminalInformationRequest { - const message = createBaseLoadTerminalInformationRequest(); - message.userId = object.userId ?? 0; - return message; - }, -}; - -function createBaseLoadTerminalInformationResponse(): LoadTerminalInformationResponse { - return { - error: 0, - prizeReceivable: false, - noticeEntries: [], - noticeMessage: [], - noticeWindow: [], - noticeWindowMessage: [], - transferNotice: undefined, - announceFeature: false, - freeScratched: false, - restrictedModels: [], - }; -} - -export const LoadTerminalInformationResponse = { - encode( - message: LoadTerminalInformationResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - if (message.prizeReceivable === true) { - writer.uint32(136).bool(message.prizeReceivable); - } - for (const v of message.noticeEntries) { - LoadTerminalInformationResponse_TerminalNotice.encode( - v!, - writer.uint32(82).fork() - ).ldelim(); - } - for (const v of message.noticeMessage) { - writer.uint32(90).string(v!); - } - writer.uint32(98).fork(); - for (const v of message.noticeWindow) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.noticeWindowMessage) { - writer.uint32(106).string(v!); - } - if (message.transferNotice !== undefined) { - TransferNotice.encode( - message.transferNotice, - writer.uint32(114).fork() - ).ldelim(); - } - if (message.announceFeature === true) { - writer.uint32(128).bool(message.announceFeature); - } - if (message.freeScratched === true) { - writer.uint32(144).bool(message.freeScratched); - } - writer.uint32(18).fork(); - for (const v of message.restrictedModels) { - writer.uint32(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadTerminalInformationResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadTerminalInformationResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 17: - message.prizeReceivable = reader.bool(); - break; - case 10: - message.noticeEntries.push( - LoadTerminalInformationResponse_TerminalNotice.decode( - reader, - reader.uint32() - ) - ); - break; - case 11: - message.noticeMessage.push(reader.string()); - break; - case 12: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.noticeWindow.push(reader.int32() as any); - } - } else { - message.noticeWindow.push(reader.int32() as any); - } - break; - case 13: - message.noticeWindowMessage.push(reader.string()); - break; - case 14: - message.transferNotice = TransferNotice.decode( - reader, - reader.uint32() - ); - break; - case 16: - message.announceFeature = reader.bool(); - break; - case 18: - message.freeScratched = reader.bool(); - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.restrictedModels.push(reader.uint32()); - } - } else { - message.restrictedModels.push(reader.uint32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadTerminalInformationResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - prizeReceivable: isSet(object.prizeReceivable) - ? Boolean(object.prizeReceivable) - : false, - noticeEntries: Array.isArray(object?.noticeEntries) - ? object.noticeEntries.map((e: any) => - LoadTerminalInformationResponse_TerminalNotice.fromJSON(e) - ) - : [], - noticeMessage: Array.isArray(object?.noticeMessage) - ? object.noticeMessage.map((e: any) => String(e)) - : [], - noticeWindow: Array.isArray(object?.noticeWindow) - ? object.noticeWindow.map((e: any) => noticeEntryFromJSON(e)) - : [], - noticeWindowMessage: Array.isArray(object?.noticeWindowMessage) - ? object.noticeWindowMessage.map((e: any) => String(e)) - : [], - transferNotice: isSet(object.transferNotice) - ? TransferNotice.fromJSON(object.transferNotice) - : undefined, - announceFeature: isSet(object.announceFeature) - ? Boolean(object.announceFeature) - : false, - freeScratched: isSet(object.freeScratched) - ? Boolean(object.freeScratched) - : false, - restrictedModels: Array.isArray(object?.restrictedModels) - ? object.restrictedModels.map((e: any) => Number(e)) - : [], - }; - }, - - toJSON(message: LoadTerminalInformationResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - message.prizeReceivable !== undefined && - (obj.prizeReceivable = message.prizeReceivable); - if (message.noticeEntries) { - obj.noticeEntries = message.noticeEntries.map((e) => - e ? LoadTerminalInformationResponse_TerminalNotice.toJSON(e) : undefined - ); - } else { - obj.noticeEntries = []; - } - if (message.noticeMessage) { - obj.noticeMessage = message.noticeMessage.map((e) => e); - } else { - obj.noticeMessage = []; - } - if (message.noticeWindow) { - obj.noticeWindow = message.noticeWindow.map((e) => noticeEntryToJSON(e)); - } else { - obj.noticeWindow = []; - } - if (message.noticeWindowMessage) { - obj.noticeWindowMessage = message.noticeWindowMessage.map((e) => e); - } else { - obj.noticeWindowMessage = []; - } - message.transferNotice !== undefined && - (obj.transferNotice = message.transferNotice - ? TransferNotice.toJSON(message.transferNotice) - : undefined); - message.announceFeature !== undefined && - (obj.announceFeature = message.announceFeature); - message.freeScratched !== undefined && - (obj.freeScratched = message.freeScratched); - if (message.restrictedModels) { - obj.restrictedModels = message.restrictedModels.map((e) => Math.round(e)); - } else { - obj.restrictedModels = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadTerminalInformationResponse { - const message = createBaseLoadTerminalInformationResponse(); - message.error = object.error ?? 0; - message.prizeReceivable = object.prizeReceivable ?? false; - message.noticeEntries = - object.noticeEntries?.map((e) => - LoadTerminalInformationResponse_TerminalNotice.fromPartial(e) - ) || []; - message.noticeMessage = object.noticeMessage?.map((e) => e) || []; - message.noticeWindow = object.noticeWindow?.map((e) => e) || []; - message.noticeWindowMessage = - object.noticeWindowMessage?.map((e) => e) || []; - message.transferNotice = - object.transferNotice !== undefined && object.transferNotice !== null - ? TransferNotice.fromPartial(object.transferNotice) - : undefined; - message.announceFeature = object.announceFeature ?? false; - message.freeScratched = object.freeScratched ?? false; - message.restrictedModels = object.restrictedModels?.map((e) => e) || []; - return message; - }, -}; - -function createBaseLoadTerminalInformationResponse_TerminalNotice(): LoadTerminalInformationResponse_TerminalNotice { - return { noticeType: 1, field1: "", field2: 0, field3: 0 }; -} - -export const LoadTerminalInformationResponse_TerminalNotice = { - encode( - message: LoadTerminalInformationResponse_TerminalNotice, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.noticeType !== 1) { - writer.uint32(8).int32(message.noticeType); - } - if (message.field1 !== "") { - writer.uint32(18).string(message.field1); - } - if (message.field2 !== 0) { - writer.uint32(24).uint32(message.field2); - } - if (message.field3 !== 0) { - writer.uint32(32).uint32(message.field3); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadTerminalInformationResponse_TerminalNotice { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadTerminalInformationResponse_TerminalNotice(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.noticeType = reader.int32() as any; - break; - case 2: - message.field1 = reader.string(); - break; - case 3: - message.field2 = reader.uint32(); - break; - case 4: - message.field3 = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadTerminalInformationResponse_TerminalNotice { - return { - noticeType: isSet(object.noticeType) - ? noticeEntryFromJSON(object.noticeType) - : 1, - field1: isSet(object.field1) ? String(object.field1) : "", - field2: isSet(object.field2) ? Number(object.field2) : 0, - field3: isSet(object.field3) ? Number(object.field3) : 0, - }; - }, - - toJSON(message: LoadTerminalInformationResponse_TerminalNotice): unknown { - const obj: any = {}; - message.noticeType !== undefined && - (obj.noticeType = noticeEntryToJSON(message.noticeType)); - message.field1 !== undefined && (obj.field1 = message.field1); - message.field2 !== undefined && (obj.field2 = Math.round(message.field2)); - message.field3 !== undefined && (obj.field3 = Math.round(message.field3)); - return obj; - }, - - fromPartial< - I extends Exact< - DeepPartial, - I - > - >(object: I): LoadTerminalInformationResponse_TerminalNotice { - const message = createBaseLoadTerminalInformationResponse_TerminalNotice(); - message.noticeType = object.noticeType ?? 1; - message.field1 = object.field1 ?? ""; - message.field2 = object.field2 ?? 0; - message.field3 = object.field3 ?? 0; - return message; - }, -}; - -function createBaseCreateUserRequest(): CreateUserRequest { - return { - banapassportAmId: 0, - cardChipId: "", - accessCode: "", - cardTypeCode: 0, - cardRegionCode: 0, - device: 0, - timestamp: 0, - }; -} - -export const CreateUserRequest = { - encode( - message: CreateUserRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.banapassportAmId !== 0) { - writer.uint32(8).uint32(message.banapassportAmId); - } - if (message.cardChipId !== "") { - writer.uint32(18).string(message.cardChipId); - } - if (message.accessCode !== "") { - writer.uint32(26).string(message.accessCode); - } - if (message.cardTypeCode !== 0) { - writer.uint32(32).uint32(message.cardTypeCode); - } - if (message.cardRegionCode !== 0) { - writer.uint32(40).uint32(message.cardRegionCode); - } - if (message.device !== 0) { - writer.uint32(48).int32(message.device); - } - if (message.timestamp !== 0) { - writer.uint32(56).uint32(message.timestamp); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CreateUserRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateUserRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.banapassportAmId = reader.uint32(); - break; - case 2: - message.cardChipId = reader.string(); - break; - case 3: - message.accessCode = reader.string(); - break; - case 4: - message.cardTypeCode = reader.uint32(); - break; - case 5: - message.cardRegionCode = reader.uint32(); - break; - case 6: - message.device = reader.int32() as any; - break; - case 7: - message.timestamp = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CreateUserRequest { - return { - banapassportAmId: isSet(object.banapassportAmId) - ? Number(object.banapassportAmId) - : 0, - cardChipId: isSet(object.cardChipId) ? String(object.cardChipId) : "", - accessCode: isSet(object.accessCode) ? String(object.accessCode) : "", - cardTypeCode: isSet(object.cardTypeCode) - ? Number(object.cardTypeCode) - : 0, - cardRegionCode: isSet(object.cardRegionCode) - ? Number(object.cardRegionCode) - : 0, - device: isSet(object.device) ? deviceTypeFromJSON(object.device) : 0, - timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0, - }; - }, - - toJSON(message: CreateUserRequest): unknown { - const obj: any = {}; - message.banapassportAmId !== undefined && - (obj.banapassportAmId = Math.round(message.banapassportAmId)); - message.cardChipId !== undefined && (obj.cardChipId = message.cardChipId); - message.accessCode !== undefined && (obj.accessCode = message.accessCode); - message.cardTypeCode !== undefined && - (obj.cardTypeCode = Math.round(message.cardTypeCode)); - message.cardRegionCode !== undefined && - (obj.cardRegionCode = Math.round(message.cardRegionCode)); - message.device !== undefined && - (obj.device = deviceTypeToJSON(message.device)); - message.timestamp !== undefined && - (obj.timestamp = Math.round(message.timestamp)); - return obj; - }, - - fromPartial, I>>( - object: I - ): CreateUserRequest { - const message = createBaseCreateUserRequest(); - message.banapassportAmId = object.banapassportAmId ?? 0; - message.cardChipId = object.cardChipId ?? ""; - message.accessCode = object.accessCode ?? ""; - message.cardTypeCode = object.cardTypeCode ?? 0; - message.cardRegionCode = object.cardRegionCode ?? 0; - message.device = object.device ?? 0; - message.timestamp = object.timestamp ?? 0; - return message; - }, -}; - -function createBaseCreateUserResponse(): CreateUserResponse { - return { error: 0, accessCode: "", banapassportAmId: 0, mbid: 0, userId: 0 }; -} - -export const CreateUserResponse = { - encode( - message: CreateUserResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - if (message.accessCode !== "") { - writer.uint32(18).string(message.accessCode); - } - if (message.banapassportAmId !== 0) { - writer.uint32(24).uint32(message.banapassportAmId); - } - if (message.mbid !== 0) { - writer.uint32(32).uint32(message.mbid); - } - if (message.userId !== 0) { - writer.uint32(40).uint32(message.userId); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CreateUserResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateUserResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.accessCode = reader.string(); - break; - case 3: - message.banapassportAmId = reader.uint32(); - break; - case 4: - message.mbid = reader.uint32(); - break; - case 5: - message.userId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CreateUserResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - accessCode: isSet(object.accessCode) ? String(object.accessCode) : "", - banapassportAmId: isSet(object.banapassportAmId) - ? Number(object.banapassportAmId) - : 0, - mbid: isSet(object.mbid) ? Number(object.mbid) : 0, - userId: isSet(object.userId) ? Number(object.userId) : 0, - }; - }, - - toJSON(message: CreateUserResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - message.accessCode !== undefined && (obj.accessCode = message.accessCode); - message.banapassportAmId !== undefined && - (obj.banapassportAmId = Math.round(message.banapassportAmId)); - message.mbid !== undefined && (obj.mbid = Math.round(message.mbid)); - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): CreateUserResponse { - const message = createBaseCreateUserResponse(); - message.error = object.error ?? 0; - message.accessCode = object.accessCode ?? ""; - message.banapassportAmId = object.banapassportAmId ?? 0; - message.mbid = object.mbid ?? 0; - message.userId = object.userId ?? 0; - return message; - }, -}; - -function createBaseAskAccessCodeRequest(): AskAccessCodeRequest { - return { cardChipId: "" }; -} - -export const AskAccessCodeRequest = { - encode( - message: AskAccessCodeRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.cardChipId !== "") { - writer.uint32(10).string(message.cardChipId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): AskAccessCodeRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAskAccessCodeRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cardChipId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AskAccessCodeRequest { - return { - cardChipId: isSet(object.cardChipId) ? String(object.cardChipId) : "", - }; - }, - - toJSON(message: AskAccessCodeRequest): unknown { - const obj: any = {}; - message.cardChipId !== undefined && (obj.cardChipId = message.cardChipId); - return obj; - }, - - fromPartial, I>>( - object: I - ): AskAccessCodeRequest { - const message = createBaseAskAccessCodeRequest(); - message.cardChipId = object.cardChipId ?? ""; - return message; - }, -}; - -function createBaseAskAccessCodeResponse(): AskAccessCodeResponse { - return { error: 0, accessCode: "" }; -} - -export const AskAccessCodeResponse = { - encode( - message: AskAccessCodeResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - if (message.accessCode !== "") { - writer.uint32(18).string(message.accessCode); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): AskAccessCodeResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAskAccessCodeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.accessCode = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): AskAccessCodeResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - accessCode: isSet(object.accessCode) ? String(object.accessCode) : "", - }; - }, - - toJSON(message: AskAccessCodeResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - message.accessCode !== undefined && (obj.accessCode = message.accessCode); - return obj; - }, - - fromPartial, I>>( - object: I - ): AskAccessCodeResponse { - const message = createBaseAskAccessCodeResponse(); - message.error = object.error ?? 0; - message.accessCode = object.accessCode ?? ""; - return message; - }, -}; - -function createBaseRegisterOpponentGhostRequest(): RegisterOpponentGhostRequest { - return { carId: 0, specialGhostId: 0 }; -} - -export const RegisterOpponentGhostRequest = { - encode( - message: RegisterOpponentGhostRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.specialGhostId !== 0) { - writer.uint32(16).uint32(message.specialGhostId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): RegisterOpponentGhostRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRegisterOpponentGhostRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.specialGhostId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RegisterOpponentGhostRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - specialGhostId: isSet(object.specialGhostId) - ? Number(object.specialGhostId) - : 0, - }; - }, - - toJSON(message: RegisterOpponentGhostRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.specialGhostId !== undefined && - (obj.specialGhostId = Math.round(message.specialGhostId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): RegisterOpponentGhostRequest { - const message = createBaseRegisterOpponentGhostRequest(); - message.carId = object.carId ?? 0; - message.specialGhostId = object.specialGhostId ?? 0; - return message; - }, -}; - -function createBaseRegisterOpponentGhostResponse(): RegisterOpponentGhostResponse { - return { error: 0 }; -} - -export const RegisterOpponentGhostResponse = { - encode( - message: RegisterOpponentGhostResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): RegisterOpponentGhostResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRegisterOpponentGhostResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): RegisterOpponentGhostResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: RegisterOpponentGhostResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): RegisterOpponentGhostResponse { - const message = createBaseRegisterOpponentGhostResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseGrantCarRightRequest(): GrantCarRightRequest { - return { userId: 0, targetUserId: 0, timestamp: 0 }; -} - -export const GrantCarRightRequest = { - encode( - message: GrantCarRightRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.userId !== 0) { - writer.uint32(8).uint32(message.userId); - } - if (message.targetUserId !== 0) { - writer.uint32(16).uint32(message.targetUserId); - } - if (message.timestamp !== 0) { - writer.uint32(24).uint32(message.timestamp); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GrantCarRightRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGrantCarRightRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userId = reader.uint32(); - break; - case 2: - message.targetUserId = reader.uint32(); - break; - case 3: - message.timestamp = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GrantCarRightRequest { - return { - userId: isSet(object.userId) ? Number(object.userId) : 0, - targetUserId: isSet(object.targetUserId) - ? Number(object.targetUserId) - : 0, - timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0, - }; - }, - - toJSON(message: GrantCarRightRequest): unknown { - const obj: any = {}; - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - message.targetUserId !== undefined && - (obj.targetUserId = Math.round(message.targetUserId)); - message.timestamp !== undefined && - (obj.timestamp = Math.round(message.timestamp)); - return obj; - }, - - fromPartial, I>>( - object: I - ): GrantCarRightRequest { - const message = createBaseGrantCarRightRequest(); - message.userId = object.userId ?? 0; - message.targetUserId = object.targetUserId ?? 0; - message.timestamp = object.timestamp ?? 0; - return message; - }, -}; - -function createBaseGrantCarRightResponse(): GrantCarRightResponse { - return { error: 0 }; -} - -export const GrantCarRightResponse = { - encode( - message: GrantCarRightResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GrantCarRightResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGrantCarRightResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GrantCarRightResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: GrantCarRightResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): GrantCarRightResponse { - const message = createBaseGrantCarRightResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseLoadGhostCompetitionRankingRequest(): LoadGhostCompetitionRankingRequest { - return { carId: 0, competitionId: 0 }; -} - -export const LoadGhostCompetitionRankingRequest = { - encode( - message: LoadGhostCompetitionRankingRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.competitionId !== 0) { - writer.uint32(16).uint32(message.competitionId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGhostCompetitionRankingRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGhostCompetitionRankingRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.competitionId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGhostCompetitionRankingRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - competitionId: isSet(object.competitionId) - ? Number(object.competitionId) - : 0, - }; - }, - - toJSON(message: LoadGhostCompetitionRankingRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.competitionId !== undefined && - (obj.competitionId = Math.round(message.competitionId)); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): LoadGhostCompetitionRankingRequest { - const message = createBaseLoadGhostCompetitionRankingRequest(); - message.carId = object.carId ?? 0; - message.competitionId = object.competitionId ?? 0; - return message; - }, -}; - -function createBaseLoadGhostCompetitionRankingResponse(): LoadGhostCompetitionRankingResponse { - return { - error: 0, - periodId: 0, - numOfParticipants: 0, - competitionSchedule: undefined, - ownRecord: undefined, - topRecords: [], - }; -} - -export const LoadGhostCompetitionRankingResponse = { - encode( - message: LoadGhostCompetitionRankingResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - if (message.periodId !== 0) { - writer.uint32(16).uint32(message.periodId); - } - if (message.numOfParticipants !== 0) { - writer.uint32(24).uint32(message.numOfParticipants); - } - if (message.competitionSchedule !== undefined) { - GhostCompetitionSchedule.encode( - message.competitionSchedule, - writer.uint32(34).fork() - ).ldelim(); - } - if (message.ownRecord !== undefined) { - LoadGhostCompetitionRankingResponse_Entry.encode( - message.ownRecord, - writer.uint32(42).fork() - ).ldelim(); - } - for (const v of message.topRecords) { - LoadGhostCompetitionRankingResponse_Entry.encode( - v!, - writer.uint32(50).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGhostCompetitionRankingResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGhostCompetitionRankingResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.periodId = reader.uint32(); - break; - case 3: - message.numOfParticipants = reader.uint32(); - break; - case 4: - message.competitionSchedule = GhostCompetitionSchedule.decode( - reader, - reader.uint32() - ); - break; - case 5: - message.ownRecord = LoadGhostCompetitionRankingResponse_Entry.decode( - reader, - reader.uint32() - ); - break; - case 6: - message.topRecords.push( - LoadGhostCompetitionRankingResponse_Entry.decode( - reader, - reader.uint32() - ) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGhostCompetitionRankingResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - periodId: isSet(object.periodId) ? Number(object.periodId) : 0, - numOfParticipants: isSet(object.numOfParticipants) - ? Number(object.numOfParticipants) - : 0, - competitionSchedule: isSet(object.competitionSchedule) - ? GhostCompetitionSchedule.fromJSON(object.competitionSchedule) - : undefined, - ownRecord: isSet(object.ownRecord) - ? LoadGhostCompetitionRankingResponse_Entry.fromJSON(object.ownRecord) - : undefined, - topRecords: Array.isArray(object?.topRecords) - ? object.topRecords.map((e: any) => - LoadGhostCompetitionRankingResponse_Entry.fromJSON(e) - ) - : [], - }; - }, - - toJSON(message: LoadGhostCompetitionRankingResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - message.periodId !== undefined && - (obj.periodId = Math.round(message.periodId)); - message.numOfParticipants !== undefined && - (obj.numOfParticipants = Math.round(message.numOfParticipants)); - message.competitionSchedule !== undefined && - (obj.competitionSchedule = message.competitionSchedule - ? GhostCompetitionSchedule.toJSON(message.competitionSchedule) - : undefined); - message.ownRecord !== undefined && - (obj.ownRecord = message.ownRecord - ? LoadGhostCompetitionRankingResponse_Entry.toJSON(message.ownRecord) - : undefined); - if (message.topRecords) { - obj.topRecords = message.topRecords.map((e) => - e ? LoadGhostCompetitionRankingResponse_Entry.toJSON(e) : undefined - ); - } else { - obj.topRecords = []; - } - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): LoadGhostCompetitionRankingResponse { - const message = createBaseLoadGhostCompetitionRankingResponse(); - message.error = object.error ?? 0; - message.periodId = object.periodId ?? 0; - message.numOfParticipants = object.numOfParticipants ?? 0; - message.competitionSchedule = - object.competitionSchedule !== undefined && - object.competitionSchedule !== null - ? GhostCompetitionSchedule.fromPartial(object.competitionSchedule) - : undefined; - message.ownRecord = - object.ownRecord !== undefined && object.ownRecord !== null - ? LoadGhostCompetitionRankingResponse_Entry.fromPartial( - object.ownRecord - ) - : undefined; - message.topRecords = - object.topRecords?.map((e) => - LoadGhostCompetitionRankingResponse_Entry.fromPartial(e) - ) || []; - return message; - }, -}; - -function createBaseLoadGhostCompetitionRankingResponse_Entry(): LoadGhostCompetitionRankingResponse_Entry { - return { - rank: 0, - result: 0, - carId: 0, - name: "", - regionId: 0, - model: 0, - visualModel: 0, - defaultColor: 0, - title: "", - level: 0, - windowStickerString: "", - playedShopName: "", - playedAt: 0, - }; -} - -export const LoadGhostCompetitionRankingResponse_Entry = { - encode( - message: LoadGhostCompetitionRankingResponse_Entry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.rank !== 0) { - writer.uint32(8).uint32(message.rank); - } - if (message.result !== 0) { - writer.uint32(16).sint32(message.result); - } - if (message.carId !== 0) { - writer.uint32(24).uint32(message.carId); - } - if (message.name !== "") { - writer.uint32(34).string(message.name); - } - if (message.regionId !== 0) { - writer.uint32(40).uint32(message.regionId); - } - if (message.model !== 0) { - writer.uint32(48).uint32(message.model); - } - if (message.visualModel !== 0) { - writer.uint32(56).uint32(message.visualModel); - } - if (message.defaultColor !== 0) { - writer.uint32(64).uint32(message.defaultColor); - } - if (message.title !== "") { - writer.uint32(82).string(message.title); - } - if (message.level !== 0) { - writer.uint32(88).uint32(message.level); - } - if (message.windowStickerString !== "") { - writer.uint32(98).string(message.windowStickerString); - } - if (message.playedShopName !== "") { - writer.uint32(106).string(message.playedShopName); - } - if (message.playedAt !== 0) { - writer.uint32(112).uint32(message.playedAt); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGhostCompetitionRankingResponse_Entry { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGhostCompetitionRankingResponse_Entry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rank = reader.uint32(); - break; - case 2: - message.result = reader.sint32(); - break; - case 3: - message.carId = reader.uint32(); - break; - case 4: - message.name = reader.string(); - break; - case 5: - message.regionId = reader.uint32(); - break; - case 6: - message.model = reader.uint32(); - break; - case 7: - message.visualModel = reader.uint32(); - break; - case 8: - message.defaultColor = reader.uint32(); - break; - case 10: - message.title = reader.string(); - break; - case 11: - message.level = reader.uint32(); - break; - case 12: - message.windowStickerString = reader.string(); - break; - case 13: - message.playedShopName = reader.string(); - break; - case 14: - message.playedAt = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGhostCompetitionRankingResponse_Entry { - return { - rank: isSet(object.rank) ? Number(object.rank) : 0, - result: isSet(object.result) ? Number(object.result) : 0, - carId: isSet(object.carId) ? Number(object.carId) : 0, - name: isSet(object.name) ? String(object.name) : "", - regionId: isSet(object.regionId) ? Number(object.regionId) : 0, - model: isSet(object.model) ? Number(object.model) : 0, - visualModel: isSet(object.visualModel) ? Number(object.visualModel) : 0, - defaultColor: isSet(object.defaultColor) - ? Number(object.defaultColor) - : 0, - title: isSet(object.title) ? String(object.title) : "", - level: isSet(object.level) ? Number(object.level) : 0, - windowStickerString: isSet(object.windowStickerString) - ? String(object.windowStickerString) - : "", - playedShopName: isSet(object.playedShopName) - ? String(object.playedShopName) - : "", - playedAt: isSet(object.playedAt) ? Number(object.playedAt) : 0, - }; - }, - - toJSON(message: LoadGhostCompetitionRankingResponse_Entry): unknown { - const obj: any = {}; - message.rank !== undefined && (obj.rank = Math.round(message.rank)); - message.result !== undefined && (obj.result = Math.round(message.result)); - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.name !== undefined && (obj.name = message.name); - message.regionId !== undefined && - (obj.regionId = Math.round(message.regionId)); - message.model !== undefined && (obj.model = Math.round(message.model)); - message.visualModel !== undefined && - (obj.visualModel = Math.round(message.visualModel)); - message.defaultColor !== undefined && - (obj.defaultColor = Math.round(message.defaultColor)); - message.title !== undefined && (obj.title = message.title); - message.level !== undefined && (obj.level = Math.round(message.level)); - message.windowStickerString !== undefined && - (obj.windowStickerString = message.windowStickerString); - message.playedShopName !== undefined && - (obj.playedShopName = message.playedShopName); - message.playedAt !== undefined && - (obj.playedAt = Math.round(message.playedAt)); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): LoadGhostCompetitionRankingResponse_Entry { - const message = createBaseLoadGhostCompetitionRankingResponse_Entry(); - message.rank = object.rank ?? 0; - message.result = object.result ?? 0; - message.carId = object.carId ?? 0; - message.name = object.name ?? ""; - message.regionId = object.regionId ?? 0; - message.model = object.model ?? 0; - message.visualModel = object.visualModel ?? 0; - message.defaultColor = object.defaultColor ?? 0; - message.title = object.title ?? ""; - message.level = object.level ?? 0; - message.windowStickerString = object.windowStickerString ?? ""; - message.playedShopName = object.playedShopName ?? ""; - message.playedAt = object.playedAt ?? 0; - return message; - }, -}; - -function createBaseLoadUnreceivedUserItemsRequest(): LoadUnreceivedUserItemsRequest { - return { userId: 0 }; -} - -export const LoadUnreceivedUserItemsRequest = { - encode( - message: LoadUnreceivedUserItemsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.userId !== 0) { - writer.uint32(8).uint32(message.userId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadUnreceivedUserItemsRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadUnreceivedUserItemsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadUnreceivedUserItemsRequest { - return { - userId: isSet(object.userId) ? Number(object.userId) : 0, - }; - }, - - toJSON(message: LoadUnreceivedUserItemsRequest): unknown { - const obj: any = {}; - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadUnreceivedUserItemsRequest { - const message = createBaseLoadUnreceivedUserItemsRequest(); - message.userId = object.userId ?? 0; - return message; - }, -}; - -function createBaseLoadUnreceivedUserItemsResponse(): LoadUnreceivedUserItemsResponse { - return { error: 0, ownedUserItems: [] }; -} - -export const LoadUnreceivedUserItemsResponse = { - encode( - message: LoadUnreceivedUserItemsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - for (const v of message.ownedUserItems) { - UserItem.encode(v!, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadUnreceivedUserItemsResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadUnreceivedUserItemsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 7: - message.ownedUserItems.push(UserItem.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadUnreceivedUserItemsResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - ownedUserItems: Array.isArray(object?.ownedUserItems) - ? object.ownedUserItems.map((e: any) => UserItem.fromJSON(e)) - : [], - }; - }, - - toJSON(message: LoadUnreceivedUserItemsResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - if (message.ownedUserItems) { - obj.ownedUserItems = message.ownedUserItems.map((e) => - e ? UserItem.toJSON(e) : undefined - ); - } else { - obj.ownedUserItems = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadUnreceivedUserItemsResponse { - const message = createBaseLoadUnreceivedUserItemsResponse(); - message.error = object.error ?? 0; - message.ownedUserItems = - object.ownedUserItems?.map((e) => UserItem.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseLoadBookmarksRequest(): LoadBookmarksRequest { - return { userId: 0 }; -} - -export const LoadBookmarksRequest = { - encode( - message: LoadBookmarksRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.userId !== 0) { - writer.uint32(8).uint32(message.userId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadBookmarksRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadBookmarksRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadBookmarksRequest { - return { - userId: isSet(object.userId) ? Number(object.userId) : 0, - }; - }, - - toJSON(message: LoadBookmarksRequest): unknown { - const obj: any = {}; - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadBookmarksRequest { - const message = createBaseLoadBookmarksRequest(); - message.userId = object.userId ?? 0; - return message; - }, -}; - -function createBaseLoadBookmarksResponse(): LoadBookmarksResponse { - return { error: 0, cars: [] }; -} - -export const LoadBookmarksResponse = { - encode( - message: LoadBookmarksResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - for (const v of message.cars) { - Car.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadBookmarksResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadBookmarksResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.cars.push(Car.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadBookmarksResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - cars: Array.isArray(object?.cars) - ? object.cars.map((e: any) => Car.fromJSON(e)) - : [], - }; - }, - - toJSON(message: LoadBookmarksResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - if (message.cars) { - obj.cars = message.cars.map((e) => (e ? Car.toJSON(e) : undefined)); - } else { - obj.cars = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadBookmarksResponse { - const message = createBaseLoadBookmarksResponse(); - message.error = object.error ?? 0; - message.cars = object.cars?.map((e) => Car.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseSaveBookmarksRequest(): SaveBookmarksRequest { - return { userId: 0, cars: [] }; -} - -export const SaveBookmarksRequest = { - encode( - message: SaveBookmarksRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.userId !== 0) { - writer.uint32(8).uint32(message.userId); - } - writer.uint32(18).fork(); - for (const v of message.cars) { - writer.uint32(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveBookmarksRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveBookmarksRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userId = reader.uint32(); - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.cars.push(reader.uint32()); - } - } else { - message.cars.push(reader.uint32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveBookmarksRequest { - return { - userId: isSet(object.userId) ? Number(object.userId) : 0, - cars: Array.isArray(object?.cars) - ? object.cars.map((e: any) => Number(e)) - : [], - }; - }, - - toJSON(message: SaveBookmarksRequest): unknown { - const obj: any = {}; - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - if (message.cars) { - obj.cars = message.cars.map((e) => Math.round(e)); - } else { - obj.cars = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): SaveBookmarksRequest { - const message = createBaseSaveBookmarksRequest(); - message.userId = object.userId ?? 0; - message.cars = object.cars?.map((e) => e) || []; - return message; - }, -}; - -function createBaseSaveBookmarksResponse(): SaveBookmarksResponse { - return { error: 0 }; -} - -export const SaveBookmarksResponse = { - encode( - message: SaveBookmarksResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveBookmarksResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveBookmarksResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveBookmarksResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: SaveBookmarksResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): SaveBookmarksResponse { - const message = createBaseSaveBookmarksResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseStartTransferRequest(): StartTransferRequest { - return { banapassportAmId: 0 }; -} - -export const StartTransferRequest = { - encode( - message: StartTransferRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.banapassportAmId !== 0) { - writer.uint32(8).uint32(message.banapassportAmId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): StartTransferRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStartTransferRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.banapassportAmId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): StartTransferRequest { - return { - banapassportAmId: isSet(object.banapassportAmId) - ? Number(object.banapassportAmId) - : 0, - }; - }, - - toJSON(message: StartTransferRequest): unknown { - const obj: any = {}; - message.banapassportAmId !== undefined && - (obj.banapassportAmId = Math.round(message.banapassportAmId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): StartTransferRequest { - const message = createBaseStartTransferRequest(); - message.banapassportAmId = object.banapassportAmId ?? 0; - return message; - }, -}; - -function createBaseStartTransferResponse(): StartTransferResponse { - return { error: 0, userId: 0, pollingInterval: 0 }; -} - -export const StartTransferResponse = { - encode( - message: StartTransferResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - if (message.userId !== 0) { - writer.uint32(16).uint32(message.userId); - } - if (message.pollingInterval !== 0) { - writer.uint32(24).uint32(message.pollingInterval); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): StartTransferResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStartTransferResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.userId = reader.uint32(); - break; - case 3: - message.pollingInterval = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): StartTransferResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - userId: isSet(object.userId) ? Number(object.userId) : 0, - pollingInterval: isSet(object.pollingInterval) - ? Number(object.pollingInterval) - : 0, - }; - }, - - toJSON(message: StartTransferResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - message.pollingInterval !== undefined && - (obj.pollingInterval = Math.round(message.pollingInterval)); - return obj; - }, - - fromPartial, I>>( - object: I - ): StartTransferResponse { - const message = createBaseStartTransferResponse(); - message.error = object.error ?? 0; - message.userId = object.userId ?? 0; - message.pollingInterval = object.pollingInterval ?? 0; - return message; - }, -}; - -function createBaseSaveScreenshotRequest(): SaveScreenshotRequest { - return { - carId: 0, - timestamp: 0, - playedAt: 0, - transparent: false, - imageType: 1, - image: Buffer.alloc(0), - ghostMetadata: undefined, - versusMetadata: undefined, - terminalMetadata: undefined, - acquiringVsStarMetadata: undefined, - acquiringAuraMotifMetadata: undefined, - ghostRegionMapMetadata: undefined, - acquiringCrownMetadata: undefined, - competitionResultMetadata: undefined, - timeAttackResultMetadata: undefined, - levelUpMetadata: undefined, - }; -} - -export const SaveScreenshotRequest = { - encode( - message: SaveScreenshotRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.timestamp !== 0) { - writer.uint32(16).uint32(message.timestamp); - } - if (message.playedAt !== 0) { - writer.uint32(72).uint32(message.playedAt); - } - if (message.transparent === true) { - writer.uint32(64).bool(message.transparent); - } - if (message.imageType !== 1) { - writer.uint32(24).int32(message.imageType); - } - if (message.image.length !== 0) { - writer.uint32(34).bytes(message.image); - } - if (message.ghostMetadata !== undefined) { - SaveScreenshotRequest_GhostBattleMetadata.encode( - message.ghostMetadata, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.versusMetadata !== undefined) { - SaveScreenshotRequest_VersusBattleMetadata.encode( - message.versusMetadata, - writer.uint32(50).fork() - ).ldelim(); - } - if (message.terminalMetadata !== undefined) { - SaveScreenshotRequest_TerminalMetadata.encode( - message.terminalMetadata, - writer.uint32(58).fork() - ).ldelim(); - } - if (message.acquiringVsStarMetadata !== undefined) { - SaveScreenshotRequest_AcquiringVersusStarMetadata.encode( - message.acquiringVsStarMetadata, - writer.uint32(82).fork() - ).ldelim(); - } - if (message.acquiringAuraMotifMetadata !== undefined) { - SaveScreenshotRequest_AcquiringAuraMotifMetadata.encode( - message.acquiringAuraMotifMetadata, - writer.uint32(90).fork() - ).ldelim(); - } - if (message.ghostRegionMapMetadata !== undefined) { - SaveScreenshotRequest_GhostRegionMapMetadata.encode( - message.ghostRegionMapMetadata, - writer.uint32(98).fork() - ).ldelim(); - } - if (message.acquiringCrownMetadata !== undefined) { - SaveScreenshotRequest_AcquiringCrownMetadata.encode( - message.acquiringCrownMetadata, - writer.uint32(106).fork() - ).ldelim(); - } - if (message.competitionResultMetadata !== undefined) { - SaveScreenshotRequest_GhostCompetitionResultMetadata.encode( - message.competitionResultMetadata, - writer.uint32(114).fork() - ).ldelim(); - } - if (message.timeAttackResultMetadata !== undefined) { - SaveScreenshotRequest_TimeAttackResultMetadata.encode( - message.timeAttackResultMetadata, - writer.uint32(122).fork() - ).ldelim(); - } - if (message.levelUpMetadata !== undefined) { - SaveScreenshotRequest_LevelUpMetadata.encode( - message.levelUpMetadata, - writer.uint32(130).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScreenshotRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveScreenshotRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.timestamp = reader.uint32(); - break; - case 9: - message.playedAt = reader.uint32(); - break; - case 8: - message.transparent = reader.bool(); - break; - case 3: - message.imageType = reader.int32() as any; - break; - case 4: - message.image = reader.bytes() as Buffer; - break; - case 5: - message.ghostMetadata = - SaveScreenshotRequest_GhostBattleMetadata.decode( - reader, - reader.uint32() - ); - break; - case 6: - message.versusMetadata = - SaveScreenshotRequest_VersusBattleMetadata.decode( - reader, - reader.uint32() - ); - break; - case 7: - message.terminalMetadata = - SaveScreenshotRequest_TerminalMetadata.decode( - reader, - reader.uint32() - ); - break; - case 10: - message.acquiringVsStarMetadata = - SaveScreenshotRequest_AcquiringVersusStarMetadata.decode( - reader, - reader.uint32() - ); - break; - case 11: - message.acquiringAuraMotifMetadata = - SaveScreenshotRequest_AcquiringAuraMotifMetadata.decode( - reader, - reader.uint32() - ); - break; - case 12: - message.ghostRegionMapMetadata = - SaveScreenshotRequest_GhostRegionMapMetadata.decode( - reader, - reader.uint32() - ); - break; - case 13: - message.acquiringCrownMetadata = - SaveScreenshotRequest_AcquiringCrownMetadata.decode( - reader, - reader.uint32() - ); - break; - case 14: - message.competitionResultMetadata = - SaveScreenshotRequest_GhostCompetitionResultMetadata.decode( - reader, - reader.uint32() - ); - break; - case 15: - message.timeAttackResultMetadata = - SaveScreenshotRequest_TimeAttackResultMetadata.decode( - reader, - reader.uint32() - ); - break; - case 16: - message.levelUpMetadata = - SaveScreenshotRequest_LevelUpMetadata.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScreenshotRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0, - playedAt: isSet(object.playedAt) ? Number(object.playedAt) : 0, - transparent: isSet(object.transparent) - ? Boolean(object.transparent) - : false, - imageType: isSet(object.imageType) - ? screenshotTypeFromJSON(object.imageType) - : 1, - image: isSet(object.image) - ? Buffer.from(bytesFromBase64(object.image)) - : Buffer.alloc(0), - ghostMetadata: isSet(object.ghostMetadata) - ? SaveScreenshotRequest_GhostBattleMetadata.fromJSON( - object.ghostMetadata - ) - : undefined, - versusMetadata: isSet(object.versusMetadata) - ? SaveScreenshotRequest_VersusBattleMetadata.fromJSON( - object.versusMetadata - ) - : undefined, - terminalMetadata: isSet(object.terminalMetadata) - ? SaveScreenshotRequest_TerminalMetadata.fromJSON( - object.terminalMetadata - ) - : undefined, - acquiringVsStarMetadata: isSet(object.acquiringVsStarMetadata) - ? SaveScreenshotRequest_AcquiringVersusStarMetadata.fromJSON( - object.acquiringVsStarMetadata - ) - : undefined, - acquiringAuraMotifMetadata: isSet(object.acquiringAuraMotifMetadata) - ? SaveScreenshotRequest_AcquiringAuraMotifMetadata.fromJSON( - object.acquiringAuraMotifMetadata - ) - : undefined, - ghostRegionMapMetadata: isSet(object.ghostRegionMapMetadata) - ? SaveScreenshotRequest_GhostRegionMapMetadata.fromJSON( - object.ghostRegionMapMetadata - ) - : undefined, - acquiringCrownMetadata: isSet(object.acquiringCrownMetadata) - ? SaveScreenshotRequest_AcquiringCrownMetadata.fromJSON( - object.acquiringCrownMetadata - ) - : undefined, - competitionResultMetadata: isSet(object.competitionResultMetadata) - ? SaveScreenshotRequest_GhostCompetitionResultMetadata.fromJSON( - object.competitionResultMetadata - ) - : undefined, - timeAttackResultMetadata: isSet(object.timeAttackResultMetadata) - ? SaveScreenshotRequest_TimeAttackResultMetadata.fromJSON( - object.timeAttackResultMetadata - ) - : undefined, - levelUpMetadata: isSet(object.levelUpMetadata) - ? SaveScreenshotRequest_LevelUpMetadata.fromJSON(object.levelUpMetadata) - : undefined, - }; - }, - - toJSON(message: SaveScreenshotRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.timestamp !== undefined && - (obj.timestamp = Math.round(message.timestamp)); - message.playedAt !== undefined && - (obj.playedAt = Math.round(message.playedAt)); - message.transparent !== undefined && - (obj.transparent = message.transparent); - message.imageType !== undefined && - (obj.imageType = screenshotTypeToJSON(message.imageType)); - message.image !== undefined && - (obj.image = base64FromBytes( - message.image !== undefined ? message.image : Buffer.alloc(0) - )); - message.ghostMetadata !== undefined && - (obj.ghostMetadata = message.ghostMetadata - ? SaveScreenshotRequest_GhostBattleMetadata.toJSON( - message.ghostMetadata - ) - : undefined); - message.versusMetadata !== undefined && - (obj.versusMetadata = message.versusMetadata - ? SaveScreenshotRequest_VersusBattleMetadata.toJSON( - message.versusMetadata - ) - : undefined); - message.terminalMetadata !== undefined && - (obj.terminalMetadata = message.terminalMetadata - ? SaveScreenshotRequest_TerminalMetadata.toJSON( - message.terminalMetadata - ) - : undefined); - message.acquiringVsStarMetadata !== undefined && - (obj.acquiringVsStarMetadata = message.acquiringVsStarMetadata - ? SaveScreenshotRequest_AcquiringVersusStarMetadata.toJSON( - message.acquiringVsStarMetadata - ) - : undefined); - message.acquiringAuraMotifMetadata !== undefined && - (obj.acquiringAuraMotifMetadata = message.acquiringAuraMotifMetadata - ? SaveScreenshotRequest_AcquiringAuraMotifMetadata.toJSON( - message.acquiringAuraMotifMetadata - ) - : undefined); - message.ghostRegionMapMetadata !== undefined && - (obj.ghostRegionMapMetadata = message.ghostRegionMapMetadata - ? SaveScreenshotRequest_GhostRegionMapMetadata.toJSON( - message.ghostRegionMapMetadata - ) - : undefined); - message.acquiringCrownMetadata !== undefined && - (obj.acquiringCrownMetadata = message.acquiringCrownMetadata - ? SaveScreenshotRequest_AcquiringCrownMetadata.toJSON( - message.acquiringCrownMetadata - ) - : undefined); - message.competitionResultMetadata !== undefined && - (obj.competitionResultMetadata = message.competitionResultMetadata - ? SaveScreenshotRequest_GhostCompetitionResultMetadata.toJSON( - message.competitionResultMetadata - ) - : undefined); - message.timeAttackResultMetadata !== undefined && - (obj.timeAttackResultMetadata = message.timeAttackResultMetadata - ? SaveScreenshotRequest_TimeAttackResultMetadata.toJSON( - message.timeAttackResultMetadata - ) - : undefined); - message.levelUpMetadata !== undefined && - (obj.levelUpMetadata = message.levelUpMetadata - ? SaveScreenshotRequest_LevelUpMetadata.toJSON(message.levelUpMetadata) - : undefined); - return obj; - }, - - fromPartial, I>>( - object: I - ): SaveScreenshotRequest { - const message = createBaseSaveScreenshotRequest(); - message.carId = object.carId ?? 0; - message.timestamp = object.timestamp ?? 0; - message.playedAt = object.playedAt ?? 0; - message.transparent = object.transparent ?? false; - message.imageType = object.imageType ?? 1; - message.image = object.image ?? Buffer.alloc(0); - message.ghostMetadata = - object.ghostMetadata !== undefined && object.ghostMetadata !== null - ? SaveScreenshotRequest_GhostBattleMetadata.fromPartial( - object.ghostMetadata - ) - : undefined; - message.versusMetadata = - object.versusMetadata !== undefined && object.versusMetadata !== null - ? SaveScreenshotRequest_VersusBattleMetadata.fromPartial( - object.versusMetadata - ) - : undefined; - message.terminalMetadata = - object.terminalMetadata !== undefined && object.terminalMetadata !== null - ? SaveScreenshotRequest_TerminalMetadata.fromPartial( - object.terminalMetadata - ) - : undefined; - message.acquiringVsStarMetadata = - object.acquiringVsStarMetadata !== undefined && - object.acquiringVsStarMetadata !== null - ? SaveScreenshotRequest_AcquiringVersusStarMetadata.fromPartial( - object.acquiringVsStarMetadata - ) - : undefined; - message.acquiringAuraMotifMetadata = - object.acquiringAuraMotifMetadata !== undefined && - object.acquiringAuraMotifMetadata !== null - ? SaveScreenshotRequest_AcquiringAuraMotifMetadata.fromPartial( - object.acquiringAuraMotifMetadata - ) - : undefined; - message.ghostRegionMapMetadata = - object.ghostRegionMapMetadata !== undefined && - object.ghostRegionMapMetadata !== null - ? SaveScreenshotRequest_GhostRegionMapMetadata.fromPartial( - object.ghostRegionMapMetadata - ) - : undefined; - message.acquiringCrownMetadata = - object.acquiringCrownMetadata !== undefined && - object.acquiringCrownMetadata !== null - ? SaveScreenshotRequest_AcquiringCrownMetadata.fromPartial( - object.acquiringCrownMetadata - ) - : undefined; - message.competitionResultMetadata = - object.competitionResultMetadata !== undefined && - object.competitionResultMetadata !== null - ? SaveScreenshotRequest_GhostCompetitionResultMetadata.fromPartial( - object.competitionResultMetadata - ) - : undefined; - message.timeAttackResultMetadata = - object.timeAttackResultMetadata !== undefined && - object.timeAttackResultMetadata !== null - ? SaveScreenshotRequest_TimeAttackResultMetadata.fromPartial( - object.timeAttackResultMetadata - ) - : undefined; - message.levelUpMetadata = - object.levelUpMetadata !== undefined && object.levelUpMetadata !== null - ? SaveScreenshotRequest_LevelUpMetadata.fromPartial( - object.levelUpMetadata - ) - : undefined; - return message; - }, -}; - -function createBaseSaveScreenshotRequest_GhostBattleMetadata(): SaveScreenshotRequest_GhostBattleMetadata { - return { - tunePower: 0, - tuneHandling: 0, - area: 0, - stampReturnCount: 0, - opponents: [], - }; -} - -export const SaveScreenshotRequest_GhostBattleMetadata = { - encode( - message: SaveScreenshotRequest_GhostBattleMetadata, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.tunePower !== 0) { - writer.uint32(8).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(16).uint32(message.tuneHandling); - } - if (message.area !== 0) { - writer.uint32(24).uint32(message.area); - } - if (message.stampReturnCount !== 0) { - writer.uint32(32).uint32(message.stampReturnCount); - } - for (const v of message.opponents) { - SaveScreenshotRequest_OpponentCar.encode( - v!, - writer.uint32(50).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScreenshotRequest_GhostBattleMetadata { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveScreenshotRequest_GhostBattleMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tunePower = reader.uint32(); - break; - case 2: - message.tuneHandling = reader.uint32(); - break; - case 3: - message.area = reader.uint32(); - break; - case 4: - message.stampReturnCount = reader.uint32(); - break; - case 6: - message.opponents.push( - SaveScreenshotRequest_OpponentCar.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScreenshotRequest_GhostBattleMetadata { - return { - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - area: isSet(object.area) ? Number(object.area) : 0, - stampReturnCount: isSet(object.stampReturnCount) - ? Number(object.stampReturnCount) - : 0, - opponents: Array.isArray(object?.opponents) - ? object.opponents.map((e: any) => - SaveScreenshotRequest_OpponentCar.fromJSON(e) - ) - : [], - }; - }, - - toJSON(message: SaveScreenshotRequest_GhostBattleMetadata): unknown { - const obj: any = {}; - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.area !== undefined && (obj.area = Math.round(message.area)); - message.stampReturnCount !== undefined && - (obj.stampReturnCount = Math.round(message.stampReturnCount)); - if (message.opponents) { - obj.opponents = message.opponents.map((e) => - e ? SaveScreenshotRequest_OpponentCar.toJSON(e) : undefined - ); - } else { - obj.opponents = []; - } - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): SaveScreenshotRequest_GhostBattleMetadata { - const message = createBaseSaveScreenshotRequest_GhostBattleMetadata(); - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.area = object.area ?? 0; - message.stampReturnCount = object.stampReturnCount ?? 0; - message.opponents = - object.opponents?.map((e) => - SaveScreenshotRequest_OpponentCar.fromPartial(e) - ) || []; - return message; - }, -}; - -function createBaseSaveScreenshotRequest_VersusBattleMetadata(): SaveScreenshotRequest_VersusBattleMetadata { - return { tunePower: 0, tuneHandling: 0, area: 0, opponents: [] }; -} - -export const SaveScreenshotRequest_VersusBattleMetadata = { - encode( - message: SaveScreenshotRequest_VersusBattleMetadata, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.tunePower !== 0) { - writer.uint32(8).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(16).uint32(message.tuneHandling); - } - if (message.area !== 0) { - writer.uint32(24).uint32(message.area); - } - for (const v of message.opponents) { - SaveScreenshotRequest_OpponentCar.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScreenshotRequest_VersusBattleMetadata { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveScreenshotRequest_VersusBattleMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tunePower = reader.uint32(); - break; - case 2: - message.tuneHandling = reader.uint32(); - break; - case 3: - message.area = reader.uint32(); - break; - case 4: - message.opponents.push( - SaveScreenshotRequest_OpponentCar.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScreenshotRequest_VersusBattleMetadata { - return { - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - area: isSet(object.area) ? Number(object.area) : 0, - opponents: Array.isArray(object?.opponents) - ? object.opponents.map((e: any) => - SaveScreenshotRequest_OpponentCar.fromJSON(e) - ) - : [], - }; - }, - - toJSON(message: SaveScreenshotRequest_VersusBattleMetadata): unknown { - const obj: any = {}; - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.area !== undefined && (obj.area = Math.round(message.area)); - if (message.opponents) { - obj.opponents = message.opponents.map((e) => - e ? SaveScreenshotRequest_OpponentCar.toJSON(e) : undefined - ); - } else { - obj.opponents = []; - } - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): SaveScreenshotRequest_VersusBattleMetadata { - const message = createBaseSaveScreenshotRequest_VersusBattleMetadata(); - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.area = object.area ?? 0; - message.opponents = - object.opponents?.map((e) => - SaveScreenshotRequest_OpponentCar.fromPartial(e) - ) || []; - return message; - }, -}; - -function createBaseSaveScreenshotRequest_TerminalMetadata(): SaveScreenshotRequest_TerminalMetadata { - return { tunePower: 0, tuneHandling: 0, name: "", title: "", level: 0 }; -} - -export const SaveScreenshotRequest_TerminalMetadata = { - encode( - message: SaveScreenshotRequest_TerminalMetadata, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.tunePower !== 0) { - writer.uint32(8).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(16).uint32(message.tuneHandling); - } - if (message.name !== "") { - writer.uint32(26).string(message.name); - } - if (message.title !== "") { - writer.uint32(34).string(message.title); - } - if (message.level !== 0) { - writer.uint32(40).uint32(message.level); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScreenshotRequest_TerminalMetadata { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveScreenshotRequest_TerminalMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tunePower = reader.uint32(); - break; - case 2: - message.tuneHandling = reader.uint32(); - break; - case 3: - message.name = reader.string(); - break; - case 4: - message.title = reader.string(); - break; - case 5: - message.level = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScreenshotRequest_TerminalMetadata { - return { - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - name: isSet(object.name) ? String(object.name) : "", - title: isSet(object.title) ? String(object.title) : "", - level: isSet(object.level) ? Number(object.level) : 0, - }; - }, - - toJSON(message: SaveScreenshotRequest_TerminalMetadata): unknown { - const obj: any = {}; - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.name !== undefined && (obj.name = message.name); - message.title !== undefined && (obj.title = message.title); - message.level !== undefined && (obj.level = Math.round(message.level)); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): SaveScreenshotRequest_TerminalMetadata { - const message = createBaseSaveScreenshotRequest_TerminalMetadata(); - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.name = object.name ?? ""; - message.title = object.title ?? ""; - message.level = object.level ?? 0; - return message; - }, -}; - -function createBaseSaveScreenshotRequest_AcquiringVersusStarMetadata(): SaveScreenshotRequest_AcquiringVersusStarMetadata { - return { tunePower: 0, tuneHandling: 0, vsStarCount: 0 }; -} - -export const SaveScreenshotRequest_AcquiringVersusStarMetadata = { - encode( - message: SaveScreenshotRequest_AcquiringVersusStarMetadata, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.tunePower !== 0) { - writer.uint32(8).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(16).uint32(message.tuneHandling); - } - if (message.vsStarCount !== 0) { - writer.uint32(24).uint32(message.vsStarCount); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScreenshotRequest_AcquiringVersusStarMetadata { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = - createBaseSaveScreenshotRequest_AcquiringVersusStarMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tunePower = reader.uint32(); - break; - case 2: - message.tuneHandling = reader.uint32(); - break; - case 3: - message.vsStarCount = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScreenshotRequest_AcquiringVersusStarMetadata { - return { - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - vsStarCount: isSet(object.vsStarCount) ? Number(object.vsStarCount) : 0, - }; - }, - - toJSON(message: SaveScreenshotRequest_AcquiringVersusStarMetadata): unknown { - const obj: any = {}; - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.vsStarCount !== undefined && - (obj.vsStarCount = Math.round(message.vsStarCount)); - return obj; - }, - - fromPartial< - I extends Exact< - DeepPartial, - I - > - >(object: I): SaveScreenshotRequest_AcquiringVersusStarMetadata { - const message = - createBaseSaveScreenshotRequest_AcquiringVersusStarMetadata(); - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.vsStarCount = object.vsStarCount ?? 0; - return message; - }, -}; - -function createBaseSaveScreenshotRequest_AcquiringAuraMotifMetadata(): SaveScreenshotRequest_AcquiringAuraMotifMetadata { - return { tunePower: 0, tuneHandling: 0, auraMotif: 0 }; -} - -export const SaveScreenshotRequest_AcquiringAuraMotifMetadata = { - encode( - message: SaveScreenshotRequest_AcquiringAuraMotifMetadata, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.tunePower !== 0) { - writer.uint32(8).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(16).uint32(message.tuneHandling); - } - if (message.auraMotif !== 0) { - writer.uint32(24).uint32(message.auraMotif); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScreenshotRequest_AcquiringAuraMotifMetadata { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = - createBaseSaveScreenshotRequest_AcquiringAuraMotifMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tunePower = reader.uint32(); - break; - case 2: - message.tuneHandling = reader.uint32(); - break; - case 3: - message.auraMotif = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScreenshotRequest_AcquiringAuraMotifMetadata { - return { - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - auraMotif: isSet(object.auraMotif) ? Number(object.auraMotif) : 0, - }; - }, - - toJSON(message: SaveScreenshotRequest_AcquiringAuraMotifMetadata): unknown { - const obj: any = {}; - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.auraMotif !== undefined && - (obj.auraMotif = Math.round(message.auraMotif)); - return obj; - }, - - fromPartial< - I extends Exact< - DeepPartial, - I - > - >(object: I): SaveScreenshotRequest_AcquiringAuraMotifMetadata { - const message = - createBaseSaveScreenshotRequest_AcquiringAuraMotifMetadata(); - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.auraMotif = object.auraMotif ?? 0; - return message; - }, -}; - -function createBaseSaveScreenshotRequest_GhostRegionMapMetadata(): SaveScreenshotRequest_GhostRegionMapMetadata { - return { tunePower: 0, tuneHandling: 0, rgScore: 0, rgRegionMapScore: [] }; -} - -export const SaveScreenshotRequest_GhostRegionMapMetadata = { - encode( - message: SaveScreenshotRequest_GhostRegionMapMetadata, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.tunePower !== 0) { - writer.uint32(8).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(16).uint32(message.tuneHandling); - } - if (message.rgScore !== 0) { - writer.uint32(24).uint32(message.rgScore); - } - writer.uint32(34).fork(); - for (const v of message.rgRegionMapScore) { - writer.uint32(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScreenshotRequest_GhostRegionMapMetadata { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveScreenshotRequest_GhostRegionMapMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tunePower = reader.uint32(); - break; - case 2: - message.tuneHandling = reader.uint32(); - break; - case 3: - message.rgScore = reader.uint32(); - break; - case 4: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.rgRegionMapScore.push(reader.uint32()); - } - } else { - message.rgRegionMapScore.push(reader.uint32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScreenshotRequest_GhostRegionMapMetadata { - return { - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - rgScore: isSet(object.rgScore) ? Number(object.rgScore) : 0, - rgRegionMapScore: Array.isArray(object?.rgRegionMapScore) - ? object.rgRegionMapScore.map((e: any) => Number(e)) - : [], - }; - }, - - toJSON(message: SaveScreenshotRequest_GhostRegionMapMetadata): unknown { - const obj: any = {}; - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.rgScore !== undefined && - (obj.rgScore = Math.round(message.rgScore)); - if (message.rgRegionMapScore) { - obj.rgRegionMapScore = message.rgRegionMapScore.map((e) => Math.round(e)); - } else { - obj.rgRegionMapScore = []; - } - return obj; - }, - - fromPartial< - I extends Exact< - DeepPartial, - I - > - >(object: I): SaveScreenshotRequest_GhostRegionMapMetadata { - const message = createBaseSaveScreenshotRequest_GhostRegionMapMetadata(); - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.rgScore = object.rgScore ?? 0; - message.rgRegionMapScore = object.rgRegionMapScore?.map((e) => e) || []; - return message; - }, -}; - -function createBaseSaveScreenshotRequest_AcquiringCrownMetadata(): SaveScreenshotRequest_AcquiringCrownMetadata { - return { tunePower: 0, tuneHandling: 0, area: 0 }; -} - -export const SaveScreenshotRequest_AcquiringCrownMetadata = { - encode( - message: SaveScreenshotRequest_AcquiringCrownMetadata, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.tunePower !== 0) { - writer.uint32(8).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(16).uint32(message.tuneHandling); - } - if (message.area !== 0) { - writer.uint32(24).uint32(message.area); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScreenshotRequest_AcquiringCrownMetadata { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveScreenshotRequest_AcquiringCrownMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tunePower = reader.uint32(); - break; - case 2: - message.tuneHandling = reader.uint32(); - break; - case 3: - message.area = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScreenshotRequest_AcquiringCrownMetadata { - return { - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - area: isSet(object.area) ? Number(object.area) : 0, - }; - }, - - toJSON(message: SaveScreenshotRequest_AcquiringCrownMetadata): unknown { - const obj: any = {}; - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.area !== undefined && (obj.area = Math.round(message.area)); - return obj; - }, - - fromPartial< - I extends Exact< - DeepPartial, - I - > - >(object: I): SaveScreenshotRequest_AcquiringCrownMetadata { - const message = createBaseSaveScreenshotRequest_AcquiringCrownMetadata(); - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.area = object.area ?? 0; - return message; - }, -}; - -function createBaseSaveScreenshotRequest_GhostCompetitionResultMetadata(): SaveScreenshotRequest_GhostCompetitionResultMetadata { - return { tunePower: 0, tuneHandling: 0, rank: 0, result: 0 }; -} - -export const SaveScreenshotRequest_GhostCompetitionResultMetadata = { - encode( - message: SaveScreenshotRequest_GhostCompetitionResultMetadata, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.tunePower !== 0) { - writer.uint32(8).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(16).uint32(message.tuneHandling); - } - if (message.rank !== 0) { - writer.uint32(24).uint32(message.rank); - } - if (message.result !== 0) { - writer.uint32(32).sint32(message.result); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScreenshotRequest_GhostCompetitionResultMetadata { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = - createBaseSaveScreenshotRequest_GhostCompetitionResultMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tunePower = reader.uint32(); - break; - case 2: - message.tuneHandling = reader.uint32(); - break; - case 3: - message.rank = reader.uint32(); - break; - case 4: - message.result = reader.sint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScreenshotRequest_GhostCompetitionResultMetadata { - return { - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - rank: isSet(object.rank) ? Number(object.rank) : 0, - result: isSet(object.result) ? Number(object.result) : 0, - }; - }, - - toJSON( - message: SaveScreenshotRequest_GhostCompetitionResultMetadata - ): unknown { - const obj: any = {}; - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.rank !== undefined && (obj.rank = Math.round(message.rank)); - message.result !== undefined && (obj.result = Math.round(message.result)); - return obj; - }, - - fromPartial< - I extends Exact< - DeepPartial, - I - > - >(object: I): SaveScreenshotRequest_GhostCompetitionResultMetadata { - const message = - createBaseSaveScreenshotRequest_GhostCompetitionResultMetadata(); - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.rank = object.rank ?? 0; - message.result = object.result ?? 0; - return message; - }, -}; - -function createBaseSaveScreenshotRequest_TimeAttackResultMetadata(): SaveScreenshotRequest_TimeAttackResultMetadata { - return { - tunePower: 0, - tuneHandling: 0, - course: 0, - wholeRank: 0, - modelRank: 0, - }; -} - -export const SaveScreenshotRequest_TimeAttackResultMetadata = { - encode( - message: SaveScreenshotRequest_TimeAttackResultMetadata, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.tunePower !== 0) { - writer.uint32(8).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(16).uint32(message.tuneHandling); - } - if (message.course !== 0) { - writer.uint32(24).uint32(message.course); - } - if (message.wholeRank !== 0) { - writer.uint32(32).uint32(message.wholeRank); - } - if (message.modelRank !== 0) { - writer.uint32(40).uint32(message.modelRank); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScreenshotRequest_TimeAttackResultMetadata { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveScreenshotRequest_TimeAttackResultMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tunePower = reader.uint32(); - break; - case 2: - message.tuneHandling = reader.uint32(); - break; - case 3: - message.course = reader.uint32(); - break; - case 4: - message.wholeRank = reader.uint32(); - break; - case 5: - message.modelRank = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScreenshotRequest_TimeAttackResultMetadata { - return { - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - course: isSet(object.course) ? Number(object.course) : 0, - wholeRank: isSet(object.wholeRank) ? Number(object.wholeRank) : 0, - modelRank: isSet(object.modelRank) ? Number(object.modelRank) : 0, - }; - }, - - toJSON(message: SaveScreenshotRequest_TimeAttackResultMetadata): unknown { - const obj: any = {}; - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.course !== undefined && (obj.course = Math.round(message.course)); - message.wholeRank !== undefined && - (obj.wholeRank = Math.round(message.wholeRank)); - message.modelRank !== undefined && - (obj.modelRank = Math.round(message.modelRank)); - return obj; - }, - - fromPartial< - I extends Exact< - DeepPartial, - I - > - >(object: I): SaveScreenshotRequest_TimeAttackResultMetadata { - const message = createBaseSaveScreenshotRequest_TimeAttackResultMetadata(); - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.course = object.course ?? 0; - message.wholeRank = object.wholeRank ?? 0; - message.modelRank = object.modelRank ?? 0; - return message; - }, -}; - -function createBaseSaveScreenshotRequest_LevelUpMetadata(): SaveScreenshotRequest_LevelUpMetadata { - return { tunePower: 0, tuneHandling: 0, level: 0 }; -} - -export const SaveScreenshotRequest_LevelUpMetadata = { - encode( - message: SaveScreenshotRequest_LevelUpMetadata, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.tunePower !== 0) { - writer.uint32(16).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(24).uint32(message.tuneHandling); - } - if (message.level !== 0) { - writer.uint32(8).uint32(message.level); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScreenshotRequest_LevelUpMetadata { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveScreenshotRequest_LevelUpMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.tunePower = reader.uint32(); - break; - case 3: - message.tuneHandling = reader.uint32(); - break; - case 1: - message.level = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScreenshotRequest_LevelUpMetadata { - return { - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - level: isSet(object.level) ? Number(object.level) : 0, - }; - }, - - toJSON(message: SaveScreenshotRequest_LevelUpMetadata): unknown { - const obj: any = {}; - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.level !== undefined && (obj.level = Math.round(message.level)); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): SaveScreenshotRequest_LevelUpMetadata { - const message = createBaseSaveScreenshotRequest_LevelUpMetadata(); - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.level = object.level ?? 0; - return message; - }, -}; - -function createBaseSaveScreenshotRequest_OpponentCar(): SaveScreenshotRequest_OpponentCar { - return { carId: 0, tunePower: 0, tuneHandling: 0 }; -} - -export const SaveScreenshotRequest_OpponentCar = { - encode( - message: SaveScreenshotRequest_OpponentCar, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.tunePower !== 0) { - writer.uint32(16).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(24).uint32(message.tuneHandling); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScreenshotRequest_OpponentCar { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveScreenshotRequest_OpponentCar(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.tunePower = reader.uint32(); - break; - case 3: - message.tuneHandling = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScreenshotRequest_OpponentCar { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - }; - }, - - toJSON(message: SaveScreenshotRequest_OpponentCar): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): SaveScreenshotRequest_OpponentCar { - const message = createBaseSaveScreenshotRequest_OpponentCar(); - message.carId = object.carId ?? 0; - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - return message; - }, -}; - -function createBaseSaveScreenshotResponse(): SaveScreenshotResponse { - return { error: 0 }; -} - -export const SaveScreenshotResponse = { - encode( - message: SaveScreenshotResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScreenshotResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveScreenshotResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScreenshotResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: SaveScreenshotResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): SaveScreenshotResponse { - const message = createBaseSaveScreenshotResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseSubmitClientLogRequest(): SubmitClientLogRequest { - return { data: Buffer.alloc(0), modifiedAt: 0, logType: 0 }; -} - -export const SubmitClientLogRequest = { - encode( - message: SubmitClientLogRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.modifiedAt !== 0) { - writer.uint32(16).uint32(message.modifiedAt); - } - if (message.logType !== 0) { - writer.uint32(24).int32(message.logType); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubmitClientLogRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSubmitClientLogRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes() as Buffer; - break; - case 2: - message.modifiedAt = reader.uint32(); - break; - case 3: - message.logType = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SubmitClientLogRequest { - return { - data: isSet(object.data) - ? Buffer.from(bytesFromBase64(object.data)) - : Buffer.alloc(0), - modifiedAt: isSet(object.modifiedAt) ? Number(object.modifiedAt) : 0, - logType: isSet(object.logType) - ? clientLogTypeFromJSON(object.logType) - : 0, - }; - }, - - toJSON(message: SubmitClientLogRequest): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : Buffer.alloc(0) - )); - message.modifiedAt !== undefined && - (obj.modifiedAt = Math.round(message.modifiedAt)); - message.logType !== undefined && - (obj.logType = clientLogTypeToJSON(message.logType)); - return obj; - }, - - fromPartial, I>>( - object: I - ): SubmitClientLogRequest { - const message = createBaseSubmitClientLogRequest(); - message.data = object.data ?? Buffer.alloc(0); - message.modifiedAt = object.modifiedAt ?? 0; - message.logType = object.logType ?? 0; - return message; - }, -}; - -function createBaseSubmitClientLogResponse(): SubmitClientLogResponse { - return { error: 0 }; -} - -export const SubmitClientLogResponse = { - encode( - message: SubmitClientLogResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SubmitClientLogResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSubmitClientLogResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SubmitClientLogResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: SubmitClientLogResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): SubmitClientLogResponse { - const message = createBaseSubmitClientLogResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseLoadScratchInformationRequest(): LoadScratchInformationRequest { - return { userId: 0 }; -} - -export const LoadScratchInformationRequest = { - encode( - message: LoadScratchInformationRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.userId !== 0) { - writer.uint32(8).uint32(message.userId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadScratchInformationRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadScratchInformationRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadScratchInformationRequest { - return { - userId: isSet(object.userId) ? Number(object.userId) : 0, - }; - }, - - toJSON(message: LoadScratchInformationRequest): unknown { - const obj: any = {}; - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadScratchInformationRequest { - const message = createBaseLoadScratchInformationRequest(); - message.userId = object.userId ?? 0; - return message; - }, -}; - -function createBaseLoadScratchInformationResponse(): LoadScratchInformationResponse { - return { - error: 0, - scratchSheets: [], - currentSheet: 0, - numOfScratched: 0, - ownedUserItems: [], - }; -} - -export const LoadScratchInformationResponse = { - encode( - message: LoadScratchInformationResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - for (const v of message.scratchSheets) { - ScratchSheet.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.currentSheet !== 0) { - writer.uint32(24).uint32(message.currentSheet); - } - if (message.numOfScratched !== 0) { - writer.uint32(32).uint32(message.numOfScratched); - } - for (const v of message.ownedUserItems) { - UserItem.encode(v!, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadScratchInformationResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadScratchInformationResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.scratchSheets.push( - ScratchSheet.decode(reader, reader.uint32()) - ); - break; - case 3: - message.currentSheet = reader.uint32(); - break; - case 4: - message.numOfScratched = reader.uint32(); - break; - case 5: - message.ownedUserItems.push(UserItem.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadScratchInformationResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - scratchSheets: Array.isArray(object?.scratchSheets) - ? object.scratchSheets.map((e: any) => ScratchSheet.fromJSON(e)) - : [], - currentSheet: isSet(object.currentSheet) - ? Number(object.currentSheet) - : 0, - numOfScratched: isSet(object.numOfScratched) - ? Number(object.numOfScratched) - : 0, - ownedUserItems: Array.isArray(object?.ownedUserItems) - ? object.ownedUserItems.map((e: any) => UserItem.fromJSON(e)) - : [], - }; - }, - - toJSON(message: LoadScratchInformationResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - if (message.scratchSheets) { - obj.scratchSheets = message.scratchSheets.map((e) => - e ? ScratchSheet.toJSON(e) : undefined - ); - } else { - obj.scratchSheets = []; - } - message.currentSheet !== undefined && - (obj.currentSheet = Math.round(message.currentSheet)); - message.numOfScratched !== undefined && - (obj.numOfScratched = Math.round(message.numOfScratched)); - if (message.ownedUserItems) { - obj.ownedUserItems = message.ownedUserItems.map((e) => - e ? UserItem.toJSON(e) : undefined - ); - } else { - obj.ownedUserItems = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadScratchInformationResponse { - const message = createBaseLoadScratchInformationResponse(); - message.error = object.error ?? 0; - message.scratchSheets = - object.scratchSheets?.map((e) => ScratchSheet.fromPartial(e)) || []; - message.currentSheet = object.currentSheet ?? 0; - message.numOfScratched = object.numOfScratched ?? 0; - message.ownedUserItems = - object.ownedUserItems?.map((e) => UserItem.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseSaveScratchSheetRequest(): SaveScratchSheetRequest { - return { timestamp: 0, targetSheet: 0, targetSquare: 0, userId: 0 }; -} - -export const SaveScratchSheetRequest = { - encode( - message: SaveScratchSheetRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.timestamp !== 0) { - writer.uint32(56).uint32(message.timestamp); - } - if (message.targetSheet !== 0) { - writer.uint32(8).uint32(message.targetSheet); - } - if (message.targetSquare !== 0) { - writer.uint32(16).uint32(message.targetSquare); - } - if (message.userId !== 0) { - writer.uint32(24).uint32(message.userId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScratchSheetRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveScratchSheetRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 7: - message.timestamp = reader.uint32(); - break; - case 1: - message.targetSheet = reader.uint32(); - break; - case 2: - message.targetSquare = reader.uint32(); - break; - case 3: - message.userId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScratchSheetRequest { - return { - timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0, - targetSheet: isSet(object.targetSheet) ? Number(object.targetSheet) : 0, - targetSquare: isSet(object.targetSquare) - ? Number(object.targetSquare) - : 0, - userId: isSet(object.userId) ? Number(object.userId) : 0, - }; - }, - - toJSON(message: SaveScratchSheetRequest): unknown { - const obj: any = {}; - message.timestamp !== undefined && - (obj.timestamp = Math.round(message.timestamp)); - message.targetSheet !== undefined && - (obj.targetSheet = Math.round(message.targetSheet)); - message.targetSquare !== undefined && - (obj.targetSquare = Math.round(message.targetSquare)); - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): SaveScratchSheetRequest { - const message = createBaseSaveScratchSheetRequest(); - message.timestamp = object.timestamp ?? 0; - message.targetSheet = object.targetSheet ?? 0; - message.targetSquare = object.targetSquare ?? 0; - message.userId = object.userId ?? 0; - return message; - }, -}; - -function createBaseSaveScratchSheetResponse(): SaveScratchSheetResponse { - return { - error: 0, - scratchSheets: [], - currentSheet: 0, - numOfScratched: 0, - earnedItem: undefined, - }; -} - -export const SaveScratchSheetResponse = { - encode( - message: SaveScratchSheetResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - for (const v of message.scratchSheets) { - ScratchSheet.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.currentSheet !== 0) { - writer.uint32(24).uint32(message.currentSheet); - } - if (message.numOfScratched !== 0) { - writer.uint32(32).uint32(message.numOfScratched); - } - if (message.earnedItem !== undefined) { - UserItem.encode(message.earnedItem, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SaveScratchSheetResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSaveScratchSheetResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.scratchSheets.push( - ScratchSheet.decode(reader, reader.uint32()) - ); - break; - case 3: - message.currentSheet = reader.uint32(); - break; - case 4: - message.numOfScratched = reader.uint32(); - break; - case 5: - message.earnedItem = UserItem.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SaveScratchSheetResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - scratchSheets: Array.isArray(object?.scratchSheets) - ? object.scratchSheets.map((e: any) => ScratchSheet.fromJSON(e)) - : [], - currentSheet: isSet(object.currentSheet) - ? Number(object.currentSheet) - : 0, - numOfScratched: isSet(object.numOfScratched) - ? Number(object.numOfScratched) - : 0, - earnedItem: isSet(object.earnedItem) - ? UserItem.fromJSON(object.earnedItem) - : undefined, - }; - }, - - toJSON(message: SaveScratchSheetResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - if (message.scratchSheets) { - obj.scratchSheets = message.scratchSheets.map((e) => - e ? ScratchSheet.toJSON(e) : undefined - ); - } else { - obj.scratchSheets = []; - } - message.currentSheet !== undefined && - (obj.currentSheet = Math.round(message.currentSheet)); - message.numOfScratched !== undefined && - (obj.numOfScratched = Math.round(message.numOfScratched)); - message.earnedItem !== undefined && - (obj.earnedItem = message.earnedItem - ? UserItem.toJSON(message.earnedItem) - : undefined); - return obj; - }, - - fromPartial, I>>( - object: I - ): SaveScratchSheetResponse { - const message = createBaseSaveScratchSheetResponse(); - message.error = object.error ?? 0; - message.scratchSheets = - object.scratchSheets?.map((e) => ScratchSheet.fromPartial(e)) || []; - message.currentSheet = object.currentSheet ?? 0; - message.numOfScratched = object.numOfScratched ?? 0; - message.earnedItem = - object.earnedItem !== undefined && object.earnedItem !== null - ? UserItem.fromPartial(object.earnedItem) - : undefined; - return message; - }, -}; - -function createBaseTurnScratchSheetRequest(): TurnScratchSheetRequest { - return { userId: 0, targetSheet: 0 }; -} - -export const TurnScratchSheetRequest = { - encode( - message: TurnScratchSheetRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.userId !== 0) { - writer.uint32(8).uint32(message.userId); - } - if (message.targetSheet !== 0) { - writer.uint32(16).uint32(message.targetSheet); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): TurnScratchSheetRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTurnScratchSheetRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userId = reader.uint32(); - break; - case 2: - message.targetSheet = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TurnScratchSheetRequest { - return { - userId: isSet(object.userId) ? Number(object.userId) : 0, - targetSheet: isSet(object.targetSheet) ? Number(object.targetSheet) : 0, - }; - }, - - toJSON(message: TurnScratchSheetRequest): unknown { - const obj: any = {}; - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - message.targetSheet !== undefined && - (obj.targetSheet = Math.round(message.targetSheet)); - return obj; - }, - - fromPartial, I>>( - object: I - ): TurnScratchSheetRequest { - const message = createBaseTurnScratchSheetRequest(); - message.userId = object.userId ?? 0; - message.targetSheet = object.targetSheet ?? 0; - return message; - }, -}; - -function createBaseTurnScratchSheetResponse(): TurnScratchSheetResponse { - return { error: 0 }; -} - -export const TurnScratchSheetResponse = { - encode( - message: TurnScratchSheetResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): TurnScratchSheetResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTurnScratchSheetResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TurnScratchSheetResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: TurnScratchSheetResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): TurnScratchSheetResponse { - const message = createBaseTurnScratchSheetResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseCheckItemReceivableCarsRequest(): CheckItemReceivableCarsRequest { - return { userId: 0, itemsToBeEarned: [] }; -} - -export const CheckItemReceivableCarsRequest = { - encode( - message: CheckItemReceivableCarsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.userId !== 0) { - writer.uint32(8).uint32(message.userId); - } - for (const v of message.itemsToBeEarned) { - UserItem.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): CheckItemReceivableCarsRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCheckItemReceivableCarsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userId = reader.uint32(); - break; - case 2: - message.itemsToBeEarned.push( - UserItem.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CheckItemReceivableCarsRequest { - return { - userId: isSet(object.userId) ? Number(object.userId) : 0, - itemsToBeEarned: Array.isArray(object?.itemsToBeEarned) - ? object.itemsToBeEarned.map((e: any) => UserItem.fromJSON(e)) - : [], - }; - }, - - toJSON(message: CheckItemReceivableCarsRequest): unknown { - const obj: any = {}; - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - if (message.itemsToBeEarned) { - obj.itemsToBeEarned = message.itemsToBeEarned.map((e) => - e ? UserItem.toJSON(e) : undefined - ); - } else { - obj.itemsToBeEarned = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): CheckItemReceivableCarsRequest { - const message = createBaseCheckItemReceivableCarsRequest(); - message.userId = object.userId ?? 0; - message.itemsToBeEarned = - object.itemsToBeEarned?.map((e) => UserItem.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseCheckItemReceivableCarsResponse(): CheckItemReceivableCarsResponse { - return { error: 0, carIds: [] }; -} - -export const CheckItemReceivableCarsResponse = { - encode( - message: CheckItemReceivableCarsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - writer.uint32(18).fork(); - for (const v of message.carIds) { - writer.uint32(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): CheckItemReceivableCarsResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCheckItemReceivableCarsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.carIds.push(reader.uint32()); - } - } else { - message.carIds.push(reader.uint32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CheckItemReceivableCarsResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - carIds: Array.isArray(object?.carIds) - ? object.carIds.map((e: any) => Number(e)) - : [], - }; - }, - - toJSON(message: CheckItemReceivableCarsResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - if (message.carIds) { - obj.carIds = message.carIds.map((e) => Math.round(e)); - } else { - obj.carIds = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): CheckItemReceivableCarsResponse { - const message = createBaseCheckItemReceivableCarsResponse(); - message.error = object.error ?? 0; - message.carIds = object.carIds?.map((e) => e) || []; - return message; - }, -}; - -function createBaseReceiveUserItemsRequest(): ReceiveUserItemsRequest { - return { carId: 0, targetItemIds: [] }; -} - -export const ReceiveUserItemsRequest = { - encode( - message: ReceiveUserItemsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - writer.uint32(18).fork(); - for (const v of message.targetItemIds) { - writer.uint32(v); - } - writer.ldelim(); - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): ReceiveUserItemsRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseReceiveUserItemsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.targetItemIds.push(reader.uint32()); - } - } else { - message.targetItemIds.push(reader.uint32()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ReceiveUserItemsRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - targetItemIds: Array.isArray(object?.targetItemIds) - ? object.targetItemIds.map((e: any) => Number(e)) - : [], - }; - }, - - toJSON(message: ReceiveUserItemsRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - if (message.targetItemIds) { - obj.targetItemIds = message.targetItemIds.map((e) => Math.round(e)); - } else { - obj.targetItemIds = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): ReceiveUserItemsRequest { - const message = createBaseReceiveUserItemsRequest(); - message.carId = object.carId ?? 0; - message.targetItemIds = object.targetItemIds?.map((e) => e) || []; - return message; - }, -}; - -function createBaseReceiveUserItemsResponse(): ReceiveUserItemsResponse { - return { error: 0 }; -} - -export const ReceiveUserItemsResponse = { - encode( - message: ReceiveUserItemsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): ReceiveUserItemsResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseReceiveUserItemsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ReceiveUserItemsResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: ReceiveUserItemsResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): ReceiveUserItemsResponse { - const message = createBaseReceiveUserItemsResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseUpdateEventModeSerialRequest(): UpdateEventModeSerialRequest { - return { eventModeSerial: "" }; -} - -export const UpdateEventModeSerialRequest = { - encode( - message: UpdateEventModeSerialRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.eventModeSerial !== "") { - writer.uint32(10).string(message.eventModeSerial); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): UpdateEventModeSerialRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateEventModeSerialRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eventModeSerial = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateEventModeSerialRequest { - return { - eventModeSerial: isSet(object.eventModeSerial) - ? String(object.eventModeSerial) - : "", - }; - }, - - toJSON(message: UpdateEventModeSerialRequest): unknown { - const obj: any = {}; - message.eventModeSerial !== undefined && - (obj.eventModeSerial = message.eventModeSerial); - return obj; - }, - - fromPartial, I>>( - object: I - ): UpdateEventModeSerialRequest { - const message = createBaseUpdateEventModeSerialRequest(); - message.eventModeSerial = object.eventModeSerial ?? ""; - return message; - }, -}; - -function createBaseUpdateEventModeSerialResponse(): UpdateEventModeSerialResponse { - return { - error: 0, - serialError: 0, - eventModeSerial: "", - startAt: 0, - endAt: 0, - }; -} - -export const UpdateEventModeSerialResponse = { - encode( - message: UpdateEventModeSerialResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - if (message.serialError !== 0) { - writer.uint32(32).int32(message.serialError); - } - if (message.eventModeSerial !== "") { - writer.uint32(18).string(message.eventModeSerial); - } - if (message.startAt !== 0) { - writer.uint32(40).uint32(message.startAt); - } - if (message.endAt !== 0) { - writer.uint32(24).uint32(message.endAt); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): UpdateEventModeSerialResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateEventModeSerialResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 4: - message.serialError = reader.int32() as any; - break; - case 2: - message.eventModeSerial = reader.string(); - break; - case 5: - message.startAt = reader.uint32(); - break; - case 3: - message.endAt = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UpdateEventModeSerialResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - serialError: isSet(object.serialError) - ? eventModeSerialErrorCodeFromJSON(object.serialError) - : 0, - eventModeSerial: isSet(object.eventModeSerial) - ? String(object.eventModeSerial) - : "", - startAt: isSet(object.startAt) ? Number(object.startAt) : 0, - endAt: isSet(object.endAt) ? Number(object.endAt) : 0, - }; - }, - - toJSON(message: UpdateEventModeSerialResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - message.serialError !== undefined && - (obj.serialError = eventModeSerialErrorCodeToJSON(message.serialError)); - message.eventModeSerial !== undefined && - (obj.eventModeSerial = message.eventModeSerial); - message.startAt !== undefined && - (obj.startAt = Math.round(message.startAt)); - message.endAt !== undefined && (obj.endAt = Math.round(message.endAt)); - return obj; - }, - - fromPartial, I>>( - object: I - ): UpdateEventModeSerialResponse { - const message = createBaseUpdateEventModeSerialResponse(); - message.error = object.error ?? 0; - message.serialError = object.serialError ?? 0; - message.eventModeSerial = object.eventModeSerial ?? ""; - message.startAt = object.startAt ?? 0; - message.endAt = object.endAt ?? 0; - return message; - }, -}; - -function createBaseParticipateInInviteFriendCampaignRequest(): ParticipateInInviteFriendCampaignRequest { - return { - invitingUserId: 0, - invitedUserId: 0, - sourceCarId: 0, - transmission: false, - }; -} - -export const ParticipateInInviteFriendCampaignRequest = { - encode( - message: ParticipateInInviteFriendCampaignRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.invitingUserId !== 0) { - writer.uint32(8).uint32(message.invitingUserId); - } - if (message.invitedUserId !== 0) { - writer.uint32(16).uint32(message.invitedUserId); - } - if (message.sourceCarId !== 0) { - writer.uint32(24).uint32(message.sourceCarId); - } - if (message.transmission === true) { - writer.uint32(32).bool(message.transmission); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): ParticipateInInviteFriendCampaignRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParticipateInInviteFriendCampaignRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.invitingUserId = reader.uint32(); - break; - case 2: - message.invitedUserId = reader.uint32(); - break; - case 3: - message.sourceCarId = reader.uint32(); - break; - case 4: - message.transmission = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ParticipateInInviteFriendCampaignRequest { - return { - invitingUserId: isSet(object.invitingUserId) - ? Number(object.invitingUserId) - : 0, - invitedUserId: isSet(object.invitedUserId) - ? Number(object.invitedUserId) - : 0, - sourceCarId: isSet(object.sourceCarId) ? Number(object.sourceCarId) : 0, - transmission: isSet(object.transmission) - ? Boolean(object.transmission) - : false, - }; - }, - - toJSON(message: ParticipateInInviteFriendCampaignRequest): unknown { - const obj: any = {}; - message.invitingUserId !== undefined && - (obj.invitingUserId = Math.round(message.invitingUserId)); - message.invitedUserId !== undefined && - (obj.invitedUserId = Math.round(message.invitedUserId)); - message.sourceCarId !== undefined && - (obj.sourceCarId = Math.round(message.sourceCarId)); - message.transmission !== undefined && - (obj.transmission = message.transmission); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): ParticipateInInviteFriendCampaignRequest { - const message = createBaseParticipateInInviteFriendCampaignRequest(); - message.invitingUserId = object.invitingUserId ?? 0; - message.invitedUserId = object.invitedUserId ?? 0; - message.sourceCarId = object.sourceCarId ?? 0; - message.transmission = object.transmission ?? false; - return message; - }, -}; - -function createBaseParticipateInInviteFriendCampaignResponse(): ParticipateInInviteFriendCampaignResponse { - return { error: 0 }; -} - -export const ParticipateInInviteFriendCampaignResponse = { - encode( - message: ParticipateInInviteFriendCampaignResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): ParticipateInInviteFriendCampaignResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParticipateInInviteFriendCampaignResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ParticipateInInviteFriendCampaignResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: ParticipateInInviteFriendCampaignResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): ParticipateInInviteFriendCampaignResponse { - const message = createBaseParticipateInInviteFriendCampaignResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseConsumeUserItemRequest(): ConsumeUserItemRequest { - return { userId: 0, carId: 0, userItemId: 0 }; -} - -export const ConsumeUserItemRequest = { - encode( - message: ConsumeUserItemRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.userId !== 0) { - writer.uint32(8).uint32(message.userId); - } - if (message.carId !== 0) { - writer.uint32(16).uint32(message.carId); - } - if (message.userItemId !== 0) { - writer.uint32(24).uint32(message.userItemId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): ConsumeUserItemRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConsumeUserItemRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userId = reader.uint32(); - break; - case 2: - message.carId = reader.uint32(); - break; - case 3: - message.userItemId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsumeUserItemRequest { - return { - userId: isSet(object.userId) ? Number(object.userId) : 0, - carId: isSet(object.carId) ? Number(object.carId) : 0, - userItemId: isSet(object.userItemId) ? Number(object.userItemId) : 0, - }; - }, - - toJSON(message: ConsumeUserItemRequest): unknown { - const obj: any = {}; - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.userItemId !== undefined && - (obj.userItemId = Math.round(message.userItemId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): ConsumeUserItemRequest { - const message = createBaseConsumeUserItemRequest(); - message.userId = object.userId ?? 0; - message.carId = object.carId ?? 0; - message.userItemId = object.userItemId ?? 0; - return message; - }, -}; - -function createBaseConsumeUserItemResponse(): ConsumeUserItemResponse { - return { error: 0 }; -} - -export const ConsumeUserItemResponse = { - encode( - message: ConsumeUserItemResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): ConsumeUserItemResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConsumeUserItemResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ConsumeUserItemResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - }; - }, - - toJSON(message: ConsumeUserItemResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - return obj; - }, - - fromPartial, I>>( - object: I - ): ConsumeUserItemResponse { - const message = createBaseConsumeUserItemResponse(); - message.error = object.error ?? 0; - return message; - }, -}; - -function createBaseSearchCarsByLevelRequest(): SearchCarsByLevelRequest { - return { carId: 0, ghostLevel: 0, area: 0, regionId: 0 }; -} - -export const SearchCarsByLevelRequest = { - encode( - message: SearchCarsByLevelRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.ghostLevel !== 0) { - writer.uint32(16).uint32(message.ghostLevel); - } - if (message.area !== 0) { - writer.uint32(24).uint32(message.area); - } - if (message.regionId !== 0) { - writer.uint32(32).uint32(message.regionId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SearchCarsByLevelRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSearchCarsByLevelRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.ghostLevel = reader.uint32(); - break; - case 3: - message.area = reader.uint32(); - break; - case 4: - message.regionId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SearchCarsByLevelRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - ghostLevel: isSet(object.ghostLevel) ? Number(object.ghostLevel) : 0, - area: isSet(object.area) ? Number(object.area) : 0, - regionId: isSet(object.regionId) ? Number(object.regionId) : 0, - }; - }, - - toJSON(message: SearchCarsByLevelRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.ghostLevel !== undefined && - (obj.ghostLevel = Math.round(message.ghostLevel)); - message.area !== undefined && (obj.area = Math.round(message.area)); - message.regionId !== undefined && - (obj.regionId = Math.round(message.regionId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): SearchCarsByLevelRequest { - const message = createBaseSearchCarsByLevelRequest(); - message.carId = object.carId ?? 0; - message.ghostLevel = object.ghostLevel ?? 0; - message.area = object.area ?? 0; - message.regionId = object.regionId ?? 0; - return message; - }, -}; - -function createBaseSearchCarsByLevelResponse(): SearchCarsByLevelResponse { - return { - error: 0, - ramp: 0, - path: 0, - ghosts: [], - selectionMethod: 1, - rates: [], - }; -} - -export const SearchCarsByLevelResponse = { - encode( - message: SearchCarsByLevelResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - if (message.ramp !== 0) { - writer.uint32(16).uint32(message.ramp); - } - if (message.path !== 0) { - writer.uint32(24).uint32(message.path); - } - for (const v of message.ghosts) { - GhostCar.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.selectionMethod !== 1) { - writer.uint32(40).int32(message.selectionMethod); - } - for (const v of message.rates) { - SearchCarsByLevelResponse_Rate.encode( - v!, - writer.uint32(50).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SearchCarsByLevelResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSearchCarsByLevelResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.ramp = reader.uint32(); - break; - case 3: - message.path = reader.uint32(); - break; - case 4: - message.ghosts.push(GhostCar.decode(reader, reader.uint32())); - break; - case 5: - message.selectionMethod = reader.int32() as any; - break; - case 6: - message.rates.push( - SearchCarsByLevelResponse_Rate.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SearchCarsByLevelResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - ramp: isSet(object.ramp) ? Number(object.ramp) : 0, - path: isSet(object.path) ? Number(object.path) : 0, - ghosts: Array.isArray(object?.ghosts) - ? object.ghosts.map((e: any) => GhostCar.fromJSON(e)) - : [], - selectionMethod: isSet(object.selectionMethod) - ? pathSelectionMethodFromJSON(object.selectionMethod) - : 1, - rates: Array.isArray(object?.rates) - ? object.rates.map((e: any) => - SearchCarsByLevelResponse_Rate.fromJSON(e) - ) - : [], - }; - }, - - toJSON(message: SearchCarsByLevelResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - message.ramp !== undefined && (obj.ramp = Math.round(message.ramp)); - message.path !== undefined && (obj.path = Math.round(message.path)); - if (message.ghosts) { - obj.ghosts = message.ghosts.map((e) => - e ? GhostCar.toJSON(e) : undefined - ); - } else { - obj.ghosts = []; - } - message.selectionMethod !== undefined && - (obj.selectionMethod = pathSelectionMethodToJSON( - message.selectionMethod - )); - if (message.rates) { - obj.rates = message.rates.map((e) => - e ? SearchCarsByLevelResponse_Rate.toJSON(e) : undefined - ); - } else { - obj.rates = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): SearchCarsByLevelResponse { - const message = createBaseSearchCarsByLevelResponse(); - message.error = object.error ?? 0; - message.ramp = object.ramp ?? 0; - message.path = object.path ?? 0; - message.ghosts = object.ghosts?.map((e) => GhostCar.fromPartial(e)) || []; - message.selectionMethod = object.selectionMethod ?? 1; - message.rates = - object.rates?.map((e) => SearchCarsByLevelResponse_Rate.fromPartial(e)) || - []; - return message; - }, -}; - -function createBaseSearchCarsByLevelResponse_Rate(): SearchCarsByLevelResponse_Rate { - return { carId: 0, type: 1, rate: 0 }; -} - -export const SearchCarsByLevelResponse_Rate = { - encode( - message: SearchCarsByLevelResponse_Rate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.type !== 1) { - writer.uint32(16).int32(message.type); - } - if (message.rate !== 0) { - writer.uint32(24).uint32(message.rate); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SearchCarsByLevelResponse_Rate { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSearchCarsByLevelResponse_Rate(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.type = reader.int32() as any; - break; - case 3: - message.rate = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SearchCarsByLevelResponse_Rate { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - type: isSet(object.type) ? ghostRateTypeFromJSON(object.type) : 1, - rate: isSet(object.rate) ? Number(object.rate) : 0, - }; - }, - - toJSON(message: SearchCarsByLevelResponse_Rate): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.type !== undefined && - (obj.type = ghostRateTypeToJSON(message.type)); - message.rate !== undefined && (obj.rate = Math.round(message.rate)); - return obj; - }, - - fromPartial, I>>( - object: I - ): SearchCarsByLevelResponse_Rate { - const message = createBaseSearchCarsByLevelResponse_Rate(); - message.carId = object.carId ?? 0; - message.type = object.type ?? 1; - message.rate = object.rate ?? 0; - return message; - }, -}; - -function createBaseLoadPathsAndTuningsRequest(): LoadPathsAndTuningsRequest { - return { - carId: 0, - selectedCars: [], - returnImmediately: false, - stampTargetArea: 0, - }; -} - -export const LoadPathsAndTuningsRequest = { - encode( - message: LoadPathsAndTuningsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - writer.uint32(18).fork(); - for (const v of message.selectedCars) { - writer.uint32(v); - } - writer.ldelim(); - if (message.returnImmediately === true) { - writer.uint32(24).bool(message.returnImmediately); - } - if (message.stampTargetArea !== 0) { - writer.uint32(32).uint32(message.stampTargetArea); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadPathsAndTuningsRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadPathsAndTuningsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.selectedCars.push(reader.uint32()); - } - } else { - message.selectedCars.push(reader.uint32()); - } - break; - case 3: - message.returnImmediately = reader.bool(); - break; - case 4: - message.stampTargetArea = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadPathsAndTuningsRequest { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - selectedCars: Array.isArray(object?.selectedCars) - ? object.selectedCars.map((e: any) => Number(e)) - : [], - returnImmediately: isSet(object.returnImmediately) - ? Boolean(object.returnImmediately) - : false, - stampTargetArea: isSet(object.stampTargetArea) - ? Number(object.stampTargetArea) - : 0, - }; - }, - - toJSON(message: LoadPathsAndTuningsRequest): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - if (message.selectedCars) { - obj.selectedCars = message.selectedCars.map((e) => Math.round(e)); - } else { - obj.selectedCars = []; - } - message.returnImmediately !== undefined && - (obj.returnImmediately = message.returnImmediately); - message.stampTargetArea !== undefined && - (obj.stampTargetArea = Math.round(message.stampTargetArea)); - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadPathsAndTuningsRequest { - const message = createBaseLoadPathsAndTuningsRequest(); - message.carId = object.carId ?? 0; - message.selectedCars = object.selectedCars?.map((e) => e) || []; - message.returnImmediately = object.returnImmediately ?? false; - message.stampTargetArea = object.stampTargetArea ?? 0; - return message; - }, -}; - -function createBaseLoadPathsAndTuningsResponse(): LoadPathsAndTuningsResponse { - return { error: 0, data: [] }; -} - -export const LoadPathsAndTuningsResponse = { - encode( - message: LoadPathsAndTuningsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - for (const v of message.data) { - LoadPathsAndTuningsResponse_CarTuningsByPath.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadPathsAndTuningsResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadPathsAndTuningsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.data.push( - LoadPathsAndTuningsResponse_CarTuningsByPath.decode( - reader, - reader.uint32() - ) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadPathsAndTuningsResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - data: Array.isArray(object?.data) - ? object.data.map((e: any) => - LoadPathsAndTuningsResponse_CarTuningsByPath.fromJSON(e) - ) - : [], - }; - }, - - toJSON(message: LoadPathsAndTuningsResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - if (message.data) { - obj.data = message.data.map((e) => - e ? LoadPathsAndTuningsResponse_CarTuningsByPath.toJSON(e) : undefined - ); - } else { - obj.data = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadPathsAndTuningsResponse { - const message = createBaseLoadPathsAndTuningsResponse(); - message.error = object.error ?? 0; - message.data = - object.data?.map((e) => - LoadPathsAndTuningsResponse_CarTuningsByPath.fromPartial(e) - ) || []; - return message; - }, -}; - -function createBaseLoadPathsAndTuningsResponse_CarTuningsByPath(): LoadPathsAndTuningsResponse_CarTuningsByPath { - return { area: 0, ramp: 0, path: 0, carTunings: [], selectionMethod: 1 }; -} - -export const LoadPathsAndTuningsResponse_CarTuningsByPath = { - encode( - message: LoadPathsAndTuningsResponse_CarTuningsByPath, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.area !== 0) { - writer.uint32(8).uint32(message.area); - } - if (message.ramp !== 0) { - writer.uint32(16).uint32(message.ramp); - } - if (message.path !== 0) { - writer.uint32(24).uint32(message.path); - } - for (const v of message.carTunings) { - CarTuning.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.selectionMethod !== 1) { - writer.uint32(40).int32(message.selectionMethod); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadPathsAndTuningsResponse_CarTuningsByPath { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadPathsAndTuningsResponse_CarTuningsByPath(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.area = reader.uint32(); - break; - case 2: - message.ramp = reader.uint32(); - break; - case 3: - message.path = reader.uint32(); - break; - case 4: - message.carTunings.push(CarTuning.decode(reader, reader.uint32())); - break; - case 5: - message.selectionMethod = reader.int32() as any; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadPathsAndTuningsResponse_CarTuningsByPath { - return { - area: isSet(object.area) ? Number(object.area) : 0, - ramp: isSet(object.ramp) ? Number(object.ramp) : 0, - path: isSet(object.path) ? Number(object.path) : 0, - carTunings: Array.isArray(object?.carTunings) - ? object.carTunings.map((e: any) => CarTuning.fromJSON(e)) - : [], - selectionMethod: isSet(object.selectionMethod) - ? pathSelectionMethodFromJSON(object.selectionMethod) - : 1, - }; - }, - - toJSON(message: LoadPathsAndTuningsResponse_CarTuningsByPath): unknown { - const obj: any = {}; - message.area !== undefined && (obj.area = Math.round(message.area)); - message.ramp !== undefined && (obj.ramp = Math.round(message.ramp)); - message.path !== undefined && (obj.path = Math.round(message.path)); - if (message.carTunings) { - obj.carTunings = message.carTunings.map((e) => - e ? CarTuning.toJSON(e) : undefined - ); - } else { - obj.carTunings = []; - } - message.selectionMethod !== undefined && - (obj.selectionMethod = pathSelectionMethodToJSON( - message.selectionMethod - )); - return obj; - }, - - fromPartial< - I extends Exact< - DeepPartial, - I - > - >(object: I): LoadPathsAndTuningsResponse_CarTuningsByPath { - const message = createBaseLoadPathsAndTuningsResponse_CarTuningsByPath(); - message.area = object.area ?? 0; - message.ramp = object.ramp ?? 0; - message.path = object.path ?? 0; - message.carTunings = - object.carTunings?.map((e) => CarTuning.fromPartial(e)) || []; - message.selectionMethod = object.selectionMethod ?? 1; - return message; - }, -}; - -function createBaseLoadGhostDriveDataRequest(): LoadGhostDriveDataRequest { - return { path: 0, carTunings: [] }; -} - -export const LoadGhostDriveDataRequest = { - encode( - message: LoadGhostDriveDataRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.path !== 0) { - writer.uint32(8).uint32(message.path); - } - for (const v of message.carTunings) { - CarTuning.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGhostDriveDataRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGhostDriveDataRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.uint32(); - break; - case 2: - message.carTunings.push(CarTuning.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGhostDriveDataRequest { - return { - path: isSet(object.path) ? Number(object.path) : 0, - carTunings: Array.isArray(object?.carTunings) - ? object.carTunings.map((e: any) => CarTuning.fromJSON(e)) - : [], - }; - }, - - toJSON(message: LoadGhostDriveDataRequest): unknown { - const obj: any = {}; - message.path !== undefined && (obj.path = Math.round(message.path)); - if (message.carTunings) { - obj.carTunings = message.carTunings.map((e) => - e ? CarTuning.toJSON(e) : undefined - ); - } else { - obj.carTunings = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadGhostDriveDataRequest { - const message = createBaseLoadGhostDriveDataRequest(); - message.path = object.path ?? 0; - message.carTunings = - object.carTunings?.map((e) => CarTuning.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseLoadGhostDriveDataResponse(): LoadGhostDriveDataResponse { - return { error: 0, data: [] }; -} - -export const LoadGhostDriveDataResponse = { - encode( - message: LoadGhostDriveDataResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.error !== 0) { - writer.uint32(8).int32(message.error); - } - for (const v of message.data) { - LoadGhostDriveDataResponse_GhostDriveData.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGhostDriveDataResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGhostDriveDataResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = reader.int32() as any; - break; - case 2: - message.data.push( - LoadGhostDriveDataResponse_GhostDriveData.decode( - reader, - reader.uint32() - ) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGhostDriveDataResponse { - return { - error: isSet(object.error) ? errorCodeFromJSON(object.error) : 0, - data: Array.isArray(object?.data) - ? object.data.map((e: any) => - LoadGhostDriveDataResponse_GhostDriveData.fromJSON(e) - ) - : [], - }; - }, - - toJSON(message: LoadGhostDriveDataResponse): unknown { - const obj: any = {}; - message.error !== undefined && (obj.error = errorCodeToJSON(message.error)); - if (message.data) { - obj.data = message.data.map((e) => - e ? LoadGhostDriveDataResponse_GhostDriveData.toJSON(e) : undefined - ); - } else { - obj.data = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): LoadGhostDriveDataResponse { - const message = createBaseLoadGhostDriveDataResponse(); - message.error = object.error ?? 0; - message.data = - object.data?.map((e) => - LoadGhostDriveDataResponse_GhostDriveData.fromPartial(e) - ) || []; - return message; - }, -}; - -function createBaseLoadGhostDriveDataResponse_GhostDriveData(): LoadGhostDriveDataResponse_GhostDriveData { - return { - carId: 0, - type: 1, - driveData: undefined, - trendBinaryByUser: undefined, - trendBinaryByCar: undefined, - trendBinaryByArea: undefined, - }; -} - -export const LoadGhostDriveDataResponse_GhostDriveData = { - encode( - message: LoadGhostDriveDataResponse_GhostDriveData, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.type !== 1) { - writer.uint32(16).int32(message.type); - } - if (message.driveData !== undefined) { - BinaryData.encode(message.driveData, writer.uint32(26).fork()).ldelim(); - } - if (message.trendBinaryByUser !== undefined) { - BinaryData.encode( - message.trendBinaryByUser, - writer.uint32(34).fork() - ).ldelim(); - } - if (message.trendBinaryByCar !== undefined) { - BinaryData.encode( - message.trendBinaryByCar, - writer.uint32(42).fork() - ).ldelim(); - } - if (message.trendBinaryByArea !== undefined) { - BinaryData.encode( - message.trendBinaryByArea, - writer.uint32(50).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): LoadGhostDriveDataResponse_GhostDriveData { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLoadGhostDriveDataResponse_GhostDriveData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.type = reader.int32() as any; - break; - case 3: - message.driveData = BinaryData.decode(reader, reader.uint32()); - break; - case 4: - message.trendBinaryByUser = BinaryData.decode( - reader, - reader.uint32() - ); - break; - case 5: - message.trendBinaryByCar = BinaryData.decode(reader, reader.uint32()); - break; - case 6: - message.trendBinaryByArea = BinaryData.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): LoadGhostDriveDataResponse_GhostDriveData { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - type: isSet(object.type) ? ghostTypeFromJSON(object.type) : 1, - driveData: isSet(object.driveData) - ? BinaryData.fromJSON(object.driveData) - : undefined, - trendBinaryByUser: isSet(object.trendBinaryByUser) - ? BinaryData.fromJSON(object.trendBinaryByUser) - : undefined, - trendBinaryByCar: isSet(object.trendBinaryByCar) - ? BinaryData.fromJSON(object.trendBinaryByCar) - : undefined, - trendBinaryByArea: isSet(object.trendBinaryByArea) - ? BinaryData.fromJSON(object.trendBinaryByArea) - : undefined, - }; - }, - - toJSON(message: LoadGhostDriveDataResponse_GhostDriveData): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.type !== undefined && (obj.type = ghostTypeToJSON(message.type)); - message.driveData !== undefined && - (obj.driveData = message.driveData - ? BinaryData.toJSON(message.driveData) - : undefined); - message.trendBinaryByUser !== undefined && - (obj.trendBinaryByUser = message.trendBinaryByUser - ? BinaryData.toJSON(message.trendBinaryByUser) - : undefined); - message.trendBinaryByCar !== undefined && - (obj.trendBinaryByCar = message.trendBinaryByCar - ? BinaryData.toJSON(message.trendBinaryByCar) - : undefined); - message.trendBinaryByArea !== undefined && - (obj.trendBinaryByArea = message.trendBinaryByArea - ? BinaryData.toJSON(message.trendBinaryByArea) - : undefined); - return obj; - }, - - fromPartial< - I extends Exact, I> - >(object: I): LoadGhostDriveDataResponse_GhostDriveData { - const message = createBaseLoadGhostDriveDataResponse_GhostDriveData(); - message.carId = object.carId ?? 0; - message.type = object.type ?? 1; - message.driveData = - object.driveData !== undefined && object.driveData !== null - ? BinaryData.fromPartial(object.driveData) - : undefined; - message.trendBinaryByUser = - object.trendBinaryByUser !== undefined && - object.trendBinaryByUser !== null - ? BinaryData.fromPartial(object.trendBinaryByUser) - : undefined; - message.trendBinaryByCar = - object.trendBinaryByCar !== undefined && object.trendBinaryByCar !== null - ? BinaryData.fromPartial(object.trendBinaryByCar) - : undefined; - message.trendBinaryByArea = - object.trendBinaryByArea !== undefined && - object.trendBinaryByArea !== null - ? BinaryData.fromPartial(object.trendBinaryByArea) - : undefined; - return message; - }, -}; - -function createBaseCar(): Car { - return { - carId: 0, - userId: 0, - regionId: 0, - name: "", - manufacturer: 0, - model: 0, - visualModel: 0, - defaultColor: 0, - customColor: 0, - wheel: 0, - wheelColor: 0, - aero: 0, - bonnet: 0, - wing: 0, - gtWing: undefined, - mirror: 0, - neon: 0, - trunk: 0, - plate: 0, - plateColor: 0, - plateNumber: 0, - tunePower: 0, - tuneHandling: 0, - title: "", - level: 0, - windowSticker: false, - windowStickerString: "", - windowStickerFont: 0, - windowDecoration: 0, - rivalMarker: 0, - lastPlayedAt: 0, - lastPlayedPlace: undefined, - aura: 0, - auraMotif: 0, - ghostLevel: 0, - country: "", - searchCode: "", - }; -} - -export const Car = { - encode(message: Car, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.userId !== 0) { - writer.uint32(16).uint32(message.userId); - } - if (message.regionId !== 0) { - writer.uint32(24).uint32(message.regionId); - } - if (message.name !== "") { - writer.uint32(34).string(message.name); - } - if (message.manufacturer !== 0) { - writer.uint32(40).uint32(message.manufacturer); - } - if (message.model !== 0) { - writer.uint32(48).uint32(message.model); - } - if (message.visualModel !== 0) { - writer.uint32(56).uint32(message.visualModel); - } - if (message.defaultColor !== 0) { - writer.uint32(64).uint32(message.defaultColor); - } - if (message.customColor !== 0) { - writer.uint32(72).uint32(message.customColor); - } - if (message.wheel !== 0) { - writer.uint32(80).uint32(message.wheel); - } - if (message.wheelColor !== 0) { - writer.uint32(88).uint32(message.wheelColor); - } - if (message.aero !== 0) { - writer.uint32(96).uint32(message.aero); - } - if (message.bonnet !== 0) { - writer.uint32(104).uint32(message.bonnet); - } - if (message.wing !== 0) { - writer.uint32(112).uint32(message.wing); - } - if (message.gtWing !== undefined) { - GTWing.encode(message.gtWing, writer.uint32(122).fork()).ldelim(); - } - if (message.mirror !== 0) { - writer.uint32(128).uint32(message.mirror); - } - if (message.neon !== 0) { - writer.uint32(192).uint32(message.neon); - } - if (message.trunk !== 0) { - writer.uint32(200).uint32(message.trunk); - } - if (message.plate !== 0) { - writer.uint32(208).uint32(message.plate); - } - if (message.plateColor !== 0) { - writer.uint32(216).uint32(message.plateColor); - } - if (message.plateNumber !== 0) { - writer.uint32(224).uint32(message.plateNumber); - } - if (message.tunePower !== 0) { - writer.uint32(248).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(256).uint32(message.tuneHandling); - } - if (message.title !== "") { - writer.uint32(266).string(message.title); - } - if (message.level !== 0) { - writer.uint32(272).uint32(message.level); - } - if (message.windowSticker === true) { - writer.uint32(280).bool(message.windowSticker); - } - if (message.windowStickerString !== "") { - writer.uint32(298).string(message.windowStickerString); - } - if (message.windowStickerFont !== 0) { - writer.uint32(304).uint32(message.windowStickerFont); - } - if (message.windowDecoration !== 0) { - writer.uint32(312).uint32(message.windowDecoration); - } - if (message.rivalMarker !== 0) { - writer.uint32(328).uint32(message.rivalMarker); - } - if (message.lastPlayedAt !== 0) { - writer.uint32(360).uint32(message.lastPlayedAt); - } - if (message.lastPlayedPlace !== undefined) { - Place.encode(message.lastPlayedPlace, writer.uint32(370).fork()).ldelim(); - } - if (message.aura !== 0) { - writer.uint32(376).uint32(message.aura); - } - if (message.auraMotif !== 0) { - writer.uint32(384).uint32(message.auraMotif); - } - if (message.ghostLevel !== 0) { - writer.uint32(392).uint32(message.ghostLevel); - } - if (message.country !== "") { - writer.uint32(402).string(message.country); - } - if (message.searchCode !== "") { - writer.uint32(410).string(message.searchCode); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Car { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCar(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.userId = reader.uint32(); - break; - case 3: - message.regionId = reader.uint32(); - break; - case 4: - message.name = reader.string(); - break; - case 5: - message.manufacturer = reader.uint32(); - break; - case 6: - message.model = reader.uint32(); - break; - case 7: - message.visualModel = reader.uint32(); - break; - case 8: - message.defaultColor = reader.uint32(); - break; - case 9: - message.customColor = reader.uint32(); - break; - case 10: - message.wheel = reader.uint32(); - break; - case 11: - message.wheelColor = reader.uint32(); - break; - case 12: - message.aero = reader.uint32(); - break; - case 13: - message.bonnet = reader.uint32(); - break; - case 14: - message.wing = reader.uint32(); - break; - case 15: - message.gtWing = GTWing.decode(reader, reader.uint32()); - break; - case 16: - message.mirror = reader.uint32(); - break; - case 24: - message.neon = reader.uint32(); - break; - case 25: - message.trunk = reader.uint32(); - break; - case 26: - message.plate = reader.uint32(); - break; - case 27: - message.plateColor = reader.uint32(); - break; - case 28: - message.plateNumber = reader.uint32(); - break; - case 31: - message.tunePower = reader.uint32(); - break; - case 32: - message.tuneHandling = reader.uint32(); - break; - case 33: - message.title = reader.string(); - break; - case 34: - message.level = reader.uint32(); - break; - case 35: - message.windowSticker = reader.bool(); - break; - case 37: - message.windowStickerString = reader.string(); - break; - case 38: - message.windowStickerFont = reader.uint32(); - break; - case 39: - message.windowDecoration = reader.uint32(); - break; - case 41: - message.rivalMarker = reader.uint32(); - break; - case 45: - message.lastPlayedAt = reader.uint32(); - break; - case 46: - message.lastPlayedPlace = Place.decode(reader, reader.uint32()); - break; - case 47: - message.aura = reader.uint32(); - break; - case 48: - message.auraMotif = reader.uint32(); - break; - case 49: - message.ghostLevel = reader.uint32(); - break; - case 50: - message.country = reader.string(); - break; - case 51: - message.searchCode = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Car { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - userId: isSet(object.userId) ? Number(object.userId) : 0, - regionId: isSet(object.regionId) ? Number(object.regionId) : 0, - name: isSet(object.name) ? String(object.name) : "", - manufacturer: isSet(object.manufacturer) - ? Number(object.manufacturer) - : 0, - model: isSet(object.model) ? Number(object.model) : 0, - visualModel: isSet(object.visualModel) ? Number(object.visualModel) : 0, - defaultColor: isSet(object.defaultColor) - ? Number(object.defaultColor) - : 0, - customColor: isSet(object.customColor) ? Number(object.customColor) : 0, - wheel: isSet(object.wheel) ? Number(object.wheel) : 0, - wheelColor: isSet(object.wheelColor) ? Number(object.wheelColor) : 0, - aero: isSet(object.aero) ? Number(object.aero) : 0, - bonnet: isSet(object.bonnet) ? Number(object.bonnet) : 0, - wing: isSet(object.wing) ? Number(object.wing) : 0, - gtWing: isSet(object.gtWing) ? GTWing.fromJSON(object.gtWing) : undefined, - mirror: isSet(object.mirror) ? Number(object.mirror) : 0, - neon: isSet(object.neon) ? Number(object.neon) : 0, - trunk: isSet(object.trunk) ? Number(object.trunk) : 0, - plate: isSet(object.plate) ? Number(object.plate) : 0, - plateColor: isSet(object.plateColor) ? Number(object.plateColor) : 0, - plateNumber: isSet(object.plateNumber) ? Number(object.plateNumber) : 0, - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - title: isSet(object.title) ? String(object.title) : "", - level: isSet(object.level) ? Number(object.level) : 0, - windowSticker: isSet(object.windowSticker) - ? Boolean(object.windowSticker) - : false, - windowStickerString: isSet(object.windowStickerString) - ? String(object.windowStickerString) - : "", - windowStickerFont: isSet(object.windowStickerFont) - ? Number(object.windowStickerFont) - : 0, - windowDecoration: isSet(object.windowDecoration) - ? Number(object.windowDecoration) - : 0, - rivalMarker: isSet(object.rivalMarker) ? Number(object.rivalMarker) : 0, - lastPlayedAt: isSet(object.lastPlayedAt) - ? Number(object.lastPlayedAt) - : 0, - lastPlayedPlace: isSet(object.lastPlayedPlace) - ? Place.fromJSON(object.lastPlayedPlace) - : undefined, - aura: isSet(object.aura) ? Number(object.aura) : 0, - auraMotif: isSet(object.auraMotif) ? Number(object.auraMotif) : 0, - ghostLevel: isSet(object.ghostLevel) ? Number(object.ghostLevel) : 0, - country: isSet(object.country) ? String(object.country) : "", - searchCode: isSet(object.searchCode) ? String(object.searchCode) : "", - }; - }, - - toJSON(message: Car): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.userId !== undefined && (obj.userId = Math.round(message.userId)); - message.regionId !== undefined && - (obj.regionId = Math.round(message.regionId)); - message.name !== undefined && (obj.name = message.name); - message.manufacturer !== undefined && - (obj.manufacturer = Math.round(message.manufacturer)); - message.model !== undefined && (obj.model = Math.round(message.model)); - message.visualModel !== undefined && - (obj.visualModel = Math.round(message.visualModel)); - message.defaultColor !== undefined && - (obj.defaultColor = Math.round(message.defaultColor)); - message.customColor !== undefined && - (obj.customColor = Math.round(message.customColor)); - message.wheel !== undefined && (obj.wheel = Math.round(message.wheel)); - message.wheelColor !== undefined && - (obj.wheelColor = Math.round(message.wheelColor)); - message.aero !== undefined && (obj.aero = Math.round(message.aero)); - message.bonnet !== undefined && (obj.bonnet = Math.round(message.bonnet)); - message.wing !== undefined && (obj.wing = Math.round(message.wing)); - message.gtWing !== undefined && - (obj.gtWing = message.gtWing ? GTWing.toJSON(message.gtWing) : undefined); - message.mirror !== undefined && (obj.mirror = Math.round(message.mirror)); - message.neon !== undefined && (obj.neon = Math.round(message.neon)); - message.trunk !== undefined && (obj.trunk = Math.round(message.trunk)); - message.plate !== undefined && (obj.plate = Math.round(message.plate)); - message.plateColor !== undefined && - (obj.plateColor = Math.round(message.plateColor)); - message.plateNumber !== undefined && - (obj.plateNumber = Math.round(message.plateNumber)); - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.title !== undefined && (obj.title = message.title); - message.level !== undefined && (obj.level = Math.round(message.level)); - message.windowSticker !== undefined && - (obj.windowSticker = message.windowSticker); - message.windowStickerString !== undefined && - (obj.windowStickerString = message.windowStickerString); - message.windowStickerFont !== undefined && - (obj.windowStickerFont = Math.round(message.windowStickerFont)); - message.windowDecoration !== undefined && - (obj.windowDecoration = Math.round(message.windowDecoration)); - message.rivalMarker !== undefined && - (obj.rivalMarker = Math.round(message.rivalMarker)); - message.lastPlayedAt !== undefined && - (obj.lastPlayedAt = Math.round(message.lastPlayedAt)); - message.lastPlayedPlace !== undefined && - (obj.lastPlayedPlace = message.lastPlayedPlace - ? Place.toJSON(message.lastPlayedPlace) - : undefined); - message.aura !== undefined && (obj.aura = Math.round(message.aura)); - message.auraMotif !== undefined && - (obj.auraMotif = Math.round(message.auraMotif)); - message.ghostLevel !== undefined && - (obj.ghostLevel = Math.round(message.ghostLevel)); - message.country !== undefined && (obj.country = message.country); - message.searchCode !== undefined && (obj.searchCode = message.searchCode); - return obj; - }, - - fromPartial, I>>(object: I): Car { - const message = createBaseCar(); - message.carId = object.carId ?? 0; - message.userId = object.userId ?? 0; - message.regionId = object.regionId ?? 0; - message.name = object.name ?? ""; - message.manufacturer = object.manufacturer ?? 0; - message.model = object.model ?? 0; - message.visualModel = object.visualModel ?? 0; - message.defaultColor = object.defaultColor ?? 0; - message.customColor = object.customColor ?? 0; - message.wheel = object.wheel ?? 0; - message.wheelColor = object.wheelColor ?? 0; - message.aero = object.aero ?? 0; - message.bonnet = object.bonnet ?? 0; - message.wing = object.wing ?? 0; - message.gtWing = - object.gtWing !== undefined && object.gtWing !== null - ? GTWing.fromPartial(object.gtWing) - : undefined; - message.mirror = object.mirror ?? 0; - message.neon = object.neon ?? 0; - message.trunk = object.trunk ?? 0; - message.plate = object.plate ?? 0; - message.plateColor = object.plateColor ?? 0; - message.plateNumber = object.plateNumber ?? 0; - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.title = object.title ?? ""; - message.level = object.level ?? 0; - message.windowSticker = object.windowSticker ?? false; - message.windowStickerString = object.windowStickerString ?? ""; - message.windowStickerFont = object.windowStickerFont ?? 0; - message.windowDecoration = object.windowDecoration ?? 0; - message.rivalMarker = object.rivalMarker ?? 0; - message.lastPlayedAt = object.lastPlayedAt ?? 0; - message.lastPlayedPlace = - object.lastPlayedPlace !== undefined && object.lastPlayedPlace !== null - ? Place.fromPartial(object.lastPlayedPlace) - : undefined; - message.aura = object.aura ?? 0; - message.auraMotif = object.auraMotif ?? 0; - message.ghostLevel = object.ghostLevel ?? 0; - message.country = object.country ?? ""; - message.searchCode = object.searchCode ?? ""; - return message; - }, -}; - -function createBaseCarSetting(): CarSetting { - return { - carId: 0, - view: false, - transmission: false, - retire: false, - meter: 0, - navigationMap: false, - volume: 0, - bgm: 0, - nameplate: 0, - nameplateColor: 0, - terminalBackground: 0, - }; -} - -export const CarSetting = { - encode( - message: CarSetting, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.view === true) { - writer.uint32(16).bool(message.view); - } - if (message.transmission === true) { - writer.uint32(24).bool(message.transmission); - } - if (message.retire === true) { - writer.uint32(32).bool(message.retire); - } - if (message.meter !== 0) { - writer.uint32(40).uint32(message.meter); - } - if (message.navigationMap === true) { - writer.uint32(48).bool(message.navigationMap); - } - if (message.volume !== 0) { - writer.uint32(56).uint32(message.volume); - } - if (message.bgm !== 0) { - writer.uint32(64).uint32(message.bgm); - } - if (message.nameplate !== 0) { - writer.uint32(72).uint32(message.nameplate); - } - if (message.nameplateColor !== 0) { - writer.uint32(80).uint32(message.nameplateColor); - } - if (message.terminalBackground !== 0) { - writer.uint32(104).uint32(message.terminalBackground); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CarSetting { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCarSetting(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.view = reader.bool(); - break; - case 3: - message.transmission = reader.bool(); - break; - case 4: - message.retire = reader.bool(); - break; - case 5: - message.meter = reader.uint32(); - break; - case 6: - message.navigationMap = reader.bool(); - break; - case 7: - message.volume = reader.uint32(); - break; - case 8: - message.bgm = reader.uint32(); - break; - case 9: - message.nameplate = reader.uint32(); - break; - case 10: - message.nameplateColor = reader.uint32(); - break; - case 13: - message.terminalBackground = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CarSetting { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - view: isSet(object.view) ? Boolean(object.view) : false, - transmission: isSet(object.transmission) - ? Boolean(object.transmission) - : false, - retire: isSet(object.retire) ? Boolean(object.retire) : false, - meter: isSet(object.meter) ? Number(object.meter) : 0, - navigationMap: isSet(object.navigationMap) - ? Boolean(object.navigationMap) - : false, - volume: isSet(object.volume) ? Number(object.volume) : 0, - bgm: isSet(object.bgm) ? Number(object.bgm) : 0, - nameplate: isSet(object.nameplate) ? Number(object.nameplate) : 0, - nameplateColor: isSet(object.nameplateColor) - ? Number(object.nameplateColor) - : 0, - terminalBackground: isSet(object.terminalBackground) - ? Number(object.terminalBackground) - : 0, - }; - }, - - toJSON(message: CarSetting): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.view !== undefined && (obj.view = message.view); - message.transmission !== undefined && - (obj.transmission = message.transmission); - message.retire !== undefined && (obj.retire = message.retire); - message.meter !== undefined && (obj.meter = Math.round(message.meter)); - message.navigationMap !== undefined && - (obj.navigationMap = message.navigationMap); - message.volume !== undefined && (obj.volume = Math.round(message.volume)); - message.bgm !== undefined && (obj.bgm = Math.round(message.bgm)); - message.nameplate !== undefined && - (obj.nameplate = Math.round(message.nameplate)); - message.nameplateColor !== undefined && - (obj.nameplateColor = Math.round(message.nameplateColor)); - message.terminalBackground !== undefined && - (obj.terminalBackground = Math.round(message.terminalBackground)); - return obj; - }, - - fromPartial, I>>( - object: I - ): CarSetting { - const message = createBaseCarSetting(); - message.carId = object.carId ?? 0; - message.view = object.view ?? false; - message.transmission = object.transmission ?? false; - message.retire = object.retire ?? false; - message.meter = object.meter ?? 0; - message.navigationMap = object.navigationMap ?? false; - message.volume = object.volume ?? 0; - message.bgm = object.bgm ?? 0; - message.nameplate = object.nameplate ?? 0; - message.nameplateColor = object.nameplateColor ?? 0; - message.terminalBackground = object.terminalBackground ?? 0; - return message; - }, -}; - -function createBaseGTWing(): GTWing { - return { - pillar: 0, - pillarMaterial: 0, - mainWing: 0, - mainWingColor: 0, - wingTip: 0, - material: 0, - }; -} - -export const GTWing = { - encode( - message: GTWing, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.pillar !== 0) { - writer.uint32(8).uint32(message.pillar); - } - if (message.pillarMaterial !== 0) { - writer.uint32(16).uint32(message.pillarMaterial); - } - if (message.mainWing !== 0) { - writer.uint32(24).uint32(message.mainWing); - } - if (message.mainWingColor !== 0) { - writer.uint32(32).uint32(message.mainWingColor); - } - if (message.wingTip !== 0) { - writer.uint32(40).uint32(message.wingTip); - } - if (message.material !== 0) { - writer.uint32(48).uint32(message.material); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GTWing { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGTWing(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pillar = reader.uint32(); - break; - case 2: - message.pillarMaterial = reader.uint32(); - break; - case 3: - message.mainWing = reader.uint32(); - break; - case 4: - message.mainWingColor = reader.uint32(); - break; - case 5: - message.wingTip = reader.uint32(); - break; - case 6: - message.material = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GTWing { - return { - pillar: isSet(object.pillar) ? Number(object.pillar) : 0, - pillarMaterial: isSet(object.pillarMaterial) - ? Number(object.pillarMaterial) - : 0, - mainWing: isSet(object.mainWing) ? Number(object.mainWing) : 0, - mainWingColor: isSet(object.mainWingColor) - ? Number(object.mainWingColor) - : 0, - wingTip: isSet(object.wingTip) ? Number(object.wingTip) : 0, - material: isSet(object.material) ? Number(object.material) : 0, - }; - }, - - toJSON(message: GTWing): unknown { - const obj: any = {}; - message.pillar !== undefined && (obj.pillar = Math.round(message.pillar)); - message.pillarMaterial !== undefined && - (obj.pillarMaterial = Math.round(message.pillarMaterial)); - message.mainWing !== undefined && - (obj.mainWing = Math.round(message.mainWing)); - message.mainWingColor !== undefined && - (obj.mainWingColor = Math.round(message.mainWingColor)); - message.wingTip !== undefined && - (obj.wingTip = Math.round(message.wingTip)); - message.material !== undefined && - (obj.material = Math.round(message.material)); - return obj; - }, - - fromPartial, I>>(object: I): GTWing { - const message = createBaseGTWing(); - message.pillar = object.pillar ?? 0; - message.pillarMaterial = object.pillarMaterial ?? 0; - message.mainWing = object.mainWing ?? 0; - message.mainWingColor = object.mainWingColor ?? 0; - message.wingTip = object.wingTip ?? 0; - message.material = object.material ?? 0; - return message; - }, -}; - -function createBaseCarItem(): CarItem { - return { category: 1, itemId: 0, amount: 0 }; -} - -export const CarItem = { - encode( - message: CarItem, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.category !== 1) { - writer.uint32(8).int32(message.category); - } - if (message.itemId !== 0) { - writer.uint32(16).uint32(message.itemId); - } - if (message.amount !== 0) { - writer.uint32(24).uint32(message.amount); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CarItem { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCarItem(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.category = reader.int32() as any; - break; - case 2: - message.itemId = reader.uint32(); - break; - case 3: - message.amount = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CarItem { - return { - category: isSet(object.category) - ? itemCategoryFromJSON(object.category) - : 1, - itemId: isSet(object.itemId) ? Number(object.itemId) : 0, - amount: isSet(object.amount) ? Number(object.amount) : 0, - }; - }, - - toJSON(message: CarItem): unknown { - const obj: any = {}; - message.category !== undefined && - (obj.category = itemCategoryToJSON(message.category)); - message.itemId !== undefined && (obj.itemId = Math.round(message.itemId)); - message.amount !== undefined && (obj.amount = Math.round(message.amount)); - return obj; - }, - - fromPartial, I>>(object: I): CarItem { - const message = createBaseCarItem(); - message.category = object.category ?? 1; - message.itemId = object.itemId ?? 0; - message.amount = object.amount ?? 0; - return message; - }, -}; - -function createBaseCopiedCar(): CopiedCar { - return { car: undefined, remainingPlayCounts: 0 }; -} - -export const CopiedCar = { - encode( - message: CopiedCar, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(10).fork()).ldelim(); - } - if (message.remainingPlayCounts !== 0) { - writer.uint32(16).uint32(message.remainingPlayCounts); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CopiedCar { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCopiedCar(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.car = Car.decode(reader, reader.uint32()); - break; - case 2: - message.remainingPlayCounts = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CopiedCar { - return { - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - remainingPlayCounts: isSet(object.remainingPlayCounts) - ? Number(object.remainingPlayCounts) - : 0, - }; - }, - - toJSON(message: CopiedCar): unknown { - const obj: any = {}; - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - message.remainingPlayCounts !== undefined && - (obj.remainingPlayCounts = Math.round(message.remainingPlayCounts)); - return obj; - }, - - fromPartial, I>>( - object: I - ): CopiedCar { - const message = createBaseCopiedCar(); - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - message.remainingPlayCounts = object.remainingPlayCounts ?? 0; - return message; - }, -}; - -function createBaseFriendCar(): FriendCar { - return { car: undefined, friendshipLevel: 0, nonhuman: false }; -} - -export const FriendCar = { - encode( - message: FriendCar, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(10).fork()).ldelim(); - } - if (message.friendshipLevel !== 0) { - writer.uint32(16).uint32(message.friendshipLevel); - } - if (message.nonhuman === true) { - writer.uint32(24).bool(message.nonhuman); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FriendCar { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFriendCar(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.car = Car.decode(reader, reader.uint32()); - break; - case 2: - message.friendshipLevel = reader.uint32(); - break; - case 3: - message.nonhuman = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FriendCar { - return { - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - friendshipLevel: isSet(object.friendshipLevel) - ? Number(object.friendshipLevel) - : 0, - nonhuman: isSet(object.nonhuman) ? Boolean(object.nonhuman) : false, - }; - }, - - toJSON(message: FriendCar): unknown { - const obj: any = {}; - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - message.friendshipLevel !== undefined && - (obj.friendshipLevel = Math.round(message.friendshipLevel)); - message.nonhuman !== undefined && (obj.nonhuman = message.nonhuman); - return obj; - }, - - fromPartial, I>>( - object: I - ): FriendCar { - const message = createBaseFriendCar(); - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - message.friendshipLevel = object.friendshipLevel ?? 0; - message.nonhuman = object.nonhuman ?? false; - return message; - }, -}; - -function createBaseChallengerCar(): ChallengerCar { - return { car: undefined, stamp: 0, result: 0, area: 0 }; -} - -export const ChallengerCar = { - encode( - message: ChallengerCar, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(10).fork()).ldelim(); - } - if (message.stamp !== 0) { - writer.uint32(24).uint32(message.stamp); - } - if (message.result !== 0) { - writer.uint32(32).sint32(message.result); - } - if (message.area !== 0) { - writer.uint32(40).uint32(message.area); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ChallengerCar { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChallengerCar(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.car = Car.decode(reader, reader.uint32()); - break; - case 3: - message.stamp = reader.uint32(); - break; - case 4: - message.result = reader.sint32(); - break; - case 5: - message.area = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ChallengerCar { - return { - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - stamp: isSet(object.stamp) ? Number(object.stamp) : 0, - result: isSet(object.result) ? Number(object.result) : 0, - area: isSet(object.area) ? Number(object.area) : 0, - }; - }, - - toJSON(message: ChallengerCar): unknown { - const obj: any = {}; - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - message.stamp !== undefined && (obj.stamp = Math.round(message.stamp)); - message.result !== undefined && (obj.result = Math.round(message.result)); - message.area !== undefined && (obj.area = Math.round(message.area)); - return obj; - }, - - fromPartial, I>>( - object: I - ): ChallengerCar { - const message = createBaseChallengerCar(); - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - message.stamp = object.stamp ?? 0; - message.result = object.result ?? 0; - message.area = object.area ?? 0; - return message; - }, -}; - -function createBaseStampTargetCar(): StampTargetCar { - return { car: undefined, returnCount: 0, locked: false, recommended: false }; -} - -export const StampTargetCar = { - encode( - message: StampTargetCar, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(10).fork()).ldelim(); - } - if (message.returnCount !== 0) { - writer.uint32(16).uint32(message.returnCount); - } - if (message.locked === true) { - writer.uint32(24).bool(message.locked); - } - if (message.recommended === true) { - writer.uint32(32).bool(message.recommended); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): StampTargetCar { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStampTargetCar(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.car = Car.decode(reader, reader.uint32()); - break; - case 2: - message.returnCount = reader.uint32(); - break; - case 3: - message.locked = reader.bool(); - break; - case 4: - message.recommended = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): StampTargetCar { - return { - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - returnCount: isSet(object.returnCount) ? Number(object.returnCount) : 0, - locked: isSet(object.locked) ? Boolean(object.locked) : false, - recommended: isSet(object.recommended) - ? Boolean(object.recommended) - : false, - }; - }, - - toJSON(message: StampTargetCar): unknown { - const obj: any = {}; - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - message.returnCount !== undefined && - (obj.returnCount = Math.round(message.returnCount)); - message.locked !== undefined && (obj.locked = message.locked); - message.recommended !== undefined && - (obj.recommended = message.recommended); - return obj; - }, - - fromPartial, I>>( - object: I - ): StampTargetCar { - const message = createBaseStampTargetCar(); - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - message.returnCount = object.returnCount ?? 0; - message.locked = object.locked ?? false; - message.recommended = object.recommended ?? false; - return message; - }, -}; - -function createBaseBookmarkedCar(): BookmarkedCar { - return { car: undefined, returnCount: 0 }; -} - -export const BookmarkedCar = { - encode( - message: BookmarkedCar, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(10).fork()).ldelim(); - } - if (message.returnCount !== 0) { - writer.uint32(16).uint32(message.returnCount); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): BookmarkedCar { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBookmarkedCar(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.car = Car.decode(reader, reader.uint32()); - break; - case 2: - message.returnCount = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BookmarkedCar { - return { - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - returnCount: isSet(object.returnCount) ? Number(object.returnCount) : 0, - }; - }, - - toJSON(message: BookmarkedCar): unknown { - const obj: any = {}; - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - message.returnCount !== undefined && - (obj.returnCount = Math.round(message.returnCount)); - return obj; - }, - - fromPartial, I>>( - object: I - ): BookmarkedCar { - const message = createBaseBookmarkedCar(); - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - message.returnCount = object.returnCount ?? 0; - return message; - }, -}; - -function createBasePreviousVersionStampTargetCar(): PreviousVersionStampTargetCar { - return { car: undefined, returnCount: 0, currentCarId: 0 }; -} - -export const PreviousVersionStampTargetCar = { - encode( - message: PreviousVersionStampTargetCar, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(10).fork()).ldelim(); - } - if (message.returnCount !== 0) { - writer.uint32(24).uint32(message.returnCount); - } - if (message.currentCarId !== 0) { - writer.uint32(16).uint32(message.currentCarId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): PreviousVersionStampTargetCar { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePreviousVersionStampTargetCar(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.car = Car.decode(reader, reader.uint32()); - break; - case 3: - message.returnCount = reader.uint32(); - break; - case 2: - message.currentCarId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PreviousVersionStampTargetCar { - return { - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - returnCount: isSet(object.returnCount) ? Number(object.returnCount) : 0, - currentCarId: isSet(object.currentCarId) - ? Number(object.currentCarId) - : 0, - }; - }, - - toJSON(message: PreviousVersionStampTargetCar): unknown { - const obj: any = {}; - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - message.returnCount !== undefined && - (obj.returnCount = Math.round(message.returnCount)); - message.currentCarId !== undefined && - (obj.currentCarId = Math.round(message.currentCarId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): PreviousVersionStampTargetCar { - const message = createBasePreviousVersionStampTargetCar(); - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - message.returnCount = object.returnCount ?? 0; - message.currentCarId = object.currentCarId ?? 0; - return message; - }, -}; - -function createBaseGhostCar(): GhostCar { - return { - car: undefined, - area: 0, - ramp: 0, - path: 0, - nonhuman: false, - type: 1, - trailId: 0, - }; -} - -export const GhostCar = { - encode( - message: GhostCar, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.car !== undefined) { - Car.encode(message.car, writer.uint32(10).fork()).ldelim(); - } - if (message.area !== 0) { - writer.uint32(16).uint32(message.area); - } - if (message.ramp !== 0) { - writer.uint32(24).uint32(message.ramp); - } - if (message.path !== 0) { - writer.uint32(64).uint32(message.path); - } - if (message.nonhuman === true) { - writer.uint32(32).bool(message.nonhuman); - } - if (message.type !== 1) { - writer.uint32(48).int32(message.type); - } - if (message.trailId !== 0) { - writer.uint32(56).uint64(message.trailId); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GhostCar { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGhostCar(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.car = Car.decode(reader, reader.uint32()); - break; - case 2: - message.area = reader.uint32(); - break; - case 3: - message.ramp = reader.uint32(); - break; - case 8: - message.path = reader.uint32(); - break; - case 4: - message.nonhuman = reader.bool(); - break; - case 6: - message.type = reader.int32() as any; - break; - case 7: - message.trailId = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GhostCar { - return { - car: isSet(object.car) ? Car.fromJSON(object.car) : undefined, - area: isSet(object.area) ? Number(object.area) : 0, - ramp: isSet(object.ramp) ? Number(object.ramp) : 0, - path: isSet(object.path) ? Number(object.path) : 0, - nonhuman: isSet(object.nonhuman) ? Boolean(object.nonhuman) : false, - type: isSet(object.type) ? ghostTypeFromJSON(object.type) : 1, - trailId: isSet(object.trailId) ? Number(object.trailId) : 0, - }; - }, - - toJSON(message: GhostCar): unknown { - const obj: any = {}; - message.car !== undefined && - (obj.car = message.car ? Car.toJSON(message.car) : undefined); - message.area !== undefined && (obj.area = Math.round(message.area)); - message.ramp !== undefined && (obj.ramp = Math.round(message.ramp)); - message.path !== undefined && (obj.path = Math.round(message.path)); - message.nonhuman !== undefined && (obj.nonhuman = message.nonhuman); - message.type !== undefined && (obj.type = ghostTypeToJSON(message.type)); - message.trailId !== undefined && - (obj.trailId = Math.round(message.trailId)); - return obj; - }, - - fromPartial, I>>(object: I): GhostCar { - const message = createBaseGhostCar(); - message.car = - object.car !== undefined && object.car !== null - ? Car.fromPartial(object.car) - : undefined; - message.area = object.area ?? 0; - message.ramp = object.ramp ?? 0; - message.path = object.path ?? 0; - message.nonhuman = object.nonhuman ?? false; - message.type = object.type ?? 1; - message.trailId = object.trailId ?? 0; - return message; - }, -}; - -function createBasePlace(): Place { - return { placeId: "", shopName: "", regionId: 0, country: "" }; -} - -export const Place = { - encode(message: Place, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - writer.uint32(10).string(message.placeId); - writer.uint32(18).string(message.shopName); - writer.uint32(24).uint32(message.regionId); - writer.uint32(34).string(message.country); - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Place { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePlace(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.placeId = reader.string(); - break; - case 2: - message.shopName = reader.string(); - break; - case 3: - message.regionId = reader.uint32(); - break; - case 4: - message.country = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Place { - return { - placeId: isSet(object.placeId) ? String(object.placeId) : "", - shopName: isSet(object.shopName) ? String(object.shopName) : "", - regionId: isSet(object.regionId) ? Number(object.regionId) : 0, - country: isSet(object.country) ? String(object.country) : "", - }; - }, - - toJSON(message: Place): unknown { - const obj: any = {}; - message.placeId !== undefined && (obj.placeId = message.placeId); - message.shopName !== undefined && (obj.shopName = message.shopName); - message.regionId !== undefined && - (obj.regionId = Math.round(message.regionId)); - message.country !== undefined && (obj.country = message.country); - return obj; - }, - - fromPartial, I>>(object: I): Place { - const message = createBasePlace(); - message.placeId = object.placeId ?? ""; - message.shopName = object.shopName ?? ""; - message.regionId = object.regionId ?? 0; - message.country = object.country ?? ""; - return message; - }, -}; - -function createBaseSystemSetting(): SystemSetting { - return { - mCoinChute: 0, - mBuyCardCost: 0, - mGameCost: 0, - mContinueCost: 0, - mFullCourseCost: 0, - mFreePlay: false, - mPcbId: 0, - mIcCardRw: false, - mIcCardVender: false, - mMgCardRw: false, - mForceFeedback: false, - mWinsAndRemains: false, - mEventMode: 0, - mEventModeDist: false, - mCloseType: 0, - mCloseSun: 0, - mCloseMon: 0, - mCloseTue: 0, - mCloseWed: 0, - mCloseThu: 0, - mCloseFri: 0, - mCloseSat: 0, - mCloseDay: 0, - mTouchPanel: false, - mGameVol: 0, - mAttractVol: 0, - mCalibHandleCenter: 0, - mCalibAccelCenter: 0, - mCalibBrakeCenter: 0, - mCalibTouchLeft: 0, - mCalibTouchRight: 0, - mCalibTouchTop: 0, - mCalibTouchBottom: 0, - }; -} - -export const SystemSetting = { - encode( - message: SystemSetting, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.mCoinChute !== 0) { - writer.uint32(8).uint32(message.mCoinChute); - } - if (message.mBuyCardCost !== 0) { - writer.uint32(16).uint32(message.mBuyCardCost); - } - if (message.mGameCost !== 0) { - writer.uint32(24).uint32(message.mGameCost); - } - if (message.mContinueCost !== 0) { - writer.uint32(32).uint32(message.mContinueCost); - } - if (message.mFullCourseCost !== 0) { - writer.uint32(40).uint32(message.mFullCourseCost); - } - if (message.mFreePlay === true) { - writer.uint32(48).bool(message.mFreePlay); - } - if (message.mPcbId !== 0) { - writer.uint32(56).uint32(message.mPcbId); - } - if (message.mIcCardRw === true) { - writer.uint32(64).bool(message.mIcCardRw); - } - if (message.mIcCardVender === true) { - writer.uint32(72).bool(message.mIcCardVender); - } - if (message.mMgCardRw === true) { - writer.uint32(80).bool(message.mMgCardRw); - } - if (message.mForceFeedback === true) { - writer.uint32(88).bool(message.mForceFeedback); - } - if (message.mWinsAndRemains === true) { - writer.uint32(96).bool(message.mWinsAndRemains); - } - if (message.mEventMode !== 0) { - writer.uint32(104).uint32(message.mEventMode); - } - if (message.mEventModeDist === true) { - writer.uint32(112).bool(message.mEventModeDist); - } - if (message.mCloseType !== 0) { - writer.uint32(120).uint32(message.mCloseType); - } - if (message.mCloseSun !== 0) { - writer.uint32(128).uint32(message.mCloseSun); - } - if (message.mCloseMon !== 0) { - writer.uint32(136).uint32(message.mCloseMon); - } - if (message.mCloseTue !== 0) { - writer.uint32(144).uint32(message.mCloseTue); - } - if (message.mCloseWed !== 0) { - writer.uint32(152).uint32(message.mCloseWed); - } - if (message.mCloseThu !== 0) { - writer.uint32(160).uint32(message.mCloseThu); - } - if (message.mCloseFri !== 0) { - writer.uint32(168).uint32(message.mCloseFri); - } - if (message.mCloseSat !== 0) { - writer.uint32(176).uint32(message.mCloseSat); - } - if (message.mCloseDay !== 0) { - writer.uint32(184).uint32(message.mCloseDay); - } - if (message.mTouchPanel === true) { - writer.uint32(192).bool(message.mTouchPanel); - } - if (message.mGameVol !== 0) { - writer.uint32(200).uint32(message.mGameVol); - } - if (message.mAttractVol !== 0) { - writer.uint32(208).uint32(message.mAttractVol); - } - if (message.mCalibHandleCenter !== 0) { - writer.uint32(216).uint32(message.mCalibHandleCenter); - } - if (message.mCalibAccelCenter !== 0) { - writer.uint32(224).uint32(message.mCalibAccelCenter); - } - if (message.mCalibBrakeCenter !== 0) { - writer.uint32(232).uint32(message.mCalibBrakeCenter); - } - if (message.mCalibTouchLeft !== 0) { - writer.uint32(240).uint32(message.mCalibTouchLeft); - } - if (message.mCalibTouchRight !== 0) { - writer.uint32(248).uint32(message.mCalibTouchRight); - } - if (message.mCalibTouchTop !== 0) { - writer.uint32(256).uint32(message.mCalibTouchTop); - } - if (message.mCalibTouchBottom !== 0) { - writer.uint32(264).uint32(message.mCalibTouchBottom); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SystemSetting { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSystemSetting(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mCoinChute = reader.uint32(); - break; - case 2: - message.mBuyCardCost = reader.uint32(); - break; - case 3: - message.mGameCost = reader.uint32(); - break; - case 4: - message.mContinueCost = reader.uint32(); - break; - case 5: - message.mFullCourseCost = reader.uint32(); - break; - case 6: - message.mFreePlay = reader.bool(); - break; - case 7: - message.mPcbId = reader.uint32(); - break; - case 8: - message.mIcCardRw = reader.bool(); - break; - case 9: - message.mIcCardVender = reader.bool(); - break; - case 10: - message.mMgCardRw = reader.bool(); - break; - case 11: - message.mForceFeedback = reader.bool(); - break; - case 12: - message.mWinsAndRemains = reader.bool(); - break; - case 13: - message.mEventMode = reader.uint32(); - break; - case 14: - message.mEventModeDist = reader.bool(); - break; - case 15: - message.mCloseType = reader.uint32(); - break; - case 16: - message.mCloseSun = reader.uint32(); - break; - case 17: - message.mCloseMon = reader.uint32(); - break; - case 18: - message.mCloseTue = reader.uint32(); - break; - case 19: - message.mCloseWed = reader.uint32(); - break; - case 20: - message.mCloseThu = reader.uint32(); - break; - case 21: - message.mCloseFri = reader.uint32(); - break; - case 22: - message.mCloseSat = reader.uint32(); - break; - case 23: - message.mCloseDay = reader.uint32(); - break; - case 24: - message.mTouchPanel = reader.bool(); - break; - case 25: - message.mGameVol = reader.uint32(); - break; - case 26: - message.mAttractVol = reader.uint32(); - break; - case 27: - message.mCalibHandleCenter = reader.uint32(); - break; - case 28: - message.mCalibAccelCenter = reader.uint32(); - break; - case 29: - message.mCalibBrakeCenter = reader.uint32(); - break; - case 30: - message.mCalibTouchLeft = reader.uint32(); - break; - case 31: - message.mCalibTouchRight = reader.uint32(); - break; - case 32: - message.mCalibTouchTop = reader.uint32(); - break; - case 33: - message.mCalibTouchBottom = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SystemSetting { - return { - mCoinChute: isSet(object.mCoinChute) ? Number(object.mCoinChute) : 0, - mBuyCardCost: isSet(object.mBuyCardCost) - ? Number(object.mBuyCardCost) - : 0, - mGameCost: isSet(object.mGameCost) ? Number(object.mGameCost) : 0, - mContinueCost: isSet(object.mContinueCost) - ? Number(object.mContinueCost) - : 0, - mFullCourseCost: isSet(object.mFullCourseCost) - ? Number(object.mFullCourseCost) - : 0, - mFreePlay: isSet(object.mFreePlay) ? Boolean(object.mFreePlay) : false, - mPcbId: isSet(object.mPcbId) ? Number(object.mPcbId) : 0, - mIcCardRw: isSet(object.mIcCardRw) ? Boolean(object.mIcCardRw) : false, - mIcCardVender: isSet(object.mIcCardVender) - ? Boolean(object.mIcCardVender) - : false, - mMgCardRw: isSet(object.mMgCardRw) ? Boolean(object.mMgCardRw) : false, - mForceFeedback: isSet(object.mForceFeedback) - ? Boolean(object.mForceFeedback) - : false, - mWinsAndRemains: isSet(object.mWinsAndRemains) - ? Boolean(object.mWinsAndRemains) - : false, - mEventMode: isSet(object.mEventMode) ? Number(object.mEventMode) : 0, - mEventModeDist: isSet(object.mEventModeDist) - ? Boolean(object.mEventModeDist) - : false, - mCloseType: isSet(object.mCloseType) ? Number(object.mCloseType) : 0, - mCloseSun: isSet(object.mCloseSun) ? Number(object.mCloseSun) : 0, - mCloseMon: isSet(object.mCloseMon) ? Number(object.mCloseMon) : 0, - mCloseTue: isSet(object.mCloseTue) ? Number(object.mCloseTue) : 0, - mCloseWed: isSet(object.mCloseWed) ? Number(object.mCloseWed) : 0, - mCloseThu: isSet(object.mCloseThu) ? Number(object.mCloseThu) : 0, - mCloseFri: isSet(object.mCloseFri) ? Number(object.mCloseFri) : 0, - mCloseSat: isSet(object.mCloseSat) ? Number(object.mCloseSat) : 0, - mCloseDay: isSet(object.mCloseDay) ? Number(object.mCloseDay) : 0, - mTouchPanel: isSet(object.mTouchPanel) - ? Boolean(object.mTouchPanel) - : false, - mGameVol: isSet(object.mGameVol) ? Number(object.mGameVol) : 0, - mAttractVol: isSet(object.mAttractVol) ? Number(object.mAttractVol) : 0, - mCalibHandleCenter: isSet(object.mCalibHandleCenter) - ? Number(object.mCalibHandleCenter) - : 0, - mCalibAccelCenter: isSet(object.mCalibAccelCenter) - ? Number(object.mCalibAccelCenter) - : 0, - mCalibBrakeCenter: isSet(object.mCalibBrakeCenter) - ? Number(object.mCalibBrakeCenter) - : 0, - mCalibTouchLeft: isSet(object.mCalibTouchLeft) - ? Number(object.mCalibTouchLeft) - : 0, - mCalibTouchRight: isSet(object.mCalibTouchRight) - ? Number(object.mCalibTouchRight) - : 0, - mCalibTouchTop: isSet(object.mCalibTouchTop) - ? Number(object.mCalibTouchTop) - : 0, - mCalibTouchBottom: isSet(object.mCalibTouchBottom) - ? Number(object.mCalibTouchBottom) - : 0, - }; - }, - - toJSON(message: SystemSetting): unknown { - const obj: any = {}; - message.mCoinChute !== undefined && - (obj.mCoinChute = Math.round(message.mCoinChute)); - message.mBuyCardCost !== undefined && - (obj.mBuyCardCost = Math.round(message.mBuyCardCost)); - message.mGameCost !== undefined && - (obj.mGameCost = Math.round(message.mGameCost)); - message.mContinueCost !== undefined && - (obj.mContinueCost = Math.round(message.mContinueCost)); - message.mFullCourseCost !== undefined && - (obj.mFullCourseCost = Math.round(message.mFullCourseCost)); - message.mFreePlay !== undefined && (obj.mFreePlay = message.mFreePlay); - message.mPcbId !== undefined && (obj.mPcbId = Math.round(message.mPcbId)); - message.mIcCardRw !== undefined && (obj.mIcCardRw = message.mIcCardRw); - message.mIcCardVender !== undefined && - (obj.mIcCardVender = message.mIcCardVender); - message.mMgCardRw !== undefined && (obj.mMgCardRw = message.mMgCardRw); - message.mForceFeedback !== undefined && - (obj.mForceFeedback = message.mForceFeedback); - message.mWinsAndRemains !== undefined && - (obj.mWinsAndRemains = message.mWinsAndRemains); - message.mEventMode !== undefined && - (obj.mEventMode = Math.round(message.mEventMode)); - message.mEventModeDist !== undefined && - (obj.mEventModeDist = message.mEventModeDist); - message.mCloseType !== undefined && - (obj.mCloseType = Math.round(message.mCloseType)); - message.mCloseSun !== undefined && - (obj.mCloseSun = Math.round(message.mCloseSun)); - message.mCloseMon !== undefined && - (obj.mCloseMon = Math.round(message.mCloseMon)); - message.mCloseTue !== undefined && - (obj.mCloseTue = Math.round(message.mCloseTue)); - message.mCloseWed !== undefined && - (obj.mCloseWed = Math.round(message.mCloseWed)); - message.mCloseThu !== undefined && - (obj.mCloseThu = Math.round(message.mCloseThu)); - message.mCloseFri !== undefined && - (obj.mCloseFri = Math.round(message.mCloseFri)); - message.mCloseSat !== undefined && - (obj.mCloseSat = Math.round(message.mCloseSat)); - message.mCloseDay !== undefined && - (obj.mCloseDay = Math.round(message.mCloseDay)); - message.mTouchPanel !== undefined && - (obj.mTouchPanel = message.mTouchPanel); - message.mGameVol !== undefined && - (obj.mGameVol = Math.round(message.mGameVol)); - message.mAttractVol !== undefined && - (obj.mAttractVol = Math.round(message.mAttractVol)); - message.mCalibHandleCenter !== undefined && - (obj.mCalibHandleCenter = Math.round(message.mCalibHandleCenter)); - message.mCalibAccelCenter !== undefined && - (obj.mCalibAccelCenter = Math.round(message.mCalibAccelCenter)); - message.mCalibBrakeCenter !== undefined && - (obj.mCalibBrakeCenter = Math.round(message.mCalibBrakeCenter)); - message.mCalibTouchLeft !== undefined && - (obj.mCalibTouchLeft = Math.round(message.mCalibTouchLeft)); - message.mCalibTouchRight !== undefined && - (obj.mCalibTouchRight = Math.round(message.mCalibTouchRight)); - message.mCalibTouchTop !== undefined && - (obj.mCalibTouchTop = Math.round(message.mCalibTouchTop)); - message.mCalibTouchBottom !== undefined && - (obj.mCalibTouchBottom = Math.round(message.mCalibTouchBottom)); - return obj; - }, - - fromPartial, I>>( - object: I - ): SystemSetting { - const message = createBaseSystemSetting(); - message.mCoinChute = object.mCoinChute ?? 0; - message.mBuyCardCost = object.mBuyCardCost ?? 0; - message.mGameCost = object.mGameCost ?? 0; - message.mContinueCost = object.mContinueCost ?? 0; - message.mFullCourseCost = object.mFullCourseCost ?? 0; - message.mFreePlay = object.mFreePlay ?? false; - message.mPcbId = object.mPcbId ?? 0; - message.mIcCardRw = object.mIcCardRw ?? false; - message.mIcCardVender = object.mIcCardVender ?? false; - message.mMgCardRw = object.mMgCardRw ?? false; - message.mForceFeedback = object.mForceFeedback ?? false; - message.mWinsAndRemains = object.mWinsAndRemains ?? false; - message.mEventMode = object.mEventMode ?? 0; - message.mEventModeDist = object.mEventModeDist ?? false; - message.mCloseType = object.mCloseType ?? 0; - message.mCloseSun = object.mCloseSun ?? 0; - message.mCloseMon = object.mCloseMon ?? 0; - message.mCloseTue = object.mCloseTue ?? 0; - message.mCloseWed = object.mCloseWed ?? 0; - message.mCloseThu = object.mCloseThu ?? 0; - message.mCloseFri = object.mCloseFri ?? 0; - message.mCloseSat = object.mCloseSat ?? 0; - message.mCloseDay = object.mCloseDay ?? 0; - message.mTouchPanel = object.mTouchPanel ?? false; - message.mGameVol = object.mGameVol ?? 0; - message.mAttractVol = object.mAttractVol ?? 0; - message.mCalibHandleCenter = object.mCalibHandleCenter ?? 0; - message.mCalibAccelCenter = object.mCalibAccelCenter ?? 0; - message.mCalibBrakeCenter = object.mCalibBrakeCenter ?? 0; - message.mCalibTouchLeft = object.mCalibTouchLeft ?? 0; - message.mCalibTouchRight = object.mCalibTouchRight ?? 0; - message.mCalibTouchTop = object.mCalibTouchTop ?? 0; - message.mCalibTouchBottom = object.mCalibTouchBottom ?? 0; - return message; - }, -}; - -function createBaseGhostCompetitionSchedule(): GhostCompetitionSchedule { - return { - competitionId: 0, - qualifyingPeriodStartAt: 0, - qualifyingPeriodCloseAt: 0, - competitionStartAt: 0, - competitionCloseAt: 0, - competitionEndAt: 0, - lengthOfPeriod: 0, - lengthOfInterval: 0, - area: 0, - minigamePatternId: 0, - }; -} - -export const GhostCompetitionSchedule = { - encode( - message: GhostCompetitionSchedule, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.competitionId !== 0) { - writer.uint32(8).uint32(message.competitionId); - } - if (message.qualifyingPeriodStartAt !== 0) { - writer.uint32(16).uint32(message.qualifyingPeriodStartAt); - } - if (message.qualifyingPeriodCloseAt !== 0) { - writer.uint32(24).uint32(message.qualifyingPeriodCloseAt); - } - if (message.competitionStartAt !== 0) { - writer.uint32(32).uint32(message.competitionStartAt); - } - if (message.competitionCloseAt !== 0) { - writer.uint32(40).uint32(message.competitionCloseAt); - } - if (message.competitionEndAt !== 0) { - writer.uint32(48).uint32(message.competitionEndAt); - } - if (message.lengthOfPeriod !== 0) { - writer.uint32(56).uint32(message.lengthOfPeriod); - } - if (message.lengthOfInterval !== 0) { - writer.uint32(64).uint32(message.lengthOfInterval); - } - if (message.area !== 0) { - writer.uint32(72).uint32(message.area); - } - if (message.minigamePatternId !== 0) { - writer.uint32(80).uint32(message.minigamePatternId); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GhostCompetitionSchedule { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGhostCompetitionSchedule(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.competitionId = reader.uint32(); - break; - case 2: - message.qualifyingPeriodStartAt = reader.uint32(); - break; - case 3: - message.qualifyingPeriodCloseAt = reader.uint32(); - break; - case 4: - message.competitionStartAt = reader.uint32(); - break; - case 5: - message.competitionCloseAt = reader.uint32(); - break; - case 6: - message.competitionEndAt = reader.uint32(); - break; - case 7: - message.lengthOfPeriod = reader.uint32(); - break; - case 8: - message.lengthOfInterval = reader.uint32(); - break; - case 9: - message.area = reader.uint32(); - break; - case 10: - message.minigamePatternId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GhostCompetitionSchedule { - return { - competitionId: isSet(object.competitionId) - ? Number(object.competitionId) - : 0, - qualifyingPeriodStartAt: isSet(object.qualifyingPeriodStartAt) - ? Number(object.qualifyingPeriodStartAt) - : 0, - qualifyingPeriodCloseAt: isSet(object.qualifyingPeriodCloseAt) - ? Number(object.qualifyingPeriodCloseAt) - : 0, - competitionStartAt: isSet(object.competitionStartAt) - ? Number(object.competitionStartAt) - : 0, - competitionCloseAt: isSet(object.competitionCloseAt) - ? Number(object.competitionCloseAt) - : 0, - competitionEndAt: isSet(object.competitionEndAt) - ? Number(object.competitionEndAt) - : 0, - lengthOfPeriod: isSet(object.lengthOfPeriod) - ? Number(object.lengthOfPeriod) - : 0, - lengthOfInterval: isSet(object.lengthOfInterval) - ? Number(object.lengthOfInterval) - : 0, - area: isSet(object.area) ? Number(object.area) : 0, - minigamePatternId: isSet(object.minigamePatternId) - ? Number(object.minigamePatternId) - : 0, - }; - }, - - toJSON(message: GhostCompetitionSchedule): unknown { - const obj: any = {}; - message.competitionId !== undefined && - (obj.competitionId = Math.round(message.competitionId)); - message.qualifyingPeriodStartAt !== undefined && - (obj.qualifyingPeriodStartAt = Math.round( - message.qualifyingPeriodStartAt - )); - message.qualifyingPeriodCloseAt !== undefined && - (obj.qualifyingPeriodCloseAt = Math.round( - message.qualifyingPeriodCloseAt - )); - message.competitionStartAt !== undefined && - (obj.competitionStartAt = Math.round(message.competitionStartAt)); - message.competitionCloseAt !== undefined && - (obj.competitionCloseAt = Math.round(message.competitionCloseAt)); - message.competitionEndAt !== undefined && - (obj.competitionEndAt = Math.round(message.competitionEndAt)); - message.lengthOfPeriod !== undefined && - (obj.lengthOfPeriod = Math.round(message.lengthOfPeriod)); - message.lengthOfInterval !== undefined && - (obj.lengthOfInterval = Math.round(message.lengthOfInterval)); - message.area !== undefined && (obj.area = Math.round(message.area)); - message.minigamePatternId !== undefined && - (obj.minigamePatternId = Math.round(message.minigamePatternId)); - return obj; - }, - - fromPartial, I>>( - object: I - ): GhostCompetitionSchedule { - const message = createBaseGhostCompetitionSchedule(); - message.competitionId = object.competitionId ?? 0; - message.qualifyingPeriodStartAt = object.qualifyingPeriodStartAt ?? 0; - message.qualifyingPeriodCloseAt = object.qualifyingPeriodCloseAt ?? 0; - message.competitionStartAt = object.competitionStartAt ?? 0; - message.competitionCloseAt = object.competitionCloseAt ?? 0; - message.competitionEndAt = object.competitionEndAt ?? 0; - message.lengthOfPeriod = object.lengthOfPeriod ?? 0; - message.lengthOfInterval = object.lengthOfInterval ?? 0; - message.area = object.area ?? 0; - message.minigamePatternId = object.minigamePatternId ?? 0; - return message; - }, -}; - -function createBaseGhostCompetitionParameter(): GhostCompetitionParameter { - return { parameters1: [], parameters2: false }; -} - -export const GhostCompetitionParameter = { - encode( - message: GhostCompetitionParameter, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - writer.uint32(10).fork(); - for (const v of message.parameters1) { - writer.float(v); - } - writer.ldelim(); - if (message.parameters2 === true) { - writer.uint32(16).bool(message.parameters2); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GhostCompetitionParameter { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGhostCompetitionParameter(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.parameters1.push(reader.float()); - } - } else { - message.parameters1.push(reader.float()); - } - break; - case 2: - message.parameters2 = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GhostCompetitionParameter { - return { - parameters1: Array.isArray(object?.parameters1) - ? object.parameters1.map((e: any) => Number(e)) - : [], - parameters2: isSet(object.parameters2) - ? Boolean(object.parameters2) - : false, - }; - }, - - toJSON(message: GhostCompetitionParameter): unknown { - const obj: any = {}; - if (message.parameters1) { - obj.parameters1 = message.parameters1.map((e) => e); - } else { - obj.parameters1 = []; - } - message.parameters2 !== undefined && - (obj.parameters2 = message.parameters2); - return obj; - }, - - fromPartial, I>>( - object: I - ): GhostCompetitionParameter { - const message = createBaseGhostCompetitionParameter(); - message.parameters1 = object.parameters1?.map((e) => e) || []; - message.parameters2 = object.parameters2 ?? false; - return message; - }, -}; - -function createBaseTransferNotice(): TransferNotice { - return { - needToSeeTransferred: false, - totalMaxiGold: 0, - numOfPorscheCars: 0, - porscheModels: [], - hasR35: false, - }; -} - -export const TransferNotice = { - encode( - message: TransferNotice, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.needToSeeTransferred === true) { - writer.uint32(8).bool(message.needToSeeTransferred); - } - if (message.totalMaxiGold !== 0) { - writer.uint32(16).uint32(message.totalMaxiGold); - } - if (message.numOfPorscheCars !== 0) { - writer.uint32(24).uint32(message.numOfPorscheCars); - } - writer.uint32(34).fork(); - for (const v of message.porscheModels) { - writer.uint32(v); - } - writer.ldelim(); - if (message.hasR35 === true) { - writer.uint32(40).bool(message.hasR35); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TransferNotice { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTransferNotice(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.needToSeeTransferred = reader.bool(); - break; - case 2: - message.totalMaxiGold = reader.uint32(); - break; - case 3: - message.numOfPorscheCars = reader.uint32(); - break; - case 4: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.porscheModels.push(reader.uint32()); - } - } else { - message.porscheModels.push(reader.uint32()); - } - break; - case 5: - message.hasR35 = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): TransferNotice { - return { - needToSeeTransferred: isSet(object.needToSeeTransferred) - ? Boolean(object.needToSeeTransferred) - : false, - totalMaxiGold: isSet(object.totalMaxiGold) - ? Number(object.totalMaxiGold) - : 0, - numOfPorscheCars: isSet(object.numOfPorscheCars) - ? Number(object.numOfPorscheCars) - : 0, - porscheModels: Array.isArray(object?.porscheModels) - ? object.porscheModels.map((e: any) => Number(e)) - : [], - hasR35: isSet(object.hasR35) ? Boolean(object.hasR35) : false, - }; - }, - - toJSON(message: TransferNotice): unknown { - const obj: any = {}; - message.needToSeeTransferred !== undefined && - (obj.needToSeeTransferred = message.needToSeeTransferred); - message.totalMaxiGold !== undefined && - (obj.totalMaxiGold = Math.round(message.totalMaxiGold)); - message.numOfPorscheCars !== undefined && - (obj.numOfPorscheCars = Math.round(message.numOfPorscheCars)); - if (message.porscheModels) { - obj.porscheModels = message.porscheModels.map((e) => Math.round(e)); - } else { - obj.porscheModels = []; - } - message.hasR35 !== undefined && (obj.hasR35 = message.hasR35); - return obj; - }, - - fromPartial, I>>( - object: I - ): TransferNotice { - const message = createBaseTransferNotice(); - message.needToSeeTransferred = object.needToSeeTransferred ?? false; - message.totalMaxiGold = object.totalMaxiGold ?? 0; - message.numOfPorscheCars = object.numOfPorscheCars ?? 0; - message.porscheModels = object.porscheModels?.map((e) => e) || []; - message.hasR35 = object.hasR35 ?? false; - return message; - }, -}; - -function createBaseGameFeatureVersion(): GameFeatureVersion { - return { version: 0, year: 0, month: 0, pluses: 0, releaseAt: 0 }; -} - -export const GameFeatureVersion = { - encode( - message: GameFeatureVersion, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.version !== 0) { - writer.uint32(8).uint32(message.version); - } - if (message.year !== 0) { - writer.uint32(16).uint32(message.year); - } - if (message.month !== 0) { - writer.uint32(24).uint32(message.month); - } - if (message.pluses !== 0) { - writer.uint32(32).uint32(message.pluses); - } - if (message.releaseAt !== 0) { - writer.uint32(40).uint32(message.releaseAt); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GameFeatureVersion { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGameFeatureVersion(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.uint32(); - break; - case 2: - message.year = reader.uint32(); - break; - case 3: - message.month = reader.uint32(); - break; - case 4: - message.pluses = reader.uint32(); - break; - case 5: - message.releaseAt = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GameFeatureVersion { - return { - version: isSet(object.version) ? Number(object.version) : 0, - year: isSet(object.year) ? Number(object.year) : 0, - month: isSet(object.month) ? Number(object.month) : 0, - pluses: isSet(object.pluses) ? Number(object.pluses) : 0, - releaseAt: isSet(object.releaseAt) ? Number(object.releaseAt) : 0, - }; - }, - - toJSON(message: GameFeatureVersion): unknown { - const obj: any = {}; - message.version !== undefined && - (obj.version = Math.round(message.version)); - message.year !== undefined && (obj.year = Math.round(message.year)); - message.month !== undefined && (obj.month = Math.round(message.month)); - message.pluses !== undefined && (obj.pluses = Math.round(message.pluses)); - message.releaseAt !== undefined && - (obj.releaseAt = Math.round(message.releaseAt)); - return obj; - }, - - fromPartial, I>>( - object: I - ): GameFeatureVersion { - const message = createBaseGameFeatureVersion(); - message.version = object.version ?? 0; - message.year = object.year ?? 0; - message.month = object.month ?? 0; - message.pluses = object.pluses ?? 0; - message.releaseAt = object.releaseAt ?? 0; - return message; - }, -}; - -function createBaseScratchSheet(): ScratchSheet { - return { squares: [] }; -} - -export const ScratchSheet = { - encode( - message: ScratchSheet, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - for (const v of message.squares) { - ScratchSheet_ScratchSquare.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ScratchSheet { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseScratchSheet(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.squares.push( - ScratchSheet_ScratchSquare.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ScratchSheet { - return { - squares: Array.isArray(object?.squares) - ? object.squares.map((e: any) => ScratchSheet_ScratchSquare.fromJSON(e)) - : [], - }; - }, - - toJSON(message: ScratchSheet): unknown { - const obj: any = {}; - if (message.squares) { - obj.squares = message.squares.map((e) => - e ? ScratchSheet_ScratchSquare.toJSON(e) : undefined - ); - } else { - obj.squares = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): ScratchSheet { - const message = createBaseScratchSheet(); - message.squares = - object.squares?.map((e) => ScratchSheet_ScratchSquare.fromPartial(e)) || - []; - return message; - }, -}; - -function createBaseScratchSheet_ScratchSquare(): ScratchSheet_ScratchSquare { - return { category: 1, itemId: 0, earned: false }; -} - -export const ScratchSheet_ScratchSquare = { - encode( - message: ScratchSheet_ScratchSquare, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.category !== 1) { - writer.uint32(8).int32(message.category); - } - if (message.itemId !== 0) { - writer.uint32(16).uint32(message.itemId); - } - if (message.earned === true) { - writer.uint32(24).bool(message.earned); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): ScratchSheet_ScratchSquare { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseScratchSheet_ScratchSquare(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.category = reader.int32() as any; - break; - case 2: - message.itemId = reader.uint32(); - break; - case 3: - message.earned = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ScratchSheet_ScratchSquare { - return { - category: isSet(object.category) - ? itemCategoryFromJSON(object.category) - : 1, - itemId: isSet(object.itemId) ? Number(object.itemId) : 0, - earned: isSet(object.earned) ? Boolean(object.earned) : false, - }; - }, - - toJSON(message: ScratchSheet_ScratchSquare): unknown { - const obj: any = {}; - message.category !== undefined && - (obj.category = itemCategoryToJSON(message.category)); - message.itemId !== undefined && (obj.itemId = Math.round(message.itemId)); - message.earned !== undefined && (obj.earned = message.earned); - return obj; - }, - - fromPartial, I>>( - object: I - ): ScratchSheet_ScratchSquare { - const message = createBaseScratchSheet_ScratchSquare(); - message.category = object.category ?? 1; - message.itemId = object.itemId ?? 0; - message.earned = object.earned ?? false; - return message; - }, -}; - -function createBaseUserItem(): UserItem { - return { category: 1, itemId: 0, userItemId: 0, earnedAt: 0, expireAt: 0 }; -} - -export const UserItem = { - encode( - message: UserItem, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.category !== 1) { - writer.uint32(8).int32(message.category); - } - if (message.itemId !== 0) { - writer.uint32(16).uint32(message.itemId); - } - if (message.userItemId !== 0) { - writer.uint32(24).uint32(message.userItemId); - } - if (message.earnedAt !== 0) { - writer.uint32(32).uint32(message.earnedAt); - } - if (message.expireAt !== 0) { - writer.uint32(40).uint32(message.expireAt); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UserItem { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUserItem(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.category = reader.int32() as any; - break; - case 2: - message.itemId = reader.uint32(); - break; - case 3: - message.userItemId = reader.uint32(); - break; - case 4: - message.earnedAt = reader.uint32(); - break; - case 5: - message.expireAt = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): UserItem { - return { - category: isSet(object.category) - ? itemCategoryFromJSON(object.category) - : 1, - itemId: isSet(object.itemId) ? Number(object.itemId) : 0, - userItemId: isSet(object.userItemId) ? Number(object.userItemId) : 0, - earnedAt: isSet(object.earnedAt) ? Number(object.earnedAt) : 0, - expireAt: isSet(object.expireAt) ? Number(object.expireAt) : 0, - }; - }, - - toJSON(message: UserItem): unknown { - const obj: any = {}; - message.category !== undefined && - (obj.category = itemCategoryToJSON(message.category)); - message.itemId !== undefined && (obj.itemId = Math.round(message.itemId)); - message.userItemId !== undefined && - (obj.userItemId = Math.round(message.userItemId)); - message.earnedAt !== undefined && - (obj.earnedAt = Math.round(message.earnedAt)); - message.expireAt !== undefined && - (obj.expireAt = Math.round(message.expireAt)); - return obj; - }, - - fromPartial, I>>(object: I): UserItem { - const message = createBaseUserItem(); - message.category = object.category ?? 1; - message.itemId = object.itemId ?? 0; - message.userItemId = object.userItemId ?? 0; - message.earnedAt = object.earnedAt ?? 0; - message.expireAt = object.expireAt ?? 0; - return message; - }, -}; - -function createBaseInviteFriendCampaignSchedule(): InviteFriendCampaignSchedule { - return { campaignId: 0, startAt: 0, endAt: 0, couponUnreceivableAt: 0 }; -} - -export const InviteFriendCampaignSchedule = { - encode( - message: InviteFriendCampaignSchedule, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.campaignId !== 0) { - writer.uint32(8).uint32(message.campaignId); - } - if (message.startAt !== 0) { - writer.uint32(16).uint32(message.startAt); - } - if (message.endAt !== 0) { - writer.uint32(24).uint32(message.endAt); - } - if (message.couponUnreceivableAt !== 0) { - writer.uint32(32).uint32(message.couponUnreceivableAt); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): InviteFriendCampaignSchedule { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInviteFriendCampaignSchedule(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.campaignId = reader.uint32(); - break; - case 2: - message.startAt = reader.uint32(); - break; - case 3: - message.endAt = reader.uint32(); - break; - case 4: - message.couponUnreceivableAt = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): InviteFriendCampaignSchedule { - return { - campaignId: isSet(object.campaignId) ? Number(object.campaignId) : 0, - startAt: isSet(object.startAt) ? Number(object.startAt) : 0, - endAt: isSet(object.endAt) ? Number(object.endAt) : 0, - couponUnreceivableAt: isSet(object.couponUnreceivableAt) - ? Number(object.couponUnreceivableAt) - : 0, - }; - }, - - toJSON(message: InviteFriendCampaignSchedule): unknown { - const obj: any = {}; - message.campaignId !== undefined && - (obj.campaignId = Math.round(message.campaignId)); - message.startAt !== undefined && - (obj.startAt = Math.round(message.startAt)); - message.endAt !== undefined && (obj.endAt = Math.round(message.endAt)); - message.couponUnreceivableAt !== undefined && - (obj.couponUnreceivableAt = Math.round(message.couponUnreceivableAt)); - return obj; - }, - - fromPartial, I>>( - object: I - ): InviteFriendCampaignSchedule { - const message = createBaseInviteFriendCampaignSchedule(); - message.campaignId = object.campaignId ?? 0; - message.startAt = object.startAt ?? 0; - message.endAt = object.endAt ?? 0; - message.couponUnreceivableAt = object.couponUnreceivableAt ?? 0; - return message; - }, -}; - -function createBaseCarTuning(): CarTuning { - return { carId: 0, tunePower: 0, tuneHandling: 0, lastPlayedAt: 0 }; -} - -export const CarTuning = { - encode( - message: CarTuning, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.tunePower !== 0) { - writer.uint32(16).uint32(message.tunePower); - } - if (message.tuneHandling !== 0) { - writer.uint32(24).uint32(message.tuneHandling); - } - if (message.lastPlayedAt !== 0) { - writer.uint32(32).uint32(message.lastPlayedAt); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CarTuning { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCarTuning(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.tunePower = reader.uint32(); - break; - case 3: - message.tuneHandling = reader.uint32(); - break; - case 4: - message.lastPlayedAt = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CarTuning { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - tunePower: isSet(object.tunePower) ? Number(object.tunePower) : 0, - tuneHandling: isSet(object.tuneHandling) - ? Number(object.tuneHandling) - : 0, - lastPlayedAt: isSet(object.lastPlayedAt) - ? Number(object.lastPlayedAt) - : 0, - }; - }, - - toJSON(message: CarTuning): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.tunePower !== undefined && - (obj.tunePower = Math.round(message.tunePower)); - message.tuneHandling !== undefined && - (obj.tuneHandling = Math.round(message.tuneHandling)); - message.lastPlayedAt !== undefined && - (obj.lastPlayedAt = Math.round(message.lastPlayedAt)); - return obj; - }, - - fromPartial, I>>( - object: I - ): CarTuning { - const message = createBaseCarTuning(); - message.carId = object.carId ?? 0; - message.tunePower = object.tunePower ?? 0; - message.tuneHandling = object.tuneHandling ?? 0; - message.lastPlayedAt = object.lastPlayedAt ?? 0; - return message; - }, -}; - -function createBaseBinaryData(): BinaryData { - return { data: Buffer.alloc(0), mergeSerial: 0 }; -} - -export const BinaryData = { - encode( - message: BinaryData, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.mergeSerial !== 0) { - writer.uint32(16).sint32(message.mergeSerial); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): BinaryData { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBinaryData(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes() as Buffer; - break; - case 2: - message.mergeSerial = reader.sint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): BinaryData { - return { - data: isSet(object.data) - ? Buffer.from(bytesFromBase64(object.data)) - : Buffer.alloc(0), - mergeSerial: isSet(object.mergeSerial) ? Number(object.mergeSerial) : 0, - }; - }, - - toJSON(message: BinaryData): unknown { - const obj: any = {}; - message.data !== undefined && - (obj.data = base64FromBytes( - message.data !== undefined ? message.data : Buffer.alloc(0) - )); - message.mergeSerial !== undefined && - (obj.mergeSerial = Math.round(message.mergeSerial)); - return obj; - }, - - fromPartial, I>>( - object: I - ): BinaryData { - const message = createBaseBinaryData(); - message.data = object.data ?? Buffer.alloc(0); - message.mergeSerial = object.mergeSerial ?? 0; - return message; - }, -}; - -function createBaseGhostTrail(): GhostTrail { - return { - carId: 0, - area: 0, - ramp: 0, - path: 0, - playedAt: 0, - playedPlace: undefined, - trail: Buffer.alloc(0), - }; -} - -export const GhostTrail = { - encode( - message: GhostTrail, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.carId !== 0) { - writer.uint32(8).uint32(message.carId); - } - if (message.area !== 0) { - writer.uint32(16).uint32(message.area); - } - if (message.ramp !== 0) { - writer.uint32(24).uint32(message.ramp); - } - if (message.path !== 0) { - writer.uint32(56).uint32(message.path); - } - if (message.playedAt !== 0) { - writer.uint32(32).uint32(message.playedAt); - } - if (message.playedPlace !== undefined) { - Place.encode(message.playedPlace, writer.uint32(42).fork()).ldelim(); - } - if (message.trail.length !== 0) { - writer.uint32(50).bytes(message.trail); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GhostTrail { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGhostTrail(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.carId = reader.uint32(); - break; - case 2: - message.area = reader.uint32(); - break; - case 3: - message.ramp = reader.uint32(); - break; - case 7: - message.path = reader.uint32(); - break; - case 4: - message.playedAt = reader.uint32(); - break; - case 5: - message.playedPlace = Place.decode(reader, reader.uint32()); - break; - case 6: - message.trail = reader.bytes() as Buffer; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GhostTrail { - return { - carId: isSet(object.carId) ? Number(object.carId) : 0, - area: isSet(object.area) ? Number(object.area) : 0, - ramp: isSet(object.ramp) ? Number(object.ramp) : 0, - path: isSet(object.path) ? Number(object.path) : 0, - playedAt: isSet(object.playedAt) ? Number(object.playedAt) : 0, - playedPlace: isSet(object.playedPlace) - ? Place.fromJSON(object.playedPlace) - : undefined, - trail: isSet(object.trail) - ? Buffer.from(bytesFromBase64(object.trail)) - : Buffer.alloc(0), - }; - }, - - toJSON(message: GhostTrail): unknown { - const obj: any = {}; - message.carId !== undefined && (obj.carId = Math.round(message.carId)); - message.area !== undefined && (obj.area = Math.round(message.area)); - message.ramp !== undefined && (obj.ramp = Math.round(message.ramp)); - message.path !== undefined && (obj.path = Math.round(message.path)); - message.playedAt !== undefined && - (obj.playedAt = Math.round(message.playedAt)); - message.playedPlace !== undefined && - (obj.playedPlace = message.playedPlace - ? Place.toJSON(message.playedPlace) - : undefined); - message.trail !== undefined && - (obj.trail = base64FromBytes( - message.trail !== undefined ? message.trail : Buffer.alloc(0) - )); - return obj; - }, - - fromPartial, I>>( - object: I - ): GhostTrail { - const message = createBaseGhostTrail(); - message.carId = object.carId ?? 0; - message.area = object.area ?? 0; - message.ramp = object.ramp ?? 0; - message.path = object.path ?? 0; - message.playedAt = object.playedAt ?? 0; - message.playedPlace = - object.playedPlace !== undefined && object.playedPlace !== null - ? Place.fromPartial(object.playedPlace) - : undefined; - message.trail = object.trail ?? Buffer.alloc(0); - return message; - }, -}; - -function createBasePlaceList(): PlaceList { - return { places: [] }; -} - -export const PlaceList = { - encode( - message: PlaceList, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - for (const v of message.places) { - Place.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): PlaceList { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePlaceList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.places.push(Place.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): PlaceList { - return { - places: Array.isArray(object?.places) - ? object.places.map((e: any) => Place.fromJSON(e)) - : [], - }; - }, - - toJSON(message: PlaceList): unknown { - const obj: any = {}; - if (message.places) { - obj.places = message.places.map((e) => (e ? Place.toJSON(e) : undefined)); - } else { - obj.places = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): PlaceList { - const message = createBasePlaceList(); - message.places = object.places?.map((e) => Place.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseGhostList(): GhostList { - return { ghosts: [] }; -} - -export const GhostList = { - encode( - message: GhostList, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - for (const v of message.ghosts) { - GhostCar.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GhostList { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGhostList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ghosts.push(GhostCar.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GhostList { - return { - ghosts: Array.isArray(object?.ghosts) - ? object.ghosts.map((e: any) => GhostCar.fromJSON(e)) - : [], - }; - }, - - toJSON(message: GhostList): unknown { - const obj: any = {}; - if (message.ghosts) { - obj.ghosts = message.ghosts.map((e) => - e ? GhostCar.toJSON(e) : undefined - ); - } else { - obj.ghosts = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): GhostList { - const message = createBaseGhostList(); - message.ghosts = object.ghosts?.map((e) => GhostCar.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseCarSummary(): CarSummary { - return { hitCount: 0, cars: [] }; -} - -export const CarSummary = { - encode( - message: CarSummary, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.hitCount !== 0) { - writer.uint32(8).uint32(message.hitCount); - } - for (const v of message.cars) { - Car.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CarSummary { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCarSummary(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hitCount = reader.uint32(); - break; - case 2: - message.cars.push(Car.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): CarSummary { - return { - hitCount: isSet(object.hitCount) ? Number(object.hitCount) : 0, - cars: Array.isArray(object?.cars) - ? object.cars.map((e: any) => Car.fromJSON(e)) - : [], - }; - }, - - toJSON(message: CarSummary): unknown { - const obj: any = {}; - message.hitCount !== undefined && - (obj.hitCount = Math.round(message.hitCount)); - if (message.cars) { - obj.cars = message.cars.map((e) => (e ? Car.toJSON(e) : undefined)); - } else { - obj.cars = []; - } - return obj; - }, - - fromPartial, I>>( - object: I - ): CarSummary { - const message = createBaseCarSummary(); - message.hitCount = object.hitCount ?? 0; - message.cars = object.cars?.map((e) => Car.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseFileList(): FileList { - return { files: [], interval: 0 }; -} - -export const FileList = { - encode( - message: FileList, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - for (const v of message.files) { - FileList_FileInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.interval !== 0) { - writer.uint32(16).uint32(message.interval); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FileList { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileList(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.files.push(FileList_FileInfo.decode(reader, reader.uint32())); - break; - case 2: - message.interval = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileList { - return { - files: Array.isArray(object?.files) - ? object.files.map((e: any) => FileList_FileInfo.fromJSON(e)) - : [], - interval: isSet(object.interval) ? Number(object.interval) : 0, - }; - }, - - toJSON(message: FileList): unknown { - const obj: any = {}; - if (message.files) { - obj.files = message.files.map((e) => - e ? FileList_FileInfo.toJSON(e) : undefined - ); - } else { - obj.files = []; - } - message.interval !== undefined && - (obj.interval = Math.round(message.interval)); - return obj; - }, - - fromPartial, I>>(object: I): FileList { - const message = createBaseFileList(); - message.files = - object.files?.map((e) => FileList_FileInfo.fromPartial(e)) || []; - message.interval = object.interval ?? 0; - return message; - }, -}; - -function createBaseFileList_FileInfo(): FileList_FileInfo { - return { - fileId: 0, - fileType: 1, - fileSize: 0, - url: "", - sha1sum: Buffer.alloc(0), - notBefore: 0, - notAfter: 0, - }; -} - -export const FileList_FileInfo = { - encode( - message: FileList_FileInfo, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.fileId !== 0) { - writer.uint32(8).uint32(message.fileId); - } - if (message.fileType !== 1) { - writer.uint32(16).int32(message.fileType); - } - if (message.fileSize !== 0) { - writer.uint32(24).uint32(message.fileSize); - } - if (message.url !== "") { - writer.uint32(34).string(message.url); - } - if (message.sha1sum.length !== 0) { - writer.uint32(42).bytes(message.sha1sum); - } - if (message.notBefore !== 0) { - writer.uint32(48).uint32(message.notBefore); - } - if (message.notAfter !== 0) { - writer.uint32(56).uint32(message.notAfter); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FileList_FileInfo { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileList_FileInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fileId = reader.uint32(); - break; - case 2: - message.fileType = reader.int32() as any; - break; - case 3: - message.fileSize = reader.uint32(); - break; - case 4: - message.url = reader.string(); - break; - case 5: - message.sha1sum = reader.bytes() as Buffer; - break; - case 6: - message.notBefore = reader.uint32(); - break; - case 7: - message.notAfter = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): FileList_FileInfo { - return { - fileId: isSet(object.fileId) ? Number(object.fileId) : 0, - fileType: isSet(object.fileType) ? fileTypeFromJSON(object.fileType) : 1, - fileSize: isSet(object.fileSize) ? Number(object.fileSize) : 0, - url: isSet(object.url) ? String(object.url) : "", - sha1sum: isSet(object.sha1sum) - ? Buffer.from(bytesFromBase64(object.sha1sum)) - : Buffer.alloc(0), - notBefore: isSet(object.notBefore) ? Number(object.notBefore) : 0, - notAfter: isSet(object.notAfter) ? Number(object.notAfter) : 0, - }; - }, - - toJSON(message: FileList_FileInfo): unknown { - const obj: any = {}; - message.fileId !== undefined && (obj.fileId = Math.round(message.fileId)); - message.fileType !== undefined && - (obj.fileType = fileTypeToJSON(message.fileType)); - message.fileSize !== undefined && - (obj.fileSize = Math.round(message.fileSize)); - message.url !== undefined && (obj.url = message.url); - message.sha1sum !== undefined && - (obj.sha1sum = base64FromBytes( - message.sha1sum !== undefined ? message.sha1sum : Buffer.alloc(0) - )); - message.notBefore !== undefined && - (obj.notBefore = Math.round(message.notBefore)); - message.notAfter !== undefined && - (obj.notAfter = Math.round(message.notAfter)); - return obj; - }, - - fromPartial, I>>( - object: I - ): FileList_FileInfo { - const message = createBaseFileList_FileInfo(); - message.fileId = object.fileId ?? 0; - message.fileType = object.fileType ?? 1; - message.fileSize = object.fileSize ?? 0; - message.url = object.url ?? ""; - message.sha1sum = object.sha1sum ?? Buffer.alloc(0); - message.notBefore = object.notBefore ?? 0; - message.notAfter = object.notAfter ?? 0; - return message; - }, -}; - -function createBaseGhostCompetitionTarget(): GhostCompetitionTarget { - return { - competitionId: 0, - specialGhostId: 0, - ghostCar: undefined, - trailId: 0, - updatedAt: 0, - competitionSchedule: undefined, - }; -} - -export const GhostCompetitionTarget = { - encode( - message: GhostCompetitionTarget, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { - if (message.competitionId !== 0) { - writer.uint32(8).uint32(message.competitionId); - } - if (message.specialGhostId !== 0) { - writer.uint32(16).uint32(message.specialGhostId); - } - if (message.ghostCar !== undefined) { - GhostCar.encode(message.ghostCar, writer.uint32(26).fork()).ldelim(); - } - if (message.trailId !== 0) { - writer.uint32(32).uint64(message.trailId); - } - if (message.updatedAt !== 0) { - writer.uint32(40).uint32(message.updatedAt); - } - if (message.competitionSchedule !== undefined) { - GhostCompetitionSchedule.encode( - message.competitionSchedule, - writer.uint32(50).fork() - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GhostCompetitionTarget { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGhostCompetitionTarget(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.competitionId = reader.uint32(); - break; - case 2: - message.specialGhostId = reader.uint32(); - break; - case 3: - message.ghostCar = GhostCar.decode(reader, reader.uint32()); - break; - case 4: - message.trailId = longToNumber(reader.uint64() as Long); - break; - case 5: - message.updatedAt = reader.uint32(); - break; - case 6: - message.competitionSchedule = GhostCompetitionSchedule.decode( - reader, - reader.uint32() - ); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GhostCompetitionTarget { - return { - competitionId: isSet(object.competitionId) - ? Number(object.competitionId) - : 0, - specialGhostId: isSet(object.specialGhostId) - ? Number(object.specialGhostId) - : 0, - ghostCar: isSet(object.ghostCar) - ? GhostCar.fromJSON(object.ghostCar) - : undefined, - trailId: isSet(object.trailId) ? Number(object.trailId) : 0, - updatedAt: isSet(object.updatedAt) ? Number(object.updatedAt) : 0, - competitionSchedule: isSet(object.competitionSchedule) - ? GhostCompetitionSchedule.fromJSON(object.competitionSchedule) - : undefined, - }; - }, - - toJSON(message: GhostCompetitionTarget): unknown { - const obj: any = {}; - message.competitionId !== undefined && - (obj.competitionId = Math.round(message.competitionId)); - message.specialGhostId !== undefined && - (obj.specialGhostId = Math.round(message.specialGhostId)); - message.ghostCar !== undefined && - (obj.ghostCar = message.ghostCar - ? GhostCar.toJSON(message.ghostCar) - : undefined); - message.trailId !== undefined && - (obj.trailId = Math.round(message.trailId)); - message.updatedAt !== undefined && - (obj.updatedAt = Math.round(message.updatedAt)); - message.competitionSchedule !== undefined && - (obj.competitionSchedule = message.competitionSchedule - ? GhostCompetitionSchedule.toJSON(message.competitionSchedule) - : undefined); - return obj; - }, - - fromPartial, I>>( - object: I - ): GhostCompetitionTarget { - const message = createBaseGhostCompetitionTarget(); - message.competitionId = object.competitionId ?? 0; - message.specialGhostId = object.specialGhostId ?? 0; - message.ghostCar = - object.ghostCar !== undefined && object.ghostCar !== null - ? GhostCar.fromPartial(object.ghostCar) - : undefined; - message.trailId = object.trailId ?? 0; - message.updatedAt = object.updatedAt ?? 0; - message.competitionSchedule = - object.competitionSchedule !== undefined && - object.competitionSchedule !== null - ? GhostCompetitionSchedule.fromPartial(object.competitionSchedule) - : undefined; - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; -var globalThis: any = (() => { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - throw "Unable to locate global object"; -})(); - -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64: string): Uint8Array { - const bin = atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; -} - -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr: Uint8Array): string { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return btoa(bin.join("")); -} - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude>, - never - >; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/wmmt/game.proto.d.ts b/src/wmmt/game.proto.d.ts new file mode 100644 index 0000000..79d57d6 --- /dev/null +++ b/src/wmmt/game.proto.d.ts @@ -0,0 +1,196 @@ +import * as $protobuf from "protobufjs"; +/** Namespace game. */ +export namespace game { + + /** GID_AREA enum. */ + enum GID_AREA { + GID_AREA_TOKYO = 0, + GID_AREA_HAKONE = 1, + GID_AREA_NAGOYA = 2, + GID_AREA_OSAKA = 3, + GID_AREA_FUKUOKA = 4, + GID_AREA_SUBTOKYO_3_4 = 5, + GID_AREA_SUBTOKYO_5 = 6, + GID_AREA_TURNPIKE = 7, + GID_AREA_KOBE = 8, + GID_AREA_HIROSHIMA = 9, + GID_AREA_STORY = 10 + } + + /** GID_TACOURSE enum. */ + enum GID_TACOURSE { + GID_TACOURSE_C1IN = 0, + GID_TACOURSE_C1OUT = 1, + GID_TACOURSE_RINGLEFT = 2, + GID_TACOURSE_RINGRIGHT = 3, + GID_TACOURSE_SUBTOKYO_3_4 = 4, + GID_TACOURSE_SUBTOKYO_5 = 5, + GID_TACOURSE_WANGANEAST = 6, + GID_TACOURSE_WANGANWEST = 7, + GID_TACOURSE_K1_DOWN = 8, + GID_TACOURSE_K1_UP = 9, + GID_TACOURSE_YAESUIN = 10, + GID_TACOURSE_YAESUOUT = 11, + GID_TACOURSE_YOKOHAMAIN = 12, + GID_TACOURSE_YOKOHAMAOUT = 13, + GID_TACOURSE_NAGOYA = 14, + GID_TACOURSE_OSAKA = 15, + GID_TACOURSE_KOBE = 16, + GID_TACOURSE_FUKUOKA = 17, + GID_TACOURSE_HAKONEFOR = 18, + GID_TACOURSE_HAKONEBACK = 19, + GID_TACOURSE_TURNPIKE_UP = 20, + GID_TACOURSE_TURNPIKE_DOWN = 21, + GID_TACOURSE_TOKYOALL = 22, + GID_TACOURSE_KANAGAWAALL = 23, + GID_TACOURSE_HIROSHIMA = 24 + } + + /** GID_RUNAREA enum. */ + enum GID_RUNAREA { + GID_RUNAREA_C1 = 0, + GID_RUNAREA_RING = 1, + GID_RUNAREA_SUBTOKYO_3_4 = 2, + GID_RUNAREA_SUBTOKYO_5 = 3, + GID_RUNAREA_WANGAN = 4, + GID_RUNAREA_K1 = 5, + GID_RUNAREA_YAESU = 6, + GID_RUNAREA_YOKOHAMA = 7, + GID_RUNAREA_NAGOYA = 8, + GID_RUNAREA_OSAKA = 9, + GID_RUNAREA_KOBE = 10, + GID_RUNAREA_FUKUOKA = 11, + GID_RUNAREA_HAKONE = 12, + GID_RUNAREA_TURNPIKE = 13, + GID_RUNAREA_DUMMY1 = 14, + GID_RUNAREA_DUMMY2 = 15, + GID_RUNAREA_DUMMY3 = 16, + GID_RUNAREA_C1_CLOSED = 17, + GID_RUNAREA_HIROSHIMA = 18 + } + + /** GID_RAMP enum. */ + enum GID_RAMP { + GID_RAMP_C1_IN_KANDABASHI = 0, + GID_RAMP_C1_IN_SHIODOME = 1, + GID_RAMP_C1_OUT_KANDABASHI = 2, + GID_RAMP_C1_OUT_SHIBA = 3, + GID_RAMP_RING_LEFT_ARIAKE = 4, + GID_RAMP_RING_RIGHT_KIBA = 5, + GID_RAMP_SUBTOKYO_SHIBUYA = 6, + GID_RAMP_SUBTOKYO_GAIEN = 7, + GID_RAMP_SUBTOKYO_DAIKANCHOU = 8, + GID_RAMP_SUBTOKYO_SHINJUKU = 9, + GID_RAMP_WANGAN_EAST_AIRPORT = 10, + GID_RAMP_WANGAN_EAST_DAIKOKU = 11, + GID_RAMP_WANGAN_WEST_RINKAI = 12, + GID_RAMP_WANGAN_WEST_AIRPORT = 13, + GID_RAMP_K1_DOWN_SHIBAURA = 14, + GID_RAMP_K1_DOWN_HANEDA = 15, + GID_RAMP_K1_UP_HANEDA = 16, + GID_RAMP_K1_UP_SHIOIRI = 17, + GID_RAMP_YAESU_SHIODOME = 18, + GID_RAMP_YAESU_KYOBASHI = 19, + GID_RAMP_YAESU_KANDABASHI = 20, + GID_RAMP_MINATOMIRAI_IN_HIGASHIKANAGAWA = 21, + GID_RAMP_MINATOMIRAI_IN_MINATOMIRAI = 22, + GID_RAMP_MINATOMIRAI_OUT_SHINYAMASHITA = 23, + GID_RAMP_MINATOMIRAI_OUT_MINATOMIRAI = 24, + GID_RAMP_NAGOYA_MARUNOUCHI = 25, + GID_RAMP_OOSAKA_DOUTONBORI = 26, + GID_RAMP_KOBE_SHINKOUCHOU = 27, + GID_RAMP_KOBE_NADAOOHASHI = 28, + GID_RAMP_FUKUOKA_WEST_MEIHAMA = 29, + GID_RAMP_FUKUOKA_WEST_HAKATA = 30, + GID_RAMP_FUKUOKA_EAST_NISHI = 31, + GID_RAMP_FUKUOKA_EAST_HANDOUBASHI = 32, + GID_RAMP_HAKONE_FOR = 33, + GID_RAMP_HAKONE_BACK = 34, + GID_RAMP_TURNPIKE_UP = 35, + GID_RAMP_TURNPIKE_DOWN = 36, + GID_RAMP_HIROSHIMA_SHINONOME = 37, + GID_RAMP_HIROSHIMA_UJINA = 38 + } + + /** GID_PATH enum. */ + enum GID_PATH { + GID_PATH_C1IN_KANDABASHI01 = 0, + GID_PATH_C1IN_KANDABASHI02 = 1, + GID_PATH_C1IN_KANDABASHI03 = 2, + GID_PATH_C1IN_SHIODOME01 = 3, + GID_PATH_C1OUT_KANDABASHI01 = 4, + GID_PATH_C1OUT_KANDABASHI02 = 5, + GID_PATH_C1OUT_KANDABASHI03 = 6, + GID_PATH_C1OUT_SHIBAKOUEN01 = 7, + GID_PATH_C1OUT_SHIBAKOUEN02 = 8, + GID_PATH_C1OUT_SHIBAKOUEN03 = 9, + GID_PATH_N9IN_ARIAKE01 = 10, + GID_PATH_N9IN_ARIAKE02 = 11, + GID_PATH_N9IN_ARIAKE03 = 12, + GID_PATH_N9OUT_KIBA01 = 13, + GID_PATH_N9OUT_KIBA02 = 14, + GID_PATH_N9OUT_KIBA03 = 15, + GID_PATH_WTEAST_SHIBUYA = 16, + GID_PATH_WTWEST_GAIEN = 17, + GID_PATH_WTUP_DAIKANCHOU = 18, + GID_PATH_WTDOWN_SHINJYUKU = 19, + GID_PATH_WGIN_AIRPORT01 = 20, + GID_PATH_WGIN_AIRPORT02 = 21, + GID_PATH_WGIN_AIRPORT03 = 22, + GID_PATH_WGIN_DAIKOKU01 = 23, + GID_PATH_WGOUT_13_01 = 24, + GID_PATH_WGOUT_AIRPORT01 = 25, + GID_PATH_WGOUT_AIRPORT02 = 26, + GID_PATH_KGDOWN_SHIBAURA01 = 27, + GID_PATH_KGDOWN_HANEDA01 = 28, + GID_PATH_KGDOWN_HANEDA02 = 29, + GID_PATH_KGUP_HANEDA01 = 30, + GID_PATH_KGUP_HANEDA02 = 31, + GID_PATH_KGUP_SHIOIRI01 = 32, + GID_PATH_KGUP_SHIOIRI02 = 33, + GID_PATH_YSIN_SHIODOME01 = 34, + GID_PATH_YSIN_SHIODOME02 = 35, + GID_PATH_YSOUT_KYOBASHI01 = 36, + GID_PATH_YSOUT_KANDABASHI01 = 37, + GID_PATH_KGDOWN_HIGASHIKANAGAWA01 = 38, + GID_PATH_KGDOWN_HIGASHIKANAGAWA02 = 39, + GID_PATH_KGDOWN_MINATOMIRAI01 = 40, + GID_PATH_KGDOWN_MINATOMIRAI02 = 41, + GID_PATH_KGDOWN_MINATOMIRAI03 = 42, + GID_PATH_KGUP_SHINYAMASHITA01 = 43, + GID_PATH_KGUP_SHINYAMASHITA02 = 44, + GID_PATH_KGUP_SHINYAMASHITA03 = 45, + GID_PATH_KGUP_MINATOMIRAI01 = 46, + GID_PATH_KGUP_MINATOMIRAI02 = 47, + GID_PATH_KGUP_MINATOMIRAI03 = 48, + GID_PATH_NGR_MARUNOUCHI = 49, + GID_PATH_OS_TONBORI01 = 50, + GID_PATH_OS_TONBORI02 = 51, + GID_PATH_OS_TONBORI03 = 52, + GID_PATH_OS_TONBORI04 = 53, + GID_PATH_KB_SHINKOUCHOU = 54, + GID_PATH_KB_NADA = 55, + GID_PATH_HS_SHINONOME = 56, + GID_PATH_HS_UJINA = 57, + GID_PATH_FK_MEINOHAMA = 58, + GID_PATH_FK_HAKATA = 59, + GID_PATH_FK_NISHIKOUEN = 60, + GID_PATH_FK_HANMICHIBASHI = 61, + GID_PATH_HKFOR = 62, + GID_PATH_HKBACK = 63, + GID_PATH_TP_BOTTOM = 64, + GID_PATH_TP_TOP = 65 + } + + /** GID_TIMEZONE enum. */ + enum GID_TIMEZONE { + GID_TIMEZONE_DAY = 0, + GID_TIMEZONE_NIGHT = 1 + } + + /** GID_EXTREME enum. */ + enum GID_EXTREME { + GID_EXTREME_NORMAL = 0, + GID_EXTREME_REVERSE = 1 + } +} diff --git a/src/wmmt/game.proto.js b/src/wmmt/game.proto.js new file mode 100644 index 0000000..7003430 --- /dev/null +++ b/src/wmmt/game.proto.js @@ -0,0 +1,420 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +import * as $protobuf from "protobufjs/minimal"; + +// Common aliases +const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +export const game = $root.game = (() => { + + /** + * Namespace game. + * @exports game + * @namespace + */ + const game = {}; + + /** + * GID_AREA enum. + * @name game.GID_AREA + * @enum {number} + * @property {number} GID_AREA_TOKYO=0 GID_AREA_TOKYO value + * @property {number} GID_AREA_HAKONE=1 GID_AREA_HAKONE value + * @property {number} GID_AREA_NAGOYA=2 GID_AREA_NAGOYA value + * @property {number} GID_AREA_OSAKA=3 GID_AREA_OSAKA value + * @property {number} GID_AREA_FUKUOKA=4 GID_AREA_FUKUOKA value + * @property {number} GID_AREA_SUBTOKYO_3_4=5 GID_AREA_SUBTOKYO_3_4 value + * @property {number} GID_AREA_SUBTOKYO_5=6 GID_AREA_SUBTOKYO_5 value + * @property {number} GID_AREA_TURNPIKE=7 GID_AREA_TURNPIKE value + * @property {number} GID_AREA_KOBE=8 GID_AREA_KOBE value + * @property {number} GID_AREA_HIROSHIMA=9 GID_AREA_HIROSHIMA value + * @property {number} GID_AREA_STORY=10 GID_AREA_STORY value + */ + game.GID_AREA = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GID_AREA_TOKYO"] = 0; + values[valuesById[1] = "GID_AREA_HAKONE"] = 1; + values[valuesById[2] = "GID_AREA_NAGOYA"] = 2; + values[valuesById[3] = "GID_AREA_OSAKA"] = 3; + values[valuesById[4] = "GID_AREA_FUKUOKA"] = 4; + values[valuesById[5] = "GID_AREA_SUBTOKYO_3_4"] = 5; + values[valuesById[6] = "GID_AREA_SUBTOKYO_5"] = 6; + values[valuesById[7] = "GID_AREA_TURNPIKE"] = 7; + values[valuesById[8] = "GID_AREA_KOBE"] = 8; + values[valuesById[9] = "GID_AREA_HIROSHIMA"] = 9; + values[valuesById[10] = "GID_AREA_STORY"] = 10; + return values; + })(); + + /** + * GID_TACOURSE enum. + * @name game.GID_TACOURSE + * @enum {number} + * @property {number} GID_TACOURSE_C1IN=0 GID_TACOURSE_C1IN value + * @property {number} GID_TACOURSE_C1OUT=1 GID_TACOURSE_C1OUT value + * @property {number} GID_TACOURSE_RINGLEFT=2 GID_TACOURSE_RINGLEFT value + * @property {number} GID_TACOURSE_RINGRIGHT=3 GID_TACOURSE_RINGRIGHT value + * @property {number} GID_TACOURSE_SUBTOKYO_3_4=4 GID_TACOURSE_SUBTOKYO_3_4 value + * @property {number} GID_TACOURSE_SUBTOKYO_5=5 GID_TACOURSE_SUBTOKYO_5 value + * @property {number} GID_TACOURSE_WANGANEAST=6 GID_TACOURSE_WANGANEAST value + * @property {number} GID_TACOURSE_WANGANWEST=7 GID_TACOURSE_WANGANWEST value + * @property {number} GID_TACOURSE_K1_DOWN=8 GID_TACOURSE_K1_DOWN value + * @property {number} GID_TACOURSE_K1_UP=9 GID_TACOURSE_K1_UP value + * @property {number} GID_TACOURSE_YAESUIN=10 GID_TACOURSE_YAESUIN value + * @property {number} GID_TACOURSE_YAESUOUT=11 GID_TACOURSE_YAESUOUT value + * @property {number} GID_TACOURSE_YOKOHAMAIN=12 GID_TACOURSE_YOKOHAMAIN value + * @property {number} GID_TACOURSE_YOKOHAMAOUT=13 GID_TACOURSE_YOKOHAMAOUT value + * @property {number} GID_TACOURSE_NAGOYA=14 GID_TACOURSE_NAGOYA value + * @property {number} GID_TACOURSE_OSAKA=15 GID_TACOURSE_OSAKA value + * @property {number} GID_TACOURSE_KOBE=16 GID_TACOURSE_KOBE value + * @property {number} GID_TACOURSE_FUKUOKA=17 GID_TACOURSE_FUKUOKA value + * @property {number} GID_TACOURSE_HAKONEFOR=18 GID_TACOURSE_HAKONEFOR value + * @property {number} GID_TACOURSE_HAKONEBACK=19 GID_TACOURSE_HAKONEBACK value + * @property {number} GID_TACOURSE_TURNPIKE_UP=20 GID_TACOURSE_TURNPIKE_UP value + * @property {number} GID_TACOURSE_TURNPIKE_DOWN=21 GID_TACOURSE_TURNPIKE_DOWN value + * @property {number} GID_TACOURSE_TOKYOALL=22 GID_TACOURSE_TOKYOALL value + * @property {number} GID_TACOURSE_KANAGAWAALL=23 GID_TACOURSE_KANAGAWAALL value + * @property {number} GID_TACOURSE_HIROSHIMA=24 GID_TACOURSE_HIROSHIMA value + */ + game.GID_TACOURSE = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GID_TACOURSE_C1IN"] = 0; + values[valuesById[1] = "GID_TACOURSE_C1OUT"] = 1; + values[valuesById[2] = "GID_TACOURSE_RINGLEFT"] = 2; + values[valuesById[3] = "GID_TACOURSE_RINGRIGHT"] = 3; + values[valuesById[4] = "GID_TACOURSE_SUBTOKYO_3_4"] = 4; + values[valuesById[5] = "GID_TACOURSE_SUBTOKYO_5"] = 5; + values[valuesById[6] = "GID_TACOURSE_WANGANEAST"] = 6; + values[valuesById[7] = "GID_TACOURSE_WANGANWEST"] = 7; + values[valuesById[8] = "GID_TACOURSE_K1_DOWN"] = 8; + values[valuesById[9] = "GID_TACOURSE_K1_UP"] = 9; + values[valuesById[10] = "GID_TACOURSE_YAESUIN"] = 10; + values[valuesById[11] = "GID_TACOURSE_YAESUOUT"] = 11; + values[valuesById[12] = "GID_TACOURSE_YOKOHAMAIN"] = 12; + values[valuesById[13] = "GID_TACOURSE_YOKOHAMAOUT"] = 13; + values[valuesById[14] = "GID_TACOURSE_NAGOYA"] = 14; + values[valuesById[15] = "GID_TACOURSE_OSAKA"] = 15; + values[valuesById[16] = "GID_TACOURSE_KOBE"] = 16; + values[valuesById[17] = "GID_TACOURSE_FUKUOKA"] = 17; + values[valuesById[18] = "GID_TACOURSE_HAKONEFOR"] = 18; + values[valuesById[19] = "GID_TACOURSE_HAKONEBACK"] = 19; + values[valuesById[20] = "GID_TACOURSE_TURNPIKE_UP"] = 20; + values[valuesById[21] = "GID_TACOURSE_TURNPIKE_DOWN"] = 21; + values[valuesById[22] = "GID_TACOURSE_TOKYOALL"] = 22; + values[valuesById[23] = "GID_TACOURSE_KANAGAWAALL"] = 23; + values[valuesById[24] = "GID_TACOURSE_HIROSHIMA"] = 24; + return values; + })(); + + /** + * GID_RUNAREA enum. + * @name game.GID_RUNAREA + * @enum {number} + * @property {number} GID_RUNAREA_C1=0 GID_RUNAREA_C1 value + * @property {number} GID_RUNAREA_RING=1 GID_RUNAREA_RING value + * @property {number} GID_RUNAREA_SUBTOKYO_3_4=2 GID_RUNAREA_SUBTOKYO_3_4 value + * @property {number} GID_RUNAREA_SUBTOKYO_5=3 GID_RUNAREA_SUBTOKYO_5 value + * @property {number} GID_RUNAREA_WANGAN=4 GID_RUNAREA_WANGAN value + * @property {number} GID_RUNAREA_K1=5 GID_RUNAREA_K1 value + * @property {number} GID_RUNAREA_YAESU=6 GID_RUNAREA_YAESU value + * @property {number} GID_RUNAREA_YOKOHAMA=7 GID_RUNAREA_YOKOHAMA value + * @property {number} GID_RUNAREA_NAGOYA=8 GID_RUNAREA_NAGOYA value + * @property {number} GID_RUNAREA_OSAKA=9 GID_RUNAREA_OSAKA value + * @property {number} GID_RUNAREA_KOBE=10 GID_RUNAREA_KOBE value + * @property {number} GID_RUNAREA_FUKUOKA=11 GID_RUNAREA_FUKUOKA value + * @property {number} GID_RUNAREA_HAKONE=12 GID_RUNAREA_HAKONE value + * @property {number} GID_RUNAREA_TURNPIKE=13 GID_RUNAREA_TURNPIKE value + * @property {number} GID_RUNAREA_DUMMY1=14 GID_RUNAREA_DUMMY1 value + * @property {number} GID_RUNAREA_DUMMY2=15 GID_RUNAREA_DUMMY2 value + * @property {number} GID_RUNAREA_DUMMY3=16 GID_RUNAREA_DUMMY3 value + * @property {number} GID_RUNAREA_C1_CLOSED=17 GID_RUNAREA_C1_CLOSED value + * @property {number} GID_RUNAREA_HIROSHIMA=18 GID_RUNAREA_HIROSHIMA value + */ + game.GID_RUNAREA = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GID_RUNAREA_C1"] = 0; + values[valuesById[1] = "GID_RUNAREA_RING"] = 1; + values[valuesById[2] = "GID_RUNAREA_SUBTOKYO_3_4"] = 2; + values[valuesById[3] = "GID_RUNAREA_SUBTOKYO_5"] = 3; + values[valuesById[4] = "GID_RUNAREA_WANGAN"] = 4; + values[valuesById[5] = "GID_RUNAREA_K1"] = 5; + values[valuesById[6] = "GID_RUNAREA_YAESU"] = 6; + values[valuesById[7] = "GID_RUNAREA_YOKOHAMA"] = 7; + values[valuesById[8] = "GID_RUNAREA_NAGOYA"] = 8; + values[valuesById[9] = "GID_RUNAREA_OSAKA"] = 9; + values[valuesById[10] = "GID_RUNAREA_KOBE"] = 10; + values[valuesById[11] = "GID_RUNAREA_FUKUOKA"] = 11; + values[valuesById[12] = "GID_RUNAREA_HAKONE"] = 12; + values[valuesById[13] = "GID_RUNAREA_TURNPIKE"] = 13; + values[valuesById[14] = "GID_RUNAREA_DUMMY1"] = 14; + values[valuesById[15] = "GID_RUNAREA_DUMMY2"] = 15; + values[valuesById[16] = "GID_RUNAREA_DUMMY3"] = 16; + values[valuesById[17] = "GID_RUNAREA_C1_CLOSED"] = 17; + values[valuesById[18] = "GID_RUNAREA_HIROSHIMA"] = 18; + return values; + })(); + + /** + * GID_RAMP enum. + * @name game.GID_RAMP + * @enum {number} + * @property {number} GID_RAMP_C1_IN_KANDABASHI=0 GID_RAMP_C1_IN_KANDABASHI value + * @property {number} GID_RAMP_C1_IN_SHIODOME=1 GID_RAMP_C1_IN_SHIODOME value + * @property {number} GID_RAMP_C1_OUT_KANDABASHI=2 GID_RAMP_C1_OUT_KANDABASHI value + * @property {number} GID_RAMP_C1_OUT_SHIBA=3 GID_RAMP_C1_OUT_SHIBA value + * @property {number} GID_RAMP_RING_LEFT_ARIAKE=4 GID_RAMP_RING_LEFT_ARIAKE value + * @property {number} GID_RAMP_RING_RIGHT_KIBA=5 GID_RAMP_RING_RIGHT_KIBA value + * @property {number} GID_RAMP_SUBTOKYO_SHIBUYA=6 GID_RAMP_SUBTOKYO_SHIBUYA value + * @property {number} GID_RAMP_SUBTOKYO_GAIEN=7 GID_RAMP_SUBTOKYO_GAIEN value + * @property {number} GID_RAMP_SUBTOKYO_DAIKANCHOU=8 GID_RAMP_SUBTOKYO_DAIKANCHOU value + * @property {number} GID_RAMP_SUBTOKYO_SHINJUKU=9 GID_RAMP_SUBTOKYO_SHINJUKU value + * @property {number} GID_RAMP_WANGAN_EAST_AIRPORT=10 GID_RAMP_WANGAN_EAST_AIRPORT value + * @property {number} GID_RAMP_WANGAN_EAST_DAIKOKU=11 GID_RAMP_WANGAN_EAST_DAIKOKU value + * @property {number} GID_RAMP_WANGAN_WEST_RINKAI=12 GID_RAMP_WANGAN_WEST_RINKAI value + * @property {number} GID_RAMP_WANGAN_WEST_AIRPORT=13 GID_RAMP_WANGAN_WEST_AIRPORT value + * @property {number} GID_RAMP_K1_DOWN_SHIBAURA=14 GID_RAMP_K1_DOWN_SHIBAURA value + * @property {number} GID_RAMP_K1_DOWN_HANEDA=15 GID_RAMP_K1_DOWN_HANEDA value + * @property {number} GID_RAMP_K1_UP_HANEDA=16 GID_RAMP_K1_UP_HANEDA value + * @property {number} GID_RAMP_K1_UP_SHIOIRI=17 GID_RAMP_K1_UP_SHIOIRI value + * @property {number} GID_RAMP_YAESU_SHIODOME=18 GID_RAMP_YAESU_SHIODOME value + * @property {number} GID_RAMP_YAESU_KYOBASHI=19 GID_RAMP_YAESU_KYOBASHI value + * @property {number} GID_RAMP_YAESU_KANDABASHI=20 GID_RAMP_YAESU_KANDABASHI value + * @property {number} GID_RAMP_MINATOMIRAI_IN_HIGASHIKANAGAWA=21 GID_RAMP_MINATOMIRAI_IN_HIGASHIKANAGAWA value + * @property {number} GID_RAMP_MINATOMIRAI_IN_MINATOMIRAI=22 GID_RAMP_MINATOMIRAI_IN_MINATOMIRAI value + * @property {number} GID_RAMP_MINATOMIRAI_OUT_SHINYAMASHITA=23 GID_RAMP_MINATOMIRAI_OUT_SHINYAMASHITA value + * @property {number} GID_RAMP_MINATOMIRAI_OUT_MINATOMIRAI=24 GID_RAMP_MINATOMIRAI_OUT_MINATOMIRAI value + * @property {number} GID_RAMP_NAGOYA_MARUNOUCHI=25 GID_RAMP_NAGOYA_MARUNOUCHI value + * @property {number} GID_RAMP_OOSAKA_DOUTONBORI=26 GID_RAMP_OOSAKA_DOUTONBORI value + * @property {number} GID_RAMP_KOBE_SHINKOUCHOU=27 GID_RAMP_KOBE_SHINKOUCHOU value + * @property {number} GID_RAMP_KOBE_NADAOOHASHI=28 GID_RAMP_KOBE_NADAOOHASHI value + * @property {number} GID_RAMP_FUKUOKA_WEST_MEIHAMA=29 GID_RAMP_FUKUOKA_WEST_MEIHAMA value + * @property {number} GID_RAMP_FUKUOKA_WEST_HAKATA=30 GID_RAMP_FUKUOKA_WEST_HAKATA value + * @property {number} GID_RAMP_FUKUOKA_EAST_NISHI=31 GID_RAMP_FUKUOKA_EAST_NISHI value + * @property {number} GID_RAMP_FUKUOKA_EAST_HANDOUBASHI=32 GID_RAMP_FUKUOKA_EAST_HANDOUBASHI value + * @property {number} GID_RAMP_HAKONE_FOR=33 GID_RAMP_HAKONE_FOR value + * @property {number} GID_RAMP_HAKONE_BACK=34 GID_RAMP_HAKONE_BACK value + * @property {number} GID_RAMP_TURNPIKE_UP=35 GID_RAMP_TURNPIKE_UP value + * @property {number} GID_RAMP_TURNPIKE_DOWN=36 GID_RAMP_TURNPIKE_DOWN value + * @property {number} GID_RAMP_HIROSHIMA_SHINONOME=37 GID_RAMP_HIROSHIMA_SHINONOME value + * @property {number} GID_RAMP_HIROSHIMA_UJINA=38 GID_RAMP_HIROSHIMA_UJINA value + */ + game.GID_RAMP = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GID_RAMP_C1_IN_KANDABASHI"] = 0; + values[valuesById[1] = "GID_RAMP_C1_IN_SHIODOME"] = 1; + values[valuesById[2] = "GID_RAMP_C1_OUT_KANDABASHI"] = 2; + values[valuesById[3] = "GID_RAMP_C1_OUT_SHIBA"] = 3; + values[valuesById[4] = "GID_RAMP_RING_LEFT_ARIAKE"] = 4; + values[valuesById[5] = "GID_RAMP_RING_RIGHT_KIBA"] = 5; + values[valuesById[6] = "GID_RAMP_SUBTOKYO_SHIBUYA"] = 6; + values[valuesById[7] = "GID_RAMP_SUBTOKYO_GAIEN"] = 7; + values[valuesById[8] = "GID_RAMP_SUBTOKYO_DAIKANCHOU"] = 8; + values[valuesById[9] = "GID_RAMP_SUBTOKYO_SHINJUKU"] = 9; + values[valuesById[10] = "GID_RAMP_WANGAN_EAST_AIRPORT"] = 10; + values[valuesById[11] = "GID_RAMP_WANGAN_EAST_DAIKOKU"] = 11; + values[valuesById[12] = "GID_RAMP_WANGAN_WEST_RINKAI"] = 12; + values[valuesById[13] = "GID_RAMP_WANGAN_WEST_AIRPORT"] = 13; + values[valuesById[14] = "GID_RAMP_K1_DOWN_SHIBAURA"] = 14; + values[valuesById[15] = "GID_RAMP_K1_DOWN_HANEDA"] = 15; + values[valuesById[16] = "GID_RAMP_K1_UP_HANEDA"] = 16; + values[valuesById[17] = "GID_RAMP_K1_UP_SHIOIRI"] = 17; + values[valuesById[18] = "GID_RAMP_YAESU_SHIODOME"] = 18; + values[valuesById[19] = "GID_RAMP_YAESU_KYOBASHI"] = 19; + values[valuesById[20] = "GID_RAMP_YAESU_KANDABASHI"] = 20; + values[valuesById[21] = "GID_RAMP_MINATOMIRAI_IN_HIGASHIKANAGAWA"] = 21; + values[valuesById[22] = "GID_RAMP_MINATOMIRAI_IN_MINATOMIRAI"] = 22; + values[valuesById[23] = "GID_RAMP_MINATOMIRAI_OUT_SHINYAMASHITA"] = 23; + values[valuesById[24] = "GID_RAMP_MINATOMIRAI_OUT_MINATOMIRAI"] = 24; + values[valuesById[25] = "GID_RAMP_NAGOYA_MARUNOUCHI"] = 25; + values[valuesById[26] = "GID_RAMP_OOSAKA_DOUTONBORI"] = 26; + values[valuesById[27] = "GID_RAMP_KOBE_SHINKOUCHOU"] = 27; + values[valuesById[28] = "GID_RAMP_KOBE_NADAOOHASHI"] = 28; + values[valuesById[29] = "GID_RAMP_FUKUOKA_WEST_MEIHAMA"] = 29; + values[valuesById[30] = "GID_RAMP_FUKUOKA_WEST_HAKATA"] = 30; + values[valuesById[31] = "GID_RAMP_FUKUOKA_EAST_NISHI"] = 31; + values[valuesById[32] = "GID_RAMP_FUKUOKA_EAST_HANDOUBASHI"] = 32; + values[valuesById[33] = "GID_RAMP_HAKONE_FOR"] = 33; + values[valuesById[34] = "GID_RAMP_HAKONE_BACK"] = 34; + values[valuesById[35] = "GID_RAMP_TURNPIKE_UP"] = 35; + values[valuesById[36] = "GID_RAMP_TURNPIKE_DOWN"] = 36; + values[valuesById[37] = "GID_RAMP_HIROSHIMA_SHINONOME"] = 37; + values[valuesById[38] = "GID_RAMP_HIROSHIMA_UJINA"] = 38; + return values; + })(); + + /** + * GID_PATH enum. + * @name game.GID_PATH + * @enum {number} + * @property {number} GID_PATH_C1IN_KANDABASHI01=0 GID_PATH_C1IN_KANDABASHI01 value + * @property {number} GID_PATH_C1IN_KANDABASHI02=1 GID_PATH_C1IN_KANDABASHI02 value + * @property {number} GID_PATH_C1IN_KANDABASHI03=2 GID_PATH_C1IN_KANDABASHI03 value + * @property {number} GID_PATH_C1IN_SHIODOME01=3 GID_PATH_C1IN_SHIODOME01 value + * @property {number} GID_PATH_C1OUT_KANDABASHI01=4 GID_PATH_C1OUT_KANDABASHI01 value + * @property {number} GID_PATH_C1OUT_KANDABASHI02=5 GID_PATH_C1OUT_KANDABASHI02 value + * @property {number} GID_PATH_C1OUT_KANDABASHI03=6 GID_PATH_C1OUT_KANDABASHI03 value + * @property {number} GID_PATH_C1OUT_SHIBAKOUEN01=7 GID_PATH_C1OUT_SHIBAKOUEN01 value + * @property {number} GID_PATH_C1OUT_SHIBAKOUEN02=8 GID_PATH_C1OUT_SHIBAKOUEN02 value + * @property {number} GID_PATH_C1OUT_SHIBAKOUEN03=9 GID_PATH_C1OUT_SHIBAKOUEN03 value + * @property {number} GID_PATH_N9IN_ARIAKE01=10 GID_PATH_N9IN_ARIAKE01 value + * @property {number} GID_PATH_N9IN_ARIAKE02=11 GID_PATH_N9IN_ARIAKE02 value + * @property {number} GID_PATH_N9IN_ARIAKE03=12 GID_PATH_N9IN_ARIAKE03 value + * @property {number} GID_PATH_N9OUT_KIBA01=13 GID_PATH_N9OUT_KIBA01 value + * @property {number} GID_PATH_N9OUT_KIBA02=14 GID_PATH_N9OUT_KIBA02 value + * @property {number} GID_PATH_N9OUT_KIBA03=15 GID_PATH_N9OUT_KIBA03 value + * @property {number} GID_PATH_WTEAST_SHIBUYA=16 GID_PATH_WTEAST_SHIBUYA value + * @property {number} GID_PATH_WTWEST_GAIEN=17 GID_PATH_WTWEST_GAIEN value + * @property {number} GID_PATH_WTUP_DAIKANCHOU=18 GID_PATH_WTUP_DAIKANCHOU value + * @property {number} GID_PATH_WTDOWN_SHINJYUKU=19 GID_PATH_WTDOWN_SHINJYUKU value + * @property {number} GID_PATH_WGIN_AIRPORT01=20 GID_PATH_WGIN_AIRPORT01 value + * @property {number} GID_PATH_WGIN_AIRPORT02=21 GID_PATH_WGIN_AIRPORT02 value + * @property {number} GID_PATH_WGIN_AIRPORT03=22 GID_PATH_WGIN_AIRPORT03 value + * @property {number} GID_PATH_WGIN_DAIKOKU01=23 GID_PATH_WGIN_DAIKOKU01 value + * @property {number} GID_PATH_WGOUT_13_01=24 GID_PATH_WGOUT_13_01 value + * @property {number} GID_PATH_WGOUT_AIRPORT01=25 GID_PATH_WGOUT_AIRPORT01 value + * @property {number} GID_PATH_WGOUT_AIRPORT02=26 GID_PATH_WGOUT_AIRPORT02 value + * @property {number} GID_PATH_KGDOWN_SHIBAURA01=27 GID_PATH_KGDOWN_SHIBAURA01 value + * @property {number} GID_PATH_KGDOWN_HANEDA01=28 GID_PATH_KGDOWN_HANEDA01 value + * @property {number} GID_PATH_KGDOWN_HANEDA02=29 GID_PATH_KGDOWN_HANEDA02 value + * @property {number} GID_PATH_KGUP_HANEDA01=30 GID_PATH_KGUP_HANEDA01 value + * @property {number} GID_PATH_KGUP_HANEDA02=31 GID_PATH_KGUP_HANEDA02 value + * @property {number} GID_PATH_KGUP_SHIOIRI01=32 GID_PATH_KGUP_SHIOIRI01 value + * @property {number} GID_PATH_KGUP_SHIOIRI02=33 GID_PATH_KGUP_SHIOIRI02 value + * @property {number} GID_PATH_YSIN_SHIODOME01=34 GID_PATH_YSIN_SHIODOME01 value + * @property {number} GID_PATH_YSIN_SHIODOME02=35 GID_PATH_YSIN_SHIODOME02 value + * @property {number} GID_PATH_YSOUT_KYOBASHI01=36 GID_PATH_YSOUT_KYOBASHI01 value + * @property {number} GID_PATH_YSOUT_KANDABASHI01=37 GID_PATH_YSOUT_KANDABASHI01 value + * @property {number} GID_PATH_KGDOWN_HIGASHIKANAGAWA01=38 GID_PATH_KGDOWN_HIGASHIKANAGAWA01 value + * @property {number} GID_PATH_KGDOWN_HIGASHIKANAGAWA02=39 GID_PATH_KGDOWN_HIGASHIKANAGAWA02 value + * @property {number} GID_PATH_KGDOWN_MINATOMIRAI01=40 GID_PATH_KGDOWN_MINATOMIRAI01 value + * @property {number} GID_PATH_KGDOWN_MINATOMIRAI02=41 GID_PATH_KGDOWN_MINATOMIRAI02 value + * @property {number} GID_PATH_KGDOWN_MINATOMIRAI03=42 GID_PATH_KGDOWN_MINATOMIRAI03 value + * @property {number} GID_PATH_KGUP_SHINYAMASHITA01=43 GID_PATH_KGUP_SHINYAMASHITA01 value + * @property {number} GID_PATH_KGUP_SHINYAMASHITA02=44 GID_PATH_KGUP_SHINYAMASHITA02 value + * @property {number} GID_PATH_KGUP_SHINYAMASHITA03=45 GID_PATH_KGUP_SHINYAMASHITA03 value + * @property {number} GID_PATH_KGUP_MINATOMIRAI01=46 GID_PATH_KGUP_MINATOMIRAI01 value + * @property {number} GID_PATH_KGUP_MINATOMIRAI02=47 GID_PATH_KGUP_MINATOMIRAI02 value + * @property {number} GID_PATH_KGUP_MINATOMIRAI03=48 GID_PATH_KGUP_MINATOMIRAI03 value + * @property {number} GID_PATH_NGR_MARUNOUCHI=49 GID_PATH_NGR_MARUNOUCHI value + * @property {number} GID_PATH_OS_TONBORI01=50 GID_PATH_OS_TONBORI01 value + * @property {number} GID_PATH_OS_TONBORI02=51 GID_PATH_OS_TONBORI02 value + * @property {number} GID_PATH_OS_TONBORI03=52 GID_PATH_OS_TONBORI03 value + * @property {number} GID_PATH_OS_TONBORI04=53 GID_PATH_OS_TONBORI04 value + * @property {number} GID_PATH_KB_SHINKOUCHOU=54 GID_PATH_KB_SHINKOUCHOU value + * @property {number} GID_PATH_KB_NADA=55 GID_PATH_KB_NADA value + * @property {number} GID_PATH_HS_SHINONOME=56 GID_PATH_HS_SHINONOME value + * @property {number} GID_PATH_HS_UJINA=57 GID_PATH_HS_UJINA value + * @property {number} GID_PATH_FK_MEINOHAMA=58 GID_PATH_FK_MEINOHAMA value + * @property {number} GID_PATH_FK_HAKATA=59 GID_PATH_FK_HAKATA value + * @property {number} GID_PATH_FK_NISHIKOUEN=60 GID_PATH_FK_NISHIKOUEN value + * @property {number} GID_PATH_FK_HANMICHIBASHI=61 GID_PATH_FK_HANMICHIBASHI value + * @property {number} GID_PATH_HKFOR=62 GID_PATH_HKFOR value + * @property {number} GID_PATH_HKBACK=63 GID_PATH_HKBACK value + * @property {number} GID_PATH_TP_BOTTOM=64 GID_PATH_TP_BOTTOM value + * @property {number} GID_PATH_TP_TOP=65 GID_PATH_TP_TOP value + */ + game.GID_PATH = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GID_PATH_C1IN_KANDABASHI01"] = 0; + values[valuesById[1] = "GID_PATH_C1IN_KANDABASHI02"] = 1; + values[valuesById[2] = "GID_PATH_C1IN_KANDABASHI03"] = 2; + values[valuesById[3] = "GID_PATH_C1IN_SHIODOME01"] = 3; + values[valuesById[4] = "GID_PATH_C1OUT_KANDABASHI01"] = 4; + values[valuesById[5] = "GID_PATH_C1OUT_KANDABASHI02"] = 5; + values[valuesById[6] = "GID_PATH_C1OUT_KANDABASHI03"] = 6; + values[valuesById[7] = "GID_PATH_C1OUT_SHIBAKOUEN01"] = 7; + values[valuesById[8] = "GID_PATH_C1OUT_SHIBAKOUEN02"] = 8; + values[valuesById[9] = "GID_PATH_C1OUT_SHIBAKOUEN03"] = 9; + values[valuesById[10] = "GID_PATH_N9IN_ARIAKE01"] = 10; + values[valuesById[11] = "GID_PATH_N9IN_ARIAKE02"] = 11; + values[valuesById[12] = "GID_PATH_N9IN_ARIAKE03"] = 12; + values[valuesById[13] = "GID_PATH_N9OUT_KIBA01"] = 13; + values[valuesById[14] = "GID_PATH_N9OUT_KIBA02"] = 14; + values[valuesById[15] = "GID_PATH_N9OUT_KIBA03"] = 15; + values[valuesById[16] = "GID_PATH_WTEAST_SHIBUYA"] = 16; + values[valuesById[17] = "GID_PATH_WTWEST_GAIEN"] = 17; + values[valuesById[18] = "GID_PATH_WTUP_DAIKANCHOU"] = 18; + values[valuesById[19] = "GID_PATH_WTDOWN_SHINJYUKU"] = 19; + values[valuesById[20] = "GID_PATH_WGIN_AIRPORT01"] = 20; + values[valuesById[21] = "GID_PATH_WGIN_AIRPORT02"] = 21; + values[valuesById[22] = "GID_PATH_WGIN_AIRPORT03"] = 22; + values[valuesById[23] = "GID_PATH_WGIN_DAIKOKU01"] = 23; + values[valuesById[24] = "GID_PATH_WGOUT_13_01"] = 24; + values[valuesById[25] = "GID_PATH_WGOUT_AIRPORT01"] = 25; + values[valuesById[26] = "GID_PATH_WGOUT_AIRPORT02"] = 26; + values[valuesById[27] = "GID_PATH_KGDOWN_SHIBAURA01"] = 27; + values[valuesById[28] = "GID_PATH_KGDOWN_HANEDA01"] = 28; + values[valuesById[29] = "GID_PATH_KGDOWN_HANEDA02"] = 29; + values[valuesById[30] = "GID_PATH_KGUP_HANEDA01"] = 30; + values[valuesById[31] = "GID_PATH_KGUP_HANEDA02"] = 31; + values[valuesById[32] = "GID_PATH_KGUP_SHIOIRI01"] = 32; + values[valuesById[33] = "GID_PATH_KGUP_SHIOIRI02"] = 33; + values[valuesById[34] = "GID_PATH_YSIN_SHIODOME01"] = 34; + values[valuesById[35] = "GID_PATH_YSIN_SHIODOME02"] = 35; + values[valuesById[36] = "GID_PATH_YSOUT_KYOBASHI01"] = 36; + values[valuesById[37] = "GID_PATH_YSOUT_KANDABASHI01"] = 37; + values[valuesById[38] = "GID_PATH_KGDOWN_HIGASHIKANAGAWA01"] = 38; + values[valuesById[39] = "GID_PATH_KGDOWN_HIGASHIKANAGAWA02"] = 39; + values[valuesById[40] = "GID_PATH_KGDOWN_MINATOMIRAI01"] = 40; + values[valuesById[41] = "GID_PATH_KGDOWN_MINATOMIRAI02"] = 41; + values[valuesById[42] = "GID_PATH_KGDOWN_MINATOMIRAI03"] = 42; + values[valuesById[43] = "GID_PATH_KGUP_SHINYAMASHITA01"] = 43; + values[valuesById[44] = "GID_PATH_KGUP_SHINYAMASHITA02"] = 44; + values[valuesById[45] = "GID_PATH_KGUP_SHINYAMASHITA03"] = 45; + values[valuesById[46] = "GID_PATH_KGUP_MINATOMIRAI01"] = 46; + values[valuesById[47] = "GID_PATH_KGUP_MINATOMIRAI02"] = 47; + values[valuesById[48] = "GID_PATH_KGUP_MINATOMIRAI03"] = 48; + values[valuesById[49] = "GID_PATH_NGR_MARUNOUCHI"] = 49; + values[valuesById[50] = "GID_PATH_OS_TONBORI01"] = 50; + values[valuesById[51] = "GID_PATH_OS_TONBORI02"] = 51; + values[valuesById[52] = "GID_PATH_OS_TONBORI03"] = 52; + values[valuesById[53] = "GID_PATH_OS_TONBORI04"] = 53; + values[valuesById[54] = "GID_PATH_KB_SHINKOUCHOU"] = 54; + values[valuesById[55] = "GID_PATH_KB_NADA"] = 55; + values[valuesById[56] = "GID_PATH_HS_SHINONOME"] = 56; + values[valuesById[57] = "GID_PATH_HS_UJINA"] = 57; + values[valuesById[58] = "GID_PATH_FK_MEINOHAMA"] = 58; + values[valuesById[59] = "GID_PATH_FK_HAKATA"] = 59; + values[valuesById[60] = "GID_PATH_FK_NISHIKOUEN"] = 60; + values[valuesById[61] = "GID_PATH_FK_HANMICHIBASHI"] = 61; + values[valuesById[62] = "GID_PATH_HKFOR"] = 62; + values[valuesById[63] = "GID_PATH_HKBACK"] = 63; + values[valuesById[64] = "GID_PATH_TP_BOTTOM"] = 64; + values[valuesById[65] = "GID_PATH_TP_TOP"] = 65; + return values; + })(); + + /** + * GID_TIMEZONE enum. + * @name game.GID_TIMEZONE + * @enum {number} + * @property {number} GID_TIMEZONE_DAY=0 GID_TIMEZONE_DAY value + * @property {number} GID_TIMEZONE_NIGHT=1 GID_TIMEZONE_NIGHT value + */ + game.GID_TIMEZONE = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GID_TIMEZONE_DAY"] = 0; + values[valuesById[1] = "GID_TIMEZONE_NIGHT"] = 1; + return values; + })(); + + /** + * GID_EXTREME enum. + * @name game.GID_EXTREME + * @enum {number} + * @property {number} GID_EXTREME_NORMAL=0 GID_EXTREME_NORMAL value + * @property {number} GID_EXTREME_REVERSE=1 GID_EXTREME_REVERSE value + */ + game.GID_EXTREME = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GID_EXTREME_NORMAL"] = 0; + values[valuesById[1] = "GID_EXTREME_REVERSE"] = 1; + return values; + })(); + + return game; +})(); + +export { $root as default }; diff --git a/src/wmmt/message.proto.d.ts b/src/wmmt/message.proto.d.ts new file mode 100644 index 0000000..6734d19 --- /dev/null +++ b/src/wmmt/message.proto.d.ts @@ -0,0 +1,20608 @@ +import * as $protobuf from "protobufjs"; +/** Namespace wm. */ +export namespace wm { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a Course. */ + interface ICourse { + + /** Course episodeId */ + episodeId?: (number|null); + + /** Course timeAttackId */ + timeAttackId?: (number|null); + + /** Course extremeId */ + extremeId?: (number|null); + + /** Course runAreaId */ + runAreaId?: (number|null); + + /** Course startRampId */ + startRampId?: (number|null); + + /** Course timezoneId */ + timezoneId?: (number|null); + + /** Course bgmId */ + bgmId?: (number|null); + + /** Course autoSelect */ + autoSelect?: (boolean|null); + + /** Course assistOff */ + assistOff?: (boolean|null); + + /** Course playerMax */ + playerMax?: (number|null); + + /** Course vsRankList */ + vsRankList?: (string|null); + + /** Course distBase */ + distBase?: (number|null); + + /** Course distAdd */ + distAdd?: (number|null); + + /** Course distBonus */ + distBonus?: (number|null); + + /** Course randomSeed */ + randomSeed?: (number|null); + } + + /** Represents a Course. */ + class Course implements ICourse { + + /** + * Constructs a new Course. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICourse); + + /** Course episodeId. */ + public episodeId: number; + + /** Course timeAttackId. */ + public timeAttackId: number; + + /** Course extremeId. */ + public extremeId: number; + + /** Course runAreaId. */ + public runAreaId: number; + + /** Course startRampId. */ + public startRampId: number; + + /** Course timezoneId. */ + public timezoneId: number; + + /** Course bgmId. */ + public bgmId: number; + + /** Course autoSelect. */ + public autoSelect: boolean; + + /** Course assistOff. */ + public assistOff: boolean; + + /** Course playerMax. */ + public playerMax: number; + + /** Course vsRankList. */ + public vsRankList: string; + + /** Course distBase. */ + public distBase: number; + + /** Course distAdd. */ + public distAdd: number; + + /** Course distBonus. */ + public distBonus: number; + + /** Course randomSeed. */ + public randomSeed: number; + + /** + * Creates a new Course instance using the specified properties. + * @param [properties] Properties to set + * @returns Course instance + */ + public static create(properties?: wm.protobuf.ICourse): wm.protobuf.Course; + + /** + * Encodes the specified Course message. Does not implicitly {@link wm.protobuf.Course.verify|verify} messages. + * @param message Course message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICourse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Course message, length delimited. Does not implicitly {@link wm.protobuf.Course.verify|verify} messages. + * @param message Course message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICourse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Course message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Course + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Course; + + /** + * Decodes a Course message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Course + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Course; + + /** + * Verifies a Course message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Course message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Course + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Course; + + /** + * Creates a plain object from a Course message. Also converts values to other types if specified. + * @param message Course + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Course, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Course to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Course + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HeartBeat. */ + interface IHeartBeat { + + /** HeartBeat frameNumber */ + frameNumber?: (number|null); + + /** HeartBeat pcbSerial */ + pcbSerial?: (string|null); + + /** HeartBeat serverComm */ + serverComm?: (number|null); + } + + /** Represents a HeartBeat. */ + class HeartBeat implements IHeartBeat { + + /** + * Constructs a new HeartBeat. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IHeartBeat); + + /** HeartBeat frameNumber. */ + public frameNumber: number; + + /** HeartBeat pcbSerial. */ + public pcbSerial: string; + + /** HeartBeat serverComm. */ + public serverComm: number; + + /** + * Creates a new HeartBeat instance using the specified properties. + * @param [properties] Properties to set + * @returns HeartBeat instance + */ + public static create(properties?: wm.protobuf.IHeartBeat): wm.protobuf.HeartBeat; + + /** + * Encodes the specified HeartBeat message. Does not implicitly {@link wm.protobuf.HeartBeat.verify|verify} messages. + * @param message HeartBeat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IHeartBeat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HeartBeat message, length delimited. Does not implicitly {@link wm.protobuf.HeartBeat.verify|verify} messages. + * @param message HeartBeat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IHeartBeat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HeartBeat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HeartBeat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.HeartBeat; + + /** + * Decodes a HeartBeat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HeartBeat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.HeartBeat; + + /** + * Verifies a HeartBeat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HeartBeat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HeartBeat + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.HeartBeat; + + /** + * Creates a plain object from a HeartBeat message. Also converts values to other types if specified. + * @param message HeartBeat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.HeartBeat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HeartBeat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HeartBeat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DriveCabinetState. */ + interface IDriveCabinetState { + + /** DriveCabinetState iccardRwState */ + iccardRwState?: (number|null); + + /** DriveCabinetState venderState */ + venderState?: (number|null); + + /** DriveCabinetState ffbState */ + ffbState?: (number|null); + + /** DriveCabinetState allnetAttestation */ + allnetAttestation?: (number|null); + + /** DriveCabinetState updateAttestation */ + updateAttestation?: (number|null); + + /** DriveCabinetState softwareRevision */ + softwareRevision?: (number|null); + + /** DriveCabinetState downloadState */ + downloadState?: (number|null); + + /** DriveCabinetState downloadRevision */ + downloadRevision?: (number|null); + + /** DriveCabinetState downloadProgress */ + downloadProgress?: (number|null); + + /** DriveCabinetState updateRevision */ + updateRevision?: (number|null); + + /** DriveCabinetState eventMode */ + eventMode?: (number|null); + + /** DriveCabinetState eventModeDist */ + eventModeDist?: (number|null); + + /** DriveCabinetState eventMode_2on2 */ + eventMode_2on2?: (number|null); + } + + /** Represents a DriveCabinetState. */ + class DriveCabinetState implements IDriveCabinetState { + + /** + * Constructs a new DriveCabinetState. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IDriveCabinetState); + + /** DriveCabinetState iccardRwState. */ + public iccardRwState: number; + + /** DriveCabinetState venderState. */ + public venderState: number; + + /** DriveCabinetState ffbState. */ + public ffbState: number; + + /** DriveCabinetState allnetAttestation. */ + public allnetAttestation: number; + + /** DriveCabinetState updateAttestation. */ + public updateAttestation: number; + + /** DriveCabinetState softwareRevision. */ + public softwareRevision: number; + + /** DriveCabinetState downloadState. */ + public downloadState: number; + + /** DriveCabinetState downloadRevision. */ + public downloadRevision: number; + + /** DriveCabinetState downloadProgress. */ + public downloadProgress: number; + + /** DriveCabinetState updateRevision. */ + public updateRevision: number; + + /** DriveCabinetState eventMode. */ + public eventMode: number; + + /** DriveCabinetState eventModeDist. */ + public eventModeDist: number; + + /** DriveCabinetState eventMode_2on2. */ + public eventMode_2on2: number; + + /** + * Creates a new DriveCabinetState instance using the specified properties. + * @param [properties] Properties to set + * @returns DriveCabinetState instance + */ + public static create(properties?: wm.protobuf.IDriveCabinetState): wm.protobuf.DriveCabinetState; + + /** + * Encodes the specified DriveCabinetState message. Does not implicitly {@link wm.protobuf.DriveCabinetState.verify|verify} messages. + * @param message DriveCabinetState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IDriveCabinetState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DriveCabinetState message, length delimited. Does not implicitly {@link wm.protobuf.DriveCabinetState.verify|verify} messages. + * @param message DriveCabinetState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IDriveCabinetState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DriveCabinetState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DriveCabinetState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.DriveCabinetState; + + /** + * Decodes a DriveCabinetState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DriveCabinetState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.DriveCabinetState; + + /** + * Verifies a DriveCabinetState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DriveCabinetState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DriveCabinetState + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.DriveCabinetState; + + /** + * Creates a plain object from a DriveCabinetState message. Also converts values to other types if specified. + * @param message DriveCabinetState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.DriveCabinetState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DriveCabinetState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DriveCabinetState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchSetting. */ + interface IBatchSetting { + + /** BatchSetting coinChute */ + coinChute?: (number|null); + + /** BatchSetting buycardCost */ + buycardCost?: (number|null); + + /** BatchSetting gameCost */ + gameCost?: (number|null); + + /** BatchSetting continueCost */ + continueCost?: (number|null); + + /** BatchSetting fullcourseCost */ + fullcourseCost?: (number|null); + + /** BatchSetting freeplay */ + freeplay?: (number|null); + + /** BatchSetting winsAndRemains */ + winsAndRemains?: (number|null); + + /** BatchSetting eventMode */ + eventMode?: (number|null); + + /** BatchSetting eventModeDist */ + eventModeDist?: (number|null); + + /** BatchSetting closeType */ + closeType?: (number|null); + + /** BatchSetting closeSun */ + closeSun?: (number|null); + + /** BatchSetting closeMon */ + closeMon?: (number|null); + + /** BatchSetting closeTue */ + closeTue?: (number|null); + + /** BatchSetting closeWed */ + closeWed?: (number|null); + + /** BatchSetting closeThu */ + closeThu?: (number|null); + + /** BatchSetting closeFri */ + closeFri?: (number|null); + + /** BatchSetting closeSat */ + closeSat?: (number|null); + + /** BatchSetting closeDay */ + closeDay?: (number|null); + + /** BatchSetting softwareRevision */ + softwareRevision?: (number|null); + + /** BatchSetting syncTime */ + syncTime?: (number|null); + + /** BatchSetting eventModeCount */ + eventModeCount?: (number|null); + + /** BatchSetting timeZoneType */ + timeZoneType?: (number|null); + + /** BatchSetting timeDayLight */ + timeDayLight?: (number|null); + + /** BatchSetting clockOffset */ + clockOffset?: (number|null); + + /** BatchSetting eventModeSerial */ + eventModeSerial?: (string|null); + + /** BatchSetting eventModeSerialEndAt */ + eventModeSerialEndAt?: (number|null); + + /** BatchSetting eventModeSerialErrorcode */ + eventModeSerialErrorcode?: (number|null); + + /** BatchSetting eventMode_2on2 */ + eventMode_2on2?: (number|null); + + /** BatchSetting wasTournamentScheduleSet */ + wasTournamentScheduleSet?: (number|null); + } + + /** Represents a BatchSetting. */ + class BatchSetting implements IBatchSetting { + + /** + * Constructs a new BatchSetting. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IBatchSetting); + + /** BatchSetting coinChute. */ + public coinChute: number; + + /** BatchSetting buycardCost. */ + public buycardCost: number; + + /** BatchSetting gameCost. */ + public gameCost: number; + + /** BatchSetting continueCost. */ + public continueCost: number; + + /** BatchSetting fullcourseCost. */ + public fullcourseCost: number; + + /** BatchSetting freeplay. */ + public freeplay: number; + + /** BatchSetting winsAndRemains. */ + public winsAndRemains: number; + + /** BatchSetting eventMode. */ + public eventMode: number; + + /** BatchSetting eventModeDist. */ + public eventModeDist: number; + + /** BatchSetting closeType. */ + public closeType: number; + + /** BatchSetting closeSun. */ + public closeSun: number; + + /** BatchSetting closeMon. */ + public closeMon: number; + + /** BatchSetting closeTue. */ + public closeTue: number; + + /** BatchSetting closeWed. */ + public closeWed: number; + + /** BatchSetting closeThu. */ + public closeThu: number; + + /** BatchSetting closeFri. */ + public closeFri: number; + + /** BatchSetting closeSat. */ + public closeSat: number; + + /** BatchSetting closeDay. */ + public closeDay: number; + + /** BatchSetting softwareRevision. */ + public softwareRevision: number; + + /** BatchSetting syncTime. */ + public syncTime: number; + + /** BatchSetting eventModeCount. */ + public eventModeCount: number; + + /** BatchSetting timeZoneType. */ + public timeZoneType: number; + + /** BatchSetting timeDayLight. */ + public timeDayLight: number; + + /** BatchSetting clockOffset. */ + public clockOffset: number; + + /** BatchSetting eventModeSerial. */ + public eventModeSerial: string; + + /** BatchSetting eventModeSerialEndAt. */ + public eventModeSerialEndAt: number; + + /** BatchSetting eventModeSerialErrorcode. */ + public eventModeSerialErrorcode: number; + + /** BatchSetting eventMode_2on2. */ + public eventMode_2on2: number; + + /** BatchSetting wasTournamentScheduleSet. */ + public wasTournamentScheduleSet: number; + + /** + * Creates a new BatchSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchSetting instance + */ + public static create(properties?: wm.protobuf.IBatchSetting): wm.protobuf.BatchSetting; + + /** + * Encodes the specified BatchSetting message. Does not implicitly {@link wm.protobuf.BatchSetting.verify|verify} messages. + * @param message BatchSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IBatchSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchSetting message, length delimited. Does not implicitly {@link wm.protobuf.BatchSetting.verify|verify} messages. + * @param message BatchSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IBatchSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.BatchSetting; + + /** + * Decodes a BatchSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.BatchSetting; + + /** + * Verifies a BatchSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchSetting + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.BatchSetting; + + /** + * Creates a plain object from a BatchSetting message. Also converts values to other types if specified. + * @param message BatchSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.BatchSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Information. */ + interface IInformation { + + /** Information systemMode */ + systemMode?: (number|null); + + /** Information syncId */ + syncId?: (number|null); + + /** Information attractMovieId */ + attractMovieId?: (number|null); + + /** Information attractRankingId */ + attractRankingId?: (number|null); + + /** Information attractRandomSeed */ + attractRandomSeed?: (number|null); + } + + /** Represents an Information. */ + class Information implements IInformation { + + /** + * Constructs a new Information. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IInformation); + + /** Information systemMode. */ + public systemMode: number; + + /** Information syncId. */ + public syncId: number; + + /** Information attractMovieId. */ + public attractMovieId: number; + + /** Information attractRankingId. */ + public attractRankingId: number; + + /** Information attractRandomSeed. */ + public attractRandomSeed: number; + + /** + * Creates a new Information instance using the specified properties. + * @param [properties] Properties to set + * @returns Information instance + */ + public static create(properties?: wm.protobuf.IInformation): wm.protobuf.Information; + + /** + * Encodes the specified Information message. Does not implicitly {@link wm.protobuf.Information.verify|verify} messages. + * @param message Information message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IInformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Information message, length delimited. Does not implicitly {@link wm.protobuf.Information.verify|verify} messages. + * @param message Information message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IInformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Information message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Information + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Information; + + /** + * Decodes an Information message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Information + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Information; + + /** + * Verifies an Information message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Information message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Information + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Information; + + /** + * Creates a plain object from an Information message. Also converts values to other types if specified. + * @param message Information + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Information, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Information to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Information + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RaceCar. */ + interface IRaceCar { + + /** RaceCar car */ + car: wm.protobuf.ICar; + + /** RaceCar rank */ + rank?: (number|null); + + /** RaceCar vsStarCount */ + vsStarCount?: (number|null); + + /** RaceCar vsConsecutiveWins */ + vsConsecutiveWins?: (number|null); + + /** RaceCar vsMedalsRankLevel */ + vsMedalsRankLevel?: (number|null); + + /** RaceCar wasClearedStoryWhithoutLosing */ + wasClearedStoryWhithoutLosing?: (boolean|null); + + /** RaceCar rgRegionMapScore */ + rgRegionMapScore?: (number[]|null); + } + + /** Represents a RaceCar. */ + class RaceCar implements IRaceCar { + + /** + * Constructs a new RaceCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRaceCar); + + /** RaceCar car. */ + public car: wm.protobuf.ICar; + + /** RaceCar rank. */ + public rank: number; + + /** RaceCar vsStarCount. */ + public vsStarCount: number; + + /** RaceCar vsConsecutiveWins. */ + public vsConsecutiveWins: number; + + /** RaceCar vsMedalsRankLevel. */ + public vsMedalsRankLevel: number; + + /** RaceCar wasClearedStoryWhithoutLosing. */ + public wasClearedStoryWhithoutLosing: boolean; + + /** RaceCar rgRegionMapScore. */ + public rgRegionMapScore: number[]; + + /** + * Creates a new RaceCar instance using the specified properties. + * @param [properties] Properties to set + * @returns RaceCar instance + */ + public static create(properties?: wm.protobuf.IRaceCar): wm.protobuf.RaceCar; + + /** + * Encodes the specified RaceCar message. Does not implicitly {@link wm.protobuf.RaceCar.verify|verify} messages. + * @param message RaceCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRaceCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RaceCar message, length delimited. Does not implicitly {@link wm.protobuf.RaceCar.verify|verify} messages. + * @param message RaceCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRaceCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RaceCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RaceCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RaceCar; + + /** + * Decodes a RaceCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RaceCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RaceCar; + + /** + * Verifies a RaceCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RaceCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RaceCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RaceCar; + + /** + * Creates a plain object from a RaceCar message. Also converts values to other types if specified. + * @param message RaceCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RaceCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RaceCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RaceCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TournamentCar. */ + interface ITournamentCar { + + /** TournamentCar name */ + name?: (string|null); + + /** TournamentCar carId */ + carId?: (number|null); + + /** TournamentCar entryNumber */ + entryNumber?: (number|null); + } + + /** Represents a TournamentCar. */ + class TournamentCar implements ITournamentCar { + + /** + * Constructs a new TournamentCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITournamentCar); + + /** TournamentCar name. */ + public name: string; + + /** TournamentCar carId. */ + public carId: number; + + /** TournamentCar entryNumber. */ + public entryNumber: number; + + /** + * Creates a new TournamentCar instance using the specified properties. + * @param [properties] Properties to set + * @returns TournamentCar instance + */ + public static create(properties?: wm.protobuf.ITournamentCar): wm.protobuf.TournamentCar; + + /** + * Encodes the specified TournamentCar message. Does not implicitly {@link wm.protobuf.TournamentCar.verify|verify} messages. + * @param message TournamentCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITournamentCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TournamentCar message, length delimited. Does not implicitly {@link wm.protobuf.TournamentCar.verify|verify} messages. + * @param message TournamentCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITournamentCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TournamentCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TournamentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TournamentCar; + + /** + * Decodes a TournamentCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TournamentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TournamentCar; + + /** + * Verifies a TournamentCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TournamentCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TournamentCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TournamentCar; + + /** + * Creates a plain object from a TournamentCar message. Also converts values to other types if specified. + * @param message TournamentCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TournamentCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TournamentCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TournamentCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TournamentCarList. */ + interface ITournamentCarList { + + /** TournamentCarList car_00 */ + car_00?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_01 */ + car_01?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_02 */ + car_02?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_03 */ + car_03?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_04 */ + car_04?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_05 */ + car_05?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_06 */ + car_06?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_07 */ + car_07?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_08 */ + car_08?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_09 */ + car_09?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_10 */ + car_10?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_11 */ + car_11?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_12 */ + car_12?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_13 */ + car_13?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_14 */ + car_14?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_15 */ + car_15?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_16 */ + car_16?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_17 */ + car_17?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_18 */ + car_18?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_19 */ + car_19?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_20 */ + car_20?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_21 */ + car_21?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_22 */ + car_22?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_23 */ + car_23?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_24 */ + car_24?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_25 */ + car_25?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_26 */ + car_26?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_27 */ + car_27?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_28 */ + car_28?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_29 */ + car_29?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_30 */ + car_30?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_31 */ + car_31?: (wm.protobuf.ITournamentCar|null); + } + + /** Represents a TournamentCarList. */ + class TournamentCarList implements ITournamentCarList { + + /** + * Constructs a new TournamentCarList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITournamentCarList); + + /** TournamentCarList car_00. */ + public car_00?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_01. */ + public car_01?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_02. */ + public car_02?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_03. */ + public car_03?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_04. */ + public car_04?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_05. */ + public car_05?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_06. */ + public car_06?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_07. */ + public car_07?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_08. */ + public car_08?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_09. */ + public car_09?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_10. */ + public car_10?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_11. */ + public car_11?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_12. */ + public car_12?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_13. */ + public car_13?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_14. */ + public car_14?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_15. */ + public car_15?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_16. */ + public car_16?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_17. */ + public car_17?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_18. */ + public car_18?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_19. */ + public car_19?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_20. */ + public car_20?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_21. */ + public car_21?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_22. */ + public car_22?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_23. */ + public car_23?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_24. */ + public car_24?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_25. */ + public car_25?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_26. */ + public car_26?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_27. */ + public car_27?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_28. */ + public car_28?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_29. */ + public car_29?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_30. */ + public car_30?: (wm.protobuf.ITournamentCar|null); + + /** TournamentCarList car_31. */ + public car_31?: (wm.protobuf.ITournamentCar|null); + + /** + * Creates a new TournamentCarList instance using the specified properties. + * @param [properties] Properties to set + * @returns TournamentCarList instance + */ + public static create(properties?: wm.protobuf.ITournamentCarList): wm.protobuf.TournamentCarList; + + /** + * Encodes the specified TournamentCarList message. Does not implicitly {@link wm.protobuf.TournamentCarList.verify|verify} messages. + * @param message TournamentCarList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITournamentCarList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TournamentCarList message, length delimited. Does not implicitly {@link wm.protobuf.TournamentCarList.verify|verify} messages. + * @param message TournamentCarList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITournamentCarList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TournamentCarList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TournamentCarList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TournamentCarList; + + /** + * Decodes a TournamentCarList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TournamentCarList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TournamentCarList; + + /** + * Verifies a TournamentCarList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TournamentCarList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TournamentCarList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TournamentCarList; + + /** + * Creates a plain object from a TournamentCarList message. Also converts values to other types if specified. + * @param message TournamentCarList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TournamentCarList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TournamentCarList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TournamentCarList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TournamentRaceData. */ + interface ITournamentRaceData { + + /** TournamentRaceData raceNumber */ + raceNumber?: (number|null); + + /** TournamentRaceData roundNumber */ + roundNumber?: (number|null); + + /** TournamentRaceData gameNumber */ + gameNumber?: (number|null); + + /** TournamentRaceData player_00 */ + player_00: number; + + /** TournamentRaceData player_01 */ + player_01: number; + + /** TournamentRaceData player_02 */ + player_02: number; + + /** TournamentRaceData player_03 */ + player_03: number; + + /** TournamentRaceData result_00 */ + result_00: number; + + /** TournamentRaceData result_01 */ + result_01: number; + + /** TournamentRaceData result_02 */ + result_02: number; + + /** TournamentRaceData result_03 */ + result_03: number; + } + + /** Represents a TournamentRaceData. */ + class TournamentRaceData implements ITournamentRaceData { + + /** + * Constructs a new TournamentRaceData. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITournamentRaceData); + + /** TournamentRaceData raceNumber. */ + public raceNumber: number; + + /** TournamentRaceData roundNumber. */ + public roundNumber: number; + + /** TournamentRaceData gameNumber. */ + public gameNumber: number; + + /** TournamentRaceData player_00. */ + public player_00: number; + + /** TournamentRaceData player_01. */ + public player_01: number; + + /** TournamentRaceData player_02. */ + public player_02: number; + + /** TournamentRaceData player_03. */ + public player_03: number; + + /** TournamentRaceData result_00. */ + public result_00: number; + + /** TournamentRaceData result_01. */ + public result_01: number; + + /** TournamentRaceData result_02. */ + public result_02: number; + + /** TournamentRaceData result_03. */ + public result_03: number; + + /** + * Creates a new TournamentRaceData instance using the specified properties. + * @param [properties] Properties to set + * @returns TournamentRaceData instance + */ + public static create(properties?: wm.protobuf.ITournamentRaceData): wm.protobuf.TournamentRaceData; + + /** + * Encodes the specified TournamentRaceData message. Does not implicitly {@link wm.protobuf.TournamentRaceData.verify|verify} messages. + * @param message TournamentRaceData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITournamentRaceData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TournamentRaceData message, length delimited. Does not implicitly {@link wm.protobuf.TournamentRaceData.verify|verify} messages. + * @param message TournamentRaceData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITournamentRaceData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TournamentRaceData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TournamentRaceData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TournamentRaceData; + + /** + * Decodes a TournamentRaceData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TournamentRaceData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TournamentRaceData; + + /** + * Verifies a TournamentRaceData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TournamentRaceData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TournamentRaceData + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TournamentRaceData; + + /** + * Creates a plain object from a TournamentRaceData message. Also converts values to other types if specified. + * @param message TournamentRaceData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TournamentRaceData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TournamentRaceData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TournamentRaceData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TournamentRaceDataList. */ + interface ITournamentRaceDataList { + + /** TournamentRaceDataList raceData_00 */ + raceData_00?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_01 */ + raceData_01?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_02 */ + raceData_02?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_03 */ + raceData_03?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_04 */ + raceData_04?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_05 */ + raceData_05?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_06 */ + raceData_06?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_07 */ + raceData_07?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_08 */ + raceData_08?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_09 */ + raceData_09?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_10 */ + raceData_10?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_11 */ + raceData_11?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_12 */ + raceData_12?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_13 */ + raceData_13?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_14 */ + raceData_14?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_15 */ + raceData_15?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_16 */ + raceData_16?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_17 */ + raceData_17?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_18 */ + raceData_18?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_19 */ + raceData_19?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_20 */ + raceData_20?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_21 */ + raceData_21?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_22 */ + raceData_22?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_23 */ + raceData_23?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_24 */ + raceData_24?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_25 */ + raceData_25?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_26 */ + raceData_26?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_27 */ + raceData_27?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_28 */ + raceData_28?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_29 */ + raceData_29?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_30 */ + raceData_30?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_31 */ + raceData_31?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_32 */ + raceData_32?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_33 */ + raceData_33?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_34 */ + raceData_34?: (wm.protobuf.ITournamentRaceData|null); + } + + /** Represents a TournamentRaceDataList. */ + class TournamentRaceDataList implements ITournamentRaceDataList { + + /** + * Constructs a new TournamentRaceDataList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITournamentRaceDataList); + + /** TournamentRaceDataList raceData_00. */ + public raceData_00?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_01. */ + public raceData_01?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_02. */ + public raceData_02?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_03. */ + public raceData_03?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_04. */ + public raceData_04?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_05. */ + public raceData_05?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_06. */ + public raceData_06?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_07. */ + public raceData_07?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_08. */ + public raceData_08?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_09. */ + public raceData_09?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_10. */ + public raceData_10?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_11. */ + public raceData_11?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_12. */ + public raceData_12?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_13. */ + public raceData_13?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_14. */ + public raceData_14?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_15. */ + public raceData_15?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_16. */ + public raceData_16?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_17. */ + public raceData_17?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_18. */ + public raceData_18?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_19. */ + public raceData_19?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_20. */ + public raceData_20?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_21. */ + public raceData_21?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_22. */ + public raceData_22?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_23. */ + public raceData_23?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_24. */ + public raceData_24?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_25. */ + public raceData_25?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_26. */ + public raceData_26?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_27. */ + public raceData_27?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_28. */ + public raceData_28?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_29. */ + public raceData_29?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_30. */ + public raceData_30?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_31. */ + public raceData_31?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_32. */ + public raceData_32?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_33. */ + public raceData_33?: (wm.protobuf.ITournamentRaceData|null); + + /** TournamentRaceDataList raceData_34. */ + public raceData_34?: (wm.protobuf.ITournamentRaceData|null); + + /** + * Creates a new TournamentRaceDataList instance using the specified properties. + * @param [properties] Properties to set + * @returns TournamentRaceDataList instance + */ + public static create(properties?: wm.protobuf.ITournamentRaceDataList): wm.protobuf.TournamentRaceDataList; + + /** + * Encodes the specified TournamentRaceDataList message. Does not implicitly {@link wm.protobuf.TournamentRaceDataList.verify|verify} messages. + * @param message TournamentRaceDataList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITournamentRaceDataList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TournamentRaceDataList message, length delimited. Does not implicitly {@link wm.protobuf.TournamentRaceDataList.verify|verify} messages. + * @param message TournamentRaceDataList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITournamentRaceDataList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TournamentRaceDataList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TournamentRaceDataList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TournamentRaceDataList; + + /** + * Decodes a TournamentRaceDataList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TournamentRaceDataList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TournamentRaceDataList; + + /** + * Verifies a TournamentRaceDataList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TournamentRaceDataList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TournamentRaceDataList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TournamentRaceDataList; + + /** + * Creates a plain object from a TournamentRaceDataList message. Also converts values to other types if specified. + * @param message TournamentRaceDataList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TournamentRaceDataList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TournamentRaceDataList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TournamentRaceDataList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TournamentResult. */ + interface ITournamentResult { + + /** TournamentResult car */ + car?: (wm.protobuf.ICar|null); + + /** TournamentResult rank */ + rank: number; + + /** TournamentResult entryNumber */ + entryNumber: number; + } + + /** Represents a TournamentResult. */ + class TournamentResult implements ITournamentResult { + + /** + * Constructs a new TournamentResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITournamentResult); + + /** TournamentResult car. */ + public car?: (wm.protobuf.ICar|null); + + /** TournamentResult rank. */ + public rank: number; + + /** TournamentResult entryNumber. */ + public entryNumber: number; + + /** + * Creates a new TournamentResult instance using the specified properties. + * @param [properties] Properties to set + * @returns TournamentResult instance + */ + public static create(properties?: wm.protobuf.ITournamentResult): wm.protobuf.TournamentResult; + + /** + * Encodes the specified TournamentResult message. Does not implicitly {@link wm.protobuf.TournamentResult.verify|verify} messages. + * @param message TournamentResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITournamentResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TournamentResult message, length delimited. Does not implicitly {@link wm.protobuf.TournamentResult.verify|verify} messages. + * @param message TournamentResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITournamentResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TournamentResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TournamentResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TournamentResult; + + /** + * Decodes a TournamentResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TournamentResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TournamentResult; + + /** + * Verifies a TournamentResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TournamentResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TournamentResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TournamentResult; + + /** + * Creates a plain object from a TournamentResult message. Also converts values to other types if specified. + * @param message TournamentResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TournamentResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TournamentResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TournamentResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TournamentResultList. */ + interface ITournamentResultList { + + /** TournamentResultList result_00 */ + result_00?: (wm.protobuf.ITournamentResult|null); + + /** TournamentResultList result_01 */ + result_01?: (wm.protobuf.ITournamentResult|null); + + /** TournamentResultList result_02 */ + result_02?: (wm.protobuf.ITournamentResult|null); + + /** TournamentResultList result_03 */ + result_03?: (wm.protobuf.ITournamentResult|null); + } + + /** Represents a TournamentResultList. */ + class TournamentResultList implements ITournamentResultList { + + /** + * Constructs a new TournamentResultList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITournamentResultList); + + /** TournamentResultList result_00. */ + public result_00?: (wm.protobuf.ITournamentResult|null); + + /** TournamentResultList result_01. */ + public result_01?: (wm.protobuf.ITournamentResult|null); + + /** TournamentResultList result_02. */ + public result_02?: (wm.protobuf.ITournamentResult|null); + + /** TournamentResultList result_03. */ + public result_03?: (wm.protobuf.ITournamentResult|null); + + /** + * Creates a new TournamentResultList instance using the specified properties. + * @param [properties] Properties to set + * @returns TournamentResultList instance + */ + public static create(properties?: wm.protobuf.ITournamentResultList): wm.protobuf.TournamentResultList; + + /** + * Encodes the specified TournamentResultList message. Does not implicitly {@link wm.protobuf.TournamentResultList.verify|verify} messages. + * @param message TournamentResultList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITournamentResultList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TournamentResultList message, length delimited. Does not implicitly {@link wm.protobuf.TournamentResultList.verify|verify} messages. + * @param message TournamentResultList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITournamentResultList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TournamentResultList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TournamentResultList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TournamentResultList; + + /** + * Decodes a TournamentResultList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TournamentResultList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TournamentResultList; + + /** + * Verifies a TournamentResultList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TournamentResultList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TournamentResultList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TournamentResultList; + + /** + * Creates a plain object from a TournamentResultList message. Also converts values to other types if specified. + * @param message TournamentResultList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TournamentResultList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TournamentResultList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TournamentResultList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Tournament. */ + interface ITournament { + + /** Tournament isEnableTournament */ + isEnableTournament: boolean; + + /** Tournament isClearTournament */ + isClearTournament: boolean; + + /** Tournament isEntryPlayerOnly */ + isEntryPlayerOnly?: (boolean|null); + + /** Tournament carList */ + carList?: (wm.protobuf.ITournamentCarList|null); + + /** Tournament raceDataList */ + raceDataList?: (wm.protobuf.ITournamentRaceDataList|null); + + /** Tournament isTournamentOn */ + isTournamentOn?: (boolean|null); + + /** Tournament holdYear */ + holdYear?: (number|null); + + /** Tournament holdMonth */ + holdMonth?: (number|null); + + /** Tournament holdDay */ + holdDay?: (number|null); + + /** Tournament entryHour */ + entryHour?: (number|null); + + /** Tournament entryMinute */ + entryMinute?: (number|null); + + /** Tournament tournamentStartHour */ + tournamentStartHour?: (number|null); + + /** Tournament tournamentStartMinute */ + tournamentStartMinute?: (number|null); + + /** Tournament competitionNum */ + competitionNum?: (number|null); + + /** Tournament participantNum */ + participantNum?: (number|null); + + /** Tournament surviverNumOfFirstRace */ + surviverNumOfFirstRace?: (number|null); + + /** Tournament nowRound */ + nowRound?: (number|null); + + /** Tournament playingGameNumber */ + playingGameNumber?: (number|null); + + /** Tournament isConfirmTournamentResult */ + isConfirmTournamentResult?: (boolean|null); + + /** Tournament isTournamentEntry */ + isTournamentEntry?: (boolean|null); + + /** Tournament resultList */ + resultList?: (wm.protobuf.ITournamentResultList|null); + + /** Tournament hasCommendationStarted */ + hasCommendationStarted?: (boolean|null); + + /** Tournament isCommendationRankAppeared */ + isCommendationRankAppeared?: (boolean|null); + + /** Tournament isCommendationEnded */ + isCommendationEnded?: (boolean|null); + + /** Tournament isNextRank */ + isNextRank?: (boolean|null); + + /** Tournament commendationPage */ + commendationPage?: (number|null); + + /** Tournament showCommendationAgain */ + showCommendationAgain?: (boolean|null); + } + + /** Represents a Tournament. */ + class Tournament implements ITournament { + + /** + * Constructs a new Tournament. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITournament); + + /** Tournament isEnableTournament. */ + public isEnableTournament: boolean; + + /** Tournament isClearTournament. */ + public isClearTournament: boolean; + + /** Tournament isEntryPlayerOnly. */ + public isEntryPlayerOnly: boolean; + + /** Tournament carList. */ + public carList?: (wm.protobuf.ITournamentCarList|null); + + /** Tournament raceDataList. */ + public raceDataList?: (wm.protobuf.ITournamentRaceDataList|null); + + /** Tournament isTournamentOn. */ + public isTournamentOn: boolean; + + /** Tournament holdYear. */ + public holdYear: number; + + /** Tournament holdMonth. */ + public holdMonth: number; + + /** Tournament holdDay. */ + public holdDay: number; + + /** Tournament entryHour. */ + public entryHour: number; + + /** Tournament entryMinute. */ + public entryMinute: number; + + /** Tournament tournamentStartHour. */ + public tournamentStartHour: number; + + /** Tournament tournamentStartMinute. */ + public tournamentStartMinute: number; + + /** Tournament competitionNum. */ + public competitionNum: number; + + /** Tournament participantNum. */ + public participantNum: number; + + /** Tournament surviverNumOfFirstRace. */ + public surviverNumOfFirstRace: number; + + /** Tournament nowRound. */ + public nowRound: number; + + /** Tournament playingGameNumber. */ + public playingGameNumber: number; + + /** Tournament isConfirmTournamentResult. */ + public isConfirmTournamentResult: boolean; + + /** Tournament isTournamentEntry. */ + public isTournamentEntry: boolean; + + /** Tournament resultList. */ + public resultList?: (wm.protobuf.ITournamentResultList|null); + + /** Tournament hasCommendationStarted. */ + public hasCommendationStarted: boolean; + + /** Tournament isCommendationRankAppeared. */ + public isCommendationRankAppeared: boolean; + + /** Tournament isCommendationEnded. */ + public isCommendationEnded: boolean; + + /** Tournament isNextRank. */ + public isNextRank: boolean; + + /** Tournament commendationPage. */ + public commendationPage: number; + + /** Tournament showCommendationAgain. */ + public showCommendationAgain: boolean; + + /** + * Creates a new Tournament instance using the specified properties. + * @param [properties] Properties to set + * @returns Tournament instance + */ + public static create(properties?: wm.protobuf.ITournament): wm.protobuf.Tournament; + + /** + * Encodes the specified Tournament message. Does not implicitly {@link wm.protobuf.Tournament.verify|verify} messages. + * @param message Tournament message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITournament, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Tournament message, length delimited. Does not implicitly {@link wm.protobuf.Tournament.verify|verify} messages. + * @param message Tournament message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITournament, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tournament message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Tournament + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Tournament; + + /** + * Decodes a Tournament message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Tournament + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Tournament; + + /** + * Verifies a Tournament message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Tournament message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tournament + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Tournament; + + /** + * Creates a plain object from a Tournament message. Also converts values to other types if specified. + * @param message Tournament + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Tournament, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Tournament to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Tournament + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Message. */ + interface IMessage { + + /** Message racePacket */ + racePacket?: (Uint8Array|null); + + /** Message raceCar */ + raceCar?: (Uint8Array|null); + + /** Message course */ + course?: (wm.protobuf.ICourse|null); + + /** Message vsOk */ + vsOk?: (number|null); + + /** Message heartBeat */ + heartBeat?: (wm.protobuf.IHeartBeat|null); + + /** Message batchSettingState */ + batchSettingState?: (number|null); + + /** Message driveCabinetState */ + driveCabinetState?: (wm.protobuf.IDriveCabinetState|null); + + /** Message batchSetting */ + batchSetting?: (wm.protobuf.IBatchSetting|null); + + /** Message information */ + information?: (wm.protobuf.IInformation|null); + + /** Message featureVersion */ + featureVersion?: (wm.protobuf.IGameFeatureVersion|null); + + /** Message tournament */ + tournament?: (wm.protobuf.ITournament|null); + } + + /** Represents a Message. */ + class Message implements IMessage { + + /** + * Constructs a new Message. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IMessage); + + /** Message racePacket. */ + public racePacket: Uint8Array; + + /** Message raceCar. */ + public raceCar: Uint8Array; + + /** Message course. */ + public course?: (wm.protobuf.ICourse|null); + + /** Message vsOk. */ + public vsOk: number; + + /** Message heartBeat. */ + public heartBeat?: (wm.protobuf.IHeartBeat|null); + + /** Message batchSettingState. */ + public batchSettingState: number; + + /** Message driveCabinetState. */ + public driveCabinetState?: (wm.protobuf.IDriveCabinetState|null); + + /** Message batchSetting. */ + public batchSetting?: (wm.protobuf.IBatchSetting|null); + + /** Message information. */ + public information?: (wm.protobuf.IInformation|null); + + /** Message featureVersion. */ + public featureVersion?: (wm.protobuf.IGameFeatureVersion|null); + + /** Message tournament. */ + public tournament?: (wm.protobuf.ITournament|null); + + /** + * Creates a new Message instance using the specified properties. + * @param [properties] Properties to set + * @returns Message instance + */ + public static create(properties?: wm.protobuf.IMessage): wm.protobuf.Message; + + /** + * Encodes the specified Message message. Does not implicitly {@link wm.protobuf.Message.verify|verify} messages. + * @param message Message message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Message message, length delimited. Does not implicitly {@link wm.protobuf.Message.verify|verify} messages. + * @param message Message message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Message message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Message; + + /** + * Decodes a Message message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Message; + + /** + * Verifies a Message message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Message message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Message + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Message; + + /** + * Creates a plain object from a Message message. Also converts values to other types if specified. + * @param message Message + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Message, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Message to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Message + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterSystemInfoRequest. */ + interface IRegisterSystemInfoRequest { + + /** RegisterSystemInfoRequest pcbSerial */ + pcbSerial: string; + + /** RegisterSystemInfoRequest terminalType */ + terminalType: wm.protobuf.TerminalType; + + /** RegisterSystemInfoRequest romVersion */ + romVersion: number; + + /** RegisterSystemInfoRequest country */ + country: string; + + /** RegisterSystemInfoRequest lineType */ + lineType: wm.protobuf.LineType; + + /** RegisterSystemInfoRequest shopName */ + shopName: string; + + /** RegisterSystemInfoRequest shopNickname */ + shopNickname: string; + + /** RegisterSystemInfoRequest allnetPlaceId */ + allnetPlaceId?: (number|null); + + /** RegisterSystemInfoRequest allnetRegion0 */ + allnetRegion0?: (number|null); + + /** RegisterSystemInfoRequest muchaPlaceId */ + muchaPlaceId?: (string|null); + + /** RegisterSystemInfoRequest muchaPrefectureId */ + muchaPrefectureId?: (number|null); + + /** RegisterSystemInfoRequest regionName0 */ + regionName0: string; + + /** RegisterSystemInfoRequest regionName1 */ + regionName1: string; + + /** RegisterSystemInfoRequest regionName2 */ + regionName2: string; + + /** RegisterSystemInfoRequest regionName3 */ + regionName3: string; + + /** RegisterSystemInfoRequest timezoneOffset */ + timezoneOffset: number; + + /** RegisterSystemInfoRequest systemSetting */ + systemSetting: wm.protobuf.ISystemSetting; + + /** RegisterSystemInfoRequest errorLogs */ + errorLogs?: (wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry[]|null); + } + + /** Represents a RegisterSystemInfoRequest. */ + class RegisterSystemInfoRequest implements IRegisterSystemInfoRequest { + + /** + * Constructs a new RegisterSystemInfoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemInfoRequest); + + /** RegisterSystemInfoRequest pcbSerial. */ + public pcbSerial: string; + + /** RegisterSystemInfoRequest terminalType. */ + public terminalType: wm.protobuf.TerminalType; + + /** RegisterSystemInfoRequest romVersion. */ + public romVersion: number; + + /** RegisterSystemInfoRequest country. */ + public country: string; + + /** RegisterSystemInfoRequest lineType. */ + public lineType: wm.protobuf.LineType; + + /** RegisterSystemInfoRequest shopName. */ + public shopName: string; + + /** RegisterSystemInfoRequest shopNickname. */ + public shopNickname: string; + + /** RegisterSystemInfoRequest allnetPlaceId. */ + public allnetPlaceId: number; + + /** RegisterSystemInfoRequest allnetRegion0. */ + public allnetRegion0: number; + + /** RegisterSystemInfoRequest muchaPlaceId. */ + public muchaPlaceId: string; + + /** RegisterSystemInfoRequest muchaPrefectureId. */ + public muchaPrefectureId: number; + + /** RegisterSystemInfoRequest regionName0. */ + public regionName0: string; + + /** RegisterSystemInfoRequest regionName1. */ + public regionName1: string; + + /** RegisterSystemInfoRequest regionName2. */ + public regionName2: string; + + /** RegisterSystemInfoRequest regionName3. */ + public regionName3: string; + + /** RegisterSystemInfoRequest timezoneOffset. */ + public timezoneOffset: number; + + /** RegisterSystemInfoRequest systemSetting. */ + public systemSetting: wm.protobuf.ISystemSetting; + + /** RegisterSystemInfoRequest errorLogs. */ + public errorLogs: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry[]; + + /** + * Creates a new RegisterSystemInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemInfoRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemInfoRequest): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Encodes the specified RegisterSystemInfoRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @param message RegisterSystemInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @param message RegisterSystemInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Verifies a RegisterSystemInfoRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemInfoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemInfoRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Creates a plain object from a RegisterSystemInfoRequest message. Also converts values to other types if specified. + * @param message RegisterSystemInfoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemInfoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemInfoRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RegisterSystemInfoRequest { + + /** Properties of an ErrorLogEntry. */ + interface IErrorLogEntry { + + /** ErrorLogEntry datetime */ + datetime: number; + + /** ErrorLogEntry message */ + message: string; + } + + /** Represents an ErrorLogEntry. */ + class ErrorLogEntry implements IErrorLogEntry { + + /** + * Constructs a new ErrorLogEntry. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry); + + /** ErrorLogEntry datetime. */ + public datetime: number; + + /** ErrorLogEntry message. */ + public message: string; + + /** + * Creates a new ErrorLogEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorLogEntry instance + */ + public static create(properties?: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Encodes the specified ErrorLogEntry message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @param message ErrorLogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorLogEntry message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @param message ErrorLogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Verifies an ErrorLogEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ErrorLogEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorLogEntry + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Creates a plain object from an ErrorLogEntry message. Also converts values to other types if specified. + * @param message ErrorLogEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorLogEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorLogEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RegisterSystemInfoResponse. */ + interface IRegisterSystemInfoResponse { + + /** RegisterSystemInfoResponse error */ + error: wm.protobuf.ErrorCode; + + /** RegisterSystemInfoResponse regionId */ + regionId: number; + + /** RegisterSystemInfoResponse placeId */ + placeId: string; + + /** RegisterSystemInfoResponse allowedClientLogTypes */ + allowedClientLogTypes?: (wm.protobuf.ClientLogType[]|null); + + /** RegisterSystemInfoResponse featureVersion */ + featureVersion: wm.protobuf.IGameFeatureVersion; + + /** RegisterSystemInfoResponse latestCompetitionId */ + latestCompetitionId?: (number|null); + + /** RegisterSystemInfoResponse competitionSchedule */ + competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** RegisterSystemInfoResponse scratchNotes */ + scratchNotes?: (string|null); + + /** RegisterSystemInfoResponse inviteFriendCampaignSchedule */ + inviteFriendCampaignSchedule?: (wm.protobuf.IInviteFriendCampaignSchedule|null); + + /** RegisterSystemInfoResponse ghostSelectionMinRedoWait */ + ghostSelectionMinRedoWait: number; + + /** RegisterSystemInfoResponse ghostSelectionMaxRedoWait */ + ghostSelectionMaxRedoWait: number; + } + + /** Represents a RegisterSystemInfoResponse. */ + class RegisterSystemInfoResponse implements IRegisterSystemInfoResponse { + + /** + * Constructs a new RegisterSystemInfoResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemInfoResponse); + + /** RegisterSystemInfoResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** RegisterSystemInfoResponse regionId. */ + public regionId: number; + + /** RegisterSystemInfoResponse placeId. */ + public placeId: string; + + /** RegisterSystemInfoResponse allowedClientLogTypes. */ + public allowedClientLogTypes: wm.protobuf.ClientLogType[]; + + /** RegisterSystemInfoResponse featureVersion. */ + public featureVersion: wm.protobuf.IGameFeatureVersion; + + /** RegisterSystemInfoResponse latestCompetitionId. */ + public latestCompetitionId: number; + + /** RegisterSystemInfoResponse competitionSchedule. */ + public competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** RegisterSystemInfoResponse scratchNotes. */ + public scratchNotes: string; + + /** RegisterSystemInfoResponse inviteFriendCampaignSchedule. */ + public inviteFriendCampaignSchedule?: (wm.protobuf.IInviteFriendCampaignSchedule|null); + + /** RegisterSystemInfoResponse ghostSelectionMinRedoWait. */ + public ghostSelectionMinRedoWait: number; + + /** RegisterSystemInfoResponse ghostSelectionMaxRedoWait. */ + public ghostSelectionMaxRedoWait: number; + + /** + * Creates a new RegisterSystemInfoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemInfoResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemInfoResponse): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Encodes the specified RegisterSystemInfoResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @param message RegisterSystemInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @param message RegisterSystemInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Verifies a RegisterSystemInfoResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemInfoResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemInfoResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Creates a plain object from a RegisterSystemInfoResponse message. Also converts values to other types if specified. + * @param message RegisterSystemInfoResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemInfoResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemInfoResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterSystemStatsRequest. */ + interface IRegisterSystemStatsRequest { + + /** RegisterSystemStatsRequest pcbSerial */ + pcbSerial: string; + + /** RegisterSystemStatsRequest driveStats */ + driveStats?: (wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null); + + /** RegisterSystemStatsRequest terminalStats */ + terminalStats?: (wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null); + } + + /** Represents a RegisterSystemStatsRequest. */ + class RegisterSystemStatsRequest implements IRegisterSystemStatsRequest { + + /** + * Constructs a new RegisterSystemStatsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemStatsRequest); + + /** RegisterSystemStatsRequest pcbSerial. */ + public pcbSerial: string; + + /** RegisterSystemStatsRequest driveStats. */ + public driveStats?: (wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null); + + /** RegisterSystemStatsRequest terminalStats. */ + public terminalStats?: (wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null); + + /** + * Creates a new RegisterSystemStatsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemStatsRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemStatsRequest): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Encodes the specified RegisterSystemStatsRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @param message RegisterSystemStatsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemStatsRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @param message RegisterSystemStatsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Verifies a RegisterSystemStatsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemStatsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemStatsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Creates a plain object from a RegisterSystemStatsRequest message. Also converts values to other types if specified. + * @param message RegisterSystemStatsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemStatsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemStatsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RegisterSystemStatsRequest { + + /** Properties of a DriveStats. */ + interface IDriveStats { + + /** DriveStats operation */ + operation?: (number[]|null); + + /** DriveStats story */ + story?: (number[]|null); + + /** DriveStats versus */ + versus?: (number[]|null); + + /** DriveStats ghost */ + ghost?: (number[]|null); + + /** DriveStats timeAttack */ + timeAttack?: (number[]|null); + + /** DriveStats event */ + event?: (number[]|null); + } + + /** Represents a DriveStats. */ + class DriveStats implements IDriveStats { + + /** + * Constructs a new DriveStats. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.RegisterSystemStatsRequest.IDriveStats); + + /** DriveStats operation. */ + public operation: number[]; + + /** DriveStats story. */ + public story: number[]; + + /** DriveStats versus. */ + public versus: number[]; + + /** DriveStats ghost. */ + public ghost: number[]; + + /** DriveStats timeAttack. */ + public timeAttack: number[]; + + /** DriveStats event. */ + public event: number[]; + + /** + * Creates a new DriveStats instance using the specified properties. + * @param [properties] Properties to set + * @returns DriveStats instance + */ + public static create(properties?: wm.protobuf.RegisterSystemStatsRequest.IDriveStats): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Encodes the specified DriveStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @param message DriveStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.RegisterSystemStatsRequest.IDriveStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DriveStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @param message DriveStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.RegisterSystemStatsRequest.IDriveStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DriveStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Decodes a DriveStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Verifies a DriveStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DriveStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DriveStats + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Creates a plain object from a DriveStats message. Also converts values to other types if specified. + * @param message DriveStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsRequest.DriveStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DriveStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DriveStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TerminalStats. */ + interface ITerminalStats { + + /** TerminalStats operation */ + operation?: (number[]|null); + } + + /** Represents a TerminalStats. */ + class TerminalStats implements ITerminalStats { + + /** + * Constructs a new TerminalStats. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats); + + /** TerminalStats operation. */ + public operation: number[]; + + /** + * Creates a new TerminalStats instance using the specified properties. + * @param [properties] Properties to set + * @returns TerminalStats instance + */ + public static create(properties?: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Encodes the specified TerminalStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @param message TerminalStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerminalStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @param message TerminalStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerminalStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Decodes a TerminalStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Verifies a TerminalStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerminalStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerminalStats + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Creates a plain object from a TerminalStats message. Also converts values to other types if specified. + * @param message TerminalStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsRequest.TerminalStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerminalStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerminalStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RegisterSystemStatsResponse. */ + interface IRegisterSystemStatsResponse { + + /** RegisterSystemStatsResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a RegisterSystemStatsResponse. */ + class RegisterSystemStatsResponse implements IRegisterSystemStatsResponse { + + /** + * Constructs a new RegisterSystemStatsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemStatsResponse); + + /** RegisterSystemStatsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new RegisterSystemStatsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemStatsResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemStatsResponse): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Encodes the specified RegisterSystemStatsResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @param message RegisterSystemStatsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemStatsResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @param message RegisterSystemStatsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Verifies a RegisterSystemStatsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemStatsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemStatsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Creates a plain object from a RegisterSystemStatsResponse message. Also converts values to other types if specified. + * @param message RegisterSystemStatsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemStatsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemStatsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterGhostTrailRequest. */ + interface IRegisterGhostTrailRequest { + + /** RegisterGhostTrailRequest ghostSessionId */ + ghostSessionId: (number|Long); + + /** RegisterGhostTrailRequest ghost */ + ghost: wm.protobuf.IGhostCar; + + /** RegisterGhostTrailRequest trail */ + trail: Uint8Array; + + /** RegisterGhostTrailRequest time */ + time?: (number|null); + + /** RegisterGhostTrailRequest driveData */ + driveData?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByArea */ + trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByCar */ + trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByUser */ + trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + } + + /** Represents a RegisterGhostTrailRequest. */ + class RegisterGhostTrailRequest implements IRegisterGhostTrailRequest { + + /** + * Constructs a new RegisterGhostTrailRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterGhostTrailRequest); + + /** RegisterGhostTrailRequest ghostSessionId. */ + public ghostSessionId: (number|Long); + + /** RegisterGhostTrailRequest ghost. */ + public ghost: wm.protobuf.IGhostCar; + + /** RegisterGhostTrailRequest trail. */ + public trail: Uint8Array; + + /** RegisterGhostTrailRequest time. */ + public time: number; + + /** RegisterGhostTrailRequest driveData. */ + public driveData?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByArea. */ + public trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByCar. */ + public trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByUser. */ + public trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + + /** + * Creates a new RegisterGhostTrailRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterGhostTrailRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterGhostTrailRequest): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Encodes the specified RegisterGhostTrailRequest message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @param message RegisterGhostTrailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterGhostTrailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterGhostTrailRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @param message RegisterGhostTrailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterGhostTrailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Verifies a RegisterGhostTrailRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterGhostTrailRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterGhostTrailRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Creates a plain object from a RegisterGhostTrailRequest message. Also converts values to other types if specified. + * @param message RegisterGhostTrailRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterGhostTrailRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterGhostTrailRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterGhostTrailRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterGhostTrailResponse. */ + interface IRegisterGhostTrailResponse { + + /** RegisterGhostTrailResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a RegisterGhostTrailResponse. */ + class RegisterGhostTrailResponse implements IRegisterGhostTrailResponse { + + /** + * Constructs a new RegisterGhostTrailResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterGhostTrailResponse); + + /** RegisterGhostTrailResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new RegisterGhostTrailResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterGhostTrailResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterGhostTrailResponse): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Encodes the specified RegisterGhostTrailResponse message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @param message RegisterGhostTrailResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterGhostTrailResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterGhostTrailResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @param message RegisterGhostTrailResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterGhostTrailResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Verifies a RegisterGhostTrailResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterGhostTrailResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterGhostTrailResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Creates a plain object from a RegisterGhostTrailResponse message. Also converts values to other types if specified. + * @param message RegisterGhostTrailResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterGhostTrailResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterGhostTrailResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterGhostTrailResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadUserRequest. */ + interface ILoadUserRequest { + + /** LoadUserRequest cardChipId */ + cardChipId?: (string|null); + + /** LoadUserRequest accessCode */ + accessCode?: (string|null); + + /** LoadUserRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** LoadUserRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** LoadUserRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** LoadUserRequest userId */ + userId?: (number|null); + + /** LoadUserRequest romVersion */ + romVersion: number; + + /** LoadUserRequest maxCars */ + maxCars: number; + + /** LoadUserRequest createUser */ + createUser?: (boolean|null); + } + + /** Represents a LoadUserRequest. */ + class LoadUserRequest implements ILoadUserRequest { + + /** + * Constructs a new LoadUserRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUserRequest); + + /** LoadUserRequest cardChipId. */ + public cardChipId: string; + + /** LoadUserRequest accessCode. */ + public accessCode: string; + + /** LoadUserRequest cardTypeCode. */ + public cardTypeCode: number; + + /** LoadUserRequest cardRegionCode. */ + public cardRegionCode: number; + + /** LoadUserRequest device. */ + public device: wm.protobuf.DeviceType; + + /** LoadUserRequest userId. */ + public userId: number; + + /** LoadUserRequest romVersion. */ + public romVersion: number; + + /** LoadUserRequest maxCars. */ + public maxCars: number; + + /** LoadUserRequest createUser. */ + public createUser: boolean; + + /** + * Creates a new LoadUserRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUserRequest instance + */ + public static create(properties?: wm.protobuf.ILoadUserRequest): wm.protobuf.LoadUserRequest; + + /** + * Encodes the specified LoadUserRequest message. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @param message LoadUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @param message LoadUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUserRequest; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUserRequest; + + /** + * Verifies a LoadUserRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUserRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUserRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUserRequest; + + /** + * Creates a plain object from a LoadUserRequest message. Also converts values to other types if specified. + * @param message LoadUserRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUserRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUserRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUserRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadUserResponse. */ + interface ILoadUserResponse { + + /** LoadUserResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadUserResponse unlockAt */ + unlockAt?: (number|null); + + /** LoadUserResponse accessCode */ + accessCode?: (string|null); + + /** LoadUserResponse banapassportAmId */ + banapassportAmId?: (number|null); + + /** LoadUserResponse mbid */ + mbid?: (number|null); + + /** LoadUserResponse userId */ + userId?: (number|null); + + /** LoadUserResponse numOfOwnedCars */ + numOfOwnedCars: number; + + /** LoadUserResponse cars */ + cars?: (wm.protobuf.ICar[]|null); + + /** LoadUserResponse carStates */ + carStates?: (wm.protobuf.LoadUserResponse.ICarState[]|null); + + /** LoadUserResponse unusedCarTickets */ + unusedCarTickets?: (wm.protobuf.IUserItem[]|null); + + /** LoadUserResponse tutorials */ + tutorials?: (boolean[]|null); + + /** LoadUserResponse competitionUserState */ + competitionUserState?: (wm.protobuf.GhostCompetitionParticipantState|null); + + /** LoadUserResponse windowStickerString */ + windowStickerString?: (string|null); + + /** LoadUserResponse windowStickerFont */ + windowStickerFont?: (number|null); + + /** LoadUserResponse spappState */ + spappState: wm.protobuf.SmartphoneAppState; + + /** LoadUserResponse transferState */ + transferState: wm.protobuf.TransferState; + + /** LoadUserResponse totalVsStarCount */ + totalVsStarCount?: (number|null); + + /** LoadUserResponse totalVsMedalPoint */ + totalVsMedalPoint?: (number|null); + + /** LoadUserResponse copiedCar */ + copiedCar?: (wm.protobuf.ICopiedCar|null); + + /** LoadUserResponse wasCreatedToday */ + wasCreatedToday?: (boolean|null); + + /** LoadUserResponse participatedInInviteFriendCampaign */ + participatedInInviteFriendCampaign?: (boolean|null); + } + + /** Represents a LoadUserResponse. */ + class LoadUserResponse implements ILoadUserResponse { + + /** + * Constructs a new LoadUserResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUserResponse); + + /** LoadUserResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadUserResponse unlockAt. */ + public unlockAt: number; + + /** LoadUserResponse accessCode. */ + public accessCode: string; + + /** LoadUserResponse banapassportAmId. */ + public banapassportAmId: number; + + /** LoadUserResponse mbid. */ + public mbid: number; + + /** LoadUserResponse userId. */ + public userId: number; + + /** LoadUserResponse numOfOwnedCars. */ + public numOfOwnedCars: number; + + /** LoadUserResponse cars. */ + public cars: wm.protobuf.ICar[]; + + /** LoadUserResponse carStates. */ + public carStates: wm.protobuf.LoadUserResponse.ICarState[]; + + /** LoadUserResponse unusedCarTickets. */ + public unusedCarTickets: wm.protobuf.IUserItem[]; + + /** LoadUserResponse tutorials. */ + public tutorials: boolean[]; + + /** LoadUserResponse competitionUserState. */ + public competitionUserState: wm.protobuf.GhostCompetitionParticipantState; + + /** LoadUserResponse windowStickerString. */ + public windowStickerString: string; + + /** LoadUserResponse windowStickerFont. */ + public windowStickerFont: number; + + /** LoadUserResponse spappState. */ + public spappState: wm.protobuf.SmartphoneAppState; + + /** LoadUserResponse transferState. */ + public transferState: wm.protobuf.TransferState; + + /** LoadUserResponse totalVsStarCount. */ + public totalVsStarCount: number; + + /** LoadUserResponse totalVsMedalPoint. */ + public totalVsMedalPoint: number; + + /** LoadUserResponse copiedCar. */ + public copiedCar?: (wm.protobuf.ICopiedCar|null); + + /** LoadUserResponse wasCreatedToday. */ + public wasCreatedToday: boolean; + + /** LoadUserResponse participatedInInviteFriendCampaign. */ + public participatedInInviteFriendCampaign: boolean; + + /** + * Creates a new LoadUserResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUserResponse instance + */ + public static create(properties?: wm.protobuf.ILoadUserResponse): wm.protobuf.LoadUserResponse; + + /** + * Encodes the specified LoadUserResponse message. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @param message LoadUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @param message LoadUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUserResponse; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUserResponse; + + /** + * Verifies a LoadUserResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUserResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUserResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUserResponse; + + /** + * Creates a plain object from a LoadUserResponse message. Also converts values to other types if specified. + * @param message LoadUserResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUserResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUserResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUserResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadUserResponse { + + /** Properties of a CarState. */ + interface ICarState { + + /** CarState hasOpponentGhost */ + hasOpponentGhost: boolean; + + /** CarState competitionState */ + competitionState?: (wm.protobuf.GhostCompetitionParticipantState|null); + + /** CarState toBeDeleted */ + toBeDeleted: boolean; + + /** CarState eventJoined */ + eventJoined: boolean; + + /** CarState transferred */ + transferred: boolean; + + /** CarState driveLastPlayedAt */ + driveLastPlayedAt?: (number|null); + } + + /** Represents a CarState. */ + class CarState implements ICarState { + + /** + * Constructs a new CarState. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadUserResponse.ICarState); + + /** CarState hasOpponentGhost. */ + public hasOpponentGhost: boolean; + + /** CarState competitionState. */ + public competitionState: wm.protobuf.GhostCompetitionParticipantState; + + /** CarState toBeDeleted. */ + public toBeDeleted: boolean; + + /** CarState eventJoined. */ + public eventJoined: boolean; + + /** CarState transferred. */ + public transferred: boolean; + + /** CarState driveLastPlayedAt. */ + public driveLastPlayedAt: number; + + /** + * Creates a new CarState instance using the specified properties. + * @param [properties] Properties to set + * @returns CarState instance + */ + public static create(properties?: wm.protobuf.LoadUserResponse.ICarState): wm.protobuf.LoadUserResponse.CarState; + + /** + * Encodes the specified CarState message. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @param message CarState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadUserResponse.ICarState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarState message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @param message CarState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadUserResponse.ICarState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUserResponse.CarState; + + /** + * Decodes a CarState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUserResponse.CarState; + + /** + * Verifies a CarState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarState + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUserResponse.CarState; + + /** + * Creates a plain object from a CarState message. Also converts values to other types if specified. + * @param message CarState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUserResponse.CarState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an UpdateUserSessionRequest. */ + interface IUpdateUserSessionRequest { + + /** UpdateUserSessionRequest userId */ + userId?: (number|null); + + /** UpdateUserSessionRequest cardChipId */ + cardChipId?: (string|null); + + /** UpdateUserSessionRequest accessCode */ + accessCode?: (string|null); + + /** UpdateUserSessionRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** UpdateUserSessionRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** UpdateUserSessionRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** UpdateUserSessionRequest unlockAt */ + unlockAt: number; + + /** UpdateUserSessionRequest acceptVs */ + acceptVs?: (boolean|null); + } + + /** Represents an UpdateUserSessionRequest. */ + class UpdateUserSessionRequest implements IUpdateUserSessionRequest { + + /** + * Constructs a new UpdateUserSessionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateUserSessionRequest); + + /** UpdateUserSessionRequest userId. */ + public userId: number; + + /** UpdateUserSessionRequest cardChipId. */ + public cardChipId: string; + + /** UpdateUserSessionRequest accessCode. */ + public accessCode: string; + + /** UpdateUserSessionRequest cardTypeCode. */ + public cardTypeCode: number; + + /** UpdateUserSessionRequest cardRegionCode. */ + public cardRegionCode: number; + + /** UpdateUserSessionRequest device. */ + public device: wm.protobuf.DeviceType; + + /** UpdateUserSessionRequest unlockAt. */ + public unlockAt: number; + + /** UpdateUserSessionRequest acceptVs. */ + public acceptVs: boolean; + + /** + * Creates a new UpdateUserSessionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserSessionRequest instance + */ + public static create(properties?: wm.protobuf.IUpdateUserSessionRequest): wm.protobuf.UpdateUserSessionRequest; + + /** + * Encodes the specified UpdateUserSessionRequest message. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @param message UpdateUserSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateUserSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserSessionRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @param message UpdateUserSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateUserSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateUserSessionRequest; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateUserSessionRequest; + + /** + * Verifies an UpdateUserSessionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateUserSessionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserSessionRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateUserSessionRequest; + + /** + * Creates a plain object from an UpdateUserSessionRequest message. Also converts values to other types if specified. + * @param message UpdateUserSessionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateUserSessionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserSessionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserSessionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateUserSessionResponse. */ + interface IUpdateUserSessionResponse { + + /** UpdateUserSessionResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents an UpdateUserSessionResponse. */ + class UpdateUserSessionResponse implements IUpdateUserSessionResponse { + + /** + * Constructs a new UpdateUserSessionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateUserSessionResponse); + + /** UpdateUserSessionResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new UpdateUserSessionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserSessionResponse instance + */ + public static create(properties?: wm.protobuf.IUpdateUserSessionResponse): wm.protobuf.UpdateUserSessionResponse; + + /** + * Encodes the specified UpdateUserSessionResponse message. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @param message UpdateUserSessionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateUserSessionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserSessionResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @param message UpdateUserSessionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateUserSessionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateUserSessionResponse; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateUserSessionResponse; + + /** + * Verifies an UpdateUserSessionResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateUserSessionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserSessionResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateUserSessionResponse; + + /** + * Creates a plain object from an UpdateUserSessionResponse message. Also converts values to other types if specified. + * @param message UpdateUserSessionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateUserSessionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserSessionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserSessionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadDriveInformationRequest. */ + interface ILoadDriveInformationRequest { + + /** LoadDriveInformationRequest userId */ + userId?: (number|null); + } + + /** Represents a LoadDriveInformationRequest. */ + class LoadDriveInformationRequest implements ILoadDriveInformationRequest { + + /** + * Constructs a new LoadDriveInformationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadDriveInformationRequest); + + /** LoadDriveInformationRequest userId. */ + public userId: number; + + /** + * Creates a new LoadDriveInformationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadDriveInformationRequest instance + */ + public static create(properties?: wm.protobuf.ILoadDriveInformationRequest): wm.protobuf.LoadDriveInformationRequest; + + /** + * Encodes the specified LoadDriveInformationRequest message. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @param message LoadDriveInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadDriveInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadDriveInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @param message LoadDriveInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadDriveInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadDriveInformationRequest; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadDriveInformationRequest; + + /** + * Verifies a LoadDriveInformationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadDriveInformationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadDriveInformationRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadDriveInformationRequest; + + /** + * Creates a plain object from a LoadDriveInformationRequest message. Also converts values to other types if specified. + * @param message LoadDriveInformationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadDriveInformationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadDriveInformationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadDriveInformationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadDriveInformationResponse. */ + interface ILoadDriveInformationResponse { + + /** LoadDriveInformationResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadDriveInformationResponse noticeWindow */ + noticeWindow?: (wm.protobuf.NoticeEntry[]|null); + + /** LoadDriveInformationResponse noticeWindowMessage */ + noticeWindowMessage?: (string[]|null); + + /** LoadDriveInformationResponse transferNotice */ + transferNotice?: (wm.protobuf.ITransferNotice|null); + + /** LoadDriveInformationResponse restrictedModels */ + restrictedModels?: (number[]|null); + + /** LoadDriveInformationResponse announceFeature */ + announceFeature?: (boolean|null); + + /** LoadDriveInformationResponse announceMobile */ + announceMobile?: (boolean|null); + + /** LoadDriveInformationResponse availableTickets */ + availableTickets?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a LoadDriveInformationResponse. */ + class LoadDriveInformationResponse implements ILoadDriveInformationResponse { + + /** + * Constructs a new LoadDriveInformationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadDriveInformationResponse); + + /** LoadDriveInformationResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadDriveInformationResponse noticeWindow. */ + public noticeWindow: wm.protobuf.NoticeEntry[]; + + /** LoadDriveInformationResponse noticeWindowMessage. */ + public noticeWindowMessage: string[]; + + /** LoadDriveInformationResponse transferNotice. */ + public transferNotice?: (wm.protobuf.ITransferNotice|null); + + /** LoadDriveInformationResponse restrictedModels. */ + public restrictedModels: number[]; + + /** LoadDriveInformationResponse announceFeature. */ + public announceFeature: boolean; + + /** LoadDriveInformationResponse announceMobile. */ + public announceMobile: boolean; + + /** LoadDriveInformationResponse availableTickets. */ + public availableTickets: wm.protobuf.IUserItem[]; + + /** + * Creates a new LoadDriveInformationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadDriveInformationResponse instance + */ + public static create(properties?: wm.protobuf.ILoadDriveInformationResponse): wm.protobuf.LoadDriveInformationResponse; + + /** + * Encodes the specified LoadDriveInformationResponse message. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @param message LoadDriveInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadDriveInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadDriveInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @param message LoadDriveInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadDriveInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadDriveInformationResponse; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadDriveInformationResponse; + + /** + * Verifies a LoadDriveInformationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadDriveInformationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadDriveInformationResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadDriveInformationResponse; + + /** + * Creates a plain object from a LoadDriveInformationResponse message. Also converts values to other types if specified. + * @param message LoadDriveInformationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadDriveInformationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadDriveInformationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadDriveInformationResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadCarRequest. */ + interface ILoadCarRequest { + + /** LoadCarRequest carId */ + carId: number; + + /** LoadCarRequest eventMode */ + eventMode?: (boolean|null); + + /** LoadCarRequest eventModeSerial */ + eventModeSerial?: (string|null); + } + + /** Represents a LoadCarRequest. */ + class LoadCarRequest implements ILoadCarRequest { + + /** + * Constructs a new LoadCarRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadCarRequest); + + /** LoadCarRequest carId. */ + public carId: number; + + /** LoadCarRequest eventMode. */ + public eventMode: boolean; + + /** LoadCarRequest eventModeSerial. */ + public eventModeSerial: string; + + /** + * Creates a new LoadCarRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadCarRequest instance + */ + public static create(properties?: wm.protobuf.ILoadCarRequest): wm.protobuf.LoadCarRequest; + + /** + * Encodes the specified LoadCarRequest message. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @param message LoadCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @param message LoadCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadCarRequest; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadCarRequest; + + /** + * Verifies a LoadCarRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadCarRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadCarRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadCarRequest; + + /** + * Creates a plain object from a LoadCarRequest message. Also converts values to other types if specified. + * @param message LoadCarRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadCarRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadCarRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadCarRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadCarResponse. */ + interface ILoadCarResponse { + + /** LoadCarResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadCarResponse car */ + car: wm.protobuf.ICar; + + /** LoadCarResponse tuningPoint */ + tuningPoint: number; + + /** LoadCarResponse odometer */ + odometer: number; + + /** LoadCarResponse playCount */ + playCount: number; + + /** LoadCarResponse earnedCustomColor */ + earnedCustomColor: boolean; + + /** LoadCarResponse setting */ + setting: wm.protobuf.ICarSetting; + + /** LoadCarResponse vsPlayCount */ + vsPlayCount: number; + + /** LoadCarResponse vsBurstCount */ + vsBurstCount: number; + + /** LoadCarResponse vsStarCount */ + vsStarCount: number; + + /** LoadCarResponse vsStarCountMax */ + vsStarCountMax: number; + + /** LoadCarResponse vsCoolOrWild */ + vsCoolOrWild: number; + + /** LoadCarResponse vsSmoothOrRough */ + vsSmoothOrRough: number; + + /** LoadCarResponse vsTripleStarMedals */ + vsTripleStarMedals: number; + + /** LoadCarResponse vsDoubleStarMedals */ + vsDoubleStarMedals: number; + + /** LoadCarResponse vsSingleStarMedals */ + vsSingleStarMedals: number; + + /** LoadCarResponse vsPlainMedals */ + vsPlainMedals: number; + + /** LoadCarResponse rgPlayCount */ + rgPlayCount: number; + + /** LoadCarResponse rgWinCount */ + rgWinCount: number; + + /** LoadCarResponse rgTrophy */ + rgTrophy: number; + + /** LoadCarResponse rgPreviousVersionPlayCount */ + rgPreviousVersionPlayCount: number; + + /** LoadCarResponse rgScore */ + rgScore: number; + + /** LoadCarResponse rgRegionMapScore */ + rgRegionMapScore?: (number[]|null); + + /** LoadCarResponse rgRegions */ + rgRegions?: (number[]|null); + + /** LoadCarResponse rgStamp */ + rgStamp: number; + + /** LoadCarResponse rgAcquireAllCrowns */ + rgAcquireAllCrowns: boolean; + + /** LoadCarResponse dressupLevel */ + dressupLevel: number; + + /** LoadCarResponse dressupPoint */ + dressupPoint: number; + + /** LoadCarResponse stPlayCount */ + stPlayCount: number; + + /** LoadCarResponse stClearBits */ + stClearBits: number; + + /** LoadCarResponse stClearDivCount */ + stClearDivCount: number; + + /** LoadCarResponse stClearCount */ + stClearCount: number; + + /** LoadCarResponse stLoseBits */ + stLoseBits: (number|Long); + + /** LoadCarResponse stConsecutiveWins */ + stConsecutiveWins: number; + + /** LoadCarResponse stConsecutiveWinsMax */ + stConsecutiveWinsMax: number; + + /** LoadCarResponse stCompleted_100Episodes */ + stCompleted_100Episodes: boolean; + + /** LoadCarResponse challenger */ + challenger?: (wm.protobuf.IChallengerCar|null); + + /** LoadCarResponse challengerReturnCount */ + challengerReturnCount?: (number|null); + + /** LoadCarResponse numOfChallengers */ + numOfChallengers?: (number|null); + + /** LoadCarResponse opponentGhost */ + opponentGhost?: (wm.protobuf.IGhostCar|null); + + /** LoadCarResponse opponentTrailId */ + opponentTrailId?: (number|Long|null); + + /** LoadCarResponse opponentCompetitionId */ + opponentCompetitionId?: (number|null); + + /** LoadCarResponse competitionParameter */ + competitionParameter?: (wm.protobuf.IGhostCompetitionParameter|null); + + /** LoadCarResponse specialTitles */ + specialTitles?: (string[]|null); + + /** LoadCarResponse earnedTitles */ + earnedTitles?: (string[]|null); + + /** LoadCarResponse ownedItems */ + ownedItems?: (wm.protobuf.ICarItem[]|null); + + /** LoadCarResponse auraMotifAutoChange */ + auraMotifAutoChange: boolean; + + /** LoadCarResponse screenshotCount */ + screenshotCount: number; + + /** LoadCarResponse announceEventModePrize */ + announceEventModePrize?: (boolean|null); + + /** LoadCarResponse transferred */ + transferred: boolean; + + /** LoadCarResponse driveLastPlayedAt */ + driveLastPlayedAt?: (number|null); + + /** LoadCarResponse insurance */ + insurance?: (wm.protobuf.LoadCarResponse.IStoryInsurance|null); + } + + /** Represents a LoadCarResponse. */ + class LoadCarResponse implements ILoadCarResponse { + + /** + * Constructs a new LoadCarResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadCarResponse); + + /** LoadCarResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadCarResponse car. */ + public car: wm.protobuf.ICar; + + /** LoadCarResponse tuningPoint. */ + public tuningPoint: number; + + /** LoadCarResponse odometer. */ + public odometer: number; + + /** LoadCarResponse playCount. */ + public playCount: number; + + /** LoadCarResponse earnedCustomColor. */ + public earnedCustomColor: boolean; + + /** LoadCarResponse setting. */ + public setting: wm.protobuf.ICarSetting; + + /** LoadCarResponse vsPlayCount. */ + public vsPlayCount: number; + + /** LoadCarResponse vsBurstCount. */ + public vsBurstCount: number; + + /** LoadCarResponse vsStarCount. */ + public vsStarCount: number; + + /** LoadCarResponse vsStarCountMax. */ + public vsStarCountMax: number; + + /** LoadCarResponse vsCoolOrWild. */ + public vsCoolOrWild: number; + + /** LoadCarResponse vsSmoothOrRough. */ + public vsSmoothOrRough: number; + + /** LoadCarResponse vsTripleStarMedals. */ + public vsTripleStarMedals: number; + + /** LoadCarResponse vsDoubleStarMedals. */ + public vsDoubleStarMedals: number; + + /** LoadCarResponse vsSingleStarMedals. */ + public vsSingleStarMedals: number; + + /** LoadCarResponse vsPlainMedals. */ + public vsPlainMedals: number; + + /** LoadCarResponse rgPlayCount. */ + public rgPlayCount: number; + + /** LoadCarResponse rgWinCount. */ + public rgWinCount: number; + + /** LoadCarResponse rgTrophy. */ + public rgTrophy: number; + + /** LoadCarResponse rgPreviousVersionPlayCount. */ + public rgPreviousVersionPlayCount: number; + + /** LoadCarResponse rgScore. */ + public rgScore: number; + + /** LoadCarResponse rgRegionMapScore. */ + public rgRegionMapScore: number[]; + + /** LoadCarResponse rgRegions. */ + public rgRegions: number[]; + + /** LoadCarResponse rgStamp. */ + public rgStamp: number; + + /** LoadCarResponse rgAcquireAllCrowns. */ + public rgAcquireAllCrowns: boolean; + + /** LoadCarResponse dressupLevel. */ + public dressupLevel: number; + + /** LoadCarResponse dressupPoint. */ + public dressupPoint: number; + + /** LoadCarResponse stPlayCount. */ + public stPlayCount: number; + + /** LoadCarResponse stClearBits. */ + public stClearBits: number; + + /** LoadCarResponse stClearDivCount. */ + public stClearDivCount: number; + + /** LoadCarResponse stClearCount. */ + public stClearCount: number; + + /** LoadCarResponse stLoseBits. */ + public stLoseBits: (number|Long); + + /** LoadCarResponse stConsecutiveWins. */ + public stConsecutiveWins: number; + + /** LoadCarResponse stConsecutiveWinsMax. */ + public stConsecutiveWinsMax: number; + + /** LoadCarResponse stCompleted_100Episodes. */ + public stCompleted_100Episodes: boolean; + + /** LoadCarResponse challenger. */ + public challenger?: (wm.protobuf.IChallengerCar|null); + + /** LoadCarResponse challengerReturnCount. */ + public challengerReturnCount: number; + + /** LoadCarResponse numOfChallengers. */ + public numOfChallengers: number; + + /** LoadCarResponse opponentGhost. */ + public opponentGhost?: (wm.protobuf.IGhostCar|null); + + /** LoadCarResponse opponentTrailId. */ + public opponentTrailId: (number|Long); + + /** LoadCarResponse opponentCompetitionId. */ + public opponentCompetitionId: number; + + /** LoadCarResponse competitionParameter. */ + public competitionParameter?: (wm.protobuf.IGhostCompetitionParameter|null); + + /** LoadCarResponse specialTitles. */ + public specialTitles: string[]; + + /** LoadCarResponse earnedTitles. */ + public earnedTitles: string[]; + + /** LoadCarResponse ownedItems. */ + public ownedItems: wm.protobuf.ICarItem[]; + + /** LoadCarResponse auraMotifAutoChange. */ + public auraMotifAutoChange: boolean; + + /** LoadCarResponse screenshotCount. */ + public screenshotCount: number; + + /** LoadCarResponse announceEventModePrize. */ + public announceEventModePrize: boolean; + + /** LoadCarResponse transferred. */ + public transferred: boolean; + + /** LoadCarResponse driveLastPlayedAt. */ + public driveLastPlayedAt: number; + + /** LoadCarResponse insurance. */ + public insurance?: (wm.protobuf.LoadCarResponse.IStoryInsurance|null); + + /** + * Creates a new LoadCarResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadCarResponse instance + */ + public static create(properties?: wm.protobuf.ILoadCarResponse): wm.protobuf.LoadCarResponse; + + /** + * Encodes the specified LoadCarResponse message. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @param message LoadCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @param message LoadCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadCarResponse; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadCarResponse; + + /** + * Verifies a LoadCarResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadCarResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadCarResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadCarResponse; + + /** + * Creates a plain object from a LoadCarResponse message. Also converts values to other types if specified. + * @param message LoadCarResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadCarResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadCarResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadCarResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadCarResponse { + + /** Properties of a StoryInsurance. */ + interface IStoryInsurance { + + /** StoryInsurance numOfRemains */ + numOfRemains: number; + } + + /** Represents a StoryInsurance. */ + class StoryInsurance implements IStoryInsurance { + + /** + * Constructs a new StoryInsurance. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadCarResponse.IStoryInsurance); + + /** StoryInsurance numOfRemains. */ + public numOfRemains: number; + + /** + * Creates a new StoryInsurance instance using the specified properties. + * @param [properties] Properties to set + * @returns StoryInsurance instance + */ + public static create(properties?: wm.protobuf.LoadCarResponse.IStoryInsurance): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Encodes the specified StoryInsurance message. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @param message StoryInsurance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadCarResponse.IStoryInsurance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoryInsurance message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @param message StoryInsurance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadCarResponse.IStoryInsurance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Verifies a StoryInsurance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StoryInsurance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoryInsurance + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Creates a plain object from a StoryInsurance message. Also converts values to other types if specified. + * @param message StoryInsurance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadCarResponse.StoryInsurance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoryInsurance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoryInsurance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateCarRequest. */ + interface ICreateCarRequest { + + /** CreateCarRequest userId */ + userId?: (number|null); + + /** CreateCarRequest banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateCarRequest cardChipId */ + cardChipId?: (string|null); + + /** CreateCarRequest accessCode */ + accessCode?: (string|null); + + /** CreateCarRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** CreateCarRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** CreateCarRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** CreateCarRequest car */ + car: wm.protobuf.ICar; + + /** CreateCarRequest transmission */ + transmission: boolean; + + /** CreateCarRequest timestamp */ + timestamp: number; + + /** CreateCarRequest userItemId */ + userItemId?: (number|null); + + /** CreateCarRequest deletedCarId */ + deletedCarId?: (number|null); + } + + /** Represents a CreateCarRequest. */ + class CreateCarRequest implements ICreateCarRequest { + + /** + * Constructs a new CreateCarRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateCarRequest); + + /** CreateCarRequest userId. */ + public userId: number; + + /** CreateCarRequest banapassportAmId. */ + public banapassportAmId: number; + + /** CreateCarRequest cardChipId. */ + public cardChipId: string; + + /** CreateCarRequest accessCode. */ + public accessCode: string; + + /** CreateCarRequest cardTypeCode. */ + public cardTypeCode: number; + + /** CreateCarRequest cardRegionCode. */ + public cardRegionCode: number; + + /** CreateCarRequest device. */ + public device: wm.protobuf.DeviceType; + + /** CreateCarRequest car. */ + public car: wm.protobuf.ICar; + + /** CreateCarRequest transmission. */ + public transmission: boolean; + + /** CreateCarRequest timestamp. */ + public timestamp: number; + + /** CreateCarRequest userItemId. */ + public userItemId: number; + + /** CreateCarRequest deletedCarId. */ + public deletedCarId: number; + + /** + * Creates a new CreateCarRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCarRequest instance + */ + public static create(properties?: wm.protobuf.ICreateCarRequest): wm.protobuf.CreateCarRequest; + + /** + * Encodes the specified CreateCarRequest message. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @param message CreateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @param message CreateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateCarRequest; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateCarRequest; + + /** + * Verifies a CreateCarRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCarRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCarRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateCarRequest; + + /** + * Creates a plain object from a CreateCarRequest message. Also converts values to other types if specified. + * @param message CreateCarRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateCarRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCarRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCarRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateCarResponse. */ + interface ICreateCarResponse { + + /** CreateCarResponse error */ + error: wm.protobuf.ErrorCode; + + /** CreateCarResponse accessCode */ + accessCode?: (string|null); + + /** CreateCarResponse banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateCarResponse mbid */ + mbid?: (number|null); + + /** CreateCarResponse userId */ + userId: number; + + /** CreateCarResponse carId */ + carId: number; + + /** CreateCarResponse stClearBits */ + stClearBits?: (number|null); + + /** CreateCarResponse stClearDivCount */ + stClearDivCount?: (number|null); + + /** CreateCarResponse stClearCount */ + stClearCount?: (number|null); + + /** CreateCarResponse stLoseBits */ + stLoseBits?: (number|Long|null); + + /** CreateCarResponse stConsecutiveWins */ + stConsecutiveWins?: (number|null); + + /** CreateCarResponse stConsecutiveWinsMax */ + stConsecutiveWinsMax?: (number|null); + + /** CreateCarResponse fullTunedCarCouponUnreceivableAt */ + fullTunedCarCouponUnreceivableAt?: (number|null); + } + + /** Represents a CreateCarResponse. */ + class CreateCarResponse implements ICreateCarResponse { + + /** + * Constructs a new CreateCarResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateCarResponse); + + /** CreateCarResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** CreateCarResponse accessCode. */ + public accessCode: string; + + /** CreateCarResponse banapassportAmId. */ + public banapassportAmId: number; + + /** CreateCarResponse mbid. */ + public mbid: number; + + /** CreateCarResponse userId. */ + public userId: number; + + /** CreateCarResponse carId. */ + public carId: number; + + /** CreateCarResponse stClearBits. */ + public stClearBits: number; + + /** CreateCarResponse stClearDivCount. */ + public stClearDivCount: number; + + /** CreateCarResponse stClearCount. */ + public stClearCount: number; + + /** CreateCarResponse stLoseBits. */ + public stLoseBits: (number|Long); + + /** CreateCarResponse stConsecutiveWins. */ + public stConsecutiveWins: number; + + /** CreateCarResponse stConsecutiveWinsMax. */ + public stConsecutiveWinsMax: number; + + /** CreateCarResponse fullTunedCarCouponUnreceivableAt. */ + public fullTunedCarCouponUnreceivableAt: number; + + /** + * Creates a new CreateCarResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCarResponse instance + */ + public static create(properties?: wm.protobuf.ICreateCarResponse): wm.protobuf.CreateCarResponse; + + /** + * Encodes the specified CreateCarResponse message. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @param message CreateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @param message CreateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateCarResponse; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateCarResponse; + + /** + * Verifies a CreateCarResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCarResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCarResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateCarResponse; + + /** + * Creates a plain object from a CreateCarResponse message. Also converts values to other types if specified. + * @param message CreateCarResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateCarResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCarResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCarResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGameHistoryRequest. */ + interface ILoadGameHistoryRequest { + + /** LoadGameHistoryRequest carId */ + carId: number; + } + + /** Represents a LoadGameHistoryRequest. */ + class LoadGameHistoryRequest implements ILoadGameHistoryRequest { + + /** + * Constructs a new LoadGameHistoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGameHistoryRequest); + + /** LoadGameHistoryRequest carId. */ + public carId: number; + + /** + * Creates a new LoadGameHistoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGameHistoryRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGameHistoryRequest): wm.protobuf.LoadGameHistoryRequest; + + /** + * Encodes the specified LoadGameHistoryRequest message. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @param message LoadGameHistoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGameHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGameHistoryRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @param message LoadGameHistoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGameHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryRequest; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryRequest; + + /** + * Verifies a LoadGameHistoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGameHistoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGameHistoryRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryRequest; + + /** + * Creates a plain object from a LoadGameHistoryRequest message. Also converts values to other types if specified. + * @param message LoadGameHistoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGameHistoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGameHistoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGameHistoryResponse. */ + interface ILoadGameHistoryResponse { + + /** LoadGameHistoryResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGameHistoryResponse taRecords */ + taRecords?: (wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord[]|null); + + /** LoadGameHistoryResponse taRankingUpdatedAt */ + taRankingUpdatedAt: number; + + /** LoadGameHistoryResponse ghostHistory */ + ghostHistory?: (wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord[]|null); + + /** LoadGameHistoryResponse ghostBattleCount */ + ghostBattleCount: number; + + /** LoadGameHistoryResponse ghostBattleWinCount */ + ghostBattleWinCount: number; + + /** LoadGameHistoryResponse stampSheetCount */ + stampSheetCount: number; + + /** LoadGameHistoryResponse stampSheet */ + stampSheet?: (number[]|null); + } + + /** Represents a LoadGameHistoryResponse. */ + class LoadGameHistoryResponse implements ILoadGameHistoryResponse { + + /** + * Constructs a new LoadGameHistoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGameHistoryResponse); + + /** LoadGameHistoryResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGameHistoryResponse taRecords. */ + public taRecords: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord[]; + + /** LoadGameHistoryResponse taRankingUpdatedAt. */ + public taRankingUpdatedAt: number; + + /** LoadGameHistoryResponse ghostHistory. */ + public ghostHistory: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord[]; + + /** LoadGameHistoryResponse ghostBattleCount. */ + public ghostBattleCount: number; + + /** LoadGameHistoryResponse ghostBattleWinCount. */ + public ghostBattleWinCount: number; + + /** LoadGameHistoryResponse stampSheetCount. */ + public stampSheetCount: number; + + /** LoadGameHistoryResponse stampSheet. */ + public stampSheet: number[]; + + /** + * Creates a new LoadGameHistoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGameHistoryResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGameHistoryResponse): wm.protobuf.LoadGameHistoryResponse; + + /** + * Encodes the specified LoadGameHistoryResponse message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @param message LoadGameHistoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGameHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGameHistoryResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @param message LoadGameHistoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGameHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse; + + /** + * Verifies a LoadGameHistoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGameHistoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGameHistoryResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse; + + /** + * Creates a plain object from a LoadGameHistoryResponse message. Also converts values to other types if specified. + * @param message LoadGameHistoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGameHistoryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGameHistoryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGameHistoryResponse { + + /** Properties of a TimeAttackRecord. */ + interface ITimeAttackRecord { + + /** TimeAttackRecord course */ + course: number; + + /** TimeAttackRecord time */ + time?: (number|null); + + /** TimeAttackRecord tunePower */ + tunePower?: (number|null); + + /** TimeAttackRecord tuneHandling */ + tuneHandling?: (number|null); + + /** TimeAttackRecord wholeRank */ + wholeRank?: (number|null); + + /** TimeAttackRecord wholeParticipants */ + wholeParticipants: number; + + /** TimeAttackRecord modelRank */ + modelRank?: (number|null); + + /** TimeAttackRecord modelParticipants */ + modelParticipants: number; + } + + /** Represents a TimeAttackRecord. */ + class TimeAttackRecord implements ITimeAttackRecord { + + /** + * Constructs a new TimeAttackRecord. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord); + + /** TimeAttackRecord course. */ + public course: number; + + /** TimeAttackRecord time. */ + public time: number; + + /** TimeAttackRecord tunePower. */ + public tunePower: number; + + /** TimeAttackRecord tuneHandling. */ + public tuneHandling: number; + + /** TimeAttackRecord wholeRank. */ + public wholeRank: number; + + /** TimeAttackRecord wholeParticipants. */ + public wholeParticipants: number; + + /** TimeAttackRecord modelRank. */ + public modelRank: number; + + /** TimeAttackRecord modelParticipants. */ + public modelParticipants: number; + + /** + * Creates a new TimeAttackRecord instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeAttackRecord instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Encodes the specified TimeAttackRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @param message TimeAttackRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeAttackRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @param message TimeAttackRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Verifies a TimeAttackRecord message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeAttackRecord message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeAttackRecord + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Creates a plain object from a TimeAttackRecord message. Also converts values to other types if specified. + * @param message TimeAttackRecord + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeAttackRecord to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeAttackRecord + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostBattleRecord. */ + interface IGhostBattleRecord { + + /** GhostBattleRecord carSetting */ + carSetting: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting; + + /** GhostBattleRecord opponent */ + opponent: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar; + + /** GhostBattleRecord mobs */ + mobs?: (wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar[]|null); + + /** GhostBattleRecord area */ + area: number; + + /** GhostBattleRecord playedAt */ + playedAt: number; + + /** GhostBattleRecord playedShopName */ + playedShopName: string; + } + + /** Represents a GhostBattleRecord. */ + class GhostBattleRecord implements IGhostBattleRecord { + + /** + * Constructs a new GhostBattleRecord. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord); + + /** GhostBattleRecord carSetting. */ + public carSetting: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting; + + /** GhostBattleRecord opponent. */ + public opponent: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar; + + /** GhostBattleRecord mobs. */ + public mobs: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar[]; + + /** GhostBattleRecord area. */ + public area: number; + + /** GhostBattleRecord playedAt. */ + public playedAt: number; + + /** GhostBattleRecord playedShopName. */ + public playedShopName: string; + + /** + * Creates a new GhostBattleRecord instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleRecord instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Encodes the specified GhostBattleRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @param message GhostBattleRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @param message GhostBattleRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Verifies a GhostBattleRecord message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleRecord message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleRecord + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Creates a plain object from a GhostBattleRecord message. Also converts values to other types if specified. + * @param message GhostBattleRecord + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleRecord to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleRecord + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GhostBattleRecord { + + /** Properties of a GhostCarSetting. */ + interface IGhostCarSetting { + + /** GhostCarSetting tunePower */ + tunePower: number; + + /** GhostCarSetting tuneHandling */ + tuneHandling: number; + } + + /** Represents a GhostCarSetting. */ + class GhostCarSetting implements IGhostCarSetting { + + /** + * Constructs a new GhostCarSetting. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting); + + /** GhostCarSetting tunePower. */ + public tunePower: number; + + /** GhostCarSetting tuneHandling. */ + public tuneHandling: number; + + /** + * Creates a new GhostCarSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCarSetting instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Encodes the specified GhostCarSetting message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @param message GhostCarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCarSetting message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @param message GhostCarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Verifies a GhostCarSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCarSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCarSetting + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Creates a plain object from a GhostCarSetting message. Also converts values to other types if specified. + * @param message GhostCarSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCarSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCarSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostBattleRecordCar. */ + interface IGhostBattleRecordCar { + + /** GhostBattleRecordCar car */ + car: wm.protobuf.ICar; + + /** GhostBattleRecordCar result */ + result: number; + } + + /** Represents a GhostBattleRecordCar. */ + class GhostBattleRecordCar implements IGhostBattleRecordCar { + + /** + * Constructs a new GhostBattleRecordCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar); + + /** GhostBattleRecordCar car. */ + public car: wm.protobuf.ICar; + + /** GhostBattleRecordCar result. */ + public result: number; + + /** + * Creates a new GhostBattleRecordCar instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleRecordCar instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Encodes the specified GhostBattleRecordCar message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @param message GhostBattleRecordCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleRecordCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @param message GhostBattleRecordCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Verifies a GhostBattleRecordCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleRecordCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleRecordCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Creates a plain object from a GhostBattleRecordCar message. Also converts values to other types if specified. + * @param message GhostBattleRecordCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleRecordCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleRecordCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of an UpdateCarRequest. */ + interface IUpdateCarRequest { + + /** UpdateCarRequest carId */ + carId: number; + + /** UpdateCarRequest car */ + car?: (wm.protobuf.ICar|null); + + /** UpdateCarRequest earnedItems */ + earnedItems?: (wm.protobuf.ICarItem[]|null); + + /** UpdateCarRequest setting */ + setting?: (wm.protobuf.ICarSetting|null); + + /** UpdateCarRequest toBeDeleted */ + toBeDeleted?: (boolean|null); + + /** UpdateCarRequest auraMotifAutoChange */ + auraMotifAutoChange?: (boolean|null); + + /** UpdateCarRequest rgStamp */ + rgStamp?: (number|null); + + /** UpdateCarRequest timestamp */ + timestamp: number; + } + + /** Represents an UpdateCarRequest. */ + class UpdateCarRequest implements IUpdateCarRequest { + + /** + * Constructs a new UpdateCarRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateCarRequest); + + /** UpdateCarRequest carId. */ + public carId: number; + + /** UpdateCarRequest car. */ + public car?: (wm.protobuf.ICar|null); + + /** UpdateCarRequest earnedItems. */ + public earnedItems: wm.protobuf.ICarItem[]; + + /** UpdateCarRequest setting. */ + public setting?: (wm.protobuf.ICarSetting|null); + + /** UpdateCarRequest toBeDeleted. */ + public toBeDeleted: boolean; + + /** UpdateCarRequest auraMotifAutoChange. */ + public auraMotifAutoChange: boolean; + + /** UpdateCarRequest rgStamp. */ + public rgStamp: number; + + /** UpdateCarRequest timestamp. */ + public timestamp: number; + + /** + * Creates a new UpdateCarRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCarRequest instance + */ + public static create(properties?: wm.protobuf.IUpdateCarRequest): wm.protobuf.UpdateCarRequest; + + /** + * Encodes the specified UpdateCarRequest message. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @param message UpdateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @param message UpdateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateCarRequest; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateCarRequest; + + /** + * Verifies an UpdateCarRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateCarRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCarRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateCarRequest; + + /** + * Creates a plain object from an UpdateCarRequest message. Also converts values to other types if specified. + * @param message UpdateCarRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateCarRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCarRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCarRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateCarResponse. */ + interface IUpdateCarResponse { + + /** UpdateCarResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents an UpdateCarResponse. */ + class UpdateCarResponse implements IUpdateCarResponse { + + /** + * Constructs a new UpdateCarResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateCarResponse); + + /** UpdateCarResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new UpdateCarResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCarResponse instance + */ + public static create(properties?: wm.protobuf.IUpdateCarResponse): wm.protobuf.UpdateCarResponse; + + /** + * Encodes the specified UpdateCarResponse message. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @param message UpdateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @param message UpdateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateCarResponse; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateCarResponse; + + /** + * Verifies an UpdateCarResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateCarResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCarResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateCarResponse; + + /** + * Creates a plain object from an UpdateCarResponse message. Also converts values to other types if specified. + * @param message UpdateCarResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateCarResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCarResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCarResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveGameResultRequest. */ + interface ISaveGameResultRequest { + + /** SaveGameResultRequest carId */ + carId: number; + + /** SaveGameResultRequest gameMode */ + gameMode: wm.protobuf.GameMode; + + /** SaveGameResultRequest playedAt */ + playedAt: number; + + /** SaveGameResultRequest playCount */ + playCount: number; + + /** SaveGameResultRequest retired */ + retired: boolean; + + /** SaveGameResultRequest timeup */ + timeup: boolean; + + /** SaveGameResultRequest car */ + car?: (wm.protobuf.ICar|null); + + /** SaveGameResultRequest setting */ + setting?: (wm.protobuf.ICarSetting|null); + + /** SaveGameResultRequest odometer */ + odometer?: (number|null); + + /** SaveGameResultRequest earnedCustomColor */ + earnedCustomColor?: (boolean|null); + + /** SaveGameResultRequest confirmedTutorials */ + confirmedTutorials?: (wm.protobuf.TutorialType[]|null); + + /** SaveGameResultRequest earnedItems */ + earnedItems?: (wm.protobuf.ICarItem[]|null); + + /** SaveGameResultRequest earnedUserItems */ + earnedUserItems?: (wm.protobuf.IUserItem[]|null); + + /** SaveGameResultRequest preservedTitles */ + preservedTitles?: (string[]|null); + + /** SaveGameResultRequest neighborCars */ + neighborCars?: (number[]|null); + + /** SaveGameResultRequest stResult */ + stResult?: (wm.protobuf.SaveGameResultRequest.IStoryResult|null); + + /** SaveGameResultRequest taResult */ + taResult?: (wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null); + + /** SaveGameResultRequest vsResult */ + vsResult?: (wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null); + + /** SaveGameResultRequest rgResult */ + rgResult?: (wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null); + } + + /** Represents a SaveGameResultRequest. */ + class SaveGameResultRequest implements ISaveGameResultRequest { + + /** + * Constructs a new SaveGameResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveGameResultRequest); + + /** SaveGameResultRequest carId. */ + public carId: number; + + /** SaveGameResultRequest gameMode. */ + public gameMode: wm.protobuf.GameMode; + + /** SaveGameResultRequest playedAt. */ + public playedAt: number; + + /** SaveGameResultRequest playCount. */ + public playCount: number; + + /** SaveGameResultRequest retired. */ + public retired: boolean; + + /** SaveGameResultRequest timeup. */ + public timeup: boolean; + + /** SaveGameResultRequest car. */ + public car?: (wm.protobuf.ICar|null); + + /** SaveGameResultRequest setting. */ + public setting?: (wm.protobuf.ICarSetting|null); + + /** SaveGameResultRequest odometer. */ + public odometer: number; + + /** SaveGameResultRequest earnedCustomColor. */ + public earnedCustomColor: boolean; + + /** SaveGameResultRequest confirmedTutorials. */ + public confirmedTutorials: wm.protobuf.TutorialType[]; + + /** SaveGameResultRequest earnedItems. */ + public earnedItems: wm.protobuf.ICarItem[]; + + /** SaveGameResultRequest earnedUserItems. */ + public earnedUserItems: wm.protobuf.IUserItem[]; + + /** SaveGameResultRequest preservedTitles. */ + public preservedTitles: string[]; + + /** SaveGameResultRequest neighborCars. */ + public neighborCars: number[]; + + /** SaveGameResultRequest stResult. */ + public stResult?: (wm.protobuf.SaveGameResultRequest.IStoryResult|null); + + /** SaveGameResultRequest taResult. */ + public taResult?: (wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null); + + /** SaveGameResultRequest vsResult. */ + public vsResult?: (wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null); + + /** SaveGameResultRequest rgResult. */ + public rgResult?: (wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null); + + /** + * Creates a new SaveGameResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveGameResultRequest instance + */ + public static create(properties?: wm.protobuf.ISaveGameResultRequest): wm.protobuf.SaveGameResultRequest; + + /** + * Encodes the specified SaveGameResultRequest message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @param message SaveGameResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveGameResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveGameResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @param message SaveGameResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveGameResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest; + + /** + * Verifies a SaveGameResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveGameResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveGameResultRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest; + + /** + * Creates a plain object from a SaveGameResultRequest message. Also converts values to other types if specified. + * @param message SaveGameResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveGameResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveGameResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SaveGameResultRequest { + + /** Properties of a StoryResult. */ + interface IStoryResult { + + /** StoryResult stPlayCount */ + stPlayCount: number; + + /** StoryResult stPlayedStory */ + stPlayedStory: number; + + /** StoryResult tuningPoint */ + tuningPoint?: (number|null); + + /** StoryResult stClearBits */ + stClearBits?: (number|null); + + /** StoryResult stClearDivCount */ + stClearDivCount?: (number|null); + + /** StoryResult stClearCount */ + stClearCount?: (number|null); + + /** StoryResult stLoseBits */ + stLoseBits?: (number|Long|null); + + /** StoryResult stConsecutiveWins */ + stConsecutiveWins?: (number|null); + + /** StoryResult stCompleted_100Episodes */ + stCompleted_100Episodes?: (boolean|null); + + /** StoryResult isInsuranceUsed */ + isInsuranceUsed?: (boolean|null); + } + + /** Represents a StoryResult. */ + class StoryResult implements IStoryResult { + + /** + * Constructs a new StoryResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.IStoryResult); + + /** StoryResult stPlayCount. */ + public stPlayCount: number; + + /** StoryResult stPlayedStory. */ + public stPlayedStory: number; + + /** StoryResult tuningPoint. */ + public tuningPoint: number; + + /** StoryResult stClearBits. */ + public stClearBits: number; + + /** StoryResult stClearDivCount. */ + public stClearDivCount: number; + + /** StoryResult stClearCount. */ + public stClearCount: number; + + /** StoryResult stLoseBits. */ + public stLoseBits: (number|Long); + + /** StoryResult stConsecutiveWins. */ + public stConsecutiveWins: number; + + /** StoryResult stCompleted_100Episodes. */ + public stCompleted_100Episodes: boolean; + + /** StoryResult isInsuranceUsed. */ + public isInsuranceUsed: boolean; + + /** + * Creates a new StoryResult instance using the specified properties. + * @param [properties] Properties to set + * @returns StoryResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.IStoryResult): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Encodes the specified StoryResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @param message StoryResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.IStoryResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoryResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @param message StoryResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.IStoryResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoryResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Decodes a StoryResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Verifies a StoryResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StoryResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoryResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Creates a plain object from a StoryResult message. Also converts values to other types if specified. + * @param message StoryResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.StoryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoryResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoryResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeAttackResult. */ + interface ITimeAttackResult { + + /** TimeAttackResult time */ + time: number; + + /** TimeAttackResult course */ + course: number; + + /** TimeAttackResult isMorning */ + isMorning: boolean; + + /** TimeAttackResult section_1Time */ + section_1Time: number; + + /** TimeAttackResult section_2Time */ + section_2Time: number; + + /** TimeAttackResult section_3Time */ + section_3Time: number; + + /** TimeAttackResult section_4Time */ + section_4Time: number; + + /** TimeAttackResult section_5Time */ + section_5Time?: (number|null); + + /** TimeAttackResult section_6Time */ + section_6Time?: (number|null); + + /** TimeAttackResult section_7Time */ + section_7Time?: (number|null); + + /** TimeAttackResult wholeRank */ + wholeRank?: (number|null); + + /** TimeAttackResult modelRank */ + modelRank?: (number|null); + } + + /** Represents a TimeAttackResult. */ + class TimeAttackResult implements ITimeAttackResult { + + /** + * Constructs a new TimeAttackResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.ITimeAttackResult); + + /** TimeAttackResult time. */ + public time: number; + + /** TimeAttackResult course. */ + public course: number; + + /** TimeAttackResult isMorning. */ + public isMorning: boolean; + + /** TimeAttackResult section_1Time. */ + public section_1Time: number; + + /** TimeAttackResult section_2Time. */ + public section_2Time: number; + + /** TimeAttackResult section_3Time. */ + public section_3Time: number; + + /** TimeAttackResult section_4Time. */ + public section_4Time: number; + + /** TimeAttackResult section_5Time. */ + public section_5Time: number; + + /** TimeAttackResult section_6Time. */ + public section_6Time: number; + + /** TimeAttackResult section_7Time. */ + public section_7Time: number; + + /** TimeAttackResult wholeRank. */ + public wholeRank: number; + + /** TimeAttackResult modelRank. */ + public modelRank: number; + + /** + * Creates a new TimeAttackResult instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeAttackResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.ITimeAttackResult): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Encodes the specified TimeAttackResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @param message TimeAttackResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.ITimeAttackResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeAttackResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @param message TimeAttackResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.ITimeAttackResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Verifies a TimeAttackResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeAttackResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeAttackResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Creates a plain object from a TimeAttackResult message. Also converts values to other types if specified. + * @param message TimeAttackResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.TimeAttackResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeAttackResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeAttackResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VersusBattleResult. */ + interface IVersusBattleResult { + + /** VersusBattleResult result */ + result: number; + + /** VersusBattleResult survived */ + survived: boolean; + + /** VersusBattleResult opponentCarId */ + opponentCarId?: (number[]|null); + + /** VersusBattleResult numOfPlayers */ + numOfPlayers: number; + + /** VersusBattleResult area */ + area: number; + + /** VersusBattleResult isMorning */ + isMorning: boolean; + + /** VersusBattleResult vsPlayCount */ + vsPlayCount: number; + + /** VersusBattleResult vsBurstCount */ + vsBurstCount?: (number|null); + + /** VersusBattleResult vsStarCount */ + vsStarCount?: (number|null); + + /** VersusBattleResult vsCoolOrWild */ + vsCoolOrWild?: (number|null); + + /** VersusBattleResult vsSmoothOrRough */ + vsSmoothOrRough?: (number|null); + + /** VersusBattleResult vsTripleStarMedals */ + vsTripleStarMedals?: (number|null); + + /** VersusBattleResult vsDoubleStarMedals */ + vsDoubleStarMedals?: (number|null); + + /** VersusBattleResult vsSingleStarMedals */ + vsSingleStarMedals?: (number|null); + + /** VersusBattleResult vsPlainMedals */ + vsPlainMedals?: (number|null); + } + + /** Represents a VersusBattleResult. */ + class VersusBattleResult implements IVersusBattleResult { + + /** + * Constructs a new VersusBattleResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.IVersusBattleResult); + + /** VersusBattleResult result. */ + public result: number; + + /** VersusBattleResult survived. */ + public survived: boolean; + + /** VersusBattleResult opponentCarId. */ + public opponentCarId: number[]; + + /** VersusBattleResult numOfPlayers. */ + public numOfPlayers: number; + + /** VersusBattleResult area. */ + public area: number; + + /** VersusBattleResult isMorning. */ + public isMorning: boolean; + + /** VersusBattleResult vsPlayCount. */ + public vsPlayCount: number; + + /** VersusBattleResult vsBurstCount. */ + public vsBurstCount: number; + + /** VersusBattleResult vsStarCount. */ + public vsStarCount: number; + + /** VersusBattleResult vsCoolOrWild. */ + public vsCoolOrWild: number; + + /** VersusBattleResult vsSmoothOrRough. */ + public vsSmoothOrRough: number; + + /** VersusBattleResult vsTripleStarMedals. */ + public vsTripleStarMedals: number; + + /** VersusBattleResult vsDoubleStarMedals. */ + public vsDoubleStarMedals: number; + + /** VersusBattleResult vsSingleStarMedals. */ + public vsSingleStarMedals: number; + + /** VersusBattleResult vsPlainMedals. */ + public vsPlainMedals: number; + + /** + * Creates a new VersusBattleResult instance using the specified properties. + * @param [properties] Properties to set + * @returns VersusBattleResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.IVersusBattleResult): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Encodes the specified VersusBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @param message VersusBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.IVersusBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VersusBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @param message VersusBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.IVersusBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Verifies a VersusBattleResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VersusBattleResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersusBattleResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Creates a plain object from a VersusBattleResult message. Also converts values to other types if specified. + * @param message VersusBattleResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.VersusBattleResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VersusBattleResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VersusBattleResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostBattleResult. */ + interface IGhostBattleResult { + + /** GhostBattleResult opponents */ + opponents?: (wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent[]|null); + + /** GhostBattleResult path */ + path: number; + + /** GhostBattleResult isMorning */ + isMorning: boolean; + + /** GhostBattleResult selectionMethod */ + selectionMethod: wm.protobuf.GhostSelectionMethod; + + /** GhostBattleResult stampSheetCount */ + stampSheetCount?: (number|null); + + /** GhostBattleResult stampSheet */ + stampSheet?: (number[]|null); + + /** GhostBattleResult rgStamp */ + rgStamp?: (number|null); + + /** GhostBattleResult confirmedTransferredStampTargetCarIds */ + confirmedTransferredStampTargetCarIds?: (number[]|null); + + /** GhostBattleResult rgPlayCount */ + rgPlayCount: number; + + /** GhostBattleResult dressupLevel */ + dressupLevel?: (number|null); + + /** GhostBattleResult dressupPoint */ + dressupPoint?: (number|null); + + /** GhostBattleResult rgRegionMapScore */ + rgRegionMapScore?: (number[]|null); + + /** GhostBattleResult competitionId */ + competitionId?: (number|null); + + /** GhostBattleResult periodId */ + periodId?: (number|null); + + /** GhostBattleResult brakingPoint */ + brakingPoint?: (number|null); + + /** GhostBattleResult acquireCrown */ + acquireCrown?: (boolean|null); + + /** GhostBattleResult acquireAllCrowns */ + acquireAllCrowns?: (boolean|null); + } + + /** Represents a GhostBattleResult. */ + class GhostBattleResult implements IGhostBattleResult { + + /** + * Constructs a new GhostBattleResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.IGhostBattleResult); + + /** GhostBattleResult opponents. */ + public opponents: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent[]; + + /** GhostBattleResult path. */ + public path: number; + + /** GhostBattleResult isMorning. */ + public isMorning: boolean; + + /** GhostBattleResult selectionMethod. */ + public selectionMethod: wm.protobuf.GhostSelectionMethod; + + /** GhostBattleResult stampSheetCount. */ + public stampSheetCount: number; + + /** GhostBattleResult stampSheet. */ + public stampSheet: number[]; + + /** GhostBattleResult rgStamp. */ + public rgStamp: number; + + /** GhostBattleResult confirmedTransferredStampTargetCarIds. */ + public confirmedTransferredStampTargetCarIds: number[]; + + /** GhostBattleResult rgPlayCount. */ + public rgPlayCount: number; + + /** GhostBattleResult dressupLevel. */ + public dressupLevel: number; + + /** GhostBattleResult dressupPoint. */ + public dressupPoint: number; + + /** GhostBattleResult rgRegionMapScore. */ + public rgRegionMapScore: number[]; + + /** GhostBattleResult competitionId. */ + public competitionId: number; + + /** GhostBattleResult periodId. */ + public periodId: number; + + /** GhostBattleResult brakingPoint. */ + public brakingPoint: number; + + /** GhostBattleResult acquireCrown. */ + public acquireCrown: boolean; + + /** GhostBattleResult acquireAllCrowns. */ + public acquireAllCrowns: boolean; + + /** + * Creates a new GhostBattleResult instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.IGhostBattleResult): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Encodes the specified GhostBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @param message GhostBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.IGhostBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @param message GhostBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.IGhostBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Verifies a GhostBattleResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Creates a plain object from a GhostBattleResult message. Also converts values to other types if specified. + * @param message GhostBattleResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GhostBattleResult { + + /** Properties of a GhostBattleOpponent. */ + interface IGhostBattleOpponent { + + /** GhostBattleOpponent result */ + result: number; + + /** GhostBattleOpponent carId */ + carId: number; + + /** GhostBattleOpponent tunePower */ + tunePower: number; + + /** GhostBattleOpponent tuneHandling */ + tuneHandling: number; + + /** GhostBattleOpponent receiveStamp */ + receiveStamp?: (boolean|null); + } + + /** Represents a GhostBattleOpponent. */ + class GhostBattleOpponent implements IGhostBattleOpponent { + + /** + * Constructs a new GhostBattleOpponent. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent); + + /** GhostBattleOpponent result. */ + public result: number; + + /** GhostBattleOpponent carId. */ + public carId: number; + + /** GhostBattleOpponent tunePower. */ + public tunePower: number; + + /** GhostBattleOpponent tuneHandling. */ + public tuneHandling: number; + + /** GhostBattleOpponent receiveStamp. */ + public receiveStamp: boolean; + + /** + * Creates a new GhostBattleOpponent instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleOpponent instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Encodes the specified GhostBattleOpponent message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @param message GhostBattleOpponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleOpponent message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @param message GhostBattleOpponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Verifies a GhostBattleOpponent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleOpponent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleOpponent + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Creates a plain object from a GhostBattleOpponent message. Also converts values to other types if specified. + * @param message GhostBattleOpponent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleOpponent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleOpponent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a SaveGameResultResponse. */ + interface ISaveGameResultResponse { + + /** SaveGameResultResponse error */ + error: wm.protobuf.ErrorCode; + + /** SaveGameResultResponse ghostSessionId */ + ghostSessionId?: (number|Long|null); + + /** SaveGameResultResponse availableTickets */ + availableTickets?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a SaveGameResultResponse. */ + class SaveGameResultResponse implements ISaveGameResultResponse { + + /** + * Constructs a new SaveGameResultResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveGameResultResponse); + + /** SaveGameResultResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** SaveGameResultResponse ghostSessionId. */ + public ghostSessionId: (number|Long); + + /** SaveGameResultResponse availableTickets. */ + public availableTickets: wm.protobuf.IUserItem[]; + + /** + * Creates a new SaveGameResultResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveGameResultResponse instance + */ + public static create(properties?: wm.protobuf.ISaveGameResultResponse): wm.protobuf.SaveGameResultResponse; + + /** + * Encodes the specified SaveGameResultResponse message. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @param message SaveGameResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveGameResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveGameResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @param message SaveGameResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveGameResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultResponse; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultResponse; + + /** + * Verifies a SaveGameResultResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveGameResultResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveGameResultResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultResponse; + + /** + * Creates a plain object from a SaveGameResultResponse message. Also converts values to other types if specified. + * @param message SaveGameResultResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveGameResultResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveGameResultResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveChargeRequest. */ + interface ISaveChargeRequest { + + /** SaveChargeRequest chargeLogs */ + chargeLogs?: (wm.protobuf.SaveChargeRequest.IChargeLog[]|null); + } + + /** Represents a SaveChargeRequest. */ + class SaveChargeRequest implements ISaveChargeRequest { + + /** + * Constructs a new SaveChargeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveChargeRequest); + + /** SaveChargeRequest chargeLogs. */ + public chargeLogs: wm.protobuf.SaveChargeRequest.IChargeLog[]; + + /** + * Creates a new SaveChargeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveChargeRequest instance + */ + public static create(properties?: wm.protobuf.ISaveChargeRequest): wm.protobuf.SaveChargeRequest; + + /** + * Encodes the specified SaveChargeRequest message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @param message SaveChargeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveChargeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveChargeRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @param message SaveChargeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveChargeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveChargeRequest; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveChargeRequest; + + /** + * Verifies a SaveChargeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveChargeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveChargeRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveChargeRequest; + + /** + * Creates a plain object from a SaveChargeRequest message. Also converts values to other types if specified. + * @param message SaveChargeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveChargeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveChargeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveChargeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SaveChargeRequest { + + /** Properties of a ChargeLog. */ + interface IChargeLog { + + /** ChargeLog datetime */ + datetime: number; + + /** ChargeLog pcbSerial */ + pcbSerial: string; + + /** ChargeLog placeId */ + placeId: string; + + /** ChargeLog userId */ + userId?: (number|null); + } + + /** Represents a ChargeLog. */ + class ChargeLog implements IChargeLog { + + /** + * Constructs a new ChargeLog. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveChargeRequest.IChargeLog); + + /** ChargeLog datetime. */ + public datetime: number; + + /** ChargeLog pcbSerial. */ + public pcbSerial: string; + + /** ChargeLog placeId. */ + public placeId: string; + + /** ChargeLog userId. */ + public userId: number; + + /** + * Creates a new ChargeLog instance using the specified properties. + * @param [properties] Properties to set + * @returns ChargeLog instance + */ + public static create(properties?: wm.protobuf.SaveChargeRequest.IChargeLog): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Encodes the specified ChargeLog message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @param message ChargeLog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveChargeRequest.IChargeLog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChargeLog message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @param message ChargeLog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveChargeRequest.IChargeLog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChargeLog message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Decodes a ChargeLog message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Verifies a ChargeLog message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChargeLog message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChargeLog + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Creates a plain object from a ChargeLog message. Also converts values to other types if specified. + * @param message ChargeLog + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveChargeRequest.ChargeLog, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChargeLog to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChargeLog + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SaveChargeResponse. */ + interface ISaveChargeResponse { + + /** SaveChargeResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveChargeResponse. */ + class SaveChargeResponse implements ISaveChargeResponse { + + /** + * Constructs a new SaveChargeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveChargeResponse); + + /** SaveChargeResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveChargeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveChargeResponse instance + */ + public static create(properties?: wm.protobuf.ISaveChargeResponse): wm.protobuf.SaveChargeResponse; + + /** + * Encodes the specified SaveChargeResponse message. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @param message SaveChargeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveChargeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveChargeResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @param message SaveChargeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveChargeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveChargeResponse; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveChargeResponse; + + /** + * Verifies a SaveChargeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveChargeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveChargeResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveChargeResponse; + + /** + * Creates a plain object from a SaveChargeResponse message. Also converts values to other types if specified. + * @param message SaveChargeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveChargeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveChargeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveChargeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostBattleInfoRequest. */ + interface ILoadGhostBattleInfoRequest { + + /** LoadGhostBattleInfoRequest carId */ + carId: number; + } + + /** Represents a LoadGhostBattleInfoRequest. */ + class LoadGhostBattleInfoRequest implements ILoadGhostBattleInfoRequest { + + /** + * Constructs a new LoadGhostBattleInfoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostBattleInfoRequest); + + /** LoadGhostBattleInfoRequest carId. */ + public carId: number; + + /** + * Creates a new LoadGhostBattleInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostBattleInfoRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostBattleInfoRequest): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @param message LoadGhostBattleInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostBattleInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @param message LoadGhostBattleInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostBattleInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Verifies a LoadGhostBattleInfoRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostBattleInfoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostBattleInfoRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Creates a plain object from a LoadGhostBattleInfoRequest message. Also converts values to other types if specified. + * @param message LoadGhostBattleInfoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostBattleInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostBattleInfoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostBattleInfoRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostBattleInfoResponse. */ + interface ILoadGhostBattleInfoResponse { + + /** LoadGhostBattleInfoResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostBattleInfoResponse friendCars */ + friendCars?: (wm.protobuf.IFriendCar[]|null); + + /** LoadGhostBattleInfoResponse challengers */ + challengers?: (wm.protobuf.IChallengerCar[]|null); + + /** LoadGhostBattleInfoResponse stampTargetCars */ + stampTargetCars?: (wm.protobuf.IStampTargetCar[]|null); + + /** LoadGhostBattleInfoResponse previousVersionStampTargetCars */ + previousVersionStampTargetCars?: (wm.protobuf.IPreviousVersionStampTargetCar[]|null); + + /** LoadGhostBattleInfoResponse bookmarkedCars */ + bookmarkedCars?: (wm.protobuf.IBookmarkedCar[]|null); + + /** LoadGhostBattleInfoResponse history */ + history?: (wm.protobuf.ICar[]|null); + + /** LoadGhostBattleInfoResponse weakenedCars */ + weakenedCars?: (wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar[]|null); + + /** LoadGhostBattleInfoResponse stampSheetCount */ + stampSheetCount: number; + + /** LoadGhostBattleInfoResponse stampSheet */ + stampSheet?: (number[]|null); + + /** LoadGhostBattleInfoResponse stampReturnStats */ + stampReturnStats?: (number[]|null); + } + + /** Represents a LoadGhostBattleInfoResponse. */ + class LoadGhostBattleInfoResponse implements ILoadGhostBattleInfoResponse { + + /** + * Constructs a new LoadGhostBattleInfoResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostBattleInfoResponse); + + /** LoadGhostBattleInfoResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostBattleInfoResponse friendCars. */ + public friendCars: wm.protobuf.IFriendCar[]; + + /** LoadGhostBattleInfoResponse challengers. */ + public challengers: wm.protobuf.IChallengerCar[]; + + /** LoadGhostBattleInfoResponse stampTargetCars. */ + public stampTargetCars: wm.protobuf.IStampTargetCar[]; + + /** LoadGhostBattleInfoResponse previousVersionStampTargetCars. */ + public previousVersionStampTargetCars: wm.protobuf.IPreviousVersionStampTargetCar[]; + + /** LoadGhostBattleInfoResponse bookmarkedCars. */ + public bookmarkedCars: wm.protobuf.IBookmarkedCar[]; + + /** LoadGhostBattleInfoResponse history. */ + public history: wm.protobuf.ICar[]; + + /** LoadGhostBattleInfoResponse weakenedCars. */ + public weakenedCars: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar[]; + + /** LoadGhostBattleInfoResponse stampSheetCount. */ + public stampSheetCount: number; + + /** LoadGhostBattleInfoResponse stampSheet. */ + public stampSheet: number[]; + + /** LoadGhostBattleInfoResponse stampReturnStats. */ + public stampReturnStats: number[]; + + /** + * Creates a new LoadGhostBattleInfoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostBattleInfoResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostBattleInfoResponse): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @param message LoadGhostBattleInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostBattleInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @param message LoadGhostBattleInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostBattleInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Verifies a LoadGhostBattleInfoResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostBattleInfoResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostBattleInfoResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Creates a plain object from a LoadGhostBattleInfoResponse message. Also converts values to other types if specified. + * @param message LoadGhostBattleInfoResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostBattleInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostBattleInfoResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostBattleInfoResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGhostBattleInfoResponse { + + /** Properties of a WeakenedCar. */ + interface IWeakenedCar { + + /** WeakenedCar carId */ + carId: number; + + /** WeakenedCar consecutiveLosses */ + consecutiveLosses: number; + } + + /** Represents a WeakenedCar. */ + class WeakenedCar implements IWeakenedCar { + + /** + * Constructs a new WeakenedCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar); + + /** WeakenedCar carId. */ + public carId: number; + + /** WeakenedCar consecutiveLosses. */ + public consecutiveLosses: number; + + /** + * Creates a new WeakenedCar instance using the specified properties. + * @param [properties] Properties to set + * @returns WeakenedCar instance + */ + public static create(properties?: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Encodes the specified WeakenedCar message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @param message WeakenedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeakenedCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @param message WeakenedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Verifies a WeakenedCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WeakenedCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeakenedCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Creates a plain object from a WeakenedCar message. Also converts values to other types if specified. + * @param message WeakenedCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeakenedCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WeakenedCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadStampTargetRequest. */ + interface ILoadStampTargetRequest { + + /** LoadStampTargetRequest carId */ + carId: number; + + /** LoadStampTargetRequest needToPromote */ + needToPromote: boolean; + } + + /** Represents a LoadStampTargetRequest. */ + class LoadStampTargetRequest implements ILoadStampTargetRequest { + + /** + * Constructs a new LoadStampTargetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadStampTargetRequest); + + /** LoadStampTargetRequest carId. */ + public carId: number; + + /** LoadStampTargetRequest needToPromote. */ + public needToPromote: boolean; + + /** + * Creates a new LoadStampTargetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadStampTargetRequest instance + */ + public static create(properties?: wm.protobuf.ILoadStampTargetRequest): wm.protobuf.LoadStampTargetRequest; + + /** + * Encodes the specified LoadStampTargetRequest message. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @param message LoadStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @param message LoadStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadStampTargetRequest; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadStampTargetRequest; + + /** + * Verifies a LoadStampTargetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadStampTargetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadStampTargetRequest; + + /** + * Creates a plain object from a LoadStampTargetRequest message. Also converts values to other types if specified. + * @param message LoadStampTargetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadStampTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadStampTargetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadStampTargetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadStampTargetResponse. */ + interface ILoadStampTargetResponse { + + /** LoadStampTargetResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadStampTargetResponse cars */ + cars?: (wm.protobuf.IStampTargetCar[]|null); + + /** LoadStampTargetResponse challengers */ + challengers?: (wm.protobuf.IChallengerCar[]|null); + } + + /** Represents a LoadStampTargetResponse. */ + class LoadStampTargetResponse implements ILoadStampTargetResponse { + + /** + * Constructs a new LoadStampTargetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadStampTargetResponse); + + /** LoadStampTargetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadStampTargetResponse cars. */ + public cars: wm.protobuf.IStampTargetCar[]; + + /** LoadStampTargetResponse challengers. */ + public challengers: wm.protobuf.IChallengerCar[]; + + /** + * Creates a new LoadStampTargetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadStampTargetResponse instance + */ + public static create(properties?: wm.protobuf.ILoadStampTargetResponse): wm.protobuf.LoadStampTargetResponse; + + /** + * Encodes the specified LoadStampTargetResponse message. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @param message LoadStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @param message LoadStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadStampTargetResponse; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadStampTargetResponse; + + /** + * Verifies a LoadStampTargetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadStampTargetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadStampTargetResponse; + + /** + * Creates a plain object from a LoadStampTargetResponse message. Also converts values to other types if specified. + * @param message LoadStampTargetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadStampTargetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadStampTargetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadStampTargetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LockStampTargetRequest. */ + interface ILockStampTargetRequest { + + /** LockStampTargetRequest carId */ + carId: number; + + /** LockStampTargetRequest targetCars */ + targetCars?: (number[]|null); + } + + /** Represents a LockStampTargetRequest. */ + class LockStampTargetRequest implements ILockStampTargetRequest { + + /** + * Constructs a new LockStampTargetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILockStampTargetRequest); + + /** LockStampTargetRequest carId. */ + public carId: number; + + /** LockStampTargetRequest targetCars. */ + public targetCars: number[]; + + /** + * Creates a new LockStampTargetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LockStampTargetRequest instance + */ + public static create(properties?: wm.protobuf.ILockStampTargetRequest): wm.protobuf.LockStampTargetRequest; + + /** + * Encodes the specified LockStampTargetRequest message. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @param message LockStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILockStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LockStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @param message LockStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILockStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LockStampTargetRequest; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LockStampTargetRequest; + + /** + * Verifies a LockStampTargetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LockStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LockStampTargetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LockStampTargetRequest; + + /** + * Creates a plain object from a LockStampTargetRequest message. Also converts values to other types if specified. + * @param message LockStampTargetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LockStampTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LockStampTargetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LockStampTargetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LockStampTargetResponse. */ + interface ILockStampTargetResponse { + + /** LockStampTargetResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a LockStampTargetResponse. */ + class LockStampTargetResponse implements ILockStampTargetResponse { + + /** + * Constructs a new LockStampTargetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILockStampTargetResponse); + + /** LockStampTargetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new LockStampTargetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LockStampTargetResponse instance + */ + public static create(properties?: wm.protobuf.ILockStampTargetResponse): wm.protobuf.LockStampTargetResponse; + + /** + * Encodes the specified LockStampTargetResponse message. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @param message LockStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILockStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LockStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @param message LockStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILockStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LockStampTargetResponse; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LockStampTargetResponse; + + /** + * Verifies a LockStampTargetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LockStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LockStampTargetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LockStampTargetResponse; + + /** + * Creates a plain object from a LockStampTargetResponse message. Also converts values to other types if specified. + * @param message LockStampTargetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LockStampTargetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LockStampTargetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LockStampTargetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionInfoRequest. */ + interface ILoadGhostCompetitionInfoRequest { + + /** LoadGhostCompetitionInfoRequest carId */ + carId: number; + + /** LoadGhostCompetitionInfoRequest competitionId */ + competitionId: number; + } + + /** Represents a LoadGhostCompetitionInfoRequest. */ + class LoadGhostCompetitionInfoRequest implements ILoadGhostCompetitionInfoRequest { + + /** + * Constructs a new LoadGhostCompetitionInfoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionInfoRequest); + + /** LoadGhostCompetitionInfoRequest carId. */ + public carId: number; + + /** LoadGhostCompetitionInfoRequest competitionId. */ + public competitionId: number; + + /** + * Creates a new LoadGhostCompetitionInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionInfoRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionInfoRequest): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @param message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @param message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Verifies a LoadGhostCompetitionInfoRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionInfoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionInfoRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoRequest message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionInfoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionInfoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionInfoResponse. */ + interface ILoadGhostCompetitionInfoResponse { + + /** LoadGhostCompetitionInfoResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionInfoResponse periodId */ + periodId?: (number|null); + + /** LoadGhostCompetitionInfoResponse closed */ + closed: boolean; + + /** LoadGhostCompetitionInfoResponse brakingPoint */ + brakingPoint?: (number|null); + + /** LoadGhostCompetitionInfoResponse qualified */ + qualified?: (boolean|null); + + /** LoadGhostCompetitionInfoResponse topResults */ + topResults?: (number[]|null); + + /** LoadGhostCompetitionInfoResponse result */ + result?: (number|null); + + /** LoadGhostCompetitionInfoResponse rank */ + rank?: (number|null); + + /** LoadGhostCompetitionInfoResponse parameters1 */ + parameters1?: (number[]|null); + + /** LoadGhostCompetitionInfoResponse parameters2 */ + parameters2?: (boolean|null); + } + + /** Represents a LoadGhostCompetitionInfoResponse. */ + class LoadGhostCompetitionInfoResponse implements ILoadGhostCompetitionInfoResponse { + + /** + * Constructs a new LoadGhostCompetitionInfoResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionInfoResponse); + + /** LoadGhostCompetitionInfoResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionInfoResponse periodId. */ + public periodId: number; + + /** LoadGhostCompetitionInfoResponse closed. */ + public closed: boolean; + + /** LoadGhostCompetitionInfoResponse brakingPoint. */ + public brakingPoint: number; + + /** LoadGhostCompetitionInfoResponse qualified. */ + public qualified: boolean; + + /** LoadGhostCompetitionInfoResponse topResults. */ + public topResults: number[]; + + /** LoadGhostCompetitionInfoResponse result. */ + public result: number; + + /** LoadGhostCompetitionInfoResponse rank. */ + public rank: number; + + /** LoadGhostCompetitionInfoResponse parameters1. */ + public parameters1: number[]; + + /** LoadGhostCompetitionInfoResponse parameters2. */ + public parameters2: boolean; + + /** + * Creates a new LoadGhostCompetitionInfoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionInfoResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionInfoResponse): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @param message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @param message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Verifies a LoadGhostCompetitionInfoResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionInfoResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionInfoResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoResponse message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionInfoResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionInfoResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTimeAttackRecordRequest. */ + interface ILoadTimeAttackRecordRequest { + + /** LoadTimeAttackRecordRequest carId */ + carId?: (number|null); + + /** LoadTimeAttackRecordRequest model */ + model: number; + + /** LoadTimeAttackRecordRequest course */ + course: number; + } + + /** Represents a LoadTimeAttackRecordRequest. */ + class LoadTimeAttackRecordRequest implements ILoadTimeAttackRecordRequest { + + /** + * Constructs a new LoadTimeAttackRecordRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTimeAttackRecordRequest); + + /** LoadTimeAttackRecordRequest carId. */ + public carId: number; + + /** LoadTimeAttackRecordRequest model. */ + public model: number; + + /** LoadTimeAttackRecordRequest course. */ + public course: number; + + /** + * Creates a new LoadTimeAttackRecordRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTimeAttackRecordRequest instance + */ + public static create(properties?: wm.protobuf.ILoadTimeAttackRecordRequest): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @param message LoadTimeAttackRecordRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTimeAttackRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @param message LoadTimeAttackRecordRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTimeAttackRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Verifies a LoadTimeAttackRecordRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTimeAttackRecordRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTimeAttackRecordRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Creates a plain object from a LoadTimeAttackRecordRequest message. Also converts values to other types if specified. + * @param message LoadTimeAttackRecordRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTimeAttackRecordRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTimeAttackRecordRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTimeAttackRecordRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTimeAttackRecordResponse. */ + interface ILoadTimeAttackRecordResponse { + + /** LoadTimeAttackRecordResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadTimeAttackRecordResponse wholeRanking */ + wholeRanking?: (number[]|null); + + /** LoadTimeAttackRecordResponse modelRanking */ + modelRanking?: (number[]|null); + + /** LoadTimeAttackRecordResponse personalBestTime */ + personalBestTime?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_1Time */ + pbSection_1Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_2Time */ + pbSection_2Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_3Time */ + pbSection_3Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_4Time */ + pbSection_4Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_5Time */ + pbSection_5Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_6Time */ + pbSection_6Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_7Time */ + pbSection_7Time?: (number|null); + } + + /** Represents a LoadTimeAttackRecordResponse. */ + class LoadTimeAttackRecordResponse implements ILoadTimeAttackRecordResponse { + + /** + * Constructs a new LoadTimeAttackRecordResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTimeAttackRecordResponse); + + /** LoadTimeAttackRecordResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadTimeAttackRecordResponse wholeRanking. */ + public wholeRanking: number[]; + + /** LoadTimeAttackRecordResponse modelRanking. */ + public modelRanking: number[]; + + /** LoadTimeAttackRecordResponse personalBestTime. */ + public personalBestTime: number; + + /** LoadTimeAttackRecordResponse pbSection_1Time. */ + public pbSection_1Time: number; + + /** LoadTimeAttackRecordResponse pbSection_2Time. */ + public pbSection_2Time: number; + + /** LoadTimeAttackRecordResponse pbSection_3Time. */ + public pbSection_3Time: number; + + /** LoadTimeAttackRecordResponse pbSection_4Time. */ + public pbSection_4Time: number; + + /** LoadTimeAttackRecordResponse pbSection_5Time. */ + public pbSection_5Time: number; + + /** LoadTimeAttackRecordResponse pbSection_6Time. */ + public pbSection_6Time: number; + + /** LoadTimeAttackRecordResponse pbSection_7Time. */ + public pbSection_7Time: number; + + /** + * Creates a new LoadTimeAttackRecordResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTimeAttackRecordResponse instance + */ + public static create(properties?: wm.protobuf.ILoadTimeAttackRecordResponse): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @param message LoadTimeAttackRecordResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTimeAttackRecordResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @param message LoadTimeAttackRecordResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTimeAttackRecordResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Verifies a LoadTimeAttackRecordResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTimeAttackRecordResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTimeAttackRecordResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Creates a plain object from a LoadTimeAttackRecordResponse message. Also converts values to other types if specified. + * @param message LoadTimeAttackRecordResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTimeAttackRecordResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTimeAttackRecordResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTimeAttackRecordResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveTerminalResultRequest. */ + interface ISaveTerminalResultRequest { + + /** SaveTerminalResultRequest userId */ + userId: number; + + /** SaveTerminalResultRequest timestamp */ + timestamp: number; + + /** SaveTerminalResultRequest carOrder */ + carOrder?: (number[]|null); + + /** SaveTerminalResultRequest confirmedTutorials */ + confirmedTutorials?: (wm.protobuf.TutorialType[]|null); + + /** SaveTerminalResultRequest garageMenuEntered */ + garageMenuEntered?: (boolean|null); + } + + /** Represents a SaveTerminalResultRequest. */ + class SaveTerminalResultRequest implements ISaveTerminalResultRequest { + + /** + * Constructs a new SaveTerminalResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveTerminalResultRequest); + + /** SaveTerminalResultRequest userId. */ + public userId: number; + + /** SaveTerminalResultRequest timestamp. */ + public timestamp: number; + + /** SaveTerminalResultRequest carOrder. */ + public carOrder: number[]; + + /** SaveTerminalResultRequest confirmedTutorials. */ + public confirmedTutorials: wm.protobuf.TutorialType[]; + + /** SaveTerminalResultRequest garageMenuEntered. */ + public garageMenuEntered: boolean; + + /** + * Creates a new SaveTerminalResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveTerminalResultRequest instance + */ + public static create(properties?: wm.protobuf.ISaveTerminalResultRequest): wm.protobuf.SaveTerminalResultRequest; + + /** + * Encodes the specified SaveTerminalResultRequest message. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @param message SaveTerminalResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveTerminalResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveTerminalResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @param message SaveTerminalResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveTerminalResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveTerminalResultRequest; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveTerminalResultRequest; + + /** + * Verifies a SaveTerminalResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveTerminalResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveTerminalResultRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveTerminalResultRequest; + + /** + * Creates a plain object from a SaveTerminalResultRequest message. Also converts values to other types if specified. + * @param message SaveTerminalResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveTerminalResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveTerminalResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveTerminalResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveTerminalResultResponse. */ + interface ISaveTerminalResultResponse { + + /** SaveTerminalResultResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveTerminalResultResponse. */ + class SaveTerminalResultResponse implements ISaveTerminalResultResponse { + + /** + * Constructs a new SaveTerminalResultResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveTerminalResultResponse); + + /** SaveTerminalResultResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveTerminalResultResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveTerminalResultResponse instance + */ + public static create(properties?: wm.protobuf.ISaveTerminalResultResponse): wm.protobuf.SaveTerminalResultResponse; + + /** + * Encodes the specified SaveTerminalResultResponse message. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @param message SaveTerminalResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveTerminalResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveTerminalResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @param message SaveTerminalResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveTerminalResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveTerminalResultResponse; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveTerminalResultResponse; + + /** + * Verifies a SaveTerminalResultResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveTerminalResultResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveTerminalResultResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveTerminalResultResponse; + + /** + * Creates a plain object from a SaveTerminalResultResponse message. Also converts values to other types if specified. + * @param message SaveTerminalResultResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveTerminalResultResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveTerminalResultResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveTerminalResultResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PingRequest. */ + interface IPingRequest { + + /** PingRequest ping */ + ping?: (number|null); + } + + /** Represents a PingRequest. */ + class PingRequest implements IPingRequest { + + /** + * Constructs a new PingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPingRequest); + + /** PingRequest ping. */ + public ping: number; + + /** + * Creates a new PingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PingRequest instance + */ + public static create(properties?: wm.protobuf.IPingRequest): wm.protobuf.PingRequest; + + /** + * Encodes the specified PingRequest message. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @param message PingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PingRequest message, length delimited. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @param message PingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PingRequest; + + /** + * Decodes a PingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PingRequest; + + /** + * Verifies a PingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PingRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PingRequest; + + /** + * Creates a plain object from a PingRequest message. Also converts values to other types if specified. + * @param message PingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PingResponse. */ + interface IPingResponse { + + /** PingResponse error */ + error: wm.protobuf.ErrorCode; + + /** PingResponse pong */ + pong: number; + } + + /** Represents a PingResponse. */ + class PingResponse implements IPingResponse { + + /** + * Constructs a new PingResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPingResponse); + + /** PingResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** PingResponse pong. */ + public pong: number; + + /** + * Creates a new PingResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PingResponse instance + */ + public static create(properties?: wm.protobuf.IPingResponse): wm.protobuf.PingResponse; + + /** + * Encodes the specified PingResponse message. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @param message PingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PingResponse message, length delimited. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @param message PingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PingResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PingResponse; + + /** + * Decodes a PingResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PingResponse; + + /** + * Verifies a PingResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PingResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PingResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PingResponse; + + /** + * Creates a plain object from a PingResponse message. Also converts values to other types if specified. + * @param message PingResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PingResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PingResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PingResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTerminalInformationRequest. */ + interface ILoadTerminalInformationRequest { + + /** LoadTerminalInformationRequest userId */ + userId: number; + } + + /** Represents a LoadTerminalInformationRequest. */ + class LoadTerminalInformationRequest implements ILoadTerminalInformationRequest { + + /** + * Constructs a new LoadTerminalInformationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTerminalInformationRequest); + + /** LoadTerminalInformationRequest userId. */ + public userId: number; + + /** + * Creates a new LoadTerminalInformationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTerminalInformationRequest instance + */ + public static create(properties?: wm.protobuf.ILoadTerminalInformationRequest): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Encodes the specified LoadTerminalInformationRequest message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @param message LoadTerminalInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTerminalInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTerminalInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @param message LoadTerminalInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTerminalInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Verifies a LoadTerminalInformationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTerminalInformationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTerminalInformationRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Creates a plain object from a LoadTerminalInformationRequest message. Also converts values to other types if specified. + * @param message LoadTerminalInformationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTerminalInformationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTerminalInformationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTerminalInformationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTerminalInformationResponse. */ + interface ILoadTerminalInformationResponse { + + /** LoadTerminalInformationResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadTerminalInformationResponse prizeReceivable */ + prizeReceivable: boolean; + + /** LoadTerminalInformationResponse noticeEntries */ + noticeEntries?: (wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice[]|null); + + /** LoadTerminalInformationResponse noticeMessage */ + noticeMessage?: (string[]|null); + + /** LoadTerminalInformationResponse noticeWindow */ + noticeWindow?: (wm.protobuf.NoticeEntry[]|null); + + /** LoadTerminalInformationResponse noticeWindowMessage */ + noticeWindowMessage?: (string[]|null); + + /** LoadTerminalInformationResponse transferNotice */ + transferNotice: wm.protobuf.ITransferNotice; + + /** LoadTerminalInformationResponse announceFeature */ + announceFeature: boolean; + + /** LoadTerminalInformationResponse freeScratched */ + freeScratched: boolean; + + /** LoadTerminalInformationResponse restrictedModels */ + restrictedModels?: (number[]|null); + } + + /** Represents a LoadTerminalInformationResponse. */ + class LoadTerminalInformationResponse implements ILoadTerminalInformationResponse { + + /** + * Constructs a new LoadTerminalInformationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTerminalInformationResponse); + + /** LoadTerminalInformationResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadTerminalInformationResponse prizeReceivable. */ + public prizeReceivable: boolean; + + /** LoadTerminalInformationResponse noticeEntries. */ + public noticeEntries: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice[]; + + /** LoadTerminalInformationResponse noticeMessage. */ + public noticeMessage: string[]; + + /** LoadTerminalInformationResponse noticeWindow. */ + public noticeWindow: wm.protobuf.NoticeEntry[]; + + /** LoadTerminalInformationResponse noticeWindowMessage. */ + public noticeWindowMessage: string[]; + + /** LoadTerminalInformationResponse transferNotice. */ + public transferNotice: wm.protobuf.ITransferNotice; + + /** LoadTerminalInformationResponse announceFeature. */ + public announceFeature: boolean; + + /** LoadTerminalInformationResponse freeScratched. */ + public freeScratched: boolean; + + /** LoadTerminalInformationResponse restrictedModels. */ + public restrictedModels: number[]; + + /** + * Creates a new LoadTerminalInformationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTerminalInformationResponse instance + */ + public static create(properties?: wm.protobuf.ILoadTerminalInformationResponse): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Encodes the specified LoadTerminalInformationResponse message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @param message LoadTerminalInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTerminalInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTerminalInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @param message LoadTerminalInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTerminalInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Verifies a LoadTerminalInformationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTerminalInformationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTerminalInformationResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Creates a plain object from a LoadTerminalInformationResponse message. Also converts values to other types if specified. + * @param message LoadTerminalInformationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTerminalInformationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTerminalInformationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTerminalInformationResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadTerminalInformationResponse { + + /** Properties of a TerminalNotice. */ + interface ITerminalNotice { + + /** TerminalNotice noticeType */ + noticeType: wm.protobuf.NoticeEntry; + + /** TerminalNotice field_1 */ + field_1?: (string|null); + + /** TerminalNotice field_2 */ + field_2?: (number|null); + + /** TerminalNotice field_3 */ + field_3?: (number|null); + } + + /** Represents a TerminalNotice. */ + class TerminalNotice implements ITerminalNotice { + + /** + * Constructs a new TerminalNotice. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice); + + /** TerminalNotice noticeType. */ + public noticeType: wm.protobuf.NoticeEntry; + + /** TerminalNotice field_1. */ + public field_1: string; + + /** TerminalNotice field_2. */ + public field_2: number; + + /** TerminalNotice field_3. */ + public field_3: number; + + /** + * Creates a new TerminalNotice instance using the specified properties. + * @param [properties] Properties to set + * @returns TerminalNotice instance + */ + public static create(properties?: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Encodes the specified TerminalNotice message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @param message TerminalNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerminalNotice message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @param message TerminalNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Verifies a TerminalNotice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerminalNotice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerminalNotice + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Creates a plain object from a TerminalNotice message. Also converts values to other types if specified. + * @param message TerminalNotice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTerminalInformationResponse.TerminalNotice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerminalNotice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerminalNotice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateUserRequest. */ + interface ICreateUserRequest { + + /** CreateUserRequest banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateUserRequest cardChipId */ + cardChipId?: (string|null); + + /** CreateUserRequest accessCode */ + accessCode?: (string|null); + + /** CreateUserRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** CreateUserRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** CreateUserRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** CreateUserRequest timestamp */ + timestamp: number; + } + + /** Represents a CreateUserRequest. */ + class CreateUserRequest implements ICreateUserRequest { + + /** + * Constructs a new CreateUserRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateUserRequest); + + /** CreateUserRequest banapassportAmId. */ + public banapassportAmId: number; + + /** CreateUserRequest cardChipId. */ + public cardChipId: string; + + /** CreateUserRequest accessCode. */ + public accessCode: string; + + /** CreateUserRequest cardTypeCode. */ + public cardTypeCode: number; + + /** CreateUserRequest cardRegionCode. */ + public cardRegionCode: number; + + /** CreateUserRequest device. */ + public device: wm.protobuf.DeviceType; + + /** CreateUserRequest timestamp. */ + public timestamp: number; + + /** + * Creates a new CreateUserRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserRequest instance + */ + public static create(properties?: wm.protobuf.ICreateUserRequest): wm.protobuf.CreateUserRequest; + + /** + * Encodes the specified CreateUserRequest message. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @param message CreateUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @param message CreateUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateUserRequest; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateUserRequest; + + /** + * Verifies a CreateUserRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateUserRequest; + + /** + * Creates a plain object from a CreateUserRequest message. Also converts values to other types if specified. + * @param message CreateUserRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateUserRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateUserResponse. */ + interface ICreateUserResponse { + + /** CreateUserResponse error */ + error: wm.protobuf.ErrorCode; + + /** CreateUserResponse accessCode */ + accessCode?: (string|null); + + /** CreateUserResponse banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateUserResponse mbid */ + mbid?: (number|null); + + /** CreateUserResponse userId */ + userId: number; + } + + /** Represents a CreateUserResponse. */ + class CreateUserResponse implements ICreateUserResponse { + + /** + * Constructs a new CreateUserResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateUserResponse); + + /** CreateUserResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** CreateUserResponse accessCode. */ + public accessCode: string; + + /** CreateUserResponse banapassportAmId. */ + public banapassportAmId: number; + + /** CreateUserResponse mbid. */ + public mbid: number; + + /** CreateUserResponse userId. */ + public userId: number; + + /** + * Creates a new CreateUserResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserResponse instance + */ + public static create(properties?: wm.protobuf.ICreateUserResponse): wm.protobuf.CreateUserResponse; + + /** + * Encodes the specified CreateUserResponse message. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @param message CreateUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @param message CreateUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateUserResponse; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateUserResponse; + + /** + * Verifies a CreateUserResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateUserResponse; + + /** + * Creates a plain object from a CreateUserResponse message. Also converts values to other types if specified. + * @param message CreateUserResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateUserResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AskAccessCodeRequest. */ + interface IAskAccessCodeRequest { + + /** AskAccessCodeRequest cardChipId */ + cardChipId: string; + } + + /** Represents an AskAccessCodeRequest. */ + class AskAccessCodeRequest implements IAskAccessCodeRequest { + + /** + * Constructs a new AskAccessCodeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IAskAccessCodeRequest); + + /** AskAccessCodeRequest cardChipId. */ + public cardChipId: string; + + /** + * Creates a new AskAccessCodeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AskAccessCodeRequest instance + */ + public static create(properties?: wm.protobuf.IAskAccessCodeRequest): wm.protobuf.AskAccessCodeRequest; + + /** + * Encodes the specified AskAccessCodeRequest message. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @param message AskAccessCodeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IAskAccessCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AskAccessCodeRequest message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @param message AskAccessCodeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IAskAccessCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.AskAccessCodeRequest; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.AskAccessCodeRequest; + + /** + * Verifies an AskAccessCodeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AskAccessCodeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AskAccessCodeRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.AskAccessCodeRequest; + + /** + * Creates a plain object from an AskAccessCodeRequest message. Also converts values to other types if specified. + * @param message AskAccessCodeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.AskAccessCodeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AskAccessCodeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AskAccessCodeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AskAccessCodeResponse. */ + interface IAskAccessCodeResponse { + + /** AskAccessCodeResponse error */ + error: wm.protobuf.ErrorCode; + + /** AskAccessCodeResponse accessCode */ + accessCode: string; + } + + /** Represents an AskAccessCodeResponse. */ + class AskAccessCodeResponse implements IAskAccessCodeResponse { + + /** + * Constructs a new AskAccessCodeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IAskAccessCodeResponse); + + /** AskAccessCodeResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** AskAccessCodeResponse accessCode. */ + public accessCode: string; + + /** + * Creates a new AskAccessCodeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AskAccessCodeResponse instance + */ + public static create(properties?: wm.protobuf.IAskAccessCodeResponse): wm.protobuf.AskAccessCodeResponse; + + /** + * Encodes the specified AskAccessCodeResponse message. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @param message AskAccessCodeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IAskAccessCodeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AskAccessCodeResponse message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @param message AskAccessCodeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IAskAccessCodeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.AskAccessCodeResponse; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.AskAccessCodeResponse; + + /** + * Verifies an AskAccessCodeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AskAccessCodeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AskAccessCodeResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.AskAccessCodeResponse; + + /** + * Creates a plain object from an AskAccessCodeResponse message. Also converts values to other types if specified. + * @param message AskAccessCodeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.AskAccessCodeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AskAccessCodeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AskAccessCodeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterOpponentGhostRequest. */ + interface IRegisterOpponentGhostRequest { + + /** RegisterOpponentGhostRequest carId */ + carId: number; + + /** RegisterOpponentGhostRequest specialGhostId */ + specialGhostId: number; + } + + /** Represents a RegisterOpponentGhostRequest. */ + class RegisterOpponentGhostRequest implements IRegisterOpponentGhostRequest { + + /** + * Constructs a new RegisterOpponentGhostRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterOpponentGhostRequest); + + /** RegisterOpponentGhostRequest carId. */ + public carId: number; + + /** RegisterOpponentGhostRequest specialGhostId. */ + public specialGhostId: number; + + /** + * Creates a new RegisterOpponentGhostRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterOpponentGhostRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterOpponentGhostRequest): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Encodes the specified RegisterOpponentGhostRequest message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @param message RegisterOpponentGhostRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterOpponentGhostRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterOpponentGhostRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @param message RegisterOpponentGhostRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterOpponentGhostRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Verifies a RegisterOpponentGhostRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterOpponentGhostRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterOpponentGhostRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Creates a plain object from a RegisterOpponentGhostRequest message. Also converts values to other types if specified. + * @param message RegisterOpponentGhostRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterOpponentGhostRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterOpponentGhostRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterOpponentGhostRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterOpponentGhostResponse. */ + interface IRegisterOpponentGhostResponse { + + /** RegisterOpponentGhostResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a RegisterOpponentGhostResponse. */ + class RegisterOpponentGhostResponse implements IRegisterOpponentGhostResponse { + + /** + * Constructs a new RegisterOpponentGhostResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterOpponentGhostResponse); + + /** RegisterOpponentGhostResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new RegisterOpponentGhostResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterOpponentGhostResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterOpponentGhostResponse): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Encodes the specified RegisterOpponentGhostResponse message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @param message RegisterOpponentGhostResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterOpponentGhostResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterOpponentGhostResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @param message RegisterOpponentGhostResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterOpponentGhostResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Verifies a RegisterOpponentGhostResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterOpponentGhostResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterOpponentGhostResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Creates a plain object from a RegisterOpponentGhostResponse message. Also converts values to other types if specified. + * @param message RegisterOpponentGhostResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterOpponentGhostResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterOpponentGhostResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterOpponentGhostResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GrantCarRightRequest. */ + interface IGrantCarRightRequest { + + /** GrantCarRightRequest userId */ + userId: number; + + /** GrantCarRightRequest targetUserId */ + targetUserId: number; + + /** GrantCarRightRequest timestamp */ + timestamp: number; + } + + /** Represents a GrantCarRightRequest. */ + class GrantCarRightRequest implements IGrantCarRightRequest { + + /** + * Constructs a new GrantCarRightRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGrantCarRightRequest); + + /** GrantCarRightRequest userId. */ + public userId: number; + + /** GrantCarRightRequest targetUserId. */ + public targetUserId: number; + + /** GrantCarRightRequest timestamp. */ + public timestamp: number; + + /** + * Creates a new GrantCarRightRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GrantCarRightRequest instance + */ + public static create(properties?: wm.protobuf.IGrantCarRightRequest): wm.protobuf.GrantCarRightRequest; + + /** + * Encodes the specified GrantCarRightRequest message. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @param message GrantCarRightRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGrantCarRightRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GrantCarRightRequest message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @param message GrantCarRightRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGrantCarRightRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GrantCarRightRequest; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GrantCarRightRequest; + + /** + * Verifies a GrantCarRightRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GrantCarRightRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GrantCarRightRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GrantCarRightRequest; + + /** + * Creates a plain object from a GrantCarRightRequest message. Also converts values to other types if specified. + * @param message GrantCarRightRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GrantCarRightRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GrantCarRightRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GrantCarRightRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GrantCarRightResponse. */ + interface IGrantCarRightResponse { + + /** GrantCarRightResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a GrantCarRightResponse. */ + class GrantCarRightResponse implements IGrantCarRightResponse { + + /** + * Constructs a new GrantCarRightResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGrantCarRightResponse); + + /** GrantCarRightResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new GrantCarRightResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GrantCarRightResponse instance + */ + public static create(properties?: wm.protobuf.IGrantCarRightResponse): wm.protobuf.GrantCarRightResponse; + + /** + * Encodes the specified GrantCarRightResponse message. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @param message GrantCarRightResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGrantCarRightResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GrantCarRightResponse message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @param message GrantCarRightResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGrantCarRightResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GrantCarRightResponse; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GrantCarRightResponse; + + /** + * Verifies a GrantCarRightResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GrantCarRightResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GrantCarRightResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GrantCarRightResponse; + + /** + * Creates a plain object from a GrantCarRightResponse message. Also converts values to other types if specified. + * @param message GrantCarRightResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GrantCarRightResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GrantCarRightResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GrantCarRightResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionRankingRequest. */ + interface ILoadGhostCompetitionRankingRequest { + + /** LoadGhostCompetitionRankingRequest carId */ + carId: number; + + /** LoadGhostCompetitionRankingRequest competitionId */ + competitionId: number; + } + + /** Represents a LoadGhostCompetitionRankingRequest. */ + class LoadGhostCompetitionRankingRequest implements ILoadGhostCompetitionRankingRequest { + + /** + * Constructs a new LoadGhostCompetitionRankingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionRankingRequest); + + /** LoadGhostCompetitionRankingRequest carId. */ + public carId: number; + + /** LoadGhostCompetitionRankingRequest competitionId. */ + public competitionId: number; + + /** + * Creates a new LoadGhostCompetitionRankingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionRankingRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionRankingRequest): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @param message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionRankingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @param message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionRankingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Verifies a LoadGhostCompetitionRankingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionRankingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionRankingRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingRequest message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionRankingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionRankingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionRankingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionRankingResponse. */ + interface ILoadGhostCompetitionRankingResponse { + + /** LoadGhostCompetitionRankingResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionRankingResponse periodId */ + periodId?: (number|null); + + /** LoadGhostCompetitionRankingResponse numOfParticipants */ + numOfParticipants: number; + + /** LoadGhostCompetitionRankingResponse competitionSchedule */ + competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** LoadGhostCompetitionRankingResponse ownRecord */ + ownRecord?: (wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null); + + /** LoadGhostCompetitionRankingResponse topRecords */ + topRecords?: (wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry[]|null); + } + + /** Represents a LoadGhostCompetitionRankingResponse. */ + class LoadGhostCompetitionRankingResponse implements ILoadGhostCompetitionRankingResponse { + + /** + * Constructs a new LoadGhostCompetitionRankingResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionRankingResponse); + + /** LoadGhostCompetitionRankingResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionRankingResponse periodId. */ + public periodId: number; + + /** LoadGhostCompetitionRankingResponse numOfParticipants. */ + public numOfParticipants: number; + + /** LoadGhostCompetitionRankingResponse competitionSchedule. */ + public competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** LoadGhostCompetitionRankingResponse ownRecord. */ + public ownRecord?: (wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null); + + /** LoadGhostCompetitionRankingResponse topRecords. */ + public topRecords: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry[]; + + /** + * Creates a new LoadGhostCompetitionRankingResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionRankingResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionRankingResponse): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @param message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionRankingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @param message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionRankingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Verifies a LoadGhostCompetitionRankingResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionRankingResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionRankingResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingResponse message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionRankingResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionRankingResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionRankingResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGhostCompetitionRankingResponse { + + /** Properties of an Entry. */ + interface IEntry { + + /** Entry rank */ + rank: number; + + /** Entry result */ + result: number; + + /** Entry carId */ + carId: number; + + /** Entry name */ + name: string; + + /** Entry regionId */ + regionId: number; + + /** Entry model */ + model: number; + + /** Entry visualModel */ + visualModel: number; + + /** Entry defaultColor */ + defaultColor: number; + + /** Entry title */ + title: string; + + /** Entry level */ + level: number; + + /** Entry windowStickerString */ + windowStickerString?: (string|null); + + /** Entry playedShopName */ + playedShopName: string; + + /** Entry playedAt */ + playedAt: number; + } + + /** Represents an Entry. */ + class Entry implements IEntry { + + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry); + + /** Entry rank. */ + public rank: number; + + /** Entry result. */ + public result: number; + + /** Entry carId. */ + public carId: number; + + /** Entry name. */ + public name: string; + + /** Entry regionId. */ + public regionId: number; + + /** Entry model. */ + public model: number; + + /** Entry visualModel. */ + public visualModel: number; + + /** Entry defaultColor. */ + public defaultColor: number; + + /** Entry title. */ + public title: string; + + /** Entry level. */ + public level: number; + + /** Entry windowStickerString. */ + public windowStickerString: string; + + /** Entry playedShopName. */ + public playedShopName: string; + + /** Entry playedAt. */ + public playedAt: number; + + /** + * Creates a new Entry instance using the specified properties. + * @param [properties] Properties to set + * @returns Entry instance + */ + public static create(properties?: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Encodes the specified Entry message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Verifies an Entry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entry + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionRankingResponse.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadUnreceivedUserItemsRequest. */ + interface ILoadUnreceivedUserItemsRequest { + + /** LoadUnreceivedUserItemsRequest userId */ + userId: number; + } + + /** Represents a LoadUnreceivedUserItemsRequest. */ + class LoadUnreceivedUserItemsRequest implements ILoadUnreceivedUserItemsRequest { + + /** + * Constructs a new LoadUnreceivedUserItemsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUnreceivedUserItemsRequest); + + /** LoadUnreceivedUserItemsRequest userId. */ + public userId: number; + + /** + * Creates a new LoadUnreceivedUserItemsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUnreceivedUserItemsRequest instance + */ + public static create(properties?: wm.protobuf.ILoadUnreceivedUserItemsRequest): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @param message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUnreceivedUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @param message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUnreceivedUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Verifies a LoadUnreceivedUserItemsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUnreceivedUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUnreceivedUserItemsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsRequest message. Also converts values to other types if specified. + * @param message LoadUnreceivedUserItemsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUnreceivedUserItemsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUnreceivedUserItemsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadUnreceivedUserItemsResponse. */ + interface ILoadUnreceivedUserItemsResponse { + + /** LoadUnreceivedUserItemsResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadUnreceivedUserItemsResponse ownedUserItems */ + ownedUserItems?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a LoadUnreceivedUserItemsResponse. */ + class LoadUnreceivedUserItemsResponse implements ILoadUnreceivedUserItemsResponse { + + /** + * Constructs a new LoadUnreceivedUserItemsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUnreceivedUserItemsResponse); + + /** LoadUnreceivedUserItemsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadUnreceivedUserItemsResponse ownedUserItems. */ + public ownedUserItems: wm.protobuf.IUserItem[]; + + /** + * Creates a new LoadUnreceivedUserItemsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUnreceivedUserItemsResponse instance + */ + public static create(properties?: wm.protobuf.ILoadUnreceivedUserItemsResponse): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @param message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUnreceivedUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @param message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUnreceivedUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Verifies a LoadUnreceivedUserItemsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUnreceivedUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUnreceivedUserItemsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsResponse message. Also converts values to other types if specified. + * @param message LoadUnreceivedUserItemsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUnreceivedUserItemsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUnreceivedUserItemsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBookmarksRequest. */ + interface ILoadBookmarksRequest { + + /** LoadBookmarksRequest userId */ + userId: number; + } + + /** Represents a LoadBookmarksRequest. */ + class LoadBookmarksRequest implements ILoadBookmarksRequest { + + /** + * Constructs a new LoadBookmarksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadBookmarksRequest); + + /** LoadBookmarksRequest userId. */ + public userId: number; + + /** + * Creates a new LoadBookmarksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBookmarksRequest instance + */ + public static create(properties?: wm.protobuf.ILoadBookmarksRequest): wm.protobuf.LoadBookmarksRequest; + + /** + * Encodes the specified LoadBookmarksRequest message. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @param message LoadBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @param message LoadBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadBookmarksRequest; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadBookmarksRequest; + + /** + * Verifies a LoadBookmarksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBookmarksRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadBookmarksRequest; + + /** + * Creates a plain object from a LoadBookmarksRequest message. Also converts values to other types if specified. + * @param message LoadBookmarksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadBookmarksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBookmarksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBookmarksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBookmarksResponse. */ + interface ILoadBookmarksResponse { + + /** LoadBookmarksResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadBookmarksResponse cars */ + cars?: (wm.protobuf.ICar[]|null); + } + + /** Represents a LoadBookmarksResponse. */ + class LoadBookmarksResponse implements ILoadBookmarksResponse { + + /** + * Constructs a new LoadBookmarksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadBookmarksResponse); + + /** LoadBookmarksResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadBookmarksResponse cars. */ + public cars: wm.protobuf.ICar[]; + + /** + * Creates a new LoadBookmarksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBookmarksResponse instance + */ + public static create(properties?: wm.protobuf.ILoadBookmarksResponse): wm.protobuf.LoadBookmarksResponse; + + /** + * Encodes the specified LoadBookmarksResponse message. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @param message LoadBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @param message LoadBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadBookmarksResponse; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadBookmarksResponse; + + /** + * Verifies a LoadBookmarksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBookmarksResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadBookmarksResponse; + + /** + * Creates a plain object from a LoadBookmarksResponse message. Also converts values to other types if specified. + * @param message LoadBookmarksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadBookmarksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBookmarksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBookmarksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveBookmarksRequest. */ + interface ISaveBookmarksRequest { + + /** SaveBookmarksRequest userId */ + userId: number; + + /** SaveBookmarksRequest cars */ + cars?: (number[]|null); + } + + /** Represents a SaveBookmarksRequest. */ + class SaveBookmarksRequest implements ISaveBookmarksRequest { + + /** + * Constructs a new SaveBookmarksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveBookmarksRequest); + + /** SaveBookmarksRequest userId. */ + public userId: number; + + /** SaveBookmarksRequest cars. */ + public cars: number[]; + + /** + * Creates a new SaveBookmarksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveBookmarksRequest instance + */ + public static create(properties?: wm.protobuf.ISaveBookmarksRequest): wm.protobuf.SaveBookmarksRequest; + + /** + * Encodes the specified SaveBookmarksRequest message. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @param message SaveBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @param message SaveBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveBookmarksRequest; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveBookmarksRequest; + + /** + * Verifies a SaveBookmarksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveBookmarksRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveBookmarksRequest; + + /** + * Creates a plain object from a SaveBookmarksRequest message. Also converts values to other types if specified. + * @param message SaveBookmarksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveBookmarksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveBookmarksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveBookmarksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveBookmarksResponse. */ + interface ISaveBookmarksResponse { + + /** SaveBookmarksResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveBookmarksResponse. */ + class SaveBookmarksResponse implements ISaveBookmarksResponse { + + /** + * Constructs a new SaveBookmarksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveBookmarksResponse); + + /** SaveBookmarksResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveBookmarksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveBookmarksResponse instance + */ + public static create(properties?: wm.protobuf.ISaveBookmarksResponse): wm.protobuf.SaveBookmarksResponse; + + /** + * Encodes the specified SaveBookmarksResponse message. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @param message SaveBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @param message SaveBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveBookmarksResponse; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveBookmarksResponse; + + /** + * Verifies a SaveBookmarksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveBookmarksResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveBookmarksResponse; + + /** + * Creates a plain object from a SaveBookmarksResponse message. Also converts values to other types if specified. + * @param message SaveBookmarksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveBookmarksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveBookmarksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveBookmarksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StartTransferRequest. */ + interface IStartTransferRequest { + + /** StartTransferRequest banapassportAmId */ + banapassportAmId: number; + } + + /** Represents a StartTransferRequest. */ + class StartTransferRequest implements IStartTransferRequest { + + /** + * Constructs a new StartTransferRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IStartTransferRequest); + + /** StartTransferRequest banapassportAmId. */ + public banapassportAmId: number; + + /** + * Creates a new StartTransferRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StartTransferRequest instance + */ + public static create(properties?: wm.protobuf.IStartTransferRequest): wm.protobuf.StartTransferRequest; + + /** + * Encodes the specified StartTransferRequest message. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @param message StartTransferRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IStartTransferRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartTransferRequest message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @param message StartTransferRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IStartTransferRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.StartTransferRequest; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.StartTransferRequest; + + /** + * Verifies a StartTransferRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartTransferRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartTransferRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.StartTransferRequest; + + /** + * Creates a plain object from a StartTransferRequest message. Also converts values to other types if specified. + * @param message StartTransferRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.StartTransferRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartTransferRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartTransferRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StartTransferResponse. */ + interface IStartTransferResponse { + + /** StartTransferResponse error */ + error: wm.protobuf.ErrorCode; + + /** StartTransferResponse userId */ + userId: number; + + /** StartTransferResponse pollingInterval */ + pollingInterval?: (number|null); + } + + /** Represents a StartTransferResponse. */ + class StartTransferResponse implements IStartTransferResponse { + + /** + * Constructs a new StartTransferResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IStartTransferResponse); + + /** StartTransferResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** StartTransferResponse userId. */ + public userId: number; + + /** StartTransferResponse pollingInterval. */ + public pollingInterval: number; + + /** + * Creates a new StartTransferResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns StartTransferResponse instance + */ + public static create(properties?: wm.protobuf.IStartTransferResponse): wm.protobuf.StartTransferResponse; + + /** + * Encodes the specified StartTransferResponse message. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @param message StartTransferResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IStartTransferResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartTransferResponse message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @param message StartTransferResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IStartTransferResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.StartTransferResponse; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.StartTransferResponse; + + /** + * Verifies a StartTransferResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartTransferResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartTransferResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.StartTransferResponse; + + /** + * Creates a plain object from a StartTransferResponse message. Also converts values to other types if specified. + * @param message StartTransferResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.StartTransferResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartTransferResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartTransferResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveScreenshotRequest. */ + interface ISaveScreenshotRequest { + + /** SaveScreenshotRequest carId */ + carId: number; + + /** SaveScreenshotRequest timestamp */ + timestamp: number; + + /** SaveScreenshotRequest playedAt */ + playedAt?: (number|null); + + /** SaveScreenshotRequest transparent */ + transparent?: (boolean|null); + + /** SaveScreenshotRequest imageType */ + imageType: wm.protobuf.ScreenshotType; + + /** SaveScreenshotRequest image */ + image?: (Uint8Array|null); + + /** SaveScreenshotRequest ghostMetadata */ + ghostMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null); + + /** SaveScreenshotRequest versusMetadata */ + versusMetadata?: (wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null); + + /** SaveScreenshotRequest terminalMetadata */ + terminalMetadata?: (wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null); + + /** SaveScreenshotRequest acquiringVsStarMetadata */ + acquiringVsStarMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null); + + /** SaveScreenshotRequest acquiringAuraMotifMetadata */ + acquiringAuraMotifMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null); + + /** SaveScreenshotRequest ghostRegionMapMetadata */ + ghostRegionMapMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null); + + /** SaveScreenshotRequest acquiringCrownMetadata */ + acquiringCrownMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null); + + /** SaveScreenshotRequest competitionResultMetadata */ + competitionResultMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null); + + /** SaveScreenshotRequest timeAttackResultMetadata */ + timeAttackResultMetadata?: (wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null); + + /** SaveScreenshotRequest levelUpMetadata */ + levelUpMetadata?: (wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null); + } + + /** Represents a SaveScreenshotRequest. */ + class SaveScreenshotRequest implements ISaveScreenshotRequest { + + /** + * Constructs a new SaveScreenshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScreenshotRequest); + + /** SaveScreenshotRequest carId. */ + public carId: number; + + /** SaveScreenshotRequest timestamp. */ + public timestamp: number; + + /** SaveScreenshotRequest playedAt. */ + public playedAt: number; + + /** SaveScreenshotRequest transparent. */ + public transparent: boolean; + + /** SaveScreenshotRequest imageType. */ + public imageType: wm.protobuf.ScreenshotType; + + /** SaveScreenshotRequest image. */ + public image: Uint8Array; + + /** SaveScreenshotRequest ghostMetadata. */ + public ghostMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null); + + /** SaveScreenshotRequest versusMetadata. */ + public versusMetadata?: (wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null); + + /** SaveScreenshotRequest terminalMetadata. */ + public terminalMetadata?: (wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null); + + /** SaveScreenshotRequest acquiringVsStarMetadata. */ + public acquiringVsStarMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null); + + /** SaveScreenshotRequest acquiringAuraMotifMetadata. */ + public acquiringAuraMotifMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null); + + /** SaveScreenshotRequest ghostRegionMapMetadata. */ + public ghostRegionMapMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null); + + /** SaveScreenshotRequest acquiringCrownMetadata. */ + public acquiringCrownMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null); + + /** SaveScreenshotRequest competitionResultMetadata. */ + public competitionResultMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null); + + /** SaveScreenshotRequest timeAttackResultMetadata. */ + public timeAttackResultMetadata?: (wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null); + + /** SaveScreenshotRequest levelUpMetadata. */ + public levelUpMetadata?: (wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null); + + /** + * Creates a new SaveScreenshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScreenshotRequest instance + */ + public static create(properties?: wm.protobuf.ISaveScreenshotRequest): wm.protobuf.SaveScreenshotRequest; + + /** + * Encodes the specified SaveScreenshotRequest message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @param message SaveScreenshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScreenshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScreenshotRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @param message SaveScreenshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScreenshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest; + + /** + * Verifies a SaveScreenshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScreenshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScreenshotRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest; + + /** + * Creates a plain object from a SaveScreenshotRequest message. Also converts values to other types if specified. + * @param message SaveScreenshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScreenshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScreenshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SaveScreenshotRequest { + + /** Properties of a GhostBattleMetadata. */ + interface IGhostBattleMetadata { + + /** GhostBattleMetadata tunePower */ + tunePower: number; + + /** GhostBattleMetadata tuneHandling */ + tuneHandling: number; + + /** GhostBattleMetadata area */ + area: number; + + /** GhostBattleMetadata stampReturnCount */ + stampReturnCount: number; + + /** GhostBattleMetadata opponents */ + opponents?: (wm.protobuf.SaveScreenshotRequest.IOpponentCar[]|null); + } + + /** Represents a GhostBattleMetadata. */ + class GhostBattleMetadata implements IGhostBattleMetadata { + + /** + * Constructs a new GhostBattleMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata); + + /** GhostBattleMetadata tunePower. */ + public tunePower: number; + + /** GhostBattleMetadata tuneHandling. */ + public tuneHandling: number; + + /** GhostBattleMetadata area. */ + public area: number; + + /** GhostBattleMetadata stampReturnCount. */ + public stampReturnCount: number; + + /** GhostBattleMetadata opponents. */ + public opponents: wm.protobuf.SaveScreenshotRequest.IOpponentCar[]; + + /** + * Creates a new GhostBattleMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Encodes the specified GhostBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @param message GhostBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @param message GhostBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Verifies a GhostBattleMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Creates a plain object from a GhostBattleMetadata message. Also converts values to other types if specified. + * @param message GhostBattleMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VersusBattleMetadata. */ + interface IVersusBattleMetadata { + + /** VersusBattleMetadata tunePower */ + tunePower: number; + + /** VersusBattleMetadata tuneHandling */ + tuneHandling: number; + + /** VersusBattleMetadata area */ + area: number; + + /** VersusBattleMetadata opponents */ + opponents?: (wm.protobuf.SaveScreenshotRequest.IOpponentCar[]|null); + } + + /** Represents a VersusBattleMetadata. */ + class VersusBattleMetadata implements IVersusBattleMetadata { + + /** + * Constructs a new VersusBattleMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata); + + /** VersusBattleMetadata tunePower. */ + public tunePower: number; + + /** VersusBattleMetadata tuneHandling. */ + public tuneHandling: number; + + /** VersusBattleMetadata area. */ + public area: number; + + /** VersusBattleMetadata opponents. */ + public opponents: wm.protobuf.SaveScreenshotRequest.IOpponentCar[]; + + /** + * Creates a new VersusBattleMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns VersusBattleMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Encodes the specified VersusBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @param message VersusBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VersusBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @param message VersusBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Verifies a VersusBattleMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VersusBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersusBattleMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Creates a plain object from a VersusBattleMetadata message. Also converts values to other types if specified. + * @param message VersusBattleMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VersusBattleMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VersusBattleMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TerminalMetadata. */ + interface ITerminalMetadata { + + /** TerminalMetadata tunePower */ + tunePower: number; + + /** TerminalMetadata tuneHandling */ + tuneHandling: number; + + /** TerminalMetadata name */ + name: string; + + /** TerminalMetadata title */ + title: string; + + /** TerminalMetadata level */ + level: number; + } + + /** Represents a TerminalMetadata. */ + class TerminalMetadata implements ITerminalMetadata { + + /** + * Constructs a new TerminalMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata); + + /** TerminalMetadata tunePower. */ + public tunePower: number; + + /** TerminalMetadata tuneHandling. */ + public tuneHandling: number; + + /** TerminalMetadata name. */ + public name: string; + + /** TerminalMetadata title. */ + public title: string; + + /** TerminalMetadata level. */ + public level: number; + + /** + * Creates a new TerminalMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns TerminalMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Encodes the specified TerminalMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @param message TerminalMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerminalMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @param message TerminalMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Verifies a TerminalMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerminalMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerminalMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Creates a plain object from a TerminalMetadata message. Also converts values to other types if specified. + * @param message TerminalMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.TerminalMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerminalMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerminalMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcquiringVersusStarMetadata. */ + interface IAcquiringVersusStarMetadata { + + /** AcquiringVersusStarMetadata tunePower */ + tunePower: number; + + /** AcquiringVersusStarMetadata tuneHandling */ + tuneHandling: number; + + /** AcquiringVersusStarMetadata vsStarCount */ + vsStarCount: number; + } + + /** Represents an AcquiringVersusStarMetadata. */ + class AcquiringVersusStarMetadata implements IAcquiringVersusStarMetadata { + + /** + * Constructs a new AcquiringVersusStarMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata); + + /** AcquiringVersusStarMetadata tunePower. */ + public tunePower: number; + + /** AcquiringVersusStarMetadata tuneHandling. */ + public tuneHandling: number; + + /** AcquiringVersusStarMetadata vsStarCount. */ + public vsStarCount: number; + + /** + * Creates a new AcquiringVersusStarMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AcquiringVersusStarMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Encodes the specified AcquiringVersusStarMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @param message AcquiringVersusStarMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcquiringVersusStarMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @param message AcquiringVersusStarMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Verifies an AcquiringVersusStarMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcquiringVersusStarMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcquiringVersusStarMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Creates a plain object from an AcquiringVersusStarMetadata message. Also converts values to other types if specified. + * @param message AcquiringVersusStarMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcquiringVersusStarMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcquiringVersusStarMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcquiringAuraMotifMetadata. */ + interface IAcquiringAuraMotifMetadata { + + /** AcquiringAuraMotifMetadata tunePower */ + tunePower: number; + + /** AcquiringAuraMotifMetadata tuneHandling */ + tuneHandling: number; + + /** AcquiringAuraMotifMetadata auraMotif */ + auraMotif: number; + } + + /** Represents an AcquiringAuraMotifMetadata. */ + class AcquiringAuraMotifMetadata implements IAcquiringAuraMotifMetadata { + + /** + * Constructs a new AcquiringAuraMotifMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata); + + /** AcquiringAuraMotifMetadata tunePower. */ + public tunePower: number; + + /** AcquiringAuraMotifMetadata tuneHandling. */ + public tuneHandling: number; + + /** AcquiringAuraMotifMetadata auraMotif. */ + public auraMotif: number; + + /** + * Creates a new AcquiringAuraMotifMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AcquiringAuraMotifMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @param message AcquiringAuraMotifMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @param message AcquiringAuraMotifMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Verifies an AcquiringAuraMotifMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcquiringAuraMotifMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcquiringAuraMotifMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Creates a plain object from an AcquiringAuraMotifMetadata message. Also converts values to other types if specified. + * @param message AcquiringAuraMotifMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcquiringAuraMotifMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcquiringAuraMotifMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostRegionMapMetadata. */ + interface IGhostRegionMapMetadata { + + /** GhostRegionMapMetadata tunePower */ + tunePower: number; + + /** GhostRegionMapMetadata tuneHandling */ + tuneHandling: number; + + /** GhostRegionMapMetadata rgScore */ + rgScore: number; + + /** GhostRegionMapMetadata rgRegionMapScore */ + rgRegionMapScore?: (number[]|null); + } + + /** Represents a GhostRegionMapMetadata. */ + class GhostRegionMapMetadata implements IGhostRegionMapMetadata { + + /** + * Constructs a new GhostRegionMapMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata); + + /** GhostRegionMapMetadata tunePower. */ + public tunePower: number; + + /** GhostRegionMapMetadata tuneHandling. */ + public tuneHandling: number; + + /** GhostRegionMapMetadata rgScore. */ + public rgScore: number; + + /** GhostRegionMapMetadata rgRegionMapScore. */ + public rgRegionMapScore: number[]; + + /** + * Creates a new GhostRegionMapMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostRegionMapMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Encodes the specified GhostRegionMapMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @param message GhostRegionMapMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostRegionMapMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @param message GhostRegionMapMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Verifies a GhostRegionMapMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostRegionMapMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostRegionMapMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Creates a plain object from a GhostRegionMapMetadata message. Also converts values to other types if specified. + * @param message GhostRegionMapMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostRegionMapMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostRegionMapMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcquiringCrownMetadata. */ + interface IAcquiringCrownMetadata { + + /** AcquiringCrownMetadata tunePower */ + tunePower: number; + + /** AcquiringCrownMetadata tuneHandling */ + tuneHandling: number; + + /** AcquiringCrownMetadata area */ + area: number; + } + + /** Represents an AcquiringCrownMetadata. */ + class AcquiringCrownMetadata implements IAcquiringCrownMetadata { + + /** + * Constructs a new AcquiringCrownMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata); + + /** AcquiringCrownMetadata tunePower. */ + public tunePower: number; + + /** AcquiringCrownMetadata tuneHandling. */ + public tuneHandling: number; + + /** AcquiringCrownMetadata area. */ + public area: number; + + /** + * Creates a new AcquiringCrownMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AcquiringCrownMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Encodes the specified AcquiringCrownMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @param message AcquiringCrownMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcquiringCrownMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @param message AcquiringCrownMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Verifies an AcquiringCrownMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcquiringCrownMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcquiringCrownMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Creates a plain object from an AcquiringCrownMetadata message. Also converts values to other types if specified. + * @param message AcquiringCrownMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcquiringCrownMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcquiringCrownMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCompetitionResultMetadata. */ + interface IGhostCompetitionResultMetadata { + + /** GhostCompetitionResultMetadata tunePower */ + tunePower: number; + + /** GhostCompetitionResultMetadata tuneHandling */ + tuneHandling: number; + + /** GhostCompetitionResultMetadata rank */ + rank?: (number|null); + + /** GhostCompetitionResultMetadata result */ + result: number; + } + + /** Represents a GhostCompetitionResultMetadata. */ + class GhostCompetitionResultMetadata implements IGhostCompetitionResultMetadata { + + /** + * Constructs a new GhostCompetitionResultMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata); + + /** GhostCompetitionResultMetadata tunePower. */ + public tunePower: number; + + /** GhostCompetitionResultMetadata tuneHandling. */ + public tuneHandling: number; + + /** GhostCompetitionResultMetadata rank. */ + public rank: number; + + /** GhostCompetitionResultMetadata result. */ + public result: number; + + /** + * Creates a new GhostCompetitionResultMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionResultMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Encodes the specified GhostCompetitionResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @param message GhostCompetitionResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @param message GhostCompetitionResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Verifies a GhostCompetitionResultMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionResultMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionResultMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Creates a plain object from a GhostCompetitionResultMetadata message. Also converts values to other types if specified. + * @param message GhostCompetitionResultMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionResultMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionResultMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeAttackResultMetadata. */ + interface ITimeAttackResultMetadata { + + /** TimeAttackResultMetadata tunePower */ + tunePower: number; + + /** TimeAttackResultMetadata tuneHandling */ + tuneHandling: number; + + /** TimeAttackResultMetadata course */ + course: number; + + /** TimeAttackResultMetadata wholeRank */ + wholeRank?: (number|null); + + /** TimeAttackResultMetadata modelRank */ + modelRank?: (number|null); + } + + /** Represents a TimeAttackResultMetadata. */ + class TimeAttackResultMetadata implements ITimeAttackResultMetadata { + + /** + * Constructs a new TimeAttackResultMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata); + + /** TimeAttackResultMetadata tunePower. */ + public tunePower: number; + + /** TimeAttackResultMetadata tuneHandling. */ + public tuneHandling: number; + + /** TimeAttackResultMetadata course. */ + public course: number; + + /** TimeAttackResultMetadata wholeRank. */ + public wholeRank: number; + + /** TimeAttackResultMetadata modelRank. */ + public modelRank: number; + + /** + * Creates a new TimeAttackResultMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeAttackResultMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Encodes the specified TimeAttackResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @param message TimeAttackResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeAttackResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @param message TimeAttackResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Verifies a TimeAttackResultMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeAttackResultMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeAttackResultMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Creates a plain object from a TimeAttackResultMetadata message. Also converts values to other types if specified. + * @param message TimeAttackResultMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeAttackResultMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeAttackResultMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LevelUpMetadata. */ + interface ILevelUpMetadata { + + /** LevelUpMetadata tunePower */ + tunePower: number; + + /** LevelUpMetadata tuneHandling */ + tuneHandling: number; + + /** LevelUpMetadata level */ + level: number; + } + + /** Represents a LevelUpMetadata. */ + class LevelUpMetadata implements ILevelUpMetadata { + + /** + * Constructs a new LevelUpMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata); + + /** LevelUpMetadata tunePower. */ + public tunePower: number; + + /** LevelUpMetadata tuneHandling. */ + public tuneHandling: number; + + /** LevelUpMetadata level. */ + public level: number; + + /** + * Creates a new LevelUpMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns LevelUpMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Encodes the specified LevelUpMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @param message LevelUpMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LevelUpMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @param message LevelUpMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Verifies a LevelUpMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LevelUpMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LevelUpMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Creates a plain object from a LevelUpMetadata message. Also converts values to other types if specified. + * @param message LevelUpMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.LevelUpMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LevelUpMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LevelUpMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OpponentCar. */ + interface IOpponentCar { + + /** OpponentCar carId */ + carId?: (number|null); + + /** OpponentCar tunePower */ + tunePower: number; + + /** OpponentCar tuneHandling */ + tuneHandling: number; + } + + /** Represents an OpponentCar. */ + class OpponentCar implements IOpponentCar { + + /** + * Constructs a new OpponentCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IOpponentCar); + + /** OpponentCar carId. */ + public carId: number; + + /** OpponentCar tunePower. */ + public tunePower: number; + + /** OpponentCar tuneHandling. */ + public tuneHandling: number; + + /** + * Creates a new OpponentCar instance using the specified properties. + * @param [properties] Properties to set + * @returns OpponentCar instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IOpponentCar): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Encodes the specified OpponentCar message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @param message OpponentCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IOpponentCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpponentCar message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @param message OpponentCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IOpponentCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpponentCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Decodes an OpponentCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Verifies an OpponentCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OpponentCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpponentCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Creates a plain object from an OpponentCar message. Also converts values to other types if specified. + * @param message OpponentCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.OpponentCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpponentCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpponentCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SaveScreenshotResponse. */ + interface ISaveScreenshotResponse { + + /** SaveScreenshotResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveScreenshotResponse. */ + class SaveScreenshotResponse implements ISaveScreenshotResponse { + + /** + * Constructs a new SaveScreenshotResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScreenshotResponse); + + /** SaveScreenshotResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveScreenshotResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScreenshotResponse instance + */ + public static create(properties?: wm.protobuf.ISaveScreenshotResponse): wm.protobuf.SaveScreenshotResponse; + + /** + * Encodes the specified SaveScreenshotResponse message. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @param message SaveScreenshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScreenshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScreenshotResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @param message SaveScreenshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScreenshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotResponse; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotResponse; + + /** + * Verifies a SaveScreenshotResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScreenshotResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScreenshotResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotResponse; + + /** + * Creates a plain object from a SaveScreenshotResponse message. Also converts values to other types if specified. + * @param message SaveScreenshotResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScreenshotResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScreenshotResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SubmitClientLogRequest. */ + interface ISubmitClientLogRequest { + + /** SubmitClientLogRequest data */ + data: Uint8Array; + + /** SubmitClientLogRequest modifiedAt */ + modifiedAt: number; + + /** SubmitClientLogRequest logType */ + logType: wm.protobuf.ClientLogType; + } + + /** Represents a SubmitClientLogRequest. */ + class SubmitClientLogRequest implements ISubmitClientLogRequest { + + /** + * Constructs a new SubmitClientLogRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISubmitClientLogRequest); + + /** SubmitClientLogRequest data. */ + public data: Uint8Array; + + /** SubmitClientLogRequest modifiedAt. */ + public modifiedAt: number; + + /** SubmitClientLogRequest logType. */ + public logType: wm.protobuf.ClientLogType; + + /** + * Creates a new SubmitClientLogRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SubmitClientLogRequest instance + */ + public static create(properties?: wm.protobuf.ISubmitClientLogRequest): wm.protobuf.SubmitClientLogRequest; + + /** + * Encodes the specified SubmitClientLogRequest message. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @param message SubmitClientLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISubmitClientLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubmitClientLogRequest message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @param message SubmitClientLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISubmitClientLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SubmitClientLogRequest; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SubmitClientLogRequest; + + /** + * Verifies a SubmitClientLogRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubmitClientLogRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubmitClientLogRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SubmitClientLogRequest; + + /** + * Creates a plain object from a SubmitClientLogRequest message. Also converts values to other types if specified. + * @param message SubmitClientLogRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SubmitClientLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubmitClientLogRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubmitClientLogRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SubmitClientLogResponse. */ + interface ISubmitClientLogResponse { + + /** SubmitClientLogResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SubmitClientLogResponse. */ + class SubmitClientLogResponse implements ISubmitClientLogResponse { + + /** + * Constructs a new SubmitClientLogResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISubmitClientLogResponse); + + /** SubmitClientLogResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SubmitClientLogResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SubmitClientLogResponse instance + */ + public static create(properties?: wm.protobuf.ISubmitClientLogResponse): wm.protobuf.SubmitClientLogResponse; + + /** + * Encodes the specified SubmitClientLogResponse message. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @param message SubmitClientLogResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISubmitClientLogResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubmitClientLogResponse message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @param message SubmitClientLogResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISubmitClientLogResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SubmitClientLogResponse; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SubmitClientLogResponse; + + /** + * Verifies a SubmitClientLogResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubmitClientLogResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubmitClientLogResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SubmitClientLogResponse; + + /** + * Creates a plain object from a SubmitClientLogResponse message. Also converts values to other types if specified. + * @param message SubmitClientLogResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SubmitClientLogResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubmitClientLogResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubmitClientLogResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadScratchInformationRequest. */ + interface ILoadScratchInformationRequest { + + /** LoadScratchInformationRequest userId */ + userId: number; + } + + /** Represents a LoadScratchInformationRequest. */ + class LoadScratchInformationRequest implements ILoadScratchInformationRequest { + + /** + * Constructs a new LoadScratchInformationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadScratchInformationRequest); + + /** LoadScratchInformationRequest userId. */ + public userId: number; + + /** + * Creates a new LoadScratchInformationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadScratchInformationRequest instance + */ + public static create(properties?: wm.protobuf.ILoadScratchInformationRequest): wm.protobuf.LoadScratchInformationRequest; + + /** + * Encodes the specified LoadScratchInformationRequest message. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @param message LoadScratchInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadScratchInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadScratchInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @param message LoadScratchInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadScratchInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadScratchInformationRequest; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadScratchInformationRequest; + + /** + * Verifies a LoadScratchInformationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadScratchInformationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadScratchInformationRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadScratchInformationRequest; + + /** + * Creates a plain object from a LoadScratchInformationRequest message. Also converts values to other types if specified. + * @param message LoadScratchInformationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadScratchInformationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadScratchInformationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadScratchInformationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadScratchInformationResponse. */ + interface ILoadScratchInformationResponse { + + /** LoadScratchInformationResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadScratchInformationResponse scratchSheets */ + scratchSheets?: (wm.protobuf.IScratchSheet[]|null); + + /** LoadScratchInformationResponse currentSheet */ + currentSheet: number; + + /** LoadScratchInformationResponse numOfScratched */ + numOfScratched: number; + + /** LoadScratchInformationResponse ownedUserItems */ + ownedUserItems?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a LoadScratchInformationResponse. */ + class LoadScratchInformationResponse implements ILoadScratchInformationResponse { + + /** + * Constructs a new LoadScratchInformationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadScratchInformationResponse); + + /** LoadScratchInformationResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadScratchInformationResponse scratchSheets. */ + public scratchSheets: wm.protobuf.IScratchSheet[]; + + /** LoadScratchInformationResponse currentSheet. */ + public currentSheet: number; + + /** LoadScratchInformationResponse numOfScratched. */ + public numOfScratched: number; + + /** LoadScratchInformationResponse ownedUserItems. */ + public ownedUserItems: wm.protobuf.IUserItem[]; + + /** + * Creates a new LoadScratchInformationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadScratchInformationResponse instance + */ + public static create(properties?: wm.protobuf.ILoadScratchInformationResponse): wm.protobuf.LoadScratchInformationResponse; + + /** + * Encodes the specified LoadScratchInformationResponse message. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @param message LoadScratchInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadScratchInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadScratchInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @param message LoadScratchInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadScratchInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadScratchInformationResponse; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadScratchInformationResponse; + + /** + * Verifies a LoadScratchInformationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadScratchInformationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadScratchInformationResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadScratchInformationResponse; + + /** + * Creates a plain object from a LoadScratchInformationResponse message. Also converts values to other types if specified. + * @param message LoadScratchInformationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadScratchInformationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadScratchInformationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadScratchInformationResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveScratchSheetRequest. */ + interface ISaveScratchSheetRequest { + + /** SaveScratchSheetRequest timestamp */ + timestamp: number; + + /** SaveScratchSheetRequest targetSheet */ + targetSheet: number; + + /** SaveScratchSheetRequest targetSquare */ + targetSquare: number; + + /** SaveScratchSheetRequest userId */ + userId: number; + } + + /** Represents a SaveScratchSheetRequest. */ + class SaveScratchSheetRequest implements ISaveScratchSheetRequest { + + /** + * Constructs a new SaveScratchSheetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScratchSheetRequest); + + /** SaveScratchSheetRequest timestamp. */ + public timestamp: number; + + /** SaveScratchSheetRequest targetSheet. */ + public targetSheet: number; + + /** SaveScratchSheetRequest targetSquare. */ + public targetSquare: number; + + /** SaveScratchSheetRequest userId. */ + public userId: number; + + /** + * Creates a new SaveScratchSheetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScratchSheetRequest instance + */ + public static create(properties?: wm.protobuf.ISaveScratchSheetRequest): wm.protobuf.SaveScratchSheetRequest; + + /** + * Encodes the specified SaveScratchSheetRequest message. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @param message SaveScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @param message SaveScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScratchSheetRequest; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScratchSheetRequest; + + /** + * Verifies a SaveScratchSheetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScratchSheetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScratchSheetRequest; + + /** + * Creates a plain object from a SaveScratchSheetRequest message. Also converts values to other types if specified. + * @param message SaveScratchSheetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScratchSheetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScratchSheetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScratchSheetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveScratchSheetResponse. */ + interface ISaveScratchSheetResponse { + + /** SaveScratchSheetResponse error */ + error: wm.protobuf.ErrorCode; + + /** SaveScratchSheetResponse scratchSheets */ + scratchSheets?: (wm.protobuf.IScratchSheet[]|null); + + /** SaveScratchSheetResponse currentSheet */ + currentSheet: number; + + /** SaveScratchSheetResponse numOfScratched */ + numOfScratched: number; + + /** SaveScratchSheetResponse earnedItem */ + earnedItem?: (wm.protobuf.IUserItem|null); + } + + /** Represents a SaveScratchSheetResponse. */ + class SaveScratchSheetResponse implements ISaveScratchSheetResponse { + + /** + * Constructs a new SaveScratchSheetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScratchSheetResponse); + + /** SaveScratchSheetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** SaveScratchSheetResponse scratchSheets. */ + public scratchSheets: wm.protobuf.IScratchSheet[]; + + /** SaveScratchSheetResponse currentSheet. */ + public currentSheet: number; + + /** SaveScratchSheetResponse numOfScratched. */ + public numOfScratched: number; + + /** SaveScratchSheetResponse earnedItem. */ + public earnedItem?: (wm.protobuf.IUserItem|null); + + /** + * Creates a new SaveScratchSheetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScratchSheetResponse instance + */ + public static create(properties?: wm.protobuf.ISaveScratchSheetResponse): wm.protobuf.SaveScratchSheetResponse; + + /** + * Encodes the specified SaveScratchSheetResponse message. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @param message SaveScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @param message SaveScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScratchSheetResponse; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScratchSheetResponse; + + /** + * Verifies a SaveScratchSheetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScratchSheetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScratchSheetResponse; + + /** + * Creates a plain object from a SaveScratchSheetResponse message. Also converts values to other types if specified. + * @param message SaveScratchSheetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScratchSheetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScratchSheetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScratchSheetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TurnScratchSheetRequest. */ + interface ITurnScratchSheetRequest { + + /** TurnScratchSheetRequest userId */ + userId: number; + + /** TurnScratchSheetRequest targetSheet */ + targetSheet: number; + } + + /** Represents a TurnScratchSheetRequest. */ + class TurnScratchSheetRequest implements ITurnScratchSheetRequest { + + /** + * Constructs a new TurnScratchSheetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITurnScratchSheetRequest); + + /** TurnScratchSheetRequest userId. */ + public userId: number; + + /** TurnScratchSheetRequest targetSheet. */ + public targetSheet: number; + + /** + * Creates a new TurnScratchSheetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TurnScratchSheetRequest instance + */ + public static create(properties?: wm.protobuf.ITurnScratchSheetRequest): wm.protobuf.TurnScratchSheetRequest; + + /** + * Encodes the specified TurnScratchSheetRequest message. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @param message TurnScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITurnScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TurnScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @param message TurnScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITurnScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TurnScratchSheetRequest; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TurnScratchSheetRequest; + + /** + * Verifies a TurnScratchSheetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TurnScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TurnScratchSheetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TurnScratchSheetRequest; + + /** + * Creates a plain object from a TurnScratchSheetRequest message. Also converts values to other types if specified. + * @param message TurnScratchSheetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TurnScratchSheetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TurnScratchSheetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TurnScratchSheetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TurnScratchSheetResponse. */ + interface ITurnScratchSheetResponse { + + /** TurnScratchSheetResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a TurnScratchSheetResponse. */ + class TurnScratchSheetResponse implements ITurnScratchSheetResponse { + + /** + * Constructs a new TurnScratchSheetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITurnScratchSheetResponse); + + /** TurnScratchSheetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new TurnScratchSheetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TurnScratchSheetResponse instance + */ + public static create(properties?: wm.protobuf.ITurnScratchSheetResponse): wm.protobuf.TurnScratchSheetResponse; + + /** + * Encodes the specified TurnScratchSheetResponse message. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @param message TurnScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITurnScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TurnScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @param message TurnScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITurnScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TurnScratchSheetResponse; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TurnScratchSheetResponse; + + /** + * Verifies a TurnScratchSheetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TurnScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TurnScratchSheetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TurnScratchSheetResponse; + + /** + * Creates a plain object from a TurnScratchSheetResponse message. Also converts values to other types if specified. + * @param message TurnScratchSheetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TurnScratchSheetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TurnScratchSheetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TurnScratchSheetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckItemReceivableCarsRequest. */ + interface ICheckItemReceivableCarsRequest { + + /** CheckItemReceivableCarsRequest userId */ + userId: number; + + /** CheckItemReceivableCarsRequest itemsToBeEarned */ + itemsToBeEarned?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a CheckItemReceivableCarsRequest. */ + class CheckItemReceivableCarsRequest implements ICheckItemReceivableCarsRequest { + + /** + * Constructs a new CheckItemReceivableCarsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICheckItemReceivableCarsRequest); + + /** CheckItemReceivableCarsRequest userId. */ + public userId: number; + + /** CheckItemReceivableCarsRequest itemsToBeEarned. */ + public itemsToBeEarned: wm.protobuf.IUserItem[]; + + /** + * Creates a new CheckItemReceivableCarsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckItemReceivableCarsRequest instance + */ + public static create(properties?: wm.protobuf.ICheckItemReceivableCarsRequest): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @param message CheckItemReceivableCarsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICheckItemReceivableCarsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @param message CheckItemReceivableCarsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICheckItemReceivableCarsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Verifies a CheckItemReceivableCarsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckItemReceivableCarsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckItemReceivableCarsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Creates a plain object from a CheckItemReceivableCarsRequest message. Also converts values to other types if specified. + * @param message CheckItemReceivableCarsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CheckItemReceivableCarsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckItemReceivableCarsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckItemReceivableCarsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckItemReceivableCarsResponse. */ + interface ICheckItemReceivableCarsResponse { + + /** CheckItemReceivableCarsResponse error */ + error: wm.protobuf.ErrorCode; + + /** CheckItemReceivableCarsResponse carIds */ + carIds?: (number[]|null); + } + + /** Represents a CheckItemReceivableCarsResponse. */ + class CheckItemReceivableCarsResponse implements ICheckItemReceivableCarsResponse { + + /** + * Constructs a new CheckItemReceivableCarsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICheckItemReceivableCarsResponse); + + /** CheckItemReceivableCarsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** CheckItemReceivableCarsResponse carIds. */ + public carIds: number[]; + + /** + * Creates a new CheckItemReceivableCarsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckItemReceivableCarsResponse instance + */ + public static create(properties?: wm.protobuf.ICheckItemReceivableCarsResponse): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @param message CheckItemReceivableCarsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICheckItemReceivableCarsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @param message CheckItemReceivableCarsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICheckItemReceivableCarsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Verifies a CheckItemReceivableCarsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckItemReceivableCarsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckItemReceivableCarsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Creates a plain object from a CheckItemReceivableCarsResponse message. Also converts values to other types if specified. + * @param message CheckItemReceivableCarsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CheckItemReceivableCarsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckItemReceivableCarsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckItemReceivableCarsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReceiveUserItemsRequest. */ + interface IReceiveUserItemsRequest { + + /** ReceiveUserItemsRequest carId */ + carId: number; + + /** ReceiveUserItemsRequest targetItemIds */ + targetItemIds?: (number[]|null); + } + + /** Represents a ReceiveUserItemsRequest. */ + class ReceiveUserItemsRequest implements IReceiveUserItemsRequest { + + /** + * Constructs a new ReceiveUserItemsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IReceiveUserItemsRequest); + + /** ReceiveUserItemsRequest carId. */ + public carId: number; + + /** ReceiveUserItemsRequest targetItemIds. */ + public targetItemIds: number[]; + + /** + * Creates a new ReceiveUserItemsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReceiveUserItemsRequest instance + */ + public static create(properties?: wm.protobuf.IReceiveUserItemsRequest): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Encodes the specified ReceiveUserItemsRequest message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @param message ReceiveUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IReceiveUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReceiveUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @param message ReceiveUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IReceiveUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Verifies a ReceiveUserItemsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReceiveUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReceiveUserItemsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Creates a plain object from a ReceiveUserItemsRequest message. Also converts values to other types if specified. + * @param message ReceiveUserItemsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ReceiveUserItemsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReceiveUserItemsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReceiveUserItemsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReceiveUserItemsResponse. */ + interface IReceiveUserItemsResponse { + + /** ReceiveUserItemsResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a ReceiveUserItemsResponse. */ + class ReceiveUserItemsResponse implements IReceiveUserItemsResponse { + + /** + * Constructs a new ReceiveUserItemsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IReceiveUserItemsResponse); + + /** ReceiveUserItemsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new ReceiveUserItemsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReceiveUserItemsResponse instance + */ + public static create(properties?: wm.protobuf.IReceiveUserItemsResponse): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Encodes the specified ReceiveUserItemsResponse message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @param message ReceiveUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IReceiveUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReceiveUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @param message ReceiveUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IReceiveUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Verifies a ReceiveUserItemsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReceiveUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReceiveUserItemsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Creates a plain object from a ReceiveUserItemsResponse message. Also converts values to other types if specified. + * @param message ReceiveUserItemsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ReceiveUserItemsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReceiveUserItemsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReceiveUserItemsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEventModeSerialRequest. */ + interface IUpdateEventModeSerialRequest { + + /** UpdateEventModeSerialRequest eventModeSerial */ + eventModeSerial?: (string|null); + } + + /** Represents an UpdateEventModeSerialRequest. */ + class UpdateEventModeSerialRequest implements IUpdateEventModeSerialRequest { + + /** + * Constructs a new UpdateEventModeSerialRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateEventModeSerialRequest); + + /** UpdateEventModeSerialRequest eventModeSerial. */ + public eventModeSerial: string; + + /** + * Creates a new UpdateEventModeSerialRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEventModeSerialRequest instance + */ + public static create(properties?: wm.protobuf.IUpdateEventModeSerialRequest): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Encodes the specified UpdateEventModeSerialRequest message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @param message UpdateEventModeSerialRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateEventModeSerialRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEventModeSerialRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @param message UpdateEventModeSerialRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateEventModeSerialRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Verifies an UpdateEventModeSerialRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEventModeSerialRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEventModeSerialRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Creates a plain object from an UpdateEventModeSerialRequest message. Also converts values to other types if specified. + * @param message UpdateEventModeSerialRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateEventModeSerialRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEventModeSerialRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEventModeSerialRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEventModeSerialResponse. */ + interface IUpdateEventModeSerialResponse { + + /** UpdateEventModeSerialResponse error */ + error: wm.protobuf.ErrorCode; + + /** UpdateEventModeSerialResponse serialError */ + serialError: wm.protobuf.EventModeSerialErrorCode; + + /** UpdateEventModeSerialResponse eventModeSerial */ + eventModeSerial?: (string|null); + + /** UpdateEventModeSerialResponse startAt */ + startAt?: (number|null); + + /** UpdateEventModeSerialResponse endAt */ + endAt?: (number|null); + } + + /** Represents an UpdateEventModeSerialResponse. */ + class UpdateEventModeSerialResponse implements IUpdateEventModeSerialResponse { + + /** + * Constructs a new UpdateEventModeSerialResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateEventModeSerialResponse); + + /** UpdateEventModeSerialResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** UpdateEventModeSerialResponse serialError. */ + public serialError: wm.protobuf.EventModeSerialErrorCode; + + /** UpdateEventModeSerialResponse eventModeSerial. */ + public eventModeSerial: string; + + /** UpdateEventModeSerialResponse startAt. */ + public startAt: number; + + /** UpdateEventModeSerialResponse endAt. */ + public endAt: number; + + /** + * Creates a new UpdateEventModeSerialResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEventModeSerialResponse instance + */ + public static create(properties?: wm.protobuf.IUpdateEventModeSerialResponse): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Encodes the specified UpdateEventModeSerialResponse message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @param message UpdateEventModeSerialResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateEventModeSerialResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEventModeSerialResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @param message UpdateEventModeSerialResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateEventModeSerialResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Verifies an UpdateEventModeSerialResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEventModeSerialResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEventModeSerialResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Creates a plain object from an UpdateEventModeSerialResponse message. Also converts values to other types if specified. + * @param message UpdateEventModeSerialResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateEventModeSerialResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEventModeSerialResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEventModeSerialResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParticipateInInviteFriendCampaignRequest. */ + interface IParticipateInInviteFriendCampaignRequest { + + /** ParticipateInInviteFriendCampaignRequest invitingUserId */ + invitingUserId: number; + + /** ParticipateInInviteFriendCampaignRequest invitedUserId */ + invitedUserId: number; + + /** ParticipateInInviteFriendCampaignRequest sourceCarId */ + sourceCarId: number; + + /** ParticipateInInviteFriendCampaignRequest transmission */ + transmission: boolean; + } + + /** Represents a ParticipateInInviteFriendCampaignRequest. */ + class ParticipateInInviteFriendCampaignRequest implements IParticipateInInviteFriendCampaignRequest { + + /** + * Constructs a new ParticipateInInviteFriendCampaignRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IParticipateInInviteFriendCampaignRequest); + + /** ParticipateInInviteFriendCampaignRequest invitingUserId. */ + public invitingUserId: number; + + /** ParticipateInInviteFriendCampaignRequest invitedUserId. */ + public invitedUserId: number; + + /** ParticipateInInviteFriendCampaignRequest sourceCarId. */ + public sourceCarId: number; + + /** ParticipateInInviteFriendCampaignRequest transmission. */ + public transmission: boolean; + + /** + * Creates a new ParticipateInInviteFriendCampaignRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ParticipateInInviteFriendCampaignRequest instance + */ + public static create(properties?: wm.protobuf.IParticipateInInviteFriendCampaignRequest): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IParticipateInInviteFriendCampaignRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IParticipateInInviteFriendCampaignRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Verifies a ParticipateInInviteFriendCampaignRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParticipateInInviteFriendCampaignRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParticipateInInviteFriendCampaignRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignRequest message. Also converts values to other types if specified. + * @param message ParticipateInInviteFriendCampaignRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ParticipateInInviteFriendCampaignRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParticipateInInviteFriendCampaignRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParticipateInInviteFriendCampaignResponse. */ + interface IParticipateInInviteFriendCampaignResponse { + + /** ParticipateInInviteFriendCampaignResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a ParticipateInInviteFriendCampaignResponse. */ + class ParticipateInInviteFriendCampaignResponse implements IParticipateInInviteFriendCampaignResponse { + + /** + * Constructs a new ParticipateInInviteFriendCampaignResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IParticipateInInviteFriendCampaignResponse); + + /** ParticipateInInviteFriendCampaignResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new ParticipateInInviteFriendCampaignResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ParticipateInInviteFriendCampaignResponse instance + */ + public static create(properties?: wm.protobuf.IParticipateInInviteFriendCampaignResponse): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IParticipateInInviteFriendCampaignResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IParticipateInInviteFriendCampaignResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Verifies a ParticipateInInviteFriendCampaignResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParticipateInInviteFriendCampaignResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParticipateInInviteFriendCampaignResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignResponse message. Also converts values to other types if specified. + * @param message ParticipateInInviteFriendCampaignResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ParticipateInInviteFriendCampaignResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParticipateInInviteFriendCampaignResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConsumeUserItemRequest. */ + interface IConsumeUserItemRequest { + + /** ConsumeUserItemRequest userId */ + userId: number; + + /** ConsumeUserItemRequest carId */ + carId: number; + + /** ConsumeUserItemRequest userItemId */ + userItemId: number; + } + + /** Represents a ConsumeUserItemRequest. */ + class ConsumeUserItemRequest implements IConsumeUserItemRequest { + + /** + * Constructs a new ConsumeUserItemRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IConsumeUserItemRequest); + + /** ConsumeUserItemRequest userId. */ + public userId: number; + + /** ConsumeUserItemRequest carId. */ + public carId: number; + + /** ConsumeUserItemRequest userItemId. */ + public userItemId: number; + + /** + * Creates a new ConsumeUserItemRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ConsumeUserItemRequest instance + */ + public static create(properties?: wm.protobuf.IConsumeUserItemRequest): wm.protobuf.ConsumeUserItemRequest; + + /** + * Encodes the specified ConsumeUserItemRequest message. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @param message ConsumeUserItemRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IConsumeUserItemRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConsumeUserItemRequest message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @param message ConsumeUserItemRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IConsumeUserItemRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ConsumeUserItemRequest; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ConsumeUserItemRequest; + + /** + * Verifies a ConsumeUserItemRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConsumeUserItemRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConsumeUserItemRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ConsumeUserItemRequest; + + /** + * Creates a plain object from a ConsumeUserItemRequest message. Also converts values to other types if specified. + * @param message ConsumeUserItemRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ConsumeUserItemRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConsumeUserItemRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConsumeUserItemRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConsumeUserItemResponse. */ + interface IConsumeUserItemResponse { + + /** ConsumeUserItemResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a ConsumeUserItemResponse. */ + class ConsumeUserItemResponse implements IConsumeUserItemResponse { + + /** + * Constructs a new ConsumeUserItemResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IConsumeUserItemResponse); + + /** ConsumeUserItemResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new ConsumeUserItemResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ConsumeUserItemResponse instance + */ + public static create(properties?: wm.protobuf.IConsumeUserItemResponse): wm.protobuf.ConsumeUserItemResponse; + + /** + * Encodes the specified ConsumeUserItemResponse message. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @param message ConsumeUserItemResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IConsumeUserItemResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConsumeUserItemResponse message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @param message ConsumeUserItemResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IConsumeUserItemResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ConsumeUserItemResponse; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ConsumeUserItemResponse; + + /** + * Verifies a ConsumeUserItemResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConsumeUserItemResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConsumeUserItemResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ConsumeUserItemResponse; + + /** + * Creates a plain object from a ConsumeUserItemResponse message. Also converts values to other types if specified. + * @param message ConsumeUserItemResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ConsumeUserItemResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConsumeUserItemResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConsumeUserItemResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchCarsByLevelRequest. */ + interface ISearchCarsByLevelRequest { + + /** SearchCarsByLevelRequest carId */ + carId: number; + + /** SearchCarsByLevelRequest ghostLevel */ + ghostLevel: number; + + /** SearchCarsByLevelRequest area */ + area: number; + + /** SearchCarsByLevelRequest regionId */ + regionId?: (number|null); + } + + /** Represents a SearchCarsByLevelRequest. */ + class SearchCarsByLevelRequest implements ISearchCarsByLevelRequest { + + /** + * Constructs a new SearchCarsByLevelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISearchCarsByLevelRequest); + + /** SearchCarsByLevelRequest carId. */ + public carId: number; + + /** SearchCarsByLevelRequest ghostLevel. */ + public ghostLevel: number; + + /** SearchCarsByLevelRequest area. */ + public area: number; + + /** SearchCarsByLevelRequest regionId. */ + public regionId: number; + + /** + * Creates a new SearchCarsByLevelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchCarsByLevelRequest instance + */ + public static create(properties?: wm.protobuf.ISearchCarsByLevelRequest): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Encodes the specified SearchCarsByLevelRequest message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @param message SearchCarsByLevelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISearchCarsByLevelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchCarsByLevelRequest message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @param message SearchCarsByLevelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISearchCarsByLevelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Verifies a SearchCarsByLevelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchCarsByLevelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchCarsByLevelRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Creates a plain object from a SearchCarsByLevelRequest message. Also converts values to other types if specified. + * @param message SearchCarsByLevelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SearchCarsByLevelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchCarsByLevelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchCarsByLevelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchCarsByLevelResponse. */ + interface ISearchCarsByLevelResponse { + + /** SearchCarsByLevelResponse error */ + error: wm.protobuf.ErrorCode; + + /** SearchCarsByLevelResponse ramp */ + ramp: number; + + /** SearchCarsByLevelResponse path */ + path: number; + + /** SearchCarsByLevelResponse ghosts */ + ghosts?: (wm.protobuf.IGhostCar[]|null); + + /** SearchCarsByLevelResponse selectionMethod */ + selectionMethod: wm.protobuf.PathSelectionMethod; + + /** SearchCarsByLevelResponse rates */ + rates?: (wm.protobuf.SearchCarsByLevelResponse.IRate[]|null); + } + + /** Represents a SearchCarsByLevelResponse. */ + class SearchCarsByLevelResponse implements ISearchCarsByLevelResponse { + + /** + * Constructs a new SearchCarsByLevelResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISearchCarsByLevelResponse); + + /** SearchCarsByLevelResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** SearchCarsByLevelResponse ramp. */ + public ramp: number; + + /** SearchCarsByLevelResponse path. */ + public path: number; + + /** SearchCarsByLevelResponse ghosts. */ + public ghosts: wm.protobuf.IGhostCar[]; + + /** SearchCarsByLevelResponse selectionMethod. */ + public selectionMethod: wm.protobuf.PathSelectionMethod; + + /** SearchCarsByLevelResponse rates. */ + public rates: wm.protobuf.SearchCarsByLevelResponse.IRate[]; + + /** + * Creates a new SearchCarsByLevelResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchCarsByLevelResponse instance + */ + public static create(properties?: wm.protobuf.ISearchCarsByLevelResponse): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Encodes the specified SearchCarsByLevelResponse message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @param message SearchCarsByLevelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISearchCarsByLevelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchCarsByLevelResponse message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @param message SearchCarsByLevelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISearchCarsByLevelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Verifies a SearchCarsByLevelResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchCarsByLevelResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchCarsByLevelResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Creates a plain object from a SearchCarsByLevelResponse message. Also converts values to other types if specified. + * @param message SearchCarsByLevelResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SearchCarsByLevelResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchCarsByLevelResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchCarsByLevelResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SearchCarsByLevelResponse { + + /** Properties of a Rate. */ + interface IRate { + + /** Rate carId */ + carId: number; + + /** Rate type */ + type: wm.protobuf.GhostRateType; + + /** Rate rate */ + rate?: (number|null); + } + + /** Represents a Rate. */ + class Rate implements IRate { + + /** + * Constructs a new Rate. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SearchCarsByLevelResponse.IRate); + + /** Rate carId. */ + public carId: number; + + /** Rate type. */ + public type: wm.protobuf.GhostRateType; + + /** Rate rate. */ + public rate: number; + + /** + * Creates a new Rate instance using the specified properties. + * @param [properties] Properties to set + * @returns Rate instance + */ + public static create(properties?: wm.protobuf.SearchCarsByLevelResponse.IRate): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Encodes the specified Rate message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @param message Rate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SearchCarsByLevelResponse.IRate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Rate message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @param message Rate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SearchCarsByLevelResponse.IRate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Rate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Decodes a Rate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Verifies a Rate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Rate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Rate + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Creates a plain object from a Rate message. Also converts values to other types if specified. + * @param message Rate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SearchCarsByLevelResponse.Rate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Rate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Rate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadPathsAndTuningsRequest. */ + interface ILoadPathsAndTuningsRequest { + + /** LoadPathsAndTuningsRequest carId */ + carId: number; + + /** LoadPathsAndTuningsRequest selectedCars */ + selectedCars?: (number[]|null); + + /** LoadPathsAndTuningsRequest returnImmediately */ + returnImmediately?: (boolean|null); + + /** LoadPathsAndTuningsRequest stampTargetArea */ + stampTargetArea?: (number|null); + } + + /** Represents a LoadPathsAndTuningsRequest. */ + class LoadPathsAndTuningsRequest implements ILoadPathsAndTuningsRequest { + + /** + * Constructs a new LoadPathsAndTuningsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadPathsAndTuningsRequest); + + /** LoadPathsAndTuningsRequest carId. */ + public carId: number; + + /** LoadPathsAndTuningsRequest selectedCars. */ + public selectedCars: number[]; + + /** LoadPathsAndTuningsRequest returnImmediately. */ + public returnImmediately: boolean; + + /** LoadPathsAndTuningsRequest stampTargetArea. */ + public stampTargetArea: number; + + /** + * Creates a new LoadPathsAndTuningsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadPathsAndTuningsRequest instance + */ + public static create(properties?: wm.protobuf.ILoadPathsAndTuningsRequest): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @param message LoadPathsAndTuningsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadPathsAndTuningsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @param message LoadPathsAndTuningsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadPathsAndTuningsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Verifies a LoadPathsAndTuningsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadPathsAndTuningsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadPathsAndTuningsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Creates a plain object from a LoadPathsAndTuningsRequest message. Also converts values to other types if specified. + * @param message LoadPathsAndTuningsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadPathsAndTuningsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadPathsAndTuningsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadPathsAndTuningsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadPathsAndTuningsResponse. */ + interface ILoadPathsAndTuningsResponse { + + /** LoadPathsAndTuningsResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadPathsAndTuningsResponse data */ + data?: (wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath[]|null); + } + + /** Represents a LoadPathsAndTuningsResponse. */ + class LoadPathsAndTuningsResponse implements ILoadPathsAndTuningsResponse { + + /** + * Constructs a new LoadPathsAndTuningsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadPathsAndTuningsResponse); + + /** LoadPathsAndTuningsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadPathsAndTuningsResponse data. */ + public data: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath[]; + + /** + * Creates a new LoadPathsAndTuningsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadPathsAndTuningsResponse instance + */ + public static create(properties?: wm.protobuf.ILoadPathsAndTuningsResponse): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @param message LoadPathsAndTuningsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadPathsAndTuningsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @param message LoadPathsAndTuningsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadPathsAndTuningsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Verifies a LoadPathsAndTuningsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadPathsAndTuningsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadPathsAndTuningsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Creates a plain object from a LoadPathsAndTuningsResponse message. Also converts values to other types if specified. + * @param message LoadPathsAndTuningsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadPathsAndTuningsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadPathsAndTuningsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadPathsAndTuningsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadPathsAndTuningsResponse { + + /** Properties of a CarTuningsByPath. */ + interface ICarTuningsByPath { + + /** CarTuningsByPath area */ + area: number; + + /** CarTuningsByPath ramp */ + ramp: number; + + /** CarTuningsByPath path */ + path: number; + + /** CarTuningsByPath carTunings */ + carTunings?: (wm.protobuf.ICarTuning[]|null); + + /** CarTuningsByPath selectionMethod */ + selectionMethod: wm.protobuf.PathSelectionMethod; + } + + /** Represents a CarTuningsByPath. */ + class CarTuningsByPath implements ICarTuningsByPath { + + /** + * Constructs a new CarTuningsByPath. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath); + + /** CarTuningsByPath area. */ + public area: number; + + /** CarTuningsByPath ramp. */ + public ramp: number; + + /** CarTuningsByPath path. */ + public path: number; + + /** CarTuningsByPath carTunings. */ + public carTunings: wm.protobuf.ICarTuning[]; + + /** CarTuningsByPath selectionMethod. */ + public selectionMethod: wm.protobuf.PathSelectionMethod; + + /** + * Creates a new CarTuningsByPath instance using the specified properties. + * @param [properties] Properties to set + * @returns CarTuningsByPath instance + */ + public static create(properties?: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Encodes the specified CarTuningsByPath message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @param message CarTuningsByPath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarTuningsByPath message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @param message CarTuningsByPath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Verifies a CarTuningsByPath message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarTuningsByPath message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarTuningsByPath + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Creates a plain object from a CarTuningsByPath message. Also converts values to other types if specified. + * @param message CarTuningsByPath + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarTuningsByPath to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarTuningsByPath + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadGhostDriveDataRequest. */ + interface ILoadGhostDriveDataRequest { + + /** LoadGhostDriveDataRequest path */ + path: number; + + /** LoadGhostDriveDataRequest carTunings */ + carTunings?: (wm.protobuf.ICarTuning[]|null); + } + + /** Represents a LoadGhostDriveDataRequest. */ + class LoadGhostDriveDataRequest implements ILoadGhostDriveDataRequest { + + /** + * Constructs a new LoadGhostDriveDataRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostDriveDataRequest); + + /** LoadGhostDriveDataRequest path. */ + public path: number; + + /** LoadGhostDriveDataRequest carTunings. */ + public carTunings: wm.protobuf.ICarTuning[]; + + /** + * Creates a new LoadGhostDriveDataRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostDriveDataRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostDriveDataRequest): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Encodes the specified LoadGhostDriveDataRequest message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @param message LoadGhostDriveDataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostDriveDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostDriveDataRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @param message LoadGhostDriveDataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostDriveDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Verifies a LoadGhostDriveDataRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostDriveDataRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostDriveDataRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Creates a plain object from a LoadGhostDriveDataRequest message. Also converts values to other types if specified. + * @param message LoadGhostDriveDataRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostDriveDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostDriveDataRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostDriveDataRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostDriveDataResponse. */ + interface ILoadGhostDriveDataResponse { + + /** LoadGhostDriveDataResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostDriveDataResponse data */ + data?: (wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData[]|null); + } + + /** Represents a LoadGhostDriveDataResponse. */ + class LoadGhostDriveDataResponse implements ILoadGhostDriveDataResponse { + + /** + * Constructs a new LoadGhostDriveDataResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostDriveDataResponse); + + /** LoadGhostDriveDataResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostDriveDataResponse data. */ + public data: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData[]; + + /** + * Creates a new LoadGhostDriveDataResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostDriveDataResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostDriveDataResponse): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Encodes the specified LoadGhostDriveDataResponse message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @param message LoadGhostDriveDataResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostDriveDataResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostDriveDataResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @param message LoadGhostDriveDataResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostDriveDataResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Verifies a LoadGhostDriveDataResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostDriveDataResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostDriveDataResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Creates a plain object from a LoadGhostDriveDataResponse message. Also converts values to other types if specified. + * @param message LoadGhostDriveDataResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostDriveDataResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostDriveDataResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostDriveDataResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGhostDriveDataResponse { + + /** Properties of a GhostDriveData. */ + interface IGhostDriveData { + + /** GhostDriveData carId */ + carId: number; + + /** GhostDriveData type */ + type: wm.protobuf.GhostType; + + /** GhostDriveData driveData */ + driveData?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByUser */ + trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByCar */ + trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByArea */ + trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + } + + /** Represents a GhostDriveData. */ + class GhostDriveData implements IGhostDriveData { + + /** + * Constructs a new GhostDriveData. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData); + + /** GhostDriveData carId. */ + public carId: number; + + /** GhostDriveData type. */ + public type: wm.protobuf.GhostType; + + /** GhostDriveData driveData. */ + public driveData?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByUser. */ + public trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByCar. */ + public trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByArea. */ + public trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + + /** + * Creates a new GhostDriveData instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostDriveData instance + */ + public static create(properties?: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Encodes the specified GhostDriveData message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @param message GhostDriveData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostDriveData message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @param message GhostDriveData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Verifies a GhostDriveData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostDriveData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostDriveData + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Creates a plain object from a GhostDriveData message. Also converts values to other types if specified. + * @param message GhostDriveData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostDriveData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostDriveData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Car. */ + interface ICar { + + /** Car carId */ + carId?: (number|null); + + /** Car userId */ + userId?: (number|null); + + /** Car regionId */ + regionId?: (number|null); + + /** Car name */ + name?: (string|null); + + /** Car manufacturer */ + manufacturer?: (number|null); + + /** Car model */ + model?: (number|null); + + /** Car visualModel */ + visualModel?: (number|null); + + /** Car defaultColor */ + defaultColor?: (number|null); + + /** Car customColor */ + customColor: number; + + /** Car wheel */ + wheel: number; + + /** Car wheelColor */ + wheelColor: number; + + /** Car aero */ + aero: number; + + /** Car bonnet */ + bonnet: number; + + /** Car wing */ + wing: number; + + /** Car gtWing */ + gtWing?: (wm.protobuf.IGTWing|null); + + /** Car mirror */ + mirror: number; + + /** Car neon */ + neon: number; + + /** Car trunk */ + trunk: number; + + /** Car plate */ + plate: number; + + /** Car plateColor */ + plateColor: number; + + /** Car plateNumber */ + plateNumber: number; + + /** Car tunePower */ + tunePower: number; + + /** Car tuneHandling */ + tuneHandling: number; + + /** Car title */ + title: string; + + /** Car level */ + level: number; + + /** Car windowSticker */ + windowSticker?: (boolean|null); + + /** Car windowStickerString */ + windowStickerString?: (string|null); + + /** Car windowStickerFont */ + windowStickerFont?: (number|null); + + /** Car windowDecoration */ + windowDecoration?: (number|null); + + /** Car rivalMarker */ + rivalMarker?: (number|null); + + /** Car lastPlayedAt */ + lastPlayedAt?: (number|null); + + /** Car lastPlayedPlace */ + lastPlayedPlace?: (wm.protobuf.IPlace|null); + + /** Car aura */ + aura?: (number|null); + + /** Car auraMotif */ + auraMotif?: (number|null); + + /** Car ghostLevel */ + ghostLevel?: (number|null); + + /** Car country */ + country?: (string|null); + + /** Car searchCode */ + searchCode?: (string|null); + } + + /** Represents a Car. */ + class Car implements ICar { + + /** + * Constructs a new Car. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICar); + + /** Car carId. */ + public carId: number; + + /** Car userId. */ + public userId: number; + + /** Car regionId. */ + public regionId: number; + + /** Car name. */ + public name: string; + + /** Car manufacturer. */ + public manufacturer: number; + + /** Car model. */ + public model: number; + + /** Car visualModel. */ + public visualModel: number; + + /** Car defaultColor. */ + public defaultColor: number; + + /** Car customColor. */ + public customColor: number; + + /** Car wheel. */ + public wheel: number; + + /** Car wheelColor. */ + public wheelColor: number; + + /** Car aero. */ + public aero: number; + + /** Car bonnet. */ + public bonnet: number; + + /** Car wing. */ + public wing: number; + + /** Car gtWing. */ + public gtWing?: (wm.protobuf.IGTWing|null); + + /** Car mirror. */ + public mirror: number; + + /** Car neon. */ + public neon: number; + + /** Car trunk. */ + public trunk: number; + + /** Car plate. */ + public plate: number; + + /** Car plateColor. */ + public plateColor: number; + + /** Car plateNumber. */ + public plateNumber: number; + + /** Car tunePower. */ + public tunePower: number; + + /** Car tuneHandling. */ + public tuneHandling: number; + + /** Car title. */ + public title: string; + + /** Car level. */ + public level: number; + + /** Car windowSticker. */ + public windowSticker: boolean; + + /** Car windowStickerString. */ + public windowStickerString: string; + + /** Car windowStickerFont. */ + public windowStickerFont: number; + + /** Car windowDecoration. */ + public windowDecoration: number; + + /** Car rivalMarker. */ + public rivalMarker: number; + + /** Car lastPlayedAt. */ + public lastPlayedAt: number; + + /** Car lastPlayedPlace. */ + public lastPlayedPlace?: (wm.protobuf.IPlace|null); + + /** Car aura. */ + public aura: number; + + /** Car auraMotif. */ + public auraMotif: number; + + /** Car ghostLevel. */ + public ghostLevel: number; + + /** Car country. */ + public country: string; + + /** Car searchCode. */ + public searchCode: string; + + /** + * Creates a new Car instance using the specified properties. + * @param [properties] Properties to set + * @returns Car instance + */ + public static create(properties?: wm.protobuf.ICar): wm.protobuf.Car; + + /** + * Encodes the specified Car message. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @param message Car message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Car message, length delimited. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @param message Car message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Car message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Car; + + /** + * Decodes a Car message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Car; + + /** + * Verifies a Car message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Car message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Car + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Car; + + /** + * Creates a plain object from a Car message. Also converts values to other types if specified. + * @param message Car + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Car, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Car to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Car + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarSetting. */ + interface ICarSetting { + + /** CarSetting carId */ + carId?: (number|null); + + /** CarSetting view */ + view: boolean; + + /** CarSetting transmission */ + transmission: boolean; + + /** CarSetting retire */ + retire: boolean; + + /** CarSetting meter */ + meter: number; + + /** CarSetting navigationMap */ + navigationMap: boolean; + + /** CarSetting volume */ + volume: number; + + /** CarSetting bgm */ + bgm: number; + + /** CarSetting nameplate */ + nameplate: number; + + /** CarSetting nameplateColor */ + nameplateColor: number; + + /** CarSetting terminalBackground */ + terminalBackground: number; + } + + /** Represents a CarSetting. */ + class CarSetting implements ICarSetting { + + /** + * Constructs a new CarSetting. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarSetting); + + /** CarSetting carId. */ + public carId: number; + + /** CarSetting view. */ + public view: boolean; + + /** CarSetting transmission. */ + public transmission: boolean; + + /** CarSetting retire. */ + public retire: boolean; + + /** CarSetting meter. */ + public meter: number; + + /** CarSetting navigationMap. */ + public navigationMap: boolean; + + /** CarSetting volume. */ + public volume: number; + + /** CarSetting bgm. */ + public bgm: number; + + /** CarSetting nameplate. */ + public nameplate: number; + + /** CarSetting nameplateColor. */ + public nameplateColor: number; + + /** CarSetting terminalBackground. */ + public terminalBackground: number; + + /** + * Creates a new CarSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns CarSetting instance + */ + public static create(properties?: wm.protobuf.ICarSetting): wm.protobuf.CarSetting; + + /** + * Encodes the specified CarSetting message. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @param message CarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarSetting message, length delimited. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @param message CarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarSetting; + + /** + * Decodes a CarSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarSetting; + + /** + * Verifies a CarSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarSetting + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarSetting; + + /** + * Creates a plain object from a CarSetting message. Also converts values to other types if specified. + * @param message CarSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GTWing. */ + interface IGTWing { + + /** GTWing pillar */ + pillar: number; + + /** GTWing pillarMaterial */ + pillarMaterial: number; + + /** GTWing mainWing */ + mainWing: number; + + /** GTWing mainWingColor */ + mainWingColor: number; + + /** GTWing wingTip */ + wingTip: number; + + /** GTWing material */ + material: number; + } + + /** Represents a GTWing. */ + class GTWing implements IGTWing { + + /** + * Constructs a new GTWing. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGTWing); + + /** GTWing pillar. */ + public pillar: number; + + /** GTWing pillarMaterial. */ + public pillarMaterial: number; + + /** GTWing mainWing. */ + public mainWing: number; + + /** GTWing mainWingColor. */ + public mainWingColor: number; + + /** GTWing wingTip. */ + public wingTip: number; + + /** GTWing material. */ + public material: number; + + /** + * Creates a new GTWing instance using the specified properties. + * @param [properties] Properties to set + * @returns GTWing instance + */ + public static create(properties?: wm.protobuf.IGTWing): wm.protobuf.GTWing; + + /** + * Encodes the specified GTWing message. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @param message GTWing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGTWing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GTWing message, length delimited. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @param message GTWing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGTWing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GTWing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GTWing; + + /** + * Decodes a GTWing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GTWing; + + /** + * Verifies a GTWing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GTWing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GTWing + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GTWing; + + /** + * Creates a plain object from a GTWing message. Also converts values to other types if specified. + * @param message GTWing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GTWing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GTWing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GTWing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarItem. */ + interface ICarItem { + + /** CarItem category */ + category: wm.protobuf.ItemCategory; + + /** CarItem itemId */ + itemId: number; + + /** CarItem amount */ + amount?: (number|null); + } + + /** Represents a CarItem. */ + class CarItem implements ICarItem { + + /** + * Constructs a new CarItem. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarItem); + + /** CarItem category. */ + public category: wm.protobuf.ItemCategory; + + /** CarItem itemId. */ + public itemId: number; + + /** CarItem amount. */ + public amount: number; + + /** + * Creates a new CarItem instance using the specified properties. + * @param [properties] Properties to set + * @returns CarItem instance + */ + public static create(properties?: wm.protobuf.ICarItem): wm.protobuf.CarItem; + + /** + * Encodes the specified CarItem message. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @param message CarItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarItem message, length delimited. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @param message CarItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarItem; + + /** + * Decodes a CarItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarItem; + + /** + * Verifies a CarItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarItem + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarItem; + + /** + * Creates a plain object from a CarItem message. Also converts values to other types if specified. + * @param message CarItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CopiedCar. */ + interface ICopiedCar { + + /** CopiedCar car */ + car: wm.protobuf.ICar; + + /** CopiedCar remainingPlayCounts */ + remainingPlayCounts: number; + } + + /** Represents a CopiedCar. */ + class CopiedCar implements ICopiedCar { + + /** + * Constructs a new CopiedCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICopiedCar); + + /** CopiedCar car. */ + public car: wm.protobuf.ICar; + + /** CopiedCar remainingPlayCounts. */ + public remainingPlayCounts: number; + + /** + * Creates a new CopiedCar instance using the specified properties. + * @param [properties] Properties to set + * @returns CopiedCar instance + */ + public static create(properties?: wm.protobuf.ICopiedCar): wm.protobuf.CopiedCar; + + /** + * Encodes the specified CopiedCar message. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @param message CopiedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICopiedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CopiedCar message, length delimited. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @param message CopiedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICopiedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CopiedCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CopiedCar; + + /** + * Decodes a CopiedCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CopiedCar; + + /** + * Verifies a CopiedCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CopiedCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CopiedCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CopiedCar; + + /** + * Creates a plain object from a CopiedCar message. Also converts values to other types if specified. + * @param message CopiedCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CopiedCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CopiedCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CopiedCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FriendCar. */ + interface IFriendCar { + + /** FriendCar car */ + car: wm.protobuf.ICar; + + /** FriendCar friendshipLevel */ + friendshipLevel?: (number|null); + + /** FriendCar nonhuman */ + nonhuman: boolean; + } + + /** Represents a FriendCar. */ + class FriendCar implements IFriendCar { + + /** + * Constructs a new FriendCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IFriendCar); + + /** FriendCar car. */ + public car: wm.protobuf.ICar; + + /** FriendCar friendshipLevel. */ + public friendshipLevel: number; + + /** FriendCar nonhuman. */ + public nonhuman: boolean; + + /** + * Creates a new FriendCar instance using the specified properties. + * @param [properties] Properties to set + * @returns FriendCar instance + */ + public static create(properties?: wm.protobuf.IFriendCar): wm.protobuf.FriendCar; + + /** + * Encodes the specified FriendCar message. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @param message FriendCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IFriendCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FriendCar message, length delimited. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @param message FriendCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IFriendCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FriendCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.FriendCar; + + /** + * Decodes a FriendCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.FriendCar; + + /** + * Verifies a FriendCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FriendCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FriendCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.FriendCar; + + /** + * Creates a plain object from a FriendCar message. Also converts values to other types if specified. + * @param message FriendCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.FriendCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FriendCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FriendCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChallengerCar. */ + interface IChallengerCar { + + /** ChallengerCar car */ + car: wm.protobuf.ICar; + + /** ChallengerCar stamp */ + stamp: number; + + /** ChallengerCar result */ + result: number; + + /** ChallengerCar area */ + area: number; + } + + /** Represents a ChallengerCar. */ + class ChallengerCar implements IChallengerCar { + + /** + * Constructs a new ChallengerCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IChallengerCar); + + /** ChallengerCar car. */ + public car: wm.protobuf.ICar; + + /** ChallengerCar stamp. */ + public stamp: number; + + /** ChallengerCar result. */ + public result: number; + + /** ChallengerCar area. */ + public area: number; + + /** + * Creates a new ChallengerCar instance using the specified properties. + * @param [properties] Properties to set + * @returns ChallengerCar instance + */ + public static create(properties?: wm.protobuf.IChallengerCar): wm.protobuf.ChallengerCar; + + /** + * Encodes the specified ChallengerCar message. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @param message ChallengerCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IChallengerCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChallengerCar message, length delimited. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @param message ChallengerCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IChallengerCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ChallengerCar; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ChallengerCar; + + /** + * Verifies a ChallengerCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChallengerCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChallengerCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ChallengerCar; + + /** + * Creates a plain object from a ChallengerCar message. Also converts values to other types if specified. + * @param message ChallengerCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ChallengerCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChallengerCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChallengerCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StampTargetCar. */ + interface IStampTargetCar { + + /** StampTargetCar car */ + car: wm.protobuf.ICar; + + /** StampTargetCar returnCount */ + returnCount: number; + + /** StampTargetCar locked */ + locked: boolean; + + /** StampTargetCar recommended */ + recommended: boolean; + } + + /** Represents a StampTargetCar. */ + class StampTargetCar implements IStampTargetCar { + + /** + * Constructs a new StampTargetCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IStampTargetCar); + + /** StampTargetCar car. */ + public car: wm.protobuf.ICar; + + /** StampTargetCar returnCount. */ + public returnCount: number; + + /** StampTargetCar locked. */ + public locked: boolean; + + /** StampTargetCar recommended. */ + public recommended: boolean; + + /** + * Creates a new StampTargetCar instance using the specified properties. + * @param [properties] Properties to set + * @returns StampTargetCar instance + */ + public static create(properties?: wm.protobuf.IStampTargetCar): wm.protobuf.StampTargetCar; + + /** + * Encodes the specified StampTargetCar message. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @param message StampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @param message StampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.StampTargetCar; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.StampTargetCar; + + /** + * Verifies a StampTargetCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StampTargetCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StampTargetCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.StampTargetCar; + + /** + * Creates a plain object from a StampTargetCar message. Also converts values to other types if specified. + * @param message StampTargetCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.StampTargetCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StampTargetCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StampTargetCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BookmarkedCar. */ + interface IBookmarkedCar { + + /** BookmarkedCar car */ + car: wm.protobuf.ICar; + + /** BookmarkedCar returnCount */ + returnCount: number; + } + + /** Represents a BookmarkedCar. */ + class BookmarkedCar implements IBookmarkedCar { + + /** + * Constructs a new BookmarkedCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IBookmarkedCar); + + /** BookmarkedCar car. */ + public car: wm.protobuf.ICar; + + /** BookmarkedCar returnCount. */ + public returnCount: number; + + /** + * Creates a new BookmarkedCar instance using the specified properties. + * @param [properties] Properties to set + * @returns BookmarkedCar instance + */ + public static create(properties?: wm.protobuf.IBookmarkedCar): wm.protobuf.BookmarkedCar; + + /** + * Encodes the specified BookmarkedCar message. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @param message BookmarkedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IBookmarkedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BookmarkedCar message, length delimited. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @param message BookmarkedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IBookmarkedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.BookmarkedCar; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.BookmarkedCar; + + /** + * Verifies a BookmarkedCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BookmarkedCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BookmarkedCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.BookmarkedCar; + + /** + * Creates a plain object from a BookmarkedCar message. Also converts values to other types if specified. + * @param message BookmarkedCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.BookmarkedCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BookmarkedCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BookmarkedCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PreviousVersionStampTargetCar. */ + interface IPreviousVersionStampTargetCar { + + /** PreviousVersionStampTargetCar car */ + car: wm.protobuf.ICar; + + /** PreviousVersionStampTargetCar returnCount */ + returnCount: number; + + /** PreviousVersionStampTargetCar currentCarId */ + currentCarId?: (number|null); + } + + /** Represents a PreviousVersionStampTargetCar. */ + class PreviousVersionStampTargetCar implements IPreviousVersionStampTargetCar { + + /** + * Constructs a new PreviousVersionStampTargetCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPreviousVersionStampTargetCar); + + /** PreviousVersionStampTargetCar car. */ + public car: wm.protobuf.ICar; + + /** PreviousVersionStampTargetCar returnCount. */ + public returnCount: number; + + /** PreviousVersionStampTargetCar currentCarId. */ + public currentCarId: number; + + /** + * Creates a new PreviousVersionStampTargetCar instance using the specified properties. + * @param [properties] Properties to set + * @returns PreviousVersionStampTargetCar instance + */ + public static create(properties?: wm.protobuf.IPreviousVersionStampTargetCar): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Encodes the specified PreviousVersionStampTargetCar message. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @param message PreviousVersionStampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPreviousVersionStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreviousVersionStampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @param message PreviousVersionStampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPreviousVersionStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Verifies a PreviousVersionStampTargetCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PreviousVersionStampTargetCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreviousVersionStampTargetCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Creates a plain object from a PreviousVersionStampTargetCar message. Also converts values to other types if specified. + * @param message PreviousVersionStampTargetCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PreviousVersionStampTargetCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreviousVersionStampTargetCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PreviousVersionStampTargetCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCar. */ + interface IGhostCar { + + /** GhostCar car */ + car: wm.protobuf.ICar; + + /** GhostCar area */ + area?: (number|null); + + /** GhostCar ramp */ + ramp?: (number|null); + + /** GhostCar path */ + path?: (number|null); + + /** GhostCar nonhuman */ + nonhuman?: (boolean|null); + + /** GhostCar type */ + type?: (wm.protobuf.GhostType|null); + + /** GhostCar trailId */ + trailId?: (number|Long|null); + } + + /** Represents a GhostCar. */ + class GhostCar implements IGhostCar { + + /** + * Constructs a new GhostCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCar); + + /** GhostCar car. */ + public car: wm.protobuf.ICar; + + /** GhostCar area. */ + public area: number; + + /** GhostCar ramp. */ + public ramp: number; + + /** GhostCar path. */ + public path: number; + + /** GhostCar nonhuman. */ + public nonhuman: boolean; + + /** GhostCar type. */ + public type: wm.protobuf.GhostType; + + /** GhostCar trailId. */ + public trailId: (number|Long); + + /** + * Creates a new GhostCar instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCar instance + */ + public static create(properties?: wm.protobuf.IGhostCar): wm.protobuf.GhostCar; + + /** + * Encodes the specified GhostCar message. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @param message GhostCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCar message, length delimited. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @param message GhostCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCar; + + /** + * Decodes a GhostCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCar; + + /** + * Verifies a GhostCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCar; + + /** + * Creates a plain object from a GhostCar message. Also converts values to other types if specified. + * @param message GhostCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Place. */ + interface IPlace { + + /** Place placeId */ + placeId: string; + + /** Place shopName */ + shopName: string; + + /** Place regionId */ + regionId: number; + + /** Place country */ + country: string; + } + + /** Represents a Place. */ + class Place implements IPlace { + + /** + * Constructs a new Place. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPlace); + + /** Place placeId. */ + public placeId: string; + + /** Place shopName. */ + public shopName: string; + + /** Place regionId. */ + public regionId: number; + + /** Place country. */ + public country: string; + + /** + * Creates a new Place instance using the specified properties. + * @param [properties] Properties to set + * @returns Place instance + */ + public static create(properties?: wm.protobuf.IPlace): wm.protobuf.Place; + + /** + * Encodes the specified Place message. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @param message Place message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Place message, length delimited. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @param message Place message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Place message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Place; + + /** + * Decodes a Place message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Place; + + /** + * Verifies a Place message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Place message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Place + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Place; + + /** + * Creates a plain object from a Place message. Also converts values to other types if specified. + * @param message Place + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Place, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Place to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Place + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SystemSetting. */ + interface ISystemSetting { + + /** SystemSetting mCoinChute */ + mCoinChute: number; + + /** SystemSetting mBuyCardCost */ + mBuyCardCost: number; + + /** SystemSetting mGameCost */ + mGameCost: number; + + /** SystemSetting mContinueCost */ + mContinueCost: number; + + /** SystemSetting mFullCourseCost */ + mFullCourseCost: number; + + /** SystemSetting mFreePlay */ + mFreePlay: boolean; + + /** SystemSetting mPcbId */ + mPcbId?: (number|null); + + /** SystemSetting mIcCardRw */ + mIcCardRw: boolean; + + /** SystemSetting mIcCardVender */ + mIcCardVender: boolean; + + /** SystemSetting mMgCardRw */ + mMgCardRw?: (boolean|null); + + /** SystemSetting mForceFeedback */ + mForceFeedback?: (boolean|null); + + /** SystemSetting mWinsAndRemains */ + mWinsAndRemains: boolean; + + /** SystemSetting mEventMode */ + mEventMode: number; + + /** SystemSetting mEventModeDist */ + mEventModeDist: boolean; + + /** SystemSetting mCloseType */ + mCloseType: number; + + /** SystemSetting mCloseSun */ + mCloseSun: number; + + /** SystemSetting mCloseMon */ + mCloseMon: number; + + /** SystemSetting mCloseTue */ + mCloseTue: number; + + /** SystemSetting mCloseWed */ + mCloseWed: number; + + /** SystemSetting mCloseThu */ + mCloseThu: number; + + /** SystemSetting mCloseFri */ + mCloseFri: number; + + /** SystemSetting mCloseSat */ + mCloseSat: number; + + /** SystemSetting mCloseDay */ + mCloseDay: number; + + /** SystemSetting mTouchPanel */ + mTouchPanel?: (boolean|null); + + /** SystemSetting mGameVol */ + mGameVol: number; + + /** SystemSetting mAttractVol */ + mAttractVol: number; + + /** SystemSetting mCalibHandleCenter */ + mCalibHandleCenter?: (number|null); + + /** SystemSetting mCalibAccelCenter */ + mCalibAccelCenter?: (number|null); + + /** SystemSetting mCalibBrakeCenter */ + mCalibBrakeCenter?: (number|null); + + /** SystemSetting mCalibTouchLeft */ + mCalibTouchLeft?: (number|null); + + /** SystemSetting mCalibTouchRight */ + mCalibTouchRight?: (number|null); + + /** SystemSetting mCalibTouchTop */ + mCalibTouchTop?: (number|null); + + /** SystemSetting mCalibTouchBottom */ + mCalibTouchBottom?: (number|null); + } + + /** Represents a SystemSetting. */ + class SystemSetting implements ISystemSetting { + + /** + * Constructs a new SystemSetting. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISystemSetting); + + /** SystemSetting mCoinChute. */ + public mCoinChute: number; + + /** SystemSetting mBuyCardCost. */ + public mBuyCardCost: number; + + /** SystemSetting mGameCost. */ + public mGameCost: number; + + /** SystemSetting mContinueCost. */ + public mContinueCost: number; + + /** SystemSetting mFullCourseCost. */ + public mFullCourseCost: number; + + /** SystemSetting mFreePlay. */ + public mFreePlay: boolean; + + /** SystemSetting mPcbId. */ + public mPcbId: number; + + /** SystemSetting mIcCardRw. */ + public mIcCardRw: boolean; + + /** SystemSetting mIcCardVender. */ + public mIcCardVender: boolean; + + /** SystemSetting mMgCardRw. */ + public mMgCardRw: boolean; + + /** SystemSetting mForceFeedback. */ + public mForceFeedback: boolean; + + /** SystemSetting mWinsAndRemains. */ + public mWinsAndRemains: boolean; + + /** SystemSetting mEventMode. */ + public mEventMode: number; + + /** SystemSetting mEventModeDist. */ + public mEventModeDist: boolean; + + /** SystemSetting mCloseType. */ + public mCloseType: number; + + /** SystemSetting mCloseSun. */ + public mCloseSun: number; + + /** SystemSetting mCloseMon. */ + public mCloseMon: number; + + /** SystemSetting mCloseTue. */ + public mCloseTue: number; + + /** SystemSetting mCloseWed. */ + public mCloseWed: number; + + /** SystemSetting mCloseThu. */ + public mCloseThu: number; + + /** SystemSetting mCloseFri. */ + public mCloseFri: number; + + /** SystemSetting mCloseSat. */ + public mCloseSat: number; + + /** SystemSetting mCloseDay. */ + public mCloseDay: number; + + /** SystemSetting mTouchPanel. */ + public mTouchPanel: boolean; + + /** SystemSetting mGameVol. */ + public mGameVol: number; + + /** SystemSetting mAttractVol. */ + public mAttractVol: number; + + /** SystemSetting mCalibHandleCenter. */ + public mCalibHandleCenter: number; + + /** SystemSetting mCalibAccelCenter. */ + public mCalibAccelCenter: number; + + /** SystemSetting mCalibBrakeCenter. */ + public mCalibBrakeCenter: number; + + /** SystemSetting mCalibTouchLeft. */ + public mCalibTouchLeft: number; + + /** SystemSetting mCalibTouchRight. */ + public mCalibTouchRight: number; + + /** SystemSetting mCalibTouchTop. */ + public mCalibTouchTop: number; + + /** SystemSetting mCalibTouchBottom. */ + public mCalibTouchBottom: number; + + /** + * Creates a new SystemSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns SystemSetting instance + */ + public static create(properties?: wm.protobuf.ISystemSetting): wm.protobuf.SystemSetting; + + /** + * Encodes the specified SystemSetting message. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @param message SystemSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISystemSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SystemSetting message, length delimited. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @param message SystemSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISystemSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SystemSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SystemSetting; + + /** + * Decodes a SystemSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SystemSetting; + + /** + * Verifies a SystemSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SystemSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SystemSetting + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SystemSetting; + + /** + * Creates a plain object from a SystemSetting message. Also converts values to other types if specified. + * @param message SystemSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SystemSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SystemSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SystemSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCompetitionSchedule. */ + interface IGhostCompetitionSchedule { + + /** GhostCompetitionSchedule competitionId */ + competitionId: number; + + /** GhostCompetitionSchedule qualifyingPeriodStartAt */ + qualifyingPeriodStartAt: number; + + /** GhostCompetitionSchedule qualifyingPeriodCloseAt */ + qualifyingPeriodCloseAt: number; + + /** GhostCompetitionSchedule competitionStartAt */ + competitionStartAt: number; + + /** GhostCompetitionSchedule competitionCloseAt */ + competitionCloseAt: number; + + /** GhostCompetitionSchedule competitionEndAt */ + competitionEndAt: number; + + /** GhostCompetitionSchedule lengthOfPeriod */ + lengthOfPeriod: number; + + /** GhostCompetitionSchedule lengthOfInterval */ + lengthOfInterval: number; + + /** GhostCompetitionSchedule area */ + area: number; + + /** GhostCompetitionSchedule minigamePatternId */ + minigamePatternId: number; + } + + /** Represents a GhostCompetitionSchedule. */ + class GhostCompetitionSchedule implements IGhostCompetitionSchedule { + + /** + * Constructs a new GhostCompetitionSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCompetitionSchedule); + + /** GhostCompetitionSchedule competitionId. */ + public competitionId: number; + + /** GhostCompetitionSchedule qualifyingPeriodStartAt. */ + public qualifyingPeriodStartAt: number; + + /** GhostCompetitionSchedule qualifyingPeriodCloseAt. */ + public qualifyingPeriodCloseAt: number; + + /** GhostCompetitionSchedule competitionStartAt. */ + public competitionStartAt: number; + + /** GhostCompetitionSchedule competitionCloseAt. */ + public competitionCloseAt: number; + + /** GhostCompetitionSchedule competitionEndAt. */ + public competitionEndAt: number; + + /** GhostCompetitionSchedule lengthOfPeriod. */ + public lengthOfPeriod: number; + + /** GhostCompetitionSchedule lengthOfInterval. */ + public lengthOfInterval: number; + + /** GhostCompetitionSchedule area. */ + public area: number; + + /** GhostCompetitionSchedule minigamePatternId. */ + public minigamePatternId: number; + + /** + * Creates a new GhostCompetitionSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionSchedule instance + */ + public static create(properties?: wm.protobuf.IGhostCompetitionSchedule): wm.protobuf.GhostCompetitionSchedule; + + /** + * Encodes the specified GhostCompetitionSchedule message. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @param message GhostCompetitionSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCompetitionSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionSchedule message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @param message GhostCompetitionSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCompetitionSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCompetitionSchedule; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCompetitionSchedule; + + /** + * Verifies a GhostCompetitionSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionSchedule + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCompetitionSchedule; + + /** + * Creates a plain object from a GhostCompetitionSchedule message. Also converts values to other types if specified. + * @param message GhostCompetitionSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCompetitionSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCompetitionParameter. */ + interface IGhostCompetitionParameter { + + /** GhostCompetitionParameter parameters1 */ + parameters1?: (number[]|null); + + /** GhostCompetitionParameter parameters2 */ + parameters2: boolean; + } + + /** Represents a GhostCompetitionParameter. */ + class GhostCompetitionParameter implements IGhostCompetitionParameter { + + /** + * Constructs a new GhostCompetitionParameter. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCompetitionParameter); + + /** GhostCompetitionParameter parameters1. */ + public parameters1: number[]; + + /** GhostCompetitionParameter parameters2. */ + public parameters2: boolean; + + /** + * Creates a new GhostCompetitionParameter instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionParameter instance + */ + public static create(properties?: wm.protobuf.IGhostCompetitionParameter): wm.protobuf.GhostCompetitionParameter; + + /** + * Encodes the specified GhostCompetitionParameter message. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @param message GhostCompetitionParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCompetitionParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionParameter message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @param message GhostCompetitionParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCompetitionParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCompetitionParameter; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCompetitionParameter; + + /** + * Verifies a GhostCompetitionParameter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionParameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionParameter + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCompetitionParameter; + + /** + * Creates a plain object from a GhostCompetitionParameter message. Also converts values to other types if specified. + * @param message GhostCompetitionParameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCompetitionParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionParameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionParameter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TransferNotice. */ + interface ITransferNotice { + + /** TransferNotice needToSeeTransferred */ + needToSeeTransferred: boolean; + + /** TransferNotice totalMaxiGold */ + totalMaxiGold?: (number|null); + + /** TransferNotice numOfPorscheCars */ + numOfPorscheCars?: (number|null); + + /** TransferNotice porscheModels */ + porscheModels?: (number[]|null); + + /** TransferNotice hasR35 */ + hasR35?: (boolean|null); + } + + /** Represents a TransferNotice. */ + class TransferNotice implements ITransferNotice { + + /** + * Constructs a new TransferNotice. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITransferNotice); + + /** TransferNotice needToSeeTransferred. */ + public needToSeeTransferred: boolean; + + /** TransferNotice totalMaxiGold. */ + public totalMaxiGold: number; + + /** TransferNotice numOfPorscheCars. */ + public numOfPorscheCars: number; + + /** TransferNotice porscheModels. */ + public porscheModels: number[]; + + /** TransferNotice hasR35. */ + public hasR35: boolean; + + /** + * Creates a new TransferNotice instance using the specified properties. + * @param [properties] Properties to set + * @returns TransferNotice instance + */ + public static create(properties?: wm.protobuf.ITransferNotice): wm.protobuf.TransferNotice; + + /** + * Encodes the specified TransferNotice message. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @param message TransferNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITransferNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransferNotice message, length delimited. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @param message TransferNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITransferNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransferNotice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TransferNotice; + + /** + * Decodes a TransferNotice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TransferNotice; + + /** + * Verifies a TransferNotice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransferNotice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransferNotice + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TransferNotice; + + /** + * Creates a plain object from a TransferNotice message. Also converts values to other types if specified. + * @param message TransferNotice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TransferNotice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransferNotice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransferNotice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GameFeatureVersion. */ + interface IGameFeatureVersion { + + /** GameFeatureVersion version */ + version: number; + + /** GameFeatureVersion year */ + year: number; + + /** GameFeatureVersion month */ + month: number; + + /** GameFeatureVersion pluses */ + pluses: number; + + /** GameFeatureVersion releaseAt */ + releaseAt: number; + } + + /** Represents a GameFeatureVersion. */ + class GameFeatureVersion implements IGameFeatureVersion { + + /** + * Constructs a new GameFeatureVersion. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGameFeatureVersion); + + /** GameFeatureVersion version. */ + public version: number; + + /** GameFeatureVersion year. */ + public year: number; + + /** GameFeatureVersion month. */ + public month: number; + + /** GameFeatureVersion pluses. */ + public pluses: number; + + /** GameFeatureVersion releaseAt. */ + public releaseAt: number; + + /** + * Creates a new GameFeatureVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns GameFeatureVersion instance + */ + public static create(properties?: wm.protobuf.IGameFeatureVersion): wm.protobuf.GameFeatureVersion; + + /** + * Encodes the specified GameFeatureVersion message. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @param message GameFeatureVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGameFeatureVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GameFeatureVersion message, length delimited. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @param message GameFeatureVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGameFeatureVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GameFeatureVersion; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GameFeatureVersion; + + /** + * Verifies a GameFeatureVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GameFeatureVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GameFeatureVersion + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GameFeatureVersion; + + /** + * Creates a plain object from a GameFeatureVersion message. Also converts values to other types if specified. + * @param message GameFeatureVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GameFeatureVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GameFeatureVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GameFeatureVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ScratchSheet. */ + interface IScratchSheet { + + /** ScratchSheet squares */ + squares?: (wm.protobuf.ScratchSheet.IScratchSquare[]|null); + } + + /** Represents a ScratchSheet. */ + class ScratchSheet implements IScratchSheet { + + /** + * Constructs a new ScratchSheet. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IScratchSheet); + + /** ScratchSheet squares. */ + public squares: wm.protobuf.ScratchSheet.IScratchSquare[]; + + /** + * Creates a new ScratchSheet instance using the specified properties. + * @param [properties] Properties to set + * @returns ScratchSheet instance + */ + public static create(properties?: wm.protobuf.IScratchSheet): wm.protobuf.ScratchSheet; + + /** + * Encodes the specified ScratchSheet message. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @param message ScratchSheet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IScratchSheet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScratchSheet message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @param message ScratchSheet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IScratchSheet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ScratchSheet; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ScratchSheet; + + /** + * Verifies a ScratchSheet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScratchSheet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScratchSheet + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ScratchSheet; + + /** + * Creates a plain object from a ScratchSheet message. Also converts values to other types if specified. + * @param message ScratchSheet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ScratchSheet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScratchSheet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScratchSheet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ScratchSheet { + + /** Properties of a ScratchSquare. */ + interface IScratchSquare { + + /** ScratchSquare category */ + category: wm.protobuf.ItemCategory; + + /** ScratchSquare itemId */ + itemId: number; + + /** ScratchSquare earned */ + earned: boolean; + } + + /** Represents a ScratchSquare. */ + class ScratchSquare implements IScratchSquare { + + /** + * Constructs a new ScratchSquare. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ScratchSheet.IScratchSquare); + + /** ScratchSquare category. */ + public category: wm.protobuf.ItemCategory; + + /** ScratchSquare itemId. */ + public itemId: number; + + /** ScratchSquare earned. */ + public earned: boolean; + + /** + * Creates a new ScratchSquare instance using the specified properties. + * @param [properties] Properties to set + * @returns ScratchSquare instance + */ + public static create(properties?: wm.protobuf.ScratchSheet.IScratchSquare): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Encodes the specified ScratchSquare message. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @param message ScratchSquare message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ScratchSheet.IScratchSquare, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScratchSquare message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @param message ScratchSquare message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ScratchSheet.IScratchSquare, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Verifies a ScratchSquare message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScratchSquare message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScratchSquare + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Creates a plain object from a ScratchSquare message. Also converts values to other types if specified. + * @param message ScratchSquare + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ScratchSheet.ScratchSquare, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScratchSquare to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScratchSquare + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a UserItem. */ + interface IUserItem { + + /** UserItem category */ + category: wm.protobuf.ItemCategory; + + /** UserItem itemId */ + itemId: number; + + /** UserItem userItemId */ + userItemId?: (number|null); + + /** UserItem earnedAt */ + earnedAt?: (number|null); + + /** UserItem expireAt */ + expireAt?: (number|null); + } + + /** Represents a UserItem. */ + class UserItem implements IUserItem { + + /** + * Constructs a new UserItem. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUserItem); + + /** UserItem category. */ + public category: wm.protobuf.ItemCategory; + + /** UserItem itemId. */ + public itemId: number; + + /** UserItem userItemId. */ + public userItemId: number; + + /** UserItem earnedAt. */ + public earnedAt: number; + + /** UserItem expireAt. */ + public expireAt: number; + + /** + * Creates a new UserItem instance using the specified properties. + * @param [properties] Properties to set + * @returns UserItem instance + */ + public static create(properties?: wm.protobuf.IUserItem): wm.protobuf.UserItem; + + /** + * Encodes the specified UserItem message. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @param message UserItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUserItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserItem message, length delimited. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @param message UserItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUserItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UserItem; + + /** + * Decodes a UserItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UserItem; + + /** + * Verifies a UserItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserItem + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UserItem; + + /** + * Creates a plain object from a UserItem message. Also converts values to other types if specified. + * @param message UserItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UserItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InviteFriendCampaignSchedule. */ + interface IInviteFriendCampaignSchedule { + + /** InviteFriendCampaignSchedule campaignId */ + campaignId: number; + + /** InviteFriendCampaignSchedule startAt */ + startAt: number; + + /** InviteFriendCampaignSchedule endAt */ + endAt: number; + + /** InviteFriendCampaignSchedule couponUnreceivableAt */ + couponUnreceivableAt: number; + } + + /** Represents an InviteFriendCampaignSchedule. */ + class InviteFriendCampaignSchedule implements IInviteFriendCampaignSchedule { + + /** + * Constructs a new InviteFriendCampaignSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IInviteFriendCampaignSchedule); + + /** InviteFriendCampaignSchedule campaignId. */ + public campaignId: number; + + /** InviteFriendCampaignSchedule startAt. */ + public startAt: number; + + /** InviteFriendCampaignSchedule endAt. */ + public endAt: number; + + /** InviteFriendCampaignSchedule couponUnreceivableAt. */ + public couponUnreceivableAt: number; + + /** + * Creates a new InviteFriendCampaignSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns InviteFriendCampaignSchedule instance + */ + public static create(properties?: wm.protobuf.IInviteFriendCampaignSchedule): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Encodes the specified InviteFriendCampaignSchedule message. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @param message InviteFriendCampaignSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IInviteFriendCampaignSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InviteFriendCampaignSchedule message, length delimited. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @param message InviteFriendCampaignSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IInviteFriendCampaignSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Verifies an InviteFriendCampaignSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InviteFriendCampaignSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InviteFriendCampaignSchedule + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Creates a plain object from an InviteFriendCampaignSchedule message. Also converts values to other types if specified. + * @param message InviteFriendCampaignSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.InviteFriendCampaignSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InviteFriendCampaignSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InviteFriendCampaignSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarTuning. */ + interface ICarTuning { + + /** CarTuning carId */ + carId: number; + + /** CarTuning tunePower */ + tunePower: number; + + /** CarTuning tuneHandling */ + tuneHandling: number; + + /** CarTuning lastPlayedAt */ + lastPlayedAt?: (number|null); + } + + /** Represents a CarTuning. */ + class CarTuning implements ICarTuning { + + /** + * Constructs a new CarTuning. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarTuning); + + /** CarTuning carId. */ + public carId: number; + + /** CarTuning tunePower. */ + public tunePower: number; + + /** CarTuning tuneHandling. */ + public tuneHandling: number; + + /** CarTuning lastPlayedAt. */ + public lastPlayedAt: number; + + /** + * Creates a new CarTuning instance using the specified properties. + * @param [properties] Properties to set + * @returns CarTuning instance + */ + public static create(properties?: wm.protobuf.ICarTuning): wm.protobuf.CarTuning; + + /** + * Encodes the specified CarTuning message. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @param message CarTuning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarTuning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarTuning message, length delimited. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @param message CarTuning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarTuning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarTuning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarTuning; + + /** + * Decodes a CarTuning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarTuning; + + /** + * Verifies a CarTuning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarTuning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarTuning + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarTuning; + + /** + * Creates a plain object from a CarTuning message. Also converts values to other types if specified. + * @param message CarTuning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarTuning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarTuning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarTuning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BinaryData. */ + interface IBinaryData { + + /** BinaryData data */ + data: Uint8Array; + + /** BinaryData mergeSerial */ + mergeSerial: number; + } + + /** Represents a BinaryData. */ + class BinaryData implements IBinaryData { + + /** + * Constructs a new BinaryData. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IBinaryData); + + /** BinaryData data. */ + public data: Uint8Array; + + /** BinaryData mergeSerial. */ + public mergeSerial: number; + + /** + * Creates a new BinaryData instance using the specified properties. + * @param [properties] Properties to set + * @returns BinaryData instance + */ + public static create(properties?: wm.protobuf.IBinaryData): wm.protobuf.BinaryData; + + /** + * Encodes the specified BinaryData message. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @param message BinaryData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IBinaryData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BinaryData message, length delimited. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @param message BinaryData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IBinaryData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BinaryData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.BinaryData; + + /** + * Decodes a BinaryData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.BinaryData; + + /** + * Verifies a BinaryData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BinaryData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BinaryData + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.BinaryData; + + /** + * Creates a plain object from a BinaryData message. Also converts values to other types if specified. + * @param message BinaryData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.BinaryData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BinaryData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BinaryData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostTrail. */ + interface IGhostTrail { + + /** GhostTrail carId */ + carId: number; + + /** GhostTrail area */ + area: number; + + /** GhostTrail ramp */ + ramp: number; + + /** GhostTrail path */ + path: number; + + /** GhostTrail playedAt */ + playedAt: number; + + /** GhostTrail playedPlace */ + playedPlace?: (wm.protobuf.IPlace|null); + + /** GhostTrail trail */ + trail: Uint8Array; + } + + /** Represents a GhostTrail. */ + class GhostTrail implements IGhostTrail { + + /** + * Constructs a new GhostTrail. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostTrail); + + /** GhostTrail carId. */ + public carId: number; + + /** GhostTrail area. */ + public area: number; + + /** GhostTrail ramp. */ + public ramp: number; + + /** GhostTrail path. */ + public path: number; + + /** GhostTrail playedAt. */ + public playedAt: number; + + /** GhostTrail playedPlace. */ + public playedPlace?: (wm.protobuf.IPlace|null); + + /** GhostTrail trail. */ + public trail: Uint8Array; + + /** + * Creates a new GhostTrail instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostTrail instance + */ + public static create(properties?: wm.protobuf.IGhostTrail): wm.protobuf.GhostTrail; + + /** + * Encodes the specified GhostTrail message. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @param message GhostTrail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostTrail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostTrail message, length delimited. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @param message GhostTrail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostTrail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostTrail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostTrail; + + /** + * Decodes a GhostTrail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostTrail; + + /** + * Verifies a GhostTrail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostTrail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostTrail + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostTrail; + + /** + * Creates a plain object from a GhostTrail message. Also converts values to other types if specified. + * @param message GhostTrail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostTrail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostTrail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostTrail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PlaceList. */ + interface IPlaceList { + + /** PlaceList places */ + places?: (wm.protobuf.IPlace[]|null); + } + + /** Represents a PlaceList. */ + class PlaceList implements IPlaceList { + + /** + * Constructs a new PlaceList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPlaceList); + + /** PlaceList places. */ + public places: wm.protobuf.IPlace[]; + + /** + * Creates a new PlaceList instance using the specified properties. + * @param [properties] Properties to set + * @returns PlaceList instance + */ + public static create(properties?: wm.protobuf.IPlaceList): wm.protobuf.PlaceList; + + /** + * Encodes the specified PlaceList message. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @param message PlaceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPlaceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlaceList message, length delimited. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @param message PlaceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPlaceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlaceList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PlaceList; + + /** + * Decodes a PlaceList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PlaceList; + + /** + * Verifies a PlaceList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlaceList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlaceList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PlaceList; + + /** + * Creates a plain object from a PlaceList message. Also converts values to other types if specified. + * @param message PlaceList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PlaceList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlaceList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlaceList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostList. */ + interface IGhostList { + + /** GhostList ghosts */ + ghosts?: (wm.protobuf.IGhostCar[]|null); + } + + /** Represents a GhostList. */ + class GhostList implements IGhostList { + + /** + * Constructs a new GhostList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostList); + + /** GhostList ghosts. */ + public ghosts: wm.protobuf.IGhostCar[]; + + /** + * Creates a new GhostList instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostList instance + */ + public static create(properties?: wm.protobuf.IGhostList): wm.protobuf.GhostList; + + /** + * Encodes the specified GhostList message. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @param message GhostList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostList message, length delimited. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @param message GhostList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostList; + + /** + * Decodes a GhostList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostList; + + /** + * Verifies a GhostList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostList; + + /** + * Creates a plain object from a GhostList message. Also converts values to other types if specified. + * @param message GhostList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarSummary. */ + interface ICarSummary { + + /** CarSummary hitCount */ + hitCount: number; + + /** CarSummary cars */ + cars?: (wm.protobuf.ICar[]|null); + } + + /** Represents a CarSummary. */ + class CarSummary implements ICarSummary { + + /** + * Constructs a new CarSummary. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarSummary); + + /** CarSummary hitCount. */ + public hitCount: number; + + /** CarSummary cars. */ + public cars: wm.protobuf.ICar[]; + + /** + * Creates a new CarSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns CarSummary instance + */ + public static create(properties?: wm.protobuf.ICarSummary): wm.protobuf.CarSummary; + + /** + * Encodes the specified CarSummary message. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @param message CarSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarSummary message, length delimited. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @param message CarSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarSummary; + + /** + * Decodes a CarSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarSummary; + + /** + * Verifies a CarSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarSummary + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarSummary; + + /** + * Creates a plain object from a CarSummary message. Also converts values to other types if specified. + * @param message CarSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileList. */ + interface IFileList { + + /** FileList files */ + files?: (wm.protobuf.FileList.IFileInfo[]|null); + + /** FileList interval */ + interval?: (number|null); + } + + /** Represents a FileList. */ + class FileList implements IFileList { + + /** + * Constructs a new FileList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IFileList); + + /** FileList files. */ + public files: wm.protobuf.FileList.IFileInfo[]; + + /** FileList interval. */ + public interval: number; + + /** + * Creates a new FileList instance using the specified properties. + * @param [properties] Properties to set + * @returns FileList instance + */ + public static create(properties?: wm.protobuf.IFileList): wm.protobuf.FileList; + + /** + * Encodes the specified FileList message. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @param message FileList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IFileList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileList message, length delimited. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @param message FileList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IFileList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.FileList; + + /** + * Decodes a FileList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.FileList; + + /** + * Verifies a FileList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.FileList; + + /** + * Creates a plain object from a FileList message. Also converts values to other types if specified. + * @param message FileList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.FileList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileList { + + /** Properties of a FileInfo. */ + interface IFileInfo { + + /** FileInfo fileId */ + fileId: number; + + /** FileInfo fileType */ + fileType: wm.protobuf.FileType; + + /** FileInfo fileSize */ + fileSize: number; + + /** FileInfo url */ + url: string; + + /** FileInfo sha1sum */ + sha1sum: Uint8Array; + + /** FileInfo notBefore */ + notBefore: number; + + /** FileInfo notAfter */ + notAfter: number; + } + + /** Represents a FileInfo. */ + class FileInfo implements IFileInfo { + + /** + * Constructs a new FileInfo. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.FileList.IFileInfo); + + /** FileInfo fileId. */ + public fileId: number; + + /** FileInfo fileType. */ + public fileType: wm.protobuf.FileType; + + /** FileInfo fileSize. */ + public fileSize: number; + + /** FileInfo url. */ + public url: string; + + /** FileInfo sha1sum. */ + public sha1sum: Uint8Array; + + /** FileInfo notBefore. */ + public notBefore: number; + + /** FileInfo notAfter. */ + public notAfter: number; + + /** + * Creates a new FileInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FileInfo instance + */ + public static create(properties?: wm.protobuf.FileList.IFileInfo): wm.protobuf.FileList.FileInfo; + + /** + * Encodes the specified FileInfo message. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @param message FileInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.FileList.IFileInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileInfo message, length delimited. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @param message FileInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.FileList.IFileInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.FileList.FileInfo; + + /** + * Decodes a FileInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.FileList.FileInfo; + + /** + * Verifies a FileInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileInfo + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.FileList.FileInfo; + + /** + * Creates a plain object from a FileInfo message. Also converts values to other types if specified. + * @param message FileInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.FileList.FileInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GhostCompetitionTarget. */ + interface IGhostCompetitionTarget { + + /** GhostCompetitionTarget competitionId */ + competitionId: number; + + /** GhostCompetitionTarget specialGhostId */ + specialGhostId?: (number|null); + + /** GhostCompetitionTarget ghostCar */ + ghostCar: wm.protobuf.IGhostCar; + + /** GhostCompetitionTarget trailId */ + trailId: (number|Long); + + /** GhostCompetitionTarget updatedAt */ + updatedAt: number; + + /** GhostCompetitionTarget competitionSchedule */ + competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + } + + /** Represents a GhostCompetitionTarget. */ + class GhostCompetitionTarget implements IGhostCompetitionTarget { + + /** + * Constructs a new GhostCompetitionTarget. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCompetitionTarget); + + /** GhostCompetitionTarget competitionId. */ + public competitionId: number; + + /** GhostCompetitionTarget specialGhostId. */ + public specialGhostId: number; + + /** GhostCompetitionTarget ghostCar. */ + public ghostCar: wm.protobuf.IGhostCar; + + /** GhostCompetitionTarget trailId. */ + public trailId: (number|Long); + + /** GhostCompetitionTarget updatedAt. */ + public updatedAt: number; + + /** GhostCompetitionTarget competitionSchedule. */ + public competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** + * Creates a new GhostCompetitionTarget instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionTarget instance + */ + public static create(properties?: wm.protobuf.IGhostCompetitionTarget): wm.protobuf.GhostCompetitionTarget; + + /** + * Encodes the specified GhostCompetitionTarget message. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @param message GhostCompetitionTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCompetitionTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionTarget message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @param message GhostCompetitionTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCompetitionTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCompetitionTarget; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCompetitionTarget; + + /** + * Verifies a GhostCompetitionTarget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionTarget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionTarget + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCompetitionTarget; + + /** + * Creates a plain object from a GhostCompetitionTarget message. Also converts values to other types if specified. + * @param message GhostCompetitionTarget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCompetitionTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionTarget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** SystemConstant enum. */ + enum SystemConstant { + PROTOBUF_MESSAGE_REVISION = 8053 + } + + /** ErrorCode enum. */ + enum ErrorCode { + ERR_SUCCESS = 0, + ERR_REQUEST = 1, + ERR_NOT_FOUND = 2, + ERR_ID_SERVER = 3, + ERR_ID_BANNED = 4, + ERR_USER_LOCKED = 5, + ERR_USER_VERSION = 6, + ERR_NAME_CONFLICTED = 7, + ERR_FORBIDDEN = 9, + ERR_USER_SUCCEEDED = 11, + ERR_BEING_TRANSFERRED = 12, + ERR_SCRATCH_LOCKED = 13 + } + + /** LineType enum. */ + enum LineType { + L_UNKNOWN = 0, + L_MOBILE = 1, + L_ISDN = 2, + L_BFLETS = 3, + L_ADSL = 4, + L_WIRED = 5 + } + + /** TerminalType enum. */ + enum TerminalType { + T_DRIVE = 0, + T_TERMINAL = 1 + } + + /** DeviceType enum. */ + enum DeviceType { + DEVICE_CARD = 0, + DEVICE_PHONE = 1 + } + + /** ItemCategory enum. */ + enum ItemCategory { + CAT_CUSTOM_COLOR = 1, + CAT_WHEEL = 2, + CAT_AERO = 3, + CAT_BONNET = 4, + CAT_WING = 5, + CAT_MIRROR = 6, + CAT_NEON = 8, + CAT_TRUNK = 9, + CAT_NUMBER_PLATE = 10, + CAT_GT_WING = 12, + CAT_AURA_MOTIF = 14, + CAT_METER = 15, + CAT_BGM = 16, + CAT_NAME_PLATE = 17, + CAT_NUMBER = 19, + CAT_BGM_TRACK = 22, + CAT_WINDOW_STICKER_FONT = 24, + CAT_WINDOW_DECORATION = 25, + CAT_RIVAL_MARKER = 26, + CAT_STAMP = 27, + CAT_TERMINAL_BACKGROUND = 28, + CAT_CAR_TICKET = 201, + CAT_CONSUMPTION_ITEM = 202, + CAT_CAR_TICKET_FREE = 203, + CAT_AERO_FULLSET = 300, + CAT_AERO_LIMITED = 301 + } + + /** TutorialType enum. */ + enum TutorialType { + TUTORIAL_ID_STORY = 0, + TUTORIAL_ID_TIME_ATTACK = 1, + TUTORIAL_ID_GHOST = 2, + TUTORIAL_ID_GHOST_CHALLENGE = 3, + TUTORIAL_ID_GHOST_LEVEL = 4, + TUTORIAL_ID_UNUSED_5 = 5, + TUTORIAL_ID_GHOST_SEARCH = 6, + TUTORIAL_ID_GHOST_COMPETITION = 7, + TUTORIAL_ID_HP600_CARD = 8, + TUTORIAL_ID_UNUSED_9 = 9, + TUTORIAL_ID_COMPETITION_QUALIFIED = 10, + TUTORIAL_ID_COMPETITION_TERMINAL = 11, + TUTORIAL_ID_COMPETITION_NOTICE = 12, + TUTORIAL_ID_COMPETITION_FINISHED = 13, + TUTORIAL_ID_UNUSED_14 = 14, + TUTORIAL_ID_UNUSED_15 = 15, + TUTORIAL_ID_UNUSED_16 = 16, + TUTORIAL_ID_UNUSED_17 = 17, + TUTORIAL_ID_UNUSED_18 = 18, + TUTORIAL_ID_UNUSED_19 = 19, + TUTORIAL_ID_GHOST_STAMP = 20, + TUTORIAL_ID_GHOST_STAMP_DECLINED = 21, + TUTORIAL_ID_GHOST_STAMP_FRIENDS = 22, + TUTORIAL_ID_TERMINAL_SCRATCH = 23, + TUTORIAL_ID_TURN_SCRATCH_SHEET = 24, + TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN = 25, + TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE = 26, + TUTORIAL_ID_VS_CONTINUE_TICKET = 27, + TUTORIAL_ID_UNUSED_28 = 28, + TUTORIAL_ID_UNUSED_29 = 29, + TUTORIAL_ID_UNUSED_30 = 30, + TUTORIAL_ID_DRESS_UP = 31, + TUTORIAL_ID_MULTI_GHOST = 32, + TUTORIAL_ID_STORY_NEW_FEATURE = 33, + TUTORIAL_ID_GHOST_NEW_FEATURE = 34, + TUTORIAL_ID_GHOST_REGION_MAP = 35 + } + + /** GameMode enum. */ + enum GameMode { + MODE_STORY = 1, + MODE_TIME_ATTACK = 2, + MODE_VS_BATTLE = 3, + MODE_GHOST_BATTLE = 4, + MODE_EVENT = 5 + } + + /** GhostType enum. */ + enum GhostType { + GHOST_NORMAL = 1, + GHOST_PINCH_RUNNER = 2, + GHOST_DEFAULT = 3 + } + + /** GhostSelectionMethod enum. */ + enum GhostSelectionMethod { + GHOST_SEARCH_BY_REGION = 1, + GHOST_SELECT_BY_LEVEL = 2, + GHOST_SELECT_CROWN_MATCH = 3, + GHOST_SELECT_STAMP_MATCH = 4, + GHOST_SELECT_FROM_HISTORY = 5, + GHOST_SEARCH_BY_SHOP = 6, + GHOST_SEARCH_BY_NAME = 7, + GHOST_ACCEPT_CHALLENGER = 8, + GHOST_APPOINTMENT = 9, + GHOST_DEFAULT_OPPONENT = 10, + GHOST_COMPETITION = 11, + GHOST_SELECT_FROM_BOOKMARKS = 12 + } + + /** GhostRateType enum. */ + enum GhostRateType { + GHOST_RATE_UNKNOWN = 1, + GHOST_RATE_INVALID = 2, + GHOST_RATE_VALID = 3 + } + + /** PathSelectionMethod enum. */ + enum PathSelectionMethod { + PATH_NEW = 1, + PATH_PLAIN = 2, + PATH_FRIEND = 3, + PATH_NORMAL = 4, + PATH_CHALLENGER = 5 + } + + /** NoticeEntry enum. */ + enum NoticeEntry { + NOTICE_UNUSED_1 = 1, + NOTICE_UNUSED_2 = 2, + NOTICE_UNUSED_3 = 3, + NOTICE_UNUSED_4 = 4, + NOTICE_UNUSED_5 = 5, + NOTICE_UNUSED_6 = 6, + NOTICE_UNUSED_7 = 7, + NOTICE_UNUSED_8 = 8, + NOTICE_UNUSED_9 = 9, + NOTICE_UNUSED_10 = 10, + NOTICE_UNUSED_11 = 11, + NOTICE_UNUSED_12 = 12 + } + + /** FileType enum. */ + enum FileType { + FILE_PROMOTION_ANNOUNCEMENT = 1, + FILE_FEATURE_ANNOUNCEMENT = 4, + FILE_SPAPP_ANNOUNCEMENT = 6 + } + + /** GhostCompetitionParticipantState enum. */ + enum GhostCompetitionParticipantState { + COMPETITION_NOT_PARTICIPATED = 1, + COMPETITION_QUALIFIED = 2, + COMPETITION_PARTICIPATED = 3, + COMPETITION_WON = 4 + } + + /** ScreenshotType enum. */ + enum ScreenshotType { + SS_GHOST_BATTLE = 1, + SS_VERSUS_BATTLE = 2, + SS_TERMINAL = 3, + SS_ACQUIRING_VERSUS_STAR = 4, + SS_ACQUIRING_AURA_MOTIF = 5, + SS_GHOST_REGION_MAP = 6, + SS_ACQUIRING_CROWN = 7, + SS_GHOST_COMPETITION_RESULT = 8, + SS_TIME_ATTACK_RESULT = 9, + SS_LEVEL_UP = 10 + } + + /** TransferState enum. */ + enum TransferState { + NOT_REGISTERED = 0, + NEW_REGISTRATION = 1, + TRANSFER_REQUIRED = 2, + TRANSFERRING = 3, + TRANSFERRED = 4 + } + + /** EventModeSerialErrorCode enum. */ + enum EventModeSerialErrorCode { + SERIAL_SUCCESS = 0, + SERIAL_ATTEMPT_TO_CHANGE = 1, + SERIAL_NO_INPUT = 2, + SERIAL_INVALID = 3, + SERIAL_EXPIRED = 4, + SERIAL_OTHER_PLACE = 5 + } + + /** ClientLogType enum. */ + enum ClientLogType { + LOG_LOAD_REPORT = 0, + LOG_ERROR = 1 + } + + /** SmartphoneAppState enum. */ + enum SmartphoneAppState { + SPAPP_UNREGISTERED = 0, + SPAPP_KTID = 1, + SPAPP_BNID = 2 + } + } +} diff --git a/src/wmmt/message.proto.js b/src/wmmt/message.proto.js new file mode 100644 index 0000000..6b9dacc --- /dev/null +++ b/src/wmmt/message.proto.js @@ -0,0 +1,58500 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +import * as $protobuf from "protobufjs/minimal"; + +// Common aliases +const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +export const wm = $root.wm = (() => { + + /** + * Namespace wm. + * @exports wm + * @namespace + */ + const wm = {}; + + wm.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof wm + * @namespace + */ + const protobuf = {}; + + protobuf.Course = (function() { + + /** + * Properties of a Course. + * @memberof wm.protobuf + * @interface ICourse + * @property {number|null} [episodeId] Course episodeId + * @property {number|null} [timeAttackId] Course timeAttackId + * @property {number|null} [extremeId] Course extremeId + * @property {number|null} [runAreaId] Course runAreaId + * @property {number|null} [startRampId] Course startRampId + * @property {number|null} [timezoneId] Course timezoneId + * @property {number|null} [bgmId] Course bgmId + * @property {boolean|null} [autoSelect] Course autoSelect + * @property {boolean|null} [assistOff] Course assistOff + * @property {number|null} [playerMax] Course playerMax + * @property {string|null} [vsRankList] Course vsRankList + * @property {number|null} [distBase] Course distBase + * @property {number|null} [distAdd] Course distAdd + * @property {number|null} [distBonus] Course distBonus + * @property {number|null} [randomSeed] Course randomSeed + */ + + /** + * Constructs a new Course. + * @memberof wm.protobuf + * @classdesc Represents a Course. + * @implements ICourse + * @constructor + * @param {wm.protobuf.ICourse=} [properties] Properties to set + */ + function Course(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Course episodeId. + * @member {number} episodeId + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.episodeId = 0; + + /** + * Course timeAttackId. + * @member {number} timeAttackId + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.timeAttackId = 0; + + /** + * Course extremeId. + * @member {number} extremeId + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.extremeId = 0; + + /** + * Course runAreaId. + * @member {number} runAreaId + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.runAreaId = 0; + + /** + * Course startRampId. + * @member {number} startRampId + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.startRampId = 0; + + /** + * Course timezoneId. + * @member {number} timezoneId + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.timezoneId = 0; + + /** + * Course bgmId. + * @member {number} bgmId + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.bgmId = 0; + + /** + * Course autoSelect. + * @member {boolean} autoSelect + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.autoSelect = false; + + /** + * Course assistOff. + * @member {boolean} assistOff + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.assistOff = false; + + /** + * Course playerMax. + * @member {number} playerMax + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.playerMax = 0; + + /** + * Course vsRankList. + * @member {string} vsRankList + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.vsRankList = ""; + + /** + * Course distBase. + * @member {number} distBase + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.distBase = 0; + + /** + * Course distAdd. + * @member {number} distAdd + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.distAdd = 0; + + /** + * Course distBonus. + * @member {number} distBonus + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.distBonus = 0; + + /** + * Course randomSeed. + * @member {number} randomSeed + * @memberof wm.protobuf.Course + * @instance + */ + Course.prototype.randomSeed = 0; + + /** + * Creates a new Course instance using the specified properties. + * @function create + * @memberof wm.protobuf.Course + * @static + * @param {wm.protobuf.ICourse=} [properties] Properties to set + * @returns {wm.protobuf.Course} Course instance + */ + Course.create = function create(properties) { + return new Course(properties); + }; + + /** + * Encodes the specified Course message. Does not implicitly {@link wm.protobuf.Course.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Course + * @static + * @param {wm.protobuf.ICourse} message Course message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Course.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.episodeId != null && Object.hasOwnProperty.call(message, "episodeId")) + writer.uint32(/* id 1, wireType 0 =*/8).sint32(message.episodeId); + if (message.timeAttackId != null && Object.hasOwnProperty.call(message, "timeAttackId")) + writer.uint32(/* id 2, wireType 0 =*/16).sint32(message.timeAttackId); + if (message.extremeId != null && Object.hasOwnProperty.call(message, "extremeId")) + writer.uint32(/* id 3, wireType 0 =*/24).sint32(message.extremeId); + if (message.runAreaId != null && Object.hasOwnProperty.call(message, "runAreaId")) + writer.uint32(/* id 4, wireType 0 =*/32).sint32(message.runAreaId); + if (message.startRampId != null && Object.hasOwnProperty.call(message, "startRampId")) + writer.uint32(/* id 5, wireType 0 =*/40).sint32(message.startRampId); + if (message.timezoneId != null && Object.hasOwnProperty.call(message, "timezoneId")) + writer.uint32(/* id 6, wireType 0 =*/48).sint32(message.timezoneId); + if (message.bgmId != null && Object.hasOwnProperty.call(message, "bgmId")) + writer.uint32(/* id 7, wireType 0 =*/56).sint32(message.bgmId); + if (message.autoSelect != null && Object.hasOwnProperty.call(message, "autoSelect")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.autoSelect); + if (message.assistOff != null && Object.hasOwnProperty.call(message, "assistOff")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.assistOff); + if (message.playerMax != null && Object.hasOwnProperty.call(message, "playerMax")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.playerMax); + if (message.vsRankList != null && Object.hasOwnProperty.call(message, "vsRankList")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.vsRankList); + if (message.distBase != null && Object.hasOwnProperty.call(message, "distBase")) + writer.uint32(/* id 12, wireType 5 =*/101).float(message.distBase); + if (message.distAdd != null && Object.hasOwnProperty.call(message, "distAdd")) + writer.uint32(/* id 13, wireType 5 =*/109).float(message.distAdd); + if (message.distBonus != null && Object.hasOwnProperty.call(message, "distBonus")) + writer.uint32(/* id 14, wireType 5 =*/117).float(message.distBonus); + if (message.randomSeed != null && Object.hasOwnProperty.call(message, "randomSeed")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.randomSeed); + return writer; + }; + + /** + * Encodes the specified Course message, length delimited. Does not implicitly {@link wm.protobuf.Course.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Course + * @static + * @param {wm.protobuf.ICourse} message Course message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Course.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Course message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Course + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Course} Course + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Course.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Course(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.episodeId = reader.sint32(); + break; + } + case 2: { + message.timeAttackId = reader.sint32(); + break; + } + case 3: { + message.extremeId = reader.sint32(); + break; + } + case 4: { + message.runAreaId = reader.sint32(); + break; + } + case 5: { + message.startRampId = reader.sint32(); + break; + } + case 6: { + message.timezoneId = reader.sint32(); + break; + } + case 7: { + message.bgmId = reader.sint32(); + break; + } + case 8: { + message.autoSelect = reader.bool(); + break; + } + case 9: { + message.assistOff = reader.bool(); + break; + } + case 10: { + message.playerMax = reader.int32(); + break; + } + case 11: { + message.vsRankList = reader.string(); + break; + } + case 12: { + message.distBase = reader.float(); + break; + } + case 13: { + message.distAdd = reader.float(); + break; + } + case 14: { + message.distBonus = reader.float(); + break; + } + case 15: { + message.randomSeed = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Course message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Course + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Course} Course + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Course.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Course message. + * @function verify + * @memberof wm.protobuf.Course + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Course.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.episodeId != null && message.hasOwnProperty("episodeId")) + if (!$util.isInteger(message.episodeId)) + return "episodeId: integer expected"; + if (message.timeAttackId != null && message.hasOwnProperty("timeAttackId")) + if (!$util.isInteger(message.timeAttackId)) + return "timeAttackId: integer expected"; + if (message.extremeId != null && message.hasOwnProperty("extremeId")) + if (!$util.isInteger(message.extremeId)) + return "extremeId: integer expected"; + if (message.runAreaId != null && message.hasOwnProperty("runAreaId")) + if (!$util.isInteger(message.runAreaId)) + return "runAreaId: integer expected"; + if (message.startRampId != null && message.hasOwnProperty("startRampId")) + if (!$util.isInteger(message.startRampId)) + return "startRampId: integer expected"; + if (message.timezoneId != null && message.hasOwnProperty("timezoneId")) + if (!$util.isInteger(message.timezoneId)) + return "timezoneId: integer expected"; + if (message.bgmId != null && message.hasOwnProperty("bgmId")) + if (!$util.isInteger(message.bgmId)) + return "bgmId: integer expected"; + if (message.autoSelect != null && message.hasOwnProperty("autoSelect")) + if (typeof message.autoSelect !== "boolean") + return "autoSelect: boolean expected"; + if (message.assistOff != null && message.hasOwnProperty("assistOff")) + if (typeof message.assistOff !== "boolean") + return "assistOff: boolean expected"; + if (message.playerMax != null && message.hasOwnProperty("playerMax")) + if (!$util.isInteger(message.playerMax)) + return "playerMax: integer expected"; + if (message.vsRankList != null && message.hasOwnProperty("vsRankList")) + if (!$util.isString(message.vsRankList)) + return "vsRankList: string expected"; + if (message.distBase != null && message.hasOwnProperty("distBase")) + if (typeof message.distBase !== "number") + return "distBase: number expected"; + if (message.distAdd != null && message.hasOwnProperty("distAdd")) + if (typeof message.distAdd !== "number") + return "distAdd: number expected"; + if (message.distBonus != null && message.hasOwnProperty("distBonus")) + if (typeof message.distBonus !== "number") + return "distBonus: number expected"; + if (message.randomSeed != null && message.hasOwnProperty("randomSeed")) + if (!$util.isInteger(message.randomSeed)) + return "randomSeed: integer expected"; + return null; + }; + + /** + * Creates a Course message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Course + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Course} Course + */ + Course.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Course) + return object; + let message = new $root.wm.protobuf.Course(); + if (object.episodeId != null) + message.episodeId = object.episodeId | 0; + if (object.timeAttackId != null) + message.timeAttackId = object.timeAttackId | 0; + if (object.extremeId != null) + message.extremeId = object.extremeId | 0; + if (object.runAreaId != null) + message.runAreaId = object.runAreaId | 0; + if (object.startRampId != null) + message.startRampId = object.startRampId | 0; + if (object.timezoneId != null) + message.timezoneId = object.timezoneId | 0; + if (object.bgmId != null) + message.bgmId = object.bgmId | 0; + if (object.autoSelect != null) + message.autoSelect = Boolean(object.autoSelect); + if (object.assistOff != null) + message.assistOff = Boolean(object.assistOff); + if (object.playerMax != null) + message.playerMax = object.playerMax | 0; + if (object.vsRankList != null) + message.vsRankList = String(object.vsRankList); + if (object.distBase != null) + message.distBase = Number(object.distBase); + if (object.distAdd != null) + message.distAdd = Number(object.distAdd); + if (object.distBonus != null) + message.distBonus = Number(object.distBonus); + if (object.randomSeed != null) + message.randomSeed = object.randomSeed | 0; + return message; + }; + + /** + * Creates a plain object from a Course message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Course + * @static + * @param {wm.protobuf.Course} message Course + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Course.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.episodeId = 0; + object.timeAttackId = 0; + object.extremeId = 0; + object.runAreaId = 0; + object.startRampId = 0; + object.timezoneId = 0; + object.bgmId = 0; + object.autoSelect = false; + object.assistOff = false; + object.playerMax = 0; + object.vsRankList = ""; + object.distBase = 0; + object.distAdd = 0; + object.distBonus = 0; + object.randomSeed = 0; + } + if (message.episodeId != null && message.hasOwnProperty("episodeId")) + object.episodeId = message.episodeId; + if (message.timeAttackId != null && message.hasOwnProperty("timeAttackId")) + object.timeAttackId = message.timeAttackId; + if (message.extremeId != null && message.hasOwnProperty("extremeId")) + object.extremeId = message.extremeId; + if (message.runAreaId != null && message.hasOwnProperty("runAreaId")) + object.runAreaId = message.runAreaId; + if (message.startRampId != null && message.hasOwnProperty("startRampId")) + object.startRampId = message.startRampId; + if (message.timezoneId != null && message.hasOwnProperty("timezoneId")) + object.timezoneId = message.timezoneId; + if (message.bgmId != null && message.hasOwnProperty("bgmId")) + object.bgmId = message.bgmId; + if (message.autoSelect != null && message.hasOwnProperty("autoSelect")) + object.autoSelect = message.autoSelect; + if (message.assistOff != null && message.hasOwnProperty("assistOff")) + object.assistOff = message.assistOff; + if (message.playerMax != null && message.hasOwnProperty("playerMax")) + object.playerMax = message.playerMax; + if (message.vsRankList != null && message.hasOwnProperty("vsRankList")) + object.vsRankList = message.vsRankList; + if (message.distBase != null && message.hasOwnProperty("distBase")) + object.distBase = options.json && !isFinite(message.distBase) ? String(message.distBase) : message.distBase; + if (message.distAdd != null && message.hasOwnProperty("distAdd")) + object.distAdd = options.json && !isFinite(message.distAdd) ? String(message.distAdd) : message.distAdd; + if (message.distBonus != null && message.hasOwnProperty("distBonus")) + object.distBonus = options.json && !isFinite(message.distBonus) ? String(message.distBonus) : message.distBonus; + if (message.randomSeed != null && message.hasOwnProperty("randomSeed")) + object.randomSeed = message.randomSeed; + return object; + }; + + /** + * Converts this Course to JSON. + * @function toJSON + * @memberof wm.protobuf.Course + * @instance + * @returns {Object.} JSON object + */ + Course.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Course + * @function getTypeUrl + * @memberof wm.protobuf.Course + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Course.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Course"; + }; + + return Course; + })(); + + protobuf.HeartBeat = (function() { + + /** + * Properties of a HeartBeat. + * @memberof wm.protobuf + * @interface IHeartBeat + * @property {number|null} [frameNumber] HeartBeat frameNumber + * @property {string|null} [pcbSerial] HeartBeat pcbSerial + * @property {number|null} [serverComm] HeartBeat serverComm + */ + + /** + * Constructs a new HeartBeat. + * @memberof wm.protobuf + * @classdesc Represents a HeartBeat. + * @implements IHeartBeat + * @constructor + * @param {wm.protobuf.IHeartBeat=} [properties] Properties to set + */ + function HeartBeat(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HeartBeat frameNumber. + * @member {number} frameNumber + * @memberof wm.protobuf.HeartBeat + * @instance + */ + HeartBeat.prototype.frameNumber = 0; + + /** + * HeartBeat pcbSerial. + * @member {string} pcbSerial + * @memberof wm.protobuf.HeartBeat + * @instance + */ + HeartBeat.prototype.pcbSerial = ""; + + /** + * HeartBeat serverComm. + * @member {number} serverComm + * @memberof wm.protobuf.HeartBeat + * @instance + */ + HeartBeat.prototype.serverComm = 0; + + /** + * Creates a new HeartBeat instance using the specified properties. + * @function create + * @memberof wm.protobuf.HeartBeat + * @static + * @param {wm.protobuf.IHeartBeat=} [properties] Properties to set + * @returns {wm.protobuf.HeartBeat} HeartBeat instance + */ + HeartBeat.create = function create(properties) { + return new HeartBeat(properties); + }; + + /** + * Encodes the specified HeartBeat message. Does not implicitly {@link wm.protobuf.HeartBeat.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.HeartBeat + * @static + * @param {wm.protobuf.IHeartBeat} message HeartBeat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeartBeat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.frameNumber != null && Object.hasOwnProperty.call(message, "frameNumber")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.frameNumber); + if (message.pcbSerial != null && Object.hasOwnProperty.call(message, "pcbSerial")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pcbSerial); + if (message.serverComm != null && Object.hasOwnProperty.call(message, "serverComm")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.serverComm); + return writer; + }; + + /** + * Encodes the specified HeartBeat message, length delimited. Does not implicitly {@link wm.protobuf.HeartBeat.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.HeartBeat + * @static + * @param {wm.protobuf.IHeartBeat} message HeartBeat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeartBeat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HeartBeat message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.HeartBeat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.HeartBeat} HeartBeat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HeartBeat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.HeartBeat(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.frameNumber = reader.uint32(); + break; + } + case 2: { + message.pcbSerial = reader.string(); + break; + } + case 3: { + message.serverComm = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HeartBeat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.HeartBeat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.HeartBeat} HeartBeat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HeartBeat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HeartBeat message. + * @function verify + * @memberof wm.protobuf.HeartBeat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HeartBeat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.frameNumber != null && message.hasOwnProperty("frameNumber")) + if (!$util.isInteger(message.frameNumber)) + return "frameNumber: integer expected"; + if (message.pcbSerial != null && message.hasOwnProperty("pcbSerial")) + if (!$util.isString(message.pcbSerial)) + return "pcbSerial: string expected"; + if (message.serverComm != null && message.hasOwnProperty("serverComm")) + if (!$util.isInteger(message.serverComm)) + return "serverComm: integer expected"; + return null; + }; + + /** + * Creates a HeartBeat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.HeartBeat + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.HeartBeat} HeartBeat + */ + HeartBeat.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.HeartBeat) + return object; + let message = new $root.wm.protobuf.HeartBeat(); + if (object.frameNumber != null) + message.frameNumber = object.frameNumber >>> 0; + if (object.pcbSerial != null) + message.pcbSerial = String(object.pcbSerial); + if (object.serverComm != null) + message.serverComm = object.serverComm | 0; + return message; + }; + + /** + * Creates a plain object from a HeartBeat message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.HeartBeat + * @static + * @param {wm.protobuf.HeartBeat} message HeartBeat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HeartBeat.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.frameNumber = 0; + object.pcbSerial = ""; + object.serverComm = 0; + } + if (message.frameNumber != null && message.hasOwnProperty("frameNumber")) + object.frameNumber = message.frameNumber; + if (message.pcbSerial != null && message.hasOwnProperty("pcbSerial")) + object.pcbSerial = message.pcbSerial; + if (message.serverComm != null && message.hasOwnProperty("serverComm")) + object.serverComm = message.serverComm; + return object; + }; + + /** + * Converts this HeartBeat to JSON. + * @function toJSON + * @memberof wm.protobuf.HeartBeat + * @instance + * @returns {Object.} JSON object + */ + HeartBeat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HeartBeat + * @function getTypeUrl + * @memberof wm.protobuf.HeartBeat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HeartBeat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.HeartBeat"; + }; + + return HeartBeat; + })(); + + protobuf.DriveCabinetState = (function() { + + /** + * Properties of a DriveCabinetState. + * @memberof wm.protobuf + * @interface IDriveCabinetState + * @property {number|null} [iccardRwState] DriveCabinetState iccardRwState + * @property {number|null} [venderState] DriveCabinetState venderState + * @property {number|null} [ffbState] DriveCabinetState ffbState + * @property {number|null} [allnetAttestation] DriveCabinetState allnetAttestation + * @property {number|null} [updateAttestation] DriveCabinetState updateAttestation + * @property {number|null} [softwareRevision] DriveCabinetState softwareRevision + * @property {number|null} [downloadState] DriveCabinetState downloadState + * @property {number|null} [downloadRevision] DriveCabinetState downloadRevision + * @property {number|null} [downloadProgress] DriveCabinetState downloadProgress + * @property {number|null} [updateRevision] DriveCabinetState updateRevision + * @property {number|null} [eventMode] DriveCabinetState eventMode + * @property {number|null} [eventModeDist] DriveCabinetState eventModeDist + * @property {number|null} [eventMode_2on2] DriveCabinetState eventMode_2on2 + */ + + /** + * Constructs a new DriveCabinetState. + * @memberof wm.protobuf + * @classdesc Represents a DriveCabinetState. + * @implements IDriveCabinetState + * @constructor + * @param {wm.protobuf.IDriveCabinetState=} [properties] Properties to set + */ + function DriveCabinetState(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DriveCabinetState iccardRwState. + * @member {number} iccardRwState + * @memberof wm.protobuf.DriveCabinetState + * @instance + */ + DriveCabinetState.prototype.iccardRwState = 0; + + /** + * DriveCabinetState venderState. + * @member {number} venderState + * @memberof wm.protobuf.DriveCabinetState + * @instance + */ + DriveCabinetState.prototype.venderState = 0; + + /** + * DriveCabinetState ffbState. + * @member {number} ffbState + * @memberof wm.protobuf.DriveCabinetState + * @instance + */ + DriveCabinetState.prototype.ffbState = 0; + + /** + * DriveCabinetState allnetAttestation. + * @member {number} allnetAttestation + * @memberof wm.protobuf.DriveCabinetState + * @instance + */ + DriveCabinetState.prototype.allnetAttestation = 0; + + /** + * DriveCabinetState updateAttestation. + * @member {number} updateAttestation + * @memberof wm.protobuf.DriveCabinetState + * @instance + */ + DriveCabinetState.prototype.updateAttestation = 0; + + /** + * DriveCabinetState softwareRevision. + * @member {number} softwareRevision + * @memberof wm.protobuf.DriveCabinetState + * @instance + */ + DriveCabinetState.prototype.softwareRevision = 0; + + /** + * DriveCabinetState downloadState. + * @member {number} downloadState + * @memberof wm.protobuf.DriveCabinetState + * @instance + */ + DriveCabinetState.prototype.downloadState = 0; + + /** + * DriveCabinetState downloadRevision. + * @member {number} downloadRevision + * @memberof wm.protobuf.DriveCabinetState + * @instance + */ + DriveCabinetState.prototype.downloadRevision = 0; + + /** + * DriveCabinetState downloadProgress. + * @member {number} downloadProgress + * @memberof wm.protobuf.DriveCabinetState + * @instance + */ + DriveCabinetState.prototype.downloadProgress = 0; + + /** + * DriveCabinetState updateRevision. + * @member {number} updateRevision + * @memberof wm.protobuf.DriveCabinetState + * @instance + */ + DriveCabinetState.prototype.updateRevision = 0; + + /** + * DriveCabinetState eventMode. + * @member {number} eventMode + * @memberof wm.protobuf.DriveCabinetState + * @instance + */ + DriveCabinetState.prototype.eventMode = 0; + + /** + * DriveCabinetState eventModeDist. + * @member {number} eventModeDist + * @memberof wm.protobuf.DriveCabinetState + * @instance + */ + DriveCabinetState.prototype.eventModeDist = 0; + + /** + * DriveCabinetState eventMode_2on2. + * @member {number} eventMode_2on2 + * @memberof wm.protobuf.DriveCabinetState + * @instance + */ + DriveCabinetState.prototype.eventMode_2on2 = 0; + + /** + * Creates a new DriveCabinetState instance using the specified properties. + * @function create + * @memberof wm.protobuf.DriveCabinetState + * @static + * @param {wm.protobuf.IDriveCabinetState=} [properties] Properties to set + * @returns {wm.protobuf.DriveCabinetState} DriveCabinetState instance + */ + DriveCabinetState.create = function create(properties) { + return new DriveCabinetState(properties); + }; + + /** + * Encodes the specified DriveCabinetState message. Does not implicitly {@link wm.protobuf.DriveCabinetState.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.DriveCabinetState + * @static + * @param {wm.protobuf.IDriveCabinetState} message DriveCabinetState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DriveCabinetState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.iccardRwState != null && Object.hasOwnProperty.call(message, "iccardRwState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.iccardRwState); + if (message.venderState != null && Object.hasOwnProperty.call(message, "venderState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.venderState); + if (message.ffbState != null && Object.hasOwnProperty.call(message, "ffbState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.ffbState); + if (message.allnetAttestation != null && Object.hasOwnProperty.call(message, "allnetAttestation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.allnetAttestation); + if (message.updateAttestation != null && Object.hasOwnProperty.call(message, "updateAttestation")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.updateAttestation); + if (message.softwareRevision != null && Object.hasOwnProperty.call(message, "softwareRevision")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.softwareRevision); + if (message.downloadState != null && Object.hasOwnProperty.call(message, "downloadState")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.downloadState); + if (message.downloadRevision != null && Object.hasOwnProperty.call(message, "downloadRevision")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.downloadRevision); + if (message.downloadProgress != null && Object.hasOwnProperty.call(message, "downloadProgress")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.downloadProgress); + if (message.updateRevision != null && Object.hasOwnProperty.call(message, "updateRevision")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.updateRevision); + if (message.eventMode != null && Object.hasOwnProperty.call(message, "eventMode")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.eventMode); + if (message.eventModeDist != null && Object.hasOwnProperty.call(message, "eventModeDist")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.eventModeDist); + if (message.eventMode_2on2 != null && Object.hasOwnProperty.call(message, "eventMode_2on2")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.eventMode_2on2); + return writer; + }; + + /** + * Encodes the specified DriveCabinetState message, length delimited. Does not implicitly {@link wm.protobuf.DriveCabinetState.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.DriveCabinetState + * @static + * @param {wm.protobuf.IDriveCabinetState} message DriveCabinetState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DriveCabinetState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DriveCabinetState message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.DriveCabinetState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.DriveCabinetState} DriveCabinetState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DriveCabinetState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.DriveCabinetState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.iccardRwState = reader.int32(); + break; + } + case 2: { + message.venderState = reader.int32(); + break; + } + case 3: { + message.ffbState = reader.int32(); + break; + } + case 4: { + message.allnetAttestation = reader.int32(); + break; + } + case 5: { + message.updateAttestation = reader.int32(); + break; + } + case 6: { + message.softwareRevision = reader.int32(); + break; + } + case 7: { + message.downloadState = reader.int32(); + break; + } + case 8: { + message.downloadRevision = reader.int32(); + break; + } + case 9: { + message.downloadProgress = reader.int32(); + break; + } + case 10: { + message.updateRevision = reader.int32(); + break; + } + case 11: { + message.eventMode = reader.int32(); + break; + } + case 12: { + message.eventModeDist = reader.int32(); + break; + } + case 13: { + message.eventMode_2on2 = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DriveCabinetState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.DriveCabinetState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.DriveCabinetState} DriveCabinetState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DriveCabinetState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DriveCabinetState message. + * @function verify + * @memberof wm.protobuf.DriveCabinetState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DriveCabinetState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.iccardRwState != null && message.hasOwnProperty("iccardRwState")) + if (!$util.isInteger(message.iccardRwState)) + return "iccardRwState: integer expected"; + if (message.venderState != null && message.hasOwnProperty("venderState")) + if (!$util.isInteger(message.venderState)) + return "venderState: integer expected"; + if (message.ffbState != null && message.hasOwnProperty("ffbState")) + if (!$util.isInteger(message.ffbState)) + return "ffbState: integer expected"; + if (message.allnetAttestation != null && message.hasOwnProperty("allnetAttestation")) + if (!$util.isInteger(message.allnetAttestation)) + return "allnetAttestation: integer expected"; + if (message.updateAttestation != null && message.hasOwnProperty("updateAttestation")) + if (!$util.isInteger(message.updateAttestation)) + return "updateAttestation: integer expected"; + if (message.softwareRevision != null && message.hasOwnProperty("softwareRevision")) + if (!$util.isInteger(message.softwareRevision)) + return "softwareRevision: integer expected"; + if (message.downloadState != null && message.hasOwnProperty("downloadState")) + if (!$util.isInteger(message.downloadState)) + return "downloadState: integer expected"; + if (message.downloadRevision != null && message.hasOwnProperty("downloadRevision")) + if (!$util.isInteger(message.downloadRevision)) + return "downloadRevision: integer expected"; + if (message.downloadProgress != null && message.hasOwnProperty("downloadProgress")) + if (!$util.isInteger(message.downloadProgress)) + return "downloadProgress: integer expected"; + if (message.updateRevision != null && message.hasOwnProperty("updateRevision")) + if (!$util.isInteger(message.updateRevision)) + return "updateRevision: integer expected"; + if (message.eventMode != null && message.hasOwnProperty("eventMode")) + if (!$util.isInteger(message.eventMode)) + return "eventMode: integer expected"; + if (message.eventModeDist != null && message.hasOwnProperty("eventModeDist")) + if (!$util.isInteger(message.eventModeDist)) + return "eventModeDist: integer expected"; + if (message.eventMode_2on2 != null && message.hasOwnProperty("eventMode_2on2")) + if (!$util.isInteger(message.eventMode_2on2)) + return "eventMode_2on2: integer expected"; + return null; + }; + + /** + * Creates a DriveCabinetState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.DriveCabinetState + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.DriveCabinetState} DriveCabinetState + */ + DriveCabinetState.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.DriveCabinetState) + return object; + let message = new $root.wm.protobuf.DriveCabinetState(); + if (object.iccardRwState != null) + message.iccardRwState = object.iccardRwState | 0; + if (object.venderState != null) + message.venderState = object.venderState | 0; + if (object.ffbState != null) + message.ffbState = object.ffbState | 0; + if (object.allnetAttestation != null) + message.allnetAttestation = object.allnetAttestation | 0; + if (object.updateAttestation != null) + message.updateAttestation = object.updateAttestation | 0; + if (object.softwareRevision != null) + message.softwareRevision = object.softwareRevision | 0; + if (object.downloadState != null) + message.downloadState = object.downloadState | 0; + if (object.downloadRevision != null) + message.downloadRevision = object.downloadRevision | 0; + if (object.downloadProgress != null) + message.downloadProgress = object.downloadProgress | 0; + if (object.updateRevision != null) + message.updateRevision = object.updateRevision | 0; + if (object.eventMode != null) + message.eventMode = object.eventMode | 0; + if (object.eventModeDist != null) + message.eventModeDist = object.eventModeDist | 0; + if (object.eventMode_2on2 != null) + message.eventMode_2on2 = object.eventMode_2on2 | 0; + return message; + }; + + /** + * Creates a plain object from a DriveCabinetState message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.DriveCabinetState + * @static + * @param {wm.protobuf.DriveCabinetState} message DriveCabinetState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DriveCabinetState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.iccardRwState = 0; + object.venderState = 0; + object.ffbState = 0; + object.allnetAttestation = 0; + object.updateAttestation = 0; + object.softwareRevision = 0; + object.downloadState = 0; + object.downloadRevision = 0; + object.downloadProgress = 0; + object.updateRevision = 0; + object.eventMode = 0; + object.eventModeDist = 0; + object.eventMode_2on2 = 0; + } + if (message.iccardRwState != null && message.hasOwnProperty("iccardRwState")) + object.iccardRwState = message.iccardRwState; + if (message.venderState != null && message.hasOwnProperty("venderState")) + object.venderState = message.venderState; + if (message.ffbState != null && message.hasOwnProperty("ffbState")) + object.ffbState = message.ffbState; + if (message.allnetAttestation != null && message.hasOwnProperty("allnetAttestation")) + object.allnetAttestation = message.allnetAttestation; + if (message.updateAttestation != null && message.hasOwnProperty("updateAttestation")) + object.updateAttestation = message.updateAttestation; + if (message.softwareRevision != null && message.hasOwnProperty("softwareRevision")) + object.softwareRevision = message.softwareRevision; + if (message.downloadState != null && message.hasOwnProperty("downloadState")) + object.downloadState = message.downloadState; + if (message.downloadRevision != null && message.hasOwnProperty("downloadRevision")) + object.downloadRevision = message.downloadRevision; + if (message.downloadProgress != null && message.hasOwnProperty("downloadProgress")) + object.downloadProgress = message.downloadProgress; + if (message.updateRevision != null && message.hasOwnProperty("updateRevision")) + object.updateRevision = message.updateRevision; + if (message.eventMode != null && message.hasOwnProperty("eventMode")) + object.eventMode = message.eventMode; + if (message.eventModeDist != null && message.hasOwnProperty("eventModeDist")) + object.eventModeDist = message.eventModeDist; + if (message.eventMode_2on2 != null && message.hasOwnProperty("eventMode_2on2")) + object.eventMode_2on2 = message.eventMode_2on2; + return object; + }; + + /** + * Converts this DriveCabinetState to JSON. + * @function toJSON + * @memberof wm.protobuf.DriveCabinetState + * @instance + * @returns {Object.} JSON object + */ + DriveCabinetState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DriveCabinetState + * @function getTypeUrl + * @memberof wm.protobuf.DriveCabinetState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DriveCabinetState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.DriveCabinetState"; + }; + + return DriveCabinetState; + })(); + + protobuf.BatchSetting = (function() { + + /** + * Properties of a BatchSetting. + * @memberof wm.protobuf + * @interface IBatchSetting + * @property {number|null} [coinChute] BatchSetting coinChute + * @property {number|null} [buycardCost] BatchSetting buycardCost + * @property {number|null} [gameCost] BatchSetting gameCost + * @property {number|null} [continueCost] BatchSetting continueCost + * @property {number|null} [fullcourseCost] BatchSetting fullcourseCost + * @property {number|null} [freeplay] BatchSetting freeplay + * @property {number|null} [winsAndRemains] BatchSetting winsAndRemains + * @property {number|null} [eventMode] BatchSetting eventMode + * @property {number|null} [eventModeDist] BatchSetting eventModeDist + * @property {number|null} [closeType] BatchSetting closeType + * @property {number|null} [closeSun] BatchSetting closeSun + * @property {number|null} [closeMon] BatchSetting closeMon + * @property {number|null} [closeTue] BatchSetting closeTue + * @property {number|null} [closeWed] BatchSetting closeWed + * @property {number|null} [closeThu] BatchSetting closeThu + * @property {number|null} [closeFri] BatchSetting closeFri + * @property {number|null} [closeSat] BatchSetting closeSat + * @property {number|null} [closeDay] BatchSetting closeDay + * @property {number|null} [softwareRevision] BatchSetting softwareRevision + * @property {number|null} [syncTime] BatchSetting syncTime + * @property {number|null} [eventModeCount] BatchSetting eventModeCount + * @property {number|null} [timeZoneType] BatchSetting timeZoneType + * @property {number|null} [timeDayLight] BatchSetting timeDayLight + * @property {number|null} [clockOffset] BatchSetting clockOffset + * @property {string|null} [eventModeSerial] BatchSetting eventModeSerial + * @property {number|null} [eventModeSerialEndAt] BatchSetting eventModeSerialEndAt + * @property {number|null} [eventModeSerialErrorcode] BatchSetting eventModeSerialErrorcode + * @property {number|null} [eventMode_2on2] BatchSetting eventMode_2on2 + * @property {number|null} [wasTournamentScheduleSet] BatchSetting wasTournamentScheduleSet + */ + + /** + * Constructs a new BatchSetting. + * @memberof wm.protobuf + * @classdesc Represents a BatchSetting. + * @implements IBatchSetting + * @constructor + * @param {wm.protobuf.IBatchSetting=} [properties] Properties to set + */ + function BatchSetting(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchSetting coinChute. + * @member {number} coinChute + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.coinChute = 0; + + /** + * BatchSetting buycardCost. + * @member {number} buycardCost + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.buycardCost = 0; + + /** + * BatchSetting gameCost. + * @member {number} gameCost + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.gameCost = 0; + + /** + * BatchSetting continueCost. + * @member {number} continueCost + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.continueCost = 0; + + /** + * BatchSetting fullcourseCost. + * @member {number} fullcourseCost + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.fullcourseCost = 0; + + /** + * BatchSetting freeplay. + * @member {number} freeplay + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.freeplay = 0; + + /** + * BatchSetting winsAndRemains. + * @member {number} winsAndRemains + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.winsAndRemains = 0; + + /** + * BatchSetting eventMode. + * @member {number} eventMode + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.eventMode = 0; + + /** + * BatchSetting eventModeDist. + * @member {number} eventModeDist + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.eventModeDist = 0; + + /** + * BatchSetting closeType. + * @member {number} closeType + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.closeType = 0; + + /** + * BatchSetting closeSun. + * @member {number} closeSun + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.closeSun = 0; + + /** + * BatchSetting closeMon. + * @member {number} closeMon + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.closeMon = 0; + + /** + * BatchSetting closeTue. + * @member {number} closeTue + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.closeTue = 0; + + /** + * BatchSetting closeWed. + * @member {number} closeWed + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.closeWed = 0; + + /** + * BatchSetting closeThu. + * @member {number} closeThu + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.closeThu = 0; + + /** + * BatchSetting closeFri. + * @member {number} closeFri + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.closeFri = 0; + + /** + * BatchSetting closeSat. + * @member {number} closeSat + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.closeSat = 0; + + /** + * BatchSetting closeDay. + * @member {number} closeDay + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.closeDay = 0; + + /** + * BatchSetting softwareRevision. + * @member {number} softwareRevision + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.softwareRevision = 0; + + /** + * BatchSetting syncTime. + * @member {number} syncTime + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.syncTime = 0; + + /** + * BatchSetting eventModeCount. + * @member {number} eventModeCount + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.eventModeCount = 0; + + /** + * BatchSetting timeZoneType. + * @member {number} timeZoneType + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.timeZoneType = 0; + + /** + * BatchSetting timeDayLight. + * @member {number} timeDayLight + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.timeDayLight = 0; + + /** + * BatchSetting clockOffset. + * @member {number} clockOffset + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.clockOffset = 0; + + /** + * BatchSetting eventModeSerial. + * @member {string} eventModeSerial + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.eventModeSerial = ""; + + /** + * BatchSetting eventModeSerialEndAt. + * @member {number} eventModeSerialEndAt + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.eventModeSerialEndAt = 0; + + /** + * BatchSetting eventModeSerialErrorcode. + * @member {number} eventModeSerialErrorcode + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.eventModeSerialErrorcode = 0; + + /** + * BatchSetting eventMode_2on2. + * @member {number} eventMode_2on2 + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.eventMode_2on2 = 0; + + /** + * BatchSetting wasTournamentScheduleSet. + * @member {number} wasTournamentScheduleSet + * @memberof wm.protobuf.BatchSetting + * @instance + */ + BatchSetting.prototype.wasTournamentScheduleSet = 0; + + /** + * Creates a new BatchSetting instance using the specified properties. + * @function create + * @memberof wm.protobuf.BatchSetting + * @static + * @param {wm.protobuf.IBatchSetting=} [properties] Properties to set + * @returns {wm.protobuf.BatchSetting} BatchSetting instance + */ + BatchSetting.create = function create(properties) { + return new BatchSetting(properties); + }; + + /** + * Encodes the specified BatchSetting message. Does not implicitly {@link wm.protobuf.BatchSetting.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.BatchSetting + * @static + * @param {wm.protobuf.IBatchSetting} message BatchSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.coinChute != null && Object.hasOwnProperty.call(message, "coinChute")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.coinChute); + if (message.buycardCost != null && Object.hasOwnProperty.call(message, "buycardCost")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.buycardCost); + if (message.gameCost != null && Object.hasOwnProperty.call(message, "gameCost")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.gameCost); + if (message.continueCost != null && Object.hasOwnProperty.call(message, "continueCost")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.continueCost); + if (message.fullcourseCost != null && Object.hasOwnProperty.call(message, "fullcourseCost")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.fullcourseCost); + if (message.freeplay != null && Object.hasOwnProperty.call(message, "freeplay")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.freeplay); + if (message.winsAndRemains != null && Object.hasOwnProperty.call(message, "winsAndRemains")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.winsAndRemains); + if (message.eventMode != null && Object.hasOwnProperty.call(message, "eventMode")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.eventMode); + if (message.eventModeDist != null && Object.hasOwnProperty.call(message, "eventModeDist")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.eventModeDist); + if (message.closeType != null && Object.hasOwnProperty.call(message, "closeType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.closeType); + if (message.closeSun != null && Object.hasOwnProperty.call(message, "closeSun")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.closeSun); + if (message.closeMon != null && Object.hasOwnProperty.call(message, "closeMon")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.closeMon); + if (message.closeTue != null && Object.hasOwnProperty.call(message, "closeTue")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.closeTue); + if (message.closeWed != null && Object.hasOwnProperty.call(message, "closeWed")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.closeWed); + if (message.closeThu != null && Object.hasOwnProperty.call(message, "closeThu")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.closeThu); + if (message.closeFri != null && Object.hasOwnProperty.call(message, "closeFri")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.closeFri); + if (message.closeSat != null && Object.hasOwnProperty.call(message, "closeSat")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.closeSat); + if (message.closeDay != null && Object.hasOwnProperty.call(message, "closeDay")) + writer.uint32(/* id 18, wireType 0 =*/144).int32(message.closeDay); + if (message.softwareRevision != null && Object.hasOwnProperty.call(message, "softwareRevision")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.softwareRevision); + if (message.syncTime != null && Object.hasOwnProperty.call(message, "syncTime")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.syncTime); + if (message.eventModeCount != null && Object.hasOwnProperty.call(message, "eventModeCount")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.eventModeCount); + if (message.timeZoneType != null && Object.hasOwnProperty.call(message, "timeZoneType")) + writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.timeZoneType); + if (message.timeDayLight != null && Object.hasOwnProperty.call(message, "timeDayLight")) + writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.timeDayLight); + if (message.clockOffset != null && Object.hasOwnProperty.call(message, "clockOffset")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.clockOffset); + if (message.eventModeSerial != null && Object.hasOwnProperty.call(message, "eventModeSerial")) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.eventModeSerial); + if (message.eventModeSerialEndAt != null && Object.hasOwnProperty.call(message, "eventModeSerialEndAt")) + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.eventModeSerialEndAt); + if (message.eventModeSerialErrorcode != null && Object.hasOwnProperty.call(message, "eventModeSerialErrorcode")) + writer.uint32(/* id 27, wireType 0 =*/216).int32(message.eventModeSerialErrorcode); + if (message.eventMode_2on2 != null && Object.hasOwnProperty.call(message, "eventMode_2on2")) + writer.uint32(/* id 28, wireType 0 =*/224).int32(message.eventMode_2on2); + if (message.wasTournamentScheduleSet != null && Object.hasOwnProperty.call(message, "wasTournamentScheduleSet")) + writer.uint32(/* id 29, wireType 0 =*/232).int32(message.wasTournamentScheduleSet); + return writer; + }; + + /** + * Encodes the specified BatchSetting message, length delimited. Does not implicitly {@link wm.protobuf.BatchSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.BatchSetting + * @static + * @param {wm.protobuf.IBatchSetting} message BatchSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchSetting message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.BatchSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.BatchSetting} BatchSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.BatchSetting(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.coinChute = reader.int32(); + break; + } + case 2: { + message.buycardCost = reader.int32(); + break; + } + case 3: { + message.gameCost = reader.int32(); + break; + } + case 4: { + message.continueCost = reader.int32(); + break; + } + case 5: { + message.fullcourseCost = reader.int32(); + break; + } + case 6: { + message.freeplay = reader.int32(); + break; + } + case 7: { + message.winsAndRemains = reader.int32(); + break; + } + case 8: { + message.eventMode = reader.int32(); + break; + } + case 9: { + message.eventModeDist = reader.int32(); + break; + } + case 10: { + message.closeType = reader.int32(); + break; + } + case 11: { + message.closeSun = reader.int32(); + break; + } + case 12: { + message.closeMon = reader.int32(); + break; + } + case 13: { + message.closeTue = reader.int32(); + break; + } + case 14: { + message.closeWed = reader.int32(); + break; + } + case 15: { + message.closeThu = reader.int32(); + break; + } + case 16: { + message.closeFri = reader.int32(); + break; + } + case 17: { + message.closeSat = reader.int32(); + break; + } + case 18: { + message.closeDay = reader.int32(); + break; + } + case 19: { + message.softwareRevision = reader.int32(); + break; + } + case 20: { + message.syncTime = reader.int32(); + break; + } + case 21: { + message.eventModeCount = reader.int32(); + break; + } + case 22: { + message.timeZoneType = reader.uint32(); + break; + } + case 23: { + message.timeDayLight = reader.uint32(); + break; + } + case 24: { + message.clockOffset = reader.int32(); + break; + } + case 25: { + message.eventModeSerial = reader.string(); + break; + } + case 26: { + message.eventModeSerialEndAt = reader.uint32(); + break; + } + case 27: { + message.eventModeSerialErrorcode = reader.int32(); + break; + } + case 28: { + message.eventMode_2on2 = reader.int32(); + break; + } + case 29: { + message.wasTournamentScheduleSet = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.BatchSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.BatchSetting} BatchSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchSetting message. + * @function verify + * @memberof wm.protobuf.BatchSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.coinChute != null && message.hasOwnProperty("coinChute")) + if (!$util.isInteger(message.coinChute)) + return "coinChute: integer expected"; + if (message.buycardCost != null && message.hasOwnProperty("buycardCost")) + if (!$util.isInteger(message.buycardCost)) + return "buycardCost: integer expected"; + if (message.gameCost != null && message.hasOwnProperty("gameCost")) + if (!$util.isInteger(message.gameCost)) + return "gameCost: integer expected"; + if (message.continueCost != null && message.hasOwnProperty("continueCost")) + if (!$util.isInteger(message.continueCost)) + return "continueCost: integer expected"; + if (message.fullcourseCost != null && message.hasOwnProperty("fullcourseCost")) + if (!$util.isInteger(message.fullcourseCost)) + return "fullcourseCost: integer expected"; + if (message.freeplay != null && message.hasOwnProperty("freeplay")) + if (!$util.isInteger(message.freeplay)) + return "freeplay: integer expected"; + if (message.winsAndRemains != null && message.hasOwnProperty("winsAndRemains")) + if (!$util.isInteger(message.winsAndRemains)) + return "winsAndRemains: integer expected"; + if (message.eventMode != null && message.hasOwnProperty("eventMode")) + if (!$util.isInteger(message.eventMode)) + return "eventMode: integer expected"; + if (message.eventModeDist != null && message.hasOwnProperty("eventModeDist")) + if (!$util.isInteger(message.eventModeDist)) + return "eventModeDist: integer expected"; + if (message.closeType != null && message.hasOwnProperty("closeType")) + if (!$util.isInteger(message.closeType)) + return "closeType: integer expected"; + if (message.closeSun != null && message.hasOwnProperty("closeSun")) + if (!$util.isInteger(message.closeSun)) + return "closeSun: integer expected"; + if (message.closeMon != null && message.hasOwnProperty("closeMon")) + if (!$util.isInteger(message.closeMon)) + return "closeMon: integer expected"; + if (message.closeTue != null && message.hasOwnProperty("closeTue")) + if (!$util.isInteger(message.closeTue)) + return "closeTue: integer expected"; + if (message.closeWed != null && message.hasOwnProperty("closeWed")) + if (!$util.isInteger(message.closeWed)) + return "closeWed: integer expected"; + if (message.closeThu != null && message.hasOwnProperty("closeThu")) + if (!$util.isInteger(message.closeThu)) + return "closeThu: integer expected"; + if (message.closeFri != null && message.hasOwnProperty("closeFri")) + if (!$util.isInteger(message.closeFri)) + return "closeFri: integer expected"; + if (message.closeSat != null && message.hasOwnProperty("closeSat")) + if (!$util.isInteger(message.closeSat)) + return "closeSat: integer expected"; + if (message.closeDay != null && message.hasOwnProperty("closeDay")) + if (!$util.isInteger(message.closeDay)) + return "closeDay: integer expected"; + if (message.softwareRevision != null && message.hasOwnProperty("softwareRevision")) + if (!$util.isInteger(message.softwareRevision)) + return "softwareRevision: integer expected"; + if (message.syncTime != null && message.hasOwnProperty("syncTime")) + if (!$util.isInteger(message.syncTime)) + return "syncTime: integer expected"; + if (message.eventModeCount != null && message.hasOwnProperty("eventModeCount")) + if (!$util.isInteger(message.eventModeCount)) + return "eventModeCount: integer expected"; + if (message.timeZoneType != null && message.hasOwnProperty("timeZoneType")) + if (!$util.isInteger(message.timeZoneType)) + return "timeZoneType: integer expected"; + if (message.timeDayLight != null && message.hasOwnProperty("timeDayLight")) + if (!$util.isInteger(message.timeDayLight)) + return "timeDayLight: integer expected"; + if (message.clockOffset != null && message.hasOwnProperty("clockOffset")) + if (!$util.isInteger(message.clockOffset)) + return "clockOffset: integer expected"; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + if (!$util.isString(message.eventModeSerial)) + return "eventModeSerial: string expected"; + if (message.eventModeSerialEndAt != null && message.hasOwnProperty("eventModeSerialEndAt")) + if (!$util.isInteger(message.eventModeSerialEndAt)) + return "eventModeSerialEndAt: integer expected"; + if (message.eventModeSerialErrorcode != null && message.hasOwnProperty("eventModeSerialErrorcode")) + if (!$util.isInteger(message.eventModeSerialErrorcode)) + return "eventModeSerialErrorcode: integer expected"; + if (message.eventMode_2on2 != null && message.hasOwnProperty("eventMode_2on2")) + if (!$util.isInteger(message.eventMode_2on2)) + return "eventMode_2on2: integer expected"; + if (message.wasTournamentScheduleSet != null && message.hasOwnProperty("wasTournamentScheduleSet")) + if (!$util.isInteger(message.wasTournamentScheduleSet)) + return "wasTournamentScheduleSet: integer expected"; + return null; + }; + + /** + * Creates a BatchSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.BatchSetting + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.BatchSetting} BatchSetting + */ + BatchSetting.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.BatchSetting) + return object; + let message = new $root.wm.protobuf.BatchSetting(); + if (object.coinChute != null) + message.coinChute = object.coinChute | 0; + if (object.buycardCost != null) + message.buycardCost = object.buycardCost | 0; + if (object.gameCost != null) + message.gameCost = object.gameCost | 0; + if (object.continueCost != null) + message.continueCost = object.continueCost | 0; + if (object.fullcourseCost != null) + message.fullcourseCost = object.fullcourseCost | 0; + if (object.freeplay != null) + message.freeplay = object.freeplay | 0; + if (object.winsAndRemains != null) + message.winsAndRemains = object.winsAndRemains | 0; + if (object.eventMode != null) + message.eventMode = object.eventMode | 0; + if (object.eventModeDist != null) + message.eventModeDist = object.eventModeDist | 0; + if (object.closeType != null) + message.closeType = object.closeType | 0; + if (object.closeSun != null) + message.closeSun = object.closeSun | 0; + if (object.closeMon != null) + message.closeMon = object.closeMon | 0; + if (object.closeTue != null) + message.closeTue = object.closeTue | 0; + if (object.closeWed != null) + message.closeWed = object.closeWed | 0; + if (object.closeThu != null) + message.closeThu = object.closeThu | 0; + if (object.closeFri != null) + message.closeFri = object.closeFri | 0; + if (object.closeSat != null) + message.closeSat = object.closeSat | 0; + if (object.closeDay != null) + message.closeDay = object.closeDay | 0; + if (object.softwareRevision != null) + message.softwareRevision = object.softwareRevision | 0; + if (object.syncTime != null) + message.syncTime = object.syncTime | 0; + if (object.eventModeCount != null) + message.eventModeCount = object.eventModeCount | 0; + if (object.timeZoneType != null) + message.timeZoneType = object.timeZoneType >>> 0; + if (object.timeDayLight != null) + message.timeDayLight = object.timeDayLight >>> 0; + if (object.clockOffset != null) + message.clockOffset = object.clockOffset | 0; + if (object.eventModeSerial != null) + message.eventModeSerial = String(object.eventModeSerial); + if (object.eventModeSerialEndAt != null) + message.eventModeSerialEndAt = object.eventModeSerialEndAt >>> 0; + if (object.eventModeSerialErrorcode != null) + message.eventModeSerialErrorcode = object.eventModeSerialErrorcode | 0; + if (object.eventMode_2on2 != null) + message.eventMode_2on2 = object.eventMode_2on2 | 0; + if (object.wasTournamentScheduleSet != null) + message.wasTournamentScheduleSet = object.wasTournamentScheduleSet | 0; + return message; + }; + + /** + * Creates a plain object from a BatchSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.BatchSetting + * @static + * @param {wm.protobuf.BatchSetting} message BatchSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.coinChute = 0; + object.buycardCost = 0; + object.gameCost = 0; + object.continueCost = 0; + object.fullcourseCost = 0; + object.freeplay = 0; + object.winsAndRemains = 0; + object.eventMode = 0; + object.eventModeDist = 0; + object.closeType = 0; + object.closeSun = 0; + object.closeMon = 0; + object.closeTue = 0; + object.closeWed = 0; + object.closeThu = 0; + object.closeFri = 0; + object.closeSat = 0; + object.closeDay = 0; + object.softwareRevision = 0; + object.syncTime = 0; + object.eventModeCount = 0; + object.timeZoneType = 0; + object.timeDayLight = 0; + object.clockOffset = 0; + object.eventModeSerial = ""; + object.eventModeSerialEndAt = 0; + object.eventModeSerialErrorcode = 0; + object.eventMode_2on2 = 0; + object.wasTournamentScheduleSet = 0; + } + if (message.coinChute != null && message.hasOwnProperty("coinChute")) + object.coinChute = message.coinChute; + if (message.buycardCost != null && message.hasOwnProperty("buycardCost")) + object.buycardCost = message.buycardCost; + if (message.gameCost != null && message.hasOwnProperty("gameCost")) + object.gameCost = message.gameCost; + if (message.continueCost != null && message.hasOwnProperty("continueCost")) + object.continueCost = message.continueCost; + if (message.fullcourseCost != null && message.hasOwnProperty("fullcourseCost")) + object.fullcourseCost = message.fullcourseCost; + if (message.freeplay != null && message.hasOwnProperty("freeplay")) + object.freeplay = message.freeplay; + if (message.winsAndRemains != null && message.hasOwnProperty("winsAndRemains")) + object.winsAndRemains = message.winsAndRemains; + if (message.eventMode != null && message.hasOwnProperty("eventMode")) + object.eventMode = message.eventMode; + if (message.eventModeDist != null && message.hasOwnProperty("eventModeDist")) + object.eventModeDist = message.eventModeDist; + if (message.closeType != null && message.hasOwnProperty("closeType")) + object.closeType = message.closeType; + if (message.closeSun != null && message.hasOwnProperty("closeSun")) + object.closeSun = message.closeSun; + if (message.closeMon != null && message.hasOwnProperty("closeMon")) + object.closeMon = message.closeMon; + if (message.closeTue != null && message.hasOwnProperty("closeTue")) + object.closeTue = message.closeTue; + if (message.closeWed != null && message.hasOwnProperty("closeWed")) + object.closeWed = message.closeWed; + if (message.closeThu != null && message.hasOwnProperty("closeThu")) + object.closeThu = message.closeThu; + if (message.closeFri != null && message.hasOwnProperty("closeFri")) + object.closeFri = message.closeFri; + if (message.closeSat != null && message.hasOwnProperty("closeSat")) + object.closeSat = message.closeSat; + if (message.closeDay != null && message.hasOwnProperty("closeDay")) + object.closeDay = message.closeDay; + if (message.softwareRevision != null && message.hasOwnProperty("softwareRevision")) + object.softwareRevision = message.softwareRevision; + if (message.syncTime != null && message.hasOwnProperty("syncTime")) + object.syncTime = message.syncTime; + if (message.eventModeCount != null && message.hasOwnProperty("eventModeCount")) + object.eventModeCount = message.eventModeCount; + if (message.timeZoneType != null && message.hasOwnProperty("timeZoneType")) + object.timeZoneType = message.timeZoneType; + if (message.timeDayLight != null && message.hasOwnProperty("timeDayLight")) + object.timeDayLight = message.timeDayLight; + if (message.clockOffset != null && message.hasOwnProperty("clockOffset")) + object.clockOffset = message.clockOffset; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + object.eventModeSerial = message.eventModeSerial; + if (message.eventModeSerialEndAt != null && message.hasOwnProperty("eventModeSerialEndAt")) + object.eventModeSerialEndAt = message.eventModeSerialEndAt; + if (message.eventModeSerialErrorcode != null && message.hasOwnProperty("eventModeSerialErrorcode")) + object.eventModeSerialErrorcode = message.eventModeSerialErrorcode; + if (message.eventMode_2on2 != null && message.hasOwnProperty("eventMode_2on2")) + object.eventMode_2on2 = message.eventMode_2on2; + if (message.wasTournamentScheduleSet != null && message.hasOwnProperty("wasTournamentScheduleSet")) + object.wasTournamentScheduleSet = message.wasTournamentScheduleSet; + return object; + }; + + /** + * Converts this BatchSetting to JSON. + * @function toJSON + * @memberof wm.protobuf.BatchSetting + * @instance + * @returns {Object.} JSON object + */ + BatchSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchSetting + * @function getTypeUrl + * @memberof wm.protobuf.BatchSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.BatchSetting"; + }; + + return BatchSetting; + })(); + + protobuf.Information = (function() { + + /** + * Properties of an Information. + * @memberof wm.protobuf + * @interface IInformation + * @property {number|null} [systemMode] Information systemMode + * @property {number|null} [syncId] Information syncId + * @property {number|null} [attractMovieId] Information attractMovieId + * @property {number|null} [attractRankingId] Information attractRankingId + * @property {number|null} [attractRandomSeed] Information attractRandomSeed + */ + + /** + * Constructs a new Information. + * @memberof wm.protobuf + * @classdesc Represents an Information. + * @implements IInformation + * @constructor + * @param {wm.protobuf.IInformation=} [properties] Properties to set + */ + function Information(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Information systemMode. + * @member {number} systemMode + * @memberof wm.protobuf.Information + * @instance + */ + Information.prototype.systemMode = 0; + + /** + * Information syncId. + * @member {number} syncId + * @memberof wm.protobuf.Information + * @instance + */ + Information.prototype.syncId = 0; + + /** + * Information attractMovieId. + * @member {number} attractMovieId + * @memberof wm.protobuf.Information + * @instance + */ + Information.prototype.attractMovieId = 0; + + /** + * Information attractRankingId. + * @member {number} attractRankingId + * @memberof wm.protobuf.Information + * @instance + */ + Information.prototype.attractRankingId = 0; + + /** + * Information attractRandomSeed. + * @member {number} attractRandomSeed + * @memberof wm.protobuf.Information + * @instance + */ + Information.prototype.attractRandomSeed = 0; + + /** + * Creates a new Information instance using the specified properties. + * @function create + * @memberof wm.protobuf.Information + * @static + * @param {wm.protobuf.IInformation=} [properties] Properties to set + * @returns {wm.protobuf.Information} Information instance + */ + Information.create = function create(properties) { + return new Information(properties); + }; + + /** + * Encodes the specified Information message. Does not implicitly {@link wm.protobuf.Information.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Information + * @static + * @param {wm.protobuf.IInformation} message Information message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Information.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.systemMode != null && Object.hasOwnProperty.call(message, "systemMode")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.systemMode); + if (message.syncId != null && Object.hasOwnProperty.call(message, "syncId")) + writer.uint32(/* id 2, wireType 0 =*/16).sint32(message.syncId); + if (message.attractMovieId != null && Object.hasOwnProperty.call(message, "attractMovieId")) + writer.uint32(/* id 3, wireType 0 =*/24).sint32(message.attractMovieId); + if (message.attractRankingId != null && Object.hasOwnProperty.call(message, "attractRankingId")) + writer.uint32(/* id 4, wireType 0 =*/32).sint32(message.attractRankingId); + if (message.attractRandomSeed != null && Object.hasOwnProperty.call(message, "attractRandomSeed")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.attractRandomSeed); + return writer; + }; + + /** + * Encodes the specified Information message, length delimited. Does not implicitly {@link wm.protobuf.Information.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Information + * @static + * @param {wm.protobuf.IInformation} message Information message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Information.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Information message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Information + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Information} Information + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Information.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Information(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.systemMode = reader.uint32(); + break; + } + case 2: { + message.syncId = reader.sint32(); + break; + } + case 3: { + message.attractMovieId = reader.sint32(); + break; + } + case 4: { + message.attractRankingId = reader.sint32(); + break; + } + case 5: { + message.attractRandomSeed = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Information message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Information + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Information} Information + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Information.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Information message. + * @function verify + * @memberof wm.protobuf.Information + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Information.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.systemMode != null && message.hasOwnProperty("systemMode")) + if (!$util.isInteger(message.systemMode)) + return "systemMode: integer expected"; + if (message.syncId != null && message.hasOwnProperty("syncId")) + if (!$util.isInteger(message.syncId)) + return "syncId: integer expected"; + if (message.attractMovieId != null && message.hasOwnProperty("attractMovieId")) + if (!$util.isInteger(message.attractMovieId)) + return "attractMovieId: integer expected"; + if (message.attractRankingId != null && message.hasOwnProperty("attractRankingId")) + if (!$util.isInteger(message.attractRankingId)) + return "attractRankingId: integer expected"; + if (message.attractRandomSeed != null && message.hasOwnProperty("attractRandomSeed")) + if (!$util.isInteger(message.attractRandomSeed)) + return "attractRandomSeed: integer expected"; + return null; + }; + + /** + * Creates an Information message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Information + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Information} Information + */ + Information.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Information) + return object; + let message = new $root.wm.protobuf.Information(); + if (object.systemMode != null) + message.systemMode = object.systemMode >>> 0; + if (object.syncId != null) + message.syncId = object.syncId | 0; + if (object.attractMovieId != null) + message.attractMovieId = object.attractMovieId | 0; + if (object.attractRankingId != null) + message.attractRankingId = object.attractRankingId | 0; + if (object.attractRandomSeed != null) + message.attractRandomSeed = object.attractRandomSeed | 0; + return message; + }; + + /** + * Creates a plain object from an Information message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Information + * @static + * @param {wm.protobuf.Information} message Information + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Information.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.systemMode = 0; + object.syncId = 0; + object.attractMovieId = 0; + object.attractRankingId = 0; + object.attractRandomSeed = 0; + } + if (message.systemMode != null && message.hasOwnProperty("systemMode")) + object.systemMode = message.systemMode; + if (message.syncId != null && message.hasOwnProperty("syncId")) + object.syncId = message.syncId; + if (message.attractMovieId != null && message.hasOwnProperty("attractMovieId")) + object.attractMovieId = message.attractMovieId; + if (message.attractRankingId != null && message.hasOwnProperty("attractRankingId")) + object.attractRankingId = message.attractRankingId; + if (message.attractRandomSeed != null && message.hasOwnProperty("attractRandomSeed")) + object.attractRandomSeed = message.attractRandomSeed; + return object; + }; + + /** + * Converts this Information to JSON. + * @function toJSON + * @memberof wm.protobuf.Information + * @instance + * @returns {Object.} JSON object + */ + Information.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Information + * @function getTypeUrl + * @memberof wm.protobuf.Information + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Information.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Information"; + }; + + return Information; + })(); + + protobuf.RaceCar = (function() { + + /** + * Properties of a RaceCar. + * @memberof wm.protobuf + * @interface IRaceCar + * @property {wm.protobuf.ICar} car RaceCar car + * @property {number|null} [rank] RaceCar rank + * @property {number|null} [vsStarCount] RaceCar vsStarCount + * @property {number|null} [vsConsecutiveWins] RaceCar vsConsecutiveWins + * @property {number|null} [vsMedalsRankLevel] RaceCar vsMedalsRankLevel + * @property {boolean|null} [wasClearedStoryWhithoutLosing] RaceCar wasClearedStoryWhithoutLosing + * @property {Array.|null} [rgRegionMapScore] RaceCar rgRegionMapScore + */ + + /** + * Constructs a new RaceCar. + * @memberof wm.protobuf + * @classdesc Represents a RaceCar. + * @implements IRaceCar + * @constructor + * @param {wm.protobuf.IRaceCar=} [properties] Properties to set + */ + function RaceCar(properties) { + this.rgRegionMapScore = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RaceCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.RaceCar + * @instance + */ + RaceCar.prototype.car = null; + + /** + * RaceCar rank. + * @member {number} rank + * @memberof wm.protobuf.RaceCar + * @instance + */ + RaceCar.prototype.rank = 0; + + /** + * RaceCar vsStarCount. + * @member {number} vsStarCount + * @memberof wm.protobuf.RaceCar + * @instance + */ + RaceCar.prototype.vsStarCount = 0; + + /** + * RaceCar vsConsecutiveWins. + * @member {number} vsConsecutiveWins + * @memberof wm.protobuf.RaceCar + * @instance + */ + RaceCar.prototype.vsConsecutiveWins = 0; + + /** + * RaceCar vsMedalsRankLevel. + * @member {number} vsMedalsRankLevel + * @memberof wm.protobuf.RaceCar + * @instance + */ + RaceCar.prototype.vsMedalsRankLevel = 0; + + /** + * RaceCar wasClearedStoryWhithoutLosing. + * @member {boolean} wasClearedStoryWhithoutLosing + * @memberof wm.protobuf.RaceCar + * @instance + */ + RaceCar.prototype.wasClearedStoryWhithoutLosing = false; + + /** + * RaceCar rgRegionMapScore. + * @member {Array.} rgRegionMapScore + * @memberof wm.protobuf.RaceCar + * @instance + */ + RaceCar.prototype.rgRegionMapScore = $util.emptyArray; + + /** + * Creates a new RaceCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.RaceCar + * @static + * @param {wm.protobuf.IRaceCar=} [properties] Properties to set + * @returns {wm.protobuf.RaceCar} RaceCar instance + */ + RaceCar.create = function create(properties) { + return new RaceCar(properties); + }; + + /** + * Encodes the specified RaceCar message. Does not implicitly {@link wm.protobuf.RaceCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RaceCar + * @static + * @param {wm.protobuf.IRaceCar} message RaceCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RaceCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.rank); + if (message.vsStarCount != null && Object.hasOwnProperty.call(message, "vsStarCount")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.vsStarCount); + if (message.vsConsecutiveWins != null && Object.hasOwnProperty.call(message, "vsConsecutiveWins")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.vsConsecutiveWins); + if (message.vsMedalsRankLevel != null && Object.hasOwnProperty.call(message, "vsMedalsRankLevel")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.vsMedalsRankLevel); + if (message.wasClearedStoryWhithoutLosing != null && Object.hasOwnProperty.call(message, "wasClearedStoryWhithoutLosing")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.wasClearedStoryWhithoutLosing); + if (message.rgRegionMapScore != null && message.rgRegionMapScore.length) + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.rgRegionMapScore[i]); + return writer; + }; + + /** + * Encodes the specified RaceCar message, length delimited. Does not implicitly {@link wm.protobuf.RaceCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RaceCar + * @static + * @param {wm.protobuf.IRaceCar} message RaceCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RaceCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RaceCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RaceCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RaceCar} RaceCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RaceCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RaceCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.rank = reader.uint32(); + break; + } + case 3: { + message.vsStarCount = reader.uint32(); + break; + } + case 4: { + message.vsConsecutiveWins = reader.uint32(); + break; + } + case 5: { + message.vsMedalsRankLevel = reader.uint32(); + break; + } + case 6: { + message.wasClearedStoryWhithoutLosing = reader.bool(); + break; + } + case 7: { + if (!(message.rgRegionMapScore && message.rgRegionMapScore.length)) + message.rgRegionMapScore = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegionMapScore.push(reader.uint32()); + } else + message.rgRegionMapScore.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + return message; + }; + + /** + * Decodes a RaceCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RaceCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RaceCar} RaceCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RaceCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RaceCar message. + * @function verify + * @memberof wm.protobuf.RaceCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RaceCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.rank != null && message.hasOwnProperty("rank")) + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + if (!$util.isInteger(message.vsStarCount)) + return "vsStarCount: integer expected"; + if (message.vsConsecutiveWins != null && message.hasOwnProperty("vsConsecutiveWins")) + if (!$util.isInteger(message.vsConsecutiveWins)) + return "vsConsecutiveWins: integer expected"; + if (message.vsMedalsRankLevel != null && message.hasOwnProperty("vsMedalsRankLevel")) + if (!$util.isInteger(message.vsMedalsRankLevel)) + return "vsMedalsRankLevel: integer expected"; + if (message.wasClearedStoryWhithoutLosing != null && message.hasOwnProperty("wasClearedStoryWhithoutLosing")) + if (typeof message.wasClearedStoryWhithoutLosing !== "boolean") + return "wasClearedStoryWhithoutLosing: boolean expected"; + if (message.rgRegionMapScore != null && message.hasOwnProperty("rgRegionMapScore")) { + if (!Array.isArray(message.rgRegionMapScore)) + return "rgRegionMapScore: array expected"; + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + if (!$util.isInteger(message.rgRegionMapScore[i])) + return "rgRegionMapScore: integer[] expected"; + } + return null; + }; + + /** + * Creates a RaceCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RaceCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RaceCar} RaceCar + */ + RaceCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RaceCar) + return object; + let message = new $root.wm.protobuf.RaceCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.RaceCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.rank != null) + message.rank = object.rank >>> 0; + if (object.vsStarCount != null) + message.vsStarCount = object.vsStarCount >>> 0; + if (object.vsConsecutiveWins != null) + message.vsConsecutiveWins = object.vsConsecutiveWins >>> 0; + if (object.vsMedalsRankLevel != null) + message.vsMedalsRankLevel = object.vsMedalsRankLevel >>> 0; + if (object.wasClearedStoryWhithoutLosing != null) + message.wasClearedStoryWhithoutLosing = Boolean(object.wasClearedStoryWhithoutLosing); + if (object.rgRegionMapScore) { + if (!Array.isArray(object.rgRegionMapScore)) + throw TypeError(".wm.protobuf.RaceCar.rgRegionMapScore: array expected"); + message.rgRegionMapScore = []; + for (let i = 0; i < object.rgRegionMapScore.length; ++i) + message.rgRegionMapScore[i] = object.rgRegionMapScore[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a RaceCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RaceCar + * @static + * @param {wm.protobuf.RaceCar} message RaceCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RaceCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.rgRegionMapScore = []; + if (options.defaults) { + object.car = null; + object.rank = 0; + object.vsStarCount = 0; + object.vsConsecutiveWins = 0; + object.vsMedalsRankLevel = 0; + object.wasClearedStoryWhithoutLosing = false; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + object.vsStarCount = message.vsStarCount; + if (message.vsConsecutiveWins != null && message.hasOwnProperty("vsConsecutiveWins")) + object.vsConsecutiveWins = message.vsConsecutiveWins; + if (message.vsMedalsRankLevel != null && message.hasOwnProperty("vsMedalsRankLevel")) + object.vsMedalsRankLevel = message.vsMedalsRankLevel; + if (message.wasClearedStoryWhithoutLosing != null && message.hasOwnProperty("wasClearedStoryWhithoutLosing")) + object.wasClearedStoryWhithoutLosing = message.wasClearedStoryWhithoutLosing; + if (message.rgRegionMapScore && message.rgRegionMapScore.length) { + object.rgRegionMapScore = []; + for (let j = 0; j < message.rgRegionMapScore.length; ++j) + object.rgRegionMapScore[j] = message.rgRegionMapScore[j]; + } + return object; + }; + + /** + * Converts this RaceCar to JSON. + * @function toJSON + * @memberof wm.protobuf.RaceCar + * @instance + * @returns {Object.} JSON object + */ + RaceCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RaceCar + * @function getTypeUrl + * @memberof wm.protobuf.RaceCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RaceCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RaceCar"; + }; + + return RaceCar; + })(); + + protobuf.TournamentCar = (function() { + + /** + * Properties of a TournamentCar. + * @memberof wm.protobuf + * @interface ITournamentCar + * @property {string|null} [name] TournamentCar name + * @property {number|null} [carId] TournamentCar carId + * @property {number|null} [entryNumber] TournamentCar entryNumber + */ + + /** + * Constructs a new TournamentCar. + * @memberof wm.protobuf + * @classdesc Represents a TournamentCar. + * @implements ITournamentCar + * @constructor + * @param {wm.protobuf.ITournamentCar=} [properties] Properties to set + */ + function TournamentCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TournamentCar name. + * @member {string} name + * @memberof wm.protobuf.TournamentCar + * @instance + */ + TournamentCar.prototype.name = ""; + + /** + * TournamentCar carId. + * @member {number} carId + * @memberof wm.protobuf.TournamentCar + * @instance + */ + TournamentCar.prototype.carId = 0; + + /** + * TournamentCar entryNumber. + * @member {number} entryNumber + * @memberof wm.protobuf.TournamentCar + * @instance + */ + TournamentCar.prototype.entryNumber = 0; + + /** + * Creates a new TournamentCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.TournamentCar + * @static + * @param {wm.protobuf.ITournamentCar=} [properties] Properties to set + * @returns {wm.protobuf.TournamentCar} TournamentCar instance + */ + TournamentCar.create = function create(properties) { + return new TournamentCar(properties); + }; + + /** + * Encodes the specified TournamentCar message. Does not implicitly {@link wm.protobuf.TournamentCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TournamentCar + * @static + * @param {wm.protobuf.ITournamentCar} message TournamentCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TournamentCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 2, wireType 0 =*/16).sint32(message.carId); + if (message.entryNumber != null && Object.hasOwnProperty.call(message, "entryNumber")) + writer.uint32(/* id 3, wireType 0 =*/24).sint32(message.entryNumber); + return writer; + }; + + /** + * Encodes the specified TournamentCar message, length delimited. Does not implicitly {@link wm.protobuf.TournamentCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TournamentCar + * @static + * @param {wm.protobuf.ITournamentCar} message TournamentCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TournamentCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TournamentCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TournamentCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TournamentCar} TournamentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TournamentCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TournamentCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.carId = reader.sint32(); + break; + } + case 3: { + message.entryNumber = reader.sint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TournamentCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TournamentCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TournamentCar} TournamentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TournamentCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TournamentCar message. + * @function verify + * @memberof wm.protobuf.TournamentCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TournamentCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.entryNumber != null && message.hasOwnProperty("entryNumber")) + if (!$util.isInteger(message.entryNumber)) + return "entryNumber: integer expected"; + return null; + }; + + /** + * Creates a TournamentCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TournamentCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TournamentCar} TournamentCar + */ + TournamentCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TournamentCar) + return object; + let message = new $root.wm.protobuf.TournamentCar(); + if (object.name != null) + message.name = String(object.name); + if (object.carId != null) + message.carId = object.carId | 0; + if (object.entryNumber != null) + message.entryNumber = object.entryNumber | 0; + return message; + }; + + /** + * Creates a plain object from a TournamentCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TournamentCar + * @static + * @param {wm.protobuf.TournamentCar} message TournamentCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TournamentCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.name = ""; + object.carId = 0; + object.entryNumber = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.entryNumber != null && message.hasOwnProperty("entryNumber")) + object.entryNumber = message.entryNumber; + return object; + }; + + /** + * Converts this TournamentCar to JSON. + * @function toJSON + * @memberof wm.protobuf.TournamentCar + * @instance + * @returns {Object.} JSON object + */ + TournamentCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TournamentCar + * @function getTypeUrl + * @memberof wm.protobuf.TournamentCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TournamentCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TournamentCar"; + }; + + return TournamentCar; + })(); + + protobuf.TournamentCarList = (function() { + + /** + * Properties of a TournamentCarList. + * @memberof wm.protobuf + * @interface ITournamentCarList + * @property {wm.protobuf.ITournamentCar|null} [car_00] TournamentCarList car_00 + * @property {wm.protobuf.ITournamentCar|null} [car_01] TournamentCarList car_01 + * @property {wm.protobuf.ITournamentCar|null} [car_02] TournamentCarList car_02 + * @property {wm.protobuf.ITournamentCar|null} [car_03] TournamentCarList car_03 + * @property {wm.protobuf.ITournamentCar|null} [car_04] TournamentCarList car_04 + * @property {wm.protobuf.ITournamentCar|null} [car_05] TournamentCarList car_05 + * @property {wm.protobuf.ITournamentCar|null} [car_06] TournamentCarList car_06 + * @property {wm.protobuf.ITournamentCar|null} [car_07] TournamentCarList car_07 + * @property {wm.protobuf.ITournamentCar|null} [car_08] TournamentCarList car_08 + * @property {wm.protobuf.ITournamentCar|null} [car_09] TournamentCarList car_09 + * @property {wm.protobuf.ITournamentCar|null} [car_10] TournamentCarList car_10 + * @property {wm.protobuf.ITournamentCar|null} [car_11] TournamentCarList car_11 + * @property {wm.protobuf.ITournamentCar|null} [car_12] TournamentCarList car_12 + * @property {wm.protobuf.ITournamentCar|null} [car_13] TournamentCarList car_13 + * @property {wm.protobuf.ITournamentCar|null} [car_14] TournamentCarList car_14 + * @property {wm.protobuf.ITournamentCar|null} [car_15] TournamentCarList car_15 + * @property {wm.protobuf.ITournamentCar|null} [car_16] TournamentCarList car_16 + * @property {wm.protobuf.ITournamentCar|null} [car_17] TournamentCarList car_17 + * @property {wm.protobuf.ITournamentCar|null} [car_18] TournamentCarList car_18 + * @property {wm.protobuf.ITournamentCar|null} [car_19] TournamentCarList car_19 + * @property {wm.protobuf.ITournamentCar|null} [car_20] TournamentCarList car_20 + * @property {wm.protobuf.ITournamentCar|null} [car_21] TournamentCarList car_21 + * @property {wm.protobuf.ITournamentCar|null} [car_22] TournamentCarList car_22 + * @property {wm.protobuf.ITournamentCar|null} [car_23] TournamentCarList car_23 + * @property {wm.protobuf.ITournamentCar|null} [car_24] TournamentCarList car_24 + * @property {wm.protobuf.ITournamentCar|null} [car_25] TournamentCarList car_25 + * @property {wm.protobuf.ITournamentCar|null} [car_26] TournamentCarList car_26 + * @property {wm.protobuf.ITournamentCar|null} [car_27] TournamentCarList car_27 + * @property {wm.protobuf.ITournamentCar|null} [car_28] TournamentCarList car_28 + * @property {wm.protobuf.ITournamentCar|null} [car_29] TournamentCarList car_29 + * @property {wm.protobuf.ITournamentCar|null} [car_30] TournamentCarList car_30 + * @property {wm.protobuf.ITournamentCar|null} [car_31] TournamentCarList car_31 + */ + + /** + * Constructs a new TournamentCarList. + * @memberof wm.protobuf + * @classdesc Represents a TournamentCarList. + * @implements ITournamentCarList + * @constructor + * @param {wm.protobuf.ITournamentCarList=} [properties] Properties to set + */ + function TournamentCarList(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TournamentCarList car_00. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_00 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_00 = null; + + /** + * TournamentCarList car_01. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_01 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_01 = null; + + /** + * TournamentCarList car_02. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_02 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_02 = null; + + /** + * TournamentCarList car_03. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_03 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_03 = null; + + /** + * TournamentCarList car_04. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_04 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_04 = null; + + /** + * TournamentCarList car_05. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_05 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_05 = null; + + /** + * TournamentCarList car_06. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_06 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_06 = null; + + /** + * TournamentCarList car_07. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_07 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_07 = null; + + /** + * TournamentCarList car_08. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_08 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_08 = null; + + /** + * TournamentCarList car_09. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_09 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_09 = null; + + /** + * TournamentCarList car_10. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_10 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_10 = null; + + /** + * TournamentCarList car_11. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_11 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_11 = null; + + /** + * TournamentCarList car_12. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_12 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_12 = null; + + /** + * TournamentCarList car_13. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_13 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_13 = null; + + /** + * TournamentCarList car_14. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_14 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_14 = null; + + /** + * TournamentCarList car_15. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_15 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_15 = null; + + /** + * TournamentCarList car_16. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_16 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_16 = null; + + /** + * TournamentCarList car_17. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_17 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_17 = null; + + /** + * TournamentCarList car_18. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_18 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_18 = null; + + /** + * TournamentCarList car_19. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_19 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_19 = null; + + /** + * TournamentCarList car_20. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_20 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_20 = null; + + /** + * TournamentCarList car_21. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_21 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_21 = null; + + /** + * TournamentCarList car_22. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_22 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_22 = null; + + /** + * TournamentCarList car_23. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_23 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_23 = null; + + /** + * TournamentCarList car_24. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_24 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_24 = null; + + /** + * TournamentCarList car_25. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_25 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_25 = null; + + /** + * TournamentCarList car_26. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_26 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_26 = null; + + /** + * TournamentCarList car_27. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_27 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_27 = null; + + /** + * TournamentCarList car_28. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_28 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_28 = null; + + /** + * TournamentCarList car_29. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_29 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_29 = null; + + /** + * TournamentCarList car_30. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_30 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_30 = null; + + /** + * TournamentCarList car_31. + * @member {wm.protobuf.ITournamentCar|null|undefined} car_31 + * @memberof wm.protobuf.TournamentCarList + * @instance + */ + TournamentCarList.prototype.car_31 = null; + + /** + * Creates a new TournamentCarList instance using the specified properties. + * @function create + * @memberof wm.protobuf.TournamentCarList + * @static + * @param {wm.protobuf.ITournamentCarList=} [properties] Properties to set + * @returns {wm.protobuf.TournamentCarList} TournamentCarList instance + */ + TournamentCarList.create = function create(properties) { + return new TournamentCarList(properties); + }; + + /** + * Encodes the specified TournamentCarList message. Does not implicitly {@link wm.protobuf.TournamentCarList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TournamentCarList + * @static + * @param {wm.protobuf.ITournamentCarList} message TournamentCarList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TournamentCarList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.car_00 != null && Object.hasOwnProperty.call(message, "car_00")) + $root.wm.protobuf.TournamentCar.encode(message.car_00, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.car_01 != null && Object.hasOwnProperty.call(message, "car_01")) + $root.wm.protobuf.TournamentCar.encode(message.car_01, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.car_02 != null && Object.hasOwnProperty.call(message, "car_02")) + $root.wm.protobuf.TournamentCar.encode(message.car_02, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.car_03 != null && Object.hasOwnProperty.call(message, "car_03")) + $root.wm.protobuf.TournamentCar.encode(message.car_03, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.car_04 != null && Object.hasOwnProperty.call(message, "car_04")) + $root.wm.protobuf.TournamentCar.encode(message.car_04, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.car_05 != null && Object.hasOwnProperty.call(message, "car_05")) + $root.wm.protobuf.TournamentCar.encode(message.car_05, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.car_06 != null && Object.hasOwnProperty.call(message, "car_06")) + $root.wm.protobuf.TournamentCar.encode(message.car_06, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.car_07 != null && Object.hasOwnProperty.call(message, "car_07")) + $root.wm.protobuf.TournamentCar.encode(message.car_07, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.car_08 != null && Object.hasOwnProperty.call(message, "car_08")) + $root.wm.protobuf.TournamentCar.encode(message.car_08, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.car_09 != null && Object.hasOwnProperty.call(message, "car_09")) + $root.wm.protobuf.TournamentCar.encode(message.car_09, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.car_10 != null && Object.hasOwnProperty.call(message, "car_10")) + $root.wm.protobuf.TournamentCar.encode(message.car_10, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.car_11 != null && Object.hasOwnProperty.call(message, "car_11")) + $root.wm.protobuf.TournamentCar.encode(message.car_11, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.car_12 != null && Object.hasOwnProperty.call(message, "car_12")) + $root.wm.protobuf.TournamentCar.encode(message.car_12, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.car_13 != null && Object.hasOwnProperty.call(message, "car_13")) + $root.wm.protobuf.TournamentCar.encode(message.car_13, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.car_14 != null && Object.hasOwnProperty.call(message, "car_14")) + $root.wm.protobuf.TournamentCar.encode(message.car_14, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.car_15 != null && Object.hasOwnProperty.call(message, "car_15")) + $root.wm.protobuf.TournamentCar.encode(message.car_15, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.car_16 != null && Object.hasOwnProperty.call(message, "car_16")) + $root.wm.protobuf.TournamentCar.encode(message.car_16, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.car_17 != null && Object.hasOwnProperty.call(message, "car_17")) + $root.wm.protobuf.TournamentCar.encode(message.car_17, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.car_18 != null && Object.hasOwnProperty.call(message, "car_18")) + $root.wm.protobuf.TournamentCar.encode(message.car_18, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.car_19 != null && Object.hasOwnProperty.call(message, "car_19")) + $root.wm.protobuf.TournamentCar.encode(message.car_19, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.car_20 != null && Object.hasOwnProperty.call(message, "car_20")) + $root.wm.protobuf.TournamentCar.encode(message.car_20, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.car_21 != null && Object.hasOwnProperty.call(message, "car_21")) + $root.wm.protobuf.TournamentCar.encode(message.car_21, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.car_22 != null && Object.hasOwnProperty.call(message, "car_22")) + $root.wm.protobuf.TournamentCar.encode(message.car_22, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.car_23 != null && Object.hasOwnProperty.call(message, "car_23")) + $root.wm.protobuf.TournamentCar.encode(message.car_23, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.car_24 != null && Object.hasOwnProperty.call(message, "car_24")) + $root.wm.protobuf.TournamentCar.encode(message.car_24, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.car_25 != null && Object.hasOwnProperty.call(message, "car_25")) + $root.wm.protobuf.TournamentCar.encode(message.car_25, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.car_26 != null && Object.hasOwnProperty.call(message, "car_26")) + $root.wm.protobuf.TournamentCar.encode(message.car_26, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.car_27 != null && Object.hasOwnProperty.call(message, "car_27")) + $root.wm.protobuf.TournamentCar.encode(message.car_27, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.car_28 != null && Object.hasOwnProperty.call(message, "car_28")) + $root.wm.protobuf.TournamentCar.encode(message.car_28, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.car_29 != null && Object.hasOwnProperty.call(message, "car_29")) + $root.wm.protobuf.TournamentCar.encode(message.car_29, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.car_30 != null && Object.hasOwnProperty.call(message, "car_30")) + $root.wm.protobuf.TournamentCar.encode(message.car_30, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.car_31 != null && Object.hasOwnProperty.call(message, "car_31")) + $root.wm.protobuf.TournamentCar.encode(message.car_31, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TournamentCarList message, length delimited. Does not implicitly {@link wm.protobuf.TournamentCarList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TournamentCarList + * @static + * @param {wm.protobuf.ITournamentCarList} message TournamentCarList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TournamentCarList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TournamentCarList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TournamentCarList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TournamentCarList} TournamentCarList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TournamentCarList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TournamentCarList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car_00 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 2: { + message.car_01 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 3: { + message.car_02 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 4: { + message.car_03 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 5: { + message.car_04 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 6: { + message.car_05 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 7: { + message.car_06 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 8: { + message.car_07 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 9: { + message.car_08 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 10: { + message.car_09 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 11: { + message.car_10 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 12: { + message.car_11 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 13: { + message.car_12 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 14: { + message.car_13 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 15: { + message.car_14 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 16: { + message.car_15 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 17: { + message.car_16 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 18: { + message.car_17 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 19: { + message.car_18 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 20: { + message.car_19 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 21: { + message.car_20 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 22: { + message.car_21 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 23: { + message.car_22 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 24: { + message.car_23 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 25: { + message.car_24 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 26: { + message.car_25 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 27: { + message.car_26 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 28: { + message.car_27 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 29: { + message.car_28 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 30: { + message.car_29 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 31: { + message.car_30 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + case 32: { + message.car_31 = $root.wm.protobuf.TournamentCar.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TournamentCarList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TournamentCarList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TournamentCarList} TournamentCarList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TournamentCarList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TournamentCarList message. + * @function verify + * @memberof wm.protobuf.TournamentCarList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TournamentCarList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.car_00 != null && message.hasOwnProperty("car_00")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_00); + if (error) + return "car_00." + error; + } + if (message.car_01 != null && message.hasOwnProperty("car_01")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_01); + if (error) + return "car_01." + error; + } + if (message.car_02 != null && message.hasOwnProperty("car_02")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_02); + if (error) + return "car_02." + error; + } + if (message.car_03 != null && message.hasOwnProperty("car_03")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_03); + if (error) + return "car_03." + error; + } + if (message.car_04 != null && message.hasOwnProperty("car_04")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_04); + if (error) + return "car_04." + error; + } + if (message.car_05 != null && message.hasOwnProperty("car_05")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_05); + if (error) + return "car_05." + error; + } + if (message.car_06 != null && message.hasOwnProperty("car_06")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_06); + if (error) + return "car_06." + error; + } + if (message.car_07 != null && message.hasOwnProperty("car_07")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_07); + if (error) + return "car_07." + error; + } + if (message.car_08 != null && message.hasOwnProperty("car_08")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_08); + if (error) + return "car_08." + error; + } + if (message.car_09 != null && message.hasOwnProperty("car_09")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_09); + if (error) + return "car_09." + error; + } + if (message.car_10 != null && message.hasOwnProperty("car_10")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_10); + if (error) + return "car_10." + error; + } + if (message.car_11 != null && message.hasOwnProperty("car_11")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_11); + if (error) + return "car_11." + error; + } + if (message.car_12 != null && message.hasOwnProperty("car_12")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_12); + if (error) + return "car_12." + error; + } + if (message.car_13 != null && message.hasOwnProperty("car_13")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_13); + if (error) + return "car_13." + error; + } + if (message.car_14 != null && message.hasOwnProperty("car_14")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_14); + if (error) + return "car_14." + error; + } + if (message.car_15 != null && message.hasOwnProperty("car_15")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_15); + if (error) + return "car_15." + error; + } + if (message.car_16 != null && message.hasOwnProperty("car_16")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_16); + if (error) + return "car_16." + error; + } + if (message.car_17 != null && message.hasOwnProperty("car_17")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_17); + if (error) + return "car_17." + error; + } + if (message.car_18 != null && message.hasOwnProperty("car_18")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_18); + if (error) + return "car_18." + error; + } + if (message.car_19 != null && message.hasOwnProperty("car_19")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_19); + if (error) + return "car_19." + error; + } + if (message.car_20 != null && message.hasOwnProperty("car_20")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_20); + if (error) + return "car_20." + error; + } + if (message.car_21 != null && message.hasOwnProperty("car_21")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_21); + if (error) + return "car_21." + error; + } + if (message.car_22 != null && message.hasOwnProperty("car_22")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_22); + if (error) + return "car_22." + error; + } + if (message.car_23 != null && message.hasOwnProperty("car_23")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_23); + if (error) + return "car_23." + error; + } + if (message.car_24 != null && message.hasOwnProperty("car_24")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_24); + if (error) + return "car_24." + error; + } + if (message.car_25 != null && message.hasOwnProperty("car_25")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_25); + if (error) + return "car_25." + error; + } + if (message.car_26 != null && message.hasOwnProperty("car_26")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_26); + if (error) + return "car_26." + error; + } + if (message.car_27 != null && message.hasOwnProperty("car_27")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_27); + if (error) + return "car_27." + error; + } + if (message.car_28 != null && message.hasOwnProperty("car_28")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_28); + if (error) + return "car_28." + error; + } + if (message.car_29 != null && message.hasOwnProperty("car_29")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_29); + if (error) + return "car_29." + error; + } + if (message.car_30 != null && message.hasOwnProperty("car_30")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_30); + if (error) + return "car_30." + error; + } + if (message.car_31 != null && message.hasOwnProperty("car_31")) { + let error = $root.wm.protobuf.TournamentCar.verify(message.car_31); + if (error) + return "car_31." + error; + } + return null; + }; + + /** + * Creates a TournamentCarList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TournamentCarList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TournamentCarList} TournamentCarList + */ + TournamentCarList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TournamentCarList) + return object; + let message = new $root.wm.protobuf.TournamentCarList(); + if (object.car_00 != null) { + if (typeof object.car_00 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_00: object expected"); + message.car_00 = $root.wm.protobuf.TournamentCar.fromObject(object.car_00); + } + if (object.car_01 != null) { + if (typeof object.car_01 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_01: object expected"); + message.car_01 = $root.wm.protobuf.TournamentCar.fromObject(object.car_01); + } + if (object.car_02 != null) { + if (typeof object.car_02 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_02: object expected"); + message.car_02 = $root.wm.protobuf.TournamentCar.fromObject(object.car_02); + } + if (object.car_03 != null) { + if (typeof object.car_03 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_03: object expected"); + message.car_03 = $root.wm.protobuf.TournamentCar.fromObject(object.car_03); + } + if (object.car_04 != null) { + if (typeof object.car_04 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_04: object expected"); + message.car_04 = $root.wm.protobuf.TournamentCar.fromObject(object.car_04); + } + if (object.car_05 != null) { + if (typeof object.car_05 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_05: object expected"); + message.car_05 = $root.wm.protobuf.TournamentCar.fromObject(object.car_05); + } + if (object.car_06 != null) { + if (typeof object.car_06 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_06: object expected"); + message.car_06 = $root.wm.protobuf.TournamentCar.fromObject(object.car_06); + } + if (object.car_07 != null) { + if (typeof object.car_07 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_07: object expected"); + message.car_07 = $root.wm.protobuf.TournamentCar.fromObject(object.car_07); + } + if (object.car_08 != null) { + if (typeof object.car_08 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_08: object expected"); + message.car_08 = $root.wm.protobuf.TournamentCar.fromObject(object.car_08); + } + if (object.car_09 != null) { + if (typeof object.car_09 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_09: object expected"); + message.car_09 = $root.wm.protobuf.TournamentCar.fromObject(object.car_09); + } + if (object.car_10 != null) { + if (typeof object.car_10 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_10: object expected"); + message.car_10 = $root.wm.protobuf.TournamentCar.fromObject(object.car_10); + } + if (object.car_11 != null) { + if (typeof object.car_11 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_11: object expected"); + message.car_11 = $root.wm.protobuf.TournamentCar.fromObject(object.car_11); + } + if (object.car_12 != null) { + if (typeof object.car_12 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_12: object expected"); + message.car_12 = $root.wm.protobuf.TournamentCar.fromObject(object.car_12); + } + if (object.car_13 != null) { + if (typeof object.car_13 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_13: object expected"); + message.car_13 = $root.wm.protobuf.TournamentCar.fromObject(object.car_13); + } + if (object.car_14 != null) { + if (typeof object.car_14 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_14: object expected"); + message.car_14 = $root.wm.protobuf.TournamentCar.fromObject(object.car_14); + } + if (object.car_15 != null) { + if (typeof object.car_15 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_15: object expected"); + message.car_15 = $root.wm.protobuf.TournamentCar.fromObject(object.car_15); + } + if (object.car_16 != null) { + if (typeof object.car_16 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_16: object expected"); + message.car_16 = $root.wm.protobuf.TournamentCar.fromObject(object.car_16); + } + if (object.car_17 != null) { + if (typeof object.car_17 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_17: object expected"); + message.car_17 = $root.wm.protobuf.TournamentCar.fromObject(object.car_17); + } + if (object.car_18 != null) { + if (typeof object.car_18 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_18: object expected"); + message.car_18 = $root.wm.protobuf.TournamentCar.fromObject(object.car_18); + } + if (object.car_19 != null) { + if (typeof object.car_19 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_19: object expected"); + message.car_19 = $root.wm.protobuf.TournamentCar.fromObject(object.car_19); + } + if (object.car_20 != null) { + if (typeof object.car_20 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_20: object expected"); + message.car_20 = $root.wm.protobuf.TournamentCar.fromObject(object.car_20); + } + if (object.car_21 != null) { + if (typeof object.car_21 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_21: object expected"); + message.car_21 = $root.wm.protobuf.TournamentCar.fromObject(object.car_21); + } + if (object.car_22 != null) { + if (typeof object.car_22 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_22: object expected"); + message.car_22 = $root.wm.protobuf.TournamentCar.fromObject(object.car_22); + } + if (object.car_23 != null) { + if (typeof object.car_23 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_23: object expected"); + message.car_23 = $root.wm.protobuf.TournamentCar.fromObject(object.car_23); + } + if (object.car_24 != null) { + if (typeof object.car_24 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_24: object expected"); + message.car_24 = $root.wm.protobuf.TournamentCar.fromObject(object.car_24); + } + if (object.car_25 != null) { + if (typeof object.car_25 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_25: object expected"); + message.car_25 = $root.wm.protobuf.TournamentCar.fromObject(object.car_25); + } + if (object.car_26 != null) { + if (typeof object.car_26 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_26: object expected"); + message.car_26 = $root.wm.protobuf.TournamentCar.fromObject(object.car_26); + } + if (object.car_27 != null) { + if (typeof object.car_27 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_27: object expected"); + message.car_27 = $root.wm.protobuf.TournamentCar.fromObject(object.car_27); + } + if (object.car_28 != null) { + if (typeof object.car_28 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_28: object expected"); + message.car_28 = $root.wm.protobuf.TournamentCar.fromObject(object.car_28); + } + if (object.car_29 != null) { + if (typeof object.car_29 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_29: object expected"); + message.car_29 = $root.wm.protobuf.TournamentCar.fromObject(object.car_29); + } + if (object.car_30 != null) { + if (typeof object.car_30 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_30: object expected"); + message.car_30 = $root.wm.protobuf.TournamentCar.fromObject(object.car_30); + } + if (object.car_31 != null) { + if (typeof object.car_31 !== "object") + throw TypeError(".wm.protobuf.TournamentCarList.car_31: object expected"); + message.car_31 = $root.wm.protobuf.TournamentCar.fromObject(object.car_31); + } + return message; + }; + + /** + * Creates a plain object from a TournamentCarList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TournamentCarList + * @static + * @param {wm.protobuf.TournamentCarList} message TournamentCarList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TournamentCarList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car_00 = null; + object.car_01 = null; + object.car_02 = null; + object.car_03 = null; + object.car_04 = null; + object.car_05 = null; + object.car_06 = null; + object.car_07 = null; + object.car_08 = null; + object.car_09 = null; + object.car_10 = null; + object.car_11 = null; + object.car_12 = null; + object.car_13 = null; + object.car_14 = null; + object.car_15 = null; + object.car_16 = null; + object.car_17 = null; + object.car_18 = null; + object.car_19 = null; + object.car_20 = null; + object.car_21 = null; + object.car_22 = null; + object.car_23 = null; + object.car_24 = null; + object.car_25 = null; + object.car_26 = null; + object.car_27 = null; + object.car_28 = null; + object.car_29 = null; + object.car_30 = null; + object.car_31 = null; + } + if (message.car_00 != null && message.hasOwnProperty("car_00")) + object.car_00 = $root.wm.protobuf.TournamentCar.toObject(message.car_00, options); + if (message.car_01 != null && message.hasOwnProperty("car_01")) + object.car_01 = $root.wm.protobuf.TournamentCar.toObject(message.car_01, options); + if (message.car_02 != null && message.hasOwnProperty("car_02")) + object.car_02 = $root.wm.protobuf.TournamentCar.toObject(message.car_02, options); + if (message.car_03 != null && message.hasOwnProperty("car_03")) + object.car_03 = $root.wm.protobuf.TournamentCar.toObject(message.car_03, options); + if (message.car_04 != null && message.hasOwnProperty("car_04")) + object.car_04 = $root.wm.protobuf.TournamentCar.toObject(message.car_04, options); + if (message.car_05 != null && message.hasOwnProperty("car_05")) + object.car_05 = $root.wm.protobuf.TournamentCar.toObject(message.car_05, options); + if (message.car_06 != null && message.hasOwnProperty("car_06")) + object.car_06 = $root.wm.protobuf.TournamentCar.toObject(message.car_06, options); + if (message.car_07 != null && message.hasOwnProperty("car_07")) + object.car_07 = $root.wm.protobuf.TournamentCar.toObject(message.car_07, options); + if (message.car_08 != null && message.hasOwnProperty("car_08")) + object.car_08 = $root.wm.protobuf.TournamentCar.toObject(message.car_08, options); + if (message.car_09 != null && message.hasOwnProperty("car_09")) + object.car_09 = $root.wm.protobuf.TournamentCar.toObject(message.car_09, options); + if (message.car_10 != null && message.hasOwnProperty("car_10")) + object.car_10 = $root.wm.protobuf.TournamentCar.toObject(message.car_10, options); + if (message.car_11 != null && message.hasOwnProperty("car_11")) + object.car_11 = $root.wm.protobuf.TournamentCar.toObject(message.car_11, options); + if (message.car_12 != null && message.hasOwnProperty("car_12")) + object.car_12 = $root.wm.protobuf.TournamentCar.toObject(message.car_12, options); + if (message.car_13 != null && message.hasOwnProperty("car_13")) + object.car_13 = $root.wm.protobuf.TournamentCar.toObject(message.car_13, options); + if (message.car_14 != null && message.hasOwnProperty("car_14")) + object.car_14 = $root.wm.protobuf.TournamentCar.toObject(message.car_14, options); + if (message.car_15 != null && message.hasOwnProperty("car_15")) + object.car_15 = $root.wm.protobuf.TournamentCar.toObject(message.car_15, options); + if (message.car_16 != null && message.hasOwnProperty("car_16")) + object.car_16 = $root.wm.protobuf.TournamentCar.toObject(message.car_16, options); + if (message.car_17 != null && message.hasOwnProperty("car_17")) + object.car_17 = $root.wm.protobuf.TournamentCar.toObject(message.car_17, options); + if (message.car_18 != null && message.hasOwnProperty("car_18")) + object.car_18 = $root.wm.protobuf.TournamentCar.toObject(message.car_18, options); + if (message.car_19 != null && message.hasOwnProperty("car_19")) + object.car_19 = $root.wm.protobuf.TournamentCar.toObject(message.car_19, options); + if (message.car_20 != null && message.hasOwnProperty("car_20")) + object.car_20 = $root.wm.protobuf.TournamentCar.toObject(message.car_20, options); + if (message.car_21 != null && message.hasOwnProperty("car_21")) + object.car_21 = $root.wm.protobuf.TournamentCar.toObject(message.car_21, options); + if (message.car_22 != null && message.hasOwnProperty("car_22")) + object.car_22 = $root.wm.protobuf.TournamentCar.toObject(message.car_22, options); + if (message.car_23 != null && message.hasOwnProperty("car_23")) + object.car_23 = $root.wm.protobuf.TournamentCar.toObject(message.car_23, options); + if (message.car_24 != null && message.hasOwnProperty("car_24")) + object.car_24 = $root.wm.protobuf.TournamentCar.toObject(message.car_24, options); + if (message.car_25 != null && message.hasOwnProperty("car_25")) + object.car_25 = $root.wm.protobuf.TournamentCar.toObject(message.car_25, options); + if (message.car_26 != null && message.hasOwnProperty("car_26")) + object.car_26 = $root.wm.protobuf.TournamentCar.toObject(message.car_26, options); + if (message.car_27 != null && message.hasOwnProperty("car_27")) + object.car_27 = $root.wm.protobuf.TournamentCar.toObject(message.car_27, options); + if (message.car_28 != null && message.hasOwnProperty("car_28")) + object.car_28 = $root.wm.protobuf.TournamentCar.toObject(message.car_28, options); + if (message.car_29 != null && message.hasOwnProperty("car_29")) + object.car_29 = $root.wm.protobuf.TournamentCar.toObject(message.car_29, options); + if (message.car_30 != null && message.hasOwnProperty("car_30")) + object.car_30 = $root.wm.protobuf.TournamentCar.toObject(message.car_30, options); + if (message.car_31 != null && message.hasOwnProperty("car_31")) + object.car_31 = $root.wm.protobuf.TournamentCar.toObject(message.car_31, options); + return object; + }; + + /** + * Converts this TournamentCarList to JSON. + * @function toJSON + * @memberof wm.protobuf.TournamentCarList + * @instance + * @returns {Object.} JSON object + */ + TournamentCarList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TournamentCarList + * @function getTypeUrl + * @memberof wm.protobuf.TournamentCarList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TournamentCarList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TournamentCarList"; + }; + + return TournamentCarList; + })(); + + protobuf.TournamentRaceData = (function() { + + /** + * Properties of a TournamentRaceData. + * @memberof wm.protobuf + * @interface ITournamentRaceData + * @property {number|null} [raceNumber] TournamentRaceData raceNumber + * @property {number|null} [roundNumber] TournamentRaceData roundNumber + * @property {number|null} [gameNumber] TournamentRaceData gameNumber + * @property {number} player_00 TournamentRaceData player_00 + * @property {number} player_01 TournamentRaceData player_01 + * @property {number} player_02 TournamentRaceData player_02 + * @property {number} player_03 TournamentRaceData player_03 + * @property {number} result_00 TournamentRaceData result_00 + * @property {number} result_01 TournamentRaceData result_01 + * @property {number} result_02 TournamentRaceData result_02 + * @property {number} result_03 TournamentRaceData result_03 + */ + + /** + * Constructs a new TournamentRaceData. + * @memberof wm.protobuf + * @classdesc Represents a TournamentRaceData. + * @implements ITournamentRaceData + * @constructor + * @param {wm.protobuf.ITournamentRaceData=} [properties] Properties to set + */ + function TournamentRaceData(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TournamentRaceData raceNumber. + * @member {number} raceNumber + * @memberof wm.protobuf.TournamentRaceData + * @instance + */ + TournamentRaceData.prototype.raceNumber = 0; + + /** + * TournamentRaceData roundNumber. + * @member {number} roundNumber + * @memberof wm.protobuf.TournamentRaceData + * @instance + */ + TournamentRaceData.prototype.roundNumber = 0; + + /** + * TournamentRaceData gameNumber. + * @member {number} gameNumber + * @memberof wm.protobuf.TournamentRaceData + * @instance + */ + TournamentRaceData.prototype.gameNumber = 0; + + /** + * TournamentRaceData player_00. + * @member {number} player_00 + * @memberof wm.protobuf.TournamentRaceData + * @instance + */ + TournamentRaceData.prototype.player_00 = 0; + + /** + * TournamentRaceData player_01. + * @member {number} player_01 + * @memberof wm.protobuf.TournamentRaceData + * @instance + */ + TournamentRaceData.prototype.player_01 = 0; + + /** + * TournamentRaceData player_02. + * @member {number} player_02 + * @memberof wm.protobuf.TournamentRaceData + * @instance + */ + TournamentRaceData.prototype.player_02 = 0; + + /** + * TournamentRaceData player_03. + * @member {number} player_03 + * @memberof wm.protobuf.TournamentRaceData + * @instance + */ + TournamentRaceData.prototype.player_03 = 0; + + /** + * TournamentRaceData result_00. + * @member {number} result_00 + * @memberof wm.protobuf.TournamentRaceData + * @instance + */ + TournamentRaceData.prototype.result_00 = 0; + + /** + * TournamentRaceData result_01. + * @member {number} result_01 + * @memberof wm.protobuf.TournamentRaceData + * @instance + */ + TournamentRaceData.prototype.result_01 = 0; + + /** + * TournamentRaceData result_02. + * @member {number} result_02 + * @memberof wm.protobuf.TournamentRaceData + * @instance + */ + TournamentRaceData.prototype.result_02 = 0; + + /** + * TournamentRaceData result_03. + * @member {number} result_03 + * @memberof wm.protobuf.TournamentRaceData + * @instance + */ + TournamentRaceData.prototype.result_03 = 0; + + /** + * Creates a new TournamentRaceData instance using the specified properties. + * @function create + * @memberof wm.protobuf.TournamentRaceData + * @static + * @param {wm.protobuf.ITournamentRaceData=} [properties] Properties to set + * @returns {wm.protobuf.TournamentRaceData} TournamentRaceData instance + */ + TournamentRaceData.create = function create(properties) { + return new TournamentRaceData(properties); + }; + + /** + * Encodes the specified TournamentRaceData message. Does not implicitly {@link wm.protobuf.TournamentRaceData.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TournamentRaceData + * @static + * @param {wm.protobuf.ITournamentRaceData} message TournamentRaceData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TournamentRaceData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.raceNumber != null && Object.hasOwnProperty.call(message, "raceNumber")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.raceNumber); + if (message.roundNumber != null && Object.hasOwnProperty.call(message, "roundNumber")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.roundNumber); + if (message.gameNumber != null && Object.hasOwnProperty.call(message, "gameNumber")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.gameNumber); + writer.uint32(/* id 4, wireType 0 =*/32).sint32(message.player_00); + writer.uint32(/* id 5, wireType 0 =*/40).sint32(message.player_01); + writer.uint32(/* id 6, wireType 0 =*/48).sint32(message.player_02); + writer.uint32(/* id 7, wireType 0 =*/56).sint32(message.player_03); + writer.uint32(/* id 8, wireType 0 =*/64).sint32(message.result_00); + writer.uint32(/* id 9, wireType 0 =*/72).sint32(message.result_01); + writer.uint32(/* id 10, wireType 0 =*/80).sint32(message.result_02); + writer.uint32(/* id 11, wireType 0 =*/88).sint32(message.result_03); + return writer; + }; + + /** + * Encodes the specified TournamentRaceData message, length delimited. Does not implicitly {@link wm.protobuf.TournamentRaceData.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TournamentRaceData + * @static + * @param {wm.protobuf.ITournamentRaceData} message TournamentRaceData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TournamentRaceData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TournamentRaceData message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TournamentRaceData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TournamentRaceData} TournamentRaceData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TournamentRaceData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TournamentRaceData(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.raceNumber = reader.uint32(); + break; + } + case 2: { + message.roundNumber = reader.uint32(); + break; + } + case 3: { + message.gameNumber = reader.uint32(); + break; + } + case 4: { + message.player_00 = reader.sint32(); + break; + } + case 5: { + message.player_01 = reader.sint32(); + break; + } + case 6: { + message.player_02 = reader.sint32(); + break; + } + case 7: { + message.player_03 = reader.sint32(); + break; + } + case 8: { + message.result_00 = reader.sint32(); + break; + } + case 9: { + message.result_01 = reader.sint32(); + break; + } + case 10: { + message.result_02 = reader.sint32(); + break; + } + case 11: { + message.result_03 = reader.sint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("player_00")) + throw $util.ProtocolError("missing required 'player_00'", { instance: message }); + if (!message.hasOwnProperty("player_01")) + throw $util.ProtocolError("missing required 'player_01'", { instance: message }); + if (!message.hasOwnProperty("player_02")) + throw $util.ProtocolError("missing required 'player_02'", { instance: message }); + if (!message.hasOwnProperty("player_03")) + throw $util.ProtocolError("missing required 'player_03'", { instance: message }); + if (!message.hasOwnProperty("result_00")) + throw $util.ProtocolError("missing required 'result_00'", { instance: message }); + if (!message.hasOwnProperty("result_01")) + throw $util.ProtocolError("missing required 'result_01'", { instance: message }); + if (!message.hasOwnProperty("result_02")) + throw $util.ProtocolError("missing required 'result_02'", { instance: message }); + if (!message.hasOwnProperty("result_03")) + throw $util.ProtocolError("missing required 'result_03'", { instance: message }); + return message; + }; + + /** + * Decodes a TournamentRaceData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TournamentRaceData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TournamentRaceData} TournamentRaceData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TournamentRaceData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TournamentRaceData message. + * @function verify + * @memberof wm.protobuf.TournamentRaceData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TournamentRaceData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.raceNumber != null && message.hasOwnProperty("raceNumber")) + if (!$util.isInteger(message.raceNumber)) + return "raceNumber: integer expected"; + if (message.roundNumber != null && message.hasOwnProperty("roundNumber")) + if (!$util.isInteger(message.roundNumber)) + return "roundNumber: integer expected"; + if (message.gameNumber != null && message.hasOwnProperty("gameNumber")) + if (!$util.isInteger(message.gameNumber)) + return "gameNumber: integer expected"; + if (!$util.isInteger(message.player_00)) + return "player_00: integer expected"; + if (!$util.isInteger(message.player_01)) + return "player_01: integer expected"; + if (!$util.isInteger(message.player_02)) + return "player_02: integer expected"; + if (!$util.isInteger(message.player_03)) + return "player_03: integer expected"; + if (!$util.isInteger(message.result_00)) + return "result_00: integer expected"; + if (!$util.isInteger(message.result_01)) + return "result_01: integer expected"; + if (!$util.isInteger(message.result_02)) + return "result_02: integer expected"; + if (!$util.isInteger(message.result_03)) + return "result_03: integer expected"; + return null; + }; + + /** + * Creates a TournamentRaceData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TournamentRaceData + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TournamentRaceData} TournamentRaceData + */ + TournamentRaceData.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TournamentRaceData) + return object; + let message = new $root.wm.protobuf.TournamentRaceData(); + if (object.raceNumber != null) + message.raceNumber = object.raceNumber >>> 0; + if (object.roundNumber != null) + message.roundNumber = object.roundNumber >>> 0; + if (object.gameNumber != null) + message.gameNumber = object.gameNumber >>> 0; + if (object.player_00 != null) + message.player_00 = object.player_00 | 0; + if (object.player_01 != null) + message.player_01 = object.player_01 | 0; + if (object.player_02 != null) + message.player_02 = object.player_02 | 0; + if (object.player_03 != null) + message.player_03 = object.player_03 | 0; + if (object.result_00 != null) + message.result_00 = object.result_00 | 0; + if (object.result_01 != null) + message.result_01 = object.result_01 | 0; + if (object.result_02 != null) + message.result_02 = object.result_02 | 0; + if (object.result_03 != null) + message.result_03 = object.result_03 | 0; + return message; + }; + + /** + * Creates a plain object from a TournamentRaceData message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TournamentRaceData + * @static + * @param {wm.protobuf.TournamentRaceData} message TournamentRaceData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TournamentRaceData.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.raceNumber = 0; + object.roundNumber = 0; + object.gameNumber = 0; + object.player_00 = 0; + object.player_01 = 0; + object.player_02 = 0; + object.player_03 = 0; + object.result_00 = 0; + object.result_01 = 0; + object.result_02 = 0; + object.result_03 = 0; + } + if (message.raceNumber != null && message.hasOwnProperty("raceNumber")) + object.raceNumber = message.raceNumber; + if (message.roundNumber != null && message.hasOwnProperty("roundNumber")) + object.roundNumber = message.roundNumber; + if (message.gameNumber != null && message.hasOwnProperty("gameNumber")) + object.gameNumber = message.gameNumber; + if (message.player_00 != null && message.hasOwnProperty("player_00")) + object.player_00 = message.player_00; + if (message.player_01 != null && message.hasOwnProperty("player_01")) + object.player_01 = message.player_01; + if (message.player_02 != null && message.hasOwnProperty("player_02")) + object.player_02 = message.player_02; + if (message.player_03 != null && message.hasOwnProperty("player_03")) + object.player_03 = message.player_03; + if (message.result_00 != null && message.hasOwnProperty("result_00")) + object.result_00 = message.result_00; + if (message.result_01 != null && message.hasOwnProperty("result_01")) + object.result_01 = message.result_01; + if (message.result_02 != null && message.hasOwnProperty("result_02")) + object.result_02 = message.result_02; + if (message.result_03 != null && message.hasOwnProperty("result_03")) + object.result_03 = message.result_03; + return object; + }; + + /** + * Converts this TournamentRaceData to JSON. + * @function toJSON + * @memberof wm.protobuf.TournamentRaceData + * @instance + * @returns {Object.} JSON object + */ + TournamentRaceData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TournamentRaceData + * @function getTypeUrl + * @memberof wm.protobuf.TournamentRaceData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TournamentRaceData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TournamentRaceData"; + }; + + return TournamentRaceData; + })(); + + protobuf.TournamentRaceDataList = (function() { + + /** + * Properties of a TournamentRaceDataList. + * @memberof wm.protobuf + * @interface ITournamentRaceDataList + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_00] TournamentRaceDataList raceData_00 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_01] TournamentRaceDataList raceData_01 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_02] TournamentRaceDataList raceData_02 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_03] TournamentRaceDataList raceData_03 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_04] TournamentRaceDataList raceData_04 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_05] TournamentRaceDataList raceData_05 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_06] TournamentRaceDataList raceData_06 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_07] TournamentRaceDataList raceData_07 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_08] TournamentRaceDataList raceData_08 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_09] TournamentRaceDataList raceData_09 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_10] TournamentRaceDataList raceData_10 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_11] TournamentRaceDataList raceData_11 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_12] TournamentRaceDataList raceData_12 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_13] TournamentRaceDataList raceData_13 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_14] TournamentRaceDataList raceData_14 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_15] TournamentRaceDataList raceData_15 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_16] TournamentRaceDataList raceData_16 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_17] TournamentRaceDataList raceData_17 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_18] TournamentRaceDataList raceData_18 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_19] TournamentRaceDataList raceData_19 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_20] TournamentRaceDataList raceData_20 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_21] TournamentRaceDataList raceData_21 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_22] TournamentRaceDataList raceData_22 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_23] TournamentRaceDataList raceData_23 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_24] TournamentRaceDataList raceData_24 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_25] TournamentRaceDataList raceData_25 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_26] TournamentRaceDataList raceData_26 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_27] TournamentRaceDataList raceData_27 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_28] TournamentRaceDataList raceData_28 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_29] TournamentRaceDataList raceData_29 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_30] TournamentRaceDataList raceData_30 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_31] TournamentRaceDataList raceData_31 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_32] TournamentRaceDataList raceData_32 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_33] TournamentRaceDataList raceData_33 + * @property {wm.protobuf.ITournamentRaceData|null} [raceData_34] TournamentRaceDataList raceData_34 + */ + + /** + * Constructs a new TournamentRaceDataList. + * @memberof wm.protobuf + * @classdesc Represents a TournamentRaceDataList. + * @implements ITournamentRaceDataList + * @constructor + * @param {wm.protobuf.ITournamentRaceDataList=} [properties] Properties to set + */ + function TournamentRaceDataList(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TournamentRaceDataList raceData_00. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_00 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_00 = null; + + /** + * TournamentRaceDataList raceData_01. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_01 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_01 = null; + + /** + * TournamentRaceDataList raceData_02. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_02 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_02 = null; + + /** + * TournamentRaceDataList raceData_03. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_03 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_03 = null; + + /** + * TournamentRaceDataList raceData_04. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_04 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_04 = null; + + /** + * TournamentRaceDataList raceData_05. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_05 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_05 = null; + + /** + * TournamentRaceDataList raceData_06. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_06 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_06 = null; + + /** + * TournamentRaceDataList raceData_07. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_07 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_07 = null; + + /** + * TournamentRaceDataList raceData_08. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_08 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_08 = null; + + /** + * TournamentRaceDataList raceData_09. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_09 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_09 = null; + + /** + * TournamentRaceDataList raceData_10. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_10 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_10 = null; + + /** + * TournamentRaceDataList raceData_11. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_11 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_11 = null; + + /** + * TournamentRaceDataList raceData_12. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_12 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_12 = null; + + /** + * TournamentRaceDataList raceData_13. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_13 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_13 = null; + + /** + * TournamentRaceDataList raceData_14. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_14 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_14 = null; + + /** + * TournamentRaceDataList raceData_15. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_15 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_15 = null; + + /** + * TournamentRaceDataList raceData_16. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_16 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_16 = null; + + /** + * TournamentRaceDataList raceData_17. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_17 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_17 = null; + + /** + * TournamentRaceDataList raceData_18. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_18 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_18 = null; + + /** + * TournamentRaceDataList raceData_19. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_19 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_19 = null; + + /** + * TournamentRaceDataList raceData_20. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_20 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_20 = null; + + /** + * TournamentRaceDataList raceData_21. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_21 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_21 = null; + + /** + * TournamentRaceDataList raceData_22. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_22 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_22 = null; + + /** + * TournamentRaceDataList raceData_23. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_23 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_23 = null; + + /** + * TournamentRaceDataList raceData_24. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_24 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_24 = null; + + /** + * TournamentRaceDataList raceData_25. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_25 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_25 = null; + + /** + * TournamentRaceDataList raceData_26. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_26 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_26 = null; + + /** + * TournamentRaceDataList raceData_27. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_27 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_27 = null; + + /** + * TournamentRaceDataList raceData_28. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_28 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_28 = null; + + /** + * TournamentRaceDataList raceData_29. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_29 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_29 = null; + + /** + * TournamentRaceDataList raceData_30. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_30 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_30 = null; + + /** + * TournamentRaceDataList raceData_31. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_31 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_31 = null; + + /** + * TournamentRaceDataList raceData_32. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_32 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_32 = null; + + /** + * TournamentRaceDataList raceData_33. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_33 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_33 = null; + + /** + * TournamentRaceDataList raceData_34. + * @member {wm.protobuf.ITournamentRaceData|null|undefined} raceData_34 + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + */ + TournamentRaceDataList.prototype.raceData_34 = null; + + /** + * Creates a new TournamentRaceDataList instance using the specified properties. + * @function create + * @memberof wm.protobuf.TournamentRaceDataList + * @static + * @param {wm.protobuf.ITournamentRaceDataList=} [properties] Properties to set + * @returns {wm.protobuf.TournamentRaceDataList} TournamentRaceDataList instance + */ + TournamentRaceDataList.create = function create(properties) { + return new TournamentRaceDataList(properties); + }; + + /** + * Encodes the specified TournamentRaceDataList message. Does not implicitly {@link wm.protobuf.TournamentRaceDataList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TournamentRaceDataList + * @static + * @param {wm.protobuf.ITournamentRaceDataList} message TournamentRaceDataList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TournamentRaceDataList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.raceData_00 != null && Object.hasOwnProperty.call(message, "raceData_00")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_00, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.raceData_01 != null && Object.hasOwnProperty.call(message, "raceData_01")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_01, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.raceData_02 != null && Object.hasOwnProperty.call(message, "raceData_02")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_02, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.raceData_03 != null && Object.hasOwnProperty.call(message, "raceData_03")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_03, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.raceData_04 != null && Object.hasOwnProperty.call(message, "raceData_04")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_04, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.raceData_05 != null && Object.hasOwnProperty.call(message, "raceData_05")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_05, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.raceData_06 != null && Object.hasOwnProperty.call(message, "raceData_06")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_06, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.raceData_07 != null && Object.hasOwnProperty.call(message, "raceData_07")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_07, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.raceData_08 != null && Object.hasOwnProperty.call(message, "raceData_08")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_08, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.raceData_09 != null && Object.hasOwnProperty.call(message, "raceData_09")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_09, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.raceData_10 != null && Object.hasOwnProperty.call(message, "raceData_10")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_10, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.raceData_11 != null && Object.hasOwnProperty.call(message, "raceData_11")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_11, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.raceData_12 != null && Object.hasOwnProperty.call(message, "raceData_12")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_12, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.raceData_13 != null && Object.hasOwnProperty.call(message, "raceData_13")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_13, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.raceData_14 != null && Object.hasOwnProperty.call(message, "raceData_14")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_14, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.raceData_15 != null && Object.hasOwnProperty.call(message, "raceData_15")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_15, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.raceData_16 != null && Object.hasOwnProperty.call(message, "raceData_16")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_16, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.raceData_17 != null && Object.hasOwnProperty.call(message, "raceData_17")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_17, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.raceData_18 != null && Object.hasOwnProperty.call(message, "raceData_18")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_18, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.raceData_19 != null && Object.hasOwnProperty.call(message, "raceData_19")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_19, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.raceData_20 != null && Object.hasOwnProperty.call(message, "raceData_20")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_20, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.raceData_21 != null && Object.hasOwnProperty.call(message, "raceData_21")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_21, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.raceData_22 != null && Object.hasOwnProperty.call(message, "raceData_22")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_22, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.raceData_23 != null && Object.hasOwnProperty.call(message, "raceData_23")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_23, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.raceData_24 != null && Object.hasOwnProperty.call(message, "raceData_24")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_24, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.raceData_25 != null && Object.hasOwnProperty.call(message, "raceData_25")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_25, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.raceData_26 != null && Object.hasOwnProperty.call(message, "raceData_26")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_26, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.raceData_27 != null && Object.hasOwnProperty.call(message, "raceData_27")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_27, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.raceData_28 != null && Object.hasOwnProperty.call(message, "raceData_28")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_28, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.raceData_29 != null && Object.hasOwnProperty.call(message, "raceData_29")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_29, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.raceData_30 != null && Object.hasOwnProperty.call(message, "raceData_30")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_30, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.raceData_31 != null && Object.hasOwnProperty.call(message, "raceData_31")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_31, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + if (message.raceData_32 != null && Object.hasOwnProperty.call(message, "raceData_32")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_32, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); + if (message.raceData_33 != null && Object.hasOwnProperty.call(message, "raceData_33")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_33, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.raceData_34 != null && Object.hasOwnProperty.call(message, "raceData_34")) + $root.wm.protobuf.TournamentRaceData.encode(message.raceData_34, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TournamentRaceDataList message, length delimited. Does not implicitly {@link wm.protobuf.TournamentRaceDataList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TournamentRaceDataList + * @static + * @param {wm.protobuf.ITournamentRaceDataList} message TournamentRaceDataList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TournamentRaceDataList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TournamentRaceDataList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TournamentRaceDataList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TournamentRaceDataList} TournamentRaceDataList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TournamentRaceDataList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TournamentRaceDataList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.raceData_00 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 2: { + message.raceData_01 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 3: { + message.raceData_02 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 4: { + message.raceData_03 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 5: { + message.raceData_04 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 6: { + message.raceData_05 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 7: { + message.raceData_06 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 8: { + message.raceData_07 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 9: { + message.raceData_08 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 10: { + message.raceData_09 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 11: { + message.raceData_10 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 12: { + message.raceData_11 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 13: { + message.raceData_12 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 14: { + message.raceData_13 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 15: { + message.raceData_14 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 16: { + message.raceData_15 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 17: { + message.raceData_16 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 18: { + message.raceData_17 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 19: { + message.raceData_18 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 20: { + message.raceData_19 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 21: { + message.raceData_20 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 22: { + message.raceData_21 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 23: { + message.raceData_22 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 24: { + message.raceData_23 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 25: { + message.raceData_24 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 26: { + message.raceData_25 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 27: { + message.raceData_26 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 28: { + message.raceData_27 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 29: { + message.raceData_28 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 30: { + message.raceData_29 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 31: { + message.raceData_30 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 32: { + message.raceData_31 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 33: { + message.raceData_32 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 34: { + message.raceData_33 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + case 35: { + message.raceData_34 = $root.wm.protobuf.TournamentRaceData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TournamentRaceDataList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TournamentRaceDataList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TournamentRaceDataList} TournamentRaceDataList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TournamentRaceDataList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TournamentRaceDataList message. + * @function verify + * @memberof wm.protobuf.TournamentRaceDataList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TournamentRaceDataList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.raceData_00 != null && message.hasOwnProperty("raceData_00")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_00); + if (error) + return "raceData_00." + error; + } + if (message.raceData_01 != null && message.hasOwnProperty("raceData_01")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_01); + if (error) + return "raceData_01." + error; + } + if (message.raceData_02 != null && message.hasOwnProperty("raceData_02")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_02); + if (error) + return "raceData_02." + error; + } + if (message.raceData_03 != null && message.hasOwnProperty("raceData_03")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_03); + if (error) + return "raceData_03." + error; + } + if (message.raceData_04 != null && message.hasOwnProperty("raceData_04")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_04); + if (error) + return "raceData_04." + error; + } + if (message.raceData_05 != null && message.hasOwnProperty("raceData_05")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_05); + if (error) + return "raceData_05." + error; + } + if (message.raceData_06 != null && message.hasOwnProperty("raceData_06")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_06); + if (error) + return "raceData_06." + error; + } + if (message.raceData_07 != null && message.hasOwnProperty("raceData_07")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_07); + if (error) + return "raceData_07." + error; + } + if (message.raceData_08 != null && message.hasOwnProperty("raceData_08")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_08); + if (error) + return "raceData_08." + error; + } + if (message.raceData_09 != null && message.hasOwnProperty("raceData_09")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_09); + if (error) + return "raceData_09." + error; + } + if (message.raceData_10 != null && message.hasOwnProperty("raceData_10")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_10); + if (error) + return "raceData_10." + error; + } + if (message.raceData_11 != null && message.hasOwnProperty("raceData_11")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_11); + if (error) + return "raceData_11." + error; + } + if (message.raceData_12 != null && message.hasOwnProperty("raceData_12")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_12); + if (error) + return "raceData_12." + error; + } + if (message.raceData_13 != null && message.hasOwnProperty("raceData_13")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_13); + if (error) + return "raceData_13." + error; + } + if (message.raceData_14 != null && message.hasOwnProperty("raceData_14")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_14); + if (error) + return "raceData_14." + error; + } + if (message.raceData_15 != null && message.hasOwnProperty("raceData_15")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_15); + if (error) + return "raceData_15." + error; + } + if (message.raceData_16 != null && message.hasOwnProperty("raceData_16")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_16); + if (error) + return "raceData_16." + error; + } + if (message.raceData_17 != null && message.hasOwnProperty("raceData_17")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_17); + if (error) + return "raceData_17." + error; + } + if (message.raceData_18 != null && message.hasOwnProperty("raceData_18")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_18); + if (error) + return "raceData_18." + error; + } + if (message.raceData_19 != null && message.hasOwnProperty("raceData_19")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_19); + if (error) + return "raceData_19." + error; + } + if (message.raceData_20 != null && message.hasOwnProperty("raceData_20")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_20); + if (error) + return "raceData_20." + error; + } + if (message.raceData_21 != null && message.hasOwnProperty("raceData_21")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_21); + if (error) + return "raceData_21." + error; + } + if (message.raceData_22 != null && message.hasOwnProperty("raceData_22")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_22); + if (error) + return "raceData_22." + error; + } + if (message.raceData_23 != null && message.hasOwnProperty("raceData_23")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_23); + if (error) + return "raceData_23." + error; + } + if (message.raceData_24 != null && message.hasOwnProperty("raceData_24")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_24); + if (error) + return "raceData_24." + error; + } + if (message.raceData_25 != null && message.hasOwnProperty("raceData_25")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_25); + if (error) + return "raceData_25." + error; + } + if (message.raceData_26 != null && message.hasOwnProperty("raceData_26")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_26); + if (error) + return "raceData_26." + error; + } + if (message.raceData_27 != null && message.hasOwnProperty("raceData_27")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_27); + if (error) + return "raceData_27." + error; + } + if (message.raceData_28 != null && message.hasOwnProperty("raceData_28")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_28); + if (error) + return "raceData_28." + error; + } + if (message.raceData_29 != null && message.hasOwnProperty("raceData_29")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_29); + if (error) + return "raceData_29." + error; + } + if (message.raceData_30 != null && message.hasOwnProperty("raceData_30")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_30); + if (error) + return "raceData_30." + error; + } + if (message.raceData_31 != null && message.hasOwnProperty("raceData_31")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_31); + if (error) + return "raceData_31." + error; + } + if (message.raceData_32 != null && message.hasOwnProperty("raceData_32")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_32); + if (error) + return "raceData_32." + error; + } + if (message.raceData_33 != null && message.hasOwnProperty("raceData_33")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_33); + if (error) + return "raceData_33." + error; + } + if (message.raceData_34 != null && message.hasOwnProperty("raceData_34")) { + let error = $root.wm.protobuf.TournamentRaceData.verify(message.raceData_34); + if (error) + return "raceData_34." + error; + } + return null; + }; + + /** + * Creates a TournamentRaceDataList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TournamentRaceDataList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TournamentRaceDataList} TournamentRaceDataList + */ + TournamentRaceDataList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TournamentRaceDataList) + return object; + let message = new $root.wm.protobuf.TournamentRaceDataList(); + if (object.raceData_00 != null) { + if (typeof object.raceData_00 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_00: object expected"); + message.raceData_00 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_00); + } + if (object.raceData_01 != null) { + if (typeof object.raceData_01 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_01: object expected"); + message.raceData_01 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_01); + } + if (object.raceData_02 != null) { + if (typeof object.raceData_02 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_02: object expected"); + message.raceData_02 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_02); + } + if (object.raceData_03 != null) { + if (typeof object.raceData_03 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_03: object expected"); + message.raceData_03 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_03); + } + if (object.raceData_04 != null) { + if (typeof object.raceData_04 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_04: object expected"); + message.raceData_04 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_04); + } + if (object.raceData_05 != null) { + if (typeof object.raceData_05 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_05: object expected"); + message.raceData_05 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_05); + } + if (object.raceData_06 != null) { + if (typeof object.raceData_06 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_06: object expected"); + message.raceData_06 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_06); + } + if (object.raceData_07 != null) { + if (typeof object.raceData_07 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_07: object expected"); + message.raceData_07 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_07); + } + if (object.raceData_08 != null) { + if (typeof object.raceData_08 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_08: object expected"); + message.raceData_08 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_08); + } + if (object.raceData_09 != null) { + if (typeof object.raceData_09 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_09: object expected"); + message.raceData_09 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_09); + } + if (object.raceData_10 != null) { + if (typeof object.raceData_10 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_10: object expected"); + message.raceData_10 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_10); + } + if (object.raceData_11 != null) { + if (typeof object.raceData_11 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_11: object expected"); + message.raceData_11 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_11); + } + if (object.raceData_12 != null) { + if (typeof object.raceData_12 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_12: object expected"); + message.raceData_12 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_12); + } + if (object.raceData_13 != null) { + if (typeof object.raceData_13 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_13: object expected"); + message.raceData_13 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_13); + } + if (object.raceData_14 != null) { + if (typeof object.raceData_14 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_14: object expected"); + message.raceData_14 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_14); + } + if (object.raceData_15 != null) { + if (typeof object.raceData_15 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_15: object expected"); + message.raceData_15 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_15); + } + if (object.raceData_16 != null) { + if (typeof object.raceData_16 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_16: object expected"); + message.raceData_16 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_16); + } + if (object.raceData_17 != null) { + if (typeof object.raceData_17 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_17: object expected"); + message.raceData_17 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_17); + } + if (object.raceData_18 != null) { + if (typeof object.raceData_18 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_18: object expected"); + message.raceData_18 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_18); + } + if (object.raceData_19 != null) { + if (typeof object.raceData_19 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_19: object expected"); + message.raceData_19 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_19); + } + if (object.raceData_20 != null) { + if (typeof object.raceData_20 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_20: object expected"); + message.raceData_20 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_20); + } + if (object.raceData_21 != null) { + if (typeof object.raceData_21 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_21: object expected"); + message.raceData_21 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_21); + } + if (object.raceData_22 != null) { + if (typeof object.raceData_22 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_22: object expected"); + message.raceData_22 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_22); + } + if (object.raceData_23 != null) { + if (typeof object.raceData_23 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_23: object expected"); + message.raceData_23 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_23); + } + if (object.raceData_24 != null) { + if (typeof object.raceData_24 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_24: object expected"); + message.raceData_24 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_24); + } + if (object.raceData_25 != null) { + if (typeof object.raceData_25 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_25: object expected"); + message.raceData_25 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_25); + } + if (object.raceData_26 != null) { + if (typeof object.raceData_26 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_26: object expected"); + message.raceData_26 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_26); + } + if (object.raceData_27 != null) { + if (typeof object.raceData_27 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_27: object expected"); + message.raceData_27 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_27); + } + if (object.raceData_28 != null) { + if (typeof object.raceData_28 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_28: object expected"); + message.raceData_28 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_28); + } + if (object.raceData_29 != null) { + if (typeof object.raceData_29 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_29: object expected"); + message.raceData_29 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_29); + } + if (object.raceData_30 != null) { + if (typeof object.raceData_30 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_30: object expected"); + message.raceData_30 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_30); + } + if (object.raceData_31 != null) { + if (typeof object.raceData_31 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_31: object expected"); + message.raceData_31 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_31); + } + if (object.raceData_32 != null) { + if (typeof object.raceData_32 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_32: object expected"); + message.raceData_32 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_32); + } + if (object.raceData_33 != null) { + if (typeof object.raceData_33 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_33: object expected"); + message.raceData_33 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_33); + } + if (object.raceData_34 != null) { + if (typeof object.raceData_34 !== "object") + throw TypeError(".wm.protobuf.TournamentRaceDataList.raceData_34: object expected"); + message.raceData_34 = $root.wm.protobuf.TournamentRaceData.fromObject(object.raceData_34); + } + return message; + }; + + /** + * Creates a plain object from a TournamentRaceDataList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TournamentRaceDataList + * @static + * @param {wm.protobuf.TournamentRaceDataList} message TournamentRaceDataList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TournamentRaceDataList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.raceData_00 = null; + object.raceData_01 = null; + object.raceData_02 = null; + object.raceData_03 = null; + object.raceData_04 = null; + object.raceData_05 = null; + object.raceData_06 = null; + object.raceData_07 = null; + object.raceData_08 = null; + object.raceData_09 = null; + object.raceData_10 = null; + object.raceData_11 = null; + object.raceData_12 = null; + object.raceData_13 = null; + object.raceData_14 = null; + object.raceData_15 = null; + object.raceData_16 = null; + object.raceData_17 = null; + object.raceData_18 = null; + object.raceData_19 = null; + object.raceData_20 = null; + object.raceData_21 = null; + object.raceData_22 = null; + object.raceData_23 = null; + object.raceData_24 = null; + object.raceData_25 = null; + object.raceData_26 = null; + object.raceData_27 = null; + object.raceData_28 = null; + object.raceData_29 = null; + object.raceData_30 = null; + object.raceData_31 = null; + object.raceData_32 = null; + object.raceData_33 = null; + object.raceData_34 = null; + } + if (message.raceData_00 != null && message.hasOwnProperty("raceData_00")) + object.raceData_00 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_00, options); + if (message.raceData_01 != null && message.hasOwnProperty("raceData_01")) + object.raceData_01 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_01, options); + if (message.raceData_02 != null && message.hasOwnProperty("raceData_02")) + object.raceData_02 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_02, options); + if (message.raceData_03 != null && message.hasOwnProperty("raceData_03")) + object.raceData_03 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_03, options); + if (message.raceData_04 != null && message.hasOwnProperty("raceData_04")) + object.raceData_04 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_04, options); + if (message.raceData_05 != null && message.hasOwnProperty("raceData_05")) + object.raceData_05 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_05, options); + if (message.raceData_06 != null && message.hasOwnProperty("raceData_06")) + object.raceData_06 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_06, options); + if (message.raceData_07 != null && message.hasOwnProperty("raceData_07")) + object.raceData_07 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_07, options); + if (message.raceData_08 != null && message.hasOwnProperty("raceData_08")) + object.raceData_08 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_08, options); + if (message.raceData_09 != null && message.hasOwnProperty("raceData_09")) + object.raceData_09 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_09, options); + if (message.raceData_10 != null && message.hasOwnProperty("raceData_10")) + object.raceData_10 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_10, options); + if (message.raceData_11 != null && message.hasOwnProperty("raceData_11")) + object.raceData_11 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_11, options); + if (message.raceData_12 != null && message.hasOwnProperty("raceData_12")) + object.raceData_12 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_12, options); + if (message.raceData_13 != null && message.hasOwnProperty("raceData_13")) + object.raceData_13 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_13, options); + if (message.raceData_14 != null && message.hasOwnProperty("raceData_14")) + object.raceData_14 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_14, options); + if (message.raceData_15 != null && message.hasOwnProperty("raceData_15")) + object.raceData_15 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_15, options); + if (message.raceData_16 != null && message.hasOwnProperty("raceData_16")) + object.raceData_16 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_16, options); + if (message.raceData_17 != null && message.hasOwnProperty("raceData_17")) + object.raceData_17 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_17, options); + if (message.raceData_18 != null && message.hasOwnProperty("raceData_18")) + object.raceData_18 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_18, options); + if (message.raceData_19 != null && message.hasOwnProperty("raceData_19")) + object.raceData_19 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_19, options); + if (message.raceData_20 != null && message.hasOwnProperty("raceData_20")) + object.raceData_20 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_20, options); + if (message.raceData_21 != null && message.hasOwnProperty("raceData_21")) + object.raceData_21 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_21, options); + if (message.raceData_22 != null && message.hasOwnProperty("raceData_22")) + object.raceData_22 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_22, options); + if (message.raceData_23 != null && message.hasOwnProperty("raceData_23")) + object.raceData_23 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_23, options); + if (message.raceData_24 != null && message.hasOwnProperty("raceData_24")) + object.raceData_24 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_24, options); + if (message.raceData_25 != null && message.hasOwnProperty("raceData_25")) + object.raceData_25 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_25, options); + if (message.raceData_26 != null && message.hasOwnProperty("raceData_26")) + object.raceData_26 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_26, options); + if (message.raceData_27 != null && message.hasOwnProperty("raceData_27")) + object.raceData_27 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_27, options); + if (message.raceData_28 != null && message.hasOwnProperty("raceData_28")) + object.raceData_28 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_28, options); + if (message.raceData_29 != null && message.hasOwnProperty("raceData_29")) + object.raceData_29 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_29, options); + if (message.raceData_30 != null && message.hasOwnProperty("raceData_30")) + object.raceData_30 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_30, options); + if (message.raceData_31 != null && message.hasOwnProperty("raceData_31")) + object.raceData_31 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_31, options); + if (message.raceData_32 != null && message.hasOwnProperty("raceData_32")) + object.raceData_32 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_32, options); + if (message.raceData_33 != null && message.hasOwnProperty("raceData_33")) + object.raceData_33 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_33, options); + if (message.raceData_34 != null && message.hasOwnProperty("raceData_34")) + object.raceData_34 = $root.wm.protobuf.TournamentRaceData.toObject(message.raceData_34, options); + return object; + }; + + /** + * Converts this TournamentRaceDataList to JSON. + * @function toJSON + * @memberof wm.protobuf.TournamentRaceDataList + * @instance + * @returns {Object.} JSON object + */ + TournamentRaceDataList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TournamentRaceDataList + * @function getTypeUrl + * @memberof wm.protobuf.TournamentRaceDataList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TournamentRaceDataList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TournamentRaceDataList"; + }; + + return TournamentRaceDataList; + })(); + + protobuf.TournamentResult = (function() { + + /** + * Properties of a TournamentResult. + * @memberof wm.protobuf + * @interface ITournamentResult + * @property {wm.protobuf.ICar|null} [car] TournamentResult car + * @property {number} rank TournamentResult rank + * @property {number} entryNumber TournamentResult entryNumber + */ + + /** + * Constructs a new TournamentResult. + * @memberof wm.protobuf + * @classdesc Represents a TournamentResult. + * @implements ITournamentResult + * @constructor + * @param {wm.protobuf.ITournamentResult=} [properties] Properties to set + */ + function TournamentResult(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TournamentResult car. + * @member {wm.protobuf.ICar|null|undefined} car + * @memberof wm.protobuf.TournamentResult + * @instance + */ + TournamentResult.prototype.car = null; + + /** + * TournamentResult rank. + * @member {number} rank + * @memberof wm.protobuf.TournamentResult + * @instance + */ + TournamentResult.prototype.rank = 0; + + /** + * TournamentResult entryNumber. + * @member {number} entryNumber + * @memberof wm.protobuf.TournamentResult + * @instance + */ + TournamentResult.prototype.entryNumber = 0; + + /** + * Creates a new TournamentResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.TournamentResult + * @static + * @param {wm.protobuf.ITournamentResult=} [properties] Properties to set + * @returns {wm.protobuf.TournamentResult} TournamentResult instance + */ + TournamentResult.create = function create(properties) { + return new TournamentResult(properties); + }; + + /** + * Encodes the specified TournamentResult message. Does not implicitly {@link wm.protobuf.TournamentResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TournamentResult + * @static + * @param {wm.protobuf.ITournamentResult} message TournamentResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TournamentResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.car != null && Object.hasOwnProperty.call(message, "car")) + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).sint32(message.rank); + writer.uint32(/* id 3, wireType 0 =*/24).sint32(message.entryNumber); + return writer; + }; + + /** + * Encodes the specified TournamentResult message, length delimited. Does not implicitly {@link wm.protobuf.TournamentResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TournamentResult + * @static + * @param {wm.protobuf.ITournamentResult} message TournamentResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TournamentResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TournamentResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TournamentResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TournamentResult} TournamentResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TournamentResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TournamentResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.rank = reader.sint32(); + break; + } + case 3: { + message.entryNumber = reader.sint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("rank")) + throw $util.ProtocolError("missing required 'rank'", { instance: message }); + if (!message.hasOwnProperty("entryNumber")) + throw $util.ProtocolError("missing required 'entryNumber'", { instance: message }); + return message; + }; + + /** + * Decodes a TournamentResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TournamentResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TournamentResult} TournamentResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TournamentResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TournamentResult message. + * @function verify + * @memberof wm.protobuf.TournamentResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TournamentResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.car != null && message.hasOwnProperty("car")) { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (!$util.isInteger(message.entryNumber)) + return "entryNumber: integer expected"; + return null; + }; + + /** + * Creates a TournamentResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TournamentResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TournamentResult} TournamentResult + */ + TournamentResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TournamentResult) + return object; + let message = new $root.wm.protobuf.TournamentResult(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.TournamentResult.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.rank != null) + message.rank = object.rank | 0; + if (object.entryNumber != null) + message.entryNumber = object.entryNumber | 0; + return message; + }; + + /** + * Creates a plain object from a TournamentResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TournamentResult + * @static + * @param {wm.protobuf.TournamentResult} message TournamentResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TournamentResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.rank = 0; + object.entryNumber = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.entryNumber != null && message.hasOwnProperty("entryNumber")) + object.entryNumber = message.entryNumber; + return object; + }; + + /** + * Converts this TournamentResult to JSON. + * @function toJSON + * @memberof wm.protobuf.TournamentResult + * @instance + * @returns {Object.} JSON object + */ + TournamentResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TournamentResult + * @function getTypeUrl + * @memberof wm.protobuf.TournamentResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TournamentResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TournamentResult"; + }; + + return TournamentResult; + })(); + + protobuf.TournamentResultList = (function() { + + /** + * Properties of a TournamentResultList. + * @memberof wm.protobuf + * @interface ITournamentResultList + * @property {wm.protobuf.ITournamentResult|null} [result_00] TournamentResultList result_00 + * @property {wm.protobuf.ITournamentResult|null} [result_01] TournamentResultList result_01 + * @property {wm.protobuf.ITournamentResult|null} [result_02] TournamentResultList result_02 + * @property {wm.protobuf.ITournamentResult|null} [result_03] TournamentResultList result_03 + */ + + /** + * Constructs a new TournamentResultList. + * @memberof wm.protobuf + * @classdesc Represents a TournamentResultList. + * @implements ITournamentResultList + * @constructor + * @param {wm.protobuf.ITournamentResultList=} [properties] Properties to set + */ + function TournamentResultList(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TournamentResultList result_00. + * @member {wm.protobuf.ITournamentResult|null|undefined} result_00 + * @memberof wm.protobuf.TournamentResultList + * @instance + */ + TournamentResultList.prototype.result_00 = null; + + /** + * TournamentResultList result_01. + * @member {wm.protobuf.ITournamentResult|null|undefined} result_01 + * @memberof wm.protobuf.TournamentResultList + * @instance + */ + TournamentResultList.prototype.result_01 = null; + + /** + * TournamentResultList result_02. + * @member {wm.protobuf.ITournamentResult|null|undefined} result_02 + * @memberof wm.protobuf.TournamentResultList + * @instance + */ + TournamentResultList.prototype.result_02 = null; + + /** + * TournamentResultList result_03. + * @member {wm.protobuf.ITournamentResult|null|undefined} result_03 + * @memberof wm.protobuf.TournamentResultList + * @instance + */ + TournamentResultList.prototype.result_03 = null; + + /** + * Creates a new TournamentResultList instance using the specified properties. + * @function create + * @memberof wm.protobuf.TournamentResultList + * @static + * @param {wm.protobuf.ITournamentResultList=} [properties] Properties to set + * @returns {wm.protobuf.TournamentResultList} TournamentResultList instance + */ + TournamentResultList.create = function create(properties) { + return new TournamentResultList(properties); + }; + + /** + * Encodes the specified TournamentResultList message. Does not implicitly {@link wm.protobuf.TournamentResultList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TournamentResultList + * @static + * @param {wm.protobuf.ITournamentResultList} message TournamentResultList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TournamentResultList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result_00 != null && Object.hasOwnProperty.call(message, "result_00")) + $root.wm.protobuf.TournamentResult.encode(message.result_00, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result_01 != null && Object.hasOwnProperty.call(message, "result_01")) + $root.wm.protobuf.TournamentResult.encode(message.result_01, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.result_02 != null && Object.hasOwnProperty.call(message, "result_02")) + $root.wm.protobuf.TournamentResult.encode(message.result_02, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.result_03 != null && Object.hasOwnProperty.call(message, "result_03")) + $root.wm.protobuf.TournamentResult.encode(message.result_03, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TournamentResultList message, length delimited. Does not implicitly {@link wm.protobuf.TournamentResultList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TournamentResultList + * @static + * @param {wm.protobuf.ITournamentResultList} message TournamentResultList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TournamentResultList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TournamentResultList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TournamentResultList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TournamentResultList} TournamentResultList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TournamentResultList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TournamentResultList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result_00 = $root.wm.protobuf.TournamentResult.decode(reader, reader.uint32()); + break; + } + case 2: { + message.result_01 = $root.wm.protobuf.TournamentResult.decode(reader, reader.uint32()); + break; + } + case 3: { + message.result_02 = $root.wm.protobuf.TournamentResult.decode(reader, reader.uint32()); + break; + } + case 4: { + message.result_03 = $root.wm.protobuf.TournamentResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TournamentResultList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TournamentResultList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TournamentResultList} TournamentResultList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TournamentResultList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TournamentResultList message. + * @function verify + * @memberof wm.protobuf.TournamentResultList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TournamentResultList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result_00 != null && message.hasOwnProperty("result_00")) { + let error = $root.wm.protobuf.TournamentResult.verify(message.result_00); + if (error) + return "result_00." + error; + } + if (message.result_01 != null && message.hasOwnProperty("result_01")) { + let error = $root.wm.protobuf.TournamentResult.verify(message.result_01); + if (error) + return "result_01." + error; + } + if (message.result_02 != null && message.hasOwnProperty("result_02")) { + let error = $root.wm.protobuf.TournamentResult.verify(message.result_02); + if (error) + return "result_02." + error; + } + if (message.result_03 != null && message.hasOwnProperty("result_03")) { + let error = $root.wm.protobuf.TournamentResult.verify(message.result_03); + if (error) + return "result_03." + error; + } + return null; + }; + + /** + * Creates a TournamentResultList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TournamentResultList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TournamentResultList} TournamentResultList + */ + TournamentResultList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TournamentResultList) + return object; + let message = new $root.wm.protobuf.TournamentResultList(); + if (object.result_00 != null) { + if (typeof object.result_00 !== "object") + throw TypeError(".wm.protobuf.TournamentResultList.result_00: object expected"); + message.result_00 = $root.wm.protobuf.TournamentResult.fromObject(object.result_00); + } + if (object.result_01 != null) { + if (typeof object.result_01 !== "object") + throw TypeError(".wm.protobuf.TournamentResultList.result_01: object expected"); + message.result_01 = $root.wm.protobuf.TournamentResult.fromObject(object.result_01); + } + if (object.result_02 != null) { + if (typeof object.result_02 !== "object") + throw TypeError(".wm.protobuf.TournamentResultList.result_02: object expected"); + message.result_02 = $root.wm.protobuf.TournamentResult.fromObject(object.result_02); + } + if (object.result_03 != null) { + if (typeof object.result_03 !== "object") + throw TypeError(".wm.protobuf.TournamentResultList.result_03: object expected"); + message.result_03 = $root.wm.protobuf.TournamentResult.fromObject(object.result_03); + } + return message; + }; + + /** + * Creates a plain object from a TournamentResultList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TournamentResultList + * @static + * @param {wm.protobuf.TournamentResultList} message TournamentResultList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TournamentResultList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.result_00 = null; + object.result_01 = null; + object.result_02 = null; + object.result_03 = null; + } + if (message.result_00 != null && message.hasOwnProperty("result_00")) + object.result_00 = $root.wm.protobuf.TournamentResult.toObject(message.result_00, options); + if (message.result_01 != null && message.hasOwnProperty("result_01")) + object.result_01 = $root.wm.protobuf.TournamentResult.toObject(message.result_01, options); + if (message.result_02 != null && message.hasOwnProperty("result_02")) + object.result_02 = $root.wm.protobuf.TournamentResult.toObject(message.result_02, options); + if (message.result_03 != null && message.hasOwnProperty("result_03")) + object.result_03 = $root.wm.protobuf.TournamentResult.toObject(message.result_03, options); + return object; + }; + + /** + * Converts this TournamentResultList to JSON. + * @function toJSON + * @memberof wm.protobuf.TournamentResultList + * @instance + * @returns {Object.} JSON object + */ + TournamentResultList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TournamentResultList + * @function getTypeUrl + * @memberof wm.protobuf.TournamentResultList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TournamentResultList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TournamentResultList"; + }; + + return TournamentResultList; + })(); + + protobuf.Tournament = (function() { + + /** + * Properties of a Tournament. + * @memberof wm.protobuf + * @interface ITournament + * @property {boolean} isEnableTournament Tournament isEnableTournament + * @property {boolean} isClearTournament Tournament isClearTournament + * @property {boolean|null} [isEntryPlayerOnly] Tournament isEntryPlayerOnly + * @property {wm.protobuf.ITournamentCarList|null} [carList] Tournament carList + * @property {wm.protobuf.ITournamentRaceDataList|null} [raceDataList] Tournament raceDataList + * @property {boolean|null} [isTournamentOn] Tournament isTournamentOn + * @property {number|null} [holdYear] Tournament holdYear + * @property {number|null} [holdMonth] Tournament holdMonth + * @property {number|null} [holdDay] Tournament holdDay + * @property {number|null} [entryHour] Tournament entryHour + * @property {number|null} [entryMinute] Tournament entryMinute + * @property {number|null} [tournamentStartHour] Tournament tournamentStartHour + * @property {number|null} [tournamentStartMinute] Tournament tournamentStartMinute + * @property {number|null} [competitionNum] Tournament competitionNum + * @property {number|null} [participantNum] Tournament participantNum + * @property {number|null} [surviverNumOfFirstRace] Tournament surviverNumOfFirstRace + * @property {number|null} [nowRound] Tournament nowRound + * @property {number|null} [playingGameNumber] Tournament playingGameNumber + * @property {boolean|null} [isConfirmTournamentResult] Tournament isConfirmTournamentResult + * @property {boolean|null} [isTournamentEntry] Tournament isTournamentEntry + * @property {wm.protobuf.ITournamentResultList|null} [resultList] Tournament resultList + * @property {boolean|null} [hasCommendationStarted] Tournament hasCommendationStarted + * @property {boolean|null} [isCommendationRankAppeared] Tournament isCommendationRankAppeared + * @property {boolean|null} [isCommendationEnded] Tournament isCommendationEnded + * @property {boolean|null} [isNextRank] Tournament isNextRank + * @property {number|null} [commendationPage] Tournament commendationPage + * @property {boolean|null} [showCommendationAgain] Tournament showCommendationAgain + */ + + /** + * Constructs a new Tournament. + * @memberof wm.protobuf + * @classdesc Represents a Tournament. + * @implements ITournament + * @constructor + * @param {wm.protobuf.ITournament=} [properties] Properties to set + */ + function Tournament(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Tournament isEnableTournament. + * @member {boolean} isEnableTournament + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.isEnableTournament = false; + + /** + * Tournament isClearTournament. + * @member {boolean} isClearTournament + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.isClearTournament = false; + + /** + * Tournament isEntryPlayerOnly. + * @member {boolean} isEntryPlayerOnly + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.isEntryPlayerOnly = false; + + /** + * Tournament carList. + * @member {wm.protobuf.ITournamentCarList|null|undefined} carList + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.carList = null; + + /** + * Tournament raceDataList. + * @member {wm.protobuf.ITournamentRaceDataList|null|undefined} raceDataList + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.raceDataList = null; + + /** + * Tournament isTournamentOn. + * @member {boolean} isTournamentOn + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.isTournamentOn = false; + + /** + * Tournament holdYear. + * @member {number} holdYear + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.holdYear = 0; + + /** + * Tournament holdMonth. + * @member {number} holdMonth + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.holdMonth = 0; + + /** + * Tournament holdDay. + * @member {number} holdDay + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.holdDay = 0; + + /** + * Tournament entryHour. + * @member {number} entryHour + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.entryHour = 0; + + /** + * Tournament entryMinute. + * @member {number} entryMinute + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.entryMinute = 0; + + /** + * Tournament tournamentStartHour. + * @member {number} tournamentStartHour + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.tournamentStartHour = 0; + + /** + * Tournament tournamentStartMinute. + * @member {number} tournamentStartMinute + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.tournamentStartMinute = 0; + + /** + * Tournament competitionNum. + * @member {number} competitionNum + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.competitionNum = 0; + + /** + * Tournament participantNum. + * @member {number} participantNum + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.participantNum = 0; + + /** + * Tournament surviverNumOfFirstRace. + * @member {number} surviverNumOfFirstRace + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.surviverNumOfFirstRace = 0; + + /** + * Tournament nowRound. + * @member {number} nowRound + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.nowRound = 0; + + /** + * Tournament playingGameNumber. + * @member {number} playingGameNumber + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.playingGameNumber = 0; + + /** + * Tournament isConfirmTournamentResult. + * @member {boolean} isConfirmTournamentResult + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.isConfirmTournamentResult = false; + + /** + * Tournament isTournamentEntry. + * @member {boolean} isTournamentEntry + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.isTournamentEntry = false; + + /** + * Tournament resultList. + * @member {wm.protobuf.ITournamentResultList|null|undefined} resultList + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.resultList = null; + + /** + * Tournament hasCommendationStarted. + * @member {boolean} hasCommendationStarted + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.hasCommendationStarted = false; + + /** + * Tournament isCommendationRankAppeared. + * @member {boolean} isCommendationRankAppeared + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.isCommendationRankAppeared = false; + + /** + * Tournament isCommendationEnded. + * @member {boolean} isCommendationEnded + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.isCommendationEnded = false; + + /** + * Tournament isNextRank. + * @member {boolean} isNextRank + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.isNextRank = false; + + /** + * Tournament commendationPage. + * @member {number} commendationPage + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.commendationPage = 0; + + /** + * Tournament showCommendationAgain. + * @member {boolean} showCommendationAgain + * @memberof wm.protobuf.Tournament + * @instance + */ + Tournament.prototype.showCommendationAgain = false; + + /** + * Creates a new Tournament instance using the specified properties. + * @function create + * @memberof wm.protobuf.Tournament + * @static + * @param {wm.protobuf.ITournament=} [properties] Properties to set + * @returns {wm.protobuf.Tournament} Tournament instance + */ + Tournament.create = function create(properties) { + return new Tournament(properties); + }; + + /** + * Encodes the specified Tournament message. Does not implicitly {@link wm.protobuf.Tournament.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Tournament + * @static + * @param {wm.protobuf.ITournament} message Tournament message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tournament.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isEnableTournament); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isClearTournament); + if (message.isEntryPlayerOnly != null && Object.hasOwnProperty.call(message, "isEntryPlayerOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isEntryPlayerOnly); + if (message.carList != null && Object.hasOwnProperty.call(message, "carList")) + $root.wm.protobuf.TournamentCarList.encode(message.carList, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.raceDataList != null && Object.hasOwnProperty.call(message, "raceDataList")) + $root.wm.protobuf.TournamentRaceDataList.encode(message.raceDataList, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.isTournamentOn != null && Object.hasOwnProperty.call(message, "isTournamentOn")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isTournamentOn); + if (message.holdYear != null && Object.hasOwnProperty.call(message, "holdYear")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.holdYear); + if (message.holdMonth != null && Object.hasOwnProperty.call(message, "holdMonth")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.holdMonth); + if (message.holdDay != null && Object.hasOwnProperty.call(message, "holdDay")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.holdDay); + if (message.entryHour != null && Object.hasOwnProperty.call(message, "entryHour")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.entryHour); + if (message.entryMinute != null && Object.hasOwnProperty.call(message, "entryMinute")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.entryMinute); + if (message.tournamentStartHour != null && Object.hasOwnProperty.call(message, "tournamentStartHour")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.tournamentStartHour); + if (message.tournamentStartMinute != null && Object.hasOwnProperty.call(message, "tournamentStartMinute")) + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.tournamentStartMinute); + if (message.competitionNum != null && Object.hasOwnProperty.call(message, "competitionNum")) + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.competitionNum); + if (message.participantNum != null && Object.hasOwnProperty.call(message, "participantNum")) + writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.participantNum); + if (message.surviverNumOfFirstRace != null && Object.hasOwnProperty.call(message, "surviverNumOfFirstRace")) + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.surviverNumOfFirstRace); + if (message.nowRound != null && Object.hasOwnProperty.call(message, "nowRound")) + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.nowRound); + if (message.playingGameNumber != null && Object.hasOwnProperty.call(message, "playingGameNumber")) + writer.uint32(/* id 18, wireType 0 =*/144).sint32(message.playingGameNumber); + if (message.isConfirmTournamentResult != null && Object.hasOwnProperty.call(message, "isConfirmTournamentResult")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.isConfirmTournamentResult); + if (message.isTournamentEntry != null && Object.hasOwnProperty.call(message, "isTournamentEntry")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.isTournamentEntry); + if (message.resultList != null && Object.hasOwnProperty.call(message, "resultList")) + $root.wm.protobuf.TournamentResultList.encode(message.resultList, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.hasCommendationStarted != null && Object.hasOwnProperty.call(message, "hasCommendationStarted")) + writer.uint32(/* id 22, wireType 0 =*/176).bool(message.hasCommendationStarted); + if (message.isCommendationRankAppeared != null && Object.hasOwnProperty.call(message, "isCommendationRankAppeared")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.isCommendationRankAppeared); + if (message.isCommendationEnded != null && Object.hasOwnProperty.call(message, "isCommendationEnded")) + writer.uint32(/* id 24, wireType 0 =*/192).bool(message.isCommendationEnded); + if (message.isNextRank != null && Object.hasOwnProperty.call(message, "isNextRank")) + writer.uint32(/* id 25, wireType 0 =*/200).bool(message.isNextRank); + if (message.commendationPage != null && Object.hasOwnProperty.call(message, "commendationPage")) + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.commendationPage); + if (message.showCommendationAgain != null && Object.hasOwnProperty.call(message, "showCommendationAgain")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.showCommendationAgain); + return writer; + }; + + /** + * Encodes the specified Tournament message, length delimited. Does not implicitly {@link wm.protobuf.Tournament.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Tournament + * @static + * @param {wm.protobuf.ITournament} message Tournament message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tournament.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tournament message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Tournament + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Tournament} Tournament + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tournament.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Tournament(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.isEnableTournament = reader.bool(); + break; + } + case 2: { + message.isClearTournament = reader.bool(); + break; + } + case 3: { + message.isEntryPlayerOnly = reader.bool(); + break; + } + case 4: { + message.carList = $root.wm.protobuf.TournamentCarList.decode(reader, reader.uint32()); + break; + } + case 5: { + message.raceDataList = $root.wm.protobuf.TournamentRaceDataList.decode(reader, reader.uint32()); + break; + } + case 6: { + message.isTournamentOn = reader.bool(); + break; + } + case 7: { + message.holdYear = reader.uint32(); + break; + } + case 8: { + message.holdMonth = reader.uint32(); + break; + } + case 9: { + message.holdDay = reader.uint32(); + break; + } + case 10: { + message.entryHour = reader.uint32(); + break; + } + case 11: { + message.entryMinute = reader.uint32(); + break; + } + case 12: { + message.tournamentStartHour = reader.uint32(); + break; + } + case 13: { + message.tournamentStartMinute = reader.uint32(); + break; + } + case 14: { + message.competitionNum = reader.uint32(); + break; + } + case 15: { + message.participantNum = reader.uint32(); + break; + } + case 16: { + message.surviverNumOfFirstRace = reader.uint32(); + break; + } + case 17: { + message.nowRound = reader.uint32(); + break; + } + case 18: { + message.playingGameNumber = reader.sint32(); + break; + } + case 19: { + message.isConfirmTournamentResult = reader.bool(); + break; + } + case 20: { + message.isTournamentEntry = reader.bool(); + break; + } + case 21: { + message.resultList = $root.wm.protobuf.TournamentResultList.decode(reader, reader.uint32()); + break; + } + case 22: { + message.hasCommendationStarted = reader.bool(); + break; + } + case 23: { + message.isCommendationRankAppeared = reader.bool(); + break; + } + case 24: { + message.isCommendationEnded = reader.bool(); + break; + } + case 25: { + message.isNextRank = reader.bool(); + break; + } + case 26: { + message.commendationPage = reader.uint32(); + break; + } + case 27: { + message.showCommendationAgain = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("isEnableTournament")) + throw $util.ProtocolError("missing required 'isEnableTournament'", { instance: message }); + if (!message.hasOwnProperty("isClearTournament")) + throw $util.ProtocolError("missing required 'isClearTournament'", { instance: message }); + return message; + }; + + /** + * Decodes a Tournament message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Tournament + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Tournament} Tournament + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tournament.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tournament message. + * @function verify + * @memberof wm.protobuf.Tournament + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tournament.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (typeof message.isEnableTournament !== "boolean") + return "isEnableTournament: boolean expected"; + if (typeof message.isClearTournament !== "boolean") + return "isClearTournament: boolean expected"; + if (message.isEntryPlayerOnly != null && message.hasOwnProperty("isEntryPlayerOnly")) + if (typeof message.isEntryPlayerOnly !== "boolean") + return "isEntryPlayerOnly: boolean expected"; + if (message.carList != null && message.hasOwnProperty("carList")) { + let error = $root.wm.protobuf.TournamentCarList.verify(message.carList); + if (error) + return "carList." + error; + } + if (message.raceDataList != null && message.hasOwnProperty("raceDataList")) { + let error = $root.wm.protobuf.TournamentRaceDataList.verify(message.raceDataList); + if (error) + return "raceDataList." + error; + } + if (message.isTournamentOn != null && message.hasOwnProperty("isTournamentOn")) + if (typeof message.isTournamentOn !== "boolean") + return "isTournamentOn: boolean expected"; + if (message.holdYear != null && message.hasOwnProperty("holdYear")) + if (!$util.isInteger(message.holdYear)) + return "holdYear: integer expected"; + if (message.holdMonth != null && message.hasOwnProperty("holdMonth")) + if (!$util.isInteger(message.holdMonth)) + return "holdMonth: integer expected"; + if (message.holdDay != null && message.hasOwnProperty("holdDay")) + if (!$util.isInteger(message.holdDay)) + return "holdDay: integer expected"; + if (message.entryHour != null && message.hasOwnProperty("entryHour")) + if (!$util.isInteger(message.entryHour)) + return "entryHour: integer expected"; + if (message.entryMinute != null && message.hasOwnProperty("entryMinute")) + if (!$util.isInteger(message.entryMinute)) + return "entryMinute: integer expected"; + if (message.tournamentStartHour != null && message.hasOwnProperty("tournamentStartHour")) + if (!$util.isInteger(message.tournamentStartHour)) + return "tournamentStartHour: integer expected"; + if (message.tournamentStartMinute != null && message.hasOwnProperty("tournamentStartMinute")) + if (!$util.isInteger(message.tournamentStartMinute)) + return "tournamentStartMinute: integer expected"; + if (message.competitionNum != null && message.hasOwnProperty("competitionNum")) + if (!$util.isInteger(message.competitionNum)) + return "competitionNum: integer expected"; + if (message.participantNum != null && message.hasOwnProperty("participantNum")) + if (!$util.isInteger(message.participantNum)) + return "participantNum: integer expected"; + if (message.surviverNumOfFirstRace != null && message.hasOwnProperty("surviverNumOfFirstRace")) + if (!$util.isInteger(message.surviverNumOfFirstRace)) + return "surviverNumOfFirstRace: integer expected"; + if (message.nowRound != null && message.hasOwnProperty("nowRound")) + if (!$util.isInteger(message.nowRound)) + return "nowRound: integer expected"; + if (message.playingGameNumber != null && message.hasOwnProperty("playingGameNumber")) + if (!$util.isInteger(message.playingGameNumber)) + return "playingGameNumber: integer expected"; + if (message.isConfirmTournamentResult != null && message.hasOwnProperty("isConfirmTournamentResult")) + if (typeof message.isConfirmTournamentResult !== "boolean") + return "isConfirmTournamentResult: boolean expected"; + if (message.isTournamentEntry != null && message.hasOwnProperty("isTournamentEntry")) + if (typeof message.isTournamentEntry !== "boolean") + return "isTournamentEntry: boolean expected"; + if (message.resultList != null && message.hasOwnProperty("resultList")) { + let error = $root.wm.protobuf.TournamentResultList.verify(message.resultList); + if (error) + return "resultList." + error; + } + if (message.hasCommendationStarted != null && message.hasOwnProperty("hasCommendationStarted")) + if (typeof message.hasCommendationStarted !== "boolean") + return "hasCommendationStarted: boolean expected"; + if (message.isCommendationRankAppeared != null && message.hasOwnProperty("isCommendationRankAppeared")) + if (typeof message.isCommendationRankAppeared !== "boolean") + return "isCommendationRankAppeared: boolean expected"; + if (message.isCommendationEnded != null && message.hasOwnProperty("isCommendationEnded")) + if (typeof message.isCommendationEnded !== "boolean") + return "isCommendationEnded: boolean expected"; + if (message.isNextRank != null && message.hasOwnProperty("isNextRank")) + if (typeof message.isNextRank !== "boolean") + return "isNextRank: boolean expected"; + if (message.commendationPage != null && message.hasOwnProperty("commendationPage")) + if (!$util.isInteger(message.commendationPage)) + return "commendationPage: integer expected"; + if (message.showCommendationAgain != null && message.hasOwnProperty("showCommendationAgain")) + if (typeof message.showCommendationAgain !== "boolean") + return "showCommendationAgain: boolean expected"; + return null; + }; + + /** + * Creates a Tournament message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Tournament + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Tournament} Tournament + */ + Tournament.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Tournament) + return object; + let message = new $root.wm.protobuf.Tournament(); + if (object.isEnableTournament != null) + message.isEnableTournament = Boolean(object.isEnableTournament); + if (object.isClearTournament != null) + message.isClearTournament = Boolean(object.isClearTournament); + if (object.isEntryPlayerOnly != null) + message.isEntryPlayerOnly = Boolean(object.isEntryPlayerOnly); + if (object.carList != null) { + if (typeof object.carList !== "object") + throw TypeError(".wm.protobuf.Tournament.carList: object expected"); + message.carList = $root.wm.protobuf.TournamentCarList.fromObject(object.carList); + } + if (object.raceDataList != null) { + if (typeof object.raceDataList !== "object") + throw TypeError(".wm.protobuf.Tournament.raceDataList: object expected"); + message.raceDataList = $root.wm.protobuf.TournamentRaceDataList.fromObject(object.raceDataList); + } + if (object.isTournamentOn != null) + message.isTournamentOn = Boolean(object.isTournamentOn); + if (object.holdYear != null) + message.holdYear = object.holdYear >>> 0; + if (object.holdMonth != null) + message.holdMonth = object.holdMonth >>> 0; + if (object.holdDay != null) + message.holdDay = object.holdDay >>> 0; + if (object.entryHour != null) + message.entryHour = object.entryHour >>> 0; + if (object.entryMinute != null) + message.entryMinute = object.entryMinute >>> 0; + if (object.tournamentStartHour != null) + message.tournamentStartHour = object.tournamentStartHour >>> 0; + if (object.tournamentStartMinute != null) + message.tournamentStartMinute = object.tournamentStartMinute >>> 0; + if (object.competitionNum != null) + message.competitionNum = object.competitionNum >>> 0; + if (object.participantNum != null) + message.participantNum = object.participantNum >>> 0; + if (object.surviverNumOfFirstRace != null) + message.surviverNumOfFirstRace = object.surviverNumOfFirstRace >>> 0; + if (object.nowRound != null) + message.nowRound = object.nowRound >>> 0; + if (object.playingGameNumber != null) + message.playingGameNumber = object.playingGameNumber | 0; + if (object.isConfirmTournamentResult != null) + message.isConfirmTournamentResult = Boolean(object.isConfirmTournamentResult); + if (object.isTournamentEntry != null) + message.isTournamentEntry = Boolean(object.isTournamentEntry); + if (object.resultList != null) { + if (typeof object.resultList !== "object") + throw TypeError(".wm.protobuf.Tournament.resultList: object expected"); + message.resultList = $root.wm.protobuf.TournamentResultList.fromObject(object.resultList); + } + if (object.hasCommendationStarted != null) + message.hasCommendationStarted = Boolean(object.hasCommendationStarted); + if (object.isCommendationRankAppeared != null) + message.isCommendationRankAppeared = Boolean(object.isCommendationRankAppeared); + if (object.isCommendationEnded != null) + message.isCommendationEnded = Boolean(object.isCommendationEnded); + if (object.isNextRank != null) + message.isNextRank = Boolean(object.isNextRank); + if (object.commendationPage != null) + message.commendationPage = object.commendationPage >>> 0; + if (object.showCommendationAgain != null) + message.showCommendationAgain = Boolean(object.showCommendationAgain); + return message; + }; + + /** + * Creates a plain object from a Tournament message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Tournament + * @static + * @param {wm.protobuf.Tournament} message Tournament + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tournament.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.isEnableTournament = false; + object.isClearTournament = false; + object.isEntryPlayerOnly = false; + object.carList = null; + object.raceDataList = null; + object.isTournamentOn = false; + object.holdYear = 0; + object.holdMonth = 0; + object.holdDay = 0; + object.entryHour = 0; + object.entryMinute = 0; + object.tournamentStartHour = 0; + object.tournamentStartMinute = 0; + object.competitionNum = 0; + object.participantNum = 0; + object.surviverNumOfFirstRace = 0; + object.nowRound = 0; + object.playingGameNumber = 0; + object.isConfirmTournamentResult = false; + object.isTournamentEntry = false; + object.resultList = null; + object.hasCommendationStarted = false; + object.isCommendationRankAppeared = false; + object.isCommendationEnded = false; + object.isNextRank = false; + object.commendationPage = 0; + object.showCommendationAgain = false; + } + if (message.isEnableTournament != null && message.hasOwnProperty("isEnableTournament")) + object.isEnableTournament = message.isEnableTournament; + if (message.isClearTournament != null && message.hasOwnProperty("isClearTournament")) + object.isClearTournament = message.isClearTournament; + if (message.isEntryPlayerOnly != null && message.hasOwnProperty("isEntryPlayerOnly")) + object.isEntryPlayerOnly = message.isEntryPlayerOnly; + if (message.carList != null && message.hasOwnProperty("carList")) + object.carList = $root.wm.protobuf.TournamentCarList.toObject(message.carList, options); + if (message.raceDataList != null && message.hasOwnProperty("raceDataList")) + object.raceDataList = $root.wm.protobuf.TournamentRaceDataList.toObject(message.raceDataList, options); + if (message.isTournamentOn != null && message.hasOwnProperty("isTournamentOn")) + object.isTournamentOn = message.isTournamentOn; + if (message.holdYear != null && message.hasOwnProperty("holdYear")) + object.holdYear = message.holdYear; + if (message.holdMonth != null && message.hasOwnProperty("holdMonth")) + object.holdMonth = message.holdMonth; + if (message.holdDay != null && message.hasOwnProperty("holdDay")) + object.holdDay = message.holdDay; + if (message.entryHour != null && message.hasOwnProperty("entryHour")) + object.entryHour = message.entryHour; + if (message.entryMinute != null && message.hasOwnProperty("entryMinute")) + object.entryMinute = message.entryMinute; + if (message.tournamentStartHour != null && message.hasOwnProperty("tournamentStartHour")) + object.tournamentStartHour = message.tournamentStartHour; + if (message.tournamentStartMinute != null && message.hasOwnProperty("tournamentStartMinute")) + object.tournamentStartMinute = message.tournamentStartMinute; + if (message.competitionNum != null && message.hasOwnProperty("competitionNum")) + object.competitionNum = message.competitionNum; + if (message.participantNum != null && message.hasOwnProperty("participantNum")) + object.participantNum = message.participantNum; + if (message.surviverNumOfFirstRace != null && message.hasOwnProperty("surviverNumOfFirstRace")) + object.surviverNumOfFirstRace = message.surviverNumOfFirstRace; + if (message.nowRound != null && message.hasOwnProperty("nowRound")) + object.nowRound = message.nowRound; + if (message.playingGameNumber != null && message.hasOwnProperty("playingGameNumber")) + object.playingGameNumber = message.playingGameNumber; + if (message.isConfirmTournamentResult != null && message.hasOwnProperty("isConfirmTournamentResult")) + object.isConfirmTournamentResult = message.isConfirmTournamentResult; + if (message.isTournamentEntry != null && message.hasOwnProperty("isTournamentEntry")) + object.isTournamentEntry = message.isTournamentEntry; + if (message.resultList != null && message.hasOwnProperty("resultList")) + object.resultList = $root.wm.protobuf.TournamentResultList.toObject(message.resultList, options); + if (message.hasCommendationStarted != null && message.hasOwnProperty("hasCommendationStarted")) + object.hasCommendationStarted = message.hasCommendationStarted; + if (message.isCommendationRankAppeared != null && message.hasOwnProperty("isCommendationRankAppeared")) + object.isCommendationRankAppeared = message.isCommendationRankAppeared; + if (message.isCommendationEnded != null && message.hasOwnProperty("isCommendationEnded")) + object.isCommendationEnded = message.isCommendationEnded; + if (message.isNextRank != null && message.hasOwnProperty("isNextRank")) + object.isNextRank = message.isNextRank; + if (message.commendationPage != null && message.hasOwnProperty("commendationPage")) + object.commendationPage = message.commendationPage; + if (message.showCommendationAgain != null && message.hasOwnProperty("showCommendationAgain")) + object.showCommendationAgain = message.showCommendationAgain; + return object; + }; + + /** + * Converts this Tournament to JSON. + * @function toJSON + * @memberof wm.protobuf.Tournament + * @instance + * @returns {Object.} JSON object + */ + Tournament.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Tournament + * @function getTypeUrl + * @memberof wm.protobuf.Tournament + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Tournament.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Tournament"; + }; + + return Tournament; + })(); + + protobuf.Message = (function() { + + /** + * Properties of a Message. + * @memberof wm.protobuf + * @interface IMessage + * @property {Uint8Array|null} [racePacket] Message racePacket + * @property {Uint8Array|null} [raceCar] Message raceCar + * @property {wm.protobuf.ICourse|null} [course] Message course + * @property {number|null} [vsOk] Message vsOk + * @property {wm.protobuf.IHeartBeat|null} [heartBeat] Message heartBeat + * @property {number|null} [batchSettingState] Message batchSettingState + * @property {wm.protobuf.IDriveCabinetState|null} [driveCabinetState] Message driveCabinetState + * @property {wm.protobuf.IBatchSetting|null} [batchSetting] Message batchSetting + * @property {wm.protobuf.IInformation|null} [information] Message information + * @property {wm.protobuf.IGameFeatureVersion|null} [featureVersion] Message featureVersion + * @property {wm.protobuf.ITournament|null} [tournament] Message tournament + */ + + /** + * Constructs a new Message. + * @memberof wm.protobuf + * @classdesc Represents a Message. + * @implements IMessage + * @constructor + * @param {wm.protobuf.IMessage=} [properties] Properties to set + */ + function Message(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Message racePacket. + * @member {Uint8Array} racePacket + * @memberof wm.protobuf.Message + * @instance + */ + Message.prototype.racePacket = $util.newBuffer([]); + + /** + * Message raceCar. + * @member {Uint8Array} raceCar + * @memberof wm.protobuf.Message + * @instance + */ + Message.prototype.raceCar = $util.newBuffer([]); + + /** + * Message course. + * @member {wm.protobuf.ICourse|null|undefined} course + * @memberof wm.protobuf.Message + * @instance + */ + Message.prototype.course = null; + + /** + * Message vsOk. + * @member {number} vsOk + * @memberof wm.protobuf.Message + * @instance + */ + Message.prototype.vsOk = 0; + + /** + * Message heartBeat. + * @member {wm.protobuf.IHeartBeat|null|undefined} heartBeat + * @memberof wm.protobuf.Message + * @instance + */ + Message.prototype.heartBeat = null; + + /** + * Message batchSettingState. + * @member {number} batchSettingState + * @memberof wm.protobuf.Message + * @instance + */ + Message.prototype.batchSettingState = 0; + + /** + * Message driveCabinetState. + * @member {wm.protobuf.IDriveCabinetState|null|undefined} driveCabinetState + * @memberof wm.protobuf.Message + * @instance + */ + Message.prototype.driveCabinetState = null; + + /** + * Message batchSetting. + * @member {wm.protobuf.IBatchSetting|null|undefined} batchSetting + * @memberof wm.protobuf.Message + * @instance + */ + Message.prototype.batchSetting = null; + + /** + * Message information. + * @member {wm.protobuf.IInformation|null|undefined} information + * @memberof wm.protobuf.Message + * @instance + */ + Message.prototype.information = null; + + /** + * Message featureVersion. + * @member {wm.protobuf.IGameFeatureVersion|null|undefined} featureVersion + * @memberof wm.protobuf.Message + * @instance + */ + Message.prototype.featureVersion = null; + + /** + * Message tournament. + * @member {wm.protobuf.ITournament|null|undefined} tournament + * @memberof wm.protobuf.Message + * @instance + */ + Message.prototype.tournament = null; + + /** + * Creates a new Message instance using the specified properties. + * @function create + * @memberof wm.protobuf.Message + * @static + * @param {wm.protobuf.IMessage=} [properties] Properties to set + * @returns {wm.protobuf.Message} Message instance + */ + Message.create = function create(properties) { + return new Message(properties); + }; + + /** + * Encodes the specified Message message. Does not implicitly {@link wm.protobuf.Message.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Message + * @static + * @param {wm.protobuf.IMessage} message Message message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Message.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.racePacket != null && Object.hasOwnProperty.call(message, "racePacket")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.racePacket); + if (message.raceCar != null && Object.hasOwnProperty.call(message, "raceCar")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.raceCar); + if (message.course != null && Object.hasOwnProperty.call(message, "course")) + $root.wm.protobuf.Course.encode(message.course, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.vsOk != null && Object.hasOwnProperty.call(message, "vsOk")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.vsOk); + if (message.heartBeat != null && Object.hasOwnProperty.call(message, "heartBeat")) + $root.wm.protobuf.HeartBeat.encode(message.heartBeat, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.batchSettingState != null && Object.hasOwnProperty.call(message, "batchSettingState")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.batchSettingState); + if (message.driveCabinetState != null && Object.hasOwnProperty.call(message, "driveCabinetState")) + $root.wm.protobuf.DriveCabinetState.encode(message.driveCabinetState, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.batchSetting != null && Object.hasOwnProperty.call(message, "batchSetting")) + $root.wm.protobuf.BatchSetting.encode(message.batchSetting, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.information != null && Object.hasOwnProperty.call(message, "information")) + $root.wm.protobuf.Information.encode(message.information, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.featureVersion != null && Object.hasOwnProperty.call(message, "featureVersion")) + $root.wm.protobuf.GameFeatureVersion.encode(message.featureVersion, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.tournament != null && Object.hasOwnProperty.call(message, "tournament")) + $root.wm.protobuf.Tournament.encode(message.tournament, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Message message, length delimited. Does not implicitly {@link wm.protobuf.Message.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Message + * @static + * @param {wm.protobuf.IMessage} message Message message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Message.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Message message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Message + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Message} Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Message.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Message(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.racePacket = reader.bytes(); + break; + } + case 2: { + message.raceCar = reader.bytes(); + break; + } + case 3: { + message.course = $root.wm.protobuf.Course.decode(reader, reader.uint32()); + break; + } + case 4: { + message.vsOk = reader.int32(); + break; + } + case 5: { + message.heartBeat = $root.wm.protobuf.HeartBeat.decode(reader, reader.uint32()); + break; + } + case 6: { + message.batchSettingState = reader.int32(); + break; + } + case 7: { + message.driveCabinetState = $root.wm.protobuf.DriveCabinetState.decode(reader, reader.uint32()); + break; + } + case 8: { + message.batchSetting = $root.wm.protobuf.BatchSetting.decode(reader, reader.uint32()); + break; + } + case 9: { + message.information = $root.wm.protobuf.Information.decode(reader, reader.uint32()); + break; + } + case 10: { + message.featureVersion = $root.wm.protobuf.GameFeatureVersion.decode(reader, reader.uint32()); + break; + } + case 11: { + message.tournament = $root.wm.protobuf.Tournament.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Message message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Message + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Message} Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Message.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Message message. + * @function verify + * @memberof wm.protobuf.Message + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Message.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.racePacket != null && message.hasOwnProperty("racePacket")) + if (!(message.racePacket && typeof message.racePacket.length === "number" || $util.isString(message.racePacket))) + return "racePacket: buffer expected"; + if (message.raceCar != null && message.hasOwnProperty("raceCar")) + if (!(message.raceCar && typeof message.raceCar.length === "number" || $util.isString(message.raceCar))) + return "raceCar: buffer expected"; + if (message.course != null && message.hasOwnProperty("course")) { + let error = $root.wm.protobuf.Course.verify(message.course); + if (error) + return "course." + error; + } + if (message.vsOk != null && message.hasOwnProperty("vsOk")) + if (!$util.isInteger(message.vsOk)) + return "vsOk: integer expected"; + if (message.heartBeat != null && message.hasOwnProperty("heartBeat")) { + let error = $root.wm.protobuf.HeartBeat.verify(message.heartBeat); + if (error) + return "heartBeat." + error; + } + if (message.batchSettingState != null && message.hasOwnProperty("batchSettingState")) + if (!$util.isInteger(message.batchSettingState)) + return "batchSettingState: integer expected"; + if (message.driveCabinetState != null && message.hasOwnProperty("driveCabinetState")) { + let error = $root.wm.protobuf.DriveCabinetState.verify(message.driveCabinetState); + if (error) + return "driveCabinetState." + error; + } + if (message.batchSetting != null && message.hasOwnProperty("batchSetting")) { + let error = $root.wm.protobuf.BatchSetting.verify(message.batchSetting); + if (error) + return "batchSetting." + error; + } + if (message.information != null && message.hasOwnProperty("information")) { + let error = $root.wm.protobuf.Information.verify(message.information); + if (error) + return "information." + error; + } + if (message.featureVersion != null && message.hasOwnProperty("featureVersion")) { + let error = $root.wm.protobuf.GameFeatureVersion.verify(message.featureVersion); + if (error) + return "featureVersion." + error; + } + if (message.tournament != null && message.hasOwnProperty("tournament")) { + let error = $root.wm.protobuf.Tournament.verify(message.tournament); + if (error) + return "tournament." + error; + } + return null; + }; + + /** + * Creates a Message message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Message + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Message} Message + */ + Message.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Message) + return object; + let message = new $root.wm.protobuf.Message(); + if (object.racePacket != null) + if (typeof object.racePacket === "string") + $util.base64.decode(object.racePacket, message.racePacket = $util.newBuffer($util.base64.length(object.racePacket)), 0); + else if (object.racePacket.length >= 0) + message.racePacket = object.racePacket; + if (object.raceCar != null) + if (typeof object.raceCar === "string") + $util.base64.decode(object.raceCar, message.raceCar = $util.newBuffer($util.base64.length(object.raceCar)), 0); + else if (object.raceCar.length >= 0) + message.raceCar = object.raceCar; + if (object.course != null) { + if (typeof object.course !== "object") + throw TypeError(".wm.protobuf.Message.course: object expected"); + message.course = $root.wm.protobuf.Course.fromObject(object.course); + } + if (object.vsOk != null) + message.vsOk = object.vsOk | 0; + if (object.heartBeat != null) { + if (typeof object.heartBeat !== "object") + throw TypeError(".wm.protobuf.Message.heartBeat: object expected"); + message.heartBeat = $root.wm.protobuf.HeartBeat.fromObject(object.heartBeat); + } + if (object.batchSettingState != null) + message.batchSettingState = object.batchSettingState | 0; + if (object.driveCabinetState != null) { + if (typeof object.driveCabinetState !== "object") + throw TypeError(".wm.protobuf.Message.driveCabinetState: object expected"); + message.driveCabinetState = $root.wm.protobuf.DriveCabinetState.fromObject(object.driveCabinetState); + } + if (object.batchSetting != null) { + if (typeof object.batchSetting !== "object") + throw TypeError(".wm.protobuf.Message.batchSetting: object expected"); + message.batchSetting = $root.wm.protobuf.BatchSetting.fromObject(object.batchSetting); + } + if (object.information != null) { + if (typeof object.information !== "object") + throw TypeError(".wm.protobuf.Message.information: object expected"); + message.information = $root.wm.protobuf.Information.fromObject(object.information); + } + if (object.featureVersion != null) { + if (typeof object.featureVersion !== "object") + throw TypeError(".wm.protobuf.Message.featureVersion: object expected"); + message.featureVersion = $root.wm.protobuf.GameFeatureVersion.fromObject(object.featureVersion); + } + if (object.tournament != null) { + if (typeof object.tournament !== "object") + throw TypeError(".wm.protobuf.Message.tournament: object expected"); + message.tournament = $root.wm.protobuf.Tournament.fromObject(object.tournament); + } + return message; + }; + + /** + * Creates a plain object from a Message message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Message + * @static + * @param {wm.protobuf.Message} message Message + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Message.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.racePacket = ""; + else { + object.racePacket = []; + if (options.bytes !== Array) + object.racePacket = $util.newBuffer(object.racePacket); + } + if (options.bytes === String) + object.raceCar = ""; + else { + object.raceCar = []; + if (options.bytes !== Array) + object.raceCar = $util.newBuffer(object.raceCar); + } + object.course = null; + object.vsOk = 0; + object.heartBeat = null; + object.batchSettingState = 0; + object.driveCabinetState = null; + object.batchSetting = null; + object.information = null; + object.featureVersion = null; + object.tournament = null; + } + if (message.racePacket != null && message.hasOwnProperty("racePacket")) + object.racePacket = options.bytes === String ? $util.base64.encode(message.racePacket, 0, message.racePacket.length) : options.bytes === Array ? Array.prototype.slice.call(message.racePacket) : message.racePacket; + if (message.raceCar != null && message.hasOwnProperty("raceCar")) + object.raceCar = options.bytes === String ? $util.base64.encode(message.raceCar, 0, message.raceCar.length) : options.bytes === Array ? Array.prototype.slice.call(message.raceCar) : message.raceCar; + if (message.course != null && message.hasOwnProperty("course")) + object.course = $root.wm.protobuf.Course.toObject(message.course, options); + if (message.vsOk != null && message.hasOwnProperty("vsOk")) + object.vsOk = message.vsOk; + if (message.heartBeat != null && message.hasOwnProperty("heartBeat")) + object.heartBeat = $root.wm.protobuf.HeartBeat.toObject(message.heartBeat, options); + if (message.batchSettingState != null && message.hasOwnProperty("batchSettingState")) + object.batchSettingState = message.batchSettingState; + if (message.driveCabinetState != null && message.hasOwnProperty("driveCabinetState")) + object.driveCabinetState = $root.wm.protobuf.DriveCabinetState.toObject(message.driveCabinetState, options); + if (message.batchSetting != null && message.hasOwnProperty("batchSetting")) + object.batchSetting = $root.wm.protobuf.BatchSetting.toObject(message.batchSetting, options); + if (message.information != null && message.hasOwnProperty("information")) + object.information = $root.wm.protobuf.Information.toObject(message.information, options); + if (message.featureVersion != null && message.hasOwnProperty("featureVersion")) + object.featureVersion = $root.wm.protobuf.GameFeatureVersion.toObject(message.featureVersion, options); + if (message.tournament != null && message.hasOwnProperty("tournament")) + object.tournament = $root.wm.protobuf.Tournament.toObject(message.tournament, options); + return object; + }; + + /** + * Converts this Message to JSON. + * @function toJSON + * @memberof wm.protobuf.Message + * @instance + * @returns {Object.} JSON object + */ + Message.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Message + * @function getTypeUrl + * @memberof wm.protobuf.Message + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Message.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Message"; + }; + + return Message; + })(); + + protobuf.RegisterSystemInfoRequest = (function() { + + /** + * Properties of a RegisterSystemInfoRequest. + * @memberof wm.protobuf + * @interface IRegisterSystemInfoRequest + * @property {string} pcbSerial RegisterSystemInfoRequest pcbSerial + * @property {wm.protobuf.TerminalType} terminalType RegisterSystemInfoRequest terminalType + * @property {number} romVersion RegisterSystemInfoRequest romVersion + * @property {string} country RegisterSystemInfoRequest country + * @property {wm.protobuf.LineType} lineType RegisterSystemInfoRequest lineType + * @property {string} shopName RegisterSystemInfoRequest shopName + * @property {string} shopNickname RegisterSystemInfoRequest shopNickname + * @property {number|null} [allnetPlaceId] RegisterSystemInfoRequest allnetPlaceId + * @property {number|null} [allnetRegion0] RegisterSystemInfoRequest allnetRegion0 + * @property {string|null} [muchaPlaceId] RegisterSystemInfoRequest muchaPlaceId + * @property {number|null} [muchaPrefectureId] RegisterSystemInfoRequest muchaPrefectureId + * @property {string} regionName0 RegisterSystemInfoRequest regionName0 + * @property {string} regionName1 RegisterSystemInfoRequest regionName1 + * @property {string} regionName2 RegisterSystemInfoRequest regionName2 + * @property {string} regionName3 RegisterSystemInfoRequest regionName3 + * @property {number} timezoneOffset RegisterSystemInfoRequest timezoneOffset + * @property {wm.protobuf.ISystemSetting} systemSetting RegisterSystemInfoRequest systemSetting + * @property {Array.|null} [errorLogs] RegisterSystemInfoRequest errorLogs + */ + + /** + * Constructs a new RegisterSystemInfoRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemInfoRequest. + * @implements IRegisterSystemInfoRequest + * @constructor + * @param {wm.protobuf.IRegisterSystemInfoRequest=} [properties] Properties to set + */ + function RegisterSystemInfoRequest(properties) { + this.errorLogs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemInfoRequest pcbSerial. + * @member {string} pcbSerial + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.pcbSerial = ""; + + /** + * RegisterSystemInfoRequest terminalType. + * @member {wm.protobuf.TerminalType} terminalType + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.terminalType = 0; + + /** + * RegisterSystemInfoRequest romVersion. + * @member {number} romVersion + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.romVersion = 0; + + /** + * RegisterSystemInfoRequest country. + * @member {string} country + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.country = ""; + + /** + * RegisterSystemInfoRequest lineType. + * @member {wm.protobuf.LineType} lineType + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.lineType = 0; + + /** + * RegisterSystemInfoRequest shopName. + * @member {string} shopName + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.shopName = ""; + + /** + * RegisterSystemInfoRequest shopNickname. + * @member {string} shopNickname + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.shopNickname = ""; + + /** + * RegisterSystemInfoRequest allnetPlaceId. + * @member {number} allnetPlaceId + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.allnetPlaceId = 0; + + /** + * RegisterSystemInfoRequest allnetRegion0. + * @member {number} allnetRegion0 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.allnetRegion0 = 0; + + /** + * RegisterSystemInfoRequest muchaPlaceId. + * @member {string} muchaPlaceId + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.muchaPlaceId = ""; + + /** + * RegisterSystemInfoRequest muchaPrefectureId. + * @member {number} muchaPrefectureId + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.muchaPrefectureId = 0; + + /** + * RegisterSystemInfoRequest regionName0. + * @member {string} regionName0 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName0 = ""; + + /** + * RegisterSystemInfoRequest regionName1. + * @member {string} regionName1 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName1 = ""; + + /** + * RegisterSystemInfoRequest regionName2. + * @member {string} regionName2 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName2 = ""; + + /** + * RegisterSystemInfoRequest regionName3. + * @member {string} regionName3 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName3 = ""; + + /** + * RegisterSystemInfoRequest timezoneOffset. + * @member {number} timezoneOffset + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.timezoneOffset = 0; + + /** + * RegisterSystemInfoRequest systemSetting. + * @member {wm.protobuf.ISystemSetting} systemSetting + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.systemSetting = null; + + /** + * RegisterSystemInfoRequest errorLogs. + * @member {Array.} errorLogs + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.errorLogs = $util.emptyArray; + + /** + * Creates a new RegisterSystemInfoRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.IRegisterSystemInfoRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest instance + */ + RegisterSystemInfoRequest.create = function create(properties) { + return new RegisterSystemInfoRequest(properties); + }; + + /** + * Encodes the specified RegisterSystemInfoRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.IRegisterSystemInfoRequest} message RegisterSystemInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pcbSerial); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.terminalType); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.romVersion); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.country); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.lineType); + writer.uint32(/* id 6, wireType 2 =*/50).string(message.shopName); + writer.uint32(/* id 7, wireType 2 =*/58).string(message.shopNickname); + if (message.allnetPlaceId != null && Object.hasOwnProperty.call(message, "allnetPlaceId")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.allnetPlaceId); + if (message.allnetRegion0 != null && Object.hasOwnProperty.call(message, "allnetRegion0")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.allnetRegion0); + if (message.muchaPlaceId != null && Object.hasOwnProperty.call(message, "muchaPlaceId")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.muchaPlaceId); + if (message.muchaPrefectureId != null && Object.hasOwnProperty.call(message, "muchaPrefectureId")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.muchaPrefectureId); + writer.uint32(/* id 12, wireType 2 =*/98).string(message.regionName0); + writer.uint32(/* id 13, wireType 2 =*/106).string(message.regionName1); + writer.uint32(/* id 14, wireType 2 =*/114).string(message.regionName2); + writer.uint32(/* id 15, wireType 2 =*/122).string(message.regionName3); + writer.uint32(/* id 16, wireType 0 =*/128).sint32(message.timezoneOffset); + $root.wm.protobuf.SystemSetting.encode(message.systemSetting, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.errorLogs != null && message.errorLogs.length) + for (let i = 0; i < message.errorLogs.length; ++i) + $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.encode(message.errorLogs[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RegisterSystemInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.IRegisterSystemInfoRequest} message RegisterSystemInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pcbSerial = reader.string(); + break; + } + case 2: { + message.terminalType = reader.int32(); + break; + } + case 3: { + message.romVersion = reader.uint32(); + break; + } + case 4: { + message.country = reader.string(); + break; + } + case 5: { + message.lineType = reader.int32(); + break; + } + case 6: { + message.shopName = reader.string(); + break; + } + case 7: { + message.shopNickname = reader.string(); + break; + } + case 8: { + message.allnetPlaceId = reader.uint32(); + break; + } + case 9: { + message.allnetRegion0 = reader.uint32(); + break; + } + case 10: { + message.muchaPlaceId = reader.string(); + break; + } + case 11: { + message.muchaPrefectureId = reader.uint32(); + break; + } + case 12: { + message.regionName0 = reader.string(); + break; + } + case 13: { + message.regionName1 = reader.string(); + break; + } + case 14: { + message.regionName2 = reader.string(); + break; + } + case 15: { + message.regionName3 = reader.string(); + break; + } + case 16: { + message.timezoneOffset = reader.sint32(); + break; + } + case 17: { + message.systemSetting = $root.wm.protobuf.SystemSetting.decode(reader, reader.uint32()); + break; + } + case 18: { + if (!(message.errorLogs && message.errorLogs.length)) + message.errorLogs = []; + message.errorLogs.push($root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("pcbSerial")) + throw $util.ProtocolError("missing required 'pcbSerial'", { instance: message }); + if (!message.hasOwnProperty("terminalType")) + throw $util.ProtocolError("missing required 'terminalType'", { instance: message }); + if (!message.hasOwnProperty("romVersion")) + throw $util.ProtocolError("missing required 'romVersion'", { instance: message }); + if (!message.hasOwnProperty("country")) + throw $util.ProtocolError("missing required 'country'", { instance: message }); + if (!message.hasOwnProperty("lineType")) + throw $util.ProtocolError("missing required 'lineType'", { instance: message }); + if (!message.hasOwnProperty("shopName")) + throw $util.ProtocolError("missing required 'shopName'", { instance: message }); + if (!message.hasOwnProperty("shopNickname")) + throw $util.ProtocolError("missing required 'shopNickname'", { instance: message }); + if (!message.hasOwnProperty("regionName0")) + throw $util.ProtocolError("missing required 'regionName0'", { instance: message }); + if (!message.hasOwnProperty("regionName1")) + throw $util.ProtocolError("missing required 'regionName1'", { instance: message }); + if (!message.hasOwnProperty("regionName2")) + throw $util.ProtocolError("missing required 'regionName2'", { instance: message }); + if (!message.hasOwnProperty("regionName3")) + throw $util.ProtocolError("missing required 'regionName3'", { instance: message }); + if (!message.hasOwnProperty("timezoneOffset")) + throw $util.ProtocolError("missing required 'timezoneOffset'", { instance: message }); + if (!message.hasOwnProperty("systemSetting")) + throw $util.ProtocolError("missing required 'systemSetting'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemInfoRequest message. + * @function verify + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.pcbSerial)) + return "pcbSerial: string expected"; + switch (message.terminalType) { + default: + return "terminalType: enum value expected"; + case 0: + case 1: + break; + } + if (!$util.isInteger(message.romVersion)) + return "romVersion: integer expected"; + if (!$util.isString(message.country)) + return "country: string expected"; + switch (message.lineType) { + default: + return "lineType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (!$util.isString(message.shopName)) + return "shopName: string expected"; + if (!$util.isString(message.shopNickname)) + return "shopNickname: string expected"; + if (message.allnetPlaceId != null && message.hasOwnProperty("allnetPlaceId")) + if (!$util.isInteger(message.allnetPlaceId)) + return "allnetPlaceId: integer expected"; + if (message.allnetRegion0 != null && message.hasOwnProperty("allnetRegion0")) + if (!$util.isInteger(message.allnetRegion0)) + return "allnetRegion0: integer expected"; + if (message.muchaPlaceId != null && message.hasOwnProperty("muchaPlaceId")) + if (!$util.isString(message.muchaPlaceId)) + return "muchaPlaceId: string expected"; + if (message.muchaPrefectureId != null && message.hasOwnProperty("muchaPrefectureId")) + if (!$util.isInteger(message.muchaPrefectureId)) + return "muchaPrefectureId: integer expected"; + if (!$util.isString(message.regionName0)) + return "regionName0: string expected"; + if (!$util.isString(message.regionName1)) + return "regionName1: string expected"; + if (!$util.isString(message.regionName2)) + return "regionName2: string expected"; + if (!$util.isString(message.regionName3)) + return "regionName3: string expected"; + if (!$util.isInteger(message.timezoneOffset)) + return "timezoneOffset: integer expected"; + { + let error = $root.wm.protobuf.SystemSetting.verify(message.systemSetting); + if (error) + return "systemSetting." + error; + } + if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) { + if (!Array.isArray(message.errorLogs)) + return "errorLogs: array expected"; + for (let i = 0; i < message.errorLogs.length; ++i) { + let error = $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify(message.errorLogs[i]); + if (error) + return "errorLogs." + error; + } + } + return null; + }; + + /** + * Creates a RegisterSystemInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest + */ + RegisterSystemInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemInfoRequest) + return object; + let message = new $root.wm.protobuf.RegisterSystemInfoRequest(); + if (object.pcbSerial != null) + message.pcbSerial = String(object.pcbSerial); + switch (object.terminalType) { + case "T_DRIVE": + case 0: + message.terminalType = 0; + break; + case "T_TERMINAL": + case 1: + message.terminalType = 1; + break; + } + if (object.romVersion != null) + message.romVersion = object.romVersion >>> 0; + if (object.country != null) + message.country = String(object.country); + switch (object.lineType) { + case "L_UNKNOWN": + case 0: + message.lineType = 0; + break; + case "L_MOBILE": + case 1: + message.lineType = 1; + break; + case "L_ISDN": + case 2: + message.lineType = 2; + break; + case "L_BFLETS": + case 3: + message.lineType = 3; + break; + case "L_ADSL": + case 4: + message.lineType = 4; + break; + case "L_WIRED": + case 5: + message.lineType = 5; + break; + } + if (object.shopName != null) + message.shopName = String(object.shopName); + if (object.shopNickname != null) + message.shopNickname = String(object.shopNickname); + if (object.allnetPlaceId != null) + message.allnetPlaceId = object.allnetPlaceId >>> 0; + if (object.allnetRegion0 != null) + message.allnetRegion0 = object.allnetRegion0 >>> 0; + if (object.muchaPlaceId != null) + message.muchaPlaceId = String(object.muchaPlaceId); + if (object.muchaPrefectureId != null) + message.muchaPrefectureId = object.muchaPrefectureId >>> 0; + if (object.regionName0 != null) + message.regionName0 = String(object.regionName0); + if (object.regionName1 != null) + message.regionName1 = String(object.regionName1); + if (object.regionName2 != null) + message.regionName2 = String(object.regionName2); + if (object.regionName3 != null) + message.regionName3 = String(object.regionName3); + if (object.timezoneOffset != null) + message.timezoneOffset = object.timezoneOffset | 0; + if (object.systemSetting != null) { + if (typeof object.systemSetting !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoRequest.systemSetting: object expected"); + message.systemSetting = $root.wm.protobuf.SystemSetting.fromObject(object.systemSetting); + } + if (object.errorLogs) { + if (!Array.isArray(object.errorLogs)) + throw TypeError(".wm.protobuf.RegisterSystemInfoRequest.errorLogs: array expected"); + message.errorLogs = []; + for (let i = 0; i < object.errorLogs.length; ++i) { + if (typeof object.errorLogs[i] !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoRequest.errorLogs: object expected"); + message.errorLogs[i] = $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.fromObject(object.errorLogs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RegisterSystemInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest} message RegisterSystemInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.errorLogs = []; + if (options.defaults) { + object.pcbSerial = ""; + object.terminalType = options.enums === String ? "T_DRIVE" : 0; + object.romVersion = 0; + object.country = ""; + object.lineType = options.enums === String ? "L_UNKNOWN" : 0; + object.shopName = ""; + object.shopNickname = ""; + object.allnetPlaceId = 0; + object.allnetRegion0 = 0; + object.muchaPlaceId = ""; + object.muchaPrefectureId = 0; + object.regionName0 = ""; + object.regionName1 = ""; + object.regionName2 = ""; + object.regionName3 = ""; + object.timezoneOffset = 0; + object.systemSetting = null; + } + if (message.pcbSerial != null && message.hasOwnProperty("pcbSerial")) + object.pcbSerial = message.pcbSerial; + if (message.terminalType != null && message.hasOwnProperty("terminalType")) + object.terminalType = options.enums === String ? $root.wm.protobuf.TerminalType[message.terminalType] : message.terminalType; + if (message.romVersion != null && message.hasOwnProperty("romVersion")) + object.romVersion = message.romVersion; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + if (message.lineType != null && message.hasOwnProperty("lineType")) + object.lineType = options.enums === String ? $root.wm.protobuf.LineType[message.lineType] : message.lineType; + if (message.shopName != null && message.hasOwnProperty("shopName")) + object.shopName = message.shopName; + if (message.shopNickname != null && message.hasOwnProperty("shopNickname")) + object.shopNickname = message.shopNickname; + if (message.allnetPlaceId != null && message.hasOwnProperty("allnetPlaceId")) + object.allnetPlaceId = message.allnetPlaceId; + if (message.allnetRegion0 != null && message.hasOwnProperty("allnetRegion0")) + object.allnetRegion0 = message.allnetRegion0; + if (message.muchaPlaceId != null && message.hasOwnProperty("muchaPlaceId")) + object.muchaPlaceId = message.muchaPlaceId; + if (message.muchaPrefectureId != null && message.hasOwnProperty("muchaPrefectureId")) + object.muchaPrefectureId = message.muchaPrefectureId; + if (message.regionName0 != null && message.hasOwnProperty("regionName0")) + object.regionName0 = message.regionName0; + if (message.regionName1 != null && message.hasOwnProperty("regionName1")) + object.regionName1 = message.regionName1; + if (message.regionName2 != null && message.hasOwnProperty("regionName2")) + object.regionName2 = message.regionName2; + if (message.regionName3 != null && message.hasOwnProperty("regionName3")) + object.regionName3 = message.regionName3; + if (message.timezoneOffset != null && message.hasOwnProperty("timezoneOffset")) + object.timezoneOffset = message.timezoneOffset; + if (message.systemSetting != null && message.hasOwnProperty("systemSetting")) + object.systemSetting = $root.wm.protobuf.SystemSetting.toObject(message.systemSetting, options); + if (message.errorLogs && message.errorLogs.length) { + object.errorLogs = []; + for (let j = 0; j < message.errorLogs.length; ++j) + object.errorLogs[j] = $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.toObject(message.errorLogs[j], options); + } + return object; + }; + + /** + * Converts this RegisterSystemInfoRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemInfoRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemInfoRequest"; + }; + + RegisterSystemInfoRequest.ErrorLogEntry = (function() { + + /** + * Properties of an ErrorLogEntry. + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @interface IErrorLogEntry + * @property {number} datetime ErrorLogEntry datetime + * @property {string} message ErrorLogEntry message + */ + + /** + * Constructs a new ErrorLogEntry. + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @classdesc Represents an ErrorLogEntry. + * @implements IErrorLogEntry + * @constructor + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry=} [properties] Properties to set + */ + function ErrorLogEntry(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorLogEntry datetime. + * @member {number} datetime + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @instance + */ + ErrorLogEntry.prototype.datetime = 0; + + /** + * ErrorLogEntry message. + * @member {string} message + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @instance + */ + ErrorLogEntry.prototype.message = ""; + + /** + * Creates a new ErrorLogEntry instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry instance + */ + ErrorLogEntry.create = function create(properties) { + return new ErrorLogEntry(properties); + }; + + /** + * Encodes the specified ErrorLogEntry message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry} message ErrorLogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorLogEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.datetime); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + return writer; + }; + + /** + * Encodes the specified ErrorLogEntry message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry} message ErrorLogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorLogEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorLogEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datetime = reader.uint32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("datetime")) + throw $util.ProtocolError("missing required 'datetime'", { instance: message }); + if (!message.hasOwnProperty("message")) + throw $util.ProtocolError("missing required 'message'", { instance: message }); + return message; + }; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorLogEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorLogEntry message. + * @function verify + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorLogEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.datetime)) + return "datetime: integer expected"; + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates an ErrorLogEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry + */ + ErrorLogEntry.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry) + return object; + let message = new $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry(); + if (object.datetime != null) + message.datetime = object.datetime >>> 0; + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from an ErrorLogEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} message ErrorLogEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorLogEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.datetime = 0; + object.message = ""; + } + if (message.datetime != null && message.hasOwnProperty("datetime")) + object.datetime = message.datetime; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this ErrorLogEntry to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @instance + * @returns {Object.} JSON object + */ + ErrorLogEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorLogEntry + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorLogEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry"; + }; + + return ErrorLogEntry; + })(); + + return RegisterSystemInfoRequest; + })(); + + protobuf.RegisterSystemInfoResponse = (function() { + + /** + * Properties of a RegisterSystemInfoResponse. + * @memberof wm.protobuf + * @interface IRegisterSystemInfoResponse + * @property {wm.protobuf.ErrorCode} error RegisterSystemInfoResponse error + * @property {number} regionId RegisterSystemInfoResponse regionId + * @property {string} placeId RegisterSystemInfoResponse placeId + * @property {Array.|null} [allowedClientLogTypes] RegisterSystemInfoResponse allowedClientLogTypes + * @property {wm.protobuf.IGameFeatureVersion} featureVersion RegisterSystemInfoResponse featureVersion + * @property {number|null} [latestCompetitionId] RegisterSystemInfoResponse latestCompetitionId + * @property {wm.protobuf.IGhostCompetitionSchedule|null} [competitionSchedule] RegisterSystemInfoResponse competitionSchedule + * @property {string|null} [scratchNotes] RegisterSystemInfoResponse scratchNotes + * @property {wm.protobuf.IInviteFriendCampaignSchedule|null} [inviteFriendCampaignSchedule] RegisterSystemInfoResponse inviteFriendCampaignSchedule + * @property {number} ghostSelectionMinRedoWait RegisterSystemInfoResponse ghostSelectionMinRedoWait + * @property {number} ghostSelectionMaxRedoWait RegisterSystemInfoResponse ghostSelectionMaxRedoWait + */ + + /** + * Constructs a new RegisterSystemInfoResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemInfoResponse. + * @implements IRegisterSystemInfoResponse + * @constructor + * @param {wm.protobuf.IRegisterSystemInfoResponse=} [properties] Properties to set + */ + function RegisterSystemInfoResponse(properties) { + this.allowedClientLogTypes = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemInfoResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.error = 0; + + /** + * RegisterSystemInfoResponse regionId. + * @member {number} regionId + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.regionId = 0; + + /** + * RegisterSystemInfoResponse placeId. + * @member {string} placeId + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.placeId = ""; + + /** + * RegisterSystemInfoResponse allowedClientLogTypes. + * @member {Array.} allowedClientLogTypes + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.allowedClientLogTypes = $util.emptyArray; + + /** + * RegisterSystemInfoResponse featureVersion. + * @member {wm.protobuf.IGameFeatureVersion} featureVersion + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.featureVersion = null; + + /** + * RegisterSystemInfoResponse latestCompetitionId. + * @member {number} latestCompetitionId + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.latestCompetitionId = 0; + + /** + * RegisterSystemInfoResponse competitionSchedule. + * @member {wm.protobuf.IGhostCompetitionSchedule|null|undefined} competitionSchedule + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.competitionSchedule = null; + + /** + * RegisterSystemInfoResponse scratchNotes. + * @member {string} scratchNotes + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.scratchNotes = ""; + + /** + * RegisterSystemInfoResponse inviteFriendCampaignSchedule. + * @member {wm.protobuf.IInviteFriendCampaignSchedule|null|undefined} inviteFriendCampaignSchedule + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.inviteFriendCampaignSchedule = null; + + /** + * RegisterSystemInfoResponse ghostSelectionMinRedoWait. + * @member {number} ghostSelectionMinRedoWait + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.ghostSelectionMinRedoWait = 0; + + /** + * RegisterSystemInfoResponse ghostSelectionMaxRedoWait. + * @member {number} ghostSelectionMaxRedoWait + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.ghostSelectionMaxRedoWait = 0; + + /** + * Creates a new RegisterSystemInfoResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.IRegisterSystemInfoResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse instance + */ + RegisterSystemInfoResponse.create = function create(properties) { + return new RegisterSystemInfoResponse(properties); + }; + + /** + * Encodes the specified RegisterSystemInfoResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.IRegisterSystemInfoResponse} message RegisterSystemInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.regionId); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.placeId); + if (message.allowedClientLogTypes != null && message.allowedClientLogTypes.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (let i = 0; i < message.allowedClientLogTypes.length; ++i) + writer.int32(message.allowedClientLogTypes[i]); + writer.ldelim(); + } + $root.wm.protobuf.GameFeatureVersion.encode(message.featureVersion, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.latestCompetitionId != null && Object.hasOwnProperty.call(message, "latestCompetitionId")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.latestCompetitionId); + if (message.competitionSchedule != null && Object.hasOwnProperty.call(message, "competitionSchedule")) + $root.wm.protobuf.GhostCompetitionSchedule.encode(message.competitionSchedule, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.scratchNotes != null && Object.hasOwnProperty.call(message, "scratchNotes")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.scratchNotes); + if (message.inviteFriendCampaignSchedule != null && Object.hasOwnProperty.call(message, "inviteFriendCampaignSchedule")) + $root.wm.protobuf.InviteFriendCampaignSchedule.encode(message.inviteFriendCampaignSchedule, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.ghostSelectionMinRedoWait); + writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.ghostSelectionMaxRedoWait); + return writer; + }; + + /** + * Encodes the specified RegisterSystemInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.IRegisterSystemInfoResponse} message RegisterSystemInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.regionId = reader.uint32(); + break; + } + case 3: { + message.placeId = reader.string(); + break; + } + case 4: { + if (!(message.allowedClientLogTypes && message.allowedClientLogTypes.length)) + message.allowedClientLogTypes = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.allowedClientLogTypes.push(reader.int32()); + } else + message.allowedClientLogTypes.push(reader.int32()); + break; + } + case 10: { + message.featureVersion = $root.wm.protobuf.GameFeatureVersion.decode(reader, reader.uint32()); + break; + } + case 11: { + message.latestCompetitionId = reader.uint32(); + break; + } + case 12: { + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.decode(reader, reader.uint32()); + break; + } + case 19: { + message.scratchNotes = reader.string(); + break; + } + case 27: { + message.inviteFriendCampaignSchedule = $root.wm.protobuf.InviteFriendCampaignSchedule.decode(reader, reader.uint32()); + break; + } + case 28: { + message.ghostSelectionMinRedoWait = reader.uint32(); + break; + } + case 29: { + message.ghostSelectionMaxRedoWait = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("regionId")) + throw $util.ProtocolError("missing required 'regionId'", { instance: message }); + if (!message.hasOwnProperty("placeId")) + throw $util.ProtocolError("missing required 'placeId'", { instance: message }); + if (!message.hasOwnProperty("featureVersion")) + throw $util.ProtocolError("missing required 'featureVersion'", { instance: message }); + if (!message.hasOwnProperty("ghostSelectionMinRedoWait")) + throw $util.ProtocolError("missing required 'ghostSelectionMinRedoWait'", { instance: message }); + if (!message.hasOwnProperty("ghostSelectionMaxRedoWait")) + throw $util.ProtocolError("missing required 'ghostSelectionMaxRedoWait'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemInfoResponse message. + * @function verify + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (!$util.isString(message.placeId)) + return "placeId: string expected"; + if (message.allowedClientLogTypes != null && message.hasOwnProperty("allowedClientLogTypes")) { + if (!Array.isArray(message.allowedClientLogTypes)) + return "allowedClientLogTypes: array expected"; + for (let i = 0; i < message.allowedClientLogTypes.length; ++i) + switch (message.allowedClientLogTypes[i]) { + default: + return "allowedClientLogTypes: enum value[] expected"; + case 0: + case 1: + break; + } + } + { + let error = $root.wm.protobuf.GameFeatureVersion.verify(message.featureVersion); + if (error) + return "featureVersion." + error; + } + if (message.latestCompetitionId != null && message.hasOwnProperty("latestCompetitionId")) + if (!$util.isInteger(message.latestCompetitionId)) + return "latestCompetitionId: integer expected"; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) { + let error = $root.wm.protobuf.GhostCompetitionSchedule.verify(message.competitionSchedule); + if (error) + return "competitionSchedule." + error; + } + if (message.scratchNotes != null && message.hasOwnProperty("scratchNotes")) + if (!$util.isString(message.scratchNotes)) + return "scratchNotes: string expected"; + if (message.inviteFriendCampaignSchedule != null && message.hasOwnProperty("inviteFriendCampaignSchedule")) { + let error = $root.wm.protobuf.InviteFriendCampaignSchedule.verify(message.inviteFriendCampaignSchedule); + if (error) + return "inviteFriendCampaignSchedule." + error; + } + if (!$util.isInteger(message.ghostSelectionMinRedoWait)) + return "ghostSelectionMinRedoWait: integer expected"; + if (!$util.isInteger(message.ghostSelectionMaxRedoWait)) + return "ghostSelectionMaxRedoWait: integer expected"; + return null; + }; + + /** + * Creates a RegisterSystemInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse + */ + RegisterSystemInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemInfoResponse) + return object; + let message = new $root.wm.protobuf.RegisterSystemInfoResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.placeId != null) + message.placeId = String(object.placeId); + if (object.allowedClientLogTypes) { + if (!Array.isArray(object.allowedClientLogTypes)) + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.allowedClientLogTypes: array expected"); + message.allowedClientLogTypes = []; + for (let i = 0; i < object.allowedClientLogTypes.length; ++i) + switch (object.allowedClientLogTypes[i]) { + default: + case "LOG_LOAD_REPORT": + case 0: + message.allowedClientLogTypes[i] = 0; + break; + case "LOG_ERROR": + case 1: + message.allowedClientLogTypes[i] = 1; + break; + } + } + if (object.featureVersion != null) { + if (typeof object.featureVersion !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.featureVersion: object expected"); + message.featureVersion = $root.wm.protobuf.GameFeatureVersion.fromObject(object.featureVersion); + } + if (object.latestCompetitionId != null) + message.latestCompetitionId = object.latestCompetitionId >>> 0; + if (object.competitionSchedule != null) { + if (typeof object.competitionSchedule !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.competitionSchedule: object expected"); + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.fromObject(object.competitionSchedule); + } + if (object.scratchNotes != null) + message.scratchNotes = String(object.scratchNotes); + if (object.inviteFriendCampaignSchedule != null) { + if (typeof object.inviteFriendCampaignSchedule !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.inviteFriendCampaignSchedule: object expected"); + message.inviteFriendCampaignSchedule = $root.wm.protobuf.InviteFriendCampaignSchedule.fromObject(object.inviteFriendCampaignSchedule); + } + if (object.ghostSelectionMinRedoWait != null) + message.ghostSelectionMinRedoWait = object.ghostSelectionMinRedoWait >>> 0; + if (object.ghostSelectionMaxRedoWait != null) + message.ghostSelectionMaxRedoWait = object.ghostSelectionMaxRedoWait >>> 0; + return message; + }; + + /** + * Creates a plain object from a RegisterSystemInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.RegisterSystemInfoResponse} message RegisterSystemInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.allowedClientLogTypes = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.regionId = 0; + object.placeId = ""; + object.featureVersion = null; + object.latestCompetitionId = 0; + object.competitionSchedule = null; + object.scratchNotes = ""; + object.inviteFriendCampaignSchedule = null; + object.ghostSelectionMinRedoWait = 0; + object.ghostSelectionMaxRedoWait = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.placeId != null && message.hasOwnProperty("placeId")) + object.placeId = message.placeId; + if (message.allowedClientLogTypes && message.allowedClientLogTypes.length) { + object.allowedClientLogTypes = []; + for (let j = 0; j < message.allowedClientLogTypes.length; ++j) + object.allowedClientLogTypes[j] = options.enums === String ? $root.wm.protobuf.ClientLogType[message.allowedClientLogTypes[j]] : message.allowedClientLogTypes[j]; + } + if (message.featureVersion != null && message.hasOwnProperty("featureVersion")) + object.featureVersion = $root.wm.protobuf.GameFeatureVersion.toObject(message.featureVersion, options); + if (message.latestCompetitionId != null && message.hasOwnProperty("latestCompetitionId")) + object.latestCompetitionId = message.latestCompetitionId; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) + object.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.toObject(message.competitionSchedule, options); + if (message.scratchNotes != null && message.hasOwnProperty("scratchNotes")) + object.scratchNotes = message.scratchNotes; + if (message.inviteFriendCampaignSchedule != null && message.hasOwnProperty("inviteFriendCampaignSchedule")) + object.inviteFriendCampaignSchedule = $root.wm.protobuf.InviteFriendCampaignSchedule.toObject(message.inviteFriendCampaignSchedule, options); + if (message.ghostSelectionMinRedoWait != null && message.hasOwnProperty("ghostSelectionMinRedoWait")) + object.ghostSelectionMinRedoWait = message.ghostSelectionMinRedoWait; + if (message.ghostSelectionMaxRedoWait != null && message.hasOwnProperty("ghostSelectionMaxRedoWait")) + object.ghostSelectionMaxRedoWait = message.ghostSelectionMaxRedoWait; + return object; + }; + + /** + * Converts this RegisterSystemInfoResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemInfoResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemInfoResponse"; + }; + + return RegisterSystemInfoResponse; + })(); + + protobuf.RegisterSystemStatsRequest = (function() { + + /** + * Properties of a RegisterSystemStatsRequest. + * @memberof wm.protobuf + * @interface IRegisterSystemStatsRequest + * @property {string} pcbSerial RegisterSystemStatsRequest pcbSerial + * @property {wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null} [driveStats] RegisterSystemStatsRequest driveStats + * @property {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null} [terminalStats] RegisterSystemStatsRequest terminalStats + */ + + /** + * Constructs a new RegisterSystemStatsRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemStatsRequest. + * @implements IRegisterSystemStatsRequest + * @constructor + * @param {wm.protobuf.IRegisterSystemStatsRequest=} [properties] Properties to set + */ + function RegisterSystemStatsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemStatsRequest pcbSerial. + * @member {string} pcbSerial + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + */ + RegisterSystemStatsRequest.prototype.pcbSerial = ""; + + /** + * RegisterSystemStatsRequest driveStats. + * @member {wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null|undefined} driveStats + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + */ + RegisterSystemStatsRequest.prototype.driveStats = null; + + /** + * RegisterSystemStatsRequest terminalStats. + * @member {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null|undefined} terminalStats + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + */ + RegisterSystemStatsRequest.prototype.terminalStats = null; + + /** + * Creates a new RegisterSystemStatsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.IRegisterSystemStatsRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest instance + */ + RegisterSystemStatsRequest.create = function create(properties) { + return new RegisterSystemStatsRequest(properties); + }; + + /** + * Encodes the specified RegisterSystemStatsRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.IRegisterSystemStatsRequest} message RegisterSystemStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pcbSerial); + if (message.driveStats != null && Object.hasOwnProperty.call(message, "driveStats")) + $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.encode(message.driveStats, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.terminalStats != null && Object.hasOwnProperty.call(message, "terminalStats")) + $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.encode(message.terminalStats, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RegisterSystemStatsRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.IRegisterSystemStatsRequest} message RegisterSystemStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pcbSerial = reader.string(); + break; + } + case 2: { + message.driveStats = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.decode(reader, reader.uint32()); + break; + } + case 3: { + message.terminalStats = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("pcbSerial")) + throw $util.ProtocolError("missing required 'pcbSerial'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemStatsRequest message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemStatsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.pcbSerial)) + return "pcbSerial: string expected"; + if (message.driveStats != null && message.hasOwnProperty("driveStats")) { + let error = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify(message.driveStats); + if (error) + return "driveStats." + error; + } + if (message.terminalStats != null && message.hasOwnProperty("terminalStats")) { + let error = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify(message.terminalStats); + if (error) + return "terminalStats." + error; + } + return null; + }; + + /** + * Creates a RegisterSystemStatsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest + */ + RegisterSystemStatsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsRequest) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsRequest(); + if (object.pcbSerial != null) + message.pcbSerial = String(object.pcbSerial); + if (object.driveStats != null) { + if (typeof object.driveStats !== "object") + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.driveStats: object expected"); + message.driveStats = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.fromObject(object.driveStats); + } + if (object.terminalStats != null) { + if (typeof object.terminalStats !== "object") + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.terminalStats: object expected"); + message.terminalStats = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.fromObject(object.terminalStats); + } + return message; + }; + + /** + * Creates a plain object from a RegisterSystemStatsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest} message RegisterSystemStatsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemStatsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.pcbSerial = ""; + object.driveStats = null; + object.terminalStats = null; + } + if (message.pcbSerial != null && message.hasOwnProperty("pcbSerial")) + object.pcbSerial = message.pcbSerial; + if (message.driveStats != null && message.hasOwnProperty("driveStats")) + object.driveStats = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.toObject(message.driveStats, options); + if (message.terminalStats != null && message.hasOwnProperty("terminalStats")) + object.terminalStats = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.toObject(message.terminalStats, options); + return object; + }; + + /** + * Converts this RegisterSystemStatsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemStatsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemStatsRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemStatsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsRequest"; + }; + + RegisterSystemStatsRequest.DriveStats = (function() { + + /** + * Properties of a DriveStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @interface IDriveStats + * @property {Array.|null} [operation] DriveStats operation + * @property {Array.|null} [story] DriveStats story + * @property {Array.|null} [versus] DriveStats versus + * @property {Array.|null} [ghost] DriveStats ghost + * @property {Array.|null} [timeAttack] DriveStats timeAttack + * @property {Array.|null} [event] DriveStats event + */ + + /** + * Constructs a new DriveStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @classdesc Represents a DriveStats. + * @implements IDriveStats + * @constructor + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats=} [properties] Properties to set + */ + function DriveStats(properties) { + this.operation = []; + this.story = []; + this.versus = []; + this.ghost = []; + this.timeAttack = []; + this.event = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DriveStats operation. + * @member {Array.} operation + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.operation = $util.emptyArray; + + /** + * DriveStats story. + * @member {Array.} story + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.story = $util.emptyArray; + + /** + * DriveStats versus. + * @member {Array.} versus + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.versus = $util.emptyArray; + + /** + * DriveStats ghost. + * @member {Array.} ghost + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.ghost = $util.emptyArray; + + /** + * DriveStats timeAttack. + * @member {Array.} timeAttack + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.timeAttack = $util.emptyArray; + + /** + * DriveStats event. + * @member {Array.} event + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.event = $util.emptyArray; + + /** + * Creates a new DriveStats instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats instance + */ + DriveStats.create = function create(properties) { + return new DriveStats(properties); + }; + + /** + * Encodes the specified DriveStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats} message DriveStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DriveStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && message.operation.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (let i = 0; i < message.operation.length; ++i) + writer.uint32(message.operation[i]); + writer.ldelim(); + } + if (message.story != null && message.story.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (let i = 0; i < message.story.length; ++i) + writer.uint32(message.story[i]); + writer.ldelim(); + } + if (message.versus != null && message.versus.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (let i = 0; i < message.versus.length; ++i) + writer.uint32(message.versus[i]); + writer.ldelim(); + } + if (message.ghost != null && message.ghost.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (let i = 0; i < message.ghost.length; ++i) + writer.uint32(message.ghost[i]); + writer.ldelim(); + } + if (message.timeAttack != null && message.timeAttack.length) { + writer.uint32(/* id 5, wireType 2 =*/42).fork(); + for (let i = 0; i < message.timeAttack.length; ++i) + writer.uint32(message.timeAttack[i]); + writer.ldelim(); + } + if (message.event != null && message.event.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (let i = 0; i < message.event.length; ++i) + writer.uint32(message.event[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified DriveStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats} message DriveStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DriveStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DriveStats message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DriveStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operation && message.operation.length)) + message.operation = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.operation.push(reader.uint32()); + } else + message.operation.push(reader.uint32()); + break; + } + case 2: { + if (!(message.story && message.story.length)) + message.story = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.story.push(reader.uint32()); + } else + message.story.push(reader.uint32()); + break; + } + case 3: { + if (!(message.versus && message.versus.length)) + message.versus = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.versus.push(reader.uint32()); + } else + message.versus.push(reader.uint32()); + break; + } + case 4: { + if (!(message.ghost && message.ghost.length)) + message.ghost = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.ghost.push(reader.uint32()); + } else + message.ghost.push(reader.uint32()); + break; + } + case 5: { + if (!(message.timeAttack && message.timeAttack.length)) + message.timeAttack = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.timeAttack.push(reader.uint32()); + } else + message.timeAttack.push(reader.uint32()); + break; + } + case 6: { + if (!(message.event && message.event.length)) + message.event = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.event.push(reader.uint32()); + } else + message.event.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DriveStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DriveStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DriveStats message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DriveStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) { + if (!Array.isArray(message.operation)) + return "operation: array expected"; + for (let i = 0; i < message.operation.length; ++i) + if (!$util.isInteger(message.operation[i])) + return "operation: integer[] expected"; + } + if (message.story != null && message.hasOwnProperty("story")) { + if (!Array.isArray(message.story)) + return "story: array expected"; + for (let i = 0; i < message.story.length; ++i) + if (!$util.isInteger(message.story[i])) + return "story: integer[] expected"; + } + if (message.versus != null && message.hasOwnProperty("versus")) { + if (!Array.isArray(message.versus)) + return "versus: array expected"; + for (let i = 0; i < message.versus.length; ++i) + if (!$util.isInteger(message.versus[i])) + return "versus: integer[] expected"; + } + if (message.ghost != null && message.hasOwnProperty("ghost")) { + if (!Array.isArray(message.ghost)) + return "ghost: array expected"; + for (let i = 0; i < message.ghost.length; ++i) + if (!$util.isInteger(message.ghost[i])) + return "ghost: integer[] expected"; + } + if (message.timeAttack != null && message.hasOwnProperty("timeAttack")) { + if (!Array.isArray(message.timeAttack)) + return "timeAttack: array expected"; + for (let i = 0; i < message.timeAttack.length; ++i) + if (!$util.isInteger(message.timeAttack[i])) + return "timeAttack: integer[] expected"; + } + if (message.event != null && message.hasOwnProperty("event")) { + if (!Array.isArray(message.event)) + return "event: array expected"; + for (let i = 0; i < message.event.length; ++i) + if (!$util.isInteger(message.event[i])) + return "event: integer[] expected"; + } + return null; + }; + + /** + * Creates a DriveStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats + */ + DriveStats.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats(); + if (object.operation) { + if (!Array.isArray(object.operation)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.operation: array expected"); + message.operation = []; + for (let i = 0; i < object.operation.length; ++i) + message.operation[i] = object.operation[i] >>> 0; + } + if (object.story) { + if (!Array.isArray(object.story)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.story: array expected"); + message.story = []; + for (let i = 0; i < object.story.length; ++i) + message.story[i] = object.story[i] >>> 0; + } + if (object.versus) { + if (!Array.isArray(object.versus)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.versus: array expected"); + message.versus = []; + for (let i = 0; i < object.versus.length; ++i) + message.versus[i] = object.versus[i] >>> 0; + } + if (object.ghost) { + if (!Array.isArray(object.ghost)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.ghost: array expected"); + message.ghost = []; + for (let i = 0; i < object.ghost.length; ++i) + message.ghost[i] = object.ghost[i] >>> 0; + } + if (object.timeAttack) { + if (!Array.isArray(object.timeAttack)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.timeAttack: array expected"); + message.timeAttack = []; + for (let i = 0; i < object.timeAttack.length; ++i) + message.timeAttack[i] = object.timeAttack[i] >>> 0; + } + if (object.event) { + if (!Array.isArray(object.event)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.event: array expected"); + message.event = []; + for (let i = 0; i < object.event.length; ++i) + message.event[i] = object.event[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a DriveStats message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.DriveStats} message DriveStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DriveStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.operation = []; + object.story = []; + object.versus = []; + object.ghost = []; + object.timeAttack = []; + object.event = []; + } + if (message.operation && message.operation.length) { + object.operation = []; + for (let j = 0; j < message.operation.length; ++j) + object.operation[j] = message.operation[j]; + } + if (message.story && message.story.length) { + object.story = []; + for (let j = 0; j < message.story.length; ++j) + object.story[j] = message.story[j]; + } + if (message.versus && message.versus.length) { + object.versus = []; + for (let j = 0; j < message.versus.length; ++j) + object.versus[j] = message.versus[j]; + } + if (message.ghost && message.ghost.length) { + object.ghost = []; + for (let j = 0; j < message.ghost.length; ++j) + object.ghost[j] = message.ghost[j]; + } + if (message.timeAttack && message.timeAttack.length) { + object.timeAttack = []; + for (let j = 0; j < message.timeAttack.length; ++j) + object.timeAttack[j] = message.timeAttack[j]; + } + if (message.event && message.event.length) { + object.event = []; + for (let j = 0; j < message.event.length; ++j) + object.event[j] = message.event[j]; + } + return object; + }; + + /** + * Converts this DriveStats to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + * @returns {Object.} JSON object + */ + DriveStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DriveStats + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DriveStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsRequest.DriveStats"; + }; + + return DriveStats; + })(); + + RegisterSystemStatsRequest.TerminalStats = (function() { + + /** + * Properties of a TerminalStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @interface ITerminalStats + * @property {Array.|null} [operation] TerminalStats operation + */ + + /** + * Constructs a new TerminalStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @classdesc Represents a TerminalStats. + * @implements ITerminalStats + * @constructor + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats=} [properties] Properties to set + */ + function TerminalStats(properties) { + this.operation = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerminalStats operation. + * @member {Array.} operation + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @instance + */ + TerminalStats.prototype.operation = $util.emptyArray; + + /** + * Creates a new TerminalStats instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats instance + */ + TerminalStats.create = function create(properties) { + return new TerminalStats(properties); + }; + + /** + * Encodes the specified TerminalStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats} message TerminalStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && message.operation.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (let i = 0; i < message.operation.length; ++i) + writer.uint32(message.operation[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified TerminalStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats} message TerminalStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerminalStats message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operation && message.operation.length)) + message.operation = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.operation.push(reader.uint32()); + } else + message.operation.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TerminalStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerminalStats message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerminalStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) { + if (!Array.isArray(message.operation)) + return "operation: array expected"; + for (let i = 0; i < message.operation.length; ++i) + if (!$util.isInteger(message.operation[i])) + return "operation: integer[] expected"; + } + return null; + }; + + /** + * Creates a TerminalStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats + */ + TerminalStats.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats(); + if (object.operation) { + if (!Array.isArray(object.operation)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.TerminalStats.operation: array expected"); + message.operation = []; + for (let i = 0; i < object.operation.length; ++i) + message.operation[i] = object.operation[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a TerminalStats message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} message TerminalStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerminalStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.operation = []; + if (message.operation && message.operation.length) { + object.operation = []; + for (let j = 0; j < message.operation.length; ++j) + object.operation[j] = message.operation[j]; + } + return object; + }; + + /** + * Converts this TerminalStats to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @instance + * @returns {Object.} JSON object + */ + TerminalStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerminalStats + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerminalStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsRequest.TerminalStats"; + }; + + return TerminalStats; + })(); + + return RegisterSystemStatsRequest; + })(); + + protobuf.RegisterSystemStatsResponse = (function() { + + /** + * Properties of a RegisterSystemStatsResponse. + * @memberof wm.protobuf + * @interface IRegisterSystemStatsResponse + * @property {wm.protobuf.ErrorCode} error RegisterSystemStatsResponse error + */ + + /** + * Constructs a new RegisterSystemStatsResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemStatsResponse. + * @implements IRegisterSystemStatsResponse + * @constructor + * @param {wm.protobuf.IRegisterSystemStatsResponse=} [properties] Properties to set + */ + function RegisterSystemStatsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemStatsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @instance + */ + RegisterSystemStatsResponse.prototype.error = 0; + + /** + * Creates a new RegisterSystemStatsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.IRegisterSystemStatsResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse instance + */ + RegisterSystemStatsResponse.create = function create(properties) { + return new RegisterSystemStatsResponse(properties); + }; + + /** + * Encodes the specified RegisterSystemStatsResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.IRegisterSystemStatsResponse} message RegisterSystemStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified RegisterSystemStatsResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.IRegisterSystemStatsResponse} message RegisterSystemStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemStatsResponse message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemStatsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a RegisterSystemStatsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse + */ + RegisterSystemStatsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsResponse) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a RegisterSystemStatsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.RegisterSystemStatsResponse} message RegisterSystemStatsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemStatsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this RegisterSystemStatsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemStatsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemStatsResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemStatsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsResponse"; + }; + + return RegisterSystemStatsResponse; + })(); + + protobuf.RegisterGhostTrailRequest = (function() { + + /** + * Properties of a RegisterGhostTrailRequest. + * @memberof wm.protobuf + * @interface IRegisterGhostTrailRequest + * @property {number|Long} ghostSessionId RegisterGhostTrailRequest ghostSessionId + * @property {wm.protobuf.IGhostCar} ghost RegisterGhostTrailRequest ghost + * @property {Uint8Array} trail RegisterGhostTrailRequest trail + * @property {number|null} [time] RegisterGhostTrailRequest time + * @property {wm.protobuf.IBinaryData|null} [driveData] RegisterGhostTrailRequest driveData + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByArea] RegisterGhostTrailRequest trendBinaryByArea + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByCar] RegisterGhostTrailRequest trendBinaryByCar + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByUser] RegisterGhostTrailRequest trendBinaryByUser + */ + + /** + * Constructs a new RegisterGhostTrailRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterGhostTrailRequest. + * @implements IRegisterGhostTrailRequest + * @constructor + * @param {wm.protobuf.IRegisterGhostTrailRequest=} [properties] Properties to set + */ + function RegisterGhostTrailRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterGhostTrailRequest ghostSessionId. + * @member {number|Long} ghostSessionId + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.ghostSessionId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * RegisterGhostTrailRequest ghost. + * @member {wm.protobuf.IGhostCar} ghost + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.ghost = null; + + /** + * RegisterGhostTrailRequest trail. + * @member {Uint8Array} trail + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trail = $util.newBuffer([]); + + /** + * RegisterGhostTrailRequest time. + * @member {number} time + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.time = 0; + + /** + * RegisterGhostTrailRequest driveData. + * @member {wm.protobuf.IBinaryData|null|undefined} driveData + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.driveData = null; + + /** + * RegisterGhostTrailRequest trendBinaryByArea. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByArea + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trendBinaryByArea = null; + + /** + * RegisterGhostTrailRequest trendBinaryByCar. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByCar + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trendBinaryByCar = null; + + /** + * RegisterGhostTrailRequest trendBinaryByUser. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByUser + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trendBinaryByUser = null; + + /** + * Creates a new RegisterGhostTrailRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.IRegisterGhostTrailRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest instance + */ + RegisterGhostTrailRequest.create = function create(properties) { + return new RegisterGhostTrailRequest(properties); + }; + + /** + * Encodes the specified RegisterGhostTrailRequest message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.IRegisterGhostTrailRequest} message RegisterGhostTrailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.ghostSessionId); + $root.wm.protobuf.GhostCar.encode(message.ghost, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.trail); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time); + if (message.driveData != null && Object.hasOwnProperty.call(message, "driveData")) + $root.wm.protobuf.BinaryData.encode(message.driveData, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.trendBinaryByArea != null && Object.hasOwnProperty.call(message, "trendBinaryByArea")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByArea, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.trendBinaryByCar != null && Object.hasOwnProperty.call(message, "trendBinaryByCar")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByCar, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.trendBinaryByUser != null && Object.hasOwnProperty.call(message, "trendBinaryByUser")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByUser, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RegisterGhostTrailRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.IRegisterGhostTrailRequest} message RegisterGhostTrailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterGhostTrailRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ghostSessionId = reader.uint64(); + break; + } + case 2: { + message.ghost = $root.wm.protobuf.GhostCar.decode(reader, reader.uint32()); + break; + } + case 3: { + message.trail = reader.bytes(); + break; + } + case 4: { + message.time = reader.uint32(); + break; + } + case 5: { + message.driveData = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 6: { + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 7: { + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 8: { + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("ghostSessionId")) + throw $util.ProtocolError("missing required 'ghostSessionId'", { instance: message }); + if (!message.hasOwnProperty("ghost")) + throw $util.ProtocolError("missing required 'ghost'", { instance: message }); + if (!message.hasOwnProperty("trail")) + throw $util.ProtocolError("missing required 'trail'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterGhostTrailRequest message. + * @function verify + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterGhostTrailRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.ghostSessionId) && !(message.ghostSessionId && $util.isInteger(message.ghostSessionId.low) && $util.isInteger(message.ghostSessionId.high))) + return "ghostSessionId: integer|Long expected"; + { + let error = $root.wm.protobuf.GhostCar.verify(message.ghost); + if (error) + return "ghost." + error; + } + if (!(message.trail && typeof message.trail.length === "number" || $util.isString(message.trail))) + return "trail: buffer expected"; + if (message.time != null && message.hasOwnProperty("time")) + if (!$util.isInteger(message.time)) + return "time: integer expected"; + if (message.driveData != null && message.hasOwnProperty("driveData")) { + let error = $root.wm.protobuf.BinaryData.verify(message.driveData); + if (error) + return "driveData." + error; + } + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByArea); + if (error) + return "trendBinaryByArea." + error; + } + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByCar); + if (error) + return "trendBinaryByCar." + error; + } + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByUser); + if (error) + return "trendBinaryByUser." + error; + } + return null; + }; + + /** + * Creates a RegisterGhostTrailRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest + */ + RegisterGhostTrailRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterGhostTrailRequest) + return object; + let message = new $root.wm.protobuf.RegisterGhostTrailRequest(); + if (object.ghostSessionId != null) + if ($util.Long) + (message.ghostSessionId = $util.Long.fromValue(object.ghostSessionId)).unsigned = true; + else if (typeof object.ghostSessionId === "string") + message.ghostSessionId = parseInt(object.ghostSessionId, 10); + else if (typeof object.ghostSessionId === "number") + message.ghostSessionId = object.ghostSessionId; + else if (typeof object.ghostSessionId === "object") + message.ghostSessionId = new $util.LongBits(object.ghostSessionId.low >>> 0, object.ghostSessionId.high >>> 0).toNumber(true); + if (object.ghost != null) { + if (typeof object.ghost !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.ghost: object expected"); + message.ghost = $root.wm.protobuf.GhostCar.fromObject(object.ghost); + } + if (object.trail != null) + if (typeof object.trail === "string") + $util.base64.decode(object.trail, message.trail = $util.newBuffer($util.base64.length(object.trail)), 0); + else if (object.trail.length >= 0) + message.trail = object.trail; + if (object.time != null) + message.time = object.time >>> 0; + if (object.driveData != null) { + if (typeof object.driveData !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.driveData: object expected"); + message.driveData = $root.wm.protobuf.BinaryData.fromObject(object.driveData); + } + if (object.trendBinaryByArea != null) { + if (typeof object.trendBinaryByArea !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.trendBinaryByArea: object expected"); + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByArea); + } + if (object.trendBinaryByCar != null) { + if (typeof object.trendBinaryByCar !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.trendBinaryByCar: object expected"); + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByCar); + } + if (object.trendBinaryByUser != null) { + if (typeof object.trendBinaryByUser !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.trendBinaryByUser: object expected"); + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByUser); + } + return message; + }; + + /** + * Creates a plain object from a RegisterGhostTrailRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.RegisterGhostTrailRequest} message RegisterGhostTrailRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterGhostTrailRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.ghostSessionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ghostSessionId = options.longs === String ? "0" : 0; + object.ghost = null; + if (options.bytes === String) + object.trail = ""; + else { + object.trail = []; + if (options.bytes !== Array) + object.trail = $util.newBuffer(object.trail); + } + object.time = 0; + object.driveData = null; + object.trendBinaryByArea = null; + object.trendBinaryByCar = null; + object.trendBinaryByUser = null; + } + if (message.ghostSessionId != null && message.hasOwnProperty("ghostSessionId")) + if (typeof message.ghostSessionId === "number") + object.ghostSessionId = options.longs === String ? String(message.ghostSessionId) : message.ghostSessionId; + else + object.ghostSessionId = options.longs === String ? $util.Long.prototype.toString.call(message.ghostSessionId) : options.longs === Number ? new $util.LongBits(message.ghostSessionId.low >>> 0, message.ghostSessionId.high >>> 0).toNumber(true) : message.ghostSessionId; + if (message.ghost != null && message.hasOwnProperty("ghost")) + object.ghost = $root.wm.protobuf.GhostCar.toObject(message.ghost, options); + if (message.trail != null && message.hasOwnProperty("trail")) + object.trail = options.bytes === String ? $util.base64.encode(message.trail, 0, message.trail.length) : options.bytes === Array ? Array.prototype.slice.call(message.trail) : message.trail; + if (message.time != null && message.hasOwnProperty("time")) + object.time = message.time; + if (message.driveData != null && message.hasOwnProperty("driveData")) + object.driveData = $root.wm.protobuf.BinaryData.toObject(message.driveData, options); + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) + object.trendBinaryByArea = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByArea, options); + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) + object.trendBinaryByCar = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByCar, options); + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) + object.trendBinaryByUser = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByUser, options); + return object; + }; + + /** + * Converts this RegisterGhostTrailRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterGhostTrailRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterGhostTrailRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterGhostTrailRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterGhostTrailRequest"; + }; + + return RegisterGhostTrailRequest; + })(); + + protobuf.RegisterGhostTrailResponse = (function() { + + /** + * Properties of a RegisterGhostTrailResponse. + * @memberof wm.protobuf + * @interface IRegisterGhostTrailResponse + * @property {wm.protobuf.ErrorCode} error RegisterGhostTrailResponse error + */ + + /** + * Constructs a new RegisterGhostTrailResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterGhostTrailResponse. + * @implements IRegisterGhostTrailResponse + * @constructor + * @param {wm.protobuf.IRegisterGhostTrailResponse=} [properties] Properties to set + */ + function RegisterGhostTrailResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterGhostTrailResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @instance + */ + RegisterGhostTrailResponse.prototype.error = 0; + + /** + * Creates a new RegisterGhostTrailResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.IRegisterGhostTrailResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse instance + */ + RegisterGhostTrailResponse.create = function create(properties) { + return new RegisterGhostTrailResponse(properties); + }; + + /** + * Encodes the specified RegisterGhostTrailResponse message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.IRegisterGhostTrailResponse} message RegisterGhostTrailResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified RegisterGhostTrailResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.IRegisterGhostTrailResponse} message RegisterGhostTrailResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterGhostTrailResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterGhostTrailResponse message. + * @function verify + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterGhostTrailResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a RegisterGhostTrailResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse + */ + RegisterGhostTrailResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterGhostTrailResponse) + return object; + let message = new $root.wm.protobuf.RegisterGhostTrailResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a RegisterGhostTrailResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.RegisterGhostTrailResponse} message RegisterGhostTrailResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterGhostTrailResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this RegisterGhostTrailResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterGhostTrailResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterGhostTrailResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterGhostTrailResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterGhostTrailResponse"; + }; + + return RegisterGhostTrailResponse; + })(); + + protobuf.LoadUserRequest = (function() { + + /** + * Properties of a LoadUserRequest. + * @memberof wm.protobuf + * @interface ILoadUserRequest + * @property {string|null} [cardChipId] LoadUserRequest cardChipId + * @property {string|null} [accessCode] LoadUserRequest accessCode + * @property {number|null} [cardTypeCode] LoadUserRequest cardTypeCode + * @property {number|null} [cardRegionCode] LoadUserRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] LoadUserRequest device + * @property {number|null} [userId] LoadUserRequest userId + * @property {number} romVersion LoadUserRequest romVersion + * @property {number} maxCars LoadUserRequest maxCars + * @property {boolean|null} [createUser] LoadUserRequest createUser + */ + + /** + * Constructs a new LoadUserRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadUserRequest. + * @implements ILoadUserRequest + * @constructor + * @param {wm.protobuf.ILoadUserRequest=} [properties] Properties to set + */ + function LoadUserRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUserRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.cardChipId = ""; + + /** + * LoadUserRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.accessCode = ""; + + /** + * LoadUserRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.cardTypeCode = 0; + + /** + * LoadUserRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.cardRegionCode = 0; + + /** + * LoadUserRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.device = 0; + + /** + * LoadUserRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.userId = 0; + + /** + * LoadUserRequest romVersion. + * @member {number} romVersion + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.romVersion = 0; + + /** + * LoadUserRequest maxCars. + * @member {number} maxCars + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.maxCars = 0; + + /** + * LoadUserRequest createUser. + * @member {boolean} createUser + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.createUser = false; + + /** + * Creates a new LoadUserRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.ILoadUserRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest instance + */ + LoadUserRequest.create = function create(properties) { + return new LoadUserRequest(properties); + }; + + /** + * Encodes the specified LoadUserRequest message. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.ILoadUserRequest} message LoadUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.device); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.userId); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.romVersion); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.maxCars); + if (message.createUser != null && Object.hasOwnProperty.call(message, "createUser")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.createUser); + return writer; + }; + + /** + * Encodes the specified LoadUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.ILoadUserRequest} message LoadUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUserRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cardChipId = reader.string(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + case 3: { + message.cardTypeCode = reader.uint32(); + break; + } + case 4: { + message.cardRegionCode = reader.uint32(); + break; + } + case 5: { + message.device = reader.int32(); + break; + } + case 6: { + message.userId = reader.uint32(); + break; + } + case 7: { + message.romVersion = reader.uint32(); + break; + } + case 8: { + message.maxCars = reader.uint32(); + break; + } + case 9: { + message.createUser = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("romVersion")) + throw $util.ProtocolError("missing required 'romVersion'", { instance: message }); + if (!message.hasOwnProperty("maxCars")) + throw $util.ProtocolError("missing required 'maxCars'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUserRequest message. + * @function verify + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUserRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.romVersion)) + return "romVersion: integer expected"; + if (!$util.isInteger(message.maxCars)) + return "maxCars: integer expected"; + if (message.createUser != null && message.hasOwnProperty("createUser")) + if (typeof message.createUser !== "boolean") + return "createUser: boolean expected"; + return null; + }; + + /** + * Creates a LoadUserRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest + */ + LoadUserRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUserRequest) + return object; + let message = new $root.wm.protobuf.LoadUserRequest(); + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.romVersion != null) + message.romVersion = object.romVersion >>> 0; + if (object.maxCars != null) + message.maxCars = object.maxCars >>> 0; + if (object.createUser != null) + message.createUser = Boolean(object.createUser); + return message; + }; + + /** + * Creates a plain object from a LoadUserRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.LoadUserRequest} message LoadUserRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUserRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.userId = 0; + object.romVersion = 0; + object.maxCars = 0; + object.createUser = false; + } + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.romVersion != null && message.hasOwnProperty("romVersion")) + object.romVersion = message.romVersion; + if (message.maxCars != null && message.hasOwnProperty("maxCars")) + object.maxCars = message.maxCars; + if (message.createUser != null && message.hasOwnProperty("createUser")) + object.createUser = message.createUser; + return object; + }; + + /** + * Converts this LoadUserRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUserRequest + * @instance + * @returns {Object.} JSON object + */ + LoadUserRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUserRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUserRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUserRequest"; + }; + + return LoadUserRequest; + })(); + + protobuf.LoadUserResponse = (function() { + + /** + * Properties of a LoadUserResponse. + * @memberof wm.protobuf + * @interface ILoadUserResponse + * @property {wm.protobuf.ErrorCode} error LoadUserResponse error + * @property {number|null} [unlockAt] LoadUserResponse unlockAt + * @property {string|null} [accessCode] LoadUserResponse accessCode + * @property {number|null} [banapassportAmId] LoadUserResponse banapassportAmId + * @property {number|null} [mbid] LoadUserResponse mbid + * @property {number|null} [userId] LoadUserResponse userId + * @property {number} numOfOwnedCars LoadUserResponse numOfOwnedCars + * @property {Array.|null} [cars] LoadUserResponse cars + * @property {Array.|null} [carStates] LoadUserResponse carStates + * @property {Array.|null} [unusedCarTickets] LoadUserResponse unusedCarTickets + * @property {Array.|null} [tutorials] LoadUserResponse tutorials + * @property {wm.protobuf.GhostCompetitionParticipantState|null} [competitionUserState] LoadUserResponse competitionUserState + * @property {string|null} [windowStickerString] LoadUserResponse windowStickerString + * @property {number|null} [windowStickerFont] LoadUserResponse windowStickerFont + * @property {wm.protobuf.SmartphoneAppState} spappState LoadUserResponse spappState + * @property {wm.protobuf.TransferState} transferState LoadUserResponse transferState + * @property {number|null} [totalVsStarCount] LoadUserResponse totalVsStarCount + * @property {number|null} [totalVsMedalPoint] LoadUserResponse totalVsMedalPoint + * @property {wm.protobuf.ICopiedCar|null} [copiedCar] LoadUserResponse copiedCar + * @property {boolean|null} [wasCreatedToday] LoadUserResponse wasCreatedToday + * @property {boolean|null} [participatedInInviteFriendCampaign] LoadUserResponse participatedInInviteFriendCampaign + */ + + /** + * Constructs a new LoadUserResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadUserResponse. + * @implements ILoadUserResponse + * @constructor + * @param {wm.protobuf.ILoadUserResponse=} [properties] Properties to set + */ + function LoadUserResponse(properties) { + this.cars = []; + this.carStates = []; + this.unusedCarTickets = []; + this.tutorials = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUserResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.error = 0; + + /** + * LoadUserResponse unlockAt. + * @member {number} unlockAt + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.unlockAt = 0; + + /** + * LoadUserResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.accessCode = ""; + + /** + * LoadUserResponse banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.banapassportAmId = 0; + + /** + * LoadUserResponse mbid. + * @member {number} mbid + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.mbid = 0; + + /** + * LoadUserResponse userId. + * @member {number} userId + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.userId = 0; + + /** + * LoadUserResponse numOfOwnedCars. + * @member {number} numOfOwnedCars + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.numOfOwnedCars = 0; + + /** + * LoadUserResponse cars. + * @member {Array.} cars + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.cars = $util.emptyArray; + + /** + * LoadUserResponse carStates. + * @member {Array.} carStates + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.carStates = $util.emptyArray; + + /** + * LoadUserResponse unusedCarTickets. + * @member {Array.} unusedCarTickets + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.unusedCarTickets = $util.emptyArray; + + /** + * LoadUserResponse tutorials. + * @member {Array.} tutorials + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.tutorials = $util.emptyArray; + + /** + * LoadUserResponse competitionUserState. + * @member {wm.protobuf.GhostCompetitionParticipantState} competitionUserState + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.competitionUserState = 1; + + /** + * LoadUserResponse windowStickerString. + * @member {string} windowStickerString + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.windowStickerString = ""; + + /** + * LoadUserResponse windowStickerFont. + * @member {number} windowStickerFont + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.windowStickerFont = 0; + + /** + * LoadUserResponse spappState. + * @member {wm.protobuf.SmartphoneAppState} spappState + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.spappState = 0; + + /** + * LoadUserResponse transferState. + * @member {wm.protobuf.TransferState} transferState + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.transferState = 0; + + /** + * LoadUserResponse totalVsStarCount. + * @member {number} totalVsStarCount + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.totalVsStarCount = 0; + + /** + * LoadUserResponse totalVsMedalPoint. + * @member {number} totalVsMedalPoint + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.totalVsMedalPoint = 0; + + /** + * LoadUserResponse copiedCar. + * @member {wm.protobuf.ICopiedCar|null|undefined} copiedCar + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.copiedCar = null; + + /** + * LoadUserResponse wasCreatedToday. + * @member {boolean} wasCreatedToday + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.wasCreatedToday = false; + + /** + * LoadUserResponse participatedInInviteFriendCampaign. + * @member {boolean} participatedInInviteFriendCampaign + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.participatedInInviteFriendCampaign = false; + + /** + * Creates a new LoadUserResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.ILoadUserResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse instance + */ + LoadUserResponse.create = function create(properties) { + return new LoadUserResponse(properties); + }; + + /** + * Encodes the specified LoadUserResponse message. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.ILoadUserResponse} message LoadUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.unlockAt != null && Object.hasOwnProperty.call(message, "unlockAt")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.unlockAt); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.accessCode); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.banapassportAmId); + if (message.mbid != null && Object.hasOwnProperty.call(message, "mbid")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.mbid); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.userId); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.numOfOwnedCars); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.Car.encode(message.cars[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.carStates != null && message.carStates.length) + for (let i = 0; i < message.carStates.length; ++i) + $root.wm.protobuf.LoadUserResponse.CarState.encode(message.carStates[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.unusedCarTickets != null && message.unusedCarTickets.length) + for (let i = 0; i < message.unusedCarTickets.length; ++i) + $root.wm.protobuf.UserItem.encode(message.unusedCarTickets[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.tutorials != null && message.tutorials.length) + for (let i = 0; i < message.tutorials.length; ++i) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.tutorials[i]); + if (message.competitionUserState != null && Object.hasOwnProperty.call(message, "competitionUserState")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.competitionUserState); + if (message.windowStickerString != null && Object.hasOwnProperty.call(message, "windowStickerString")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.windowStickerString); + if (message.windowStickerFont != null && Object.hasOwnProperty.call(message, "windowStickerFont")) + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.windowStickerFont); + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.spappState); + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.transferState); + if (message.totalVsStarCount != null && Object.hasOwnProperty.call(message, "totalVsStarCount")) + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.totalVsStarCount); + if (message.totalVsMedalPoint != null && Object.hasOwnProperty.call(message, "totalVsMedalPoint")) + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.totalVsMedalPoint); + if (message.copiedCar != null && Object.hasOwnProperty.call(message, "copiedCar")) + $root.wm.protobuf.CopiedCar.encode(message.copiedCar, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.wasCreatedToday != null && Object.hasOwnProperty.call(message, "wasCreatedToday")) + writer.uint32(/* id 28, wireType 0 =*/224).bool(message.wasCreatedToday); + if (message.participatedInInviteFriendCampaign != null && Object.hasOwnProperty.call(message, "participatedInInviteFriendCampaign")) + writer.uint32(/* id 29, wireType 0 =*/232).bool(message.participatedInInviteFriendCampaign); + return writer; + }; + + /** + * Encodes the specified LoadUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.ILoadUserResponse} message LoadUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUserResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.unlockAt = reader.uint32(); + break; + } + case 3: { + message.accessCode = reader.string(); + break; + } + case 4: { + message.banapassportAmId = reader.uint32(); + break; + } + case 5: { + message.mbid = reader.uint32(); + break; + } + case 6: { + message.userId = reader.uint32(); + break; + } + case 10: { + message.numOfOwnedCars = reader.uint32(); + break; + } + case 11: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + case 12: { + if (!(message.carStates && message.carStates.length)) + message.carStates = []; + message.carStates.push($root.wm.protobuf.LoadUserResponse.CarState.decode(reader, reader.uint32())); + break; + } + case 13: { + if (!(message.unusedCarTickets && message.unusedCarTickets.length)) + message.unusedCarTickets = []; + message.unusedCarTickets.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + case 15: { + if (!(message.tutorials && message.tutorials.length)) + message.tutorials = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.tutorials.push(reader.bool()); + } else + message.tutorials.push(reader.bool()); + break; + } + case 17: { + message.competitionUserState = reader.int32(); + break; + } + case 19: { + message.windowStickerString = reader.string(); + break; + } + case 20: { + message.windowStickerFont = reader.uint32(); + break; + } + case 21: { + message.spappState = reader.int32(); + break; + } + case 22: { + message.transferState = reader.int32(); + break; + } + case 25: { + message.totalVsStarCount = reader.uint32(); + break; + } + case 26: { + message.totalVsMedalPoint = reader.uint32(); + break; + } + case 27: { + message.copiedCar = $root.wm.protobuf.CopiedCar.decode(reader, reader.uint32()); + break; + } + case 28: { + message.wasCreatedToday = reader.bool(); + break; + } + case 29: { + message.participatedInInviteFriendCampaign = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("numOfOwnedCars")) + throw $util.ProtocolError("missing required 'numOfOwnedCars'", { instance: message }); + if (!message.hasOwnProperty("spappState")) + throw $util.ProtocolError("missing required 'spappState'", { instance: message }); + if (!message.hasOwnProperty("transferState")) + throw $util.ProtocolError("missing required 'transferState'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUserResponse message. + * @function verify + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUserResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.unlockAt != null && message.hasOwnProperty("unlockAt")) + if (!$util.isInteger(message.unlockAt)) + return "unlockAt: integer expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.mbid != null && message.hasOwnProperty("mbid")) + if (!$util.isInteger(message.mbid)) + return "mbid: integer expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.numOfOwnedCars)) + return "numOfOwnedCars: integer expected"; + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + if (message.carStates != null && message.hasOwnProperty("carStates")) { + if (!Array.isArray(message.carStates)) + return "carStates: array expected"; + for (let i = 0; i < message.carStates.length; ++i) { + let error = $root.wm.protobuf.LoadUserResponse.CarState.verify(message.carStates[i]); + if (error) + return "carStates." + error; + } + } + if (message.unusedCarTickets != null && message.hasOwnProperty("unusedCarTickets")) { + if (!Array.isArray(message.unusedCarTickets)) + return "unusedCarTickets: array expected"; + for (let i = 0; i < message.unusedCarTickets.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.unusedCarTickets[i]); + if (error) + return "unusedCarTickets." + error; + } + } + if (message.tutorials != null && message.hasOwnProperty("tutorials")) { + if (!Array.isArray(message.tutorials)) + return "tutorials: array expected"; + for (let i = 0; i < message.tutorials.length; ++i) + if (typeof message.tutorials[i] !== "boolean") + return "tutorials: boolean[] expected"; + } + if (message.competitionUserState != null && message.hasOwnProperty("competitionUserState")) + switch (message.competitionUserState) { + default: + return "competitionUserState: enum value expected"; + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + if (!$util.isString(message.windowStickerString)) + return "windowStickerString: string expected"; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + if (!$util.isInteger(message.windowStickerFont)) + return "windowStickerFont: integer expected"; + switch (message.spappState) { + default: + return "spappState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + switch (message.transferState) { + default: + return "transferState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.totalVsStarCount != null && message.hasOwnProperty("totalVsStarCount")) + if (!$util.isInteger(message.totalVsStarCount)) + return "totalVsStarCount: integer expected"; + if (message.totalVsMedalPoint != null && message.hasOwnProperty("totalVsMedalPoint")) + if (!$util.isInteger(message.totalVsMedalPoint)) + return "totalVsMedalPoint: integer expected"; + if (message.copiedCar != null && message.hasOwnProperty("copiedCar")) { + let error = $root.wm.protobuf.CopiedCar.verify(message.copiedCar); + if (error) + return "copiedCar." + error; + } + if (message.wasCreatedToday != null && message.hasOwnProperty("wasCreatedToday")) + if (typeof message.wasCreatedToday !== "boolean") + return "wasCreatedToday: boolean expected"; + if (message.participatedInInviteFriendCampaign != null && message.hasOwnProperty("participatedInInviteFriendCampaign")) + if (typeof message.participatedInInviteFriendCampaign !== "boolean") + return "participatedInInviteFriendCampaign: boolean expected"; + return null; + }; + + /** + * Creates a LoadUserResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse + */ + LoadUserResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUserResponse) + return object; + let message = new $root.wm.protobuf.LoadUserResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.unlockAt != null) + message.unlockAt = object.unlockAt >>> 0; + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.mbid != null) + message.mbid = object.mbid >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.numOfOwnedCars != null) + message.numOfOwnedCars = object.numOfOwnedCars >>> 0; + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.LoadUserResponse.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.cars: object expected"); + message.cars[i] = $root.wm.protobuf.Car.fromObject(object.cars[i]); + } + } + if (object.carStates) { + if (!Array.isArray(object.carStates)) + throw TypeError(".wm.protobuf.LoadUserResponse.carStates: array expected"); + message.carStates = []; + for (let i = 0; i < object.carStates.length; ++i) { + if (typeof object.carStates[i] !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.carStates: object expected"); + message.carStates[i] = $root.wm.protobuf.LoadUserResponse.CarState.fromObject(object.carStates[i]); + } + } + if (object.unusedCarTickets) { + if (!Array.isArray(object.unusedCarTickets)) + throw TypeError(".wm.protobuf.LoadUserResponse.unusedCarTickets: array expected"); + message.unusedCarTickets = []; + for (let i = 0; i < object.unusedCarTickets.length; ++i) { + if (typeof object.unusedCarTickets[i] !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.unusedCarTickets: object expected"); + message.unusedCarTickets[i] = $root.wm.protobuf.UserItem.fromObject(object.unusedCarTickets[i]); + } + } + if (object.tutorials) { + if (!Array.isArray(object.tutorials)) + throw TypeError(".wm.protobuf.LoadUserResponse.tutorials: array expected"); + message.tutorials = []; + for (let i = 0; i < object.tutorials.length; ++i) + message.tutorials[i] = Boolean(object.tutorials[i]); + } + switch (object.competitionUserState) { + case "COMPETITION_NOT_PARTICIPATED": + case 1: + message.competitionUserState = 1; + break; + case "COMPETITION_QUALIFIED": + case 2: + message.competitionUserState = 2; + break; + case "COMPETITION_PARTICIPATED": + case 3: + message.competitionUserState = 3; + break; + case "COMPETITION_WON": + case 4: + message.competitionUserState = 4; + break; + } + if (object.windowStickerString != null) + message.windowStickerString = String(object.windowStickerString); + if (object.windowStickerFont != null) + message.windowStickerFont = object.windowStickerFont >>> 0; + switch (object.spappState) { + case "SPAPP_UNREGISTERED": + case 0: + message.spappState = 0; + break; + case "SPAPP_KTID": + case 1: + message.spappState = 1; + break; + case "SPAPP_BNID": + case 2: + message.spappState = 2; + break; + } + switch (object.transferState) { + case "NOT_REGISTERED": + case 0: + message.transferState = 0; + break; + case "NEW_REGISTRATION": + case 1: + message.transferState = 1; + break; + case "TRANSFER_REQUIRED": + case 2: + message.transferState = 2; + break; + case "TRANSFERRING": + case 3: + message.transferState = 3; + break; + case "TRANSFERRED": + case 4: + message.transferState = 4; + break; + } + if (object.totalVsStarCount != null) + message.totalVsStarCount = object.totalVsStarCount >>> 0; + if (object.totalVsMedalPoint != null) + message.totalVsMedalPoint = object.totalVsMedalPoint >>> 0; + if (object.copiedCar != null) { + if (typeof object.copiedCar !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.copiedCar: object expected"); + message.copiedCar = $root.wm.protobuf.CopiedCar.fromObject(object.copiedCar); + } + if (object.wasCreatedToday != null) + message.wasCreatedToday = Boolean(object.wasCreatedToday); + if (object.participatedInInviteFriendCampaign != null) + message.participatedInInviteFriendCampaign = Boolean(object.participatedInInviteFriendCampaign); + return message; + }; + + /** + * Creates a plain object from a LoadUserResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.LoadUserResponse} message LoadUserResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUserResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.cars = []; + object.carStates = []; + object.unusedCarTickets = []; + object.tutorials = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.unlockAt = 0; + object.accessCode = ""; + object.banapassportAmId = 0; + object.mbid = 0; + object.userId = 0; + object.numOfOwnedCars = 0; + object.competitionUserState = options.enums === String ? "COMPETITION_NOT_PARTICIPATED" : 1; + object.windowStickerString = ""; + object.windowStickerFont = 0; + object.spappState = options.enums === String ? "SPAPP_UNREGISTERED" : 0; + object.transferState = options.enums === String ? "NOT_REGISTERED" : 0; + object.totalVsStarCount = 0; + object.totalVsMedalPoint = 0; + object.copiedCar = null; + object.wasCreatedToday = false; + object.participatedInInviteFriendCampaign = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.unlockAt != null && message.hasOwnProperty("unlockAt")) + object.unlockAt = message.unlockAt; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.mbid != null && message.hasOwnProperty("mbid")) + object.mbid = message.mbid; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.numOfOwnedCars != null && message.hasOwnProperty("numOfOwnedCars")) + object.numOfOwnedCars = message.numOfOwnedCars; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.Car.toObject(message.cars[j], options); + } + if (message.carStates && message.carStates.length) { + object.carStates = []; + for (let j = 0; j < message.carStates.length; ++j) + object.carStates[j] = $root.wm.protobuf.LoadUserResponse.CarState.toObject(message.carStates[j], options); + } + if (message.unusedCarTickets && message.unusedCarTickets.length) { + object.unusedCarTickets = []; + for (let j = 0; j < message.unusedCarTickets.length; ++j) + object.unusedCarTickets[j] = $root.wm.protobuf.UserItem.toObject(message.unusedCarTickets[j], options); + } + if (message.tutorials && message.tutorials.length) { + object.tutorials = []; + for (let j = 0; j < message.tutorials.length; ++j) + object.tutorials[j] = message.tutorials[j]; + } + if (message.competitionUserState != null && message.hasOwnProperty("competitionUserState")) + object.competitionUserState = options.enums === String ? $root.wm.protobuf.GhostCompetitionParticipantState[message.competitionUserState] : message.competitionUserState; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + object.windowStickerString = message.windowStickerString; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + object.windowStickerFont = message.windowStickerFont; + if (message.spappState != null && message.hasOwnProperty("spappState")) + object.spappState = options.enums === String ? $root.wm.protobuf.SmartphoneAppState[message.spappState] : message.spappState; + if (message.transferState != null && message.hasOwnProperty("transferState")) + object.transferState = options.enums === String ? $root.wm.protobuf.TransferState[message.transferState] : message.transferState; + if (message.totalVsStarCount != null && message.hasOwnProperty("totalVsStarCount")) + object.totalVsStarCount = message.totalVsStarCount; + if (message.totalVsMedalPoint != null && message.hasOwnProperty("totalVsMedalPoint")) + object.totalVsMedalPoint = message.totalVsMedalPoint; + if (message.copiedCar != null && message.hasOwnProperty("copiedCar")) + object.copiedCar = $root.wm.protobuf.CopiedCar.toObject(message.copiedCar, options); + if (message.wasCreatedToday != null && message.hasOwnProperty("wasCreatedToday")) + object.wasCreatedToday = message.wasCreatedToday; + if (message.participatedInInviteFriendCampaign != null && message.hasOwnProperty("participatedInInviteFriendCampaign")) + object.participatedInInviteFriendCampaign = message.participatedInInviteFriendCampaign; + return object; + }; + + /** + * Converts this LoadUserResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUserResponse + * @instance + * @returns {Object.} JSON object + */ + LoadUserResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUserResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUserResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUserResponse"; + }; + + LoadUserResponse.CarState = (function() { + + /** + * Properties of a CarState. + * @memberof wm.protobuf.LoadUserResponse + * @interface ICarState + * @property {boolean} hasOpponentGhost CarState hasOpponentGhost + * @property {wm.protobuf.GhostCompetitionParticipantState|null} [competitionState] CarState competitionState + * @property {boolean} toBeDeleted CarState toBeDeleted + * @property {boolean} eventJoined CarState eventJoined + * @property {boolean} transferred CarState transferred + * @property {number|null} [driveLastPlayedAt] CarState driveLastPlayedAt + */ + + /** + * Constructs a new CarState. + * @memberof wm.protobuf.LoadUserResponse + * @classdesc Represents a CarState. + * @implements ICarState + * @constructor + * @param {wm.protobuf.LoadUserResponse.ICarState=} [properties] Properties to set + */ + function CarState(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarState hasOpponentGhost. + * @member {boolean} hasOpponentGhost + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.hasOpponentGhost = false; + + /** + * CarState competitionState. + * @member {wm.protobuf.GhostCompetitionParticipantState} competitionState + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.competitionState = 1; + + /** + * CarState toBeDeleted. + * @member {boolean} toBeDeleted + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.toBeDeleted = false; + + /** + * CarState eventJoined. + * @member {boolean} eventJoined + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.eventJoined = false; + + /** + * CarState transferred. + * @member {boolean} transferred + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.transferred = false; + + /** + * CarState driveLastPlayedAt. + * @member {number} driveLastPlayedAt + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.driveLastPlayedAt = 0; + + /** + * Creates a new CarState instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.ICarState=} [properties] Properties to set + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState instance + */ + CarState.create = function create(properties) { + return new CarState(properties); + }; + + /** + * Encodes the specified CarState message. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.ICarState} message CarState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.hasOpponentGhost); + if (message.competitionState != null && Object.hasOwnProperty.call(message, "competitionState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.competitionState); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.toBeDeleted); + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.eventJoined); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.transferred); + if (message.driveLastPlayedAt != null && Object.hasOwnProperty.call(message, "driveLastPlayedAt")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.driveLastPlayedAt); + return writer; + }; + + /** + * Encodes the specified CarState message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.ICarState} message CarState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarState message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUserResponse.CarState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hasOpponentGhost = reader.bool(); + break; + } + case 2: { + message.competitionState = reader.int32(); + break; + } + case 4: { + message.toBeDeleted = reader.bool(); + break; + } + case 5: { + message.eventJoined = reader.bool(); + break; + } + case 6: { + message.transferred = reader.bool(); + break; + } + case 7: { + message.driveLastPlayedAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("hasOpponentGhost")) + throw $util.ProtocolError("missing required 'hasOpponentGhost'", { instance: message }); + if (!message.hasOwnProperty("toBeDeleted")) + throw $util.ProtocolError("missing required 'toBeDeleted'", { instance: message }); + if (!message.hasOwnProperty("eventJoined")) + throw $util.ProtocolError("missing required 'eventJoined'", { instance: message }); + if (!message.hasOwnProperty("transferred")) + throw $util.ProtocolError("missing required 'transferred'", { instance: message }); + return message; + }; + + /** + * Decodes a CarState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarState message. + * @function verify + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (typeof message.hasOpponentGhost !== "boolean") + return "hasOpponentGhost: boolean expected"; + if (message.competitionState != null && message.hasOwnProperty("competitionState")) + switch (message.competitionState) { + default: + return "competitionState: enum value expected"; + case 1: + case 2: + case 3: + case 4: + break; + } + if (typeof message.toBeDeleted !== "boolean") + return "toBeDeleted: boolean expected"; + if (typeof message.eventJoined !== "boolean") + return "eventJoined: boolean expected"; + if (typeof message.transferred !== "boolean") + return "transferred: boolean expected"; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + if (!$util.isInteger(message.driveLastPlayedAt)) + return "driveLastPlayedAt: integer expected"; + return null; + }; + + /** + * Creates a CarState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState + */ + CarState.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUserResponse.CarState) + return object; + let message = new $root.wm.protobuf.LoadUserResponse.CarState(); + if (object.hasOpponentGhost != null) + message.hasOpponentGhost = Boolean(object.hasOpponentGhost); + switch (object.competitionState) { + case "COMPETITION_NOT_PARTICIPATED": + case 1: + message.competitionState = 1; + break; + case "COMPETITION_QUALIFIED": + case 2: + message.competitionState = 2; + break; + case "COMPETITION_PARTICIPATED": + case 3: + message.competitionState = 3; + break; + case "COMPETITION_WON": + case 4: + message.competitionState = 4; + break; + } + if (object.toBeDeleted != null) + message.toBeDeleted = Boolean(object.toBeDeleted); + if (object.eventJoined != null) + message.eventJoined = Boolean(object.eventJoined); + if (object.transferred != null) + message.transferred = Boolean(object.transferred); + if (object.driveLastPlayedAt != null) + message.driveLastPlayedAt = object.driveLastPlayedAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarState message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.CarState} message CarState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.hasOpponentGhost = false; + object.competitionState = options.enums === String ? "COMPETITION_NOT_PARTICIPATED" : 1; + object.toBeDeleted = false; + object.eventJoined = false; + object.transferred = false; + object.driveLastPlayedAt = 0; + } + if (message.hasOpponentGhost != null && message.hasOwnProperty("hasOpponentGhost")) + object.hasOpponentGhost = message.hasOpponentGhost; + if (message.competitionState != null && message.hasOwnProperty("competitionState")) + object.competitionState = options.enums === String ? $root.wm.protobuf.GhostCompetitionParticipantState[message.competitionState] : message.competitionState; + if (message.toBeDeleted != null && message.hasOwnProperty("toBeDeleted")) + object.toBeDeleted = message.toBeDeleted; + if (message.eventJoined != null && message.hasOwnProperty("eventJoined")) + object.eventJoined = message.eventJoined; + if (message.transferred != null && message.hasOwnProperty("transferred")) + object.transferred = message.transferred; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + object.driveLastPlayedAt = message.driveLastPlayedAt; + return object; + }; + + /** + * Converts this CarState to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + * @returns {Object.} JSON object + */ + CarState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarState + * @function getTypeUrl + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUserResponse.CarState"; + }; + + return CarState; + })(); + + return LoadUserResponse; + })(); + + protobuf.UpdateUserSessionRequest = (function() { + + /** + * Properties of an UpdateUserSessionRequest. + * @memberof wm.protobuf + * @interface IUpdateUserSessionRequest + * @property {number|null} [userId] UpdateUserSessionRequest userId + * @property {string|null} [cardChipId] UpdateUserSessionRequest cardChipId + * @property {string|null} [accessCode] UpdateUserSessionRequest accessCode + * @property {number|null} [cardTypeCode] UpdateUserSessionRequest cardTypeCode + * @property {number|null} [cardRegionCode] UpdateUserSessionRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] UpdateUserSessionRequest device + * @property {number} unlockAt UpdateUserSessionRequest unlockAt + * @property {boolean|null} [acceptVs] UpdateUserSessionRequest acceptVs + */ + + /** + * Constructs a new UpdateUserSessionRequest. + * @memberof wm.protobuf + * @classdesc Represents an UpdateUserSessionRequest. + * @implements IUpdateUserSessionRequest + * @constructor + * @param {wm.protobuf.IUpdateUserSessionRequest=} [properties] Properties to set + */ + function UpdateUserSessionRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserSessionRequest userId. + * @member {number} userId + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.userId = 0; + + /** + * UpdateUserSessionRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.cardChipId = ""; + + /** + * UpdateUserSessionRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.accessCode = ""; + + /** + * UpdateUserSessionRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.cardTypeCode = 0; + + /** + * UpdateUserSessionRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.cardRegionCode = 0; + + /** + * UpdateUserSessionRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.device = 0; + + /** + * UpdateUserSessionRequest unlockAt. + * @member {number} unlockAt + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.unlockAt = 0; + + /** + * UpdateUserSessionRequest acceptVs. + * @member {boolean} acceptVs + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.acceptVs = false; + + /** + * Creates a new UpdateUserSessionRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.IUpdateUserSessionRequest=} [properties] Properties to set + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest instance + */ + UpdateUserSessionRequest.create = function create(properties) { + return new UpdateUserSessionRequest(properties); + }; + + /** + * Encodes the specified UpdateUserSessionRequest message. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.IUpdateUserSessionRequest} message UpdateUserSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.device); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.unlockAt); + if (message.acceptVs != null && Object.hasOwnProperty.call(message, "acceptVs")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.acceptVs); + return writer; + }; + + /** + * Encodes the specified UpdateUserSessionRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.IUpdateUserSessionRequest} message UpdateUserSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateUserSessionRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.cardChipId = reader.string(); + break; + } + case 3: { + message.accessCode = reader.string(); + break; + } + case 4: { + message.cardTypeCode = reader.uint32(); + break; + } + case 5: { + message.cardRegionCode = reader.uint32(); + break; + } + case 6: { + message.device = reader.int32(); + break; + } + case 7: { + message.unlockAt = reader.uint32(); + break; + } + case 8: { + message.acceptVs = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("unlockAt")) + throw $util.ProtocolError("missing required 'unlockAt'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserSessionRequest message. + * @function verify + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserSessionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + if (!$util.isInteger(message.unlockAt)) + return "unlockAt: integer expected"; + if (message.acceptVs != null && message.hasOwnProperty("acceptVs")) + if (typeof message.acceptVs !== "boolean") + return "acceptVs: boolean expected"; + return null; + }; + + /** + * Creates an UpdateUserSessionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest + */ + UpdateUserSessionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateUserSessionRequest) + return object; + let message = new $root.wm.protobuf.UpdateUserSessionRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.unlockAt != null) + message.unlockAt = object.unlockAt >>> 0; + if (object.acceptVs != null) + message.acceptVs = Boolean(object.acceptVs); + return message; + }; + + /** + * Creates a plain object from an UpdateUserSessionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.UpdateUserSessionRequest} message UpdateUserSessionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserSessionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.unlockAt = 0; + object.acceptVs = false; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.unlockAt != null && message.hasOwnProperty("unlockAt")) + object.unlockAt = message.unlockAt; + if (message.acceptVs != null && message.hasOwnProperty("acceptVs")) + object.acceptVs = message.acceptVs; + return object; + }; + + /** + * Converts this UpdateUserSessionRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUserSessionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserSessionRequest + * @function getTypeUrl + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateUserSessionRequest"; + }; + + return UpdateUserSessionRequest; + })(); + + protobuf.UpdateUserSessionResponse = (function() { + + /** + * Properties of an UpdateUserSessionResponse. + * @memberof wm.protobuf + * @interface IUpdateUserSessionResponse + * @property {wm.protobuf.ErrorCode} error UpdateUserSessionResponse error + */ + + /** + * Constructs a new UpdateUserSessionResponse. + * @memberof wm.protobuf + * @classdesc Represents an UpdateUserSessionResponse. + * @implements IUpdateUserSessionResponse + * @constructor + * @param {wm.protobuf.IUpdateUserSessionResponse=} [properties] Properties to set + */ + function UpdateUserSessionResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserSessionResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.UpdateUserSessionResponse + * @instance + */ + UpdateUserSessionResponse.prototype.error = 0; + + /** + * Creates a new UpdateUserSessionResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.IUpdateUserSessionResponse=} [properties] Properties to set + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse instance + */ + UpdateUserSessionResponse.create = function create(properties) { + return new UpdateUserSessionResponse(properties); + }; + + /** + * Encodes the specified UpdateUserSessionResponse message. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.IUpdateUserSessionResponse} message UpdateUserSessionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified UpdateUserSessionResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.IUpdateUserSessionResponse} message UpdateUserSessionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateUserSessionResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserSessionResponse message. + * @function verify + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserSessionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates an UpdateUserSessionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse + */ + UpdateUserSessionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateUserSessionResponse) + return object; + let message = new $root.wm.protobuf.UpdateUserSessionResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from an UpdateUserSessionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.UpdateUserSessionResponse} message UpdateUserSessionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserSessionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this UpdateUserSessionResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateUserSessionResponse + * @instance + * @returns {Object.} JSON object + */ + UpdateUserSessionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserSessionResponse + * @function getTypeUrl + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserSessionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateUserSessionResponse"; + }; + + return UpdateUserSessionResponse; + })(); + + protobuf.LoadDriveInformationRequest = (function() { + + /** + * Properties of a LoadDriveInformationRequest. + * @memberof wm.protobuf + * @interface ILoadDriveInformationRequest + * @property {number|null} [userId] LoadDriveInformationRequest userId + */ + + /** + * Constructs a new LoadDriveInformationRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadDriveInformationRequest. + * @implements ILoadDriveInformationRequest + * @constructor + * @param {wm.protobuf.ILoadDriveInformationRequest=} [properties] Properties to set + */ + function LoadDriveInformationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadDriveInformationRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadDriveInformationRequest + * @instance + */ + LoadDriveInformationRequest.prototype.userId = 0; + + /** + * Creates a new LoadDriveInformationRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.ILoadDriveInformationRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest instance + */ + LoadDriveInformationRequest.create = function create(properties) { + return new LoadDriveInformationRequest(properties); + }; + + /** + * Encodes the specified LoadDriveInformationRequest message. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.ILoadDriveInformationRequest} message LoadDriveInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadDriveInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.ILoadDriveInformationRequest} message LoadDriveInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadDriveInformationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadDriveInformationRequest message. + * @function verify + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadDriveInformationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadDriveInformationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest + */ + LoadDriveInformationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadDriveInformationRequest) + return object; + let message = new $root.wm.protobuf.LoadDriveInformationRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadDriveInformationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.LoadDriveInformationRequest} message LoadDriveInformationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadDriveInformationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadDriveInformationRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadDriveInformationRequest + * @instance + * @returns {Object.} JSON object + */ + LoadDriveInformationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadDriveInformationRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadDriveInformationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadDriveInformationRequest"; + }; + + return LoadDriveInformationRequest; + })(); + + protobuf.LoadDriveInformationResponse = (function() { + + /** + * Properties of a LoadDriveInformationResponse. + * @memberof wm.protobuf + * @interface ILoadDriveInformationResponse + * @property {wm.protobuf.ErrorCode} error LoadDriveInformationResponse error + * @property {Array.|null} [noticeWindow] LoadDriveInformationResponse noticeWindow + * @property {Array.|null} [noticeWindowMessage] LoadDriveInformationResponse noticeWindowMessage + * @property {wm.protobuf.ITransferNotice|null} [transferNotice] LoadDriveInformationResponse transferNotice + * @property {Array.|null} [restrictedModels] LoadDriveInformationResponse restrictedModels + * @property {boolean|null} [announceFeature] LoadDriveInformationResponse announceFeature + * @property {boolean|null} [announceMobile] LoadDriveInformationResponse announceMobile + * @property {Array.|null} [availableTickets] LoadDriveInformationResponse availableTickets + */ + + /** + * Constructs a new LoadDriveInformationResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadDriveInformationResponse. + * @implements ILoadDriveInformationResponse + * @constructor + * @param {wm.protobuf.ILoadDriveInformationResponse=} [properties] Properties to set + */ + function LoadDriveInformationResponse(properties) { + this.noticeWindow = []; + this.noticeWindowMessage = []; + this.restrictedModels = []; + this.availableTickets = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadDriveInformationResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.error = 0; + + /** + * LoadDriveInformationResponse noticeWindow. + * @member {Array.} noticeWindow + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.noticeWindow = $util.emptyArray; + + /** + * LoadDriveInformationResponse noticeWindowMessage. + * @member {Array.} noticeWindowMessage + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.noticeWindowMessage = $util.emptyArray; + + /** + * LoadDriveInformationResponse transferNotice. + * @member {wm.protobuf.ITransferNotice|null|undefined} transferNotice + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.transferNotice = null; + + /** + * LoadDriveInformationResponse restrictedModels. + * @member {Array.} restrictedModels + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.restrictedModels = $util.emptyArray; + + /** + * LoadDriveInformationResponse announceFeature. + * @member {boolean} announceFeature + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.announceFeature = false; + + /** + * LoadDriveInformationResponse announceMobile. + * @member {boolean} announceMobile + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.announceMobile = false; + + /** + * LoadDriveInformationResponse availableTickets. + * @member {Array.} availableTickets + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.availableTickets = $util.emptyArray; + + /** + * Creates a new LoadDriveInformationResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.ILoadDriveInformationResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse instance + */ + LoadDriveInformationResponse.create = function create(properties) { + return new LoadDriveInformationResponse(properties); + }; + + /** + * Encodes the specified LoadDriveInformationResponse message. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.ILoadDriveInformationResponse} message LoadDriveInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.noticeWindow != null && message.noticeWindow.length) + for (let i = 0; i < message.noticeWindow.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.noticeWindow[i]); + if (message.noticeWindowMessage != null && message.noticeWindowMessage.length) + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.noticeWindowMessage[i]); + if (message.transferNotice != null && Object.hasOwnProperty.call(message, "transferNotice")) + $root.wm.protobuf.TransferNotice.encode(message.transferNotice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.restrictedModels != null && message.restrictedModels.length) + for (let i = 0; i < message.restrictedModels.length; ++i) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.restrictedModels[i]); + if (message.announceFeature != null && Object.hasOwnProperty.call(message, "announceFeature")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.announceFeature); + if (message.announceMobile != null && Object.hasOwnProperty.call(message, "announceMobile")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.announceMobile); + if (message.availableTickets != null && message.availableTickets.length) + for (let i = 0; i < message.availableTickets.length; ++i) + $root.wm.protobuf.UserItem.encode(message.availableTickets[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadDriveInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.ILoadDriveInformationResponse} message LoadDriveInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadDriveInformationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.noticeWindow && message.noticeWindow.length)) + message.noticeWindow = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.noticeWindow.push(reader.int32()); + } else + message.noticeWindow.push(reader.int32()); + break; + } + case 3: { + if (!(message.noticeWindowMessage && message.noticeWindowMessage.length)) + message.noticeWindowMessage = []; + message.noticeWindowMessage.push(reader.string()); + break; + } + case 4: { + message.transferNotice = $root.wm.protobuf.TransferNotice.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.restrictedModels && message.restrictedModels.length)) + message.restrictedModels = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedModels.push(reader.uint32()); + } else + message.restrictedModels.push(reader.uint32()); + break; + } + case 7: { + message.announceFeature = reader.bool(); + break; + } + case 8: { + message.announceMobile = reader.bool(); + break; + } + case 9: { + if (!(message.availableTickets && message.availableTickets.length)) + message.availableTickets = []; + message.availableTickets.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadDriveInformationResponse message. + * @function verify + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadDriveInformationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.noticeWindow != null && message.hasOwnProperty("noticeWindow")) { + if (!Array.isArray(message.noticeWindow)) + return "noticeWindow: array expected"; + for (let i = 0; i < message.noticeWindow.length; ++i) + switch (message.noticeWindow[i]) { + default: + return "noticeWindow: enum value[] expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + } + if (message.noticeWindowMessage != null && message.hasOwnProperty("noticeWindowMessage")) { + if (!Array.isArray(message.noticeWindowMessage)) + return "noticeWindowMessage: array expected"; + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + if (!$util.isString(message.noticeWindowMessage[i])) + return "noticeWindowMessage: string[] expected"; + } + if (message.transferNotice != null && message.hasOwnProperty("transferNotice")) { + let error = $root.wm.protobuf.TransferNotice.verify(message.transferNotice); + if (error) + return "transferNotice." + error; + } + if (message.restrictedModels != null && message.hasOwnProperty("restrictedModels")) { + if (!Array.isArray(message.restrictedModels)) + return "restrictedModels: array expected"; + for (let i = 0; i < message.restrictedModels.length; ++i) + if (!$util.isInteger(message.restrictedModels[i])) + return "restrictedModels: integer[] expected"; + } + if (message.announceFeature != null && message.hasOwnProperty("announceFeature")) + if (typeof message.announceFeature !== "boolean") + return "announceFeature: boolean expected"; + if (message.announceMobile != null && message.hasOwnProperty("announceMobile")) + if (typeof message.announceMobile !== "boolean") + return "announceMobile: boolean expected"; + if (message.availableTickets != null && message.hasOwnProperty("availableTickets")) { + if (!Array.isArray(message.availableTickets)) + return "availableTickets: array expected"; + for (let i = 0; i < message.availableTickets.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.availableTickets[i]); + if (error) + return "availableTickets." + error; + } + } + return null; + }; + + /** + * Creates a LoadDriveInformationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse + */ + LoadDriveInformationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadDriveInformationResponse) + return object; + let message = new $root.wm.protobuf.LoadDriveInformationResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.noticeWindow) { + if (!Array.isArray(object.noticeWindow)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.noticeWindow: array expected"); + message.noticeWindow = []; + for (let i = 0; i < object.noticeWindow.length; ++i) + switch (object.noticeWindow[i]) { + default: + case "NOTICE_UNUSED_1": + case 1: + message.noticeWindow[i] = 1; + break; + case "NOTICE_UNUSED_2": + case 2: + message.noticeWindow[i] = 2; + break; + case "NOTICE_UNUSED_3": + case 3: + message.noticeWindow[i] = 3; + break; + case "NOTICE_UNUSED_4": + case 4: + message.noticeWindow[i] = 4; + break; + case "NOTICE_UNUSED_5": + case 5: + message.noticeWindow[i] = 5; + break; + case "NOTICE_UNUSED_6": + case 6: + message.noticeWindow[i] = 6; + break; + case "NOTICE_UNUSED_7": + case 7: + message.noticeWindow[i] = 7; + break; + case "NOTICE_UNUSED_8": + case 8: + message.noticeWindow[i] = 8; + break; + case "NOTICE_UNUSED_9": + case 9: + message.noticeWindow[i] = 9; + break; + case "NOTICE_UNUSED_10": + case 10: + message.noticeWindow[i] = 10; + break; + case "NOTICE_UNUSED_11": + case 11: + message.noticeWindow[i] = 11; + break; + case "NOTICE_UNUSED_12": + case 12: + message.noticeWindow[i] = 12; + break; + } + } + if (object.noticeWindowMessage) { + if (!Array.isArray(object.noticeWindowMessage)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.noticeWindowMessage: array expected"); + message.noticeWindowMessage = []; + for (let i = 0; i < object.noticeWindowMessage.length; ++i) + message.noticeWindowMessage[i] = String(object.noticeWindowMessage[i]); + } + if (object.transferNotice != null) { + if (typeof object.transferNotice !== "object") + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.transferNotice: object expected"); + message.transferNotice = $root.wm.protobuf.TransferNotice.fromObject(object.transferNotice); + } + if (object.restrictedModels) { + if (!Array.isArray(object.restrictedModels)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.restrictedModels: array expected"); + message.restrictedModels = []; + for (let i = 0; i < object.restrictedModels.length; ++i) + message.restrictedModels[i] = object.restrictedModels[i] >>> 0; + } + if (object.announceFeature != null) + message.announceFeature = Boolean(object.announceFeature); + if (object.announceMobile != null) + message.announceMobile = Boolean(object.announceMobile); + if (object.availableTickets) { + if (!Array.isArray(object.availableTickets)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.availableTickets: array expected"); + message.availableTickets = []; + for (let i = 0; i < object.availableTickets.length; ++i) { + if (typeof object.availableTickets[i] !== "object") + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.availableTickets: object expected"); + message.availableTickets[i] = $root.wm.protobuf.UserItem.fromObject(object.availableTickets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadDriveInformationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.LoadDriveInformationResponse} message LoadDriveInformationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadDriveInformationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.noticeWindow = []; + object.noticeWindowMessage = []; + object.restrictedModels = []; + object.availableTickets = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.transferNotice = null; + object.announceFeature = false; + object.announceMobile = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.noticeWindow && message.noticeWindow.length) { + object.noticeWindow = []; + for (let j = 0; j < message.noticeWindow.length; ++j) + object.noticeWindow[j] = options.enums === String ? $root.wm.protobuf.NoticeEntry[message.noticeWindow[j]] : message.noticeWindow[j]; + } + if (message.noticeWindowMessage && message.noticeWindowMessage.length) { + object.noticeWindowMessage = []; + for (let j = 0; j < message.noticeWindowMessage.length; ++j) + object.noticeWindowMessage[j] = message.noticeWindowMessage[j]; + } + if (message.transferNotice != null && message.hasOwnProperty("transferNotice")) + object.transferNotice = $root.wm.protobuf.TransferNotice.toObject(message.transferNotice, options); + if (message.restrictedModels && message.restrictedModels.length) { + object.restrictedModels = []; + for (let j = 0; j < message.restrictedModels.length; ++j) + object.restrictedModels[j] = message.restrictedModels[j]; + } + if (message.announceFeature != null && message.hasOwnProperty("announceFeature")) + object.announceFeature = message.announceFeature; + if (message.announceMobile != null && message.hasOwnProperty("announceMobile")) + object.announceMobile = message.announceMobile; + if (message.availableTickets && message.availableTickets.length) { + object.availableTickets = []; + for (let j = 0; j < message.availableTickets.length; ++j) + object.availableTickets[j] = $root.wm.protobuf.UserItem.toObject(message.availableTickets[j], options); + } + return object; + }; + + /** + * Converts this LoadDriveInformationResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + * @returns {Object.} JSON object + */ + LoadDriveInformationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadDriveInformationResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadDriveInformationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadDriveInformationResponse"; + }; + + return LoadDriveInformationResponse; + })(); + + protobuf.LoadCarRequest = (function() { + + /** + * Properties of a LoadCarRequest. + * @memberof wm.protobuf + * @interface ILoadCarRequest + * @property {number} carId LoadCarRequest carId + * @property {boolean|null} [eventMode] LoadCarRequest eventMode + * @property {string|null} [eventModeSerial] LoadCarRequest eventModeSerial + */ + + /** + * Constructs a new LoadCarRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadCarRequest. + * @implements ILoadCarRequest + * @constructor + * @param {wm.protobuf.ILoadCarRequest=} [properties] Properties to set + */ + function LoadCarRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadCarRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadCarRequest + * @instance + */ + LoadCarRequest.prototype.carId = 0; + + /** + * LoadCarRequest eventMode. + * @member {boolean} eventMode + * @memberof wm.protobuf.LoadCarRequest + * @instance + */ + LoadCarRequest.prototype.eventMode = false; + + /** + * LoadCarRequest eventModeSerial. + * @member {string} eventModeSerial + * @memberof wm.protobuf.LoadCarRequest + * @instance + */ + LoadCarRequest.prototype.eventModeSerial = ""; + + /** + * Creates a new LoadCarRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.ILoadCarRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest instance + */ + LoadCarRequest.create = function create(properties) { + return new LoadCarRequest(properties); + }; + + /** + * Encodes the specified LoadCarRequest message. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.ILoadCarRequest} message LoadCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.eventMode != null && Object.hasOwnProperty.call(message, "eventMode")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.eventMode); + if (message.eventModeSerial != null && Object.hasOwnProperty.call(message, "eventModeSerial")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.eventModeSerial); + return writer; + }; + + /** + * Encodes the specified LoadCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.ILoadCarRequest} message LoadCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadCarRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.eventMode = reader.bool(); + break; + } + case 3: { + message.eventModeSerial = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadCarRequest message. + * @function verify + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadCarRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.eventMode != null && message.hasOwnProperty("eventMode")) + if (typeof message.eventMode !== "boolean") + return "eventMode: boolean expected"; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + if (!$util.isString(message.eventModeSerial)) + return "eventModeSerial: string expected"; + return null; + }; + + /** + * Creates a LoadCarRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest + */ + LoadCarRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadCarRequest) + return object; + let message = new $root.wm.protobuf.LoadCarRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.eventMode != null) + message.eventMode = Boolean(object.eventMode); + if (object.eventModeSerial != null) + message.eventModeSerial = String(object.eventModeSerial); + return message; + }; + + /** + * Creates a plain object from a LoadCarRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.LoadCarRequest} message LoadCarRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadCarRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.eventMode = false; + object.eventModeSerial = ""; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.eventMode != null && message.hasOwnProperty("eventMode")) + object.eventMode = message.eventMode; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + object.eventModeSerial = message.eventModeSerial; + return object; + }; + + /** + * Converts this LoadCarRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadCarRequest + * @instance + * @returns {Object.} JSON object + */ + LoadCarRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadCarRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadCarRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadCarRequest"; + }; + + return LoadCarRequest; + })(); + + protobuf.LoadCarResponse = (function() { + + /** + * Properties of a LoadCarResponse. + * @memberof wm.protobuf + * @interface ILoadCarResponse + * @property {wm.protobuf.ErrorCode} error LoadCarResponse error + * @property {wm.protobuf.ICar} car LoadCarResponse car + * @property {number} tuningPoint LoadCarResponse tuningPoint + * @property {number} odometer LoadCarResponse odometer + * @property {number} playCount LoadCarResponse playCount + * @property {boolean} earnedCustomColor LoadCarResponse earnedCustomColor + * @property {wm.protobuf.ICarSetting} setting LoadCarResponse setting + * @property {number} vsPlayCount LoadCarResponse vsPlayCount + * @property {number} vsBurstCount LoadCarResponse vsBurstCount + * @property {number} vsStarCount LoadCarResponse vsStarCount + * @property {number} vsStarCountMax LoadCarResponse vsStarCountMax + * @property {number} vsCoolOrWild LoadCarResponse vsCoolOrWild + * @property {number} vsSmoothOrRough LoadCarResponse vsSmoothOrRough + * @property {number} vsTripleStarMedals LoadCarResponse vsTripleStarMedals + * @property {number} vsDoubleStarMedals LoadCarResponse vsDoubleStarMedals + * @property {number} vsSingleStarMedals LoadCarResponse vsSingleStarMedals + * @property {number} vsPlainMedals LoadCarResponse vsPlainMedals + * @property {number} rgPlayCount LoadCarResponse rgPlayCount + * @property {number} rgWinCount LoadCarResponse rgWinCount + * @property {number} rgTrophy LoadCarResponse rgTrophy + * @property {number} rgPreviousVersionPlayCount LoadCarResponse rgPreviousVersionPlayCount + * @property {number} rgScore LoadCarResponse rgScore + * @property {Array.|null} [rgRegionMapScore] LoadCarResponse rgRegionMapScore + * @property {Array.|null} [rgRegions] LoadCarResponse rgRegions + * @property {number} rgStamp LoadCarResponse rgStamp + * @property {boolean} rgAcquireAllCrowns LoadCarResponse rgAcquireAllCrowns + * @property {number} dressupLevel LoadCarResponse dressupLevel + * @property {number} dressupPoint LoadCarResponse dressupPoint + * @property {number} stPlayCount LoadCarResponse stPlayCount + * @property {number} stClearBits LoadCarResponse stClearBits + * @property {number} stClearDivCount LoadCarResponse stClearDivCount + * @property {number} stClearCount LoadCarResponse stClearCount + * @property {number|Long} stLoseBits LoadCarResponse stLoseBits + * @property {number} stConsecutiveWins LoadCarResponse stConsecutiveWins + * @property {number} stConsecutiveWinsMax LoadCarResponse stConsecutiveWinsMax + * @property {boolean} stCompleted_100Episodes LoadCarResponse stCompleted_100Episodes + * @property {wm.protobuf.IChallengerCar|null} [challenger] LoadCarResponse challenger + * @property {number|null} [challengerReturnCount] LoadCarResponse challengerReturnCount + * @property {number|null} [numOfChallengers] LoadCarResponse numOfChallengers + * @property {wm.protobuf.IGhostCar|null} [opponentGhost] LoadCarResponse opponentGhost + * @property {number|Long|null} [opponentTrailId] LoadCarResponse opponentTrailId + * @property {number|null} [opponentCompetitionId] LoadCarResponse opponentCompetitionId + * @property {wm.protobuf.IGhostCompetitionParameter|null} [competitionParameter] LoadCarResponse competitionParameter + * @property {Array.|null} [specialTitles] LoadCarResponse specialTitles + * @property {Array.|null} [earnedTitles] LoadCarResponse earnedTitles + * @property {Array.|null} [ownedItems] LoadCarResponse ownedItems + * @property {boolean} auraMotifAutoChange LoadCarResponse auraMotifAutoChange + * @property {number} screenshotCount LoadCarResponse screenshotCount + * @property {boolean|null} [announceEventModePrize] LoadCarResponse announceEventModePrize + * @property {boolean} transferred LoadCarResponse transferred + * @property {number|null} [driveLastPlayedAt] LoadCarResponse driveLastPlayedAt + * @property {wm.protobuf.LoadCarResponse.IStoryInsurance|null} [insurance] LoadCarResponse insurance + */ + + /** + * Constructs a new LoadCarResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadCarResponse. + * @implements ILoadCarResponse + * @constructor + * @param {wm.protobuf.ILoadCarResponse=} [properties] Properties to set + */ + function LoadCarResponse(properties) { + this.rgRegionMapScore = []; + this.rgRegions = []; + this.specialTitles = []; + this.earnedTitles = []; + this.ownedItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadCarResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.error = 0; + + /** + * LoadCarResponse car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.car = null; + + /** + * LoadCarResponse tuningPoint. + * @member {number} tuningPoint + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.tuningPoint = 0; + + /** + * LoadCarResponse odometer. + * @member {number} odometer + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.odometer = 0; + + /** + * LoadCarResponse playCount. + * @member {number} playCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.playCount = 0; + + /** + * LoadCarResponse earnedCustomColor. + * @member {boolean} earnedCustomColor + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.earnedCustomColor = false; + + /** + * LoadCarResponse setting. + * @member {wm.protobuf.ICarSetting} setting + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.setting = null; + + /** + * LoadCarResponse vsPlayCount. + * @member {number} vsPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsPlayCount = 0; + + /** + * LoadCarResponse vsBurstCount. + * @member {number} vsBurstCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsBurstCount = 0; + + /** + * LoadCarResponse vsStarCount. + * @member {number} vsStarCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsStarCount = 0; + + /** + * LoadCarResponse vsStarCountMax. + * @member {number} vsStarCountMax + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsStarCountMax = 0; + + /** + * LoadCarResponse vsCoolOrWild. + * @member {number} vsCoolOrWild + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsCoolOrWild = 0; + + /** + * LoadCarResponse vsSmoothOrRough. + * @member {number} vsSmoothOrRough + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsSmoothOrRough = 0; + + /** + * LoadCarResponse vsTripleStarMedals. + * @member {number} vsTripleStarMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsTripleStarMedals = 0; + + /** + * LoadCarResponse vsDoubleStarMedals. + * @member {number} vsDoubleStarMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsDoubleStarMedals = 0; + + /** + * LoadCarResponse vsSingleStarMedals. + * @member {number} vsSingleStarMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsSingleStarMedals = 0; + + /** + * LoadCarResponse vsPlainMedals. + * @member {number} vsPlainMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsPlainMedals = 0; + + /** + * LoadCarResponse rgPlayCount. + * @member {number} rgPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgPlayCount = 0; + + /** + * LoadCarResponse rgWinCount. + * @member {number} rgWinCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgWinCount = 0; + + /** + * LoadCarResponse rgTrophy. + * @member {number} rgTrophy + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgTrophy = 0; + + /** + * LoadCarResponse rgPreviousVersionPlayCount. + * @member {number} rgPreviousVersionPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgPreviousVersionPlayCount = 0; + + /** + * LoadCarResponse rgScore. + * @member {number} rgScore + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgScore = 0; + + /** + * LoadCarResponse rgRegionMapScore. + * @member {Array.} rgRegionMapScore + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgRegionMapScore = $util.emptyArray; + + /** + * LoadCarResponse rgRegions. + * @member {Array.} rgRegions + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgRegions = $util.emptyArray; + + /** + * LoadCarResponse rgStamp. + * @member {number} rgStamp + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgStamp = 0; + + /** + * LoadCarResponse rgAcquireAllCrowns. + * @member {boolean} rgAcquireAllCrowns + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgAcquireAllCrowns = false; + + /** + * LoadCarResponse dressupLevel. + * @member {number} dressupLevel + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.dressupLevel = 0; + + /** + * LoadCarResponse dressupPoint. + * @member {number} dressupPoint + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.dressupPoint = 0; + + /** + * LoadCarResponse stPlayCount. + * @member {number} stPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stPlayCount = 0; + + /** + * LoadCarResponse stClearBits. + * @member {number} stClearBits + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stClearBits = 0; + + /** + * LoadCarResponse stClearDivCount. + * @member {number} stClearDivCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stClearDivCount = 0; + + /** + * LoadCarResponse stClearCount. + * @member {number} stClearCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stClearCount = 0; + + /** + * LoadCarResponse stLoseBits. + * @member {number|Long} stLoseBits + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stLoseBits = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * LoadCarResponse stConsecutiveWins. + * @member {number} stConsecutiveWins + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stConsecutiveWins = 0; + + /** + * LoadCarResponse stConsecutiveWinsMax. + * @member {number} stConsecutiveWinsMax + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stConsecutiveWinsMax = 0; + + /** + * LoadCarResponse stCompleted_100Episodes. + * @member {boolean} stCompleted_100Episodes + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stCompleted_100Episodes = false; + + /** + * LoadCarResponse challenger. + * @member {wm.protobuf.IChallengerCar|null|undefined} challenger + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.challenger = null; + + /** + * LoadCarResponse challengerReturnCount. + * @member {number} challengerReturnCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.challengerReturnCount = 0; + + /** + * LoadCarResponse numOfChallengers. + * @member {number} numOfChallengers + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.numOfChallengers = 0; + + /** + * LoadCarResponse opponentGhost. + * @member {wm.protobuf.IGhostCar|null|undefined} opponentGhost + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.opponentGhost = null; + + /** + * LoadCarResponse opponentTrailId. + * @member {number|Long} opponentTrailId + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.opponentTrailId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * LoadCarResponse opponentCompetitionId. + * @member {number} opponentCompetitionId + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.opponentCompetitionId = 0; + + /** + * LoadCarResponse competitionParameter. + * @member {wm.protobuf.IGhostCompetitionParameter|null|undefined} competitionParameter + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.competitionParameter = null; + + /** + * LoadCarResponse specialTitles. + * @member {Array.} specialTitles + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.specialTitles = $util.emptyArray; + + /** + * LoadCarResponse earnedTitles. + * @member {Array.} earnedTitles + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.earnedTitles = $util.emptyArray; + + /** + * LoadCarResponse ownedItems. + * @member {Array.} ownedItems + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.ownedItems = $util.emptyArray; + + /** + * LoadCarResponse auraMotifAutoChange. + * @member {boolean} auraMotifAutoChange + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.auraMotifAutoChange = false; + + /** + * LoadCarResponse screenshotCount. + * @member {number} screenshotCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.screenshotCount = 0; + + /** + * LoadCarResponse announceEventModePrize. + * @member {boolean} announceEventModePrize + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.announceEventModePrize = false; + + /** + * LoadCarResponse transferred. + * @member {boolean} transferred + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.transferred = false; + + /** + * LoadCarResponse driveLastPlayedAt. + * @member {number} driveLastPlayedAt + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.driveLastPlayedAt = 0; + + /** + * LoadCarResponse insurance. + * @member {wm.protobuf.LoadCarResponse.IStoryInsurance|null|undefined} insurance + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.insurance = null; + + /** + * Creates a new LoadCarResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.ILoadCarResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse instance + */ + LoadCarResponse.create = function create(properties) { + return new LoadCarResponse(properties); + }; + + /** + * Encodes the specified LoadCarResponse message. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.ILoadCarResponse} message LoadCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuningPoint); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.odometer); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.playCount); + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.earnedCustomColor); + $root.wm.protobuf.CarSetting.encode(message.setting, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.vsPlayCount); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.vsBurstCount); + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.vsStarCount); + writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.vsStarCountMax); + writer.uint32(/* id 16, wireType 0 =*/128).sint32(message.vsCoolOrWild); + writer.uint32(/* id 17, wireType 0 =*/136).sint32(message.vsSmoothOrRough); + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.vsTripleStarMedals); + writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.vsDoubleStarMedals); + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.vsSingleStarMedals); + writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.vsPlainMedals); + writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.rgPlayCount); + writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.rgWinCount); + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.rgTrophy); + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.rgScore); + if (message.rgRegionMapScore != null && message.rgRegionMapScore.length) + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.rgRegionMapScore[i]); + writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.rgStamp); + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.dressupLevel); + writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.dressupPoint); + if (message.rgRegions != null && message.rgRegions.length) + for (let i = 0; i < message.rgRegions.length; ++i) + writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.rgRegions[i]); + writer.uint32(/* id 34, wireType 0 =*/272).uint32(message.stPlayCount); + writer.uint32(/* id 35, wireType 0 =*/280).uint32(message.stClearBits); + writer.uint32(/* id 36, wireType 0 =*/288).uint32(message.stClearDivCount); + writer.uint32(/* id 37, wireType 0 =*/296).uint32(message.stClearCount); + writer.uint32(/* id 38, wireType 0 =*/304).uint64(message.stLoseBits); + writer.uint32(/* id 40, wireType 0 =*/320).uint32(message.stConsecutiveWins); + writer.uint32(/* id 41, wireType 0 =*/328).uint32(message.stConsecutiveWinsMax); + if (message.challenger != null && Object.hasOwnProperty.call(message, "challenger")) + $root.wm.protobuf.ChallengerCar.encode(message.challenger, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.challengerReturnCount != null && Object.hasOwnProperty.call(message, "challengerReturnCount")) + writer.uint32(/* id 43, wireType 0 =*/344).uint32(message.challengerReturnCount); + if (message.opponentGhost != null && Object.hasOwnProperty.call(message, "opponentGhost")) + $root.wm.protobuf.GhostCar.encode(message.opponentGhost, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); + if (message.opponentTrailId != null && Object.hasOwnProperty.call(message, "opponentTrailId")) + writer.uint32(/* id 45, wireType 0 =*/360).uint64(message.opponentTrailId); + if (message.opponentCompetitionId != null && Object.hasOwnProperty.call(message, "opponentCompetitionId")) + writer.uint32(/* id 46, wireType 0 =*/368).uint32(message.opponentCompetitionId); + if (message.competitionParameter != null && Object.hasOwnProperty.call(message, "competitionParameter")) + $root.wm.protobuf.GhostCompetitionParameter.encode(message.competitionParameter, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.specialTitles != null && message.specialTitles.length) + for (let i = 0; i < message.specialTitles.length; ++i) + writer.uint32(/* id 48, wireType 2 =*/386).string(message.specialTitles[i]); + if (message.earnedTitles != null && message.earnedTitles.length) + for (let i = 0; i < message.earnedTitles.length; ++i) + writer.uint32(/* id 49, wireType 2 =*/394).string(message.earnedTitles[i]); + if (message.ownedItems != null && message.ownedItems.length) + for (let i = 0; i < message.ownedItems.length; ++i) + $root.wm.protobuf.CarItem.encode(message.ownedItems[i], writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + writer.uint32(/* id 51, wireType 0 =*/408).bool(message.auraMotifAutoChange); + writer.uint32(/* id 53, wireType 0 =*/424).uint32(message.screenshotCount); + if (message.numOfChallengers != null && Object.hasOwnProperty.call(message, "numOfChallengers")) + writer.uint32(/* id 55, wireType 0 =*/440).uint32(message.numOfChallengers); + if (message.announceEventModePrize != null && Object.hasOwnProperty.call(message, "announceEventModePrize")) + writer.uint32(/* id 58, wireType 0 =*/464).bool(message.announceEventModePrize); + writer.uint32(/* id 59, wireType 0 =*/472).bool(message.rgAcquireAllCrowns); + writer.uint32(/* id 60, wireType 0 =*/480).bool(message.transferred); + if (message.driveLastPlayedAt != null && Object.hasOwnProperty.call(message, "driveLastPlayedAt")) + writer.uint32(/* id 61, wireType 0 =*/488).uint32(message.driveLastPlayedAt); + if (message.insurance != null && Object.hasOwnProperty.call(message, "insurance")) + $root.wm.protobuf.LoadCarResponse.StoryInsurance.encode(message.insurance, writer.uint32(/* id 62, wireType 2 =*/498).fork()).ldelim(); + writer.uint32(/* id 63, wireType 0 =*/504).bool(message.stCompleted_100Episodes); + writer.uint32(/* id 64, wireType 0 =*/512).uint32(message.rgPreviousVersionPlayCount); + return writer; + }; + + /** + * Encodes the specified LoadCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.ILoadCarResponse} message LoadCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadCarResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 3: { + message.tuningPoint = reader.uint32(); + break; + } + case 6: { + message.odometer = reader.uint32(); + break; + } + case 7: { + message.playCount = reader.uint32(); + break; + } + case 8: { + message.earnedCustomColor = reader.bool(); + break; + } + case 10: { + message.setting = $root.wm.protobuf.CarSetting.decode(reader, reader.uint32()); + break; + } + case 12: { + message.vsPlayCount = reader.uint32(); + break; + } + case 13: { + message.vsBurstCount = reader.uint32(); + break; + } + case 14: { + message.vsStarCount = reader.uint32(); + break; + } + case 15: { + message.vsStarCountMax = reader.uint32(); + break; + } + case 16: { + message.vsCoolOrWild = reader.sint32(); + break; + } + case 17: { + message.vsSmoothOrRough = reader.sint32(); + break; + } + case 18: { + message.vsTripleStarMedals = reader.uint32(); + break; + } + case 19: { + message.vsDoubleStarMedals = reader.uint32(); + break; + } + case 20: { + message.vsSingleStarMedals = reader.uint32(); + break; + } + case 21: { + message.vsPlainMedals = reader.uint32(); + break; + } + case 22: { + message.rgPlayCount = reader.uint32(); + break; + } + case 23: { + message.rgWinCount = reader.uint32(); + break; + } + case 24: { + message.rgTrophy = reader.uint32(); + break; + } + case 64: { + message.rgPreviousVersionPlayCount = reader.uint32(); + break; + } + case 25: { + message.rgScore = reader.uint32(); + break; + } + case 26: { + if (!(message.rgRegionMapScore && message.rgRegionMapScore.length)) + message.rgRegionMapScore = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegionMapScore.push(reader.uint32()); + } else + message.rgRegionMapScore.push(reader.uint32()); + break; + } + case 30: { + if (!(message.rgRegions && message.rgRegions.length)) + message.rgRegions = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegions.push(reader.uint32()); + } else + message.rgRegions.push(reader.uint32()); + break; + } + case 27: { + message.rgStamp = reader.uint32(); + break; + } + case 59: { + message.rgAcquireAllCrowns = reader.bool(); + break; + } + case 28: { + message.dressupLevel = reader.uint32(); + break; + } + case 29: { + message.dressupPoint = reader.uint32(); + break; + } + case 34: { + message.stPlayCount = reader.uint32(); + break; + } + case 35: { + message.stClearBits = reader.uint32(); + break; + } + case 36: { + message.stClearDivCount = reader.uint32(); + break; + } + case 37: { + message.stClearCount = reader.uint32(); + break; + } + case 38: { + message.stLoseBits = reader.uint64(); + break; + } + case 40: { + message.stConsecutiveWins = reader.uint32(); + break; + } + case 41: { + message.stConsecutiveWinsMax = reader.uint32(); + break; + } + case 63: { + message.stCompleted_100Episodes = reader.bool(); + break; + } + case 42: { + message.challenger = $root.wm.protobuf.ChallengerCar.decode(reader, reader.uint32()); + break; + } + case 43: { + message.challengerReturnCount = reader.uint32(); + break; + } + case 55: { + message.numOfChallengers = reader.uint32(); + break; + } + case 44: { + message.opponentGhost = $root.wm.protobuf.GhostCar.decode(reader, reader.uint32()); + break; + } + case 45: { + message.opponentTrailId = reader.uint64(); + break; + } + case 46: { + message.opponentCompetitionId = reader.uint32(); + break; + } + case 47: { + message.competitionParameter = $root.wm.protobuf.GhostCompetitionParameter.decode(reader, reader.uint32()); + break; + } + case 48: { + if (!(message.specialTitles && message.specialTitles.length)) + message.specialTitles = []; + message.specialTitles.push(reader.string()); + break; + } + case 49: { + if (!(message.earnedTitles && message.earnedTitles.length)) + message.earnedTitles = []; + message.earnedTitles.push(reader.string()); + break; + } + case 50: { + if (!(message.ownedItems && message.ownedItems.length)) + message.ownedItems = []; + message.ownedItems.push($root.wm.protobuf.CarItem.decode(reader, reader.uint32())); + break; + } + case 51: { + message.auraMotifAutoChange = reader.bool(); + break; + } + case 53: { + message.screenshotCount = reader.uint32(); + break; + } + case 58: { + message.announceEventModePrize = reader.bool(); + break; + } + case 60: { + message.transferred = reader.bool(); + break; + } + case 61: { + message.driveLastPlayedAt = reader.uint32(); + break; + } + case 62: { + message.insurance = $root.wm.protobuf.LoadCarResponse.StoryInsurance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("tuningPoint")) + throw $util.ProtocolError("missing required 'tuningPoint'", { instance: message }); + if (!message.hasOwnProperty("odometer")) + throw $util.ProtocolError("missing required 'odometer'", { instance: message }); + if (!message.hasOwnProperty("playCount")) + throw $util.ProtocolError("missing required 'playCount'", { instance: message }); + if (!message.hasOwnProperty("earnedCustomColor")) + throw $util.ProtocolError("missing required 'earnedCustomColor'", { instance: message }); + if (!message.hasOwnProperty("setting")) + throw $util.ProtocolError("missing required 'setting'", { instance: message }); + if (!message.hasOwnProperty("vsPlayCount")) + throw $util.ProtocolError("missing required 'vsPlayCount'", { instance: message }); + if (!message.hasOwnProperty("vsBurstCount")) + throw $util.ProtocolError("missing required 'vsBurstCount'", { instance: message }); + if (!message.hasOwnProperty("vsStarCount")) + throw $util.ProtocolError("missing required 'vsStarCount'", { instance: message }); + if (!message.hasOwnProperty("vsStarCountMax")) + throw $util.ProtocolError("missing required 'vsStarCountMax'", { instance: message }); + if (!message.hasOwnProperty("vsCoolOrWild")) + throw $util.ProtocolError("missing required 'vsCoolOrWild'", { instance: message }); + if (!message.hasOwnProperty("vsSmoothOrRough")) + throw $util.ProtocolError("missing required 'vsSmoothOrRough'", { instance: message }); + if (!message.hasOwnProperty("vsTripleStarMedals")) + throw $util.ProtocolError("missing required 'vsTripleStarMedals'", { instance: message }); + if (!message.hasOwnProperty("vsDoubleStarMedals")) + throw $util.ProtocolError("missing required 'vsDoubleStarMedals'", { instance: message }); + if (!message.hasOwnProperty("vsSingleStarMedals")) + throw $util.ProtocolError("missing required 'vsSingleStarMedals'", { instance: message }); + if (!message.hasOwnProperty("vsPlainMedals")) + throw $util.ProtocolError("missing required 'vsPlainMedals'", { instance: message }); + if (!message.hasOwnProperty("rgPlayCount")) + throw $util.ProtocolError("missing required 'rgPlayCount'", { instance: message }); + if (!message.hasOwnProperty("rgWinCount")) + throw $util.ProtocolError("missing required 'rgWinCount'", { instance: message }); + if (!message.hasOwnProperty("rgTrophy")) + throw $util.ProtocolError("missing required 'rgTrophy'", { instance: message }); + if (!message.hasOwnProperty("rgPreviousVersionPlayCount")) + throw $util.ProtocolError("missing required 'rgPreviousVersionPlayCount'", { instance: message }); + if (!message.hasOwnProperty("rgScore")) + throw $util.ProtocolError("missing required 'rgScore'", { instance: message }); + if (!message.hasOwnProperty("rgStamp")) + throw $util.ProtocolError("missing required 'rgStamp'", { instance: message }); + if (!message.hasOwnProperty("rgAcquireAllCrowns")) + throw $util.ProtocolError("missing required 'rgAcquireAllCrowns'", { instance: message }); + if (!message.hasOwnProperty("dressupLevel")) + throw $util.ProtocolError("missing required 'dressupLevel'", { instance: message }); + if (!message.hasOwnProperty("dressupPoint")) + throw $util.ProtocolError("missing required 'dressupPoint'", { instance: message }); + if (!message.hasOwnProperty("stPlayCount")) + throw $util.ProtocolError("missing required 'stPlayCount'", { instance: message }); + if (!message.hasOwnProperty("stClearBits")) + throw $util.ProtocolError("missing required 'stClearBits'", { instance: message }); + if (!message.hasOwnProperty("stClearDivCount")) + throw $util.ProtocolError("missing required 'stClearDivCount'", { instance: message }); + if (!message.hasOwnProperty("stClearCount")) + throw $util.ProtocolError("missing required 'stClearCount'", { instance: message }); + if (!message.hasOwnProperty("stLoseBits")) + throw $util.ProtocolError("missing required 'stLoseBits'", { instance: message }); + if (!message.hasOwnProperty("stConsecutiveWins")) + throw $util.ProtocolError("missing required 'stConsecutiveWins'", { instance: message }); + if (!message.hasOwnProperty("stConsecutiveWinsMax")) + throw $util.ProtocolError("missing required 'stConsecutiveWinsMax'", { instance: message }); + if (!message.hasOwnProperty("stCompleted_100Episodes")) + throw $util.ProtocolError("missing required 'stCompleted_100Episodes'", { instance: message }); + if (!message.hasOwnProperty("auraMotifAutoChange")) + throw $util.ProtocolError("missing required 'auraMotifAutoChange'", { instance: message }); + if (!message.hasOwnProperty("screenshotCount")) + throw $util.ProtocolError("missing required 'screenshotCount'", { instance: message }); + if (!message.hasOwnProperty("transferred")) + throw $util.ProtocolError("missing required 'transferred'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadCarResponse message. + * @function verify + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadCarResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.tuningPoint)) + return "tuningPoint: integer expected"; + if (!$util.isInteger(message.odometer)) + return "odometer: integer expected"; + if (!$util.isInteger(message.playCount)) + return "playCount: integer expected"; + if (typeof message.earnedCustomColor !== "boolean") + return "earnedCustomColor: boolean expected"; + { + let error = $root.wm.protobuf.CarSetting.verify(message.setting); + if (error) + return "setting." + error; + } + if (!$util.isInteger(message.vsPlayCount)) + return "vsPlayCount: integer expected"; + if (!$util.isInteger(message.vsBurstCount)) + return "vsBurstCount: integer expected"; + if (!$util.isInteger(message.vsStarCount)) + return "vsStarCount: integer expected"; + if (!$util.isInteger(message.vsStarCountMax)) + return "vsStarCountMax: integer expected"; + if (!$util.isInteger(message.vsCoolOrWild)) + return "vsCoolOrWild: integer expected"; + if (!$util.isInteger(message.vsSmoothOrRough)) + return "vsSmoothOrRough: integer expected"; + if (!$util.isInteger(message.vsTripleStarMedals)) + return "vsTripleStarMedals: integer expected"; + if (!$util.isInteger(message.vsDoubleStarMedals)) + return "vsDoubleStarMedals: integer expected"; + if (!$util.isInteger(message.vsSingleStarMedals)) + return "vsSingleStarMedals: integer expected"; + if (!$util.isInteger(message.vsPlainMedals)) + return "vsPlainMedals: integer expected"; + if (!$util.isInteger(message.rgPlayCount)) + return "rgPlayCount: integer expected"; + if (!$util.isInteger(message.rgWinCount)) + return "rgWinCount: integer expected"; + if (!$util.isInteger(message.rgTrophy)) + return "rgTrophy: integer expected"; + if (!$util.isInteger(message.rgPreviousVersionPlayCount)) + return "rgPreviousVersionPlayCount: integer expected"; + if (!$util.isInteger(message.rgScore)) + return "rgScore: integer expected"; + if (message.rgRegionMapScore != null && message.hasOwnProperty("rgRegionMapScore")) { + if (!Array.isArray(message.rgRegionMapScore)) + return "rgRegionMapScore: array expected"; + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + if (!$util.isInteger(message.rgRegionMapScore[i])) + return "rgRegionMapScore: integer[] expected"; + } + if (message.rgRegions != null && message.hasOwnProperty("rgRegions")) { + if (!Array.isArray(message.rgRegions)) + return "rgRegions: array expected"; + for (let i = 0; i < message.rgRegions.length; ++i) + if (!$util.isInteger(message.rgRegions[i])) + return "rgRegions: integer[] expected"; + } + if (!$util.isInteger(message.rgStamp)) + return "rgStamp: integer expected"; + if (typeof message.rgAcquireAllCrowns !== "boolean") + return "rgAcquireAllCrowns: boolean expected"; + if (!$util.isInteger(message.dressupLevel)) + return "dressupLevel: integer expected"; + if (!$util.isInteger(message.dressupPoint)) + return "dressupPoint: integer expected"; + if (!$util.isInteger(message.stPlayCount)) + return "stPlayCount: integer expected"; + if (!$util.isInteger(message.stClearBits)) + return "stClearBits: integer expected"; + if (!$util.isInteger(message.stClearDivCount)) + return "stClearDivCount: integer expected"; + if (!$util.isInteger(message.stClearCount)) + return "stClearCount: integer expected"; + if (!$util.isInteger(message.stLoseBits) && !(message.stLoseBits && $util.isInteger(message.stLoseBits.low) && $util.isInteger(message.stLoseBits.high))) + return "stLoseBits: integer|Long expected"; + if (!$util.isInteger(message.stConsecutiveWins)) + return "stConsecutiveWins: integer expected"; + if (!$util.isInteger(message.stConsecutiveWinsMax)) + return "stConsecutiveWinsMax: integer expected"; + if (typeof message.stCompleted_100Episodes !== "boolean") + return "stCompleted_100Episodes: boolean expected"; + if (message.challenger != null && message.hasOwnProperty("challenger")) { + let error = $root.wm.protobuf.ChallengerCar.verify(message.challenger); + if (error) + return "challenger." + error; + } + if (message.challengerReturnCount != null && message.hasOwnProperty("challengerReturnCount")) + if (!$util.isInteger(message.challengerReturnCount)) + return "challengerReturnCount: integer expected"; + if (message.numOfChallengers != null && message.hasOwnProperty("numOfChallengers")) + if (!$util.isInteger(message.numOfChallengers)) + return "numOfChallengers: integer expected"; + if (message.opponentGhost != null && message.hasOwnProperty("opponentGhost")) { + let error = $root.wm.protobuf.GhostCar.verify(message.opponentGhost); + if (error) + return "opponentGhost." + error; + } + if (message.opponentTrailId != null && message.hasOwnProperty("opponentTrailId")) + if (!$util.isInteger(message.opponentTrailId) && !(message.opponentTrailId && $util.isInteger(message.opponentTrailId.low) && $util.isInteger(message.opponentTrailId.high))) + return "opponentTrailId: integer|Long expected"; + if (message.opponentCompetitionId != null && message.hasOwnProperty("opponentCompetitionId")) + if (!$util.isInteger(message.opponentCompetitionId)) + return "opponentCompetitionId: integer expected"; + if (message.competitionParameter != null && message.hasOwnProperty("competitionParameter")) { + let error = $root.wm.protobuf.GhostCompetitionParameter.verify(message.competitionParameter); + if (error) + return "competitionParameter." + error; + } + if (message.specialTitles != null && message.hasOwnProperty("specialTitles")) { + if (!Array.isArray(message.specialTitles)) + return "specialTitles: array expected"; + for (let i = 0; i < message.specialTitles.length; ++i) + if (!$util.isString(message.specialTitles[i])) + return "specialTitles: string[] expected"; + } + if (message.earnedTitles != null && message.hasOwnProperty("earnedTitles")) { + if (!Array.isArray(message.earnedTitles)) + return "earnedTitles: array expected"; + for (let i = 0; i < message.earnedTitles.length; ++i) + if (!$util.isString(message.earnedTitles[i])) + return "earnedTitles: string[] expected"; + } + if (message.ownedItems != null && message.hasOwnProperty("ownedItems")) { + if (!Array.isArray(message.ownedItems)) + return "ownedItems: array expected"; + for (let i = 0; i < message.ownedItems.length; ++i) { + let error = $root.wm.protobuf.CarItem.verify(message.ownedItems[i]); + if (error) + return "ownedItems." + error; + } + } + if (typeof message.auraMotifAutoChange !== "boolean") + return "auraMotifAutoChange: boolean expected"; + if (!$util.isInteger(message.screenshotCount)) + return "screenshotCount: integer expected"; + if (message.announceEventModePrize != null && message.hasOwnProperty("announceEventModePrize")) + if (typeof message.announceEventModePrize !== "boolean") + return "announceEventModePrize: boolean expected"; + if (typeof message.transferred !== "boolean") + return "transferred: boolean expected"; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + if (!$util.isInteger(message.driveLastPlayedAt)) + return "driveLastPlayedAt: integer expected"; + if (message.insurance != null && message.hasOwnProperty("insurance")) { + let error = $root.wm.protobuf.LoadCarResponse.StoryInsurance.verify(message.insurance); + if (error) + return "insurance." + error; + } + return null; + }; + + /** + * Creates a LoadCarResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse + */ + LoadCarResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadCarResponse) + return object; + let message = new $root.wm.protobuf.LoadCarResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.tuningPoint != null) + message.tuningPoint = object.tuningPoint >>> 0; + if (object.odometer != null) + message.odometer = object.odometer >>> 0; + if (object.playCount != null) + message.playCount = object.playCount >>> 0; + if (object.earnedCustomColor != null) + message.earnedCustomColor = Boolean(object.earnedCustomColor); + if (object.setting != null) { + if (typeof object.setting !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.setting: object expected"); + message.setting = $root.wm.protobuf.CarSetting.fromObject(object.setting); + } + if (object.vsPlayCount != null) + message.vsPlayCount = object.vsPlayCount >>> 0; + if (object.vsBurstCount != null) + message.vsBurstCount = object.vsBurstCount >>> 0; + if (object.vsStarCount != null) + message.vsStarCount = object.vsStarCount >>> 0; + if (object.vsStarCountMax != null) + message.vsStarCountMax = object.vsStarCountMax >>> 0; + if (object.vsCoolOrWild != null) + message.vsCoolOrWild = object.vsCoolOrWild | 0; + if (object.vsSmoothOrRough != null) + message.vsSmoothOrRough = object.vsSmoothOrRough | 0; + if (object.vsTripleStarMedals != null) + message.vsTripleStarMedals = object.vsTripleStarMedals >>> 0; + if (object.vsDoubleStarMedals != null) + message.vsDoubleStarMedals = object.vsDoubleStarMedals >>> 0; + if (object.vsSingleStarMedals != null) + message.vsSingleStarMedals = object.vsSingleStarMedals >>> 0; + if (object.vsPlainMedals != null) + message.vsPlainMedals = object.vsPlainMedals >>> 0; + if (object.rgPlayCount != null) + message.rgPlayCount = object.rgPlayCount >>> 0; + if (object.rgWinCount != null) + message.rgWinCount = object.rgWinCount >>> 0; + if (object.rgTrophy != null) + message.rgTrophy = object.rgTrophy >>> 0; + if (object.rgPreviousVersionPlayCount != null) + message.rgPreviousVersionPlayCount = object.rgPreviousVersionPlayCount >>> 0; + if (object.rgScore != null) + message.rgScore = object.rgScore >>> 0; + if (object.rgRegionMapScore) { + if (!Array.isArray(object.rgRegionMapScore)) + throw TypeError(".wm.protobuf.LoadCarResponse.rgRegionMapScore: array expected"); + message.rgRegionMapScore = []; + for (let i = 0; i < object.rgRegionMapScore.length; ++i) + message.rgRegionMapScore[i] = object.rgRegionMapScore[i] >>> 0; + } + if (object.rgRegions) { + if (!Array.isArray(object.rgRegions)) + throw TypeError(".wm.protobuf.LoadCarResponse.rgRegions: array expected"); + message.rgRegions = []; + for (let i = 0; i < object.rgRegions.length; ++i) + message.rgRegions[i] = object.rgRegions[i] >>> 0; + } + if (object.rgStamp != null) + message.rgStamp = object.rgStamp >>> 0; + if (object.rgAcquireAllCrowns != null) + message.rgAcquireAllCrowns = Boolean(object.rgAcquireAllCrowns); + if (object.dressupLevel != null) + message.dressupLevel = object.dressupLevel >>> 0; + if (object.dressupPoint != null) + message.dressupPoint = object.dressupPoint >>> 0; + if (object.stPlayCount != null) + message.stPlayCount = object.stPlayCount >>> 0; + if (object.stClearBits != null) + message.stClearBits = object.stClearBits >>> 0; + if (object.stClearDivCount != null) + message.stClearDivCount = object.stClearDivCount >>> 0; + if (object.stClearCount != null) + message.stClearCount = object.stClearCount >>> 0; + if (object.stLoseBits != null) + if ($util.Long) + (message.stLoseBits = $util.Long.fromValue(object.stLoseBits)).unsigned = true; + else if (typeof object.stLoseBits === "string") + message.stLoseBits = parseInt(object.stLoseBits, 10); + else if (typeof object.stLoseBits === "number") + message.stLoseBits = object.stLoseBits; + else if (typeof object.stLoseBits === "object") + message.stLoseBits = new $util.LongBits(object.stLoseBits.low >>> 0, object.stLoseBits.high >>> 0).toNumber(true); + if (object.stConsecutiveWins != null) + message.stConsecutiveWins = object.stConsecutiveWins >>> 0; + if (object.stConsecutiveWinsMax != null) + message.stConsecutiveWinsMax = object.stConsecutiveWinsMax >>> 0; + if (object.stCompleted_100Episodes != null) + message.stCompleted_100Episodes = Boolean(object.stCompleted_100Episodes); + if (object.challenger != null) { + if (typeof object.challenger !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.challenger: object expected"); + message.challenger = $root.wm.protobuf.ChallengerCar.fromObject(object.challenger); + } + if (object.challengerReturnCount != null) + message.challengerReturnCount = object.challengerReturnCount >>> 0; + if (object.numOfChallengers != null) + message.numOfChallengers = object.numOfChallengers >>> 0; + if (object.opponentGhost != null) { + if (typeof object.opponentGhost !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.opponentGhost: object expected"); + message.opponentGhost = $root.wm.protobuf.GhostCar.fromObject(object.opponentGhost); + } + if (object.opponentTrailId != null) + if ($util.Long) + (message.opponentTrailId = $util.Long.fromValue(object.opponentTrailId)).unsigned = true; + else if (typeof object.opponentTrailId === "string") + message.opponentTrailId = parseInt(object.opponentTrailId, 10); + else if (typeof object.opponentTrailId === "number") + message.opponentTrailId = object.opponentTrailId; + else if (typeof object.opponentTrailId === "object") + message.opponentTrailId = new $util.LongBits(object.opponentTrailId.low >>> 0, object.opponentTrailId.high >>> 0).toNumber(true); + if (object.opponentCompetitionId != null) + message.opponentCompetitionId = object.opponentCompetitionId >>> 0; + if (object.competitionParameter != null) { + if (typeof object.competitionParameter !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.competitionParameter: object expected"); + message.competitionParameter = $root.wm.protobuf.GhostCompetitionParameter.fromObject(object.competitionParameter); + } + if (object.specialTitles) { + if (!Array.isArray(object.specialTitles)) + throw TypeError(".wm.protobuf.LoadCarResponse.specialTitles: array expected"); + message.specialTitles = []; + for (let i = 0; i < object.specialTitles.length; ++i) + message.specialTitles[i] = String(object.specialTitles[i]); + } + if (object.earnedTitles) { + if (!Array.isArray(object.earnedTitles)) + throw TypeError(".wm.protobuf.LoadCarResponse.earnedTitles: array expected"); + message.earnedTitles = []; + for (let i = 0; i < object.earnedTitles.length; ++i) + message.earnedTitles[i] = String(object.earnedTitles[i]); + } + if (object.ownedItems) { + if (!Array.isArray(object.ownedItems)) + throw TypeError(".wm.protobuf.LoadCarResponse.ownedItems: array expected"); + message.ownedItems = []; + for (let i = 0; i < object.ownedItems.length; ++i) { + if (typeof object.ownedItems[i] !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.ownedItems: object expected"); + message.ownedItems[i] = $root.wm.protobuf.CarItem.fromObject(object.ownedItems[i]); + } + } + if (object.auraMotifAutoChange != null) + message.auraMotifAutoChange = Boolean(object.auraMotifAutoChange); + if (object.screenshotCount != null) + message.screenshotCount = object.screenshotCount >>> 0; + if (object.announceEventModePrize != null) + message.announceEventModePrize = Boolean(object.announceEventModePrize); + if (object.transferred != null) + message.transferred = Boolean(object.transferred); + if (object.driveLastPlayedAt != null) + message.driveLastPlayedAt = object.driveLastPlayedAt >>> 0; + if (object.insurance != null) { + if (typeof object.insurance !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.insurance: object expected"); + message.insurance = $root.wm.protobuf.LoadCarResponse.StoryInsurance.fromObject(object.insurance); + } + return message; + }; + + /** + * Creates a plain object from a LoadCarResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.LoadCarResponse} message LoadCarResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadCarResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.rgRegionMapScore = []; + object.rgRegions = []; + object.specialTitles = []; + object.earnedTitles = []; + object.ownedItems = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.car = null; + object.tuningPoint = 0; + object.odometer = 0; + object.playCount = 0; + object.earnedCustomColor = false; + object.setting = null; + object.vsPlayCount = 0; + object.vsBurstCount = 0; + object.vsStarCount = 0; + object.vsStarCountMax = 0; + object.vsCoolOrWild = 0; + object.vsSmoothOrRough = 0; + object.vsTripleStarMedals = 0; + object.vsDoubleStarMedals = 0; + object.vsSingleStarMedals = 0; + object.vsPlainMedals = 0; + object.rgPlayCount = 0; + object.rgWinCount = 0; + object.rgTrophy = 0; + object.rgScore = 0; + object.rgStamp = 0; + object.dressupLevel = 0; + object.dressupPoint = 0; + object.stPlayCount = 0; + object.stClearBits = 0; + object.stClearDivCount = 0; + object.stClearCount = 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.stLoseBits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.stLoseBits = options.longs === String ? "0" : 0; + object.stConsecutiveWins = 0; + object.stConsecutiveWinsMax = 0; + object.challenger = null; + object.challengerReturnCount = 0; + object.opponentGhost = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.opponentTrailId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.opponentTrailId = options.longs === String ? "0" : 0; + object.opponentCompetitionId = 0; + object.competitionParameter = null; + object.auraMotifAutoChange = false; + object.screenshotCount = 0; + object.numOfChallengers = 0; + object.announceEventModePrize = false; + object.rgAcquireAllCrowns = false; + object.transferred = false; + object.driveLastPlayedAt = 0; + object.insurance = null; + object.stCompleted_100Episodes = false; + object.rgPreviousVersionPlayCount = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.tuningPoint != null && message.hasOwnProperty("tuningPoint")) + object.tuningPoint = message.tuningPoint; + if (message.odometer != null && message.hasOwnProperty("odometer")) + object.odometer = message.odometer; + if (message.playCount != null && message.hasOwnProperty("playCount")) + object.playCount = message.playCount; + if (message.earnedCustomColor != null && message.hasOwnProperty("earnedCustomColor")) + object.earnedCustomColor = message.earnedCustomColor; + if (message.setting != null && message.hasOwnProperty("setting")) + object.setting = $root.wm.protobuf.CarSetting.toObject(message.setting, options); + if (message.vsPlayCount != null && message.hasOwnProperty("vsPlayCount")) + object.vsPlayCount = message.vsPlayCount; + if (message.vsBurstCount != null && message.hasOwnProperty("vsBurstCount")) + object.vsBurstCount = message.vsBurstCount; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + object.vsStarCount = message.vsStarCount; + if (message.vsStarCountMax != null && message.hasOwnProperty("vsStarCountMax")) + object.vsStarCountMax = message.vsStarCountMax; + if (message.vsCoolOrWild != null && message.hasOwnProperty("vsCoolOrWild")) + object.vsCoolOrWild = message.vsCoolOrWild; + if (message.vsSmoothOrRough != null && message.hasOwnProperty("vsSmoothOrRough")) + object.vsSmoothOrRough = message.vsSmoothOrRough; + if (message.vsTripleStarMedals != null && message.hasOwnProperty("vsTripleStarMedals")) + object.vsTripleStarMedals = message.vsTripleStarMedals; + if (message.vsDoubleStarMedals != null && message.hasOwnProperty("vsDoubleStarMedals")) + object.vsDoubleStarMedals = message.vsDoubleStarMedals; + if (message.vsSingleStarMedals != null && message.hasOwnProperty("vsSingleStarMedals")) + object.vsSingleStarMedals = message.vsSingleStarMedals; + if (message.vsPlainMedals != null && message.hasOwnProperty("vsPlainMedals")) + object.vsPlainMedals = message.vsPlainMedals; + if (message.rgPlayCount != null && message.hasOwnProperty("rgPlayCount")) + object.rgPlayCount = message.rgPlayCount; + if (message.rgWinCount != null && message.hasOwnProperty("rgWinCount")) + object.rgWinCount = message.rgWinCount; + if (message.rgTrophy != null && message.hasOwnProperty("rgTrophy")) + object.rgTrophy = message.rgTrophy; + if (message.rgScore != null && message.hasOwnProperty("rgScore")) + object.rgScore = message.rgScore; + if (message.rgRegionMapScore && message.rgRegionMapScore.length) { + object.rgRegionMapScore = []; + for (let j = 0; j < message.rgRegionMapScore.length; ++j) + object.rgRegionMapScore[j] = message.rgRegionMapScore[j]; + } + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + object.rgStamp = message.rgStamp; + if (message.dressupLevel != null && message.hasOwnProperty("dressupLevel")) + object.dressupLevel = message.dressupLevel; + if (message.dressupPoint != null && message.hasOwnProperty("dressupPoint")) + object.dressupPoint = message.dressupPoint; + if (message.rgRegions && message.rgRegions.length) { + object.rgRegions = []; + for (let j = 0; j < message.rgRegions.length; ++j) + object.rgRegions[j] = message.rgRegions[j]; + } + if (message.stPlayCount != null && message.hasOwnProperty("stPlayCount")) + object.stPlayCount = message.stPlayCount; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + object.stClearBits = message.stClearBits; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + object.stClearDivCount = message.stClearDivCount; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + object.stClearCount = message.stClearCount; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (typeof message.stLoseBits === "number") + object.stLoseBits = options.longs === String ? String(message.stLoseBits) : message.stLoseBits; + else + object.stLoseBits = options.longs === String ? $util.Long.prototype.toString.call(message.stLoseBits) : options.longs === Number ? new $util.LongBits(message.stLoseBits.low >>> 0, message.stLoseBits.high >>> 0).toNumber(true) : message.stLoseBits; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + object.stConsecutiveWins = message.stConsecutiveWins; + if (message.stConsecutiveWinsMax != null && message.hasOwnProperty("stConsecutiveWinsMax")) + object.stConsecutiveWinsMax = message.stConsecutiveWinsMax; + if (message.challenger != null && message.hasOwnProperty("challenger")) + object.challenger = $root.wm.protobuf.ChallengerCar.toObject(message.challenger, options); + if (message.challengerReturnCount != null && message.hasOwnProperty("challengerReturnCount")) + object.challengerReturnCount = message.challengerReturnCount; + if (message.opponentGhost != null && message.hasOwnProperty("opponentGhost")) + object.opponentGhost = $root.wm.protobuf.GhostCar.toObject(message.opponentGhost, options); + if (message.opponentTrailId != null && message.hasOwnProperty("opponentTrailId")) + if (typeof message.opponentTrailId === "number") + object.opponentTrailId = options.longs === String ? String(message.opponentTrailId) : message.opponentTrailId; + else + object.opponentTrailId = options.longs === String ? $util.Long.prototype.toString.call(message.opponentTrailId) : options.longs === Number ? new $util.LongBits(message.opponentTrailId.low >>> 0, message.opponentTrailId.high >>> 0).toNumber(true) : message.opponentTrailId; + if (message.opponentCompetitionId != null && message.hasOwnProperty("opponentCompetitionId")) + object.opponentCompetitionId = message.opponentCompetitionId; + if (message.competitionParameter != null && message.hasOwnProperty("competitionParameter")) + object.competitionParameter = $root.wm.protobuf.GhostCompetitionParameter.toObject(message.competitionParameter, options); + if (message.specialTitles && message.specialTitles.length) { + object.specialTitles = []; + for (let j = 0; j < message.specialTitles.length; ++j) + object.specialTitles[j] = message.specialTitles[j]; + } + if (message.earnedTitles && message.earnedTitles.length) { + object.earnedTitles = []; + for (let j = 0; j < message.earnedTitles.length; ++j) + object.earnedTitles[j] = message.earnedTitles[j]; + } + if (message.ownedItems && message.ownedItems.length) { + object.ownedItems = []; + for (let j = 0; j < message.ownedItems.length; ++j) + object.ownedItems[j] = $root.wm.protobuf.CarItem.toObject(message.ownedItems[j], options); + } + if (message.auraMotifAutoChange != null && message.hasOwnProperty("auraMotifAutoChange")) + object.auraMotifAutoChange = message.auraMotifAutoChange; + if (message.screenshotCount != null && message.hasOwnProperty("screenshotCount")) + object.screenshotCount = message.screenshotCount; + if (message.numOfChallengers != null && message.hasOwnProperty("numOfChallengers")) + object.numOfChallengers = message.numOfChallengers; + if (message.announceEventModePrize != null && message.hasOwnProperty("announceEventModePrize")) + object.announceEventModePrize = message.announceEventModePrize; + if (message.rgAcquireAllCrowns != null && message.hasOwnProperty("rgAcquireAllCrowns")) + object.rgAcquireAllCrowns = message.rgAcquireAllCrowns; + if (message.transferred != null && message.hasOwnProperty("transferred")) + object.transferred = message.transferred; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + object.driveLastPlayedAt = message.driveLastPlayedAt; + if (message.insurance != null && message.hasOwnProperty("insurance")) + object.insurance = $root.wm.protobuf.LoadCarResponse.StoryInsurance.toObject(message.insurance, options); + if (message.stCompleted_100Episodes != null && message.hasOwnProperty("stCompleted_100Episodes")) + object.stCompleted_100Episodes = message.stCompleted_100Episodes; + if (message.rgPreviousVersionPlayCount != null && message.hasOwnProperty("rgPreviousVersionPlayCount")) + object.rgPreviousVersionPlayCount = message.rgPreviousVersionPlayCount; + return object; + }; + + /** + * Converts this LoadCarResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadCarResponse + * @instance + * @returns {Object.} JSON object + */ + LoadCarResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadCarResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadCarResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadCarResponse"; + }; + + LoadCarResponse.StoryInsurance = (function() { + + /** + * Properties of a StoryInsurance. + * @memberof wm.protobuf.LoadCarResponse + * @interface IStoryInsurance + * @property {number} numOfRemains StoryInsurance numOfRemains + */ + + /** + * Constructs a new StoryInsurance. + * @memberof wm.protobuf.LoadCarResponse + * @classdesc Represents a StoryInsurance. + * @implements IStoryInsurance + * @constructor + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance=} [properties] Properties to set + */ + function StoryInsurance(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoryInsurance numOfRemains. + * @member {number} numOfRemains + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @instance + */ + StoryInsurance.prototype.numOfRemains = 0; + + /** + * Creates a new StoryInsurance instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance=} [properties] Properties to set + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance instance + */ + StoryInsurance.create = function create(properties) { + return new StoryInsurance(properties); + }; + + /** + * Encodes the specified StoryInsurance message. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance} message StoryInsurance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryInsurance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.numOfRemains); + return writer; + }; + + /** + * Encodes the specified StoryInsurance message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance} message StoryInsurance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryInsurance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryInsurance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadCarResponse.StoryInsurance(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.numOfRemains = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("numOfRemains")) + throw $util.ProtocolError("missing required 'numOfRemains'", { instance: message }); + return message; + }; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryInsurance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoryInsurance message. + * @function verify + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoryInsurance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.numOfRemains)) + return "numOfRemains: integer expected"; + return null; + }; + + /** + * Creates a StoryInsurance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance + */ + StoryInsurance.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadCarResponse.StoryInsurance) + return object; + let message = new $root.wm.protobuf.LoadCarResponse.StoryInsurance(); + if (object.numOfRemains != null) + message.numOfRemains = object.numOfRemains >>> 0; + return message; + }; + + /** + * Creates a plain object from a StoryInsurance message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.StoryInsurance} message StoryInsurance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoryInsurance.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.numOfRemains = 0; + if (message.numOfRemains != null && message.hasOwnProperty("numOfRemains")) + object.numOfRemains = message.numOfRemains; + return object; + }; + + /** + * Converts this StoryInsurance to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @instance + * @returns {Object.} JSON object + */ + StoryInsurance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoryInsurance + * @function getTypeUrl + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoryInsurance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadCarResponse.StoryInsurance"; + }; + + return StoryInsurance; + })(); + + return LoadCarResponse; + })(); + + protobuf.CreateCarRequest = (function() { + + /** + * Properties of a CreateCarRequest. + * @memberof wm.protobuf + * @interface ICreateCarRequest + * @property {number|null} [userId] CreateCarRequest userId + * @property {number|null} [banapassportAmId] CreateCarRequest banapassportAmId + * @property {string|null} [cardChipId] CreateCarRequest cardChipId + * @property {string|null} [accessCode] CreateCarRequest accessCode + * @property {number|null} [cardTypeCode] CreateCarRequest cardTypeCode + * @property {number|null} [cardRegionCode] CreateCarRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] CreateCarRequest device + * @property {wm.protobuf.ICar} car CreateCarRequest car + * @property {boolean} transmission CreateCarRequest transmission + * @property {number} timestamp CreateCarRequest timestamp + * @property {number|null} [userItemId] CreateCarRequest userItemId + * @property {number|null} [deletedCarId] CreateCarRequest deletedCarId + */ + + /** + * Constructs a new CreateCarRequest. + * @memberof wm.protobuf + * @classdesc Represents a CreateCarRequest. + * @implements ICreateCarRequest + * @constructor + * @param {wm.protobuf.ICreateCarRequest=} [properties] Properties to set + */ + function CreateCarRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCarRequest userId. + * @member {number} userId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.userId = 0; + + /** + * CreateCarRequest banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.banapassportAmId = 0; + + /** + * CreateCarRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.cardChipId = ""; + + /** + * CreateCarRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.accessCode = ""; + + /** + * CreateCarRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.cardTypeCode = 0; + + /** + * CreateCarRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.cardRegionCode = 0; + + /** + * CreateCarRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.device = 0; + + /** + * CreateCarRequest car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.car = null; + + /** + * CreateCarRequest transmission. + * @member {boolean} transmission + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.transmission = false; + + /** + * CreateCarRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.timestamp = 0; + + /** + * CreateCarRequest userItemId. + * @member {number} userItemId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.userItemId = 0; + + /** + * CreateCarRequest deletedCarId. + * @member {number} deletedCarId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.deletedCarId = 0; + + /** + * Creates a new CreateCarRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.ICreateCarRequest=} [properties] Properties to set + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest instance + */ + CreateCarRequest.create = function create(properties) { + return new CreateCarRequest(properties); + }; + + /** + * Encodes the specified CreateCarRequest message. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.ICreateCarRequest} message CreateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.banapassportAmId); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.device); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.transmission); + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.timestamp); + if (message.userItemId != null && Object.hasOwnProperty.call(message, "userItemId")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.userItemId); + if (message.deletedCarId != null && Object.hasOwnProperty.call(message, "deletedCarId")) + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.deletedCarId); + return writer; + }; + + /** + * Encodes the specified CreateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.ICreateCarRequest} message CreateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateCarRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.banapassportAmId = reader.uint32(); + break; + } + case 3: { + message.cardChipId = reader.string(); + break; + } + case 4: { + message.accessCode = reader.string(); + break; + } + case 5: { + message.cardTypeCode = reader.uint32(); + break; + } + case 6: { + message.cardRegionCode = reader.uint32(); + break; + } + case 7: { + message.device = reader.int32(); + break; + } + case 8: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 9: { + message.transmission = reader.bool(); + break; + } + case 11: { + message.timestamp = reader.uint32(); + break; + } + case 12: { + message.userItemId = reader.uint32(); + break; + } + case 13: { + message.deletedCarId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("transmission")) + throw $util.ProtocolError("missing required 'transmission'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCarRequest message. + * @function verify + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCarRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (typeof message.transmission !== "boolean") + return "transmission: boolean expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + if (!$util.isInteger(message.userItemId)) + return "userItemId: integer expected"; + if (message.deletedCarId != null && message.hasOwnProperty("deletedCarId")) + if (!$util.isInteger(message.deletedCarId)) + return "deletedCarId: integer expected"; + return null; + }; + + /** + * Creates a CreateCarRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest + */ + CreateCarRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateCarRequest) + return object; + let message = new $root.wm.protobuf.CreateCarRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.CreateCarRequest.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.transmission != null) + message.transmission = Boolean(object.transmission); + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.userItemId != null) + message.userItemId = object.userItemId >>> 0; + if (object.deletedCarId != null) + message.deletedCarId = object.deletedCarId >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateCarRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.CreateCarRequest} message CreateCarRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCarRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.banapassportAmId = 0; + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.car = null; + object.transmission = false; + object.timestamp = 0; + object.userItemId = 0; + object.deletedCarId = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.transmission != null && message.hasOwnProperty("transmission")) + object.transmission = message.transmission; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + object.userItemId = message.userItemId; + if (message.deletedCarId != null && message.hasOwnProperty("deletedCarId")) + object.deletedCarId = message.deletedCarId; + return object; + }; + + /** + * Converts this CreateCarRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateCarRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCarRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCarRequest + * @function getTypeUrl + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCarRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateCarRequest"; + }; + + return CreateCarRequest; + })(); + + protobuf.CreateCarResponse = (function() { + + /** + * Properties of a CreateCarResponse. + * @memberof wm.protobuf + * @interface ICreateCarResponse + * @property {wm.protobuf.ErrorCode} error CreateCarResponse error + * @property {string|null} [accessCode] CreateCarResponse accessCode + * @property {number|null} [banapassportAmId] CreateCarResponse banapassportAmId + * @property {number|null} [mbid] CreateCarResponse mbid + * @property {number} userId CreateCarResponse userId + * @property {number} carId CreateCarResponse carId + * @property {number|null} [stClearBits] CreateCarResponse stClearBits + * @property {number|null} [stClearDivCount] CreateCarResponse stClearDivCount + * @property {number|null} [stClearCount] CreateCarResponse stClearCount + * @property {number|Long|null} [stLoseBits] CreateCarResponse stLoseBits + * @property {number|null} [stConsecutiveWins] CreateCarResponse stConsecutiveWins + * @property {number|null} [stConsecutiveWinsMax] CreateCarResponse stConsecutiveWinsMax + * @property {number|null} [fullTunedCarCouponUnreceivableAt] CreateCarResponse fullTunedCarCouponUnreceivableAt + */ + + /** + * Constructs a new CreateCarResponse. + * @memberof wm.protobuf + * @classdesc Represents a CreateCarResponse. + * @implements ICreateCarResponse + * @constructor + * @param {wm.protobuf.ICreateCarResponse=} [properties] Properties to set + */ + function CreateCarResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCarResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.error = 0; + + /** + * CreateCarResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.accessCode = ""; + + /** + * CreateCarResponse banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.banapassportAmId = 0; + + /** + * CreateCarResponse mbid. + * @member {number} mbid + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.mbid = 0; + + /** + * CreateCarResponse userId. + * @member {number} userId + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.userId = 0; + + /** + * CreateCarResponse carId. + * @member {number} carId + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.carId = 0; + + /** + * CreateCarResponse stClearBits. + * @member {number} stClearBits + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stClearBits = 0; + + /** + * CreateCarResponse stClearDivCount. + * @member {number} stClearDivCount + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stClearDivCount = 0; + + /** + * CreateCarResponse stClearCount. + * @member {number} stClearCount + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stClearCount = 0; + + /** + * CreateCarResponse stLoseBits. + * @member {number|Long} stLoseBits + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stLoseBits = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * CreateCarResponse stConsecutiveWins. + * @member {number} stConsecutiveWins + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stConsecutiveWins = 0; + + /** + * CreateCarResponse stConsecutiveWinsMax. + * @member {number} stConsecutiveWinsMax + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stConsecutiveWinsMax = 0; + + /** + * CreateCarResponse fullTunedCarCouponUnreceivableAt. + * @member {number} fullTunedCarCouponUnreceivableAt + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.fullTunedCarCouponUnreceivableAt = 0; + + /** + * Creates a new CreateCarResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.ICreateCarResponse=} [properties] Properties to set + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse instance + */ + CreateCarResponse.create = function create(properties) { + return new CreateCarResponse(properties); + }; + + /** + * Encodes the specified CreateCarResponse message. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.ICreateCarResponse} message CreateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.banapassportAmId); + if (message.mbid != null && Object.hasOwnProperty.call(message, "mbid")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mbid); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.userId); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.carId); + if (message.stClearBits != null && Object.hasOwnProperty.call(message, "stClearBits")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stClearBits); + if (message.stClearDivCount != null && Object.hasOwnProperty.call(message, "stClearDivCount")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.stClearDivCount); + if (message.stClearCount != null && Object.hasOwnProperty.call(message, "stClearCount")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.stClearCount); + if (message.stLoseBits != null && Object.hasOwnProperty.call(message, "stLoseBits")) + writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.stLoseBits); + if (message.stConsecutiveWins != null && Object.hasOwnProperty.call(message, "stConsecutiveWins")) + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.stConsecutiveWins); + if (message.stConsecutiveWinsMax != null && Object.hasOwnProperty.call(message, "stConsecutiveWinsMax")) + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.stConsecutiveWinsMax); + if (message.fullTunedCarCouponUnreceivableAt != null && Object.hasOwnProperty.call(message, "fullTunedCarCouponUnreceivableAt")) + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.fullTunedCarCouponUnreceivableAt); + return writer; + }; + + /** + * Encodes the specified CreateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.ICreateCarResponse} message CreateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateCarResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + case 3: { + message.banapassportAmId = reader.uint32(); + break; + } + case 4: { + message.mbid = reader.uint32(); + break; + } + case 5: { + message.userId = reader.uint32(); + break; + } + case 6: { + message.carId = reader.uint32(); + break; + } + case 8: { + message.stClearBits = reader.uint32(); + break; + } + case 9: { + message.stClearDivCount = reader.uint32(); + break; + } + case 10: { + message.stClearCount = reader.uint32(); + break; + } + case 11: { + message.stLoseBits = reader.uint64(); + break; + } + case 13: { + message.stConsecutiveWins = reader.uint32(); + break; + } + case 14: { + message.stConsecutiveWinsMax = reader.uint32(); + break; + } + case 17: { + message.fullTunedCarCouponUnreceivableAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCarResponse message. + * @function verify + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCarResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.mbid != null && message.hasOwnProperty("mbid")) + if (!$util.isInteger(message.mbid)) + return "mbid: integer expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + if (!$util.isInteger(message.stClearBits)) + return "stClearBits: integer expected"; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + if (!$util.isInteger(message.stClearDivCount)) + return "stClearDivCount: integer expected"; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + if (!$util.isInteger(message.stClearCount)) + return "stClearCount: integer expected"; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (!$util.isInteger(message.stLoseBits) && !(message.stLoseBits && $util.isInteger(message.stLoseBits.low) && $util.isInteger(message.stLoseBits.high))) + return "stLoseBits: integer|Long expected"; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + if (!$util.isInteger(message.stConsecutiveWins)) + return "stConsecutiveWins: integer expected"; + if (message.stConsecutiveWinsMax != null && message.hasOwnProperty("stConsecutiveWinsMax")) + if (!$util.isInteger(message.stConsecutiveWinsMax)) + return "stConsecutiveWinsMax: integer expected"; + if (message.fullTunedCarCouponUnreceivableAt != null && message.hasOwnProperty("fullTunedCarCouponUnreceivableAt")) + if (!$util.isInteger(message.fullTunedCarCouponUnreceivableAt)) + return "fullTunedCarCouponUnreceivableAt: integer expected"; + return null; + }; + + /** + * Creates a CreateCarResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse + */ + CreateCarResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateCarResponse) + return object; + let message = new $root.wm.protobuf.CreateCarResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.mbid != null) + message.mbid = object.mbid >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.stClearBits != null) + message.stClearBits = object.stClearBits >>> 0; + if (object.stClearDivCount != null) + message.stClearDivCount = object.stClearDivCount >>> 0; + if (object.stClearCount != null) + message.stClearCount = object.stClearCount >>> 0; + if (object.stLoseBits != null) + if ($util.Long) + (message.stLoseBits = $util.Long.fromValue(object.stLoseBits)).unsigned = true; + else if (typeof object.stLoseBits === "string") + message.stLoseBits = parseInt(object.stLoseBits, 10); + else if (typeof object.stLoseBits === "number") + message.stLoseBits = object.stLoseBits; + else if (typeof object.stLoseBits === "object") + message.stLoseBits = new $util.LongBits(object.stLoseBits.low >>> 0, object.stLoseBits.high >>> 0).toNumber(true); + if (object.stConsecutiveWins != null) + message.stConsecutiveWins = object.stConsecutiveWins >>> 0; + if (object.stConsecutiveWinsMax != null) + message.stConsecutiveWinsMax = object.stConsecutiveWinsMax >>> 0; + if (object.fullTunedCarCouponUnreceivableAt != null) + message.fullTunedCarCouponUnreceivableAt = object.fullTunedCarCouponUnreceivableAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateCarResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.CreateCarResponse} message CreateCarResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCarResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.accessCode = ""; + object.banapassportAmId = 0; + object.mbid = 0; + object.userId = 0; + object.carId = 0; + object.stClearBits = 0; + object.stClearDivCount = 0; + object.stClearCount = 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.stLoseBits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.stLoseBits = options.longs === String ? "0" : 0; + object.stConsecutiveWins = 0; + object.stConsecutiveWinsMax = 0; + object.fullTunedCarCouponUnreceivableAt = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.mbid != null && message.hasOwnProperty("mbid")) + object.mbid = message.mbid; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + object.stClearBits = message.stClearBits; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + object.stClearDivCount = message.stClearDivCount; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + object.stClearCount = message.stClearCount; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (typeof message.stLoseBits === "number") + object.stLoseBits = options.longs === String ? String(message.stLoseBits) : message.stLoseBits; + else + object.stLoseBits = options.longs === String ? $util.Long.prototype.toString.call(message.stLoseBits) : options.longs === Number ? new $util.LongBits(message.stLoseBits.low >>> 0, message.stLoseBits.high >>> 0).toNumber(true) : message.stLoseBits; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + object.stConsecutiveWins = message.stConsecutiveWins; + if (message.stConsecutiveWinsMax != null && message.hasOwnProperty("stConsecutiveWinsMax")) + object.stConsecutiveWinsMax = message.stConsecutiveWinsMax; + if (message.fullTunedCarCouponUnreceivableAt != null && message.hasOwnProperty("fullTunedCarCouponUnreceivableAt")) + object.fullTunedCarCouponUnreceivableAt = message.fullTunedCarCouponUnreceivableAt; + return object; + }; + + /** + * Converts this CreateCarResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateCarResponse + * @instance + * @returns {Object.} JSON object + */ + CreateCarResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCarResponse + * @function getTypeUrl + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCarResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateCarResponse"; + }; + + return CreateCarResponse; + })(); + + protobuf.LoadGameHistoryRequest = (function() { + + /** + * Properties of a LoadGameHistoryRequest. + * @memberof wm.protobuf + * @interface ILoadGameHistoryRequest + * @property {number} carId LoadGameHistoryRequest carId + */ + + /** + * Constructs a new LoadGameHistoryRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGameHistoryRequest. + * @implements ILoadGameHistoryRequest + * @constructor + * @param {wm.protobuf.ILoadGameHistoryRequest=} [properties] Properties to set + */ + function LoadGameHistoryRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGameHistoryRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGameHistoryRequest + * @instance + */ + LoadGameHistoryRequest.prototype.carId = 0; + + /** + * Creates a new LoadGameHistoryRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.ILoadGameHistoryRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest instance + */ + LoadGameHistoryRequest.create = function create(properties) { + return new LoadGameHistoryRequest(properties); + }; + + /** + * Encodes the specified LoadGameHistoryRequest message. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.ILoadGameHistoryRequest} message LoadGameHistoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + return writer; + }; + + /** + * Encodes the specified LoadGameHistoryRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.ILoadGameHistoryRequest} message LoadGameHistoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGameHistoryRequest message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGameHistoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + return null; + }; + + /** + * Creates a LoadGameHistoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest + */ + LoadGameHistoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryRequest) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGameHistoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.LoadGameHistoryRequest} message LoadGameHistoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGameHistoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + return object; + }; + + /** + * Converts this LoadGameHistoryRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGameHistoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGameHistoryRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGameHistoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryRequest"; + }; + + return LoadGameHistoryRequest; + })(); + + protobuf.LoadGameHistoryResponse = (function() { + + /** + * Properties of a LoadGameHistoryResponse. + * @memberof wm.protobuf + * @interface ILoadGameHistoryResponse + * @property {wm.protobuf.ErrorCode} error LoadGameHistoryResponse error + * @property {Array.|null} [taRecords] LoadGameHistoryResponse taRecords + * @property {number} taRankingUpdatedAt LoadGameHistoryResponse taRankingUpdatedAt + * @property {Array.|null} [ghostHistory] LoadGameHistoryResponse ghostHistory + * @property {number} ghostBattleCount LoadGameHistoryResponse ghostBattleCount + * @property {number} ghostBattleWinCount LoadGameHistoryResponse ghostBattleWinCount + * @property {number} stampSheetCount LoadGameHistoryResponse stampSheetCount + * @property {Array.|null} [stampSheet] LoadGameHistoryResponse stampSheet + */ + + /** + * Constructs a new LoadGameHistoryResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGameHistoryResponse. + * @implements ILoadGameHistoryResponse + * @constructor + * @param {wm.protobuf.ILoadGameHistoryResponse=} [properties] Properties to set + */ + function LoadGameHistoryResponse(properties) { + this.taRecords = []; + this.ghostHistory = []; + this.stampSheet = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGameHistoryResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.error = 0; + + /** + * LoadGameHistoryResponse taRecords. + * @member {Array.} taRecords + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.taRecords = $util.emptyArray; + + /** + * LoadGameHistoryResponse taRankingUpdatedAt. + * @member {number} taRankingUpdatedAt + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.taRankingUpdatedAt = 0; + + /** + * LoadGameHistoryResponse ghostHistory. + * @member {Array.} ghostHistory + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.ghostHistory = $util.emptyArray; + + /** + * LoadGameHistoryResponse ghostBattleCount. + * @member {number} ghostBattleCount + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.ghostBattleCount = 0; + + /** + * LoadGameHistoryResponse ghostBattleWinCount. + * @member {number} ghostBattleWinCount + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.ghostBattleWinCount = 0; + + /** + * LoadGameHistoryResponse stampSheetCount. + * @member {number} stampSheetCount + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.stampSheetCount = 0; + + /** + * LoadGameHistoryResponse stampSheet. + * @member {Array.} stampSheet + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.stampSheet = $util.emptyArray; + + /** + * Creates a new LoadGameHistoryResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.ILoadGameHistoryResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse instance + */ + LoadGameHistoryResponse.create = function create(properties) { + return new LoadGameHistoryResponse(properties); + }; + + /** + * Encodes the specified LoadGameHistoryResponse message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.ILoadGameHistoryResponse} message LoadGameHistoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.taRecords != null && message.taRecords.length) + for (let i = 0; i < message.taRecords.length; ++i) + $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.encode(message.taRecords[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.taRankingUpdatedAt); + if (message.ghostHistory != null && message.ghostHistory.length) + for (let i = 0; i < message.ghostHistory.length; ++i) + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.encode(message.ghostHistory[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.ghostBattleCount); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.ghostBattleWinCount); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.stampSheetCount); + if (message.stampSheet != null && message.stampSheet.length) + for (let i = 0; i < message.stampSheet.length; ++i) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stampSheet[i]); + return writer; + }; + + /** + * Encodes the specified LoadGameHistoryResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.ILoadGameHistoryResponse} message LoadGameHistoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.taRecords && message.taRecords.length)) + message.taRecords = []; + message.taRecords.push($root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.decode(reader, reader.uint32())); + break; + } + case 3: { + message.taRankingUpdatedAt = reader.uint32(); + break; + } + case 4: { + if (!(message.ghostHistory && message.ghostHistory.length)) + message.ghostHistory = []; + message.ghostHistory.push($root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.decode(reader, reader.uint32())); + break; + } + case 5: { + message.ghostBattleCount = reader.uint32(); + break; + } + case 6: { + message.ghostBattleWinCount = reader.uint32(); + break; + } + case 7: { + message.stampSheetCount = reader.uint32(); + break; + } + case 8: { + if (!(message.stampSheet && message.stampSheet.length)) + message.stampSheet = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampSheet.push(reader.uint32()); + } else + message.stampSheet.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("taRankingUpdatedAt")) + throw $util.ProtocolError("missing required 'taRankingUpdatedAt'", { instance: message }); + if (!message.hasOwnProperty("ghostBattleCount")) + throw $util.ProtocolError("missing required 'ghostBattleCount'", { instance: message }); + if (!message.hasOwnProperty("ghostBattleWinCount")) + throw $util.ProtocolError("missing required 'ghostBattleWinCount'", { instance: message }); + if (!message.hasOwnProperty("stampSheetCount")) + throw $util.ProtocolError("missing required 'stampSheetCount'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGameHistoryResponse message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGameHistoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.taRecords != null && message.hasOwnProperty("taRecords")) { + if (!Array.isArray(message.taRecords)) + return "taRecords: array expected"; + for (let i = 0; i < message.taRecords.length; ++i) { + let error = $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify(message.taRecords[i]); + if (error) + return "taRecords." + error; + } + } + if (!$util.isInteger(message.taRankingUpdatedAt)) + return "taRankingUpdatedAt: integer expected"; + if (message.ghostHistory != null && message.hasOwnProperty("ghostHistory")) { + if (!Array.isArray(message.ghostHistory)) + return "ghostHistory: array expected"; + for (let i = 0; i < message.ghostHistory.length; ++i) { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify(message.ghostHistory[i]); + if (error) + return "ghostHistory." + error; + } + } + if (!$util.isInteger(message.ghostBattleCount)) + return "ghostBattleCount: integer expected"; + if (!$util.isInteger(message.ghostBattleWinCount)) + return "ghostBattleWinCount: integer expected"; + if (!$util.isInteger(message.stampSheetCount)) + return "stampSheetCount: integer expected"; + if (message.stampSheet != null && message.hasOwnProperty("stampSheet")) { + if (!Array.isArray(message.stampSheet)) + return "stampSheet: array expected"; + for (let i = 0; i < message.stampSheet.length; ++i) + if (!$util.isInteger(message.stampSheet[i])) + return "stampSheet: integer[] expected"; + } + return null; + }; + + /** + * Creates a LoadGameHistoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse + */ + LoadGameHistoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.taRecords) { + if (!Array.isArray(object.taRecords)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.taRecords: array expected"); + message.taRecords = []; + for (let i = 0; i < object.taRecords.length; ++i) { + if (typeof object.taRecords[i] !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.taRecords: object expected"); + message.taRecords[i] = $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.fromObject(object.taRecords[i]); + } + } + if (object.taRankingUpdatedAt != null) + message.taRankingUpdatedAt = object.taRankingUpdatedAt >>> 0; + if (object.ghostHistory) { + if (!Array.isArray(object.ghostHistory)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.ghostHistory: array expected"); + message.ghostHistory = []; + for (let i = 0; i < object.ghostHistory.length; ++i) { + if (typeof object.ghostHistory[i] !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.ghostHistory: object expected"); + message.ghostHistory[i] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.fromObject(object.ghostHistory[i]); + } + } + if (object.ghostBattleCount != null) + message.ghostBattleCount = object.ghostBattleCount >>> 0; + if (object.ghostBattleWinCount != null) + message.ghostBattleWinCount = object.ghostBattleWinCount >>> 0; + if (object.stampSheetCount != null) + message.stampSheetCount = object.stampSheetCount >>> 0; + if (object.stampSheet) { + if (!Array.isArray(object.stampSheet)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.stampSheet: array expected"); + message.stampSheet = []; + for (let i = 0; i < object.stampSheet.length; ++i) + message.stampSheet[i] = object.stampSheet[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LoadGameHistoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.LoadGameHistoryResponse} message LoadGameHistoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGameHistoryResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.taRecords = []; + object.ghostHistory = []; + object.stampSheet = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.taRankingUpdatedAt = 0; + object.ghostBattleCount = 0; + object.ghostBattleWinCount = 0; + object.stampSheetCount = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.taRecords && message.taRecords.length) { + object.taRecords = []; + for (let j = 0; j < message.taRecords.length; ++j) + object.taRecords[j] = $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.toObject(message.taRecords[j], options); + } + if (message.taRankingUpdatedAt != null && message.hasOwnProperty("taRankingUpdatedAt")) + object.taRankingUpdatedAt = message.taRankingUpdatedAt; + if (message.ghostHistory && message.ghostHistory.length) { + object.ghostHistory = []; + for (let j = 0; j < message.ghostHistory.length; ++j) + object.ghostHistory[j] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.toObject(message.ghostHistory[j], options); + } + if (message.ghostBattleCount != null && message.hasOwnProperty("ghostBattleCount")) + object.ghostBattleCount = message.ghostBattleCount; + if (message.ghostBattleWinCount != null && message.hasOwnProperty("ghostBattleWinCount")) + object.ghostBattleWinCount = message.ghostBattleWinCount; + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + object.stampSheetCount = message.stampSheetCount; + if (message.stampSheet && message.stampSheet.length) { + object.stampSheet = []; + for (let j = 0; j < message.stampSheet.length; ++j) + object.stampSheet[j] = message.stampSheet[j]; + } + return object; + }; + + /** + * Converts this LoadGameHistoryResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGameHistoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGameHistoryResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGameHistoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse"; + }; + + LoadGameHistoryResponse.TimeAttackRecord = (function() { + + /** + * Properties of a TimeAttackRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @interface ITimeAttackRecord + * @property {number} course TimeAttackRecord course + * @property {number|null} [time] TimeAttackRecord time + * @property {number|null} [tunePower] TimeAttackRecord tunePower + * @property {number|null} [tuneHandling] TimeAttackRecord tuneHandling + * @property {number|null} [wholeRank] TimeAttackRecord wholeRank + * @property {number} wholeParticipants TimeAttackRecord wholeParticipants + * @property {number|null} [modelRank] TimeAttackRecord modelRank + * @property {number} modelParticipants TimeAttackRecord modelParticipants + */ + + /** + * Constructs a new TimeAttackRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @classdesc Represents a TimeAttackRecord. + * @implements ITimeAttackRecord + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord=} [properties] Properties to set + */ + function TimeAttackRecord(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeAttackRecord course. + * @member {number} course + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.course = 0; + + /** + * TimeAttackRecord time. + * @member {number} time + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.time = 0; + + /** + * TimeAttackRecord tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.tunePower = 0; + + /** + * TimeAttackRecord tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.tuneHandling = 0; + + /** + * TimeAttackRecord wholeRank. + * @member {number} wholeRank + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.wholeRank = 0; + + /** + * TimeAttackRecord wholeParticipants. + * @member {number} wholeParticipants + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.wholeParticipants = 0; + + /** + * TimeAttackRecord modelRank. + * @member {number} modelRank + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.modelRank = 0; + + /** + * TimeAttackRecord modelParticipants. + * @member {number} modelParticipants + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.modelParticipants = 0; + + /** + * Creates a new TimeAttackRecord instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord instance + */ + TimeAttackRecord.create = function create(properties) { + return new TimeAttackRecord(properties); + }; + + /** + * Encodes the specified TimeAttackRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord} message TimeAttackRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.course); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.time); + if (message.tunePower != null && Object.hasOwnProperty.call(message, "tunePower")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tunePower); + if (message.tuneHandling != null && Object.hasOwnProperty.call(message, "tuneHandling")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.tuneHandling); + if (message.wholeRank != null && Object.hasOwnProperty.call(message, "wholeRank")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.wholeRank); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.wholeParticipants); + if (message.modelRank != null && Object.hasOwnProperty.call(message, "modelRank")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.modelRank); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.modelParticipants); + return writer; + }; + + /** + * Encodes the specified TimeAttackRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord} message TimeAttackRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.course = reader.uint32(); + break; + } + case 2: { + message.time = reader.uint32(); + break; + } + case 3: { + message.tunePower = reader.uint32(); + break; + } + case 4: { + message.tuneHandling = reader.uint32(); + break; + } + case 5: { + message.wholeRank = reader.uint32(); + break; + } + case 6: { + message.wholeParticipants = reader.uint32(); + break; + } + case 7: { + message.modelRank = reader.uint32(); + break; + } + case 8: { + message.modelParticipants = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + if (!message.hasOwnProperty("wholeParticipants")) + throw $util.ProtocolError("missing required 'wholeParticipants'", { instance: message }); + if (!message.hasOwnProperty("modelParticipants")) + throw $util.ProtocolError("missing required 'modelParticipants'", { instance: message }); + return message; + }; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeAttackRecord message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeAttackRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + if (message.time != null && message.hasOwnProperty("time")) + if (!$util.isInteger(message.time)) + return "time: integer expected"; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + if (!$util.isInteger(message.wholeRank)) + return "wholeRank: integer expected"; + if (!$util.isInteger(message.wholeParticipants)) + return "wholeParticipants: integer expected"; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + if (!$util.isInteger(message.modelRank)) + return "modelRank: integer expected"; + if (!$util.isInteger(message.modelParticipants)) + return "modelParticipants: integer expected"; + return null; + }; + + /** + * Creates a TimeAttackRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord + */ + TimeAttackRecord.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord(); + if (object.course != null) + message.course = object.course >>> 0; + if (object.time != null) + message.time = object.time >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.wholeRank != null) + message.wholeRank = object.wholeRank >>> 0; + if (object.wholeParticipants != null) + message.wholeParticipants = object.wholeParticipants >>> 0; + if (object.modelRank != null) + message.modelRank = object.modelRank >>> 0; + if (object.modelParticipants != null) + message.modelParticipants = object.modelParticipants >>> 0; + return message; + }; + + /** + * Creates a plain object from a TimeAttackRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} message TimeAttackRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeAttackRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.course = 0; + object.time = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.wholeRank = 0; + object.wholeParticipants = 0; + object.modelRank = 0; + object.modelParticipants = 0; + } + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + if (message.time != null && message.hasOwnProperty("time")) + object.time = message.time; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + object.wholeRank = message.wholeRank; + if (message.wholeParticipants != null && message.hasOwnProperty("wholeParticipants")) + object.wholeParticipants = message.wholeParticipants; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + object.modelRank = message.modelRank; + if (message.modelParticipants != null && message.hasOwnProperty("modelParticipants")) + object.modelParticipants = message.modelParticipants; + return object; + }; + + /** + * Converts this TimeAttackRecord to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + * @returns {Object.} JSON object + */ + TimeAttackRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeAttackRecord + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeAttackRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord"; + }; + + return TimeAttackRecord; + })(); + + LoadGameHistoryResponse.GhostBattleRecord = (function() { + + /** + * Properties of a GhostBattleRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @interface IGhostBattleRecord + * @property {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} carSetting GhostBattleRecord carSetting + * @property {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} opponent GhostBattleRecord opponent + * @property {Array.|null} [mobs] GhostBattleRecord mobs + * @property {number} area GhostBattleRecord area + * @property {number} playedAt GhostBattleRecord playedAt + * @property {string} playedShopName GhostBattleRecord playedShopName + */ + + /** + * Constructs a new GhostBattleRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @classdesc Represents a GhostBattleRecord. + * @implements IGhostBattleRecord + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord=} [properties] Properties to set + */ + function GhostBattleRecord(properties) { + this.mobs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleRecord carSetting. + * @member {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} carSetting + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.carSetting = null; + + /** + * GhostBattleRecord opponent. + * @member {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} opponent + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.opponent = null; + + /** + * GhostBattleRecord mobs. + * @member {Array.} mobs + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.mobs = $util.emptyArray; + + /** + * GhostBattleRecord area. + * @member {number} area + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.area = 0; + + /** + * GhostBattleRecord playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.playedAt = 0; + + /** + * GhostBattleRecord playedShopName. + * @member {string} playedShopName + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.playedShopName = ""; + + /** + * Creates a new GhostBattleRecord instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord instance + */ + GhostBattleRecord.create = function create(properties) { + return new GhostBattleRecord(properties); + }; + + /** + * Encodes the specified GhostBattleRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord} message GhostBattleRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.encode(message.carSetting, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.encode(message.opponent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.mobs != null && message.mobs.length) + for (let i = 0; i < message.mobs.length; ++i) + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.encode(message.mobs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.area); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.playedAt); + writer.uint32(/* id 6, wireType 2 =*/50).string(message.playedShopName); + return writer; + }; + + /** + * Encodes the specified GhostBattleRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord} message GhostBattleRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carSetting = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.decode(reader, reader.uint32()); + break; + } + case 2: { + message.opponent = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.mobs && message.mobs.length)) + message.mobs = []; + message.mobs.push($root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.decode(reader, reader.uint32())); + break; + } + case 4: { + message.area = reader.uint32(); + break; + } + case 5: { + message.playedAt = reader.uint32(); + break; + } + case 6: { + message.playedShopName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carSetting")) + throw $util.ProtocolError("missing required 'carSetting'", { instance: message }); + if (!message.hasOwnProperty("opponent")) + throw $util.ProtocolError("missing required 'opponent'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + if (!message.hasOwnProperty("playedShopName")) + throw $util.ProtocolError("missing required 'playedShopName'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleRecord message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify(message.carSetting); + if (error) + return "carSetting." + error; + } + { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify(message.opponent); + if (error) + return "opponent." + error; + } + if (message.mobs != null && message.hasOwnProperty("mobs")) { + if (!Array.isArray(message.mobs)) + return "mobs: array expected"; + for (let i = 0; i < message.mobs.length; ++i) { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify(message.mobs[i]); + if (error) + return "mobs." + error; + } + } + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (!$util.isString(message.playedShopName)) + return "playedShopName: string expected"; + return null; + }; + + /** + * Creates a GhostBattleRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord + */ + GhostBattleRecord.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord(); + if (object.carSetting != null) { + if (typeof object.carSetting !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.carSetting: object expected"); + message.carSetting = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.fromObject(object.carSetting); + } + if (object.opponent != null) { + if (typeof object.opponent !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.opponent: object expected"); + message.opponent = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.fromObject(object.opponent); + } + if (object.mobs) { + if (!Array.isArray(object.mobs)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.mobs: array expected"); + message.mobs = []; + for (let i = 0; i < object.mobs.length; ++i) { + if (typeof object.mobs[i] !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.mobs: object expected"); + message.mobs[i] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.fromObject(object.mobs[i]); + } + } + if (object.area != null) + message.area = object.area >>> 0; + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.playedShopName != null) + message.playedShopName = String(object.playedShopName); + return message; + }; + + /** + * Creates a plain object from a GhostBattleRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} message GhostBattleRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.mobs = []; + if (options.defaults) { + object.carSetting = null; + object.opponent = null; + object.area = 0; + object.playedAt = 0; + object.playedShopName = ""; + } + if (message.carSetting != null && message.hasOwnProperty("carSetting")) + object.carSetting = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.toObject(message.carSetting, options); + if (message.opponent != null && message.hasOwnProperty("opponent")) + object.opponent = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.toObject(message.opponent, options); + if (message.mobs && message.mobs.length) { + object.mobs = []; + for (let j = 0; j < message.mobs.length; ++j) + object.mobs[j] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.toObject(message.mobs[j], options); + } + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.playedShopName != null && message.hasOwnProperty("playedShopName")) + object.playedShopName = message.playedShopName; + return object; + }; + + /** + * Converts this GhostBattleRecord to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + * @returns {Object.} JSON object + */ + GhostBattleRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleRecord + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord"; + }; + + GhostBattleRecord.GhostCarSetting = (function() { + + /** + * Properties of a GhostCarSetting. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @interface IGhostCarSetting + * @property {number} tunePower GhostCarSetting tunePower + * @property {number} tuneHandling GhostCarSetting tuneHandling + */ + + /** + * Constructs a new GhostCarSetting. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @classdesc Represents a GhostCarSetting. + * @implements IGhostCarSetting + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting=} [properties] Properties to set + */ + function GhostCarSetting(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCarSetting tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @instance + */ + GhostCarSetting.prototype.tunePower = 0; + + /** + * GhostCarSetting tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @instance + */ + GhostCarSetting.prototype.tuneHandling = 0; + + /** + * Creates a new GhostCarSetting instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting instance + */ + GhostCarSetting.create = function create(properties) { + return new GhostCarSetting(properties); + }; + + /** + * Encodes the specified GhostCarSetting message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} message GhostCarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCarSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + return writer; + }; + + /** + * Encodes the specified GhostCarSetting message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} message GhostCarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCarSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCarSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCarSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCarSetting message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCarSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + return null; + }; + + /** + * Creates a GhostCarSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting + */ + GhostCarSetting.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + return message; + }; + + /** + * Creates a plain object from a GhostCarSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} message GhostCarSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCarSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + return object; + }; + + /** + * Converts this GhostCarSetting to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @instance + * @returns {Object.} JSON object + */ + GhostCarSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCarSetting + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCarSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting"; + }; + + return GhostCarSetting; + })(); + + GhostBattleRecord.GhostBattleRecordCar = (function() { + + /** + * Properties of a GhostBattleRecordCar. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @interface IGhostBattleRecordCar + * @property {wm.protobuf.ICar} car GhostBattleRecordCar car + * @property {number} result GhostBattleRecordCar result + */ + + /** + * Constructs a new GhostBattleRecordCar. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @classdesc Represents a GhostBattleRecordCar. + * @implements IGhostBattleRecordCar + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar=} [properties] Properties to set + */ + function GhostBattleRecordCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleRecordCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @instance + */ + GhostBattleRecordCar.prototype.car = null; + + /** + * GhostBattleRecordCar result. + * @member {number} result + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @instance + */ + GhostBattleRecordCar.prototype.result = 0; + + /** + * Creates a new GhostBattleRecordCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar instance + */ + GhostBattleRecordCar.create = function create(properties) { + return new GhostBattleRecordCar(properties); + }; + + /** + * Encodes the specified GhostBattleRecordCar message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} message GhostBattleRecordCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecordCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.result); + return writer; + }; + + /** + * Encodes the specified GhostBattleRecordCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} message GhostBattleRecordCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecordCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecordCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.result = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecordCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleRecordCar message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleRecordCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.result)) + return "result: integer expected"; + return null; + }; + + /** + * Creates a GhostBattleRecordCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar + */ + GhostBattleRecordCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.result != null) + message.result = object.result | 0; + return message; + }; + + /** + * Creates a plain object from a GhostBattleRecordCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} message GhostBattleRecordCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleRecordCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.result = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + return object; + }; + + /** + * Converts this GhostBattleRecordCar to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @instance + * @returns {Object.} JSON object + */ + GhostBattleRecordCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleRecordCar + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleRecordCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar"; + }; + + return GhostBattleRecordCar; + })(); + + return GhostBattleRecord; + })(); + + return LoadGameHistoryResponse; + })(); + + protobuf.UpdateCarRequest = (function() { + + /** + * Properties of an UpdateCarRequest. + * @memberof wm.protobuf + * @interface IUpdateCarRequest + * @property {number} carId UpdateCarRequest carId + * @property {wm.protobuf.ICar|null} [car] UpdateCarRequest car + * @property {Array.|null} [earnedItems] UpdateCarRequest earnedItems + * @property {wm.protobuf.ICarSetting|null} [setting] UpdateCarRequest setting + * @property {boolean|null} [toBeDeleted] UpdateCarRequest toBeDeleted + * @property {boolean|null} [auraMotifAutoChange] UpdateCarRequest auraMotifAutoChange + * @property {number|null} [rgStamp] UpdateCarRequest rgStamp + * @property {number} timestamp UpdateCarRequest timestamp + */ + + /** + * Constructs a new UpdateCarRequest. + * @memberof wm.protobuf + * @classdesc Represents an UpdateCarRequest. + * @implements IUpdateCarRequest + * @constructor + * @param {wm.protobuf.IUpdateCarRequest=} [properties] Properties to set + */ + function UpdateCarRequest(properties) { + this.earnedItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCarRequest carId. + * @member {number} carId + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.carId = 0; + + /** + * UpdateCarRequest car. + * @member {wm.protobuf.ICar|null|undefined} car + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.car = null; + + /** + * UpdateCarRequest earnedItems. + * @member {Array.} earnedItems + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.earnedItems = $util.emptyArray; + + /** + * UpdateCarRequest setting. + * @member {wm.protobuf.ICarSetting|null|undefined} setting + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.setting = null; + + /** + * UpdateCarRequest toBeDeleted. + * @member {boolean} toBeDeleted + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.toBeDeleted = false; + + /** + * UpdateCarRequest auraMotifAutoChange. + * @member {boolean} auraMotifAutoChange + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.auraMotifAutoChange = false; + + /** + * UpdateCarRequest rgStamp. + * @member {number} rgStamp + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.rgStamp = 0; + + /** + * UpdateCarRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.timestamp = 0; + + /** + * Creates a new UpdateCarRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.IUpdateCarRequest=} [properties] Properties to set + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest instance + */ + UpdateCarRequest.create = function create(properties) { + return new UpdateCarRequest(properties); + }; + + /** + * Encodes the specified UpdateCarRequest message. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.IUpdateCarRequest} message UpdateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.car != null && Object.hasOwnProperty.call(message, "car")) + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.earnedItems != null && message.earnedItems.length) + for (let i = 0; i < message.earnedItems.length; ++i) + $root.wm.protobuf.CarItem.encode(message.earnedItems[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.setting != null && Object.hasOwnProperty.call(message, "setting")) + $root.wm.protobuf.CarSetting.encode(message.setting, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.toBeDeleted != null && Object.hasOwnProperty.call(message, "toBeDeleted")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.toBeDeleted); + if (message.auraMotifAutoChange != null && Object.hasOwnProperty.call(message, "auraMotifAutoChange")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.auraMotifAutoChange); + if (message.rgStamp != null && Object.hasOwnProperty.call(message, "rgStamp")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.rgStamp); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified UpdateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.IUpdateCarRequest} message UpdateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateCarRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.earnedItems && message.earnedItems.length)) + message.earnedItems = []; + message.earnedItems.push($root.wm.protobuf.CarItem.decode(reader, reader.uint32())); + break; + } + case 5: { + message.setting = $root.wm.protobuf.CarSetting.decode(reader, reader.uint32()); + break; + } + case 9: { + message.toBeDeleted = reader.bool(); + break; + } + case 10: { + message.auraMotifAutoChange = reader.bool(); + break; + } + case 12: { + message.rgStamp = reader.uint32(); + break; + } + case 13: { + message.timestamp = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCarRequest message. + * @function verify + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCarRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.car != null && message.hasOwnProperty("car")) { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.earnedItems != null && message.hasOwnProperty("earnedItems")) { + if (!Array.isArray(message.earnedItems)) + return "earnedItems: array expected"; + for (let i = 0; i < message.earnedItems.length; ++i) { + let error = $root.wm.protobuf.CarItem.verify(message.earnedItems[i]); + if (error) + return "earnedItems." + error; + } + } + if (message.setting != null && message.hasOwnProperty("setting")) { + let error = $root.wm.protobuf.CarSetting.verify(message.setting); + if (error) + return "setting." + error; + } + if (message.toBeDeleted != null && message.hasOwnProperty("toBeDeleted")) + if (typeof message.toBeDeleted !== "boolean") + return "toBeDeleted: boolean expected"; + if (message.auraMotifAutoChange != null && message.hasOwnProperty("auraMotifAutoChange")) + if (typeof message.auraMotifAutoChange !== "boolean") + return "auraMotifAutoChange: boolean expected"; + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + if (!$util.isInteger(message.rgStamp)) + return "rgStamp: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + return null; + }; + + /** + * Creates an UpdateCarRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest + */ + UpdateCarRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateCarRequest) + return object; + let message = new $root.wm.protobuf.UpdateCarRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.UpdateCarRequest.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.earnedItems) { + if (!Array.isArray(object.earnedItems)) + throw TypeError(".wm.protobuf.UpdateCarRequest.earnedItems: array expected"); + message.earnedItems = []; + for (let i = 0; i < object.earnedItems.length; ++i) { + if (typeof object.earnedItems[i] !== "object") + throw TypeError(".wm.protobuf.UpdateCarRequest.earnedItems: object expected"); + message.earnedItems[i] = $root.wm.protobuf.CarItem.fromObject(object.earnedItems[i]); + } + } + if (object.setting != null) { + if (typeof object.setting !== "object") + throw TypeError(".wm.protobuf.UpdateCarRequest.setting: object expected"); + message.setting = $root.wm.protobuf.CarSetting.fromObject(object.setting); + } + if (object.toBeDeleted != null) + message.toBeDeleted = Boolean(object.toBeDeleted); + if (object.auraMotifAutoChange != null) + message.auraMotifAutoChange = Boolean(object.auraMotifAutoChange); + if (object.rgStamp != null) + message.rgStamp = object.rgStamp >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + return message; + }; + + /** + * Creates a plain object from an UpdateCarRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.UpdateCarRequest} message UpdateCarRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCarRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.earnedItems = []; + if (options.defaults) { + object.carId = 0; + object.car = null; + object.setting = null; + object.toBeDeleted = false; + object.auraMotifAutoChange = false; + object.rgStamp = 0; + object.timestamp = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.earnedItems && message.earnedItems.length) { + object.earnedItems = []; + for (let j = 0; j < message.earnedItems.length; ++j) + object.earnedItems[j] = $root.wm.protobuf.CarItem.toObject(message.earnedItems[j], options); + } + if (message.setting != null && message.hasOwnProperty("setting")) + object.setting = $root.wm.protobuf.CarSetting.toObject(message.setting, options); + if (message.toBeDeleted != null && message.hasOwnProperty("toBeDeleted")) + object.toBeDeleted = message.toBeDeleted; + if (message.auraMotifAutoChange != null && message.hasOwnProperty("auraMotifAutoChange")) + object.auraMotifAutoChange = message.auraMotifAutoChange; + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + object.rgStamp = message.rgStamp; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this UpdateCarRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateCarRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCarRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCarRequest + * @function getTypeUrl + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCarRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateCarRequest"; + }; + + return UpdateCarRequest; + })(); + + protobuf.UpdateCarResponse = (function() { + + /** + * Properties of an UpdateCarResponse. + * @memberof wm.protobuf + * @interface IUpdateCarResponse + * @property {wm.protobuf.ErrorCode} error UpdateCarResponse error + */ + + /** + * Constructs a new UpdateCarResponse. + * @memberof wm.protobuf + * @classdesc Represents an UpdateCarResponse. + * @implements IUpdateCarResponse + * @constructor + * @param {wm.protobuf.IUpdateCarResponse=} [properties] Properties to set + */ + function UpdateCarResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCarResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.UpdateCarResponse + * @instance + */ + UpdateCarResponse.prototype.error = 0; + + /** + * Creates a new UpdateCarResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.IUpdateCarResponse=} [properties] Properties to set + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse instance + */ + UpdateCarResponse.create = function create(properties) { + return new UpdateCarResponse(properties); + }; + + /** + * Encodes the specified UpdateCarResponse message. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.IUpdateCarResponse} message UpdateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified UpdateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.IUpdateCarResponse} message UpdateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateCarResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCarResponse message. + * @function verify + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCarResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates an UpdateCarResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse + */ + UpdateCarResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateCarResponse) + return object; + let message = new $root.wm.protobuf.UpdateCarResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from an UpdateCarResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.UpdateCarResponse} message UpdateCarResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCarResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this UpdateCarResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateCarResponse + * @instance + * @returns {Object.} JSON object + */ + UpdateCarResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCarResponse + * @function getTypeUrl + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCarResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateCarResponse"; + }; + + return UpdateCarResponse; + })(); + + protobuf.SaveGameResultRequest = (function() { + + /** + * Properties of a SaveGameResultRequest. + * @memberof wm.protobuf + * @interface ISaveGameResultRequest + * @property {number} carId SaveGameResultRequest carId + * @property {wm.protobuf.GameMode} gameMode SaveGameResultRequest gameMode + * @property {number} playedAt SaveGameResultRequest playedAt + * @property {number} playCount SaveGameResultRequest playCount + * @property {boolean} retired SaveGameResultRequest retired + * @property {boolean} timeup SaveGameResultRequest timeup + * @property {wm.protobuf.ICar|null} [car] SaveGameResultRequest car + * @property {wm.protobuf.ICarSetting|null} [setting] SaveGameResultRequest setting + * @property {number|null} [odometer] SaveGameResultRequest odometer + * @property {boolean|null} [earnedCustomColor] SaveGameResultRequest earnedCustomColor + * @property {Array.|null} [confirmedTutorials] SaveGameResultRequest confirmedTutorials + * @property {Array.|null} [earnedItems] SaveGameResultRequest earnedItems + * @property {Array.|null} [earnedUserItems] SaveGameResultRequest earnedUserItems + * @property {Array.|null} [preservedTitles] SaveGameResultRequest preservedTitles + * @property {Array.|null} [neighborCars] SaveGameResultRequest neighborCars + * @property {wm.protobuf.SaveGameResultRequest.IStoryResult|null} [stResult] SaveGameResultRequest stResult + * @property {wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null} [taResult] SaveGameResultRequest taResult + * @property {wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null} [vsResult] SaveGameResultRequest vsResult + * @property {wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null} [rgResult] SaveGameResultRequest rgResult + */ + + /** + * Constructs a new SaveGameResultRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveGameResultRequest. + * @implements ISaveGameResultRequest + * @constructor + * @param {wm.protobuf.ISaveGameResultRequest=} [properties] Properties to set + */ + function SaveGameResultRequest(properties) { + this.confirmedTutorials = []; + this.earnedItems = []; + this.earnedUserItems = []; + this.preservedTitles = []; + this.neighborCars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveGameResultRequest carId. + * @member {number} carId + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.carId = 0; + + /** + * SaveGameResultRequest gameMode. + * @member {wm.protobuf.GameMode} gameMode + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.gameMode = 1; + + /** + * SaveGameResultRequest playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.playedAt = 0; + + /** + * SaveGameResultRequest playCount. + * @member {number} playCount + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.playCount = 0; + + /** + * SaveGameResultRequest retired. + * @member {boolean} retired + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.retired = false; + + /** + * SaveGameResultRequest timeup. + * @member {boolean} timeup + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.timeup = false; + + /** + * SaveGameResultRequest car. + * @member {wm.protobuf.ICar|null|undefined} car + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.car = null; + + /** + * SaveGameResultRequest setting. + * @member {wm.protobuf.ICarSetting|null|undefined} setting + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.setting = null; + + /** + * SaveGameResultRequest odometer. + * @member {number} odometer + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.odometer = 0; + + /** + * SaveGameResultRequest earnedCustomColor. + * @member {boolean} earnedCustomColor + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.earnedCustomColor = false; + + /** + * SaveGameResultRequest confirmedTutorials. + * @member {Array.} confirmedTutorials + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.confirmedTutorials = $util.emptyArray; + + /** + * SaveGameResultRequest earnedItems. + * @member {Array.} earnedItems + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.earnedItems = $util.emptyArray; + + /** + * SaveGameResultRequest earnedUserItems. + * @member {Array.} earnedUserItems + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.earnedUserItems = $util.emptyArray; + + /** + * SaveGameResultRequest preservedTitles. + * @member {Array.} preservedTitles + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.preservedTitles = $util.emptyArray; + + /** + * SaveGameResultRequest neighborCars. + * @member {Array.} neighborCars + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.neighborCars = $util.emptyArray; + + /** + * SaveGameResultRequest stResult. + * @member {wm.protobuf.SaveGameResultRequest.IStoryResult|null|undefined} stResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.stResult = null; + + /** + * SaveGameResultRequest taResult. + * @member {wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null|undefined} taResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.taResult = null; + + /** + * SaveGameResultRequest vsResult. + * @member {wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null|undefined} vsResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.vsResult = null; + + /** + * SaveGameResultRequest rgResult. + * @member {wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null|undefined} rgResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.rgResult = null; + + /** + * Creates a new SaveGameResultRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.ISaveGameResultRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest instance + */ + SaveGameResultRequest.create = function create(properties) { + return new SaveGameResultRequest(properties); + }; + + /** + * Encodes the specified SaveGameResultRequest message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.ISaveGameResultRequest} message SaveGameResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gameMode); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.playedAt); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.playCount); + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.retired); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.timeup); + if (message.car != null && Object.hasOwnProperty.call(message, "car")) + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.setting != null && Object.hasOwnProperty.call(message, "setting")) + $root.wm.protobuf.CarSetting.encode(message.setting, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.odometer != null && Object.hasOwnProperty.call(message, "odometer")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.odometer); + if (message.earnedCustomColor != null && Object.hasOwnProperty.call(message, "earnedCustomColor")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.earnedCustomColor); + if (message.confirmedTutorials != null && message.confirmedTutorials.length) + for (let i = 0; i < message.confirmedTutorials.length; ++i) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.confirmedTutorials[i]); + if (message.earnedItems != null && message.earnedItems.length) + for (let i = 0; i < message.earnedItems.length; ++i) + $root.wm.protobuf.CarItem.encode(message.earnedItems[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.earnedUserItems != null && message.earnedUserItems.length) + for (let i = 0; i < message.earnedUserItems.length; ++i) + $root.wm.protobuf.UserItem.encode(message.earnedUserItems[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.preservedTitles != null && message.preservedTitles.length) + for (let i = 0; i < message.preservedTitles.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.preservedTitles[i]); + if (message.neighborCars != null && message.neighborCars.length) + for (let i = 0; i < message.neighborCars.length; ++i) + writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.neighborCars[i]); + if (message.stResult != null && Object.hasOwnProperty.call(message, "stResult")) + $root.wm.protobuf.SaveGameResultRequest.StoryResult.encode(message.stResult, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.taResult != null && Object.hasOwnProperty.call(message, "taResult")) + $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.encode(message.taResult, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.vsResult != null && Object.hasOwnProperty.call(message, "vsResult")) + $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.encode(message.vsResult, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.rgResult != null && Object.hasOwnProperty.call(message, "rgResult")) + $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.encode(message.rgResult, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveGameResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.ISaveGameResultRequest} message SaveGameResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.gameMode = reader.int32(); + break; + } + case 3: { + message.playedAt = reader.uint32(); + break; + } + case 4: { + message.playCount = reader.uint32(); + break; + } + case 5: { + message.retired = reader.bool(); + break; + } + case 6: { + message.timeup = reader.bool(); + break; + } + case 7: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 8: { + message.setting = $root.wm.protobuf.CarSetting.decode(reader, reader.uint32()); + break; + } + case 9: { + message.odometer = reader.uint32(); + break; + } + case 11: { + message.earnedCustomColor = reader.bool(); + break; + } + case 12: { + if (!(message.confirmedTutorials && message.confirmedTutorials.length)) + message.confirmedTutorials = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.confirmedTutorials.push(reader.int32()); + } else + message.confirmedTutorials.push(reader.int32()); + break; + } + case 13: { + if (!(message.earnedItems && message.earnedItems.length)) + message.earnedItems = []; + message.earnedItems.push($root.wm.protobuf.CarItem.decode(reader, reader.uint32())); + break; + } + case 14: { + if (!(message.earnedUserItems && message.earnedUserItems.length)) + message.earnedUserItems = []; + message.earnedUserItems.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + case 15: { + if (!(message.preservedTitles && message.preservedTitles.length)) + message.preservedTitles = []; + message.preservedTitles.push(reader.string()); + break; + } + case 21: { + if (!(message.neighborCars && message.neighborCars.length)) + message.neighborCars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.neighborCars.push(reader.uint32()); + } else + message.neighborCars.push(reader.uint32()); + break; + } + case 22: { + message.stResult = $root.wm.protobuf.SaveGameResultRequest.StoryResult.decode(reader, reader.uint32()); + break; + } + case 23: { + message.taResult = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.decode(reader, reader.uint32()); + break; + } + case 24: { + message.vsResult = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.decode(reader, reader.uint32()); + break; + } + case 25: { + message.rgResult = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("gameMode")) + throw $util.ProtocolError("missing required 'gameMode'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + if (!message.hasOwnProperty("playCount")) + throw $util.ProtocolError("missing required 'playCount'", { instance: message }); + if (!message.hasOwnProperty("retired")) + throw $util.ProtocolError("missing required 'retired'", { instance: message }); + if (!message.hasOwnProperty("timeup")) + throw $util.ProtocolError("missing required 'timeup'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveGameResultRequest message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveGameResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + switch (message.gameMode) { + default: + return "gameMode: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (!$util.isInteger(message.playCount)) + return "playCount: integer expected"; + if (typeof message.retired !== "boolean") + return "retired: boolean expected"; + if (typeof message.timeup !== "boolean") + return "timeup: boolean expected"; + if (message.car != null && message.hasOwnProperty("car")) { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.setting != null && message.hasOwnProperty("setting")) { + let error = $root.wm.protobuf.CarSetting.verify(message.setting); + if (error) + return "setting." + error; + } + if (message.odometer != null && message.hasOwnProperty("odometer")) + if (!$util.isInteger(message.odometer)) + return "odometer: integer expected"; + if (message.earnedCustomColor != null && message.hasOwnProperty("earnedCustomColor")) + if (typeof message.earnedCustomColor !== "boolean") + return "earnedCustomColor: boolean expected"; + if (message.confirmedTutorials != null && message.hasOwnProperty("confirmedTutorials")) { + if (!Array.isArray(message.confirmedTutorials)) + return "confirmedTutorials: array expected"; + for (let i = 0; i < message.confirmedTutorials.length; ++i) + switch (message.confirmedTutorials[i]) { + default: + return "confirmedTutorials: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + break; + } + } + if (message.earnedItems != null && message.hasOwnProperty("earnedItems")) { + if (!Array.isArray(message.earnedItems)) + return "earnedItems: array expected"; + for (let i = 0; i < message.earnedItems.length; ++i) { + let error = $root.wm.protobuf.CarItem.verify(message.earnedItems[i]); + if (error) + return "earnedItems." + error; + } + } + if (message.earnedUserItems != null && message.hasOwnProperty("earnedUserItems")) { + if (!Array.isArray(message.earnedUserItems)) + return "earnedUserItems: array expected"; + for (let i = 0; i < message.earnedUserItems.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.earnedUserItems[i]); + if (error) + return "earnedUserItems." + error; + } + } + if (message.preservedTitles != null && message.hasOwnProperty("preservedTitles")) { + if (!Array.isArray(message.preservedTitles)) + return "preservedTitles: array expected"; + for (let i = 0; i < message.preservedTitles.length; ++i) + if (!$util.isString(message.preservedTitles[i])) + return "preservedTitles: string[] expected"; + } + if (message.neighborCars != null && message.hasOwnProperty("neighborCars")) { + if (!Array.isArray(message.neighborCars)) + return "neighborCars: array expected"; + for (let i = 0; i < message.neighborCars.length; ++i) + if (!$util.isInteger(message.neighborCars[i])) + return "neighborCars: integer[] expected"; + } + if (message.stResult != null && message.hasOwnProperty("stResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.StoryResult.verify(message.stResult); + if (error) + return "stResult." + error; + } + if (message.taResult != null && message.hasOwnProperty("taResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify(message.taResult); + if (error) + return "taResult." + error; + } + if (message.vsResult != null && message.hasOwnProperty("vsResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify(message.vsResult); + if (error) + return "vsResult." + error; + } + if (message.rgResult != null && message.hasOwnProperty("rgResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify(message.rgResult); + if (error) + return "rgResult." + error; + } + return null; + }; + + /** + * Creates a SaveGameResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest + */ + SaveGameResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + switch (object.gameMode) { + case "MODE_STORY": + case 1: + message.gameMode = 1; + break; + case "MODE_TIME_ATTACK": + case 2: + message.gameMode = 2; + break; + case "MODE_VS_BATTLE": + case 3: + message.gameMode = 3; + break; + case "MODE_GHOST_BATTLE": + case 4: + message.gameMode = 4; + break; + case "MODE_EVENT": + case 5: + message.gameMode = 5; + break; + } + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.playCount != null) + message.playCount = object.playCount >>> 0; + if (object.retired != null) + message.retired = Boolean(object.retired); + if (object.timeup != null) + message.timeup = Boolean(object.timeup); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.setting != null) { + if (typeof object.setting !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.setting: object expected"); + message.setting = $root.wm.protobuf.CarSetting.fromObject(object.setting); + } + if (object.odometer != null) + message.odometer = object.odometer >>> 0; + if (object.earnedCustomColor != null) + message.earnedCustomColor = Boolean(object.earnedCustomColor); + if (object.confirmedTutorials) { + if (!Array.isArray(object.confirmedTutorials)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.confirmedTutorials: array expected"); + message.confirmedTutorials = []; + for (let i = 0; i < object.confirmedTutorials.length; ++i) + switch (object.confirmedTutorials[i]) { + default: + case "TUTORIAL_ID_STORY": + case 0: + message.confirmedTutorials[i] = 0; + break; + case "TUTORIAL_ID_TIME_ATTACK": + case 1: + message.confirmedTutorials[i] = 1; + break; + case "TUTORIAL_ID_GHOST": + case 2: + message.confirmedTutorials[i] = 2; + break; + case "TUTORIAL_ID_GHOST_CHALLENGE": + case 3: + message.confirmedTutorials[i] = 3; + break; + case "TUTORIAL_ID_GHOST_LEVEL": + case 4: + message.confirmedTutorials[i] = 4; + break; + case "TUTORIAL_ID_UNUSED_5": + case 5: + message.confirmedTutorials[i] = 5; + break; + case "TUTORIAL_ID_GHOST_SEARCH": + case 6: + message.confirmedTutorials[i] = 6; + break; + case "TUTORIAL_ID_GHOST_COMPETITION": + case 7: + message.confirmedTutorials[i] = 7; + break; + case "TUTORIAL_ID_HP600_CARD": + case 8: + message.confirmedTutorials[i] = 8; + break; + case "TUTORIAL_ID_UNUSED_9": + case 9: + message.confirmedTutorials[i] = 9; + break; + case "TUTORIAL_ID_COMPETITION_QUALIFIED": + case 10: + message.confirmedTutorials[i] = 10; + break; + case "TUTORIAL_ID_COMPETITION_TERMINAL": + case 11: + message.confirmedTutorials[i] = 11; + break; + case "TUTORIAL_ID_COMPETITION_NOTICE": + case 12: + message.confirmedTutorials[i] = 12; + break; + case "TUTORIAL_ID_COMPETITION_FINISHED": + case 13: + message.confirmedTutorials[i] = 13; + break; + case "TUTORIAL_ID_UNUSED_14": + case 14: + message.confirmedTutorials[i] = 14; + break; + case "TUTORIAL_ID_UNUSED_15": + case 15: + message.confirmedTutorials[i] = 15; + break; + case "TUTORIAL_ID_UNUSED_16": + case 16: + message.confirmedTutorials[i] = 16; + break; + case "TUTORIAL_ID_UNUSED_17": + case 17: + message.confirmedTutorials[i] = 17; + break; + case "TUTORIAL_ID_UNUSED_18": + case 18: + message.confirmedTutorials[i] = 18; + break; + case "TUTORIAL_ID_UNUSED_19": + case 19: + message.confirmedTutorials[i] = 19; + break; + case "TUTORIAL_ID_GHOST_STAMP": + case 20: + message.confirmedTutorials[i] = 20; + break; + case "TUTORIAL_ID_GHOST_STAMP_DECLINED": + case 21: + message.confirmedTutorials[i] = 21; + break; + case "TUTORIAL_ID_GHOST_STAMP_FRIENDS": + case 22: + message.confirmedTutorials[i] = 22; + break; + case "TUTORIAL_ID_TERMINAL_SCRATCH": + case 23: + message.confirmedTutorials[i] = 23; + break; + case "TUTORIAL_ID_TURN_SCRATCH_SHEET": + case 24: + message.confirmedTutorials[i] = 24; + break; + case "TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN": + case 25: + message.confirmedTutorials[i] = 25; + break; + case "TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE": + case 26: + message.confirmedTutorials[i] = 26; + break; + case "TUTORIAL_ID_VS_CONTINUE_TICKET": + case 27: + message.confirmedTutorials[i] = 27; + break; + case "TUTORIAL_ID_UNUSED_28": + case 28: + message.confirmedTutorials[i] = 28; + break; + case "TUTORIAL_ID_UNUSED_29": + case 29: + message.confirmedTutorials[i] = 29; + break; + case "TUTORIAL_ID_UNUSED_30": + case 30: + message.confirmedTutorials[i] = 30; + break; + case "TUTORIAL_ID_DRESS_UP": + case 31: + message.confirmedTutorials[i] = 31; + break; + case "TUTORIAL_ID_MULTI_GHOST": + case 32: + message.confirmedTutorials[i] = 32; + break; + case "TUTORIAL_ID_STORY_NEW_FEATURE": + case 33: + message.confirmedTutorials[i] = 33; + break; + case "TUTORIAL_ID_GHOST_NEW_FEATURE": + case 34: + message.confirmedTutorials[i] = 34; + break; + case "TUTORIAL_ID_GHOST_REGION_MAP": + case 35: + message.confirmedTutorials[i] = 35; + break; + } + } + if (object.earnedItems) { + if (!Array.isArray(object.earnedItems)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedItems: array expected"); + message.earnedItems = []; + for (let i = 0; i < object.earnedItems.length; ++i) { + if (typeof object.earnedItems[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedItems: object expected"); + message.earnedItems[i] = $root.wm.protobuf.CarItem.fromObject(object.earnedItems[i]); + } + } + if (object.earnedUserItems) { + if (!Array.isArray(object.earnedUserItems)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedUserItems: array expected"); + message.earnedUserItems = []; + for (let i = 0; i < object.earnedUserItems.length; ++i) { + if (typeof object.earnedUserItems[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedUserItems: object expected"); + message.earnedUserItems[i] = $root.wm.protobuf.UserItem.fromObject(object.earnedUserItems[i]); + } + } + if (object.preservedTitles) { + if (!Array.isArray(object.preservedTitles)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.preservedTitles: array expected"); + message.preservedTitles = []; + for (let i = 0; i < object.preservedTitles.length; ++i) + message.preservedTitles[i] = String(object.preservedTitles[i]); + } + if (object.neighborCars) { + if (!Array.isArray(object.neighborCars)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.neighborCars: array expected"); + message.neighborCars = []; + for (let i = 0; i < object.neighborCars.length; ++i) + message.neighborCars[i] = object.neighborCars[i] >>> 0; + } + if (object.stResult != null) { + if (typeof object.stResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.stResult: object expected"); + message.stResult = $root.wm.protobuf.SaveGameResultRequest.StoryResult.fromObject(object.stResult); + } + if (object.taResult != null) { + if (typeof object.taResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.taResult: object expected"); + message.taResult = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.fromObject(object.taResult); + } + if (object.vsResult != null) { + if (typeof object.vsResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.vsResult: object expected"); + message.vsResult = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.fromObject(object.vsResult); + } + if (object.rgResult != null) { + if (typeof object.rgResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.rgResult: object expected"); + message.rgResult = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.fromObject(object.rgResult); + } + return message; + }; + + /** + * Creates a plain object from a SaveGameResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.SaveGameResultRequest} message SaveGameResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveGameResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.confirmedTutorials = []; + object.earnedItems = []; + object.earnedUserItems = []; + object.preservedTitles = []; + object.neighborCars = []; + } + if (options.defaults) { + object.carId = 0; + object.gameMode = options.enums === String ? "MODE_STORY" : 1; + object.playedAt = 0; + object.playCount = 0; + object.retired = false; + object.timeup = false; + object.car = null; + object.setting = null; + object.odometer = 0; + object.earnedCustomColor = false; + object.stResult = null; + object.taResult = null; + object.vsResult = null; + object.rgResult = null; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.gameMode != null && message.hasOwnProperty("gameMode")) + object.gameMode = options.enums === String ? $root.wm.protobuf.GameMode[message.gameMode] : message.gameMode; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.playCount != null && message.hasOwnProperty("playCount")) + object.playCount = message.playCount; + if (message.retired != null && message.hasOwnProperty("retired")) + object.retired = message.retired; + if (message.timeup != null && message.hasOwnProperty("timeup")) + object.timeup = message.timeup; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.setting != null && message.hasOwnProperty("setting")) + object.setting = $root.wm.protobuf.CarSetting.toObject(message.setting, options); + if (message.odometer != null && message.hasOwnProperty("odometer")) + object.odometer = message.odometer; + if (message.earnedCustomColor != null && message.hasOwnProperty("earnedCustomColor")) + object.earnedCustomColor = message.earnedCustomColor; + if (message.confirmedTutorials && message.confirmedTutorials.length) { + object.confirmedTutorials = []; + for (let j = 0; j < message.confirmedTutorials.length; ++j) + object.confirmedTutorials[j] = options.enums === String ? $root.wm.protobuf.TutorialType[message.confirmedTutorials[j]] : message.confirmedTutorials[j]; + } + if (message.earnedItems && message.earnedItems.length) { + object.earnedItems = []; + for (let j = 0; j < message.earnedItems.length; ++j) + object.earnedItems[j] = $root.wm.protobuf.CarItem.toObject(message.earnedItems[j], options); + } + if (message.earnedUserItems && message.earnedUserItems.length) { + object.earnedUserItems = []; + for (let j = 0; j < message.earnedUserItems.length; ++j) + object.earnedUserItems[j] = $root.wm.protobuf.UserItem.toObject(message.earnedUserItems[j], options); + } + if (message.preservedTitles && message.preservedTitles.length) { + object.preservedTitles = []; + for (let j = 0; j < message.preservedTitles.length; ++j) + object.preservedTitles[j] = message.preservedTitles[j]; + } + if (message.neighborCars && message.neighborCars.length) { + object.neighborCars = []; + for (let j = 0; j < message.neighborCars.length; ++j) + object.neighborCars[j] = message.neighborCars[j]; + } + if (message.stResult != null && message.hasOwnProperty("stResult")) + object.stResult = $root.wm.protobuf.SaveGameResultRequest.StoryResult.toObject(message.stResult, options); + if (message.taResult != null && message.hasOwnProperty("taResult")) + object.taResult = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.toObject(message.taResult, options); + if (message.vsResult != null && message.hasOwnProperty("vsResult")) + object.vsResult = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.toObject(message.vsResult, options); + if (message.rgResult != null && message.hasOwnProperty("rgResult")) + object.rgResult = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.toObject(message.rgResult, options); + return object; + }; + + /** + * Converts this SaveGameResultRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + * @returns {Object.} JSON object + */ + SaveGameResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveGameResultRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveGameResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest"; + }; + + SaveGameResultRequest.StoryResult = (function() { + + /** + * Properties of a StoryResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface IStoryResult + * @property {number} stPlayCount StoryResult stPlayCount + * @property {number} stPlayedStory StoryResult stPlayedStory + * @property {number|null} [tuningPoint] StoryResult tuningPoint + * @property {number|null} [stClearBits] StoryResult stClearBits + * @property {number|null} [stClearDivCount] StoryResult stClearDivCount + * @property {number|null} [stClearCount] StoryResult stClearCount + * @property {number|Long|null} [stLoseBits] StoryResult stLoseBits + * @property {number|null} [stConsecutiveWins] StoryResult stConsecutiveWins + * @property {boolean|null} [stCompleted_100Episodes] StoryResult stCompleted_100Episodes + * @property {boolean|null} [isInsuranceUsed] StoryResult isInsuranceUsed + */ + + /** + * Constructs a new StoryResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a StoryResult. + * @implements IStoryResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult=} [properties] Properties to set + */ + function StoryResult(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoryResult stPlayCount. + * @member {number} stPlayCount + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stPlayCount = 0; + + /** + * StoryResult stPlayedStory. + * @member {number} stPlayedStory + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stPlayedStory = 0; + + /** + * StoryResult tuningPoint. + * @member {number} tuningPoint + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.tuningPoint = 0; + + /** + * StoryResult stClearBits. + * @member {number} stClearBits + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stClearBits = 0; + + /** + * StoryResult stClearDivCount. + * @member {number} stClearDivCount + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stClearDivCount = 0; + + /** + * StoryResult stClearCount. + * @member {number} stClearCount + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stClearCount = 0; + + /** + * StoryResult stLoseBits. + * @member {number|Long} stLoseBits + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stLoseBits = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * StoryResult stConsecutiveWins. + * @member {number} stConsecutiveWins + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stConsecutiveWins = 0; + + /** + * StoryResult stCompleted_100Episodes. + * @member {boolean} stCompleted_100Episodes + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stCompleted_100Episodes = false; + + /** + * StoryResult isInsuranceUsed. + * @member {boolean} isInsuranceUsed + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.isInsuranceUsed = false; + + /** + * Creates a new StoryResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult instance + */ + StoryResult.create = function create(properties) { + return new StoryResult(properties); + }; + + /** + * Encodes the specified StoryResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult} message StoryResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.stPlayCount); + if (message.tuningPoint != null && Object.hasOwnProperty.call(message, "tuningPoint")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuningPoint); + if (message.stClearBits != null && Object.hasOwnProperty.call(message, "stClearBits")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stClearBits); + if (message.stClearDivCount != null && Object.hasOwnProperty.call(message, "stClearDivCount")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stClearDivCount); + if (message.stClearCount != null && Object.hasOwnProperty.call(message, "stClearCount")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.stClearCount); + if (message.stLoseBits != null && Object.hasOwnProperty.call(message, "stLoseBits")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.stLoseBits); + if (message.stConsecutiveWins != null && Object.hasOwnProperty.call(message, "stConsecutiveWins")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stConsecutiveWins); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.stPlayedStory); + if (message.stCompleted_100Episodes != null && Object.hasOwnProperty.call(message, "stCompleted_100Episodes")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.stCompleted_100Episodes); + if (message.isInsuranceUsed != null && Object.hasOwnProperty.call(message, "isInsuranceUsed")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.isInsuranceUsed); + return writer; + }; + + /** + * Encodes the specified StoryResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult} message StoryResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoryResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.StoryResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.stPlayCount = reader.uint32(); + break; + } + case 9: { + message.stPlayedStory = reader.uint32(); + break; + } + case 2: { + message.tuningPoint = reader.uint32(); + break; + } + case 3: { + message.stClearBits = reader.uint32(); + break; + } + case 4: { + message.stClearDivCount = reader.uint32(); + break; + } + case 5: { + message.stClearCount = reader.uint32(); + break; + } + case 6: { + message.stLoseBits = reader.uint64(); + break; + } + case 8: { + message.stConsecutiveWins = reader.uint32(); + break; + } + case 10: { + message.stCompleted_100Episodes = reader.bool(); + break; + } + case 11: { + message.isInsuranceUsed = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("stPlayCount")) + throw $util.ProtocolError("missing required 'stPlayCount'", { instance: message }); + if (!message.hasOwnProperty("stPlayedStory")) + throw $util.ProtocolError("missing required 'stPlayedStory'", { instance: message }); + return message; + }; + + /** + * Decodes a StoryResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoryResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoryResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.stPlayCount)) + return "stPlayCount: integer expected"; + if (!$util.isInteger(message.stPlayedStory)) + return "stPlayedStory: integer expected"; + if (message.tuningPoint != null && message.hasOwnProperty("tuningPoint")) + if (!$util.isInteger(message.tuningPoint)) + return "tuningPoint: integer expected"; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + if (!$util.isInteger(message.stClearBits)) + return "stClearBits: integer expected"; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + if (!$util.isInteger(message.stClearDivCount)) + return "stClearDivCount: integer expected"; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + if (!$util.isInteger(message.stClearCount)) + return "stClearCount: integer expected"; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (!$util.isInteger(message.stLoseBits) && !(message.stLoseBits && $util.isInteger(message.stLoseBits.low) && $util.isInteger(message.stLoseBits.high))) + return "stLoseBits: integer|Long expected"; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + if (!$util.isInteger(message.stConsecutiveWins)) + return "stConsecutiveWins: integer expected"; + if (message.stCompleted_100Episodes != null && message.hasOwnProperty("stCompleted_100Episodes")) + if (typeof message.stCompleted_100Episodes !== "boolean") + return "stCompleted_100Episodes: boolean expected"; + if (message.isInsuranceUsed != null && message.hasOwnProperty("isInsuranceUsed")) + if (typeof message.isInsuranceUsed !== "boolean") + return "isInsuranceUsed: boolean expected"; + return null; + }; + + /** + * Creates a StoryResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult + */ + StoryResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.StoryResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.StoryResult(); + if (object.stPlayCount != null) + message.stPlayCount = object.stPlayCount >>> 0; + if (object.stPlayedStory != null) + message.stPlayedStory = object.stPlayedStory >>> 0; + if (object.tuningPoint != null) + message.tuningPoint = object.tuningPoint >>> 0; + if (object.stClearBits != null) + message.stClearBits = object.stClearBits >>> 0; + if (object.stClearDivCount != null) + message.stClearDivCount = object.stClearDivCount >>> 0; + if (object.stClearCount != null) + message.stClearCount = object.stClearCount >>> 0; + if (object.stLoseBits != null) + if ($util.Long) + (message.stLoseBits = $util.Long.fromValue(object.stLoseBits)).unsigned = true; + else if (typeof object.stLoseBits === "string") + message.stLoseBits = parseInt(object.stLoseBits, 10); + else if (typeof object.stLoseBits === "number") + message.stLoseBits = object.stLoseBits; + else if (typeof object.stLoseBits === "object") + message.stLoseBits = new $util.LongBits(object.stLoseBits.low >>> 0, object.stLoseBits.high >>> 0).toNumber(true); + if (object.stConsecutiveWins != null) + message.stConsecutiveWins = object.stConsecutiveWins >>> 0; + if (object.stCompleted_100Episodes != null) + message.stCompleted_100Episodes = Boolean(object.stCompleted_100Episodes); + if (object.isInsuranceUsed != null) + message.isInsuranceUsed = Boolean(object.isInsuranceUsed); + return message; + }; + + /** + * Creates a plain object from a StoryResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.StoryResult} message StoryResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoryResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.stPlayCount = 0; + object.tuningPoint = 0; + object.stClearBits = 0; + object.stClearDivCount = 0; + object.stClearCount = 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.stLoseBits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.stLoseBits = options.longs === String ? "0" : 0; + object.stConsecutiveWins = 0; + object.stPlayedStory = 0; + object.stCompleted_100Episodes = false; + object.isInsuranceUsed = false; + } + if (message.stPlayCount != null && message.hasOwnProperty("stPlayCount")) + object.stPlayCount = message.stPlayCount; + if (message.tuningPoint != null && message.hasOwnProperty("tuningPoint")) + object.tuningPoint = message.tuningPoint; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + object.stClearBits = message.stClearBits; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + object.stClearDivCount = message.stClearDivCount; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + object.stClearCount = message.stClearCount; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (typeof message.stLoseBits === "number") + object.stLoseBits = options.longs === String ? String(message.stLoseBits) : message.stLoseBits; + else + object.stLoseBits = options.longs === String ? $util.Long.prototype.toString.call(message.stLoseBits) : options.longs === Number ? new $util.LongBits(message.stLoseBits.low >>> 0, message.stLoseBits.high >>> 0).toNumber(true) : message.stLoseBits; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + object.stConsecutiveWins = message.stConsecutiveWins; + if (message.stPlayedStory != null && message.hasOwnProperty("stPlayedStory")) + object.stPlayedStory = message.stPlayedStory; + if (message.stCompleted_100Episodes != null && message.hasOwnProperty("stCompleted_100Episodes")) + object.stCompleted_100Episodes = message.stCompleted_100Episodes; + if (message.isInsuranceUsed != null && message.hasOwnProperty("isInsuranceUsed")) + object.isInsuranceUsed = message.isInsuranceUsed; + return object; + }; + + /** + * Converts this StoryResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + * @returns {Object.} JSON object + */ + StoryResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoryResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.StoryResult"; + }; + + return StoryResult; + })(); + + SaveGameResultRequest.TimeAttackResult = (function() { + + /** + * Properties of a TimeAttackResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface ITimeAttackResult + * @property {number} time TimeAttackResult time + * @property {number} course TimeAttackResult course + * @property {boolean} isMorning TimeAttackResult isMorning + * @property {number} section_1Time TimeAttackResult section_1Time + * @property {number} section_2Time TimeAttackResult section_2Time + * @property {number} section_3Time TimeAttackResult section_3Time + * @property {number} section_4Time TimeAttackResult section_4Time + * @property {number|null} [section_5Time] TimeAttackResult section_5Time + * @property {number|null} [section_6Time] TimeAttackResult section_6Time + * @property {number|null} [section_7Time] TimeAttackResult section_7Time + * @property {number|null} [wholeRank] TimeAttackResult wholeRank + * @property {number|null} [modelRank] TimeAttackResult modelRank + */ + + /** + * Constructs a new TimeAttackResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a TimeAttackResult. + * @implements ITimeAttackResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult=} [properties] Properties to set + */ + function TimeAttackResult(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeAttackResult time. + * @member {number} time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.time = 0; + + /** + * TimeAttackResult course. + * @member {number} course + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.course = 0; + + /** + * TimeAttackResult isMorning. + * @member {boolean} isMorning + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.isMorning = false; + + /** + * TimeAttackResult section_1Time. + * @member {number} section_1Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_1Time = 0; + + /** + * TimeAttackResult section_2Time. + * @member {number} section_2Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_2Time = 0; + + /** + * TimeAttackResult section_3Time. + * @member {number} section_3Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_3Time = 0; + + /** + * TimeAttackResult section_4Time. + * @member {number} section_4Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_4Time = 0; + + /** + * TimeAttackResult section_5Time. + * @member {number} section_5Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_5Time = 0; + + /** + * TimeAttackResult section_6Time. + * @member {number} section_6Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_6Time = 0; + + /** + * TimeAttackResult section_7Time. + * @member {number} section_7Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_7Time = 0; + + /** + * TimeAttackResult wholeRank. + * @member {number} wholeRank + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.wholeRank = 0; + + /** + * TimeAttackResult modelRank. + * @member {number} modelRank + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.modelRank = 0; + + /** + * Creates a new TimeAttackResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult instance + */ + TimeAttackResult.create = function create(properties) { + return new TimeAttackResult(properties); + }; + + /** + * Encodes the specified TimeAttackResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult} message TimeAttackResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.time); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.course); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.section_1Time); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.section_2Time); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.section_3Time); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.section_4Time); + if (message.section_5Time != null && Object.hasOwnProperty.call(message, "section_5Time")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.section_5Time); + if (message.section_6Time != null && Object.hasOwnProperty.call(message, "section_6Time")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.section_6Time); + if (message.section_7Time != null && Object.hasOwnProperty.call(message, "section_7Time")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.section_7Time); + if (message.wholeRank != null && Object.hasOwnProperty.call(message, "wholeRank")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.wholeRank); + if (message.modelRank != null && Object.hasOwnProperty.call(message, "modelRank")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.modelRank); + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isMorning); + return writer; + }; + + /** + * Encodes the specified TimeAttackResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult} message TimeAttackResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.time = reader.uint32(); + break; + } + case 2: { + message.course = reader.uint32(); + break; + } + case 12: { + message.isMorning = reader.bool(); + break; + } + case 3: { + message.section_1Time = reader.uint32(); + break; + } + case 4: { + message.section_2Time = reader.uint32(); + break; + } + case 5: { + message.section_3Time = reader.uint32(); + break; + } + case 6: { + message.section_4Time = reader.uint32(); + break; + } + case 7: { + message.section_5Time = reader.uint32(); + break; + } + case 8: { + message.section_6Time = reader.uint32(); + break; + } + case 9: { + message.section_7Time = reader.uint32(); + break; + } + case 10: { + message.wholeRank = reader.uint32(); + break; + } + case 11: { + message.modelRank = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("time")) + throw $util.ProtocolError("missing required 'time'", { instance: message }); + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + if (!message.hasOwnProperty("isMorning")) + throw $util.ProtocolError("missing required 'isMorning'", { instance: message }); + if (!message.hasOwnProperty("section_1Time")) + throw $util.ProtocolError("missing required 'section_1Time'", { instance: message }); + if (!message.hasOwnProperty("section_2Time")) + throw $util.ProtocolError("missing required 'section_2Time'", { instance: message }); + if (!message.hasOwnProperty("section_3Time")) + throw $util.ProtocolError("missing required 'section_3Time'", { instance: message }); + if (!message.hasOwnProperty("section_4Time")) + throw $util.ProtocolError("missing required 'section_4Time'", { instance: message }); + return message; + }; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeAttackResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeAttackResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.time)) + return "time: integer expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + if (typeof message.isMorning !== "boolean") + return "isMorning: boolean expected"; + if (!$util.isInteger(message.section_1Time)) + return "section_1Time: integer expected"; + if (!$util.isInteger(message.section_2Time)) + return "section_2Time: integer expected"; + if (!$util.isInteger(message.section_3Time)) + return "section_3Time: integer expected"; + if (!$util.isInteger(message.section_4Time)) + return "section_4Time: integer expected"; + if (message.section_5Time != null && message.hasOwnProperty("section_5Time")) + if (!$util.isInteger(message.section_5Time)) + return "section_5Time: integer expected"; + if (message.section_6Time != null && message.hasOwnProperty("section_6Time")) + if (!$util.isInteger(message.section_6Time)) + return "section_6Time: integer expected"; + if (message.section_7Time != null && message.hasOwnProperty("section_7Time")) + if (!$util.isInteger(message.section_7Time)) + return "section_7Time: integer expected"; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + if (!$util.isInteger(message.wholeRank)) + return "wholeRank: integer expected"; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + if (!$util.isInteger(message.modelRank)) + return "modelRank: integer expected"; + return null; + }; + + /** + * Creates a TimeAttackResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult + */ + TimeAttackResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult(); + if (object.time != null) + message.time = object.time >>> 0; + if (object.course != null) + message.course = object.course >>> 0; + if (object.isMorning != null) + message.isMorning = Boolean(object.isMorning); + if (object.section_1Time != null) + message.section_1Time = object.section_1Time >>> 0; + if (object.section_2Time != null) + message.section_2Time = object.section_2Time >>> 0; + if (object.section_3Time != null) + message.section_3Time = object.section_3Time >>> 0; + if (object.section_4Time != null) + message.section_4Time = object.section_4Time >>> 0; + if (object.section_5Time != null) + message.section_5Time = object.section_5Time >>> 0; + if (object.section_6Time != null) + message.section_6Time = object.section_6Time >>> 0; + if (object.section_7Time != null) + message.section_7Time = object.section_7Time >>> 0; + if (object.wholeRank != null) + message.wholeRank = object.wholeRank >>> 0; + if (object.modelRank != null) + message.modelRank = object.modelRank >>> 0; + return message; + }; + + /** + * Creates a plain object from a TimeAttackResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.TimeAttackResult} message TimeAttackResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeAttackResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.time = 0; + object.course = 0; + object.section_1Time = 0; + object.section_2Time = 0; + object.section_3Time = 0; + object.section_4Time = 0; + object.section_5Time = 0; + object.section_6Time = 0; + object.section_7Time = 0; + object.wholeRank = 0; + object.modelRank = 0; + object.isMorning = false; + } + if (message.time != null && message.hasOwnProperty("time")) + object.time = message.time; + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + if (message.section_1Time != null && message.hasOwnProperty("section_1Time")) + object.section_1Time = message.section_1Time; + if (message.section_2Time != null && message.hasOwnProperty("section_2Time")) + object.section_2Time = message.section_2Time; + if (message.section_3Time != null && message.hasOwnProperty("section_3Time")) + object.section_3Time = message.section_3Time; + if (message.section_4Time != null && message.hasOwnProperty("section_4Time")) + object.section_4Time = message.section_4Time; + if (message.section_5Time != null && message.hasOwnProperty("section_5Time")) + object.section_5Time = message.section_5Time; + if (message.section_6Time != null && message.hasOwnProperty("section_6Time")) + object.section_6Time = message.section_6Time; + if (message.section_7Time != null && message.hasOwnProperty("section_7Time")) + object.section_7Time = message.section_7Time; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + object.wholeRank = message.wholeRank; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + object.modelRank = message.modelRank; + if (message.isMorning != null && message.hasOwnProperty("isMorning")) + object.isMorning = message.isMorning; + return object; + }; + + /** + * Converts this TimeAttackResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + * @returns {Object.} JSON object + */ + TimeAttackResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeAttackResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeAttackResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.TimeAttackResult"; + }; + + return TimeAttackResult; + })(); + + SaveGameResultRequest.VersusBattleResult = (function() { + + /** + * Properties of a VersusBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface IVersusBattleResult + * @property {number} result VersusBattleResult result + * @property {boolean} survived VersusBattleResult survived + * @property {Array.|null} [opponentCarId] VersusBattleResult opponentCarId + * @property {number} numOfPlayers VersusBattleResult numOfPlayers + * @property {number} area VersusBattleResult area + * @property {boolean} isMorning VersusBattleResult isMorning + * @property {number} vsPlayCount VersusBattleResult vsPlayCount + * @property {number|null} [vsBurstCount] VersusBattleResult vsBurstCount + * @property {number|null} [vsStarCount] VersusBattleResult vsStarCount + * @property {number|null} [vsCoolOrWild] VersusBattleResult vsCoolOrWild + * @property {number|null} [vsSmoothOrRough] VersusBattleResult vsSmoothOrRough + * @property {number|null} [vsTripleStarMedals] VersusBattleResult vsTripleStarMedals + * @property {number|null} [vsDoubleStarMedals] VersusBattleResult vsDoubleStarMedals + * @property {number|null} [vsSingleStarMedals] VersusBattleResult vsSingleStarMedals + * @property {number|null} [vsPlainMedals] VersusBattleResult vsPlainMedals + */ + + /** + * Constructs a new VersusBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a VersusBattleResult. + * @implements IVersusBattleResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult=} [properties] Properties to set + */ + function VersusBattleResult(properties) { + this.opponentCarId = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersusBattleResult result. + * @member {number} result + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.result = 0; + + /** + * VersusBattleResult survived. + * @member {boolean} survived + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.survived = false; + + /** + * VersusBattleResult opponentCarId. + * @member {Array.} opponentCarId + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.opponentCarId = $util.emptyArray; + + /** + * VersusBattleResult numOfPlayers. + * @member {number} numOfPlayers + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.numOfPlayers = 0; + + /** + * VersusBattleResult area. + * @member {number} area + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.area = 0; + + /** + * VersusBattleResult isMorning. + * @member {boolean} isMorning + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.isMorning = false; + + /** + * VersusBattleResult vsPlayCount. + * @member {number} vsPlayCount + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsPlayCount = 0; + + /** + * VersusBattleResult vsBurstCount. + * @member {number} vsBurstCount + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsBurstCount = 0; + + /** + * VersusBattleResult vsStarCount. + * @member {number} vsStarCount + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsStarCount = 0; + + /** + * VersusBattleResult vsCoolOrWild. + * @member {number} vsCoolOrWild + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsCoolOrWild = 0; + + /** + * VersusBattleResult vsSmoothOrRough. + * @member {number} vsSmoothOrRough + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsSmoothOrRough = 0; + + /** + * VersusBattleResult vsTripleStarMedals. + * @member {number} vsTripleStarMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsTripleStarMedals = 0; + + /** + * VersusBattleResult vsDoubleStarMedals. + * @member {number} vsDoubleStarMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsDoubleStarMedals = 0; + + /** + * VersusBattleResult vsSingleStarMedals. + * @member {number} vsSingleStarMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsSingleStarMedals = 0; + + /** + * VersusBattleResult vsPlainMedals. + * @member {number} vsPlainMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsPlainMedals = 0; + + /** + * Creates a new VersusBattleResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult instance + */ + VersusBattleResult.create = function create(properties) { + return new VersusBattleResult(properties); + }; + + /** + * Encodes the specified VersusBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult} message VersusBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.result); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.survived); + if (message.opponentCarId != null && message.opponentCarId.length) + for (let i = 0; i < message.opponentCarId.length; ++i) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.opponentCarId[i]); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.numOfPlayers); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.vsPlayCount); + if (message.vsBurstCount != null && Object.hasOwnProperty.call(message, "vsBurstCount")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.vsBurstCount); + if (message.vsStarCount != null && Object.hasOwnProperty.call(message, "vsStarCount")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.vsStarCount); + if (message.vsCoolOrWild != null && Object.hasOwnProperty.call(message, "vsCoolOrWild")) + writer.uint32(/* id 9, wireType 0 =*/72).sint32(message.vsCoolOrWild); + if (message.vsSmoothOrRough != null && Object.hasOwnProperty.call(message, "vsSmoothOrRough")) + writer.uint32(/* id 10, wireType 0 =*/80).sint32(message.vsSmoothOrRough); + if (message.vsTripleStarMedals != null && Object.hasOwnProperty.call(message, "vsTripleStarMedals")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.vsTripleStarMedals); + if (message.vsDoubleStarMedals != null && Object.hasOwnProperty.call(message, "vsDoubleStarMedals")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.vsDoubleStarMedals); + if (message.vsSingleStarMedals != null && Object.hasOwnProperty.call(message, "vsSingleStarMedals")) + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.vsSingleStarMedals); + if (message.vsPlainMedals != null && Object.hasOwnProperty.call(message, "vsPlainMedals")) + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.vsPlainMedals); + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.area); + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.isMorning); + return writer; + }; + + /** + * Encodes the specified VersusBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult} message VersusBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.uint32(); + break; + } + case 2: { + message.survived = reader.bool(); + break; + } + case 3: { + if (!(message.opponentCarId && message.opponentCarId.length)) + message.opponentCarId = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.opponentCarId.push(reader.uint32()); + } else + message.opponentCarId.push(reader.uint32()); + break; + } + case 5: { + message.numOfPlayers = reader.uint32(); + break; + } + case 17: { + message.area = reader.uint32(); + break; + } + case 18: { + message.isMorning = reader.bool(); + break; + } + case 6: { + message.vsPlayCount = reader.uint32(); + break; + } + case 7: { + message.vsBurstCount = reader.uint32(); + break; + } + case 8: { + message.vsStarCount = reader.uint32(); + break; + } + case 9: { + message.vsCoolOrWild = reader.sint32(); + break; + } + case 10: { + message.vsSmoothOrRough = reader.sint32(); + break; + } + case 11: { + message.vsTripleStarMedals = reader.uint32(); + break; + } + case 12: { + message.vsDoubleStarMedals = reader.uint32(); + break; + } + case 13: { + message.vsSingleStarMedals = reader.uint32(); + break; + } + case 14: { + message.vsPlainMedals = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("survived")) + throw $util.ProtocolError("missing required 'survived'", { instance: message }); + if (!message.hasOwnProperty("numOfPlayers")) + throw $util.ProtocolError("missing required 'numOfPlayers'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("isMorning")) + throw $util.ProtocolError("missing required 'isMorning'", { instance: message }); + if (!message.hasOwnProperty("vsPlayCount")) + throw $util.ProtocolError("missing required 'vsPlayCount'", { instance: message }); + return message; + }; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersusBattleResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersusBattleResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (typeof message.survived !== "boolean") + return "survived: boolean expected"; + if (message.opponentCarId != null && message.hasOwnProperty("opponentCarId")) { + if (!Array.isArray(message.opponentCarId)) + return "opponentCarId: array expected"; + for (let i = 0; i < message.opponentCarId.length; ++i) + if (!$util.isInteger(message.opponentCarId[i])) + return "opponentCarId: integer[] expected"; + } + if (!$util.isInteger(message.numOfPlayers)) + return "numOfPlayers: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (typeof message.isMorning !== "boolean") + return "isMorning: boolean expected"; + if (!$util.isInteger(message.vsPlayCount)) + return "vsPlayCount: integer expected"; + if (message.vsBurstCount != null && message.hasOwnProperty("vsBurstCount")) + if (!$util.isInteger(message.vsBurstCount)) + return "vsBurstCount: integer expected"; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + if (!$util.isInteger(message.vsStarCount)) + return "vsStarCount: integer expected"; + if (message.vsCoolOrWild != null && message.hasOwnProperty("vsCoolOrWild")) + if (!$util.isInteger(message.vsCoolOrWild)) + return "vsCoolOrWild: integer expected"; + if (message.vsSmoothOrRough != null && message.hasOwnProperty("vsSmoothOrRough")) + if (!$util.isInteger(message.vsSmoothOrRough)) + return "vsSmoothOrRough: integer expected"; + if (message.vsTripleStarMedals != null && message.hasOwnProperty("vsTripleStarMedals")) + if (!$util.isInteger(message.vsTripleStarMedals)) + return "vsTripleStarMedals: integer expected"; + if (message.vsDoubleStarMedals != null && message.hasOwnProperty("vsDoubleStarMedals")) + if (!$util.isInteger(message.vsDoubleStarMedals)) + return "vsDoubleStarMedals: integer expected"; + if (message.vsSingleStarMedals != null && message.hasOwnProperty("vsSingleStarMedals")) + if (!$util.isInteger(message.vsSingleStarMedals)) + return "vsSingleStarMedals: integer expected"; + if (message.vsPlainMedals != null && message.hasOwnProperty("vsPlainMedals")) + if (!$util.isInteger(message.vsPlainMedals)) + return "vsPlainMedals: integer expected"; + return null; + }; + + /** + * Creates a VersusBattleResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult + */ + VersusBattleResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult(); + if (object.result != null) + message.result = object.result >>> 0; + if (object.survived != null) + message.survived = Boolean(object.survived); + if (object.opponentCarId) { + if (!Array.isArray(object.opponentCarId)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.VersusBattleResult.opponentCarId: array expected"); + message.opponentCarId = []; + for (let i = 0; i < object.opponentCarId.length; ++i) + message.opponentCarId[i] = object.opponentCarId[i] >>> 0; + } + if (object.numOfPlayers != null) + message.numOfPlayers = object.numOfPlayers >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.isMorning != null) + message.isMorning = Boolean(object.isMorning); + if (object.vsPlayCount != null) + message.vsPlayCount = object.vsPlayCount >>> 0; + if (object.vsBurstCount != null) + message.vsBurstCount = object.vsBurstCount >>> 0; + if (object.vsStarCount != null) + message.vsStarCount = object.vsStarCount >>> 0; + if (object.vsCoolOrWild != null) + message.vsCoolOrWild = object.vsCoolOrWild | 0; + if (object.vsSmoothOrRough != null) + message.vsSmoothOrRough = object.vsSmoothOrRough | 0; + if (object.vsTripleStarMedals != null) + message.vsTripleStarMedals = object.vsTripleStarMedals >>> 0; + if (object.vsDoubleStarMedals != null) + message.vsDoubleStarMedals = object.vsDoubleStarMedals >>> 0; + if (object.vsSingleStarMedals != null) + message.vsSingleStarMedals = object.vsSingleStarMedals >>> 0; + if (object.vsPlainMedals != null) + message.vsPlainMedals = object.vsPlainMedals >>> 0; + return message; + }; + + /** + * Creates a plain object from a VersusBattleResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.VersusBattleResult} message VersusBattleResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersusBattleResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.opponentCarId = []; + if (options.defaults) { + object.result = 0; + object.survived = false; + object.numOfPlayers = 0; + object.vsPlayCount = 0; + object.vsBurstCount = 0; + object.vsStarCount = 0; + object.vsCoolOrWild = 0; + object.vsSmoothOrRough = 0; + object.vsTripleStarMedals = 0; + object.vsDoubleStarMedals = 0; + object.vsSingleStarMedals = 0; + object.vsPlainMedals = 0; + object.area = 0; + object.isMorning = false; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.survived != null && message.hasOwnProperty("survived")) + object.survived = message.survived; + if (message.opponentCarId && message.opponentCarId.length) { + object.opponentCarId = []; + for (let j = 0; j < message.opponentCarId.length; ++j) + object.opponentCarId[j] = message.opponentCarId[j]; + } + if (message.numOfPlayers != null && message.hasOwnProperty("numOfPlayers")) + object.numOfPlayers = message.numOfPlayers; + if (message.vsPlayCount != null && message.hasOwnProperty("vsPlayCount")) + object.vsPlayCount = message.vsPlayCount; + if (message.vsBurstCount != null && message.hasOwnProperty("vsBurstCount")) + object.vsBurstCount = message.vsBurstCount; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + object.vsStarCount = message.vsStarCount; + if (message.vsCoolOrWild != null && message.hasOwnProperty("vsCoolOrWild")) + object.vsCoolOrWild = message.vsCoolOrWild; + if (message.vsSmoothOrRough != null && message.hasOwnProperty("vsSmoothOrRough")) + object.vsSmoothOrRough = message.vsSmoothOrRough; + if (message.vsTripleStarMedals != null && message.hasOwnProperty("vsTripleStarMedals")) + object.vsTripleStarMedals = message.vsTripleStarMedals; + if (message.vsDoubleStarMedals != null && message.hasOwnProperty("vsDoubleStarMedals")) + object.vsDoubleStarMedals = message.vsDoubleStarMedals; + if (message.vsSingleStarMedals != null && message.hasOwnProperty("vsSingleStarMedals")) + object.vsSingleStarMedals = message.vsSingleStarMedals; + if (message.vsPlainMedals != null && message.hasOwnProperty("vsPlainMedals")) + object.vsPlainMedals = message.vsPlainMedals; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.isMorning != null && message.hasOwnProperty("isMorning")) + object.isMorning = message.isMorning; + return object; + }; + + /** + * Converts this VersusBattleResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + * @returns {Object.} JSON object + */ + VersusBattleResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VersusBattleResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VersusBattleResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.VersusBattleResult"; + }; + + return VersusBattleResult; + })(); + + SaveGameResultRequest.GhostBattleResult = (function() { + + /** + * Properties of a GhostBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface IGhostBattleResult + * @property {Array.|null} [opponents] GhostBattleResult opponents + * @property {number} path GhostBattleResult path + * @property {boolean} isMorning GhostBattleResult isMorning + * @property {wm.protobuf.GhostSelectionMethod} selectionMethod GhostBattleResult selectionMethod + * @property {number|null} [stampSheetCount] GhostBattleResult stampSheetCount + * @property {Array.|null} [stampSheet] GhostBattleResult stampSheet + * @property {number|null} [rgStamp] GhostBattleResult rgStamp + * @property {Array.|null} [confirmedTransferredStampTargetCarIds] GhostBattleResult confirmedTransferredStampTargetCarIds + * @property {number} rgPlayCount GhostBattleResult rgPlayCount + * @property {number|null} [dressupLevel] GhostBattleResult dressupLevel + * @property {number|null} [dressupPoint] GhostBattleResult dressupPoint + * @property {Array.|null} [rgRegionMapScore] GhostBattleResult rgRegionMapScore + * @property {number|null} [competitionId] GhostBattleResult competitionId + * @property {number|null} [periodId] GhostBattleResult periodId + * @property {number|null} [brakingPoint] GhostBattleResult brakingPoint + * @property {boolean|null} [acquireCrown] GhostBattleResult acquireCrown + * @property {boolean|null} [acquireAllCrowns] GhostBattleResult acquireAllCrowns + */ + + /** + * Constructs a new GhostBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a GhostBattleResult. + * @implements IGhostBattleResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult=} [properties] Properties to set + */ + function GhostBattleResult(properties) { + this.opponents = []; + this.stampSheet = []; + this.confirmedTransferredStampTargetCarIds = []; + this.rgRegionMapScore = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleResult opponents. + * @member {Array.} opponents + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.opponents = $util.emptyArray; + + /** + * GhostBattleResult path. + * @member {number} path + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.path = 0; + + /** + * GhostBattleResult isMorning. + * @member {boolean} isMorning + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.isMorning = false; + + /** + * GhostBattleResult selectionMethod. + * @member {wm.protobuf.GhostSelectionMethod} selectionMethod + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.selectionMethod = 1; + + /** + * GhostBattleResult stampSheetCount. + * @member {number} stampSheetCount + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.stampSheetCount = 0; + + /** + * GhostBattleResult stampSheet. + * @member {Array.} stampSheet + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.stampSheet = $util.emptyArray; + + /** + * GhostBattleResult rgStamp. + * @member {number} rgStamp + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.rgStamp = 0; + + /** + * GhostBattleResult confirmedTransferredStampTargetCarIds. + * @member {Array.} confirmedTransferredStampTargetCarIds + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.confirmedTransferredStampTargetCarIds = $util.emptyArray; + + /** + * GhostBattleResult rgPlayCount. + * @member {number} rgPlayCount + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.rgPlayCount = 0; + + /** + * GhostBattleResult dressupLevel. + * @member {number} dressupLevel + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.dressupLevel = 0; + + /** + * GhostBattleResult dressupPoint. + * @member {number} dressupPoint + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.dressupPoint = 0; + + /** + * GhostBattleResult rgRegionMapScore. + * @member {Array.} rgRegionMapScore + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.rgRegionMapScore = $util.emptyArray; + + /** + * GhostBattleResult competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.competitionId = 0; + + /** + * GhostBattleResult periodId. + * @member {number} periodId + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.periodId = 0; + + /** + * GhostBattleResult brakingPoint. + * @member {number} brakingPoint + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.brakingPoint = 0; + + /** + * GhostBattleResult acquireCrown. + * @member {boolean} acquireCrown + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.acquireCrown = false; + + /** + * GhostBattleResult acquireAllCrowns. + * @member {boolean} acquireAllCrowns + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.acquireAllCrowns = false; + + /** + * Creates a new GhostBattleResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult instance + */ + GhostBattleResult.create = function create(properties) { + return new GhostBattleResult(properties); + }; + + /** + * Encodes the specified GhostBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult} message GhostBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.opponents != null && message.opponents.length) + for (let i = 0; i < message.opponents.length; ++i) + $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.encode(message.opponents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.path); + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.selectionMethod); + if (message.stampSheetCount != null && Object.hasOwnProperty.call(message, "stampSheetCount")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.stampSheetCount); + if (message.stampSheet != null && message.stampSheet.length) + for (let i = 0; i < message.stampSheet.length; ++i) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.stampSheet[i]); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.rgPlayCount); + if (message.dressupLevel != null && Object.hasOwnProperty.call(message, "dressupLevel")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.dressupLevel); + if (message.dressupPoint != null && Object.hasOwnProperty.call(message, "dressupPoint")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.dressupPoint); + if (message.rgRegionMapScore != null && message.rgRegionMapScore.length) + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.rgRegionMapScore[i]); + if (message.competitionId != null && Object.hasOwnProperty.call(message, "competitionId")) + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.competitionId); + if (message.periodId != null && Object.hasOwnProperty.call(message, "periodId")) + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.periodId); + if (message.brakingPoint != null && Object.hasOwnProperty.call(message, "brakingPoint")) + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.brakingPoint); + if (message.acquireCrown != null && Object.hasOwnProperty.call(message, "acquireCrown")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.acquireCrown); + if (message.acquireAllCrowns != null && Object.hasOwnProperty.call(message, "acquireAllCrowns")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.acquireAllCrowns); + if (message.rgStamp != null && Object.hasOwnProperty.call(message, "rgStamp")) + writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.rgStamp); + if (message.confirmedTransferredStampTargetCarIds != null && message.confirmedTransferredStampTargetCarIds.length) + for (let i = 0; i < message.confirmedTransferredStampTargetCarIds.length; ++i) + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.confirmedTransferredStampTargetCarIds[i]); + writer.uint32(/* id 25, wireType 0 =*/200).bool(message.isMorning); + return writer; + }; + + /** + * Encodes the specified GhostBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult} message GhostBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.opponents && message.opponents.length)) + message.opponents = []; + message.opponents.push($root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.decode(reader, reader.uint32())); + break; + } + case 3: { + message.path = reader.uint32(); + break; + } + case 25: { + message.isMorning = reader.bool(); + break; + } + case 4: { + message.selectionMethod = reader.int32(); + break; + } + case 5: { + message.stampSheetCount = reader.uint32(); + break; + } + case 6: { + if (!(message.stampSheet && message.stampSheet.length)) + message.stampSheet = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampSheet.push(reader.uint32()); + } else + message.stampSheet.push(reader.uint32()); + break; + } + case 23: { + message.rgStamp = reader.uint32(); + break; + } + case 24: { + if (!(message.confirmedTransferredStampTargetCarIds && message.confirmedTransferredStampTargetCarIds.length)) + message.confirmedTransferredStampTargetCarIds = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.confirmedTransferredStampTargetCarIds.push(reader.uint32()); + } else + message.confirmedTransferredStampTargetCarIds.push(reader.uint32()); + break; + } + case 8: { + message.rgPlayCount = reader.uint32(); + break; + } + case 10: { + message.dressupLevel = reader.uint32(); + break; + } + case 11: { + message.dressupPoint = reader.uint32(); + break; + } + case 14: { + if (!(message.rgRegionMapScore && message.rgRegionMapScore.length)) + message.rgRegionMapScore = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegionMapScore.push(reader.uint32()); + } else + message.rgRegionMapScore.push(reader.uint32()); + break; + } + case 16: { + message.competitionId = reader.uint32(); + break; + } + case 17: { + message.periodId = reader.uint32(); + break; + } + case 18: { + message.brakingPoint = reader.uint32(); + break; + } + case 20: { + message.acquireCrown = reader.bool(); + break; + } + case 21: { + message.acquireAllCrowns = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("isMorning")) + throw $util.ProtocolError("missing required 'isMorning'", { instance: message }); + if (!message.hasOwnProperty("selectionMethod")) + throw $util.ProtocolError("missing required 'selectionMethod'", { instance: message }); + if (!message.hasOwnProperty("rgPlayCount")) + throw $util.ProtocolError("missing required 'rgPlayCount'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.opponents != null && message.hasOwnProperty("opponents")) { + if (!Array.isArray(message.opponents)) + return "opponents: array expected"; + for (let i = 0; i < message.opponents.length; ++i) { + let error = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify(message.opponents[i]); + if (error) + return "opponents." + error; + } + } + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (typeof message.isMorning !== "boolean") + return "isMorning: boolean expected"; + switch (message.selectionMethod) { + default: + return "selectionMethod: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + if (!$util.isInteger(message.stampSheetCount)) + return "stampSheetCount: integer expected"; + if (message.stampSheet != null && message.hasOwnProperty("stampSheet")) { + if (!Array.isArray(message.stampSheet)) + return "stampSheet: array expected"; + for (let i = 0; i < message.stampSheet.length; ++i) + if (!$util.isInteger(message.stampSheet[i])) + return "stampSheet: integer[] expected"; + } + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + if (!$util.isInteger(message.rgStamp)) + return "rgStamp: integer expected"; + if (message.confirmedTransferredStampTargetCarIds != null && message.hasOwnProperty("confirmedTransferredStampTargetCarIds")) { + if (!Array.isArray(message.confirmedTransferredStampTargetCarIds)) + return "confirmedTransferredStampTargetCarIds: array expected"; + for (let i = 0; i < message.confirmedTransferredStampTargetCarIds.length; ++i) + if (!$util.isInteger(message.confirmedTransferredStampTargetCarIds[i])) + return "confirmedTransferredStampTargetCarIds: integer[] expected"; + } + if (!$util.isInteger(message.rgPlayCount)) + return "rgPlayCount: integer expected"; + if (message.dressupLevel != null && message.hasOwnProperty("dressupLevel")) + if (!$util.isInteger(message.dressupLevel)) + return "dressupLevel: integer expected"; + if (message.dressupPoint != null && message.hasOwnProperty("dressupPoint")) + if (!$util.isInteger(message.dressupPoint)) + return "dressupPoint: integer expected"; + if (message.rgRegionMapScore != null && message.hasOwnProperty("rgRegionMapScore")) { + if (!Array.isArray(message.rgRegionMapScore)) + return "rgRegionMapScore: array expected"; + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + if (!$util.isInteger(message.rgRegionMapScore[i])) + return "rgRegionMapScore: integer[] expected"; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + if (message.periodId != null && message.hasOwnProperty("periodId")) + if (!$util.isInteger(message.periodId)) + return "periodId: integer expected"; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + if (!$util.isInteger(message.brakingPoint)) + return "brakingPoint: integer expected"; + if (message.acquireCrown != null && message.hasOwnProperty("acquireCrown")) + if (typeof message.acquireCrown !== "boolean") + return "acquireCrown: boolean expected"; + if (message.acquireAllCrowns != null && message.hasOwnProperty("acquireAllCrowns")) + if (typeof message.acquireAllCrowns !== "boolean") + return "acquireAllCrowns: boolean expected"; + return null; + }; + + /** + * Creates a GhostBattleResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult + */ + GhostBattleResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult(); + if (object.opponents) { + if (!Array.isArray(object.opponents)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.opponents: array expected"); + message.opponents = []; + for (let i = 0; i < object.opponents.length; ++i) { + if (typeof object.opponents[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.opponents: object expected"); + message.opponents[i] = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.fromObject(object.opponents[i]); + } + } + if (object.path != null) + message.path = object.path >>> 0; + if (object.isMorning != null) + message.isMorning = Boolean(object.isMorning); + switch (object.selectionMethod) { + case "GHOST_SEARCH_BY_REGION": + case 1: + message.selectionMethod = 1; + break; + case "GHOST_SELECT_BY_LEVEL": + case 2: + message.selectionMethod = 2; + break; + case "GHOST_SELECT_CROWN_MATCH": + case 3: + message.selectionMethod = 3; + break; + case "GHOST_SELECT_STAMP_MATCH": + case 4: + message.selectionMethod = 4; + break; + case "GHOST_SELECT_FROM_HISTORY": + case 5: + message.selectionMethod = 5; + break; + case "GHOST_SEARCH_BY_SHOP": + case 6: + message.selectionMethod = 6; + break; + case "GHOST_SEARCH_BY_NAME": + case 7: + message.selectionMethod = 7; + break; + case "GHOST_ACCEPT_CHALLENGER": + case 8: + message.selectionMethod = 8; + break; + case "GHOST_APPOINTMENT": + case 9: + message.selectionMethod = 9; + break; + case "GHOST_DEFAULT_OPPONENT": + case 10: + message.selectionMethod = 10; + break; + case "GHOST_COMPETITION": + case 11: + message.selectionMethod = 11; + break; + case "GHOST_SELECT_FROM_BOOKMARKS": + case 12: + message.selectionMethod = 12; + break; + } + if (object.stampSheetCount != null) + message.stampSheetCount = object.stampSheetCount >>> 0; + if (object.stampSheet) { + if (!Array.isArray(object.stampSheet)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.stampSheet: array expected"); + message.stampSheet = []; + for (let i = 0; i < object.stampSheet.length; ++i) + message.stampSheet[i] = object.stampSheet[i] >>> 0; + } + if (object.rgStamp != null) + message.rgStamp = object.rgStamp >>> 0; + if (object.confirmedTransferredStampTargetCarIds) { + if (!Array.isArray(object.confirmedTransferredStampTargetCarIds)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.confirmedTransferredStampTargetCarIds: array expected"); + message.confirmedTransferredStampTargetCarIds = []; + for (let i = 0; i < object.confirmedTransferredStampTargetCarIds.length; ++i) + message.confirmedTransferredStampTargetCarIds[i] = object.confirmedTransferredStampTargetCarIds[i] >>> 0; + } + if (object.rgPlayCount != null) + message.rgPlayCount = object.rgPlayCount >>> 0; + if (object.dressupLevel != null) + message.dressupLevel = object.dressupLevel >>> 0; + if (object.dressupPoint != null) + message.dressupPoint = object.dressupPoint >>> 0; + if (object.rgRegionMapScore) { + if (!Array.isArray(object.rgRegionMapScore)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.rgRegionMapScore: array expected"); + message.rgRegionMapScore = []; + for (let i = 0; i < object.rgRegionMapScore.length; ++i) + message.rgRegionMapScore[i] = object.rgRegionMapScore[i] >>> 0; + } + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + if (object.periodId != null) + message.periodId = object.periodId >>> 0; + if (object.brakingPoint != null) + message.brakingPoint = object.brakingPoint >>> 0; + if (object.acquireCrown != null) + message.acquireCrown = Boolean(object.acquireCrown); + if (object.acquireAllCrowns != null) + message.acquireAllCrowns = Boolean(object.acquireAllCrowns); + return message; + }; + + /** + * Creates a plain object from a GhostBattleResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult} message GhostBattleResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.opponents = []; + object.stampSheet = []; + object.rgRegionMapScore = []; + object.confirmedTransferredStampTargetCarIds = []; + } + if (options.defaults) { + object.path = 0; + object.selectionMethod = options.enums === String ? "GHOST_SEARCH_BY_REGION" : 1; + object.stampSheetCount = 0; + object.rgPlayCount = 0; + object.dressupLevel = 0; + object.dressupPoint = 0; + object.competitionId = 0; + object.periodId = 0; + object.brakingPoint = 0; + object.acquireCrown = false; + object.acquireAllCrowns = false; + object.rgStamp = 0; + object.isMorning = false; + } + if (message.opponents && message.opponents.length) { + object.opponents = []; + for (let j = 0; j < message.opponents.length; ++j) + object.opponents[j] = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.toObject(message.opponents[j], options); + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.selectionMethod != null && message.hasOwnProperty("selectionMethod")) + object.selectionMethod = options.enums === String ? $root.wm.protobuf.GhostSelectionMethod[message.selectionMethod] : message.selectionMethod; + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + object.stampSheetCount = message.stampSheetCount; + if (message.stampSheet && message.stampSheet.length) { + object.stampSheet = []; + for (let j = 0; j < message.stampSheet.length; ++j) + object.stampSheet[j] = message.stampSheet[j]; + } + if (message.rgPlayCount != null && message.hasOwnProperty("rgPlayCount")) + object.rgPlayCount = message.rgPlayCount; + if (message.dressupLevel != null && message.hasOwnProperty("dressupLevel")) + object.dressupLevel = message.dressupLevel; + if (message.dressupPoint != null && message.hasOwnProperty("dressupPoint")) + object.dressupPoint = message.dressupPoint; + if (message.rgRegionMapScore && message.rgRegionMapScore.length) { + object.rgRegionMapScore = []; + for (let j = 0; j < message.rgRegionMapScore.length; ++j) + object.rgRegionMapScore[j] = message.rgRegionMapScore[j]; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + if (message.periodId != null && message.hasOwnProperty("periodId")) + object.periodId = message.periodId; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + object.brakingPoint = message.brakingPoint; + if (message.acquireCrown != null && message.hasOwnProperty("acquireCrown")) + object.acquireCrown = message.acquireCrown; + if (message.acquireAllCrowns != null && message.hasOwnProperty("acquireAllCrowns")) + object.acquireAllCrowns = message.acquireAllCrowns; + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + object.rgStamp = message.rgStamp; + if (message.confirmedTransferredStampTargetCarIds && message.confirmedTransferredStampTargetCarIds.length) { + object.confirmedTransferredStampTargetCarIds = []; + for (let j = 0; j < message.confirmedTransferredStampTargetCarIds.length; ++j) + object.confirmedTransferredStampTargetCarIds[j] = message.confirmedTransferredStampTargetCarIds[j]; + } + if (message.isMorning != null && message.hasOwnProperty("isMorning")) + object.isMorning = message.isMorning; + return object; + }; + + /** + * Converts this GhostBattleResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + * @returns {Object.} JSON object + */ + GhostBattleResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.GhostBattleResult"; + }; + + GhostBattleResult.GhostBattleOpponent = (function() { + + /** + * Properties of a GhostBattleOpponent. + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @interface IGhostBattleOpponent + * @property {number} result GhostBattleOpponent result + * @property {number} carId GhostBattleOpponent carId + * @property {number} tunePower GhostBattleOpponent tunePower + * @property {number} tuneHandling GhostBattleOpponent tuneHandling + * @property {boolean|null} [receiveStamp] GhostBattleOpponent receiveStamp + */ + + /** + * Constructs a new GhostBattleOpponent. + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @classdesc Represents a GhostBattleOpponent. + * @implements IGhostBattleOpponent + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent=} [properties] Properties to set + */ + function GhostBattleOpponent(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleOpponent result. + * @member {number} result + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.result = 0; + + /** + * GhostBattleOpponent carId. + * @member {number} carId + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.carId = 0; + + /** + * GhostBattleOpponent tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.tunePower = 0; + + /** + * GhostBattleOpponent tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.tuneHandling = 0; + + /** + * GhostBattleOpponent receiveStamp. + * @member {boolean} receiveStamp + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.receiveStamp = false; + + /** + * Creates a new GhostBattleOpponent instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent instance + */ + GhostBattleOpponent.create = function create(properties) { + return new GhostBattleOpponent(properties); + }; + + /** + * Encodes the specified GhostBattleOpponent message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent} message GhostBattleOpponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleOpponent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).sint32(message.result); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.carId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tunePower); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.tuneHandling); + if (message.receiveStamp != null && Object.hasOwnProperty.call(message, "receiveStamp")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.receiveStamp); + return writer; + }; + + /** + * Encodes the specified GhostBattleOpponent message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent} message GhostBattleOpponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleOpponent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleOpponent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.sint32(); + break; + } + case 2: { + message.carId = reader.uint32(); + break; + } + case 3: { + message.tunePower = reader.uint32(); + break; + } + case 4: { + message.tuneHandling = reader.uint32(); + break; + } + case 5: { + message.receiveStamp = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleOpponent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleOpponent message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleOpponent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.receiveStamp != null && message.hasOwnProperty("receiveStamp")) + if (typeof message.receiveStamp !== "boolean") + return "receiveStamp: boolean expected"; + return null; + }; + + /** + * Creates a GhostBattleOpponent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent + */ + GhostBattleOpponent.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent(); + if (object.result != null) + message.result = object.result | 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.receiveStamp != null) + message.receiveStamp = Boolean(object.receiveStamp); + return message; + }; + + /** + * Creates a plain object from a GhostBattleOpponent message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} message GhostBattleOpponent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleOpponent.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.result = 0; + object.carId = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.receiveStamp = false; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.receiveStamp != null && message.hasOwnProperty("receiveStamp")) + object.receiveStamp = message.receiveStamp; + return object; + }; + + /** + * Converts this GhostBattleOpponent to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + * @returns {Object.} JSON object + */ + GhostBattleOpponent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleOpponent + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleOpponent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent"; + }; + + return GhostBattleOpponent; + })(); + + return GhostBattleResult; + })(); + + return SaveGameResultRequest; + })(); + + protobuf.SaveGameResultResponse = (function() { + + /** + * Properties of a SaveGameResultResponse. + * @memberof wm.protobuf + * @interface ISaveGameResultResponse + * @property {wm.protobuf.ErrorCode} error SaveGameResultResponse error + * @property {number|Long|null} [ghostSessionId] SaveGameResultResponse ghostSessionId + * @property {Array.|null} [availableTickets] SaveGameResultResponse availableTickets + */ + + /** + * Constructs a new SaveGameResultResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveGameResultResponse. + * @implements ISaveGameResultResponse + * @constructor + * @param {wm.protobuf.ISaveGameResultResponse=} [properties] Properties to set + */ + function SaveGameResultResponse(properties) { + this.availableTickets = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveGameResultResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + */ + SaveGameResultResponse.prototype.error = 0; + + /** + * SaveGameResultResponse ghostSessionId. + * @member {number|Long} ghostSessionId + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + */ + SaveGameResultResponse.prototype.ghostSessionId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * SaveGameResultResponse availableTickets. + * @member {Array.} availableTickets + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + */ + SaveGameResultResponse.prototype.availableTickets = $util.emptyArray; + + /** + * Creates a new SaveGameResultResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.ISaveGameResultResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse instance + */ + SaveGameResultResponse.create = function create(properties) { + return new SaveGameResultResponse(properties); + }; + + /** + * Encodes the specified SaveGameResultResponse message. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.ISaveGameResultResponse} message SaveGameResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.ghostSessionId != null && Object.hasOwnProperty.call(message, "ghostSessionId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.ghostSessionId); + if (message.availableTickets != null && message.availableTickets.length) + for (let i = 0; i < message.availableTickets.length; ++i) + $root.wm.protobuf.UserItem.encode(message.availableTickets[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveGameResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.ISaveGameResultResponse} message SaveGameResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.ghostSessionId = reader.uint64(); + break; + } + case 3: { + if (!(message.availableTickets && message.availableTickets.length)) + message.availableTickets = []; + message.availableTickets.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveGameResultResponse message. + * @function verify + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveGameResultResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.ghostSessionId != null && message.hasOwnProperty("ghostSessionId")) + if (!$util.isInteger(message.ghostSessionId) && !(message.ghostSessionId && $util.isInteger(message.ghostSessionId.low) && $util.isInteger(message.ghostSessionId.high))) + return "ghostSessionId: integer|Long expected"; + if (message.availableTickets != null && message.hasOwnProperty("availableTickets")) { + if (!Array.isArray(message.availableTickets)) + return "availableTickets: array expected"; + for (let i = 0; i < message.availableTickets.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.availableTickets[i]); + if (error) + return "availableTickets." + error; + } + } + return null; + }; + + /** + * Creates a SaveGameResultResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse + */ + SaveGameResultResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultResponse) + return object; + let message = new $root.wm.protobuf.SaveGameResultResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.ghostSessionId != null) + if ($util.Long) + (message.ghostSessionId = $util.Long.fromValue(object.ghostSessionId)).unsigned = true; + else if (typeof object.ghostSessionId === "string") + message.ghostSessionId = parseInt(object.ghostSessionId, 10); + else if (typeof object.ghostSessionId === "number") + message.ghostSessionId = object.ghostSessionId; + else if (typeof object.ghostSessionId === "object") + message.ghostSessionId = new $util.LongBits(object.ghostSessionId.low >>> 0, object.ghostSessionId.high >>> 0).toNumber(true); + if (object.availableTickets) { + if (!Array.isArray(object.availableTickets)) + throw TypeError(".wm.protobuf.SaveGameResultResponse.availableTickets: array expected"); + message.availableTickets = []; + for (let i = 0; i < object.availableTickets.length; ++i) { + if (typeof object.availableTickets[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultResponse.availableTickets: object expected"); + message.availableTickets[i] = $root.wm.protobuf.UserItem.fromObject(object.availableTickets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SaveGameResultResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.SaveGameResultResponse} message SaveGameResultResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveGameResultResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.availableTickets = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.ghostSessionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ghostSessionId = options.longs === String ? "0" : 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.ghostSessionId != null && message.hasOwnProperty("ghostSessionId")) + if (typeof message.ghostSessionId === "number") + object.ghostSessionId = options.longs === String ? String(message.ghostSessionId) : message.ghostSessionId; + else + object.ghostSessionId = options.longs === String ? $util.Long.prototype.toString.call(message.ghostSessionId) : options.longs === Number ? new $util.LongBits(message.ghostSessionId.low >>> 0, message.ghostSessionId.high >>> 0).toNumber(true) : message.ghostSessionId; + if (message.availableTickets && message.availableTickets.length) { + object.availableTickets = []; + for (let j = 0; j < message.availableTickets.length; ++j) + object.availableTickets[j] = $root.wm.protobuf.UserItem.toObject(message.availableTickets[j], options); + } + return object; + }; + + /** + * Converts this SaveGameResultResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + * @returns {Object.} JSON object + */ + SaveGameResultResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveGameResultResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveGameResultResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultResponse"; + }; + + return SaveGameResultResponse; + })(); + + protobuf.SaveChargeRequest = (function() { + + /** + * Properties of a SaveChargeRequest. + * @memberof wm.protobuf + * @interface ISaveChargeRequest + * @property {Array.|null} [chargeLogs] SaveChargeRequest chargeLogs + */ + + /** + * Constructs a new SaveChargeRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveChargeRequest. + * @implements ISaveChargeRequest + * @constructor + * @param {wm.protobuf.ISaveChargeRequest=} [properties] Properties to set + */ + function SaveChargeRequest(properties) { + this.chargeLogs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveChargeRequest chargeLogs. + * @member {Array.} chargeLogs + * @memberof wm.protobuf.SaveChargeRequest + * @instance + */ + SaveChargeRequest.prototype.chargeLogs = $util.emptyArray; + + /** + * Creates a new SaveChargeRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.ISaveChargeRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest instance + */ + SaveChargeRequest.create = function create(properties) { + return new SaveChargeRequest(properties); + }; + + /** + * Encodes the specified SaveChargeRequest message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.ISaveChargeRequest} message SaveChargeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chargeLogs != null && message.chargeLogs.length) + for (let i = 0; i < message.chargeLogs.length; ++i) + $root.wm.protobuf.SaveChargeRequest.ChargeLog.encode(message.chargeLogs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveChargeRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.ISaveChargeRequest} message SaveChargeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveChargeRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.chargeLogs && message.chargeLogs.length)) + message.chargeLogs = []; + message.chargeLogs.push($root.wm.protobuf.SaveChargeRequest.ChargeLog.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveChargeRequest message. + * @function verify + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveChargeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chargeLogs != null && message.hasOwnProperty("chargeLogs")) { + if (!Array.isArray(message.chargeLogs)) + return "chargeLogs: array expected"; + for (let i = 0; i < message.chargeLogs.length; ++i) { + let error = $root.wm.protobuf.SaveChargeRequest.ChargeLog.verify(message.chargeLogs[i]); + if (error) + return "chargeLogs." + error; + } + } + return null; + }; + + /** + * Creates a SaveChargeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest + */ + SaveChargeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveChargeRequest) + return object; + let message = new $root.wm.protobuf.SaveChargeRequest(); + if (object.chargeLogs) { + if (!Array.isArray(object.chargeLogs)) + throw TypeError(".wm.protobuf.SaveChargeRequest.chargeLogs: array expected"); + message.chargeLogs = []; + for (let i = 0; i < object.chargeLogs.length; ++i) { + if (typeof object.chargeLogs[i] !== "object") + throw TypeError(".wm.protobuf.SaveChargeRequest.chargeLogs: object expected"); + message.chargeLogs[i] = $root.wm.protobuf.SaveChargeRequest.ChargeLog.fromObject(object.chargeLogs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SaveChargeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.SaveChargeRequest} message SaveChargeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveChargeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.chargeLogs = []; + if (message.chargeLogs && message.chargeLogs.length) { + object.chargeLogs = []; + for (let j = 0; j < message.chargeLogs.length; ++j) + object.chargeLogs[j] = $root.wm.protobuf.SaveChargeRequest.ChargeLog.toObject(message.chargeLogs[j], options); + } + return object; + }; + + /** + * Converts this SaveChargeRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveChargeRequest + * @instance + * @returns {Object.} JSON object + */ + SaveChargeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveChargeRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveChargeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveChargeRequest"; + }; + + SaveChargeRequest.ChargeLog = (function() { + + /** + * Properties of a ChargeLog. + * @memberof wm.protobuf.SaveChargeRequest + * @interface IChargeLog + * @property {number} datetime ChargeLog datetime + * @property {string} pcbSerial ChargeLog pcbSerial + * @property {string} placeId ChargeLog placeId + * @property {number|null} [userId] ChargeLog userId + */ + + /** + * Constructs a new ChargeLog. + * @memberof wm.protobuf.SaveChargeRequest + * @classdesc Represents a ChargeLog. + * @implements IChargeLog + * @constructor + * @param {wm.protobuf.SaveChargeRequest.IChargeLog=} [properties] Properties to set + */ + function ChargeLog(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChargeLog datetime. + * @member {number} datetime + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.datetime = 0; + + /** + * ChargeLog pcbSerial. + * @member {string} pcbSerial + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.pcbSerial = ""; + + /** + * ChargeLog placeId. + * @member {string} placeId + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.placeId = ""; + + /** + * ChargeLog userId. + * @member {number} userId + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.userId = 0; + + /** + * Creates a new ChargeLog instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.IChargeLog=} [properties] Properties to set + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog instance + */ + ChargeLog.create = function create(properties) { + return new ChargeLog(properties); + }; + + /** + * Encodes the specified ChargeLog message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.IChargeLog} message ChargeLog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChargeLog.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.datetime); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pcbSerial); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.placeId); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified ChargeLog message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.IChargeLog} message ChargeLog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChargeLog.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChargeLog message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChargeLog.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveChargeRequest.ChargeLog(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datetime = reader.uint32(); + break; + } + case 2: { + message.pcbSerial = reader.string(); + break; + } + case 3: { + message.placeId = reader.string(); + break; + } + case 4: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("datetime")) + throw $util.ProtocolError("missing required 'datetime'", { instance: message }); + if (!message.hasOwnProperty("pcbSerial")) + throw $util.ProtocolError("missing required 'pcbSerial'", { instance: message }); + if (!message.hasOwnProperty("placeId")) + throw $util.ProtocolError("missing required 'placeId'", { instance: message }); + return message; + }; + + /** + * Decodes a ChargeLog message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChargeLog.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChargeLog message. + * @function verify + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChargeLog.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.datetime)) + return "datetime: integer expected"; + if (!$util.isString(message.pcbSerial)) + return "pcbSerial: string expected"; + if (!$util.isString(message.placeId)) + return "placeId: string expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a ChargeLog message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog + */ + ChargeLog.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveChargeRequest.ChargeLog) + return object; + let message = new $root.wm.protobuf.SaveChargeRequest.ChargeLog(); + if (object.datetime != null) + message.datetime = object.datetime >>> 0; + if (object.pcbSerial != null) + message.pcbSerial = String(object.pcbSerial); + if (object.placeId != null) + message.placeId = String(object.placeId); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a ChargeLog message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.ChargeLog} message ChargeLog + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChargeLog.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.datetime = 0; + object.pcbSerial = ""; + object.placeId = ""; + object.userId = 0; + } + if (message.datetime != null && message.hasOwnProperty("datetime")) + object.datetime = message.datetime; + if (message.pcbSerial != null && message.hasOwnProperty("pcbSerial")) + object.pcbSerial = message.pcbSerial; + if (message.placeId != null && message.hasOwnProperty("placeId")) + object.placeId = message.placeId; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this ChargeLog to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + * @returns {Object.} JSON object + */ + ChargeLog.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChargeLog + * @function getTypeUrl + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChargeLog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveChargeRequest.ChargeLog"; + }; + + return ChargeLog; + })(); + + return SaveChargeRequest; + })(); + + protobuf.SaveChargeResponse = (function() { + + /** + * Properties of a SaveChargeResponse. + * @memberof wm.protobuf + * @interface ISaveChargeResponse + * @property {wm.protobuf.ErrorCode} error SaveChargeResponse error + */ + + /** + * Constructs a new SaveChargeResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveChargeResponse. + * @implements ISaveChargeResponse + * @constructor + * @param {wm.protobuf.ISaveChargeResponse=} [properties] Properties to set + */ + function SaveChargeResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveChargeResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveChargeResponse + * @instance + */ + SaveChargeResponse.prototype.error = 0; + + /** + * Creates a new SaveChargeResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.ISaveChargeResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse instance + */ + SaveChargeResponse.create = function create(properties) { + return new SaveChargeResponse(properties); + }; + + /** + * Encodes the specified SaveChargeResponse message. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.ISaveChargeResponse} message SaveChargeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveChargeResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.ISaveChargeResponse} message SaveChargeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveChargeResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveChargeResponse message. + * @function verify + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveChargeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveChargeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse + */ + SaveChargeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveChargeResponse) + return object; + let message = new $root.wm.protobuf.SaveChargeResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveChargeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.SaveChargeResponse} message SaveChargeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveChargeResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveChargeResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveChargeResponse + * @instance + * @returns {Object.} JSON object + */ + SaveChargeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveChargeResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveChargeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveChargeResponse"; + }; + + return SaveChargeResponse; + })(); + + protobuf.LoadGhostBattleInfoRequest = (function() { + + /** + * Properties of a LoadGhostBattleInfoRequest. + * @memberof wm.protobuf + * @interface ILoadGhostBattleInfoRequest + * @property {number} carId LoadGhostBattleInfoRequest carId + */ + + /** + * Constructs a new LoadGhostBattleInfoRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostBattleInfoRequest. + * @implements ILoadGhostBattleInfoRequest + * @constructor + * @param {wm.protobuf.ILoadGhostBattleInfoRequest=} [properties] Properties to set + */ + function LoadGhostBattleInfoRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostBattleInfoRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @instance + */ + LoadGhostBattleInfoRequest.prototype.carId = 0; + + /** + * Creates a new LoadGhostBattleInfoRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest instance + */ + LoadGhostBattleInfoRequest.create = function create(properties) { + return new LoadGhostBattleInfoRequest(properties); + }; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoRequest} message LoadGhostBattleInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + return writer; + }; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoRequest} message LoadGhostBattleInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostBattleInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostBattleInfoRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostBattleInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + return null; + }; + + /** + * Creates a LoadGhostBattleInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest + */ + LoadGhostBattleInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostBattleInfoRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostBattleInfoRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGhostBattleInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.LoadGhostBattleInfoRequest} message LoadGhostBattleInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostBattleInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + return object; + }; + + /** + * Converts this LoadGhostBattleInfoRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostBattleInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostBattleInfoRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostBattleInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostBattleInfoRequest"; + }; + + return LoadGhostBattleInfoRequest; + })(); + + protobuf.LoadGhostBattleInfoResponse = (function() { + + /** + * Properties of a LoadGhostBattleInfoResponse. + * @memberof wm.protobuf + * @interface ILoadGhostBattleInfoResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostBattleInfoResponse error + * @property {Array.|null} [friendCars] LoadGhostBattleInfoResponse friendCars + * @property {Array.|null} [challengers] LoadGhostBattleInfoResponse challengers + * @property {Array.|null} [stampTargetCars] LoadGhostBattleInfoResponse stampTargetCars + * @property {Array.|null} [previousVersionStampTargetCars] LoadGhostBattleInfoResponse previousVersionStampTargetCars + * @property {Array.|null} [bookmarkedCars] LoadGhostBattleInfoResponse bookmarkedCars + * @property {Array.|null} [history] LoadGhostBattleInfoResponse history + * @property {Array.|null} [weakenedCars] LoadGhostBattleInfoResponse weakenedCars + * @property {number} stampSheetCount LoadGhostBattleInfoResponse stampSheetCount + * @property {Array.|null} [stampSheet] LoadGhostBattleInfoResponse stampSheet + * @property {Array.|null} [stampReturnStats] LoadGhostBattleInfoResponse stampReturnStats + */ + + /** + * Constructs a new LoadGhostBattleInfoResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostBattleInfoResponse. + * @implements ILoadGhostBattleInfoResponse + * @constructor + * @param {wm.protobuf.ILoadGhostBattleInfoResponse=} [properties] Properties to set + */ + function LoadGhostBattleInfoResponse(properties) { + this.friendCars = []; + this.challengers = []; + this.stampTargetCars = []; + this.previousVersionStampTargetCars = []; + this.bookmarkedCars = []; + this.history = []; + this.weakenedCars = []; + this.stampSheet = []; + this.stampReturnStats = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostBattleInfoResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.error = 0; + + /** + * LoadGhostBattleInfoResponse friendCars. + * @member {Array.} friendCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.friendCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse challengers. + * @member {Array.} challengers + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.challengers = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse stampTargetCars. + * @member {Array.} stampTargetCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampTargetCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse previousVersionStampTargetCars. + * @member {Array.} previousVersionStampTargetCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.previousVersionStampTargetCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse bookmarkedCars. + * @member {Array.} bookmarkedCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.bookmarkedCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse history. + * @member {Array.} history + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.history = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse weakenedCars. + * @member {Array.} weakenedCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.weakenedCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse stampSheetCount. + * @member {number} stampSheetCount + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampSheetCount = 0; + + /** + * LoadGhostBattleInfoResponse stampSheet. + * @member {Array.} stampSheet + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampSheet = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse stampReturnStats. + * @member {Array.} stampReturnStats + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampReturnStats = $util.emptyArray; + + /** + * Creates a new LoadGhostBattleInfoResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse instance + */ + LoadGhostBattleInfoResponse.create = function create(properties) { + return new LoadGhostBattleInfoResponse(properties); + }; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoResponse} message LoadGhostBattleInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.friendCars != null && message.friendCars.length) + for (let i = 0; i < message.friendCars.length; ++i) + $root.wm.protobuf.FriendCar.encode(message.friendCars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.challengers != null && message.challengers.length) + for (let i = 0; i < message.challengers.length; ++i) + $root.wm.protobuf.ChallengerCar.encode(message.challengers[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.stampTargetCars != null && message.stampTargetCars.length) + for (let i = 0; i < message.stampTargetCars.length; ++i) + $root.wm.protobuf.StampTargetCar.encode(message.stampTargetCars[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.history != null && message.history.length) + for (let i = 0; i < message.history.length; ++i) + $root.wm.protobuf.Car.encode(message.history[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.stampSheetCount); + if (message.stampSheet != null && message.stampSheet.length) + for (let i = 0; i < message.stampSheet.length; ++i) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stampSheet[i]); + if (message.stampReturnStats != null && message.stampReturnStats.length) + for (let i = 0; i < message.stampReturnStats.length; ++i) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.stampReturnStats[i]); + if (message.weakenedCars != null && message.weakenedCars.length) + for (let i = 0; i < message.weakenedCars.length; ++i) + $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.encode(message.weakenedCars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.bookmarkedCars != null && message.bookmarkedCars.length) + for (let i = 0; i < message.bookmarkedCars.length; ++i) + $root.wm.protobuf.BookmarkedCar.encode(message.bookmarkedCars[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.previousVersionStampTargetCars != null && message.previousVersionStampTargetCars.length) + for (let i = 0; i < message.previousVersionStampTargetCars.length; ++i) + $root.wm.protobuf.PreviousVersionStampTargetCar.encode(message.previousVersionStampTargetCars[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoResponse} message LoadGhostBattleInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostBattleInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.friendCars && message.friendCars.length)) + message.friendCars = []; + message.friendCars.push($root.wm.protobuf.FriendCar.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.challengers && message.challengers.length)) + message.challengers = []; + message.challengers.push($root.wm.protobuf.ChallengerCar.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.stampTargetCars && message.stampTargetCars.length)) + message.stampTargetCars = []; + message.stampTargetCars.push($root.wm.protobuf.StampTargetCar.decode(reader, reader.uint32())); + break; + } + case 12: { + if (!(message.previousVersionStampTargetCars && message.previousVersionStampTargetCars.length)) + message.previousVersionStampTargetCars = []; + message.previousVersionStampTargetCars.push($root.wm.protobuf.PreviousVersionStampTargetCar.decode(reader, reader.uint32())); + break; + } + case 11: { + if (!(message.bookmarkedCars && message.bookmarkedCars.length)) + message.bookmarkedCars = []; + message.bookmarkedCars.push($root.wm.protobuf.BookmarkedCar.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.history && message.history.length)) + message.history = []; + message.history.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.weakenedCars && message.weakenedCars.length)) + message.weakenedCars = []; + message.weakenedCars.push($root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.decode(reader, reader.uint32())); + break; + } + case 7: { + message.stampSheetCount = reader.uint32(); + break; + } + case 8: { + if (!(message.stampSheet && message.stampSheet.length)) + message.stampSheet = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampSheet.push(reader.uint32()); + } else + message.stampSheet.push(reader.uint32()); + break; + } + case 9: { + if (!(message.stampReturnStats && message.stampReturnStats.length)) + message.stampReturnStats = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampReturnStats.push(reader.uint32()); + } else + message.stampReturnStats.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("stampSheetCount")) + throw $util.ProtocolError("missing required 'stampSheetCount'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostBattleInfoResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostBattleInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.friendCars != null && message.hasOwnProperty("friendCars")) { + if (!Array.isArray(message.friendCars)) + return "friendCars: array expected"; + for (let i = 0; i < message.friendCars.length; ++i) { + let error = $root.wm.protobuf.FriendCar.verify(message.friendCars[i]); + if (error) + return "friendCars." + error; + } + } + if (message.challengers != null && message.hasOwnProperty("challengers")) { + if (!Array.isArray(message.challengers)) + return "challengers: array expected"; + for (let i = 0; i < message.challengers.length; ++i) { + let error = $root.wm.protobuf.ChallengerCar.verify(message.challengers[i]); + if (error) + return "challengers." + error; + } + } + if (message.stampTargetCars != null && message.hasOwnProperty("stampTargetCars")) { + if (!Array.isArray(message.stampTargetCars)) + return "stampTargetCars: array expected"; + for (let i = 0; i < message.stampTargetCars.length; ++i) { + let error = $root.wm.protobuf.StampTargetCar.verify(message.stampTargetCars[i]); + if (error) + return "stampTargetCars." + error; + } + } + if (message.previousVersionStampTargetCars != null && message.hasOwnProperty("previousVersionStampTargetCars")) { + if (!Array.isArray(message.previousVersionStampTargetCars)) + return "previousVersionStampTargetCars: array expected"; + for (let i = 0; i < message.previousVersionStampTargetCars.length; ++i) { + let error = $root.wm.protobuf.PreviousVersionStampTargetCar.verify(message.previousVersionStampTargetCars[i]); + if (error) + return "previousVersionStampTargetCars." + error; + } + } + if (message.bookmarkedCars != null && message.hasOwnProperty("bookmarkedCars")) { + if (!Array.isArray(message.bookmarkedCars)) + return "bookmarkedCars: array expected"; + for (let i = 0; i < message.bookmarkedCars.length; ++i) { + let error = $root.wm.protobuf.BookmarkedCar.verify(message.bookmarkedCars[i]); + if (error) + return "bookmarkedCars." + error; + } + } + if (message.history != null && message.hasOwnProperty("history")) { + if (!Array.isArray(message.history)) + return "history: array expected"; + for (let i = 0; i < message.history.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.history[i]); + if (error) + return "history." + error; + } + } + if (message.weakenedCars != null && message.hasOwnProperty("weakenedCars")) { + if (!Array.isArray(message.weakenedCars)) + return "weakenedCars: array expected"; + for (let i = 0; i < message.weakenedCars.length; ++i) { + let error = $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify(message.weakenedCars[i]); + if (error) + return "weakenedCars." + error; + } + } + if (!$util.isInteger(message.stampSheetCount)) + return "stampSheetCount: integer expected"; + if (message.stampSheet != null && message.hasOwnProperty("stampSheet")) { + if (!Array.isArray(message.stampSheet)) + return "stampSheet: array expected"; + for (let i = 0; i < message.stampSheet.length; ++i) + if (!$util.isInteger(message.stampSheet[i])) + return "stampSheet: integer[] expected"; + } + if (message.stampReturnStats != null && message.hasOwnProperty("stampReturnStats")) { + if (!Array.isArray(message.stampReturnStats)) + return "stampReturnStats: array expected"; + for (let i = 0; i < message.stampReturnStats.length; ++i) + if (!$util.isInteger(message.stampReturnStats[i])) + return "stampReturnStats: integer[] expected"; + } + return null; + }; + + /** + * Creates a LoadGhostBattleInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse + */ + LoadGhostBattleInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostBattleInfoResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostBattleInfoResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.friendCars) { + if (!Array.isArray(object.friendCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.friendCars: array expected"); + message.friendCars = []; + for (let i = 0; i < object.friendCars.length; ++i) { + if (typeof object.friendCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.friendCars: object expected"); + message.friendCars[i] = $root.wm.protobuf.FriendCar.fromObject(object.friendCars[i]); + } + } + if (object.challengers) { + if (!Array.isArray(object.challengers)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.challengers: array expected"); + message.challengers = []; + for (let i = 0; i < object.challengers.length; ++i) { + if (typeof object.challengers[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.challengers: object expected"); + message.challengers[i] = $root.wm.protobuf.ChallengerCar.fromObject(object.challengers[i]); + } + } + if (object.stampTargetCars) { + if (!Array.isArray(object.stampTargetCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampTargetCars: array expected"); + message.stampTargetCars = []; + for (let i = 0; i < object.stampTargetCars.length; ++i) { + if (typeof object.stampTargetCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampTargetCars: object expected"); + message.stampTargetCars[i] = $root.wm.protobuf.StampTargetCar.fromObject(object.stampTargetCars[i]); + } + } + if (object.previousVersionStampTargetCars) { + if (!Array.isArray(object.previousVersionStampTargetCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.previousVersionStampTargetCars: array expected"); + message.previousVersionStampTargetCars = []; + for (let i = 0; i < object.previousVersionStampTargetCars.length; ++i) { + if (typeof object.previousVersionStampTargetCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.previousVersionStampTargetCars: object expected"); + message.previousVersionStampTargetCars[i] = $root.wm.protobuf.PreviousVersionStampTargetCar.fromObject(object.previousVersionStampTargetCars[i]); + } + } + if (object.bookmarkedCars) { + if (!Array.isArray(object.bookmarkedCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.bookmarkedCars: array expected"); + message.bookmarkedCars = []; + for (let i = 0; i < object.bookmarkedCars.length; ++i) { + if (typeof object.bookmarkedCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.bookmarkedCars: object expected"); + message.bookmarkedCars[i] = $root.wm.protobuf.BookmarkedCar.fromObject(object.bookmarkedCars[i]); + } + } + if (object.history) { + if (!Array.isArray(object.history)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.history: array expected"); + message.history = []; + for (let i = 0; i < object.history.length; ++i) { + if (typeof object.history[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.history: object expected"); + message.history[i] = $root.wm.protobuf.Car.fromObject(object.history[i]); + } + } + if (object.weakenedCars) { + if (!Array.isArray(object.weakenedCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.weakenedCars: array expected"); + message.weakenedCars = []; + for (let i = 0; i < object.weakenedCars.length; ++i) { + if (typeof object.weakenedCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.weakenedCars: object expected"); + message.weakenedCars[i] = $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.fromObject(object.weakenedCars[i]); + } + } + if (object.stampSheetCount != null) + message.stampSheetCount = object.stampSheetCount >>> 0; + if (object.stampSheet) { + if (!Array.isArray(object.stampSheet)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampSheet: array expected"); + message.stampSheet = []; + for (let i = 0; i < object.stampSheet.length; ++i) + message.stampSheet[i] = object.stampSheet[i] >>> 0; + } + if (object.stampReturnStats) { + if (!Array.isArray(object.stampReturnStats)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampReturnStats: array expected"); + message.stampReturnStats = []; + for (let i = 0; i < object.stampReturnStats.length; ++i) + message.stampReturnStats[i] = object.stampReturnStats[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostBattleInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse} message LoadGhostBattleInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostBattleInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.friendCars = []; + object.challengers = []; + object.stampTargetCars = []; + object.history = []; + object.stampSheet = []; + object.stampReturnStats = []; + object.weakenedCars = []; + object.bookmarkedCars = []; + object.previousVersionStampTargetCars = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.stampSheetCount = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.friendCars && message.friendCars.length) { + object.friendCars = []; + for (let j = 0; j < message.friendCars.length; ++j) + object.friendCars[j] = $root.wm.protobuf.FriendCar.toObject(message.friendCars[j], options); + } + if (message.challengers && message.challengers.length) { + object.challengers = []; + for (let j = 0; j < message.challengers.length; ++j) + object.challengers[j] = $root.wm.protobuf.ChallengerCar.toObject(message.challengers[j], options); + } + if (message.stampTargetCars && message.stampTargetCars.length) { + object.stampTargetCars = []; + for (let j = 0; j < message.stampTargetCars.length; ++j) + object.stampTargetCars[j] = $root.wm.protobuf.StampTargetCar.toObject(message.stampTargetCars[j], options); + } + if (message.history && message.history.length) { + object.history = []; + for (let j = 0; j < message.history.length; ++j) + object.history[j] = $root.wm.protobuf.Car.toObject(message.history[j], options); + } + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + object.stampSheetCount = message.stampSheetCount; + if (message.stampSheet && message.stampSheet.length) { + object.stampSheet = []; + for (let j = 0; j < message.stampSheet.length; ++j) + object.stampSheet[j] = message.stampSheet[j]; + } + if (message.stampReturnStats && message.stampReturnStats.length) { + object.stampReturnStats = []; + for (let j = 0; j < message.stampReturnStats.length; ++j) + object.stampReturnStats[j] = message.stampReturnStats[j]; + } + if (message.weakenedCars && message.weakenedCars.length) { + object.weakenedCars = []; + for (let j = 0; j < message.weakenedCars.length; ++j) + object.weakenedCars[j] = $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.toObject(message.weakenedCars[j], options); + } + if (message.bookmarkedCars && message.bookmarkedCars.length) { + object.bookmarkedCars = []; + for (let j = 0; j < message.bookmarkedCars.length; ++j) + object.bookmarkedCars[j] = $root.wm.protobuf.BookmarkedCar.toObject(message.bookmarkedCars[j], options); + } + if (message.previousVersionStampTargetCars && message.previousVersionStampTargetCars.length) { + object.previousVersionStampTargetCars = []; + for (let j = 0; j < message.previousVersionStampTargetCars.length; ++j) + object.previousVersionStampTargetCars[j] = $root.wm.protobuf.PreviousVersionStampTargetCar.toObject(message.previousVersionStampTargetCars[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostBattleInfoResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostBattleInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostBattleInfoResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostBattleInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostBattleInfoResponse"; + }; + + LoadGhostBattleInfoResponse.WeakenedCar = (function() { + + /** + * Properties of a WeakenedCar. + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @interface IWeakenedCar + * @property {number} carId WeakenedCar carId + * @property {number} consecutiveLosses WeakenedCar consecutiveLosses + */ + + /** + * Constructs a new WeakenedCar. + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @classdesc Represents a WeakenedCar. + * @implements IWeakenedCar + * @constructor + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar=} [properties] Properties to set + */ + function WeakenedCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WeakenedCar carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @instance + */ + WeakenedCar.prototype.carId = 0; + + /** + * WeakenedCar consecutiveLosses. + * @member {number} consecutiveLosses + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @instance + */ + WeakenedCar.prototype.consecutiveLosses = 0; + + /** + * Creates a new WeakenedCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar instance + */ + WeakenedCar.create = function create(properties) { + return new WeakenedCar(properties); + }; + + /** + * Encodes the specified WeakenedCar message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar} message WeakenedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeakenedCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.consecutiveLosses); + return writer; + }; + + /** + * Encodes the specified WeakenedCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar} message WeakenedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeakenedCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeakenedCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.consecutiveLosses = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("consecutiveLosses")) + throw $util.ProtocolError("missing required 'consecutiveLosses'", { instance: message }); + return message; + }; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeakenedCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WeakenedCar message. + * @function verify + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeakenedCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.consecutiveLosses)) + return "consecutiveLosses: integer expected"; + return null; + }; + + /** + * Creates a WeakenedCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar + */ + WeakenedCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar) + return object; + let message = new $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.consecutiveLosses != null) + message.consecutiveLosses = object.consecutiveLosses >>> 0; + return message; + }; + + /** + * Creates a plain object from a WeakenedCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} message WeakenedCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeakenedCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.consecutiveLosses = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.consecutiveLosses != null && message.hasOwnProperty("consecutiveLosses")) + object.consecutiveLosses = message.consecutiveLosses; + return object; + }; + + /** + * Converts this WeakenedCar to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @instance + * @returns {Object.} JSON object + */ + WeakenedCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WeakenedCar + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WeakenedCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar"; + }; + + return WeakenedCar; + })(); + + return LoadGhostBattleInfoResponse; + })(); + + protobuf.LoadStampTargetRequest = (function() { + + /** + * Properties of a LoadStampTargetRequest. + * @memberof wm.protobuf + * @interface ILoadStampTargetRequest + * @property {number} carId LoadStampTargetRequest carId + * @property {boolean} needToPromote LoadStampTargetRequest needToPromote + */ + + /** + * Constructs a new LoadStampTargetRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadStampTargetRequest. + * @implements ILoadStampTargetRequest + * @constructor + * @param {wm.protobuf.ILoadStampTargetRequest=} [properties] Properties to set + */ + function LoadStampTargetRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadStampTargetRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadStampTargetRequest + * @instance + */ + LoadStampTargetRequest.prototype.carId = 0; + + /** + * LoadStampTargetRequest needToPromote. + * @member {boolean} needToPromote + * @memberof wm.protobuf.LoadStampTargetRequest + * @instance + */ + LoadStampTargetRequest.prototype.needToPromote = false; + + /** + * Creates a new LoadStampTargetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.ILoadStampTargetRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest instance + */ + LoadStampTargetRequest.create = function create(properties) { + return new LoadStampTargetRequest(properties); + }; + + /** + * Encodes the specified LoadStampTargetRequest message. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.ILoadStampTargetRequest} message LoadStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.needToPromote); + return writer; + }; + + /** + * Encodes the specified LoadStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.ILoadStampTargetRequest} message LoadStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadStampTargetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.needToPromote = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("needToPromote")) + throw $util.ProtocolError("missing required 'needToPromote'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadStampTargetRequest message. + * @function verify + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadStampTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (typeof message.needToPromote !== "boolean") + return "needToPromote: boolean expected"; + return null; + }; + + /** + * Creates a LoadStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest + */ + LoadStampTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadStampTargetRequest) + return object; + let message = new $root.wm.protobuf.LoadStampTargetRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.needToPromote != null) + message.needToPromote = Boolean(object.needToPromote); + return message; + }; + + /** + * Creates a plain object from a LoadStampTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.LoadStampTargetRequest} message LoadStampTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadStampTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.needToPromote = false; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.needToPromote != null && message.hasOwnProperty("needToPromote")) + object.needToPromote = message.needToPromote; + return object; + }; + + /** + * Converts this LoadStampTargetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadStampTargetRequest + * @instance + * @returns {Object.} JSON object + */ + LoadStampTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadStampTargetRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadStampTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadStampTargetRequest"; + }; + + return LoadStampTargetRequest; + })(); + + protobuf.LoadStampTargetResponse = (function() { + + /** + * Properties of a LoadStampTargetResponse. + * @memberof wm.protobuf + * @interface ILoadStampTargetResponse + * @property {wm.protobuf.ErrorCode} error LoadStampTargetResponse error + * @property {Array.|null} [cars] LoadStampTargetResponse cars + * @property {Array.|null} [challengers] LoadStampTargetResponse challengers + */ + + /** + * Constructs a new LoadStampTargetResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadStampTargetResponse. + * @implements ILoadStampTargetResponse + * @constructor + * @param {wm.protobuf.ILoadStampTargetResponse=} [properties] Properties to set + */ + function LoadStampTargetResponse(properties) { + this.cars = []; + this.challengers = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadStampTargetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + */ + LoadStampTargetResponse.prototype.error = 0; + + /** + * LoadStampTargetResponse cars. + * @member {Array.} cars + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + */ + LoadStampTargetResponse.prototype.cars = $util.emptyArray; + + /** + * LoadStampTargetResponse challengers. + * @member {Array.} challengers + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + */ + LoadStampTargetResponse.prototype.challengers = $util.emptyArray; + + /** + * Creates a new LoadStampTargetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.ILoadStampTargetResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse instance + */ + LoadStampTargetResponse.create = function create(properties) { + return new LoadStampTargetResponse(properties); + }; + + /** + * Encodes the specified LoadStampTargetResponse message. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.ILoadStampTargetResponse} message LoadStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.StampTargetCar.encode(message.cars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.challengers != null && message.challengers.length) + for (let i = 0; i < message.challengers.length; ++i) + $root.wm.protobuf.ChallengerCar.encode(message.challengers[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.ILoadStampTargetResponse} message LoadStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadStampTargetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.StampTargetCar.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.challengers && message.challengers.length)) + message.challengers = []; + message.challengers.push($root.wm.protobuf.ChallengerCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadStampTargetResponse message. + * @function verify + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadStampTargetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.StampTargetCar.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + if (message.challengers != null && message.hasOwnProperty("challengers")) { + if (!Array.isArray(message.challengers)) + return "challengers: array expected"; + for (let i = 0; i < message.challengers.length; ++i) { + let error = $root.wm.protobuf.ChallengerCar.verify(message.challengers[i]); + if (error) + return "challengers." + error; + } + } + return null; + }; + + /** + * Creates a LoadStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse + */ + LoadStampTargetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadStampTargetResponse) + return object; + let message = new $root.wm.protobuf.LoadStampTargetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.LoadStampTargetResponse.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.LoadStampTargetResponse.cars: object expected"); + message.cars[i] = $root.wm.protobuf.StampTargetCar.fromObject(object.cars[i]); + } + } + if (object.challengers) { + if (!Array.isArray(object.challengers)) + throw TypeError(".wm.protobuf.LoadStampTargetResponse.challengers: array expected"); + message.challengers = []; + for (let i = 0; i < object.challengers.length; ++i) { + if (typeof object.challengers[i] !== "object") + throw TypeError(".wm.protobuf.LoadStampTargetResponse.challengers: object expected"); + message.challengers[i] = $root.wm.protobuf.ChallengerCar.fromObject(object.challengers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadStampTargetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.LoadStampTargetResponse} message LoadStampTargetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadStampTargetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.cars = []; + object.challengers = []; + } + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.StampTargetCar.toObject(message.cars[j], options); + } + if (message.challengers && message.challengers.length) { + object.challengers = []; + for (let j = 0; j < message.challengers.length; ++j) + object.challengers[j] = $root.wm.protobuf.ChallengerCar.toObject(message.challengers[j], options); + } + return object; + }; + + /** + * Converts this LoadStampTargetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + * @returns {Object.} JSON object + */ + LoadStampTargetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadStampTargetResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadStampTargetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadStampTargetResponse"; + }; + + return LoadStampTargetResponse; + })(); + + protobuf.LockStampTargetRequest = (function() { + + /** + * Properties of a LockStampTargetRequest. + * @memberof wm.protobuf + * @interface ILockStampTargetRequest + * @property {number} carId LockStampTargetRequest carId + * @property {Array.|null} [targetCars] LockStampTargetRequest targetCars + */ + + /** + * Constructs a new LockStampTargetRequest. + * @memberof wm.protobuf + * @classdesc Represents a LockStampTargetRequest. + * @implements ILockStampTargetRequest + * @constructor + * @param {wm.protobuf.ILockStampTargetRequest=} [properties] Properties to set + */ + function LockStampTargetRequest(properties) { + this.targetCars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LockStampTargetRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LockStampTargetRequest + * @instance + */ + LockStampTargetRequest.prototype.carId = 0; + + /** + * LockStampTargetRequest targetCars. + * @member {Array.} targetCars + * @memberof wm.protobuf.LockStampTargetRequest + * @instance + */ + LockStampTargetRequest.prototype.targetCars = $util.emptyArray; + + /** + * Creates a new LockStampTargetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.ILockStampTargetRequest=} [properties] Properties to set + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest instance + */ + LockStampTargetRequest.create = function create(properties) { + return new LockStampTargetRequest(properties); + }; + + /** + * Encodes the specified LockStampTargetRequest message. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.ILockStampTargetRequest} message LockStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.targetCars != null && message.targetCars.length) + for (let i = 0; i < message.targetCars.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetCars[i]); + return writer; + }; + + /** + * Encodes the specified LockStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.ILockStampTargetRequest} message LockStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LockStampTargetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + if (!(message.targetCars && message.targetCars.length)) + message.targetCars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targetCars.push(reader.uint32()); + } else + message.targetCars.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LockStampTargetRequest message. + * @function verify + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LockStampTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.targetCars != null && message.hasOwnProperty("targetCars")) { + if (!Array.isArray(message.targetCars)) + return "targetCars: array expected"; + for (let i = 0; i < message.targetCars.length; ++i) + if (!$util.isInteger(message.targetCars[i])) + return "targetCars: integer[] expected"; + } + return null; + }; + + /** + * Creates a LockStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest + */ + LockStampTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LockStampTargetRequest) + return object; + let message = new $root.wm.protobuf.LockStampTargetRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.targetCars) { + if (!Array.isArray(object.targetCars)) + throw TypeError(".wm.protobuf.LockStampTargetRequest.targetCars: array expected"); + message.targetCars = []; + for (let i = 0; i < object.targetCars.length; ++i) + message.targetCars[i] = object.targetCars[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LockStampTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.LockStampTargetRequest} message LockStampTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LockStampTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.targetCars = []; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.targetCars && message.targetCars.length) { + object.targetCars = []; + for (let j = 0; j < message.targetCars.length; ++j) + object.targetCars[j] = message.targetCars[j]; + } + return object; + }; + + /** + * Converts this LockStampTargetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LockStampTargetRequest + * @instance + * @returns {Object.} JSON object + */ + LockStampTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LockStampTargetRequest + * @function getTypeUrl + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LockStampTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LockStampTargetRequest"; + }; + + return LockStampTargetRequest; + })(); + + protobuf.LockStampTargetResponse = (function() { + + /** + * Properties of a LockStampTargetResponse. + * @memberof wm.protobuf + * @interface ILockStampTargetResponse + * @property {wm.protobuf.ErrorCode} error LockStampTargetResponse error + */ + + /** + * Constructs a new LockStampTargetResponse. + * @memberof wm.protobuf + * @classdesc Represents a LockStampTargetResponse. + * @implements ILockStampTargetResponse + * @constructor + * @param {wm.protobuf.ILockStampTargetResponse=} [properties] Properties to set + */ + function LockStampTargetResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LockStampTargetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LockStampTargetResponse + * @instance + */ + LockStampTargetResponse.prototype.error = 0; + + /** + * Creates a new LockStampTargetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.ILockStampTargetResponse=} [properties] Properties to set + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse instance + */ + LockStampTargetResponse.create = function create(properties) { + return new LockStampTargetResponse(properties); + }; + + /** + * Encodes the specified LockStampTargetResponse message. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.ILockStampTargetResponse} message LockStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified LockStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.ILockStampTargetResponse} message LockStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LockStampTargetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LockStampTargetResponse message. + * @function verify + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LockStampTargetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a LockStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse + */ + LockStampTargetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LockStampTargetResponse) + return object; + let message = new $root.wm.protobuf.LockStampTargetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a LockStampTargetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.LockStampTargetResponse} message LockStampTargetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LockStampTargetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this LockStampTargetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LockStampTargetResponse + * @instance + * @returns {Object.} JSON object + */ + LockStampTargetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LockStampTargetResponse + * @function getTypeUrl + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LockStampTargetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LockStampTargetResponse"; + }; + + return LockStampTargetResponse; + })(); + + protobuf.LoadGhostCompetitionInfoRequest = (function() { + + /** + * Properties of a LoadGhostCompetitionInfoRequest. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionInfoRequest + * @property {number} carId LoadGhostCompetitionInfoRequest carId + * @property {number} competitionId LoadGhostCompetitionInfoRequest competitionId + */ + + /** + * Constructs a new LoadGhostCompetitionInfoRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionInfoRequest. + * @implements ILoadGhostCompetitionInfoRequest + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest=} [properties] Properties to set + */ + function LoadGhostCompetitionInfoRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionInfoRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @instance + */ + LoadGhostCompetitionInfoRequest.prototype.carId = 0; + + /** + * LoadGhostCompetitionInfoRequest competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @instance + */ + LoadGhostCompetitionInfoRequest.prototype.competitionId = 0; + + /** + * Creates a new LoadGhostCompetitionInfoRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest instance + */ + LoadGhostCompetitionInfoRequest.create = function create(properties) { + return new LoadGhostCompetitionInfoRequest(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest} message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.competitionId); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest} message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.competitionId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionInfoRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + return null; + }; + + /** + * Creates a LoadGhostCompetitionInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest + */ + LoadGhostCompetitionInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionInfoRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionInfoRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.LoadGhostCompetitionInfoRequest} message LoadGhostCompetitionInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.competitionId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + return object; + }; + + /** + * Converts this LoadGhostCompetitionInfoRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionInfoRequest"; + }; + + return LoadGhostCompetitionInfoRequest; + })(); + + protobuf.LoadGhostCompetitionInfoResponse = (function() { + + /** + * Properties of a LoadGhostCompetitionInfoResponse. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionInfoResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostCompetitionInfoResponse error + * @property {number|null} [periodId] LoadGhostCompetitionInfoResponse periodId + * @property {boolean} closed LoadGhostCompetitionInfoResponse closed + * @property {number|null} [brakingPoint] LoadGhostCompetitionInfoResponse brakingPoint + * @property {boolean|null} [qualified] LoadGhostCompetitionInfoResponse qualified + * @property {Array.|null} [topResults] LoadGhostCompetitionInfoResponse topResults + * @property {number|null} [result] LoadGhostCompetitionInfoResponse result + * @property {number|null} [rank] LoadGhostCompetitionInfoResponse rank + * @property {Array.|null} [parameters1] LoadGhostCompetitionInfoResponse parameters1 + * @property {boolean|null} [parameters2] LoadGhostCompetitionInfoResponse parameters2 + */ + + /** + * Constructs a new LoadGhostCompetitionInfoResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionInfoResponse. + * @implements ILoadGhostCompetitionInfoResponse + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse=} [properties] Properties to set + */ + function LoadGhostCompetitionInfoResponse(properties) { + this.topResults = []; + this.parameters1 = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionInfoResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.error = 0; + + /** + * LoadGhostCompetitionInfoResponse periodId. + * @member {number} periodId + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.periodId = 0; + + /** + * LoadGhostCompetitionInfoResponse closed. + * @member {boolean} closed + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.closed = false; + + /** + * LoadGhostCompetitionInfoResponse brakingPoint. + * @member {number} brakingPoint + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.brakingPoint = 0; + + /** + * LoadGhostCompetitionInfoResponse qualified. + * @member {boolean} qualified + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.qualified = false; + + /** + * LoadGhostCompetitionInfoResponse topResults. + * @member {Array.} topResults + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.topResults = $util.emptyArray; + + /** + * LoadGhostCompetitionInfoResponse result. + * @member {number} result + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.result = 0; + + /** + * LoadGhostCompetitionInfoResponse rank. + * @member {number} rank + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.rank = 0; + + /** + * LoadGhostCompetitionInfoResponse parameters1. + * @member {Array.} parameters1 + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.parameters1 = $util.emptyArray; + + /** + * LoadGhostCompetitionInfoResponse parameters2. + * @member {boolean} parameters2 + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.parameters2 = false; + + /** + * Creates a new LoadGhostCompetitionInfoResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse instance + */ + LoadGhostCompetitionInfoResponse.create = function create(properties) { + return new LoadGhostCompetitionInfoResponse(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse} message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.periodId != null && Object.hasOwnProperty.call(message, "periodId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.periodId); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.closed); + if (message.brakingPoint != null && Object.hasOwnProperty.call(message, "brakingPoint")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.brakingPoint); + if (message.qualified != null && Object.hasOwnProperty.call(message, "qualified")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.qualified); + if (message.topResults != null && message.topResults.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (let i = 0; i < message.topResults.length; ++i) + writer.sint32(message.topResults[i]); + writer.ldelim(); + } + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 7, wireType 0 =*/56).sint32(message.result); + if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.rank); + if (message.parameters1 != null && message.parameters1.length) + for (let i = 0; i < message.parameters1.length; ++i) + writer.uint32(/* id 9, wireType 5 =*/77).float(message.parameters1[i]); + if (message.parameters2 != null && Object.hasOwnProperty.call(message, "parameters2")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.parameters2); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse} message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.periodId = reader.uint32(); + break; + } + case 3: { + message.closed = reader.bool(); + break; + } + case 4: { + message.brakingPoint = reader.uint32(); + break; + } + case 5: { + message.qualified = reader.bool(); + break; + } + case 6: { + if (!(message.topResults && message.topResults.length)) + message.topResults = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.topResults.push(reader.sint32()); + } else + message.topResults.push(reader.sint32()); + break; + } + case 7: { + message.result = reader.sint32(); + break; + } + case 8: { + message.rank = reader.uint32(); + break; + } + case 9: { + if (!(message.parameters1 && message.parameters1.length)) + message.parameters1 = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.parameters1.push(reader.float()); + } else + message.parameters1.push(reader.float()); + break; + } + case 10: { + message.parameters2 = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("closed")) + throw $util.ProtocolError("missing required 'closed'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionInfoResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.periodId != null && message.hasOwnProperty("periodId")) + if (!$util.isInteger(message.periodId)) + return "periodId: integer expected"; + if (typeof message.closed !== "boolean") + return "closed: boolean expected"; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + if (!$util.isInteger(message.brakingPoint)) + return "brakingPoint: integer expected"; + if (message.qualified != null && message.hasOwnProperty("qualified")) + if (typeof message.qualified !== "boolean") + return "qualified: boolean expected"; + if (message.topResults != null && message.hasOwnProperty("topResults")) { + if (!Array.isArray(message.topResults)) + return "topResults: array expected"; + for (let i = 0; i < message.topResults.length; ++i) + if (!$util.isInteger(message.topResults[i])) + return "topResults: integer[] expected"; + } + if (message.result != null && message.hasOwnProperty("result")) + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (message.rank != null && message.hasOwnProperty("rank")) + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (message.parameters1 != null && message.hasOwnProperty("parameters1")) { + if (!Array.isArray(message.parameters1)) + return "parameters1: array expected"; + for (let i = 0; i < message.parameters1.length; ++i) + if (typeof message.parameters1[i] !== "number") + return "parameters1: number[] expected"; + } + if (message.parameters2 != null && message.hasOwnProperty("parameters2")) + if (typeof message.parameters2 !== "boolean") + return "parameters2: boolean expected"; + return null; + }; + + /** + * Creates a LoadGhostCompetitionInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse + */ + LoadGhostCompetitionInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionInfoResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionInfoResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.periodId != null) + message.periodId = object.periodId >>> 0; + if (object.closed != null) + message.closed = Boolean(object.closed); + if (object.brakingPoint != null) + message.brakingPoint = object.brakingPoint >>> 0; + if (object.qualified != null) + message.qualified = Boolean(object.qualified); + if (object.topResults) { + if (!Array.isArray(object.topResults)) + throw TypeError(".wm.protobuf.LoadGhostCompetitionInfoResponse.topResults: array expected"); + message.topResults = []; + for (let i = 0; i < object.topResults.length; ++i) + message.topResults[i] = object.topResults[i] | 0; + } + if (object.result != null) + message.result = object.result | 0; + if (object.rank != null) + message.rank = object.rank >>> 0; + if (object.parameters1) { + if (!Array.isArray(object.parameters1)) + throw TypeError(".wm.protobuf.LoadGhostCompetitionInfoResponse.parameters1: array expected"); + message.parameters1 = []; + for (let i = 0; i < object.parameters1.length; ++i) + message.parameters1[i] = Number(object.parameters1[i]); + } + if (object.parameters2 != null) + message.parameters2 = Boolean(object.parameters2); + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.LoadGhostCompetitionInfoResponse} message LoadGhostCompetitionInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.topResults = []; + object.parameters1 = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.periodId = 0; + object.closed = false; + object.brakingPoint = 0; + object.qualified = false; + object.result = 0; + object.rank = 0; + object.parameters2 = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.periodId != null && message.hasOwnProperty("periodId")) + object.periodId = message.periodId; + if (message.closed != null && message.hasOwnProperty("closed")) + object.closed = message.closed; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + object.brakingPoint = message.brakingPoint; + if (message.qualified != null && message.hasOwnProperty("qualified")) + object.qualified = message.qualified; + if (message.topResults && message.topResults.length) { + object.topResults = []; + for (let j = 0; j < message.topResults.length; ++j) + object.topResults[j] = message.topResults[j]; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.parameters1 && message.parameters1.length) { + object.parameters1 = []; + for (let j = 0; j < message.parameters1.length; ++j) + object.parameters1[j] = options.json && !isFinite(message.parameters1[j]) ? String(message.parameters1[j]) : message.parameters1[j]; + } + if (message.parameters2 != null && message.hasOwnProperty("parameters2")) + object.parameters2 = message.parameters2; + return object; + }; + + /** + * Converts this LoadGhostCompetitionInfoResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionInfoResponse"; + }; + + return LoadGhostCompetitionInfoResponse; + })(); + + protobuf.LoadTimeAttackRecordRequest = (function() { + + /** + * Properties of a LoadTimeAttackRecordRequest. + * @memberof wm.protobuf + * @interface ILoadTimeAttackRecordRequest + * @property {number|null} [carId] LoadTimeAttackRecordRequest carId + * @property {number} model LoadTimeAttackRecordRequest model + * @property {number} course LoadTimeAttackRecordRequest course + */ + + /** + * Constructs a new LoadTimeAttackRecordRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadTimeAttackRecordRequest. + * @implements ILoadTimeAttackRecordRequest + * @constructor + * @param {wm.protobuf.ILoadTimeAttackRecordRequest=} [properties] Properties to set + */ + function LoadTimeAttackRecordRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTimeAttackRecordRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + */ + LoadTimeAttackRecordRequest.prototype.carId = 0; + + /** + * LoadTimeAttackRecordRequest model. + * @member {number} model + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + */ + LoadTimeAttackRecordRequest.prototype.model = 0; + + /** + * LoadTimeAttackRecordRequest course. + * @member {number} course + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + */ + LoadTimeAttackRecordRequest.prototype.course = 0; + + /** + * Creates a new LoadTimeAttackRecordRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest instance + */ + LoadTimeAttackRecordRequest.create = function create(properties) { + return new LoadTimeAttackRecordRequest(properties); + }; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordRequest} message LoadTimeAttackRecordRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.model); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.course); + return writer; + }; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordRequest} message LoadTimeAttackRecordRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTimeAttackRecordRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.model = reader.uint32(); + break; + } + case 3: { + message.course = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("model")) + throw $util.ProtocolError("missing required 'model'", { instance: message }); + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTimeAttackRecordRequest message. + * @function verify + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTimeAttackRecordRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.model)) + return "model: integer expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + return null; + }; + + /** + * Creates a LoadTimeAttackRecordRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest + */ + LoadTimeAttackRecordRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTimeAttackRecordRequest) + return object; + let message = new $root.wm.protobuf.LoadTimeAttackRecordRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.model != null) + message.model = object.model >>> 0; + if (object.course != null) + message.course = object.course >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadTimeAttackRecordRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.LoadTimeAttackRecordRequest} message LoadTimeAttackRecordRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTimeAttackRecordRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.model = 0; + object.course = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + return object; + }; + + /** + * Converts this LoadTimeAttackRecordRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + * @returns {Object.} JSON object + */ + LoadTimeAttackRecordRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTimeAttackRecordRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTimeAttackRecordRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTimeAttackRecordRequest"; + }; + + return LoadTimeAttackRecordRequest; + })(); + + protobuf.LoadTimeAttackRecordResponse = (function() { + + /** + * Properties of a LoadTimeAttackRecordResponse. + * @memberof wm.protobuf + * @interface ILoadTimeAttackRecordResponse + * @property {wm.protobuf.ErrorCode} error LoadTimeAttackRecordResponse error + * @property {Array.|null} [wholeRanking] LoadTimeAttackRecordResponse wholeRanking + * @property {Array.|null} [modelRanking] LoadTimeAttackRecordResponse modelRanking + * @property {number|null} [personalBestTime] LoadTimeAttackRecordResponse personalBestTime + * @property {number|null} [pbSection_1Time] LoadTimeAttackRecordResponse pbSection_1Time + * @property {number|null} [pbSection_2Time] LoadTimeAttackRecordResponse pbSection_2Time + * @property {number|null} [pbSection_3Time] LoadTimeAttackRecordResponse pbSection_3Time + * @property {number|null} [pbSection_4Time] LoadTimeAttackRecordResponse pbSection_4Time + * @property {number|null} [pbSection_5Time] LoadTimeAttackRecordResponse pbSection_5Time + * @property {number|null} [pbSection_6Time] LoadTimeAttackRecordResponse pbSection_6Time + * @property {number|null} [pbSection_7Time] LoadTimeAttackRecordResponse pbSection_7Time + */ + + /** + * Constructs a new LoadTimeAttackRecordResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadTimeAttackRecordResponse. + * @implements ILoadTimeAttackRecordResponse + * @constructor + * @param {wm.protobuf.ILoadTimeAttackRecordResponse=} [properties] Properties to set + */ + function LoadTimeAttackRecordResponse(properties) { + this.wholeRanking = []; + this.modelRanking = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTimeAttackRecordResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.error = 0; + + /** + * LoadTimeAttackRecordResponse wholeRanking. + * @member {Array.} wholeRanking + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.wholeRanking = $util.emptyArray; + + /** + * LoadTimeAttackRecordResponse modelRanking. + * @member {Array.} modelRanking + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.modelRanking = $util.emptyArray; + + /** + * LoadTimeAttackRecordResponse personalBestTime. + * @member {number} personalBestTime + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.personalBestTime = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_1Time. + * @member {number} pbSection_1Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_1Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_2Time. + * @member {number} pbSection_2Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_2Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_3Time. + * @member {number} pbSection_3Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_3Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_4Time. + * @member {number} pbSection_4Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_4Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_5Time. + * @member {number} pbSection_5Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_5Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_6Time. + * @member {number} pbSection_6Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_6Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_7Time. + * @member {number} pbSection_7Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_7Time = 0; + + /** + * Creates a new LoadTimeAttackRecordResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse instance + */ + LoadTimeAttackRecordResponse.create = function create(properties) { + return new LoadTimeAttackRecordResponse(properties); + }; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordResponse} message LoadTimeAttackRecordResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.wholeRanking != null && message.wholeRanking.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (let i = 0; i < message.wholeRanking.length; ++i) + writer.uint32(message.wholeRanking[i]); + writer.ldelim(); + } + if (message.modelRanking != null && message.modelRanking.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (let i = 0; i < message.modelRanking.length; ++i) + writer.uint32(message.modelRanking[i]); + writer.ldelim(); + } + if (message.personalBestTime != null && Object.hasOwnProperty.call(message, "personalBestTime")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.personalBestTime); + if (message.pbSection_1Time != null && Object.hasOwnProperty.call(message, "pbSection_1Time")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.pbSection_1Time); + if (message.pbSection_2Time != null && Object.hasOwnProperty.call(message, "pbSection_2Time")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.pbSection_2Time); + if (message.pbSection_3Time != null && Object.hasOwnProperty.call(message, "pbSection_3Time")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.pbSection_3Time); + if (message.pbSection_4Time != null && Object.hasOwnProperty.call(message, "pbSection_4Time")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.pbSection_4Time); + if (message.pbSection_5Time != null && Object.hasOwnProperty.call(message, "pbSection_5Time")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.pbSection_5Time); + if (message.pbSection_6Time != null && Object.hasOwnProperty.call(message, "pbSection_6Time")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.pbSection_6Time); + if (message.pbSection_7Time != null && Object.hasOwnProperty.call(message, "pbSection_7Time")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.pbSection_7Time); + return writer; + }; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordResponse} message LoadTimeAttackRecordResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTimeAttackRecordResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.wholeRanking && message.wholeRanking.length)) + message.wholeRanking = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.wholeRanking.push(reader.uint32()); + } else + message.wholeRanking.push(reader.uint32()); + break; + } + case 3: { + if (!(message.modelRanking && message.modelRanking.length)) + message.modelRanking = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.modelRanking.push(reader.uint32()); + } else + message.modelRanking.push(reader.uint32()); + break; + } + case 4: { + message.personalBestTime = reader.uint32(); + break; + } + case 5: { + message.pbSection_1Time = reader.uint32(); + break; + } + case 6: { + message.pbSection_2Time = reader.uint32(); + break; + } + case 7: { + message.pbSection_3Time = reader.uint32(); + break; + } + case 8: { + message.pbSection_4Time = reader.uint32(); + break; + } + case 9: { + message.pbSection_5Time = reader.uint32(); + break; + } + case 10: { + message.pbSection_6Time = reader.uint32(); + break; + } + case 11: { + message.pbSection_7Time = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTimeAttackRecordResponse message. + * @function verify + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTimeAttackRecordResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.wholeRanking != null && message.hasOwnProperty("wholeRanking")) { + if (!Array.isArray(message.wholeRanking)) + return "wholeRanking: array expected"; + for (let i = 0; i < message.wholeRanking.length; ++i) + if (!$util.isInteger(message.wholeRanking[i])) + return "wholeRanking: integer[] expected"; + } + if (message.modelRanking != null && message.hasOwnProperty("modelRanking")) { + if (!Array.isArray(message.modelRanking)) + return "modelRanking: array expected"; + for (let i = 0; i < message.modelRanking.length; ++i) + if (!$util.isInteger(message.modelRanking[i])) + return "modelRanking: integer[] expected"; + } + if (message.personalBestTime != null && message.hasOwnProperty("personalBestTime")) + if (!$util.isInteger(message.personalBestTime)) + return "personalBestTime: integer expected"; + if (message.pbSection_1Time != null && message.hasOwnProperty("pbSection_1Time")) + if (!$util.isInteger(message.pbSection_1Time)) + return "pbSection_1Time: integer expected"; + if (message.pbSection_2Time != null && message.hasOwnProperty("pbSection_2Time")) + if (!$util.isInteger(message.pbSection_2Time)) + return "pbSection_2Time: integer expected"; + if (message.pbSection_3Time != null && message.hasOwnProperty("pbSection_3Time")) + if (!$util.isInteger(message.pbSection_3Time)) + return "pbSection_3Time: integer expected"; + if (message.pbSection_4Time != null && message.hasOwnProperty("pbSection_4Time")) + if (!$util.isInteger(message.pbSection_4Time)) + return "pbSection_4Time: integer expected"; + if (message.pbSection_5Time != null && message.hasOwnProperty("pbSection_5Time")) + if (!$util.isInteger(message.pbSection_5Time)) + return "pbSection_5Time: integer expected"; + if (message.pbSection_6Time != null && message.hasOwnProperty("pbSection_6Time")) + if (!$util.isInteger(message.pbSection_6Time)) + return "pbSection_6Time: integer expected"; + if (message.pbSection_7Time != null && message.hasOwnProperty("pbSection_7Time")) + if (!$util.isInteger(message.pbSection_7Time)) + return "pbSection_7Time: integer expected"; + return null; + }; + + /** + * Creates a LoadTimeAttackRecordResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse + */ + LoadTimeAttackRecordResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTimeAttackRecordResponse) + return object; + let message = new $root.wm.protobuf.LoadTimeAttackRecordResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.wholeRanking) { + if (!Array.isArray(object.wholeRanking)) + throw TypeError(".wm.protobuf.LoadTimeAttackRecordResponse.wholeRanking: array expected"); + message.wholeRanking = []; + for (let i = 0; i < object.wholeRanking.length; ++i) + message.wholeRanking[i] = object.wholeRanking[i] >>> 0; + } + if (object.modelRanking) { + if (!Array.isArray(object.modelRanking)) + throw TypeError(".wm.protobuf.LoadTimeAttackRecordResponse.modelRanking: array expected"); + message.modelRanking = []; + for (let i = 0; i < object.modelRanking.length; ++i) + message.modelRanking[i] = object.modelRanking[i] >>> 0; + } + if (object.personalBestTime != null) + message.personalBestTime = object.personalBestTime >>> 0; + if (object.pbSection_1Time != null) + message.pbSection_1Time = object.pbSection_1Time >>> 0; + if (object.pbSection_2Time != null) + message.pbSection_2Time = object.pbSection_2Time >>> 0; + if (object.pbSection_3Time != null) + message.pbSection_3Time = object.pbSection_3Time >>> 0; + if (object.pbSection_4Time != null) + message.pbSection_4Time = object.pbSection_4Time >>> 0; + if (object.pbSection_5Time != null) + message.pbSection_5Time = object.pbSection_5Time >>> 0; + if (object.pbSection_6Time != null) + message.pbSection_6Time = object.pbSection_6Time >>> 0; + if (object.pbSection_7Time != null) + message.pbSection_7Time = object.pbSection_7Time >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadTimeAttackRecordResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.LoadTimeAttackRecordResponse} message LoadTimeAttackRecordResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTimeAttackRecordResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.wholeRanking = []; + object.modelRanking = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.personalBestTime = 0; + object.pbSection_1Time = 0; + object.pbSection_2Time = 0; + object.pbSection_3Time = 0; + object.pbSection_4Time = 0; + object.pbSection_5Time = 0; + object.pbSection_6Time = 0; + object.pbSection_7Time = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.wholeRanking && message.wholeRanking.length) { + object.wholeRanking = []; + for (let j = 0; j < message.wholeRanking.length; ++j) + object.wholeRanking[j] = message.wholeRanking[j]; + } + if (message.modelRanking && message.modelRanking.length) { + object.modelRanking = []; + for (let j = 0; j < message.modelRanking.length; ++j) + object.modelRanking[j] = message.modelRanking[j]; + } + if (message.personalBestTime != null && message.hasOwnProperty("personalBestTime")) + object.personalBestTime = message.personalBestTime; + if (message.pbSection_1Time != null && message.hasOwnProperty("pbSection_1Time")) + object.pbSection_1Time = message.pbSection_1Time; + if (message.pbSection_2Time != null && message.hasOwnProperty("pbSection_2Time")) + object.pbSection_2Time = message.pbSection_2Time; + if (message.pbSection_3Time != null && message.hasOwnProperty("pbSection_3Time")) + object.pbSection_3Time = message.pbSection_3Time; + if (message.pbSection_4Time != null && message.hasOwnProperty("pbSection_4Time")) + object.pbSection_4Time = message.pbSection_4Time; + if (message.pbSection_5Time != null && message.hasOwnProperty("pbSection_5Time")) + object.pbSection_5Time = message.pbSection_5Time; + if (message.pbSection_6Time != null && message.hasOwnProperty("pbSection_6Time")) + object.pbSection_6Time = message.pbSection_6Time; + if (message.pbSection_7Time != null && message.hasOwnProperty("pbSection_7Time")) + object.pbSection_7Time = message.pbSection_7Time; + return object; + }; + + /** + * Converts this LoadTimeAttackRecordResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + * @returns {Object.} JSON object + */ + LoadTimeAttackRecordResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTimeAttackRecordResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTimeAttackRecordResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTimeAttackRecordResponse"; + }; + + return LoadTimeAttackRecordResponse; + })(); + + protobuf.SaveTerminalResultRequest = (function() { + + /** + * Properties of a SaveTerminalResultRequest. + * @memberof wm.protobuf + * @interface ISaveTerminalResultRequest + * @property {number} userId SaveTerminalResultRequest userId + * @property {number} timestamp SaveTerminalResultRequest timestamp + * @property {Array.|null} [carOrder] SaveTerminalResultRequest carOrder + * @property {Array.|null} [confirmedTutorials] SaveTerminalResultRequest confirmedTutorials + * @property {boolean|null} [garageMenuEntered] SaveTerminalResultRequest garageMenuEntered + */ + + /** + * Constructs a new SaveTerminalResultRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveTerminalResultRequest. + * @implements ISaveTerminalResultRequest + * @constructor + * @param {wm.protobuf.ISaveTerminalResultRequest=} [properties] Properties to set + */ + function SaveTerminalResultRequest(properties) { + this.carOrder = []; + this.confirmedTutorials = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveTerminalResultRequest userId. + * @member {number} userId + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.userId = 0; + + /** + * SaveTerminalResultRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.timestamp = 0; + + /** + * SaveTerminalResultRequest carOrder. + * @member {Array.} carOrder + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.carOrder = $util.emptyArray; + + /** + * SaveTerminalResultRequest confirmedTutorials. + * @member {Array.} confirmedTutorials + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.confirmedTutorials = $util.emptyArray; + + /** + * SaveTerminalResultRequest garageMenuEntered. + * @member {boolean} garageMenuEntered + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.garageMenuEntered = false; + + /** + * Creates a new SaveTerminalResultRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.ISaveTerminalResultRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest instance + */ + SaveTerminalResultRequest.create = function create(properties) { + return new SaveTerminalResultRequest(properties); + }; + + /** + * Encodes the specified SaveTerminalResultRequest message. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.ISaveTerminalResultRequest} message SaveTerminalResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.timestamp); + if (message.carOrder != null && message.carOrder.length) + for (let i = 0; i < message.carOrder.length; ++i) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.carOrder[i]); + if (message.confirmedTutorials != null && message.confirmedTutorials.length) + for (let i = 0; i < message.confirmedTutorials.length; ++i) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.confirmedTutorials[i]); + if (message.garageMenuEntered != null && Object.hasOwnProperty.call(message, "garageMenuEntered")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.garageMenuEntered); + return writer; + }; + + /** + * Encodes the specified SaveTerminalResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.ISaveTerminalResultRequest} message SaveTerminalResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveTerminalResultRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.timestamp = reader.uint32(); + break; + } + case 3: { + if (!(message.carOrder && message.carOrder.length)) + message.carOrder = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.carOrder.push(reader.uint32()); + } else + message.carOrder.push(reader.uint32()); + break; + } + case 5: { + if (!(message.confirmedTutorials && message.confirmedTutorials.length)) + message.confirmedTutorials = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.confirmedTutorials.push(reader.int32()); + } else + message.confirmedTutorials.push(reader.int32()); + break; + } + case 8: { + message.garageMenuEntered = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveTerminalResultRequest message. + * @function verify + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveTerminalResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (message.carOrder != null && message.hasOwnProperty("carOrder")) { + if (!Array.isArray(message.carOrder)) + return "carOrder: array expected"; + for (let i = 0; i < message.carOrder.length; ++i) + if (!$util.isInteger(message.carOrder[i])) + return "carOrder: integer[] expected"; + } + if (message.confirmedTutorials != null && message.hasOwnProperty("confirmedTutorials")) { + if (!Array.isArray(message.confirmedTutorials)) + return "confirmedTutorials: array expected"; + for (let i = 0; i < message.confirmedTutorials.length; ++i) + switch (message.confirmedTutorials[i]) { + default: + return "confirmedTutorials: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + break; + } + } + if (message.garageMenuEntered != null && message.hasOwnProperty("garageMenuEntered")) + if (typeof message.garageMenuEntered !== "boolean") + return "garageMenuEntered: boolean expected"; + return null; + }; + + /** + * Creates a SaveTerminalResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest + */ + SaveTerminalResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveTerminalResultRequest) + return object; + let message = new $root.wm.protobuf.SaveTerminalResultRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.carOrder) { + if (!Array.isArray(object.carOrder)) + throw TypeError(".wm.protobuf.SaveTerminalResultRequest.carOrder: array expected"); + message.carOrder = []; + for (let i = 0; i < object.carOrder.length; ++i) + message.carOrder[i] = object.carOrder[i] >>> 0; + } + if (object.confirmedTutorials) { + if (!Array.isArray(object.confirmedTutorials)) + throw TypeError(".wm.protobuf.SaveTerminalResultRequest.confirmedTutorials: array expected"); + message.confirmedTutorials = []; + for (let i = 0; i < object.confirmedTutorials.length; ++i) + switch (object.confirmedTutorials[i]) { + default: + case "TUTORIAL_ID_STORY": + case 0: + message.confirmedTutorials[i] = 0; + break; + case "TUTORIAL_ID_TIME_ATTACK": + case 1: + message.confirmedTutorials[i] = 1; + break; + case "TUTORIAL_ID_GHOST": + case 2: + message.confirmedTutorials[i] = 2; + break; + case "TUTORIAL_ID_GHOST_CHALLENGE": + case 3: + message.confirmedTutorials[i] = 3; + break; + case "TUTORIAL_ID_GHOST_LEVEL": + case 4: + message.confirmedTutorials[i] = 4; + break; + case "TUTORIAL_ID_UNUSED_5": + case 5: + message.confirmedTutorials[i] = 5; + break; + case "TUTORIAL_ID_GHOST_SEARCH": + case 6: + message.confirmedTutorials[i] = 6; + break; + case "TUTORIAL_ID_GHOST_COMPETITION": + case 7: + message.confirmedTutorials[i] = 7; + break; + case "TUTORIAL_ID_HP600_CARD": + case 8: + message.confirmedTutorials[i] = 8; + break; + case "TUTORIAL_ID_UNUSED_9": + case 9: + message.confirmedTutorials[i] = 9; + break; + case "TUTORIAL_ID_COMPETITION_QUALIFIED": + case 10: + message.confirmedTutorials[i] = 10; + break; + case "TUTORIAL_ID_COMPETITION_TERMINAL": + case 11: + message.confirmedTutorials[i] = 11; + break; + case "TUTORIAL_ID_COMPETITION_NOTICE": + case 12: + message.confirmedTutorials[i] = 12; + break; + case "TUTORIAL_ID_COMPETITION_FINISHED": + case 13: + message.confirmedTutorials[i] = 13; + break; + case "TUTORIAL_ID_UNUSED_14": + case 14: + message.confirmedTutorials[i] = 14; + break; + case "TUTORIAL_ID_UNUSED_15": + case 15: + message.confirmedTutorials[i] = 15; + break; + case "TUTORIAL_ID_UNUSED_16": + case 16: + message.confirmedTutorials[i] = 16; + break; + case "TUTORIAL_ID_UNUSED_17": + case 17: + message.confirmedTutorials[i] = 17; + break; + case "TUTORIAL_ID_UNUSED_18": + case 18: + message.confirmedTutorials[i] = 18; + break; + case "TUTORIAL_ID_UNUSED_19": + case 19: + message.confirmedTutorials[i] = 19; + break; + case "TUTORIAL_ID_GHOST_STAMP": + case 20: + message.confirmedTutorials[i] = 20; + break; + case "TUTORIAL_ID_GHOST_STAMP_DECLINED": + case 21: + message.confirmedTutorials[i] = 21; + break; + case "TUTORIAL_ID_GHOST_STAMP_FRIENDS": + case 22: + message.confirmedTutorials[i] = 22; + break; + case "TUTORIAL_ID_TERMINAL_SCRATCH": + case 23: + message.confirmedTutorials[i] = 23; + break; + case "TUTORIAL_ID_TURN_SCRATCH_SHEET": + case 24: + message.confirmedTutorials[i] = 24; + break; + case "TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN": + case 25: + message.confirmedTutorials[i] = 25; + break; + case "TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE": + case 26: + message.confirmedTutorials[i] = 26; + break; + case "TUTORIAL_ID_VS_CONTINUE_TICKET": + case 27: + message.confirmedTutorials[i] = 27; + break; + case "TUTORIAL_ID_UNUSED_28": + case 28: + message.confirmedTutorials[i] = 28; + break; + case "TUTORIAL_ID_UNUSED_29": + case 29: + message.confirmedTutorials[i] = 29; + break; + case "TUTORIAL_ID_UNUSED_30": + case 30: + message.confirmedTutorials[i] = 30; + break; + case "TUTORIAL_ID_DRESS_UP": + case 31: + message.confirmedTutorials[i] = 31; + break; + case "TUTORIAL_ID_MULTI_GHOST": + case 32: + message.confirmedTutorials[i] = 32; + break; + case "TUTORIAL_ID_STORY_NEW_FEATURE": + case 33: + message.confirmedTutorials[i] = 33; + break; + case "TUTORIAL_ID_GHOST_NEW_FEATURE": + case 34: + message.confirmedTutorials[i] = 34; + break; + case "TUTORIAL_ID_GHOST_REGION_MAP": + case 35: + message.confirmedTutorials[i] = 35; + break; + } + } + if (object.garageMenuEntered != null) + message.garageMenuEntered = Boolean(object.garageMenuEntered); + return message; + }; + + /** + * Creates a plain object from a SaveTerminalResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.SaveTerminalResultRequest} message SaveTerminalResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveTerminalResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.carOrder = []; + object.confirmedTutorials = []; + } + if (options.defaults) { + object.userId = 0; + object.timestamp = 0; + object.garageMenuEntered = false; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + if (message.carOrder && message.carOrder.length) { + object.carOrder = []; + for (let j = 0; j < message.carOrder.length; ++j) + object.carOrder[j] = message.carOrder[j]; + } + if (message.confirmedTutorials && message.confirmedTutorials.length) { + object.confirmedTutorials = []; + for (let j = 0; j < message.confirmedTutorials.length; ++j) + object.confirmedTutorials[j] = options.enums === String ? $root.wm.protobuf.TutorialType[message.confirmedTutorials[j]] : message.confirmedTutorials[j]; + } + if (message.garageMenuEntered != null && message.hasOwnProperty("garageMenuEntered")) + object.garageMenuEntered = message.garageMenuEntered; + return object; + }; + + /** + * Converts this SaveTerminalResultRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + * @returns {Object.} JSON object + */ + SaveTerminalResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveTerminalResultRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveTerminalResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveTerminalResultRequest"; + }; + + return SaveTerminalResultRequest; + })(); + + protobuf.SaveTerminalResultResponse = (function() { + + /** + * Properties of a SaveTerminalResultResponse. + * @memberof wm.protobuf + * @interface ISaveTerminalResultResponse + * @property {wm.protobuf.ErrorCode} error SaveTerminalResultResponse error + */ + + /** + * Constructs a new SaveTerminalResultResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveTerminalResultResponse. + * @implements ISaveTerminalResultResponse + * @constructor + * @param {wm.protobuf.ISaveTerminalResultResponse=} [properties] Properties to set + */ + function SaveTerminalResultResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveTerminalResultResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveTerminalResultResponse + * @instance + */ + SaveTerminalResultResponse.prototype.error = 0; + + /** + * Creates a new SaveTerminalResultResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.ISaveTerminalResultResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse instance + */ + SaveTerminalResultResponse.create = function create(properties) { + return new SaveTerminalResultResponse(properties); + }; + + /** + * Encodes the specified SaveTerminalResultResponse message. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.ISaveTerminalResultResponse} message SaveTerminalResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveTerminalResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.ISaveTerminalResultResponse} message SaveTerminalResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveTerminalResultResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveTerminalResultResponse message. + * @function verify + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveTerminalResultResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveTerminalResultResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse + */ + SaveTerminalResultResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveTerminalResultResponse) + return object; + let message = new $root.wm.protobuf.SaveTerminalResultResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveTerminalResultResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.SaveTerminalResultResponse} message SaveTerminalResultResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveTerminalResultResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveTerminalResultResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveTerminalResultResponse + * @instance + * @returns {Object.} JSON object + */ + SaveTerminalResultResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveTerminalResultResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveTerminalResultResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveTerminalResultResponse"; + }; + + return SaveTerminalResultResponse; + })(); + + protobuf.PingRequest = (function() { + + /** + * Properties of a PingRequest. + * @memberof wm.protobuf + * @interface IPingRequest + * @property {number|null} [ping] PingRequest ping + */ + + /** + * Constructs a new PingRequest. + * @memberof wm.protobuf + * @classdesc Represents a PingRequest. + * @implements IPingRequest + * @constructor + * @param {wm.protobuf.IPingRequest=} [properties] Properties to set + */ + function PingRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PingRequest ping. + * @member {number} ping + * @memberof wm.protobuf.PingRequest + * @instance + */ + PingRequest.prototype.ping = 0; + + /** + * Creates a new PingRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.IPingRequest=} [properties] Properties to set + * @returns {wm.protobuf.PingRequest} PingRequest instance + */ + PingRequest.create = function create(properties) { + return new PingRequest(properties); + }; + + /** + * Encodes the specified PingRequest message. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.IPingRequest} message PingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ping != null && Object.hasOwnProperty.call(message, "ping")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.ping); + return writer; + }; + + /** + * Encodes the specified PingRequest message, length delimited. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.IPingRequest} message PingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PingRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PingRequest} PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PingRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ping = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PingRequest} PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PingRequest message. + * @function verify + * @memberof wm.protobuf.PingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ping != null && message.hasOwnProperty("ping")) + if (!$util.isInteger(message.ping)) + return "ping: integer expected"; + return null; + }; + + /** + * Creates a PingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PingRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PingRequest} PingRequest + */ + PingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PingRequest) + return object; + let message = new $root.wm.protobuf.PingRequest(); + if (object.ping != null) + message.ping = object.ping >>> 0; + return message; + }; + + /** + * Creates a plain object from a PingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.PingRequest} message PingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.ping = 0; + if (message.ping != null && message.hasOwnProperty("ping")) + object.ping = message.ping; + return object; + }; + + /** + * Converts this PingRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.PingRequest + * @instance + * @returns {Object.} JSON object + */ + PingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PingRequest + * @function getTypeUrl + * @memberof wm.protobuf.PingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PingRequest"; + }; + + return PingRequest; + })(); + + protobuf.PingResponse = (function() { + + /** + * Properties of a PingResponse. + * @memberof wm.protobuf + * @interface IPingResponse + * @property {wm.protobuf.ErrorCode} error PingResponse error + * @property {number} pong PingResponse pong + */ + + /** + * Constructs a new PingResponse. + * @memberof wm.protobuf + * @classdesc Represents a PingResponse. + * @implements IPingResponse + * @constructor + * @param {wm.protobuf.IPingResponse=} [properties] Properties to set + */ + function PingResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PingResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.PingResponse + * @instance + */ + PingResponse.prototype.error = 0; + + /** + * PingResponse pong. + * @member {number} pong + * @memberof wm.protobuf.PingResponse + * @instance + */ + PingResponse.prototype.pong = 0; + + /** + * Creates a new PingResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.IPingResponse=} [properties] Properties to set + * @returns {wm.protobuf.PingResponse} PingResponse instance + */ + PingResponse.create = function create(properties) { + return new PingResponse(properties); + }; + + /** + * Encodes the specified PingResponse message. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.IPingResponse} message PingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.pong); + return writer; + }; + + /** + * Encodes the specified PingResponse message, length delimited. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.IPingResponse} message PingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PingResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PingResponse} PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PingResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.pong = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("pong")) + throw $util.ProtocolError("missing required 'pong'", { instance: message }); + return message; + }; + + /** + * Decodes a PingResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PingResponse} PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PingResponse message. + * @function verify + * @memberof wm.protobuf.PingResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PingResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.pong)) + return "pong: integer expected"; + return null; + }; + + /** + * Creates a PingResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PingResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PingResponse} PingResponse + */ + PingResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PingResponse) + return object; + let message = new $root.wm.protobuf.PingResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.pong != null) + message.pong = object.pong >>> 0; + return message; + }; + + /** + * Creates a plain object from a PingResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.PingResponse} message PingResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PingResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.pong = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.pong != null && message.hasOwnProperty("pong")) + object.pong = message.pong; + return object; + }; + + /** + * Converts this PingResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.PingResponse + * @instance + * @returns {Object.} JSON object + */ + PingResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PingResponse + * @function getTypeUrl + * @memberof wm.protobuf.PingResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PingResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PingResponse"; + }; + + return PingResponse; + })(); + + protobuf.LoadTerminalInformationRequest = (function() { + + /** + * Properties of a LoadTerminalInformationRequest. + * @memberof wm.protobuf + * @interface ILoadTerminalInformationRequest + * @property {number} userId LoadTerminalInformationRequest userId + */ + + /** + * Constructs a new LoadTerminalInformationRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadTerminalInformationRequest. + * @implements ILoadTerminalInformationRequest + * @constructor + * @param {wm.protobuf.ILoadTerminalInformationRequest=} [properties] Properties to set + */ + function LoadTerminalInformationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTerminalInformationRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @instance + */ + LoadTerminalInformationRequest.prototype.userId = 0; + + /** + * Creates a new LoadTerminalInformationRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.ILoadTerminalInformationRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest instance + */ + LoadTerminalInformationRequest.create = function create(properties) { + return new LoadTerminalInformationRequest(properties); + }; + + /** + * Encodes the specified LoadTerminalInformationRequest message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.ILoadTerminalInformationRequest} message LoadTerminalInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadTerminalInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.ILoadTerminalInformationRequest} message LoadTerminalInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTerminalInformationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTerminalInformationRequest message. + * @function verify + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTerminalInformationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadTerminalInformationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest + */ + LoadTerminalInformationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTerminalInformationRequest) + return object; + let message = new $root.wm.protobuf.LoadTerminalInformationRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadTerminalInformationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.LoadTerminalInformationRequest} message LoadTerminalInformationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTerminalInformationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadTerminalInformationRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @instance + * @returns {Object.} JSON object + */ + LoadTerminalInformationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTerminalInformationRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTerminalInformationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTerminalInformationRequest"; + }; + + return LoadTerminalInformationRequest; + })(); + + protobuf.LoadTerminalInformationResponse = (function() { + + /** + * Properties of a LoadTerminalInformationResponse. + * @memberof wm.protobuf + * @interface ILoadTerminalInformationResponse + * @property {wm.protobuf.ErrorCode} error LoadTerminalInformationResponse error + * @property {boolean} prizeReceivable LoadTerminalInformationResponse prizeReceivable + * @property {Array.|null} [noticeEntries] LoadTerminalInformationResponse noticeEntries + * @property {Array.|null} [noticeMessage] LoadTerminalInformationResponse noticeMessage + * @property {Array.|null} [noticeWindow] LoadTerminalInformationResponse noticeWindow + * @property {Array.|null} [noticeWindowMessage] LoadTerminalInformationResponse noticeWindowMessage + * @property {wm.protobuf.ITransferNotice} transferNotice LoadTerminalInformationResponse transferNotice + * @property {boolean} announceFeature LoadTerminalInformationResponse announceFeature + * @property {boolean} freeScratched LoadTerminalInformationResponse freeScratched + * @property {Array.|null} [restrictedModels] LoadTerminalInformationResponse restrictedModels + */ + + /** + * Constructs a new LoadTerminalInformationResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadTerminalInformationResponse. + * @implements ILoadTerminalInformationResponse + * @constructor + * @param {wm.protobuf.ILoadTerminalInformationResponse=} [properties] Properties to set + */ + function LoadTerminalInformationResponse(properties) { + this.noticeEntries = []; + this.noticeMessage = []; + this.noticeWindow = []; + this.noticeWindowMessage = []; + this.restrictedModels = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTerminalInformationResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.error = 0; + + /** + * LoadTerminalInformationResponse prizeReceivable. + * @member {boolean} prizeReceivable + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.prizeReceivable = false; + + /** + * LoadTerminalInformationResponse noticeEntries. + * @member {Array.} noticeEntries + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeEntries = $util.emptyArray; + + /** + * LoadTerminalInformationResponse noticeMessage. + * @member {Array.} noticeMessage + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeMessage = $util.emptyArray; + + /** + * LoadTerminalInformationResponse noticeWindow. + * @member {Array.} noticeWindow + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeWindow = $util.emptyArray; + + /** + * LoadTerminalInformationResponse noticeWindowMessage. + * @member {Array.} noticeWindowMessage + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeWindowMessage = $util.emptyArray; + + /** + * LoadTerminalInformationResponse transferNotice. + * @member {wm.protobuf.ITransferNotice} transferNotice + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.transferNotice = null; + + /** + * LoadTerminalInformationResponse announceFeature. + * @member {boolean} announceFeature + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.announceFeature = false; + + /** + * LoadTerminalInformationResponse freeScratched. + * @member {boolean} freeScratched + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.freeScratched = false; + + /** + * LoadTerminalInformationResponse restrictedModels. + * @member {Array.} restrictedModels + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.restrictedModels = $util.emptyArray; + + /** + * Creates a new LoadTerminalInformationResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.ILoadTerminalInformationResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse instance + */ + LoadTerminalInformationResponse.create = function create(properties) { + return new LoadTerminalInformationResponse(properties); + }; + + /** + * Encodes the specified LoadTerminalInformationResponse message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.ILoadTerminalInformationResponse} message LoadTerminalInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.restrictedModels != null && message.restrictedModels.length) + for (let i = 0; i < message.restrictedModels.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.restrictedModels[i]); + if (message.noticeEntries != null && message.noticeEntries.length) + for (let i = 0; i < message.noticeEntries.length; ++i) + $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.encode(message.noticeEntries[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.noticeMessage != null && message.noticeMessage.length) + for (let i = 0; i < message.noticeMessage.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.noticeMessage[i]); + if (message.noticeWindow != null && message.noticeWindow.length) + for (let i = 0; i < message.noticeWindow.length; ++i) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.noticeWindow[i]); + if (message.noticeWindowMessage != null && message.noticeWindowMessage.length) + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.noticeWindowMessage[i]); + $root.wm.protobuf.TransferNotice.encode(message.transferNotice, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.announceFeature); + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.prizeReceivable); + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.freeScratched); + return writer; + }; + + /** + * Encodes the specified LoadTerminalInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.ILoadTerminalInformationResponse} message LoadTerminalInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTerminalInformationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 17: { + message.prizeReceivable = reader.bool(); + break; + } + case 10: { + if (!(message.noticeEntries && message.noticeEntries.length)) + message.noticeEntries = []; + message.noticeEntries.push($root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.decode(reader, reader.uint32())); + break; + } + case 11: { + if (!(message.noticeMessage && message.noticeMessage.length)) + message.noticeMessage = []; + message.noticeMessage.push(reader.string()); + break; + } + case 12: { + if (!(message.noticeWindow && message.noticeWindow.length)) + message.noticeWindow = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.noticeWindow.push(reader.int32()); + } else + message.noticeWindow.push(reader.int32()); + break; + } + case 13: { + if (!(message.noticeWindowMessage && message.noticeWindowMessage.length)) + message.noticeWindowMessage = []; + message.noticeWindowMessage.push(reader.string()); + break; + } + case 14: { + message.transferNotice = $root.wm.protobuf.TransferNotice.decode(reader, reader.uint32()); + break; + } + case 16: { + message.announceFeature = reader.bool(); + break; + } + case 18: { + message.freeScratched = reader.bool(); + break; + } + case 2: { + if (!(message.restrictedModels && message.restrictedModels.length)) + message.restrictedModels = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedModels.push(reader.uint32()); + } else + message.restrictedModels.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("prizeReceivable")) + throw $util.ProtocolError("missing required 'prizeReceivable'", { instance: message }); + if (!message.hasOwnProperty("transferNotice")) + throw $util.ProtocolError("missing required 'transferNotice'", { instance: message }); + if (!message.hasOwnProperty("announceFeature")) + throw $util.ProtocolError("missing required 'announceFeature'", { instance: message }); + if (!message.hasOwnProperty("freeScratched")) + throw $util.ProtocolError("missing required 'freeScratched'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTerminalInformationResponse message. + * @function verify + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTerminalInformationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (typeof message.prizeReceivable !== "boolean") + return "prizeReceivable: boolean expected"; + if (message.noticeEntries != null && message.hasOwnProperty("noticeEntries")) { + if (!Array.isArray(message.noticeEntries)) + return "noticeEntries: array expected"; + for (let i = 0; i < message.noticeEntries.length; ++i) { + let error = $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify(message.noticeEntries[i]); + if (error) + return "noticeEntries." + error; + } + } + if (message.noticeMessage != null && message.hasOwnProperty("noticeMessage")) { + if (!Array.isArray(message.noticeMessage)) + return "noticeMessage: array expected"; + for (let i = 0; i < message.noticeMessage.length; ++i) + if (!$util.isString(message.noticeMessage[i])) + return "noticeMessage: string[] expected"; + } + if (message.noticeWindow != null && message.hasOwnProperty("noticeWindow")) { + if (!Array.isArray(message.noticeWindow)) + return "noticeWindow: array expected"; + for (let i = 0; i < message.noticeWindow.length; ++i) + switch (message.noticeWindow[i]) { + default: + return "noticeWindow: enum value[] expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + } + if (message.noticeWindowMessage != null && message.hasOwnProperty("noticeWindowMessage")) { + if (!Array.isArray(message.noticeWindowMessage)) + return "noticeWindowMessage: array expected"; + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + if (!$util.isString(message.noticeWindowMessage[i])) + return "noticeWindowMessage: string[] expected"; + } + { + let error = $root.wm.protobuf.TransferNotice.verify(message.transferNotice); + if (error) + return "transferNotice." + error; + } + if (typeof message.announceFeature !== "boolean") + return "announceFeature: boolean expected"; + if (typeof message.freeScratched !== "boolean") + return "freeScratched: boolean expected"; + if (message.restrictedModels != null && message.hasOwnProperty("restrictedModels")) { + if (!Array.isArray(message.restrictedModels)) + return "restrictedModels: array expected"; + for (let i = 0; i < message.restrictedModels.length; ++i) + if (!$util.isInteger(message.restrictedModels[i])) + return "restrictedModels: integer[] expected"; + } + return null; + }; + + /** + * Creates a LoadTerminalInformationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse + */ + LoadTerminalInformationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTerminalInformationResponse) + return object; + let message = new $root.wm.protobuf.LoadTerminalInformationResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.prizeReceivable != null) + message.prizeReceivable = Boolean(object.prizeReceivable); + if (object.noticeEntries) { + if (!Array.isArray(object.noticeEntries)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeEntries: array expected"); + message.noticeEntries = []; + for (let i = 0; i < object.noticeEntries.length; ++i) { + if (typeof object.noticeEntries[i] !== "object") + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeEntries: object expected"); + message.noticeEntries[i] = $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.fromObject(object.noticeEntries[i]); + } + } + if (object.noticeMessage) { + if (!Array.isArray(object.noticeMessage)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeMessage: array expected"); + message.noticeMessage = []; + for (let i = 0; i < object.noticeMessage.length; ++i) + message.noticeMessage[i] = String(object.noticeMessage[i]); + } + if (object.noticeWindow) { + if (!Array.isArray(object.noticeWindow)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeWindow: array expected"); + message.noticeWindow = []; + for (let i = 0; i < object.noticeWindow.length; ++i) + switch (object.noticeWindow[i]) { + default: + case "NOTICE_UNUSED_1": + case 1: + message.noticeWindow[i] = 1; + break; + case "NOTICE_UNUSED_2": + case 2: + message.noticeWindow[i] = 2; + break; + case "NOTICE_UNUSED_3": + case 3: + message.noticeWindow[i] = 3; + break; + case "NOTICE_UNUSED_4": + case 4: + message.noticeWindow[i] = 4; + break; + case "NOTICE_UNUSED_5": + case 5: + message.noticeWindow[i] = 5; + break; + case "NOTICE_UNUSED_6": + case 6: + message.noticeWindow[i] = 6; + break; + case "NOTICE_UNUSED_7": + case 7: + message.noticeWindow[i] = 7; + break; + case "NOTICE_UNUSED_8": + case 8: + message.noticeWindow[i] = 8; + break; + case "NOTICE_UNUSED_9": + case 9: + message.noticeWindow[i] = 9; + break; + case "NOTICE_UNUSED_10": + case 10: + message.noticeWindow[i] = 10; + break; + case "NOTICE_UNUSED_11": + case 11: + message.noticeWindow[i] = 11; + break; + case "NOTICE_UNUSED_12": + case 12: + message.noticeWindow[i] = 12; + break; + } + } + if (object.noticeWindowMessage) { + if (!Array.isArray(object.noticeWindowMessage)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeWindowMessage: array expected"); + message.noticeWindowMessage = []; + for (let i = 0; i < object.noticeWindowMessage.length; ++i) + message.noticeWindowMessage[i] = String(object.noticeWindowMessage[i]); + } + if (object.transferNotice != null) { + if (typeof object.transferNotice !== "object") + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.transferNotice: object expected"); + message.transferNotice = $root.wm.protobuf.TransferNotice.fromObject(object.transferNotice); + } + if (object.announceFeature != null) + message.announceFeature = Boolean(object.announceFeature); + if (object.freeScratched != null) + message.freeScratched = Boolean(object.freeScratched); + if (object.restrictedModels) { + if (!Array.isArray(object.restrictedModels)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.restrictedModels: array expected"); + message.restrictedModels = []; + for (let i = 0; i < object.restrictedModels.length; ++i) + message.restrictedModels[i] = object.restrictedModels[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LoadTerminalInformationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse} message LoadTerminalInformationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTerminalInformationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.restrictedModels = []; + object.noticeEntries = []; + object.noticeMessage = []; + object.noticeWindow = []; + object.noticeWindowMessage = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.transferNotice = null; + object.announceFeature = false; + object.prizeReceivable = false; + object.freeScratched = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.restrictedModels && message.restrictedModels.length) { + object.restrictedModels = []; + for (let j = 0; j < message.restrictedModels.length; ++j) + object.restrictedModels[j] = message.restrictedModels[j]; + } + if (message.noticeEntries && message.noticeEntries.length) { + object.noticeEntries = []; + for (let j = 0; j < message.noticeEntries.length; ++j) + object.noticeEntries[j] = $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.toObject(message.noticeEntries[j], options); + } + if (message.noticeMessage && message.noticeMessage.length) { + object.noticeMessage = []; + for (let j = 0; j < message.noticeMessage.length; ++j) + object.noticeMessage[j] = message.noticeMessage[j]; + } + if (message.noticeWindow && message.noticeWindow.length) { + object.noticeWindow = []; + for (let j = 0; j < message.noticeWindow.length; ++j) + object.noticeWindow[j] = options.enums === String ? $root.wm.protobuf.NoticeEntry[message.noticeWindow[j]] : message.noticeWindow[j]; + } + if (message.noticeWindowMessage && message.noticeWindowMessage.length) { + object.noticeWindowMessage = []; + for (let j = 0; j < message.noticeWindowMessage.length; ++j) + object.noticeWindowMessage[j] = message.noticeWindowMessage[j]; + } + if (message.transferNotice != null && message.hasOwnProperty("transferNotice")) + object.transferNotice = $root.wm.protobuf.TransferNotice.toObject(message.transferNotice, options); + if (message.announceFeature != null && message.hasOwnProperty("announceFeature")) + object.announceFeature = message.announceFeature; + if (message.prizeReceivable != null && message.hasOwnProperty("prizeReceivable")) + object.prizeReceivable = message.prizeReceivable; + if (message.freeScratched != null && message.hasOwnProperty("freeScratched")) + object.freeScratched = message.freeScratched; + return object; + }; + + /** + * Converts this LoadTerminalInformationResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + * @returns {Object.} JSON object + */ + LoadTerminalInformationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTerminalInformationResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTerminalInformationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTerminalInformationResponse"; + }; + + LoadTerminalInformationResponse.TerminalNotice = (function() { + + /** + * Properties of a TerminalNotice. + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @interface ITerminalNotice + * @property {wm.protobuf.NoticeEntry} noticeType TerminalNotice noticeType + * @property {string|null} [field_1] TerminalNotice field_1 + * @property {number|null} [field_2] TerminalNotice field_2 + * @property {number|null} [field_3] TerminalNotice field_3 + */ + + /** + * Constructs a new TerminalNotice. + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @classdesc Represents a TerminalNotice. + * @implements ITerminalNotice + * @constructor + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice=} [properties] Properties to set + */ + function TerminalNotice(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerminalNotice noticeType. + * @member {wm.protobuf.NoticeEntry} noticeType + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.noticeType = 1; + + /** + * TerminalNotice field_1. + * @member {string} field_1 + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.field_1 = ""; + + /** + * TerminalNotice field_2. + * @member {number} field_2 + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.field_2 = 0; + + /** + * TerminalNotice field_3. + * @member {number} field_3 + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.field_3 = 0; + + /** + * Creates a new TerminalNotice instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice=} [properties] Properties to set + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice instance + */ + TerminalNotice.create = function create(properties) { + return new TerminalNotice(properties); + }; + + /** + * Encodes the specified TerminalNotice message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice} message TerminalNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalNotice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.noticeType); + if (message.field_1 != null && Object.hasOwnProperty.call(message, "field_1")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.field_1); + if (message.field_2 != null && Object.hasOwnProperty.call(message, "field_2")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.field_2); + if (message.field_3 != null && Object.hasOwnProperty.call(message, "field_3")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.field_3); + return writer; + }; + + /** + * Encodes the specified TerminalNotice message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice} message TerminalNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalNotice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalNotice.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.noticeType = reader.int32(); + break; + } + case 2: { + message.field_1 = reader.string(); + break; + } + case 3: { + message.field_2 = reader.uint32(); + break; + } + case 4: { + message.field_3 = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("noticeType")) + throw $util.ProtocolError("missing required 'noticeType'", { instance: message }); + return message; + }; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalNotice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerminalNotice message. + * @function verify + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerminalNotice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.noticeType) { + default: + return "noticeType: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + if (message.field_1 != null && message.hasOwnProperty("field_1")) + if (!$util.isString(message.field_1)) + return "field_1: string expected"; + if (message.field_2 != null && message.hasOwnProperty("field_2")) + if (!$util.isInteger(message.field_2)) + return "field_2: integer expected"; + if (message.field_3 != null && message.hasOwnProperty("field_3")) + if (!$util.isInteger(message.field_3)) + return "field_3: integer expected"; + return null; + }; + + /** + * Creates a TerminalNotice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice + */ + TerminalNotice.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice) + return object; + let message = new $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice(); + switch (object.noticeType) { + case "NOTICE_UNUSED_1": + case 1: + message.noticeType = 1; + break; + case "NOTICE_UNUSED_2": + case 2: + message.noticeType = 2; + break; + case "NOTICE_UNUSED_3": + case 3: + message.noticeType = 3; + break; + case "NOTICE_UNUSED_4": + case 4: + message.noticeType = 4; + break; + case "NOTICE_UNUSED_5": + case 5: + message.noticeType = 5; + break; + case "NOTICE_UNUSED_6": + case 6: + message.noticeType = 6; + break; + case "NOTICE_UNUSED_7": + case 7: + message.noticeType = 7; + break; + case "NOTICE_UNUSED_8": + case 8: + message.noticeType = 8; + break; + case "NOTICE_UNUSED_9": + case 9: + message.noticeType = 9; + break; + case "NOTICE_UNUSED_10": + case 10: + message.noticeType = 10; + break; + case "NOTICE_UNUSED_11": + case 11: + message.noticeType = 11; + break; + case "NOTICE_UNUSED_12": + case 12: + message.noticeType = 12; + break; + } + if (object.field_1 != null) + message.field_1 = String(object.field_1); + if (object.field_2 != null) + message.field_2 = object.field_2 >>> 0; + if (object.field_3 != null) + message.field_3 = object.field_3 >>> 0; + return message; + }; + + /** + * Creates a plain object from a TerminalNotice message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} message TerminalNotice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerminalNotice.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.noticeType = options.enums === String ? "NOTICE_UNUSED_1" : 1; + object.field_1 = ""; + object.field_2 = 0; + object.field_3 = 0; + } + if (message.noticeType != null && message.hasOwnProperty("noticeType")) + object.noticeType = options.enums === String ? $root.wm.protobuf.NoticeEntry[message.noticeType] : message.noticeType; + if (message.field_1 != null && message.hasOwnProperty("field_1")) + object.field_1 = message.field_1; + if (message.field_2 != null && message.hasOwnProperty("field_2")) + object.field_2 = message.field_2; + if (message.field_3 != null && message.hasOwnProperty("field_3")) + object.field_3 = message.field_3; + return object; + }; + + /** + * Converts this TerminalNotice to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + * @returns {Object.} JSON object + */ + TerminalNotice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerminalNotice + * @function getTypeUrl + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerminalNotice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTerminalInformationResponse.TerminalNotice"; + }; + + return TerminalNotice; + })(); + + return LoadTerminalInformationResponse; + })(); + + protobuf.CreateUserRequest = (function() { + + /** + * Properties of a CreateUserRequest. + * @memberof wm.protobuf + * @interface ICreateUserRequest + * @property {number|null} [banapassportAmId] CreateUserRequest banapassportAmId + * @property {string|null} [cardChipId] CreateUserRequest cardChipId + * @property {string|null} [accessCode] CreateUserRequest accessCode + * @property {number|null} [cardTypeCode] CreateUserRequest cardTypeCode + * @property {number|null} [cardRegionCode] CreateUserRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] CreateUserRequest device + * @property {number} timestamp CreateUserRequest timestamp + */ + + /** + * Constructs a new CreateUserRequest. + * @memberof wm.protobuf + * @classdesc Represents a CreateUserRequest. + * @implements ICreateUserRequest + * @constructor + * @param {wm.protobuf.ICreateUserRequest=} [properties] Properties to set + */ + function CreateUserRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserRequest banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.banapassportAmId = 0; + + /** + * CreateUserRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.cardChipId = ""; + + /** + * CreateUserRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.accessCode = ""; + + /** + * CreateUserRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.cardTypeCode = 0; + + /** + * CreateUserRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.cardRegionCode = 0; + + /** + * CreateUserRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.device = 0; + + /** + * CreateUserRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.timestamp = 0; + + /** + * Creates a new CreateUserRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.ICreateUserRequest=} [properties] Properties to set + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest instance + */ + CreateUserRequest.create = function create(properties) { + return new CreateUserRequest(properties); + }; + + /** + * Encodes the specified CreateUserRequest message. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.ICreateUserRequest} message CreateUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.banapassportAmId); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.device); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified CreateUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.ICreateUserRequest} message CreateUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateUserRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.banapassportAmId = reader.uint32(); + break; + } + case 2: { + message.cardChipId = reader.string(); + break; + } + case 3: { + message.accessCode = reader.string(); + break; + } + case 4: { + message.cardTypeCode = reader.uint32(); + break; + } + case 5: { + message.cardRegionCode = reader.uint32(); + break; + } + case 6: { + message.device = reader.int32(); + break; + } + case 7: { + message.timestamp = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserRequest message. + * @function verify + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + return null; + }; + + /** + * Creates a CreateUserRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest + */ + CreateUserRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateUserRequest) + return object; + let message = new $root.wm.protobuf.CreateUserRequest(); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateUserRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.CreateUserRequest} message CreateUserRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.banapassportAmId = 0; + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.timestamp = 0; + } + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this CreateUserRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateUserRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUserRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserRequest + * @function getTypeUrl + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateUserRequest"; + }; + + return CreateUserRequest; + })(); + + protobuf.CreateUserResponse = (function() { + + /** + * Properties of a CreateUserResponse. + * @memberof wm.protobuf + * @interface ICreateUserResponse + * @property {wm.protobuf.ErrorCode} error CreateUserResponse error + * @property {string|null} [accessCode] CreateUserResponse accessCode + * @property {number|null} [banapassportAmId] CreateUserResponse banapassportAmId + * @property {number|null} [mbid] CreateUserResponse mbid + * @property {number} userId CreateUserResponse userId + */ + + /** + * Constructs a new CreateUserResponse. + * @memberof wm.protobuf + * @classdesc Represents a CreateUserResponse. + * @implements ICreateUserResponse + * @constructor + * @param {wm.protobuf.ICreateUserResponse=} [properties] Properties to set + */ + function CreateUserResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.error = 0; + + /** + * CreateUserResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.accessCode = ""; + + /** + * CreateUserResponse banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.banapassportAmId = 0; + + /** + * CreateUserResponse mbid. + * @member {number} mbid + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.mbid = 0; + + /** + * CreateUserResponse userId. + * @member {number} userId + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.userId = 0; + + /** + * Creates a new CreateUserResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.ICreateUserResponse=} [properties] Properties to set + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse instance + */ + CreateUserResponse.create = function create(properties) { + return new CreateUserResponse(properties); + }; + + /** + * Encodes the specified CreateUserResponse message. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.ICreateUserResponse} message CreateUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.banapassportAmId); + if (message.mbid != null && Object.hasOwnProperty.call(message, "mbid")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mbid); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified CreateUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.ICreateUserResponse} message CreateUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateUserResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + case 3: { + message.banapassportAmId = reader.uint32(); + break; + } + case 4: { + message.mbid = reader.uint32(); + break; + } + case 5: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserResponse message. + * @function verify + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.mbid != null && message.hasOwnProperty("mbid")) + if (!$util.isInteger(message.mbid)) + return "mbid: integer expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a CreateUserResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse + */ + CreateUserResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateUserResponse) + return object; + let message = new $root.wm.protobuf.CreateUserResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.mbid != null) + message.mbid = object.mbid >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateUserResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.CreateUserResponse} message CreateUserResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.accessCode = ""; + object.banapassportAmId = 0; + object.mbid = 0; + object.userId = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.mbid != null && message.hasOwnProperty("mbid")) + object.mbid = message.mbid; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this CreateUserResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateUserResponse + * @instance + * @returns {Object.} JSON object + */ + CreateUserResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserResponse + * @function getTypeUrl + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateUserResponse"; + }; + + return CreateUserResponse; + })(); + + protobuf.AskAccessCodeRequest = (function() { + + /** + * Properties of an AskAccessCodeRequest. + * @memberof wm.protobuf + * @interface IAskAccessCodeRequest + * @property {string} cardChipId AskAccessCodeRequest cardChipId + */ + + /** + * Constructs a new AskAccessCodeRequest. + * @memberof wm.protobuf + * @classdesc Represents an AskAccessCodeRequest. + * @implements IAskAccessCodeRequest + * @constructor + * @param {wm.protobuf.IAskAccessCodeRequest=} [properties] Properties to set + */ + function AskAccessCodeRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AskAccessCodeRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.AskAccessCodeRequest + * @instance + */ + AskAccessCodeRequest.prototype.cardChipId = ""; + + /** + * Creates a new AskAccessCodeRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.IAskAccessCodeRequest=} [properties] Properties to set + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest instance + */ + AskAccessCodeRequest.create = function create(properties) { + return new AskAccessCodeRequest(properties); + }; + + /** + * Encodes the specified AskAccessCodeRequest message. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.IAskAccessCodeRequest} message AskAccessCodeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cardChipId); + return writer; + }; + + /** + * Encodes the specified AskAccessCodeRequest message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.IAskAccessCodeRequest} message AskAccessCodeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.AskAccessCodeRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cardChipId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("cardChipId")) + throw $util.ProtocolError("missing required 'cardChipId'", { instance: message }); + return message; + }; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AskAccessCodeRequest message. + * @function verify + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AskAccessCodeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + return null; + }; + + /** + * Creates an AskAccessCodeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest + */ + AskAccessCodeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.AskAccessCodeRequest) + return object; + let message = new $root.wm.protobuf.AskAccessCodeRequest(); + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + return message; + }; + + /** + * Creates a plain object from an AskAccessCodeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.AskAccessCodeRequest} message AskAccessCodeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AskAccessCodeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.cardChipId = ""; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + return object; + }; + + /** + * Converts this AskAccessCodeRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.AskAccessCodeRequest + * @instance + * @returns {Object.} JSON object + */ + AskAccessCodeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AskAccessCodeRequest + * @function getTypeUrl + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AskAccessCodeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.AskAccessCodeRequest"; + }; + + return AskAccessCodeRequest; + })(); + + protobuf.AskAccessCodeResponse = (function() { + + /** + * Properties of an AskAccessCodeResponse. + * @memberof wm.protobuf + * @interface IAskAccessCodeResponse + * @property {wm.protobuf.ErrorCode} error AskAccessCodeResponse error + * @property {string} accessCode AskAccessCodeResponse accessCode + */ + + /** + * Constructs a new AskAccessCodeResponse. + * @memberof wm.protobuf + * @classdesc Represents an AskAccessCodeResponse. + * @implements IAskAccessCodeResponse + * @constructor + * @param {wm.protobuf.IAskAccessCodeResponse=} [properties] Properties to set + */ + function AskAccessCodeResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AskAccessCodeResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.AskAccessCodeResponse + * @instance + */ + AskAccessCodeResponse.prototype.error = 0; + + /** + * AskAccessCodeResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.AskAccessCodeResponse + * @instance + */ + AskAccessCodeResponse.prototype.accessCode = ""; + + /** + * Creates a new AskAccessCodeResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.IAskAccessCodeResponse=} [properties] Properties to set + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse instance + */ + AskAccessCodeResponse.create = function create(properties) { + return new AskAccessCodeResponse(properties); + }; + + /** + * Encodes the specified AskAccessCodeResponse message. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.IAskAccessCodeResponse} message AskAccessCodeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + return writer; + }; + + /** + * Encodes the specified AskAccessCodeResponse message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.IAskAccessCodeResponse} message AskAccessCodeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.AskAccessCodeResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("accessCode")) + throw $util.ProtocolError("missing required 'accessCode'", { instance: message }); + return message; + }; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AskAccessCodeResponse message. + * @function verify + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AskAccessCodeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + return null; + }; + + /** + * Creates an AskAccessCodeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse + */ + AskAccessCodeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.AskAccessCodeResponse) + return object; + let message = new $root.wm.protobuf.AskAccessCodeResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + return message; + }; + + /** + * Creates a plain object from an AskAccessCodeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.AskAccessCodeResponse} message AskAccessCodeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AskAccessCodeResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.accessCode = ""; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + return object; + }; + + /** + * Converts this AskAccessCodeResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.AskAccessCodeResponse + * @instance + * @returns {Object.} JSON object + */ + AskAccessCodeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AskAccessCodeResponse + * @function getTypeUrl + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AskAccessCodeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.AskAccessCodeResponse"; + }; + + return AskAccessCodeResponse; + })(); + + protobuf.RegisterOpponentGhostRequest = (function() { + + /** + * Properties of a RegisterOpponentGhostRequest. + * @memberof wm.protobuf + * @interface IRegisterOpponentGhostRequest + * @property {number} carId RegisterOpponentGhostRequest carId + * @property {number} specialGhostId RegisterOpponentGhostRequest specialGhostId + */ + + /** + * Constructs a new RegisterOpponentGhostRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterOpponentGhostRequest. + * @implements IRegisterOpponentGhostRequest + * @constructor + * @param {wm.protobuf.IRegisterOpponentGhostRequest=} [properties] Properties to set + */ + function RegisterOpponentGhostRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterOpponentGhostRequest carId. + * @member {number} carId + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @instance + */ + RegisterOpponentGhostRequest.prototype.carId = 0; + + /** + * RegisterOpponentGhostRequest specialGhostId. + * @member {number} specialGhostId + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @instance + */ + RegisterOpponentGhostRequest.prototype.specialGhostId = 0; + + /** + * Creates a new RegisterOpponentGhostRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.IRegisterOpponentGhostRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest instance + */ + RegisterOpponentGhostRequest.create = function create(properties) { + return new RegisterOpponentGhostRequest(properties); + }; + + /** + * Encodes the specified RegisterOpponentGhostRequest message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.IRegisterOpponentGhostRequest} message RegisterOpponentGhostRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.specialGhostId); + return writer; + }; + + /** + * Encodes the specified RegisterOpponentGhostRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.IRegisterOpponentGhostRequest} message RegisterOpponentGhostRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterOpponentGhostRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.specialGhostId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("specialGhostId")) + throw $util.ProtocolError("missing required 'specialGhostId'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterOpponentGhostRequest message. + * @function verify + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterOpponentGhostRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.specialGhostId)) + return "specialGhostId: integer expected"; + return null; + }; + + /** + * Creates a RegisterOpponentGhostRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest + */ + RegisterOpponentGhostRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterOpponentGhostRequest) + return object; + let message = new $root.wm.protobuf.RegisterOpponentGhostRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.specialGhostId != null) + message.specialGhostId = object.specialGhostId >>> 0; + return message; + }; + + /** + * Creates a plain object from a RegisterOpponentGhostRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.RegisterOpponentGhostRequest} message RegisterOpponentGhostRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterOpponentGhostRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.specialGhostId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.specialGhostId != null && message.hasOwnProperty("specialGhostId")) + object.specialGhostId = message.specialGhostId; + return object; + }; + + /** + * Converts this RegisterOpponentGhostRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterOpponentGhostRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterOpponentGhostRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterOpponentGhostRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterOpponentGhostRequest"; + }; + + return RegisterOpponentGhostRequest; + })(); + + protobuf.RegisterOpponentGhostResponse = (function() { + + /** + * Properties of a RegisterOpponentGhostResponse. + * @memberof wm.protobuf + * @interface IRegisterOpponentGhostResponse + * @property {wm.protobuf.ErrorCode} error RegisterOpponentGhostResponse error + */ + + /** + * Constructs a new RegisterOpponentGhostResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterOpponentGhostResponse. + * @implements IRegisterOpponentGhostResponse + * @constructor + * @param {wm.protobuf.IRegisterOpponentGhostResponse=} [properties] Properties to set + */ + function RegisterOpponentGhostResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterOpponentGhostResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @instance + */ + RegisterOpponentGhostResponse.prototype.error = 0; + + /** + * Creates a new RegisterOpponentGhostResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.IRegisterOpponentGhostResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse instance + */ + RegisterOpponentGhostResponse.create = function create(properties) { + return new RegisterOpponentGhostResponse(properties); + }; + + /** + * Encodes the specified RegisterOpponentGhostResponse message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.IRegisterOpponentGhostResponse} message RegisterOpponentGhostResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified RegisterOpponentGhostResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.IRegisterOpponentGhostResponse} message RegisterOpponentGhostResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterOpponentGhostResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterOpponentGhostResponse message. + * @function verify + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterOpponentGhostResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a RegisterOpponentGhostResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse + */ + RegisterOpponentGhostResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterOpponentGhostResponse) + return object; + let message = new $root.wm.protobuf.RegisterOpponentGhostResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a RegisterOpponentGhostResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.RegisterOpponentGhostResponse} message RegisterOpponentGhostResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterOpponentGhostResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this RegisterOpponentGhostResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterOpponentGhostResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterOpponentGhostResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterOpponentGhostResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterOpponentGhostResponse"; + }; + + return RegisterOpponentGhostResponse; + })(); + + protobuf.GrantCarRightRequest = (function() { + + /** + * Properties of a GrantCarRightRequest. + * @memberof wm.protobuf + * @interface IGrantCarRightRequest + * @property {number} userId GrantCarRightRequest userId + * @property {number} targetUserId GrantCarRightRequest targetUserId + * @property {number} timestamp GrantCarRightRequest timestamp + */ + + /** + * Constructs a new GrantCarRightRequest. + * @memberof wm.protobuf + * @classdesc Represents a GrantCarRightRequest. + * @implements IGrantCarRightRequest + * @constructor + * @param {wm.protobuf.IGrantCarRightRequest=} [properties] Properties to set + */ + function GrantCarRightRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GrantCarRightRequest userId. + * @member {number} userId + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + */ + GrantCarRightRequest.prototype.userId = 0; + + /** + * GrantCarRightRequest targetUserId. + * @member {number} targetUserId + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + */ + GrantCarRightRequest.prototype.targetUserId = 0; + + /** + * GrantCarRightRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + */ + GrantCarRightRequest.prototype.timestamp = 0; + + /** + * Creates a new GrantCarRightRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.IGrantCarRightRequest=} [properties] Properties to set + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest instance + */ + GrantCarRightRequest.create = function create(properties) { + return new GrantCarRightRequest(properties); + }; + + /** + * Encodes the specified GrantCarRightRequest message. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.IGrantCarRightRequest} message GrantCarRightRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetUserId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified GrantCarRightRequest message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.IGrantCarRightRequest} message GrantCarRightRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GrantCarRightRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.targetUserId = reader.uint32(); + break; + } + case 3: { + message.timestamp = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("targetUserId")) + throw $util.ProtocolError("missing required 'targetUserId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GrantCarRightRequest message. + * @function verify + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GrantCarRightRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.targetUserId)) + return "targetUserId: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + return null; + }; + + /** + * Creates a GrantCarRightRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest + */ + GrantCarRightRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GrantCarRightRequest) + return object; + let message = new $root.wm.protobuf.GrantCarRightRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.targetUserId != null) + message.targetUserId = object.targetUserId >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + return message; + }; + + /** + * Creates a plain object from a GrantCarRightRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.GrantCarRightRequest} message GrantCarRightRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GrantCarRightRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.targetUserId = 0; + object.timestamp = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.targetUserId != null && message.hasOwnProperty("targetUserId")) + object.targetUserId = message.targetUserId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this GrantCarRightRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + * @returns {Object.} JSON object + */ + GrantCarRightRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GrantCarRightRequest + * @function getTypeUrl + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GrantCarRightRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GrantCarRightRequest"; + }; + + return GrantCarRightRequest; + })(); + + protobuf.GrantCarRightResponse = (function() { + + /** + * Properties of a GrantCarRightResponse. + * @memberof wm.protobuf + * @interface IGrantCarRightResponse + * @property {wm.protobuf.ErrorCode} error GrantCarRightResponse error + */ + + /** + * Constructs a new GrantCarRightResponse. + * @memberof wm.protobuf + * @classdesc Represents a GrantCarRightResponse. + * @implements IGrantCarRightResponse + * @constructor + * @param {wm.protobuf.IGrantCarRightResponse=} [properties] Properties to set + */ + function GrantCarRightResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GrantCarRightResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.GrantCarRightResponse + * @instance + */ + GrantCarRightResponse.prototype.error = 0; + + /** + * Creates a new GrantCarRightResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.IGrantCarRightResponse=} [properties] Properties to set + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse instance + */ + GrantCarRightResponse.create = function create(properties) { + return new GrantCarRightResponse(properties); + }; + + /** + * Encodes the specified GrantCarRightResponse message. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.IGrantCarRightResponse} message GrantCarRightResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified GrantCarRightResponse message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.IGrantCarRightResponse} message GrantCarRightResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GrantCarRightResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GrantCarRightResponse message. + * @function verify + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GrantCarRightResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a GrantCarRightResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse + */ + GrantCarRightResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GrantCarRightResponse) + return object; + let message = new $root.wm.protobuf.GrantCarRightResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a GrantCarRightResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.GrantCarRightResponse} message GrantCarRightResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GrantCarRightResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this GrantCarRightResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.GrantCarRightResponse + * @instance + * @returns {Object.} JSON object + */ + GrantCarRightResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GrantCarRightResponse + * @function getTypeUrl + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GrantCarRightResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GrantCarRightResponse"; + }; + + return GrantCarRightResponse; + })(); + + protobuf.LoadGhostCompetitionRankingRequest = (function() { + + /** + * Properties of a LoadGhostCompetitionRankingRequest. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionRankingRequest + * @property {number} carId LoadGhostCompetitionRankingRequest carId + * @property {number} competitionId LoadGhostCompetitionRankingRequest competitionId + */ + + /** + * Constructs a new LoadGhostCompetitionRankingRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionRankingRequest. + * @implements ILoadGhostCompetitionRankingRequest + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest=} [properties] Properties to set + */ + function LoadGhostCompetitionRankingRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionRankingRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @instance + */ + LoadGhostCompetitionRankingRequest.prototype.carId = 0; + + /** + * LoadGhostCompetitionRankingRequest competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @instance + */ + LoadGhostCompetitionRankingRequest.prototype.competitionId = 0; + + /** + * Creates a new LoadGhostCompetitionRankingRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest instance + */ + LoadGhostCompetitionRankingRequest.create = function create(properties) { + return new LoadGhostCompetitionRankingRequest(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest} message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.competitionId); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest} message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionRankingRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.competitionId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionRankingRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionRankingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + return null; + }; + + /** + * Creates a LoadGhostCompetitionRankingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest + */ + LoadGhostCompetitionRankingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionRankingRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionRankingRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingRequest} message LoadGhostCompetitionRankingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionRankingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.competitionId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + return object; + }; + + /** + * Converts this LoadGhostCompetitionRankingRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionRankingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionRankingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionRankingRequest"; + }; + + return LoadGhostCompetitionRankingRequest; + })(); + + protobuf.LoadGhostCompetitionRankingResponse = (function() { + + /** + * Properties of a LoadGhostCompetitionRankingResponse. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionRankingResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostCompetitionRankingResponse error + * @property {number|null} [periodId] LoadGhostCompetitionRankingResponse periodId + * @property {number} numOfParticipants LoadGhostCompetitionRankingResponse numOfParticipants + * @property {wm.protobuf.IGhostCompetitionSchedule|null} [competitionSchedule] LoadGhostCompetitionRankingResponse competitionSchedule + * @property {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null} [ownRecord] LoadGhostCompetitionRankingResponse ownRecord + * @property {Array.|null} [topRecords] LoadGhostCompetitionRankingResponse topRecords + */ + + /** + * Constructs a new LoadGhostCompetitionRankingResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionRankingResponse. + * @implements ILoadGhostCompetitionRankingResponse + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse=} [properties] Properties to set + */ + function LoadGhostCompetitionRankingResponse(properties) { + this.topRecords = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionRankingResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.error = 0; + + /** + * LoadGhostCompetitionRankingResponse periodId. + * @member {number} periodId + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.periodId = 0; + + /** + * LoadGhostCompetitionRankingResponse numOfParticipants. + * @member {number} numOfParticipants + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.numOfParticipants = 0; + + /** + * LoadGhostCompetitionRankingResponse competitionSchedule. + * @member {wm.protobuf.IGhostCompetitionSchedule|null|undefined} competitionSchedule + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.competitionSchedule = null; + + /** + * LoadGhostCompetitionRankingResponse ownRecord. + * @member {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null|undefined} ownRecord + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.ownRecord = null; + + /** + * LoadGhostCompetitionRankingResponse topRecords. + * @member {Array.} topRecords + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.topRecords = $util.emptyArray; + + /** + * Creates a new LoadGhostCompetitionRankingResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse instance + */ + LoadGhostCompetitionRankingResponse.create = function create(properties) { + return new LoadGhostCompetitionRankingResponse(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse} message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.periodId != null && Object.hasOwnProperty.call(message, "periodId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.periodId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.numOfParticipants); + if (message.competitionSchedule != null && Object.hasOwnProperty.call(message, "competitionSchedule")) + $root.wm.protobuf.GhostCompetitionSchedule.encode(message.competitionSchedule, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.ownRecord != null && Object.hasOwnProperty.call(message, "ownRecord")) + $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.encode(message.ownRecord, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.topRecords != null && message.topRecords.length) + for (let i = 0; i < message.topRecords.length; ++i) + $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.encode(message.topRecords[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse} message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.periodId = reader.uint32(); + break; + } + case 3: { + message.numOfParticipants = reader.uint32(); + break; + } + case 4: { + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.decode(reader, reader.uint32()); + break; + } + case 5: { + message.ownRecord = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.topRecords && message.topRecords.length)) + message.topRecords = []; + message.topRecords.push($root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("numOfParticipants")) + throw $util.ProtocolError("missing required 'numOfParticipants'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionRankingResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionRankingResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.periodId != null && message.hasOwnProperty("periodId")) + if (!$util.isInteger(message.periodId)) + return "periodId: integer expected"; + if (!$util.isInteger(message.numOfParticipants)) + return "numOfParticipants: integer expected"; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) { + let error = $root.wm.protobuf.GhostCompetitionSchedule.verify(message.competitionSchedule); + if (error) + return "competitionSchedule." + error; + } + if (message.ownRecord != null && message.hasOwnProperty("ownRecord")) { + let error = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify(message.ownRecord); + if (error) + return "ownRecord." + error; + } + if (message.topRecords != null && message.hasOwnProperty("topRecords")) { + if (!Array.isArray(message.topRecords)) + return "topRecords: array expected"; + for (let i = 0; i < message.topRecords.length; ++i) { + let error = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify(message.topRecords[i]); + if (error) + return "topRecords." + error; + } + } + return null; + }; + + /** + * Creates a LoadGhostCompetitionRankingResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse + */ + LoadGhostCompetitionRankingResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionRankingResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.periodId != null) + message.periodId = object.periodId >>> 0; + if (object.numOfParticipants != null) + message.numOfParticipants = object.numOfParticipants >>> 0; + if (object.competitionSchedule != null) { + if (typeof object.competitionSchedule !== "object") + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.competitionSchedule: object expected"); + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.fromObject(object.competitionSchedule); + } + if (object.ownRecord != null) { + if (typeof object.ownRecord !== "object") + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.ownRecord: object expected"); + message.ownRecord = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.fromObject(object.ownRecord); + } + if (object.topRecords) { + if (!Array.isArray(object.topRecords)) + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.topRecords: array expected"); + message.topRecords = []; + for (let i = 0; i < object.topRecords.length; ++i) { + if (typeof object.topRecords[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.topRecords: object expected"); + message.topRecords[i] = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.fromObject(object.topRecords[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse} message LoadGhostCompetitionRankingResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionRankingResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.topRecords = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.periodId = 0; + object.numOfParticipants = 0; + object.competitionSchedule = null; + object.ownRecord = null; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.periodId != null && message.hasOwnProperty("periodId")) + object.periodId = message.periodId; + if (message.numOfParticipants != null && message.hasOwnProperty("numOfParticipants")) + object.numOfParticipants = message.numOfParticipants; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) + object.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.toObject(message.competitionSchedule, options); + if (message.ownRecord != null && message.hasOwnProperty("ownRecord")) + object.ownRecord = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.toObject(message.ownRecord, options); + if (message.topRecords && message.topRecords.length) { + object.topRecords = []; + for (let j = 0; j < message.topRecords.length; ++j) + object.topRecords[j] = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.toObject(message.topRecords[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostCompetitionRankingResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionRankingResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionRankingResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionRankingResponse"; + }; + + LoadGhostCompetitionRankingResponse.Entry = (function() { + + /** + * Properties of an Entry. + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @interface IEntry + * @property {number} rank Entry rank + * @property {number} result Entry result + * @property {number} carId Entry carId + * @property {string} name Entry name + * @property {number} regionId Entry regionId + * @property {number} model Entry model + * @property {number} visualModel Entry visualModel + * @property {number} defaultColor Entry defaultColor + * @property {string} title Entry title + * @property {number} level Entry level + * @property {string|null} [windowStickerString] Entry windowStickerString + * @property {string} playedShopName Entry playedShopName + * @property {number} playedAt Entry playedAt + */ + + /** + * Constructs a new Entry. + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @classdesc Represents an Entry. + * @implements IEntry + * @constructor + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry=} [properties] Properties to set + */ + function Entry(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entry rank. + * @member {number} rank + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.rank = 0; + + /** + * Entry result. + * @member {number} result + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.result = 0; + + /** + * Entry carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.carId = 0; + + /** + * Entry name. + * @member {string} name + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.name = ""; + + /** + * Entry regionId. + * @member {number} regionId + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.regionId = 0; + + /** + * Entry model. + * @member {number} model + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.model = 0; + + /** + * Entry visualModel. + * @member {number} visualModel + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.visualModel = 0; + + /** + * Entry defaultColor. + * @member {number} defaultColor + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.defaultColor = 0; + + /** + * Entry title. + * @member {string} title + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.title = ""; + + /** + * Entry level. + * @member {number} level + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.level = 0; + + /** + * Entry windowStickerString. + * @member {string} windowStickerString + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.windowStickerString = ""; + + /** + * Entry playedShopName. + * @member {string} playedShopName + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.playedShopName = ""; + + /** + * Entry playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.playedAt = 0; + + /** + * Creates a new Entry instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry instance + */ + Entry.create = function create(properties) { + return new Entry(properties); + }; + + /** + * Encodes the specified Entry message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rank); + writer.uint32(/* id 2, wireType 0 =*/16).sint32(message.result); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.carId); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.regionId); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.model); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.visualModel); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.defaultColor); + writer.uint32(/* id 10, wireType 2 =*/82).string(message.title); + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.level); + if (message.windowStickerString != null && Object.hasOwnProperty.call(message, "windowStickerString")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.windowStickerString); + writer.uint32(/* id 13, wireType 2 =*/106).string(message.playedShopName); + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.playedAt); + return writer; + }; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rank = reader.uint32(); + break; + } + case 2: { + message.result = reader.sint32(); + break; + } + case 3: { + message.carId = reader.uint32(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + case 5: { + message.regionId = reader.uint32(); + break; + } + case 6: { + message.model = reader.uint32(); + break; + } + case 7: { + message.visualModel = reader.uint32(); + break; + } + case 8: { + message.defaultColor = reader.uint32(); + break; + } + case 10: { + message.title = reader.string(); + break; + } + case 11: { + message.level = reader.uint32(); + break; + } + case 12: { + message.windowStickerString = reader.string(); + break; + } + case 13: { + message.playedShopName = reader.string(); + break; + } + case 14: { + message.playedAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("rank")) + throw $util.ProtocolError("missing required 'rank'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("name")) + throw $util.ProtocolError("missing required 'name'", { instance: message }); + if (!message.hasOwnProperty("regionId")) + throw $util.ProtocolError("missing required 'regionId'", { instance: message }); + if (!message.hasOwnProperty("model")) + throw $util.ProtocolError("missing required 'model'", { instance: message }); + if (!message.hasOwnProperty("visualModel")) + throw $util.ProtocolError("missing required 'visualModel'", { instance: message }); + if (!message.hasOwnProperty("defaultColor")) + throw $util.ProtocolError("missing required 'defaultColor'", { instance: message }); + if (!message.hasOwnProperty("title")) + throw $util.ProtocolError("missing required 'title'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + if (!message.hasOwnProperty("playedShopName")) + throw $util.ProtocolError("missing required 'playedShopName'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + return message; + }; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entry message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isString(message.name)) + return "name: string expected"; + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (!$util.isInteger(message.model)) + return "model: integer expected"; + if (!$util.isInteger(message.visualModel)) + return "visualModel: integer expected"; + if (!$util.isInteger(message.defaultColor)) + return "defaultColor: integer expected"; + if (!$util.isString(message.title)) + return "title: string expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + if (!$util.isString(message.windowStickerString)) + return "windowStickerString: string expected"; + if (!$util.isString(message.playedShopName)) + return "playedShopName: string expected"; + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + return null; + }; + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry + */ + Entry.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry(); + if (object.rank != null) + message.rank = object.rank >>> 0; + if (object.result != null) + message.result = object.result | 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.model != null) + message.model = object.model >>> 0; + if (object.visualModel != null) + message.visualModel = object.visualModel >>> 0; + if (object.defaultColor != null) + message.defaultColor = object.defaultColor >>> 0; + if (object.title != null) + message.title = String(object.title); + if (object.level != null) + message.level = object.level >>> 0; + if (object.windowStickerString != null) + message.windowStickerString = String(object.windowStickerString); + if (object.playedShopName != null) + message.playedShopName = String(object.playedShopName); + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + return message; + }; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} message Entry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.rank = 0; + object.result = 0; + object.carId = 0; + object.name = ""; + object.regionId = 0; + object.model = 0; + object.visualModel = 0; + object.defaultColor = 0; + object.title = ""; + object.level = 0; + object.windowStickerString = ""; + object.playedShopName = ""; + object.playedAt = 0; + } + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.visualModel != null && message.hasOwnProperty("visualModel")) + object.visualModel = message.visualModel; + if (message.defaultColor != null && message.hasOwnProperty("defaultColor")) + object.defaultColor = message.defaultColor; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + object.windowStickerString = message.windowStickerString; + if (message.playedShopName != null && message.hasOwnProperty("playedShopName")) + object.playedShopName = message.playedShopName; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + return object; + }; + + /** + * Converts this Entry to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + * @returns {Object.} JSON object + */ + Entry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entry + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionRankingResponse.Entry"; + }; + + return Entry; + })(); + + return LoadGhostCompetitionRankingResponse; + })(); + + protobuf.LoadUnreceivedUserItemsRequest = (function() { + + /** + * Properties of a LoadUnreceivedUserItemsRequest. + * @memberof wm.protobuf + * @interface ILoadUnreceivedUserItemsRequest + * @property {number} userId LoadUnreceivedUserItemsRequest userId + */ + + /** + * Constructs a new LoadUnreceivedUserItemsRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadUnreceivedUserItemsRequest. + * @implements ILoadUnreceivedUserItemsRequest + * @constructor + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest=} [properties] Properties to set + */ + function LoadUnreceivedUserItemsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUnreceivedUserItemsRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @instance + */ + LoadUnreceivedUserItemsRequest.prototype.userId = 0; + + /** + * Creates a new LoadUnreceivedUserItemsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest instance + */ + LoadUnreceivedUserItemsRequest.create = function create(properties) { + return new LoadUnreceivedUserItemsRequest(properties); + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest} message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest} message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUnreceivedUserItemsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUnreceivedUserItemsRequest message. + * @function verify + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUnreceivedUserItemsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadUnreceivedUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest + */ + LoadUnreceivedUserItemsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUnreceivedUserItemsRequest) + return object; + let message = new $root.wm.protobuf.LoadUnreceivedUserItemsRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.LoadUnreceivedUserItemsRequest} message LoadUnreceivedUserItemsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUnreceivedUserItemsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadUnreceivedUserItemsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @instance + * @returns {Object.} JSON object + */ + LoadUnreceivedUserItemsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUnreceivedUserItemsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUnreceivedUserItemsRequest"; + }; + + return LoadUnreceivedUserItemsRequest; + })(); + + protobuf.LoadUnreceivedUserItemsResponse = (function() { + + /** + * Properties of a LoadUnreceivedUserItemsResponse. + * @memberof wm.protobuf + * @interface ILoadUnreceivedUserItemsResponse + * @property {wm.protobuf.ErrorCode} error LoadUnreceivedUserItemsResponse error + * @property {Array.|null} [ownedUserItems] LoadUnreceivedUserItemsResponse ownedUserItems + */ + + /** + * Constructs a new LoadUnreceivedUserItemsResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadUnreceivedUserItemsResponse. + * @implements ILoadUnreceivedUserItemsResponse + * @constructor + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse=} [properties] Properties to set + */ + function LoadUnreceivedUserItemsResponse(properties) { + this.ownedUserItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUnreceivedUserItemsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @instance + */ + LoadUnreceivedUserItemsResponse.prototype.error = 0; + + /** + * LoadUnreceivedUserItemsResponse ownedUserItems. + * @member {Array.} ownedUserItems + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @instance + */ + LoadUnreceivedUserItemsResponse.prototype.ownedUserItems = $util.emptyArray; + + /** + * Creates a new LoadUnreceivedUserItemsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse instance + */ + LoadUnreceivedUserItemsResponse.create = function create(properties) { + return new LoadUnreceivedUserItemsResponse(properties); + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse} message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.ownedUserItems != null && message.ownedUserItems.length) + for (let i = 0; i < message.ownedUserItems.length; ++i) + $root.wm.protobuf.UserItem.encode(message.ownedUserItems[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse} message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUnreceivedUserItemsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 7: { + if (!(message.ownedUserItems && message.ownedUserItems.length)) + message.ownedUserItems = []; + message.ownedUserItems.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUnreceivedUserItemsResponse message. + * @function verify + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUnreceivedUserItemsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.ownedUserItems != null && message.hasOwnProperty("ownedUserItems")) { + if (!Array.isArray(message.ownedUserItems)) + return "ownedUserItems: array expected"; + for (let i = 0; i < message.ownedUserItems.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.ownedUserItems[i]); + if (error) + return "ownedUserItems." + error; + } + } + return null; + }; + + /** + * Creates a LoadUnreceivedUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse + */ + LoadUnreceivedUserItemsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUnreceivedUserItemsResponse) + return object; + let message = new $root.wm.protobuf.LoadUnreceivedUserItemsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.ownedUserItems) { + if (!Array.isArray(object.ownedUserItems)) + throw TypeError(".wm.protobuf.LoadUnreceivedUserItemsResponse.ownedUserItems: array expected"); + message.ownedUserItems = []; + for (let i = 0; i < object.ownedUserItems.length; ++i) { + if (typeof object.ownedUserItems[i] !== "object") + throw TypeError(".wm.protobuf.LoadUnreceivedUserItemsResponse.ownedUserItems: object expected"); + message.ownedUserItems[i] = $root.wm.protobuf.UserItem.fromObject(object.ownedUserItems[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.LoadUnreceivedUserItemsResponse} message LoadUnreceivedUserItemsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUnreceivedUserItemsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.ownedUserItems = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.ownedUserItems && message.ownedUserItems.length) { + object.ownedUserItems = []; + for (let j = 0; j < message.ownedUserItems.length; ++j) + object.ownedUserItems[j] = $root.wm.protobuf.UserItem.toObject(message.ownedUserItems[j], options); + } + return object; + }; + + /** + * Converts this LoadUnreceivedUserItemsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @instance + * @returns {Object.} JSON object + */ + LoadUnreceivedUserItemsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUnreceivedUserItemsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUnreceivedUserItemsResponse"; + }; + + return LoadUnreceivedUserItemsResponse; + })(); + + protobuf.LoadBookmarksRequest = (function() { + + /** + * Properties of a LoadBookmarksRequest. + * @memberof wm.protobuf + * @interface ILoadBookmarksRequest + * @property {number} userId LoadBookmarksRequest userId + */ + + /** + * Constructs a new LoadBookmarksRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadBookmarksRequest. + * @implements ILoadBookmarksRequest + * @constructor + * @param {wm.protobuf.ILoadBookmarksRequest=} [properties] Properties to set + */ + function LoadBookmarksRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBookmarksRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadBookmarksRequest + * @instance + */ + LoadBookmarksRequest.prototype.userId = 0; + + /** + * Creates a new LoadBookmarksRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.ILoadBookmarksRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest instance + */ + LoadBookmarksRequest.create = function create(properties) { + return new LoadBookmarksRequest(properties); + }; + + /** + * Encodes the specified LoadBookmarksRequest message. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.ILoadBookmarksRequest} message LoadBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.ILoadBookmarksRequest} message LoadBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadBookmarksRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBookmarksRequest message. + * @function verify + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBookmarksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest + */ + LoadBookmarksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadBookmarksRequest) + return object; + let message = new $root.wm.protobuf.LoadBookmarksRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadBookmarksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.LoadBookmarksRequest} message LoadBookmarksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBookmarksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadBookmarksRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadBookmarksRequest + * @instance + * @returns {Object.} JSON object + */ + LoadBookmarksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBookmarksRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBookmarksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadBookmarksRequest"; + }; + + return LoadBookmarksRequest; + })(); + + protobuf.LoadBookmarksResponse = (function() { + + /** + * Properties of a LoadBookmarksResponse. + * @memberof wm.protobuf + * @interface ILoadBookmarksResponse + * @property {wm.protobuf.ErrorCode} error LoadBookmarksResponse error + * @property {Array.|null} [cars] LoadBookmarksResponse cars + */ + + /** + * Constructs a new LoadBookmarksResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadBookmarksResponse. + * @implements ILoadBookmarksResponse + * @constructor + * @param {wm.protobuf.ILoadBookmarksResponse=} [properties] Properties to set + */ + function LoadBookmarksResponse(properties) { + this.cars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBookmarksResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadBookmarksResponse + * @instance + */ + LoadBookmarksResponse.prototype.error = 0; + + /** + * LoadBookmarksResponse cars. + * @member {Array.} cars + * @memberof wm.protobuf.LoadBookmarksResponse + * @instance + */ + LoadBookmarksResponse.prototype.cars = $util.emptyArray; + + /** + * Creates a new LoadBookmarksResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.ILoadBookmarksResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse instance + */ + LoadBookmarksResponse.create = function create(properties) { + return new LoadBookmarksResponse(properties); + }; + + /** + * Encodes the specified LoadBookmarksResponse message. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.ILoadBookmarksResponse} message LoadBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.Car.encode(message.cars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.ILoadBookmarksResponse} message LoadBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadBookmarksResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBookmarksResponse message. + * @function verify + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBookmarksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + return null; + }; + + /** + * Creates a LoadBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse + */ + LoadBookmarksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadBookmarksResponse) + return object; + let message = new $root.wm.protobuf.LoadBookmarksResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.LoadBookmarksResponse.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.LoadBookmarksResponse.cars: object expected"); + message.cars[i] = $root.wm.protobuf.Car.fromObject(object.cars[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadBookmarksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.LoadBookmarksResponse} message LoadBookmarksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBookmarksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cars = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.Car.toObject(message.cars[j], options); + } + return object; + }; + + /** + * Converts this LoadBookmarksResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadBookmarksResponse + * @instance + * @returns {Object.} JSON object + */ + LoadBookmarksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBookmarksResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBookmarksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadBookmarksResponse"; + }; + + return LoadBookmarksResponse; + })(); + + protobuf.SaveBookmarksRequest = (function() { + + /** + * Properties of a SaveBookmarksRequest. + * @memberof wm.protobuf + * @interface ISaveBookmarksRequest + * @property {number} userId SaveBookmarksRequest userId + * @property {Array.|null} [cars] SaveBookmarksRequest cars + */ + + /** + * Constructs a new SaveBookmarksRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveBookmarksRequest. + * @implements ISaveBookmarksRequest + * @constructor + * @param {wm.protobuf.ISaveBookmarksRequest=} [properties] Properties to set + */ + function SaveBookmarksRequest(properties) { + this.cars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveBookmarksRequest userId. + * @member {number} userId + * @memberof wm.protobuf.SaveBookmarksRequest + * @instance + */ + SaveBookmarksRequest.prototype.userId = 0; + + /** + * SaveBookmarksRequest cars. + * @member {Array.} cars + * @memberof wm.protobuf.SaveBookmarksRequest + * @instance + */ + SaveBookmarksRequest.prototype.cars = $util.emptyArray; + + /** + * Creates a new SaveBookmarksRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.ISaveBookmarksRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest instance + */ + SaveBookmarksRequest.create = function create(properties) { + return new SaveBookmarksRequest(properties); + }; + + /** + * Encodes the specified SaveBookmarksRequest message. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.ISaveBookmarksRequest} message SaveBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.cars[i]); + return writer; + }; + + /** + * Encodes the specified SaveBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.ISaveBookmarksRequest} message SaveBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveBookmarksRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.cars.push(reader.uint32()); + } else + message.cars.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveBookmarksRequest message. + * @function verify + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveBookmarksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) + if (!$util.isInteger(message.cars[i])) + return "cars: integer[] expected"; + } + return null; + }; + + /** + * Creates a SaveBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest + */ + SaveBookmarksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveBookmarksRequest) + return object; + let message = new $root.wm.protobuf.SaveBookmarksRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.SaveBookmarksRequest.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) + message.cars[i] = object.cars[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a SaveBookmarksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.SaveBookmarksRequest} message SaveBookmarksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveBookmarksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cars = []; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = message.cars[j]; + } + return object; + }; + + /** + * Converts this SaveBookmarksRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveBookmarksRequest + * @instance + * @returns {Object.} JSON object + */ + SaveBookmarksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveBookmarksRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveBookmarksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveBookmarksRequest"; + }; + + return SaveBookmarksRequest; + })(); + + protobuf.SaveBookmarksResponse = (function() { + + /** + * Properties of a SaveBookmarksResponse. + * @memberof wm.protobuf + * @interface ISaveBookmarksResponse + * @property {wm.protobuf.ErrorCode} error SaveBookmarksResponse error + */ + + /** + * Constructs a new SaveBookmarksResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveBookmarksResponse. + * @implements ISaveBookmarksResponse + * @constructor + * @param {wm.protobuf.ISaveBookmarksResponse=} [properties] Properties to set + */ + function SaveBookmarksResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveBookmarksResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveBookmarksResponse + * @instance + */ + SaveBookmarksResponse.prototype.error = 0; + + /** + * Creates a new SaveBookmarksResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.ISaveBookmarksResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse instance + */ + SaveBookmarksResponse.create = function create(properties) { + return new SaveBookmarksResponse(properties); + }; + + /** + * Encodes the specified SaveBookmarksResponse message. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.ISaveBookmarksResponse} message SaveBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.ISaveBookmarksResponse} message SaveBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveBookmarksResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveBookmarksResponse message. + * @function verify + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveBookmarksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse + */ + SaveBookmarksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveBookmarksResponse) + return object; + let message = new $root.wm.protobuf.SaveBookmarksResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveBookmarksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.SaveBookmarksResponse} message SaveBookmarksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveBookmarksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveBookmarksResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveBookmarksResponse + * @instance + * @returns {Object.} JSON object + */ + SaveBookmarksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveBookmarksResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveBookmarksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveBookmarksResponse"; + }; + + return SaveBookmarksResponse; + })(); + + protobuf.StartTransferRequest = (function() { + + /** + * Properties of a StartTransferRequest. + * @memberof wm.protobuf + * @interface IStartTransferRequest + * @property {number} banapassportAmId StartTransferRequest banapassportAmId + */ + + /** + * Constructs a new StartTransferRequest. + * @memberof wm.protobuf + * @classdesc Represents a StartTransferRequest. + * @implements IStartTransferRequest + * @constructor + * @param {wm.protobuf.IStartTransferRequest=} [properties] Properties to set + */ + function StartTransferRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StartTransferRequest banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.StartTransferRequest + * @instance + */ + StartTransferRequest.prototype.banapassportAmId = 0; + + /** + * Creates a new StartTransferRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.IStartTransferRequest=} [properties] Properties to set + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest instance + */ + StartTransferRequest.create = function create(properties) { + return new StartTransferRequest(properties); + }; + + /** + * Encodes the specified StartTransferRequest message. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.IStartTransferRequest} message StartTransferRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.banapassportAmId); + return writer; + }; + + /** + * Encodes the specified StartTransferRequest message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.IStartTransferRequest} message StartTransferRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.StartTransferRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.banapassportAmId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("banapassportAmId")) + throw $util.ProtocolError("missing required 'banapassportAmId'", { instance: message }); + return message; + }; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartTransferRequest message. + * @function verify + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartTransferRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + return null; + }; + + /** + * Creates a StartTransferRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest + */ + StartTransferRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.StartTransferRequest) + return object; + let message = new $root.wm.protobuf.StartTransferRequest(); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + return message; + }; + + /** + * Creates a plain object from a StartTransferRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.StartTransferRequest} message StartTransferRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartTransferRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.banapassportAmId = 0; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + return object; + }; + + /** + * Converts this StartTransferRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.StartTransferRequest + * @instance + * @returns {Object.} JSON object + */ + StartTransferRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StartTransferRequest + * @function getTypeUrl + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartTransferRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.StartTransferRequest"; + }; + + return StartTransferRequest; + })(); + + protobuf.StartTransferResponse = (function() { + + /** + * Properties of a StartTransferResponse. + * @memberof wm.protobuf + * @interface IStartTransferResponse + * @property {wm.protobuf.ErrorCode} error StartTransferResponse error + * @property {number} userId StartTransferResponse userId + * @property {number|null} [pollingInterval] StartTransferResponse pollingInterval + */ + + /** + * Constructs a new StartTransferResponse. + * @memberof wm.protobuf + * @classdesc Represents a StartTransferResponse. + * @implements IStartTransferResponse + * @constructor + * @param {wm.protobuf.IStartTransferResponse=} [properties] Properties to set + */ + function StartTransferResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StartTransferResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.StartTransferResponse + * @instance + */ + StartTransferResponse.prototype.error = 0; + + /** + * StartTransferResponse userId. + * @member {number} userId + * @memberof wm.protobuf.StartTransferResponse + * @instance + */ + StartTransferResponse.prototype.userId = 0; + + /** + * StartTransferResponse pollingInterval. + * @member {number} pollingInterval + * @memberof wm.protobuf.StartTransferResponse + * @instance + */ + StartTransferResponse.prototype.pollingInterval = 0; + + /** + * Creates a new StartTransferResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.IStartTransferResponse=} [properties] Properties to set + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse instance + */ + StartTransferResponse.create = function create(properties) { + return new StartTransferResponse(properties); + }; + + /** + * Encodes the specified StartTransferResponse message. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.IStartTransferResponse} message StartTransferResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.userId); + if (message.pollingInterval != null && Object.hasOwnProperty.call(message, "pollingInterval")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.pollingInterval); + return writer; + }; + + /** + * Encodes the specified StartTransferResponse message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.IStartTransferResponse} message StartTransferResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.StartTransferResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.userId = reader.uint32(); + break; + } + case 3: { + message.pollingInterval = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartTransferResponse message. + * @function verify + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartTransferResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.pollingInterval != null && message.hasOwnProperty("pollingInterval")) + if (!$util.isInteger(message.pollingInterval)) + return "pollingInterval: integer expected"; + return null; + }; + + /** + * Creates a StartTransferResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse + */ + StartTransferResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.StartTransferResponse) + return object; + let message = new $root.wm.protobuf.StartTransferResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.pollingInterval != null) + message.pollingInterval = object.pollingInterval >>> 0; + return message; + }; + + /** + * Creates a plain object from a StartTransferResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.StartTransferResponse} message StartTransferResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartTransferResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.userId = 0; + object.pollingInterval = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.pollingInterval != null && message.hasOwnProperty("pollingInterval")) + object.pollingInterval = message.pollingInterval; + return object; + }; + + /** + * Converts this StartTransferResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.StartTransferResponse + * @instance + * @returns {Object.} JSON object + */ + StartTransferResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StartTransferResponse + * @function getTypeUrl + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartTransferResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.StartTransferResponse"; + }; + + return StartTransferResponse; + })(); + + protobuf.SaveScreenshotRequest = (function() { + + /** + * Properties of a SaveScreenshotRequest. + * @memberof wm.protobuf + * @interface ISaveScreenshotRequest + * @property {number} carId SaveScreenshotRequest carId + * @property {number} timestamp SaveScreenshotRequest timestamp + * @property {number|null} [playedAt] SaveScreenshotRequest playedAt + * @property {boolean|null} [transparent] SaveScreenshotRequest transparent + * @property {wm.protobuf.ScreenshotType} imageType SaveScreenshotRequest imageType + * @property {Uint8Array|null} [image] SaveScreenshotRequest image + * @property {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null} [ghostMetadata] SaveScreenshotRequest ghostMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null} [versusMetadata] SaveScreenshotRequest versusMetadata + * @property {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null} [terminalMetadata] SaveScreenshotRequest terminalMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null} [acquiringVsStarMetadata] SaveScreenshotRequest acquiringVsStarMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null} [acquiringAuraMotifMetadata] SaveScreenshotRequest acquiringAuraMotifMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null} [ghostRegionMapMetadata] SaveScreenshotRequest ghostRegionMapMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null} [acquiringCrownMetadata] SaveScreenshotRequest acquiringCrownMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null} [competitionResultMetadata] SaveScreenshotRequest competitionResultMetadata + * @property {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null} [timeAttackResultMetadata] SaveScreenshotRequest timeAttackResultMetadata + * @property {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null} [levelUpMetadata] SaveScreenshotRequest levelUpMetadata + */ + + /** + * Constructs a new SaveScreenshotRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveScreenshotRequest. + * @implements ISaveScreenshotRequest + * @constructor + * @param {wm.protobuf.ISaveScreenshotRequest=} [properties] Properties to set + */ + function SaveScreenshotRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScreenshotRequest carId. + * @member {number} carId + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.carId = 0; + + /** + * SaveScreenshotRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.timestamp = 0; + + /** + * SaveScreenshotRequest playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.playedAt = 0; + + /** + * SaveScreenshotRequest transparent. + * @member {boolean} transparent + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.transparent = false; + + /** + * SaveScreenshotRequest imageType. + * @member {wm.protobuf.ScreenshotType} imageType + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.imageType = 1; + + /** + * SaveScreenshotRequest image. + * @member {Uint8Array} image + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.image = $util.newBuffer([]); + + /** + * SaveScreenshotRequest ghostMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null|undefined} ghostMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.ghostMetadata = null; + + /** + * SaveScreenshotRequest versusMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null|undefined} versusMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.versusMetadata = null; + + /** + * SaveScreenshotRequest terminalMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null|undefined} terminalMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.terminalMetadata = null; + + /** + * SaveScreenshotRequest acquiringVsStarMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null|undefined} acquiringVsStarMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.acquiringVsStarMetadata = null; + + /** + * SaveScreenshotRequest acquiringAuraMotifMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null|undefined} acquiringAuraMotifMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.acquiringAuraMotifMetadata = null; + + /** + * SaveScreenshotRequest ghostRegionMapMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null|undefined} ghostRegionMapMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.ghostRegionMapMetadata = null; + + /** + * SaveScreenshotRequest acquiringCrownMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null|undefined} acquiringCrownMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.acquiringCrownMetadata = null; + + /** + * SaveScreenshotRequest competitionResultMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null|undefined} competitionResultMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.competitionResultMetadata = null; + + /** + * SaveScreenshotRequest timeAttackResultMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null|undefined} timeAttackResultMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.timeAttackResultMetadata = null; + + /** + * SaveScreenshotRequest levelUpMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null|undefined} levelUpMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.levelUpMetadata = null; + + /** + * Creates a new SaveScreenshotRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.ISaveScreenshotRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest instance + */ + SaveScreenshotRequest.create = function create(properties) { + return new SaveScreenshotRequest(properties); + }; + + /** + * Encodes the specified SaveScreenshotRequest message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.ISaveScreenshotRequest} message SaveScreenshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.timestamp); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.imageType); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.image); + if (message.ghostMetadata != null && Object.hasOwnProperty.call(message, "ghostMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.encode(message.ghostMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.versusMetadata != null && Object.hasOwnProperty.call(message, "versusMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.encode(message.versusMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.terminalMetadata != null && Object.hasOwnProperty.call(message, "terminalMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.encode(message.terminalMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.transparent != null && Object.hasOwnProperty.call(message, "transparent")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.transparent); + if (message.playedAt != null && Object.hasOwnProperty.call(message, "playedAt")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.playedAt); + if (message.acquiringVsStarMetadata != null && Object.hasOwnProperty.call(message, "acquiringVsStarMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.encode(message.acquiringVsStarMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.acquiringAuraMotifMetadata != null && Object.hasOwnProperty.call(message, "acquiringAuraMotifMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.encode(message.acquiringAuraMotifMetadata, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.ghostRegionMapMetadata != null && Object.hasOwnProperty.call(message, "ghostRegionMapMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.encode(message.ghostRegionMapMetadata, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.acquiringCrownMetadata != null && Object.hasOwnProperty.call(message, "acquiringCrownMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.encode(message.acquiringCrownMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.competitionResultMetadata != null && Object.hasOwnProperty.call(message, "competitionResultMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.encode(message.competitionResultMetadata, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.timeAttackResultMetadata != null && Object.hasOwnProperty.call(message, "timeAttackResultMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.encode(message.timeAttackResultMetadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.levelUpMetadata != null && Object.hasOwnProperty.call(message, "levelUpMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.encode(message.levelUpMetadata, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveScreenshotRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.ISaveScreenshotRequest} message SaveScreenshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.timestamp = reader.uint32(); + break; + } + case 9: { + message.playedAt = reader.uint32(); + break; + } + case 8: { + message.transparent = reader.bool(); + break; + } + case 3: { + message.imageType = reader.int32(); + break; + } + case 4: { + message.image = reader.bytes(); + break; + } + case 5: { + message.ghostMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.decode(reader, reader.uint32()); + break; + } + case 6: { + message.versusMetadata = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.decode(reader, reader.uint32()); + break; + } + case 7: { + message.terminalMetadata = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.decode(reader, reader.uint32()); + break; + } + case 10: { + message.acquiringVsStarMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.decode(reader, reader.uint32()); + break; + } + case 11: { + message.acquiringAuraMotifMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.decode(reader, reader.uint32()); + break; + } + case 12: { + message.ghostRegionMapMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.decode(reader, reader.uint32()); + break; + } + case 13: { + message.acquiringCrownMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.decode(reader, reader.uint32()); + break; + } + case 14: { + message.competitionResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.decode(reader, reader.uint32()); + break; + } + case 15: { + message.timeAttackResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.decode(reader, reader.uint32()); + break; + } + case 16: { + message.levelUpMetadata = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + if (!message.hasOwnProperty("imageType")) + throw $util.ProtocolError("missing required 'imageType'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScreenshotRequest message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScreenshotRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (message.transparent != null && message.hasOwnProperty("transparent")) + if (typeof message.transparent !== "boolean") + return "transparent: boolean expected"; + switch (message.imageType) { + default: + return "imageType: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + if (message.image != null && message.hasOwnProperty("image")) + if (!(message.image && typeof message.image.length === "number" || $util.isString(message.image))) + return "image: buffer expected"; + if (message.ghostMetadata != null && message.hasOwnProperty("ghostMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify(message.ghostMetadata); + if (error) + return "ghostMetadata." + error; + } + if (message.versusMetadata != null && message.hasOwnProperty("versusMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify(message.versusMetadata); + if (error) + return "versusMetadata." + error; + } + if (message.terminalMetadata != null && message.hasOwnProperty("terminalMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify(message.terminalMetadata); + if (error) + return "terminalMetadata." + error; + } + if (message.acquiringVsStarMetadata != null && message.hasOwnProperty("acquiringVsStarMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify(message.acquiringVsStarMetadata); + if (error) + return "acquiringVsStarMetadata." + error; + } + if (message.acquiringAuraMotifMetadata != null && message.hasOwnProperty("acquiringAuraMotifMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify(message.acquiringAuraMotifMetadata); + if (error) + return "acquiringAuraMotifMetadata." + error; + } + if (message.ghostRegionMapMetadata != null && message.hasOwnProperty("ghostRegionMapMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify(message.ghostRegionMapMetadata); + if (error) + return "ghostRegionMapMetadata." + error; + } + if (message.acquiringCrownMetadata != null && message.hasOwnProperty("acquiringCrownMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify(message.acquiringCrownMetadata); + if (error) + return "acquiringCrownMetadata." + error; + } + if (message.competitionResultMetadata != null && message.hasOwnProperty("competitionResultMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify(message.competitionResultMetadata); + if (error) + return "competitionResultMetadata." + error; + } + if (message.timeAttackResultMetadata != null && message.hasOwnProperty("timeAttackResultMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify(message.timeAttackResultMetadata); + if (error) + return "timeAttackResultMetadata." + error; + } + if (message.levelUpMetadata != null && message.hasOwnProperty("levelUpMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify(message.levelUpMetadata); + if (error) + return "levelUpMetadata." + error; + } + return null; + }; + + /** + * Creates a SaveScreenshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest + */ + SaveScreenshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.transparent != null) + message.transparent = Boolean(object.transparent); + switch (object.imageType) { + case "SS_GHOST_BATTLE": + case 1: + message.imageType = 1; + break; + case "SS_VERSUS_BATTLE": + case 2: + message.imageType = 2; + break; + case "SS_TERMINAL": + case 3: + message.imageType = 3; + break; + case "SS_ACQUIRING_VERSUS_STAR": + case 4: + message.imageType = 4; + break; + case "SS_ACQUIRING_AURA_MOTIF": + case 5: + message.imageType = 5; + break; + case "SS_GHOST_REGION_MAP": + case 6: + message.imageType = 6; + break; + case "SS_ACQUIRING_CROWN": + case 7: + message.imageType = 7; + break; + case "SS_GHOST_COMPETITION_RESULT": + case 8: + message.imageType = 8; + break; + case "SS_TIME_ATTACK_RESULT": + case 9: + message.imageType = 9; + break; + case "SS_LEVEL_UP": + case 10: + message.imageType = 10; + break; + } + if (object.image != null) + if (typeof object.image === "string") + $util.base64.decode(object.image, message.image = $util.newBuffer($util.base64.length(object.image)), 0); + else if (object.image.length >= 0) + message.image = object.image; + if (object.ghostMetadata != null) { + if (typeof object.ghostMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.ghostMetadata: object expected"); + message.ghostMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.fromObject(object.ghostMetadata); + } + if (object.versusMetadata != null) { + if (typeof object.versusMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.versusMetadata: object expected"); + message.versusMetadata = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.fromObject(object.versusMetadata); + } + if (object.terminalMetadata != null) { + if (typeof object.terminalMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.terminalMetadata: object expected"); + message.terminalMetadata = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.fromObject(object.terminalMetadata); + } + if (object.acquiringVsStarMetadata != null) { + if (typeof object.acquiringVsStarMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.acquiringVsStarMetadata: object expected"); + message.acquiringVsStarMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.fromObject(object.acquiringVsStarMetadata); + } + if (object.acquiringAuraMotifMetadata != null) { + if (typeof object.acquiringAuraMotifMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.acquiringAuraMotifMetadata: object expected"); + message.acquiringAuraMotifMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.fromObject(object.acquiringAuraMotifMetadata); + } + if (object.ghostRegionMapMetadata != null) { + if (typeof object.ghostRegionMapMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.ghostRegionMapMetadata: object expected"); + message.ghostRegionMapMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.fromObject(object.ghostRegionMapMetadata); + } + if (object.acquiringCrownMetadata != null) { + if (typeof object.acquiringCrownMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.acquiringCrownMetadata: object expected"); + message.acquiringCrownMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.fromObject(object.acquiringCrownMetadata); + } + if (object.competitionResultMetadata != null) { + if (typeof object.competitionResultMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.competitionResultMetadata: object expected"); + message.competitionResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.fromObject(object.competitionResultMetadata); + } + if (object.timeAttackResultMetadata != null) { + if (typeof object.timeAttackResultMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.timeAttackResultMetadata: object expected"); + message.timeAttackResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.fromObject(object.timeAttackResultMetadata); + } + if (object.levelUpMetadata != null) { + if (typeof object.levelUpMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.levelUpMetadata: object expected"); + message.levelUpMetadata = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.fromObject(object.levelUpMetadata); + } + return message; + }; + + /** + * Creates a plain object from a SaveScreenshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.SaveScreenshotRequest} message SaveScreenshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScreenshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.timestamp = 0; + object.imageType = options.enums === String ? "SS_GHOST_BATTLE" : 1; + if (options.bytes === String) + object.image = ""; + else { + object.image = []; + if (options.bytes !== Array) + object.image = $util.newBuffer(object.image); + } + object.ghostMetadata = null; + object.versusMetadata = null; + object.terminalMetadata = null; + object.transparent = false; + object.playedAt = 0; + object.acquiringVsStarMetadata = null; + object.acquiringAuraMotifMetadata = null; + object.ghostRegionMapMetadata = null; + object.acquiringCrownMetadata = null; + object.competitionResultMetadata = null; + object.timeAttackResultMetadata = null; + object.levelUpMetadata = null; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + if (message.imageType != null && message.hasOwnProperty("imageType")) + object.imageType = options.enums === String ? $root.wm.protobuf.ScreenshotType[message.imageType] : message.imageType; + if (message.image != null && message.hasOwnProperty("image")) + object.image = options.bytes === String ? $util.base64.encode(message.image, 0, message.image.length) : options.bytes === Array ? Array.prototype.slice.call(message.image) : message.image; + if (message.ghostMetadata != null && message.hasOwnProperty("ghostMetadata")) + object.ghostMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.toObject(message.ghostMetadata, options); + if (message.versusMetadata != null && message.hasOwnProperty("versusMetadata")) + object.versusMetadata = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.toObject(message.versusMetadata, options); + if (message.terminalMetadata != null && message.hasOwnProperty("terminalMetadata")) + object.terminalMetadata = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.toObject(message.terminalMetadata, options); + if (message.transparent != null && message.hasOwnProperty("transparent")) + object.transparent = message.transparent; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.acquiringVsStarMetadata != null && message.hasOwnProperty("acquiringVsStarMetadata")) + object.acquiringVsStarMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.toObject(message.acquiringVsStarMetadata, options); + if (message.acquiringAuraMotifMetadata != null && message.hasOwnProperty("acquiringAuraMotifMetadata")) + object.acquiringAuraMotifMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.toObject(message.acquiringAuraMotifMetadata, options); + if (message.ghostRegionMapMetadata != null && message.hasOwnProperty("ghostRegionMapMetadata")) + object.ghostRegionMapMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.toObject(message.ghostRegionMapMetadata, options); + if (message.acquiringCrownMetadata != null && message.hasOwnProperty("acquiringCrownMetadata")) + object.acquiringCrownMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.toObject(message.acquiringCrownMetadata, options); + if (message.competitionResultMetadata != null && message.hasOwnProperty("competitionResultMetadata")) + object.competitionResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.toObject(message.competitionResultMetadata, options); + if (message.timeAttackResultMetadata != null && message.hasOwnProperty("timeAttackResultMetadata")) + object.timeAttackResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.toObject(message.timeAttackResultMetadata, options); + if (message.levelUpMetadata != null && message.hasOwnProperty("levelUpMetadata")) + object.levelUpMetadata = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.toObject(message.levelUpMetadata, options); + return object; + }; + + /** + * Converts this SaveScreenshotRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + * @returns {Object.} JSON object + */ + SaveScreenshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScreenshotRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScreenshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest"; + }; + + SaveScreenshotRequest.GhostBattleMetadata = (function() { + + /** + * Properties of a GhostBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IGhostBattleMetadata + * @property {number} tunePower GhostBattleMetadata tunePower + * @property {number} tuneHandling GhostBattleMetadata tuneHandling + * @property {number} area GhostBattleMetadata area + * @property {number} stampReturnCount GhostBattleMetadata stampReturnCount + * @property {Array.|null} [opponents] GhostBattleMetadata opponents + */ + + /** + * Constructs a new GhostBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a GhostBattleMetadata. + * @implements IGhostBattleMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata=} [properties] Properties to set + */ + function GhostBattleMetadata(properties) { + this.opponents = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.tunePower = 0; + + /** + * GhostBattleMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.tuneHandling = 0; + + /** + * GhostBattleMetadata area. + * @member {number} area + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.area = 0; + + /** + * GhostBattleMetadata stampReturnCount. + * @member {number} stampReturnCount + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.stampReturnCount = 0; + + /** + * GhostBattleMetadata opponents. + * @member {Array.} opponents + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.opponents = $util.emptyArray; + + /** + * Creates a new GhostBattleMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata instance + */ + GhostBattleMetadata.create = function create(properties) { + return new GhostBattleMetadata(properties); + }; + + /** + * Encodes the specified GhostBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata} message GhostBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stampReturnCount); + if (message.opponents != null && message.opponents.length) + for (let i = 0; i < message.opponents.length; ++i) + $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.encode(message.opponents[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata} message GhostBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + case 4: { + message.stampReturnCount = reader.uint32(); + break; + } + case 6: { + if (!(message.opponents && message.opponents.length)) + message.opponents = []; + message.opponents.push($root.wm.protobuf.SaveScreenshotRequest.OpponentCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("stampReturnCount")) + throw $util.ProtocolError("missing required 'stampReturnCount'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.stampReturnCount)) + return "stampReturnCount: integer expected"; + if (message.opponents != null && message.hasOwnProperty("opponents")) { + if (!Array.isArray(message.opponents)) + return "opponents: array expected"; + for (let i = 0; i < message.opponents.length; ++i) { + let error = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.verify(message.opponents[i]); + if (error) + return "opponents." + error; + } + } + return null; + }; + + /** + * Creates a GhostBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata + */ + GhostBattleMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.stampReturnCount != null) + message.stampReturnCount = object.stampReturnCount >>> 0; + if (object.opponents) { + if (!Array.isArray(object.opponents)) + throw TypeError(".wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.opponents: array expected"); + message.opponents = []; + for (let i = 0; i < object.opponents.length; ++i) { + if (typeof object.opponents[i] !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.opponents: object expected"); + message.opponents[i] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.fromObject(object.opponents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GhostBattleMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} message GhostBattleMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.opponents = []; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.area = 0; + object.stampReturnCount = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.stampReturnCount != null && message.hasOwnProperty("stampReturnCount")) + object.stampReturnCount = message.stampReturnCount; + if (message.opponents && message.opponents.length) { + object.opponents = []; + for (let j = 0; j < message.opponents.length; ++j) + object.opponents[j] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.toObject(message.opponents[j], options); + } + return object; + }; + + /** + * Converts this GhostBattleMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + * @returns {Object.} JSON object + */ + GhostBattleMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata"; + }; + + return GhostBattleMetadata; + })(); + + SaveScreenshotRequest.VersusBattleMetadata = (function() { + + /** + * Properties of a VersusBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IVersusBattleMetadata + * @property {number} tunePower VersusBattleMetadata tunePower + * @property {number} tuneHandling VersusBattleMetadata tuneHandling + * @property {number} area VersusBattleMetadata area + * @property {Array.|null} [opponents] VersusBattleMetadata opponents + */ + + /** + * Constructs a new VersusBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a VersusBattleMetadata. + * @implements IVersusBattleMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata=} [properties] Properties to set + */ + function VersusBattleMetadata(properties) { + this.opponents = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersusBattleMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.tunePower = 0; + + /** + * VersusBattleMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.tuneHandling = 0; + + /** + * VersusBattleMetadata area. + * @member {number} area + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.area = 0; + + /** + * VersusBattleMetadata opponents. + * @member {Array.} opponents + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.opponents = $util.emptyArray; + + /** + * Creates a new VersusBattleMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata instance + */ + VersusBattleMetadata.create = function create(properties) { + return new VersusBattleMetadata(properties); + }; + + /** + * Encodes the specified VersusBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata} message VersusBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + if (message.opponents != null && message.opponents.length) + for (let i = 0; i < message.opponents.length; ++i) + $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.encode(message.opponents[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VersusBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata} message VersusBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + case 4: { + if (!(message.opponents && message.opponents.length)) + message.opponents = []; + message.opponents.push($root.wm.protobuf.SaveScreenshotRequest.OpponentCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersusBattleMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersusBattleMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (message.opponents != null && message.hasOwnProperty("opponents")) { + if (!Array.isArray(message.opponents)) + return "opponents: array expected"; + for (let i = 0; i < message.opponents.length; ++i) { + let error = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.verify(message.opponents[i]); + if (error) + return "opponents." + error; + } + } + return null; + }; + + /** + * Creates a VersusBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata + */ + VersusBattleMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.opponents) { + if (!Array.isArray(object.opponents)) + throw TypeError(".wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.opponents: array expected"); + message.opponents = []; + for (let i = 0; i < object.opponents.length; ++i) { + if (typeof object.opponents[i] !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.opponents: object expected"); + message.opponents[i] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.fromObject(object.opponents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a VersusBattleMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} message VersusBattleMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersusBattleMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.opponents = []; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.area = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.opponents && message.opponents.length) { + object.opponents = []; + for (let j = 0; j < message.opponents.length; ++j) + object.opponents[j] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.toObject(message.opponents[j], options); + } + return object; + }; + + /** + * Converts this VersusBattleMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + * @returns {Object.} JSON object + */ + VersusBattleMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VersusBattleMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VersusBattleMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata"; + }; + + return VersusBattleMetadata; + })(); + + SaveScreenshotRequest.TerminalMetadata = (function() { + + /** + * Properties of a TerminalMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface ITerminalMetadata + * @property {number} tunePower TerminalMetadata tunePower + * @property {number} tuneHandling TerminalMetadata tuneHandling + * @property {string} name TerminalMetadata name + * @property {string} title TerminalMetadata title + * @property {number} level TerminalMetadata level + */ + + /** + * Constructs a new TerminalMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a TerminalMetadata. + * @implements ITerminalMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata=} [properties] Properties to set + */ + function TerminalMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerminalMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.tunePower = 0; + + /** + * TerminalMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.tuneHandling = 0; + + /** + * TerminalMetadata name. + * @member {string} name + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.name = ""; + + /** + * TerminalMetadata title. + * @member {string} title + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.title = ""; + + /** + * TerminalMetadata level. + * @member {number} level + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.level = 0; + + /** + * Creates a new TerminalMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata instance + */ + TerminalMetadata.create = function create(properties) { + return new TerminalMetadata(properties); + }; + + /** + * Encodes the specified TerminalMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata} message TerminalMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.title); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.level); + return writer; + }; + + /** + * Encodes the specified TerminalMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata} message TerminalMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + case 4: { + message.title = reader.string(); + break; + } + case 5: { + message.level = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("name")) + throw $util.ProtocolError("missing required 'name'", { instance: message }); + if (!message.hasOwnProperty("title")) + throw $util.ProtocolError("missing required 'title'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + return message; + }; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerminalMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerminalMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isString(message.name)) + return "name: string expected"; + if (!$util.isString(message.title)) + return "title: string expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + return null; + }; + + /** + * Creates a TerminalMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata + */ + TerminalMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.title != null) + message.title = String(object.title); + if (object.level != null) + message.level = object.level >>> 0; + return message; + }; + + /** + * Creates a plain object from a TerminalMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} message TerminalMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerminalMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.name = ""; + object.title = ""; + object.level = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + return object; + }; + + /** + * Converts this TerminalMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + * @returns {Object.} JSON object + */ + TerminalMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerminalMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerminalMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.TerminalMetadata"; + }; + + return TerminalMetadata; + })(); + + SaveScreenshotRequest.AcquiringVersusStarMetadata = (function() { + + /** + * Properties of an AcquiringVersusStarMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IAcquiringVersusStarMetadata + * @property {number} tunePower AcquiringVersusStarMetadata tunePower + * @property {number} tuneHandling AcquiringVersusStarMetadata tuneHandling + * @property {number} vsStarCount AcquiringVersusStarMetadata vsStarCount + */ + + /** + * Constructs a new AcquiringVersusStarMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an AcquiringVersusStarMetadata. + * @implements IAcquiringVersusStarMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata=} [properties] Properties to set + */ + function AcquiringVersusStarMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcquiringVersusStarMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + */ + AcquiringVersusStarMetadata.prototype.tunePower = 0; + + /** + * AcquiringVersusStarMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + */ + AcquiringVersusStarMetadata.prototype.tuneHandling = 0; + + /** + * AcquiringVersusStarMetadata vsStarCount. + * @member {number} vsStarCount + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + */ + AcquiringVersusStarMetadata.prototype.vsStarCount = 0; + + /** + * Creates a new AcquiringVersusStarMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata instance + */ + AcquiringVersusStarMetadata.create = function create(properties) { + return new AcquiringVersusStarMetadata(properties); + }; + + /** + * Encodes the specified AcquiringVersusStarMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata} message AcquiringVersusStarMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringVersusStarMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.vsStarCount); + return writer; + }; + + /** + * Encodes the specified AcquiringVersusStarMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata} message AcquiringVersusStarMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringVersusStarMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringVersusStarMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.vsStarCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("vsStarCount")) + throw $util.ProtocolError("missing required 'vsStarCount'", { instance: message }); + return message; + }; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringVersusStarMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcquiringVersusStarMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcquiringVersusStarMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.vsStarCount)) + return "vsStarCount: integer expected"; + return null; + }; + + /** + * Creates an AcquiringVersusStarMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata + */ + AcquiringVersusStarMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.vsStarCount != null) + message.vsStarCount = object.vsStarCount >>> 0; + return message; + }; + + /** + * Creates a plain object from an AcquiringVersusStarMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} message AcquiringVersusStarMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcquiringVersusStarMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.vsStarCount = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + object.vsStarCount = message.vsStarCount; + return object; + }; + + /** + * Converts this AcquiringVersusStarMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + * @returns {Object.} JSON object + */ + AcquiringVersusStarMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcquiringVersusStarMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcquiringVersusStarMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata"; + }; + + return AcquiringVersusStarMetadata; + })(); + + SaveScreenshotRequest.AcquiringAuraMotifMetadata = (function() { + + /** + * Properties of an AcquiringAuraMotifMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IAcquiringAuraMotifMetadata + * @property {number} tunePower AcquiringAuraMotifMetadata tunePower + * @property {number} tuneHandling AcquiringAuraMotifMetadata tuneHandling + * @property {number} auraMotif AcquiringAuraMotifMetadata auraMotif + */ + + /** + * Constructs a new AcquiringAuraMotifMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an AcquiringAuraMotifMetadata. + * @implements IAcquiringAuraMotifMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata=} [properties] Properties to set + */ + function AcquiringAuraMotifMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcquiringAuraMotifMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + */ + AcquiringAuraMotifMetadata.prototype.tunePower = 0; + + /** + * AcquiringAuraMotifMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + */ + AcquiringAuraMotifMetadata.prototype.tuneHandling = 0; + + /** + * AcquiringAuraMotifMetadata auraMotif. + * @member {number} auraMotif + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + */ + AcquiringAuraMotifMetadata.prototype.auraMotif = 0; + + /** + * Creates a new AcquiringAuraMotifMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata instance + */ + AcquiringAuraMotifMetadata.create = function create(properties) { + return new AcquiringAuraMotifMetadata(properties); + }; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata} message AcquiringAuraMotifMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringAuraMotifMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.auraMotif); + return writer; + }; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata} message AcquiringAuraMotifMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringAuraMotifMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringAuraMotifMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.auraMotif = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("auraMotif")) + throw $util.ProtocolError("missing required 'auraMotif'", { instance: message }); + return message; + }; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringAuraMotifMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcquiringAuraMotifMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcquiringAuraMotifMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.auraMotif)) + return "auraMotif: integer expected"; + return null; + }; + + /** + * Creates an AcquiringAuraMotifMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata + */ + AcquiringAuraMotifMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.auraMotif != null) + message.auraMotif = object.auraMotif >>> 0; + return message; + }; + + /** + * Creates a plain object from an AcquiringAuraMotifMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} message AcquiringAuraMotifMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcquiringAuraMotifMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.auraMotif = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.auraMotif != null && message.hasOwnProperty("auraMotif")) + object.auraMotif = message.auraMotif; + return object; + }; + + /** + * Converts this AcquiringAuraMotifMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + * @returns {Object.} JSON object + */ + AcquiringAuraMotifMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcquiringAuraMotifMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcquiringAuraMotifMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata"; + }; + + return AcquiringAuraMotifMetadata; + })(); + + SaveScreenshotRequest.GhostRegionMapMetadata = (function() { + + /** + * Properties of a GhostRegionMapMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IGhostRegionMapMetadata + * @property {number} tunePower GhostRegionMapMetadata tunePower + * @property {number} tuneHandling GhostRegionMapMetadata tuneHandling + * @property {number} rgScore GhostRegionMapMetadata rgScore + * @property {Array.|null} [rgRegionMapScore] GhostRegionMapMetadata rgRegionMapScore + */ + + /** + * Constructs a new GhostRegionMapMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a GhostRegionMapMetadata. + * @implements IGhostRegionMapMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata=} [properties] Properties to set + */ + function GhostRegionMapMetadata(properties) { + this.rgRegionMapScore = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostRegionMapMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.tunePower = 0; + + /** + * GhostRegionMapMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.tuneHandling = 0; + + /** + * GhostRegionMapMetadata rgScore. + * @member {number} rgScore + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.rgScore = 0; + + /** + * GhostRegionMapMetadata rgRegionMapScore. + * @member {Array.} rgRegionMapScore + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.rgRegionMapScore = $util.emptyArray; + + /** + * Creates a new GhostRegionMapMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata instance + */ + GhostRegionMapMetadata.create = function create(properties) { + return new GhostRegionMapMetadata(properties); + }; + + /** + * Encodes the specified GhostRegionMapMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata} message GhostRegionMapMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostRegionMapMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rgScore); + if (message.rgRegionMapScore != null && message.rgRegionMapScore.length) + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.rgRegionMapScore[i]); + return writer; + }; + + /** + * Encodes the specified GhostRegionMapMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata} message GhostRegionMapMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostRegionMapMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostRegionMapMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.rgScore = reader.uint32(); + break; + } + case 4: { + if (!(message.rgRegionMapScore && message.rgRegionMapScore.length)) + message.rgRegionMapScore = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegionMapScore.push(reader.uint32()); + } else + message.rgRegionMapScore.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("rgScore")) + throw $util.ProtocolError("missing required 'rgScore'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostRegionMapMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostRegionMapMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostRegionMapMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.rgScore)) + return "rgScore: integer expected"; + if (message.rgRegionMapScore != null && message.hasOwnProperty("rgRegionMapScore")) { + if (!Array.isArray(message.rgRegionMapScore)) + return "rgRegionMapScore: array expected"; + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + if (!$util.isInteger(message.rgRegionMapScore[i])) + return "rgRegionMapScore: integer[] expected"; + } + return null; + }; + + /** + * Creates a GhostRegionMapMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata + */ + GhostRegionMapMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.rgScore != null) + message.rgScore = object.rgScore >>> 0; + if (object.rgRegionMapScore) { + if (!Array.isArray(object.rgRegionMapScore)) + throw TypeError(".wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.rgRegionMapScore: array expected"); + message.rgRegionMapScore = []; + for (let i = 0; i < object.rgRegionMapScore.length; ++i) + message.rgRegionMapScore[i] = object.rgRegionMapScore[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a GhostRegionMapMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} message GhostRegionMapMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostRegionMapMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.rgRegionMapScore = []; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.rgScore = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.rgScore != null && message.hasOwnProperty("rgScore")) + object.rgScore = message.rgScore; + if (message.rgRegionMapScore && message.rgRegionMapScore.length) { + object.rgRegionMapScore = []; + for (let j = 0; j < message.rgRegionMapScore.length; ++j) + object.rgRegionMapScore[j] = message.rgRegionMapScore[j]; + } + return object; + }; + + /** + * Converts this GhostRegionMapMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + * @returns {Object.} JSON object + */ + GhostRegionMapMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostRegionMapMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostRegionMapMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata"; + }; + + return GhostRegionMapMetadata; + })(); + + SaveScreenshotRequest.AcquiringCrownMetadata = (function() { + + /** + * Properties of an AcquiringCrownMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IAcquiringCrownMetadata + * @property {number} tunePower AcquiringCrownMetadata tunePower + * @property {number} tuneHandling AcquiringCrownMetadata tuneHandling + * @property {number} area AcquiringCrownMetadata area + */ + + /** + * Constructs a new AcquiringCrownMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an AcquiringCrownMetadata. + * @implements IAcquiringCrownMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata=} [properties] Properties to set + */ + function AcquiringCrownMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcquiringCrownMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + */ + AcquiringCrownMetadata.prototype.tunePower = 0; + + /** + * AcquiringCrownMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + */ + AcquiringCrownMetadata.prototype.tuneHandling = 0; + + /** + * AcquiringCrownMetadata area. + * @member {number} area + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + */ + AcquiringCrownMetadata.prototype.area = 0; + + /** + * Creates a new AcquiringCrownMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata instance + */ + AcquiringCrownMetadata.create = function create(properties) { + return new AcquiringCrownMetadata(properties); + }; + + /** + * Encodes the specified AcquiringCrownMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata} message AcquiringCrownMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringCrownMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + return writer; + }; + + /** + * Encodes the specified AcquiringCrownMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata} message AcquiringCrownMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringCrownMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringCrownMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringCrownMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcquiringCrownMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcquiringCrownMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + return null; + }; + + /** + * Creates an AcquiringCrownMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata + */ + AcquiringCrownMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + return message; + }; + + /** + * Creates a plain object from an AcquiringCrownMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} message AcquiringCrownMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcquiringCrownMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.area = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + return object; + }; + + /** + * Converts this AcquiringCrownMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + * @returns {Object.} JSON object + */ + AcquiringCrownMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcquiringCrownMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcquiringCrownMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata"; + }; + + return AcquiringCrownMetadata; + })(); + + SaveScreenshotRequest.GhostCompetitionResultMetadata = (function() { + + /** + * Properties of a GhostCompetitionResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IGhostCompetitionResultMetadata + * @property {number} tunePower GhostCompetitionResultMetadata tunePower + * @property {number} tuneHandling GhostCompetitionResultMetadata tuneHandling + * @property {number|null} [rank] GhostCompetitionResultMetadata rank + * @property {number} result GhostCompetitionResultMetadata result + */ + + /** + * Constructs a new GhostCompetitionResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a GhostCompetitionResultMetadata. + * @implements IGhostCompetitionResultMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata=} [properties] Properties to set + */ + function GhostCompetitionResultMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionResultMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.tunePower = 0; + + /** + * GhostCompetitionResultMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.tuneHandling = 0; + + /** + * GhostCompetitionResultMetadata rank. + * @member {number} rank + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.rank = 0; + + /** + * GhostCompetitionResultMetadata result. + * @member {number} result + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.result = 0; + + /** + * Creates a new GhostCompetitionResultMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata instance + */ + GhostCompetitionResultMetadata.create = function create(properties) { + return new GhostCompetitionResultMetadata(properties); + }; + + /** + * Encodes the specified GhostCompetitionResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata} message GhostCompetitionResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionResultMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rank); + writer.uint32(/* id 4, wireType 0 =*/32).sint32(message.result); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata} message GhostCompetitionResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionResultMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionResultMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.rank = reader.uint32(); + break; + } + case 4: { + message.result = reader.sint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionResultMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionResultMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionResultMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.rank != null && message.hasOwnProperty("rank")) + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + return null; + }; + + /** + * Creates a GhostCompetitionResultMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata + */ + GhostCompetitionResultMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.rank != null) + message.rank = object.rank >>> 0; + if (object.result != null) + message.result = object.result | 0; + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionResultMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} message GhostCompetitionResultMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionResultMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.rank = 0; + object.result = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + return object; + }; + + /** + * Converts this GhostCompetitionResultMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionResultMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionResultMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionResultMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata"; + }; + + return GhostCompetitionResultMetadata; + })(); + + SaveScreenshotRequest.TimeAttackResultMetadata = (function() { + + /** + * Properties of a TimeAttackResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface ITimeAttackResultMetadata + * @property {number} tunePower TimeAttackResultMetadata tunePower + * @property {number} tuneHandling TimeAttackResultMetadata tuneHandling + * @property {number} course TimeAttackResultMetadata course + * @property {number|null} [wholeRank] TimeAttackResultMetadata wholeRank + * @property {number|null} [modelRank] TimeAttackResultMetadata modelRank + */ + + /** + * Constructs a new TimeAttackResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a TimeAttackResultMetadata. + * @implements ITimeAttackResultMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata=} [properties] Properties to set + */ + function TimeAttackResultMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeAttackResultMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.tunePower = 0; + + /** + * TimeAttackResultMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.tuneHandling = 0; + + /** + * TimeAttackResultMetadata course. + * @member {number} course + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.course = 0; + + /** + * TimeAttackResultMetadata wholeRank. + * @member {number} wholeRank + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.wholeRank = 0; + + /** + * TimeAttackResultMetadata modelRank. + * @member {number} modelRank + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.modelRank = 0; + + /** + * Creates a new TimeAttackResultMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata instance + */ + TimeAttackResultMetadata.create = function create(properties) { + return new TimeAttackResultMetadata(properties); + }; + + /** + * Encodes the specified TimeAttackResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata} message TimeAttackResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResultMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.course); + if (message.wholeRank != null && Object.hasOwnProperty.call(message, "wholeRank")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.wholeRank); + if (message.modelRank != null && Object.hasOwnProperty.call(message, "modelRank")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.modelRank); + return writer; + }; + + /** + * Encodes the specified TimeAttackResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata} message TimeAttackResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResultMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResultMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.course = reader.uint32(); + break; + } + case 4: { + message.wholeRank = reader.uint32(); + break; + } + case 5: { + message.modelRank = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + return message; + }; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResultMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeAttackResultMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeAttackResultMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + if (!$util.isInteger(message.wholeRank)) + return "wholeRank: integer expected"; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + if (!$util.isInteger(message.modelRank)) + return "modelRank: integer expected"; + return null; + }; + + /** + * Creates a TimeAttackResultMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata + */ + TimeAttackResultMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.course != null) + message.course = object.course >>> 0; + if (object.wholeRank != null) + message.wholeRank = object.wholeRank >>> 0; + if (object.modelRank != null) + message.modelRank = object.modelRank >>> 0; + return message; + }; + + /** + * Creates a plain object from a TimeAttackResultMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} message TimeAttackResultMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeAttackResultMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.course = 0; + object.wholeRank = 0; + object.modelRank = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + object.wholeRank = message.wholeRank; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + object.modelRank = message.modelRank; + return object; + }; + + /** + * Converts this TimeAttackResultMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + * @returns {Object.} JSON object + */ + TimeAttackResultMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeAttackResultMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeAttackResultMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata"; + }; + + return TimeAttackResultMetadata; + })(); + + SaveScreenshotRequest.LevelUpMetadata = (function() { + + /** + * Properties of a LevelUpMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface ILevelUpMetadata + * @property {number} tunePower LevelUpMetadata tunePower + * @property {number} tuneHandling LevelUpMetadata tuneHandling + * @property {number} level LevelUpMetadata level + */ + + /** + * Constructs a new LevelUpMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a LevelUpMetadata. + * @implements ILevelUpMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata=} [properties] Properties to set + */ + function LevelUpMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LevelUpMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + */ + LevelUpMetadata.prototype.tunePower = 0; + + /** + * LevelUpMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + */ + LevelUpMetadata.prototype.tuneHandling = 0; + + /** + * LevelUpMetadata level. + * @member {number} level + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + */ + LevelUpMetadata.prototype.level = 0; + + /** + * Creates a new LevelUpMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata instance + */ + LevelUpMetadata.create = function create(properties) { + return new LevelUpMetadata(properties); + }; + + /** + * Encodes the specified LevelUpMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata} message LevelUpMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LevelUpMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.level); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tunePower); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuneHandling); + return writer; + }; + + /** + * Encodes the specified LevelUpMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata} message LevelUpMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LevelUpMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LevelUpMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.tunePower = reader.uint32(); + break; + } + case 3: { + message.tuneHandling = reader.uint32(); + break; + } + case 1: { + message.level = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + return message; + }; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LevelUpMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LevelUpMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LevelUpMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + return null; + }; + + /** + * Creates a LevelUpMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata + */ + LevelUpMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.level != null) + message.level = object.level >>> 0; + return message; + }; + + /** + * Creates a plain object from a LevelUpMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} message LevelUpMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LevelUpMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.level = 0; + object.tunePower = 0; + object.tuneHandling = 0; + } + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + return object; + }; + + /** + * Converts this LevelUpMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + * @returns {Object.} JSON object + */ + LevelUpMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LevelUpMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LevelUpMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.LevelUpMetadata"; + }; + + return LevelUpMetadata; + })(); + + SaveScreenshotRequest.OpponentCar = (function() { + + /** + * Properties of an OpponentCar. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IOpponentCar + * @property {number|null} [carId] OpponentCar carId + * @property {number} tunePower OpponentCar tunePower + * @property {number} tuneHandling OpponentCar tuneHandling + */ + + /** + * Constructs a new OpponentCar. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an OpponentCar. + * @implements IOpponentCar + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar=} [properties] Properties to set + */ + function OpponentCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OpponentCar carId. + * @member {number} carId + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + */ + OpponentCar.prototype.carId = 0; + + /** + * OpponentCar tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + */ + OpponentCar.prototype.tunePower = 0; + + /** + * OpponentCar tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + */ + OpponentCar.prototype.tuneHandling = 0; + + /** + * Creates a new OpponentCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar instance + */ + OpponentCar.create = function create(properties) { + return new OpponentCar(properties); + }; + + /** + * Encodes the specified OpponentCar message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar} message OpponentCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpponentCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tunePower); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuneHandling); + return writer; + }; + + /** + * Encodes the specified OpponentCar message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar} message OpponentCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpponentCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OpponentCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpponentCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.OpponentCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.tunePower = reader.uint32(); + break; + } + case 3: { + message.tuneHandling = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes an OpponentCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpponentCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpponentCar message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpponentCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + return null; + }; + + /** + * Creates an OpponentCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar + */ + OpponentCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.OpponentCar) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.OpponentCar(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + return message; + }; + + /** + * Creates a plain object from an OpponentCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.OpponentCar} message OpponentCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpponentCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.tunePower = 0; + object.tuneHandling = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + return object; + }; + + /** + * Converts this OpponentCar to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + * @returns {Object.} JSON object + */ + OpponentCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpponentCar + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpponentCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.OpponentCar"; + }; + + return OpponentCar; + })(); + + return SaveScreenshotRequest; + })(); + + protobuf.SaveScreenshotResponse = (function() { + + /** + * Properties of a SaveScreenshotResponse. + * @memberof wm.protobuf + * @interface ISaveScreenshotResponse + * @property {wm.protobuf.ErrorCode} error SaveScreenshotResponse error + */ + + /** + * Constructs a new SaveScreenshotResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveScreenshotResponse. + * @implements ISaveScreenshotResponse + * @constructor + * @param {wm.protobuf.ISaveScreenshotResponse=} [properties] Properties to set + */ + function SaveScreenshotResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScreenshotResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveScreenshotResponse + * @instance + */ + SaveScreenshotResponse.prototype.error = 0; + + /** + * Creates a new SaveScreenshotResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.ISaveScreenshotResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse instance + */ + SaveScreenshotResponse.create = function create(properties) { + return new SaveScreenshotResponse(properties); + }; + + /** + * Encodes the specified SaveScreenshotResponse message. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.ISaveScreenshotResponse} message SaveScreenshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveScreenshotResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.ISaveScreenshotResponse} message SaveScreenshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScreenshotResponse message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScreenshotResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveScreenshotResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse + */ + SaveScreenshotResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotResponse) + return object; + let message = new $root.wm.protobuf.SaveScreenshotResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveScreenshotResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.SaveScreenshotResponse} message SaveScreenshotResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScreenshotResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveScreenshotResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotResponse + * @instance + * @returns {Object.} JSON object + */ + SaveScreenshotResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScreenshotResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScreenshotResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotResponse"; + }; + + return SaveScreenshotResponse; + })(); + + protobuf.SubmitClientLogRequest = (function() { + + /** + * Properties of a SubmitClientLogRequest. + * @memberof wm.protobuf + * @interface ISubmitClientLogRequest + * @property {Uint8Array} data SubmitClientLogRequest data + * @property {number} modifiedAt SubmitClientLogRequest modifiedAt + * @property {wm.protobuf.ClientLogType} logType SubmitClientLogRequest logType + */ + + /** + * Constructs a new SubmitClientLogRequest. + * @memberof wm.protobuf + * @classdesc Represents a SubmitClientLogRequest. + * @implements ISubmitClientLogRequest + * @constructor + * @param {wm.protobuf.ISubmitClientLogRequest=} [properties] Properties to set + */ + function SubmitClientLogRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubmitClientLogRequest data. + * @member {Uint8Array} data + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + */ + SubmitClientLogRequest.prototype.data = $util.newBuffer([]); + + /** + * SubmitClientLogRequest modifiedAt. + * @member {number} modifiedAt + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + */ + SubmitClientLogRequest.prototype.modifiedAt = 0; + + /** + * SubmitClientLogRequest logType. + * @member {wm.protobuf.ClientLogType} logType + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + */ + SubmitClientLogRequest.prototype.logType = 0; + + /** + * Creates a new SubmitClientLogRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.ISubmitClientLogRequest=} [properties] Properties to set + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest instance + */ + SubmitClientLogRequest.create = function create(properties) { + return new SubmitClientLogRequest(properties); + }; + + /** + * Encodes the specified SubmitClientLogRequest message. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.ISubmitClientLogRequest} message SubmitClientLogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.modifiedAt); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.logType); + return writer; + }; + + /** + * Encodes the specified SubmitClientLogRequest message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.ISubmitClientLogRequest} message SubmitClientLogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SubmitClientLogRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.data = reader.bytes(); + break; + } + case 2: { + message.modifiedAt = reader.uint32(); + break; + } + case 3: { + message.logType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("data")) + throw $util.ProtocolError("missing required 'data'", { instance: message }); + if (!message.hasOwnProperty("modifiedAt")) + throw $util.ProtocolError("missing required 'modifiedAt'", { instance: message }); + if (!message.hasOwnProperty("logType")) + throw $util.ProtocolError("missing required 'logType'", { instance: message }); + return message; + }; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubmitClientLogRequest message. + * @function verify + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubmitClientLogRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (!$util.isInteger(message.modifiedAt)) + return "modifiedAt: integer expected"; + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a SubmitClientLogRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest + */ + SubmitClientLogRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SubmitClientLogRequest) + return object; + let message = new $root.wm.protobuf.SubmitClientLogRequest(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + if (object.modifiedAt != null) + message.modifiedAt = object.modifiedAt >>> 0; + switch (object.logType) { + case "LOG_LOAD_REPORT": + case 0: + message.logType = 0; + break; + case "LOG_ERROR": + case 1: + message.logType = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a SubmitClientLogRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.SubmitClientLogRequest} message SubmitClientLogRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubmitClientLogRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.modifiedAt = 0; + object.logType = options.enums === String ? "LOG_LOAD_REPORT" : 0; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.modifiedAt != null && message.hasOwnProperty("modifiedAt")) + object.modifiedAt = message.modifiedAt; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = options.enums === String ? $root.wm.protobuf.ClientLogType[message.logType] : message.logType; + return object; + }; + + /** + * Converts this SubmitClientLogRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + * @returns {Object.} JSON object + */ + SubmitClientLogRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SubmitClientLogRequest + * @function getTypeUrl + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubmitClientLogRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SubmitClientLogRequest"; + }; + + return SubmitClientLogRequest; + })(); + + protobuf.SubmitClientLogResponse = (function() { + + /** + * Properties of a SubmitClientLogResponse. + * @memberof wm.protobuf + * @interface ISubmitClientLogResponse + * @property {wm.protobuf.ErrorCode} error SubmitClientLogResponse error + */ + + /** + * Constructs a new SubmitClientLogResponse. + * @memberof wm.protobuf + * @classdesc Represents a SubmitClientLogResponse. + * @implements ISubmitClientLogResponse + * @constructor + * @param {wm.protobuf.ISubmitClientLogResponse=} [properties] Properties to set + */ + function SubmitClientLogResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubmitClientLogResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SubmitClientLogResponse + * @instance + */ + SubmitClientLogResponse.prototype.error = 0; + + /** + * Creates a new SubmitClientLogResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.ISubmitClientLogResponse=} [properties] Properties to set + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse instance + */ + SubmitClientLogResponse.create = function create(properties) { + return new SubmitClientLogResponse(properties); + }; + + /** + * Encodes the specified SubmitClientLogResponse message. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.ISubmitClientLogResponse} message SubmitClientLogResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SubmitClientLogResponse message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.ISubmitClientLogResponse} message SubmitClientLogResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SubmitClientLogResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubmitClientLogResponse message. + * @function verify + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubmitClientLogResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SubmitClientLogResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse + */ + SubmitClientLogResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SubmitClientLogResponse) + return object; + let message = new $root.wm.protobuf.SubmitClientLogResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SubmitClientLogResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.SubmitClientLogResponse} message SubmitClientLogResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubmitClientLogResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SubmitClientLogResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SubmitClientLogResponse + * @instance + * @returns {Object.} JSON object + */ + SubmitClientLogResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SubmitClientLogResponse + * @function getTypeUrl + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubmitClientLogResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SubmitClientLogResponse"; + }; + + return SubmitClientLogResponse; + })(); + + protobuf.LoadScratchInformationRequest = (function() { + + /** + * Properties of a LoadScratchInformationRequest. + * @memberof wm.protobuf + * @interface ILoadScratchInformationRequest + * @property {number} userId LoadScratchInformationRequest userId + */ + + /** + * Constructs a new LoadScratchInformationRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadScratchInformationRequest. + * @implements ILoadScratchInformationRequest + * @constructor + * @param {wm.protobuf.ILoadScratchInformationRequest=} [properties] Properties to set + */ + function LoadScratchInformationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadScratchInformationRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadScratchInformationRequest + * @instance + */ + LoadScratchInformationRequest.prototype.userId = 0; + + /** + * Creates a new LoadScratchInformationRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.ILoadScratchInformationRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest instance + */ + LoadScratchInformationRequest.create = function create(properties) { + return new LoadScratchInformationRequest(properties); + }; + + /** + * Encodes the specified LoadScratchInformationRequest message. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.ILoadScratchInformationRequest} message LoadScratchInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadScratchInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.ILoadScratchInformationRequest} message LoadScratchInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadScratchInformationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadScratchInformationRequest message. + * @function verify + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadScratchInformationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadScratchInformationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest + */ + LoadScratchInformationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadScratchInformationRequest) + return object; + let message = new $root.wm.protobuf.LoadScratchInformationRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadScratchInformationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.LoadScratchInformationRequest} message LoadScratchInformationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadScratchInformationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadScratchInformationRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadScratchInformationRequest + * @instance + * @returns {Object.} JSON object + */ + LoadScratchInformationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadScratchInformationRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadScratchInformationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadScratchInformationRequest"; + }; + + return LoadScratchInformationRequest; + })(); + + protobuf.LoadScratchInformationResponse = (function() { + + /** + * Properties of a LoadScratchInformationResponse. + * @memberof wm.protobuf + * @interface ILoadScratchInformationResponse + * @property {wm.protobuf.ErrorCode} error LoadScratchInformationResponse error + * @property {Array.|null} [scratchSheets] LoadScratchInformationResponse scratchSheets + * @property {number} currentSheet LoadScratchInformationResponse currentSheet + * @property {number} numOfScratched LoadScratchInformationResponse numOfScratched + * @property {Array.|null} [ownedUserItems] LoadScratchInformationResponse ownedUserItems + */ + + /** + * Constructs a new LoadScratchInformationResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadScratchInformationResponse. + * @implements ILoadScratchInformationResponse + * @constructor + * @param {wm.protobuf.ILoadScratchInformationResponse=} [properties] Properties to set + */ + function LoadScratchInformationResponse(properties) { + this.scratchSheets = []; + this.ownedUserItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadScratchInformationResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.error = 0; + + /** + * LoadScratchInformationResponse scratchSheets. + * @member {Array.} scratchSheets + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.scratchSheets = $util.emptyArray; + + /** + * LoadScratchInformationResponse currentSheet. + * @member {number} currentSheet + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.currentSheet = 0; + + /** + * LoadScratchInformationResponse numOfScratched. + * @member {number} numOfScratched + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.numOfScratched = 0; + + /** + * LoadScratchInformationResponse ownedUserItems. + * @member {Array.} ownedUserItems + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.ownedUserItems = $util.emptyArray; + + /** + * Creates a new LoadScratchInformationResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.ILoadScratchInformationResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse instance + */ + LoadScratchInformationResponse.create = function create(properties) { + return new LoadScratchInformationResponse(properties); + }; + + /** + * Encodes the specified LoadScratchInformationResponse message. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.ILoadScratchInformationResponse} message LoadScratchInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.scratchSheets != null && message.scratchSheets.length) + for (let i = 0; i < message.scratchSheets.length; ++i) + $root.wm.protobuf.ScratchSheet.encode(message.scratchSheets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.currentSheet); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.numOfScratched); + if (message.ownedUserItems != null && message.ownedUserItems.length) + for (let i = 0; i < message.ownedUserItems.length; ++i) + $root.wm.protobuf.UserItem.encode(message.ownedUserItems[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadScratchInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.ILoadScratchInformationResponse} message LoadScratchInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadScratchInformationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.scratchSheets && message.scratchSheets.length)) + message.scratchSheets = []; + message.scratchSheets.push($root.wm.protobuf.ScratchSheet.decode(reader, reader.uint32())); + break; + } + case 3: { + message.currentSheet = reader.uint32(); + break; + } + case 4: { + message.numOfScratched = reader.uint32(); + break; + } + case 5: { + if (!(message.ownedUserItems && message.ownedUserItems.length)) + message.ownedUserItems = []; + message.ownedUserItems.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("currentSheet")) + throw $util.ProtocolError("missing required 'currentSheet'", { instance: message }); + if (!message.hasOwnProperty("numOfScratched")) + throw $util.ProtocolError("missing required 'numOfScratched'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadScratchInformationResponse message. + * @function verify + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadScratchInformationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.scratchSheets != null && message.hasOwnProperty("scratchSheets")) { + if (!Array.isArray(message.scratchSheets)) + return "scratchSheets: array expected"; + for (let i = 0; i < message.scratchSheets.length; ++i) { + let error = $root.wm.protobuf.ScratchSheet.verify(message.scratchSheets[i]); + if (error) + return "scratchSheets." + error; + } + } + if (!$util.isInteger(message.currentSheet)) + return "currentSheet: integer expected"; + if (!$util.isInteger(message.numOfScratched)) + return "numOfScratched: integer expected"; + if (message.ownedUserItems != null && message.hasOwnProperty("ownedUserItems")) { + if (!Array.isArray(message.ownedUserItems)) + return "ownedUserItems: array expected"; + for (let i = 0; i < message.ownedUserItems.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.ownedUserItems[i]); + if (error) + return "ownedUserItems." + error; + } + } + return null; + }; + + /** + * Creates a LoadScratchInformationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse + */ + LoadScratchInformationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadScratchInformationResponse) + return object; + let message = new $root.wm.protobuf.LoadScratchInformationResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.scratchSheets) { + if (!Array.isArray(object.scratchSheets)) + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.scratchSheets: array expected"); + message.scratchSheets = []; + for (let i = 0; i < object.scratchSheets.length; ++i) { + if (typeof object.scratchSheets[i] !== "object") + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.scratchSheets: object expected"); + message.scratchSheets[i] = $root.wm.protobuf.ScratchSheet.fromObject(object.scratchSheets[i]); + } + } + if (object.currentSheet != null) + message.currentSheet = object.currentSheet >>> 0; + if (object.numOfScratched != null) + message.numOfScratched = object.numOfScratched >>> 0; + if (object.ownedUserItems) { + if (!Array.isArray(object.ownedUserItems)) + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.ownedUserItems: array expected"); + message.ownedUserItems = []; + for (let i = 0; i < object.ownedUserItems.length; ++i) { + if (typeof object.ownedUserItems[i] !== "object") + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.ownedUserItems: object expected"); + message.ownedUserItems[i] = $root.wm.protobuf.UserItem.fromObject(object.ownedUserItems[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadScratchInformationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.LoadScratchInformationResponse} message LoadScratchInformationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadScratchInformationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.scratchSheets = []; + object.ownedUserItems = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.currentSheet = 0; + object.numOfScratched = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.scratchSheets && message.scratchSheets.length) { + object.scratchSheets = []; + for (let j = 0; j < message.scratchSheets.length; ++j) + object.scratchSheets[j] = $root.wm.protobuf.ScratchSheet.toObject(message.scratchSheets[j], options); + } + if (message.currentSheet != null && message.hasOwnProperty("currentSheet")) + object.currentSheet = message.currentSheet; + if (message.numOfScratched != null && message.hasOwnProperty("numOfScratched")) + object.numOfScratched = message.numOfScratched; + if (message.ownedUserItems && message.ownedUserItems.length) { + object.ownedUserItems = []; + for (let j = 0; j < message.ownedUserItems.length; ++j) + object.ownedUserItems[j] = $root.wm.protobuf.UserItem.toObject(message.ownedUserItems[j], options); + } + return object; + }; + + /** + * Converts this LoadScratchInformationResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + * @returns {Object.} JSON object + */ + LoadScratchInformationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadScratchInformationResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadScratchInformationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadScratchInformationResponse"; + }; + + return LoadScratchInformationResponse; + })(); + + protobuf.SaveScratchSheetRequest = (function() { + + /** + * Properties of a SaveScratchSheetRequest. + * @memberof wm.protobuf + * @interface ISaveScratchSheetRequest + * @property {number} timestamp SaveScratchSheetRequest timestamp + * @property {number} targetSheet SaveScratchSheetRequest targetSheet + * @property {number} targetSquare SaveScratchSheetRequest targetSquare + * @property {number} userId SaveScratchSheetRequest userId + */ + + /** + * Constructs a new SaveScratchSheetRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveScratchSheetRequest. + * @implements ISaveScratchSheetRequest + * @constructor + * @param {wm.protobuf.ISaveScratchSheetRequest=} [properties] Properties to set + */ + function SaveScratchSheetRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScratchSheetRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.timestamp = 0; + + /** + * SaveScratchSheetRequest targetSheet. + * @member {number} targetSheet + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.targetSheet = 0; + + /** + * SaveScratchSheetRequest targetSquare. + * @member {number} targetSquare + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.targetSquare = 0; + + /** + * SaveScratchSheetRequest userId. + * @member {number} userId + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.userId = 0; + + /** + * Creates a new SaveScratchSheetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.ISaveScratchSheetRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest instance + */ + SaveScratchSheetRequest.create = function create(properties) { + return new SaveScratchSheetRequest(properties); + }; + + /** + * Encodes the specified SaveScratchSheetRequest message. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.ISaveScratchSheetRequest} message SaveScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.targetSheet); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetSquare); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.userId); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified SaveScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.ISaveScratchSheetRequest} message SaveScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScratchSheetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + message.timestamp = reader.uint32(); + break; + } + case 1: { + message.targetSheet = reader.uint32(); + break; + } + case 2: { + message.targetSquare = reader.uint32(); + break; + } + case 3: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + if (!message.hasOwnProperty("targetSheet")) + throw $util.ProtocolError("missing required 'targetSheet'", { instance: message }); + if (!message.hasOwnProperty("targetSquare")) + throw $util.ProtocolError("missing required 'targetSquare'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScratchSheetRequest message. + * @function verify + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScratchSheetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (!$util.isInteger(message.targetSheet)) + return "targetSheet: integer expected"; + if (!$util.isInteger(message.targetSquare)) + return "targetSquare: integer expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a SaveScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest + */ + SaveScratchSheetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScratchSheetRequest) + return object; + let message = new $root.wm.protobuf.SaveScratchSheetRequest(); + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.targetSheet != null) + message.targetSheet = object.targetSheet >>> 0; + if (object.targetSquare != null) + message.targetSquare = object.targetSquare >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a SaveScratchSheetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.SaveScratchSheetRequest} message SaveScratchSheetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScratchSheetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.targetSheet = 0; + object.targetSquare = 0; + object.userId = 0; + object.timestamp = 0; + } + if (message.targetSheet != null && message.hasOwnProperty("targetSheet")) + object.targetSheet = message.targetSheet; + if (message.targetSquare != null && message.hasOwnProperty("targetSquare")) + object.targetSquare = message.targetSquare; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this SaveScratchSheetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + * @returns {Object.} JSON object + */ + SaveScratchSheetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScratchSheetRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScratchSheetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScratchSheetRequest"; + }; + + return SaveScratchSheetRequest; + })(); + + protobuf.SaveScratchSheetResponse = (function() { + + /** + * Properties of a SaveScratchSheetResponse. + * @memberof wm.protobuf + * @interface ISaveScratchSheetResponse + * @property {wm.protobuf.ErrorCode} error SaveScratchSheetResponse error + * @property {Array.|null} [scratchSheets] SaveScratchSheetResponse scratchSheets + * @property {number} currentSheet SaveScratchSheetResponse currentSheet + * @property {number} numOfScratched SaveScratchSheetResponse numOfScratched + * @property {wm.protobuf.IUserItem|null} [earnedItem] SaveScratchSheetResponse earnedItem + */ + + /** + * Constructs a new SaveScratchSheetResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveScratchSheetResponse. + * @implements ISaveScratchSheetResponse + * @constructor + * @param {wm.protobuf.ISaveScratchSheetResponse=} [properties] Properties to set + */ + function SaveScratchSheetResponse(properties) { + this.scratchSheets = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScratchSheetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.error = 0; + + /** + * SaveScratchSheetResponse scratchSheets. + * @member {Array.} scratchSheets + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.scratchSheets = $util.emptyArray; + + /** + * SaveScratchSheetResponse currentSheet. + * @member {number} currentSheet + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.currentSheet = 0; + + /** + * SaveScratchSheetResponse numOfScratched. + * @member {number} numOfScratched + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.numOfScratched = 0; + + /** + * SaveScratchSheetResponse earnedItem. + * @member {wm.protobuf.IUserItem|null|undefined} earnedItem + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.earnedItem = null; + + /** + * Creates a new SaveScratchSheetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.ISaveScratchSheetResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse instance + */ + SaveScratchSheetResponse.create = function create(properties) { + return new SaveScratchSheetResponse(properties); + }; + + /** + * Encodes the specified SaveScratchSheetResponse message. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.ISaveScratchSheetResponse} message SaveScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.scratchSheets != null && message.scratchSheets.length) + for (let i = 0; i < message.scratchSheets.length; ++i) + $root.wm.protobuf.ScratchSheet.encode(message.scratchSheets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.currentSheet); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.numOfScratched); + if (message.earnedItem != null && Object.hasOwnProperty.call(message, "earnedItem")) + $root.wm.protobuf.UserItem.encode(message.earnedItem, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.ISaveScratchSheetResponse} message SaveScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScratchSheetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.scratchSheets && message.scratchSheets.length)) + message.scratchSheets = []; + message.scratchSheets.push($root.wm.protobuf.ScratchSheet.decode(reader, reader.uint32())); + break; + } + case 3: { + message.currentSheet = reader.uint32(); + break; + } + case 4: { + message.numOfScratched = reader.uint32(); + break; + } + case 5: { + message.earnedItem = $root.wm.protobuf.UserItem.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("currentSheet")) + throw $util.ProtocolError("missing required 'currentSheet'", { instance: message }); + if (!message.hasOwnProperty("numOfScratched")) + throw $util.ProtocolError("missing required 'numOfScratched'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScratchSheetResponse message. + * @function verify + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScratchSheetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.scratchSheets != null && message.hasOwnProperty("scratchSheets")) { + if (!Array.isArray(message.scratchSheets)) + return "scratchSheets: array expected"; + for (let i = 0; i < message.scratchSheets.length; ++i) { + let error = $root.wm.protobuf.ScratchSheet.verify(message.scratchSheets[i]); + if (error) + return "scratchSheets." + error; + } + } + if (!$util.isInteger(message.currentSheet)) + return "currentSheet: integer expected"; + if (!$util.isInteger(message.numOfScratched)) + return "numOfScratched: integer expected"; + if (message.earnedItem != null && message.hasOwnProperty("earnedItem")) { + let error = $root.wm.protobuf.UserItem.verify(message.earnedItem); + if (error) + return "earnedItem." + error; + } + return null; + }; + + /** + * Creates a SaveScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse + */ + SaveScratchSheetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScratchSheetResponse) + return object; + let message = new $root.wm.protobuf.SaveScratchSheetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.scratchSheets) { + if (!Array.isArray(object.scratchSheets)) + throw TypeError(".wm.protobuf.SaveScratchSheetResponse.scratchSheets: array expected"); + message.scratchSheets = []; + for (let i = 0; i < object.scratchSheets.length; ++i) { + if (typeof object.scratchSheets[i] !== "object") + throw TypeError(".wm.protobuf.SaveScratchSheetResponse.scratchSheets: object expected"); + message.scratchSheets[i] = $root.wm.protobuf.ScratchSheet.fromObject(object.scratchSheets[i]); + } + } + if (object.currentSheet != null) + message.currentSheet = object.currentSheet >>> 0; + if (object.numOfScratched != null) + message.numOfScratched = object.numOfScratched >>> 0; + if (object.earnedItem != null) { + if (typeof object.earnedItem !== "object") + throw TypeError(".wm.protobuf.SaveScratchSheetResponse.earnedItem: object expected"); + message.earnedItem = $root.wm.protobuf.UserItem.fromObject(object.earnedItem); + } + return message; + }; + + /** + * Creates a plain object from a SaveScratchSheetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.SaveScratchSheetResponse} message SaveScratchSheetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScratchSheetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.scratchSheets = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.currentSheet = 0; + object.numOfScratched = 0; + object.earnedItem = null; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.scratchSheets && message.scratchSheets.length) { + object.scratchSheets = []; + for (let j = 0; j < message.scratchSheets.length; ++j) + object.scratchSheets[j] = $root.wm.protobuf.ScratchSheet.toObject(message.scratchSheets[j], options); + } + if (message.currentSheet != null && message.hasOwnProperty("currentSheet")) + object.currentSheet = message.currentSheet; + if (message.numOfScratched != null && message.hasOwnProperty("numOfScratched")) + object.numOfScratched = message.numOfScratched; + if (message.earnedItem != null && message.hasOwnProperty("earnedItem")) + object.earnedItem = $root.wm.protobuf.UserItem.toObject(message.earnedItem, options); + return object; + }; + + /** + * Converts this SaveScratchSheetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + * @returns {Object.} JSON object + */ + SaveScratchSheetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScratchSheetResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScratchSheetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScratchSheetResponse"; + }; + + return SaveScratchSheetResponse; + })(); + + protobuf.TurnScratchSheetRequest = (function() { + + /** + * Properties of a TurnScratchSheetRequest. + * @memberof wm.protobuf + * @interface ITurnScratchSheetRequest + * @property {number} userId TurnScratchSheetRequest userId + * @property {number} targetSheet TurnScratchSheetRequest targetSheet + */ + + /** + * Constructs a new TurnScratchSheetRequest. + * @memberof wm.protobuf + * @classdesc Represents a TurnScratchSheetRequest. + * @implements ITurnScratchSheetRequest + * @constructor + * @param {wm.protobuf.ITurnScratchSheetRequest=} [properties] Properties to set + */ + function TurnScratchSheetRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TurnScratchSheetRequest userId. + * @member {number} userId + * @memberof wm.protobuf.TurnScratchSheetRequest + * @instance + */ + TurnScratchSheetRequest.prototype.userId = 0; + + /** + * TurnScratchSheetRequest targetSheet. + * @member {number} targetSheet + * @memberof wm.protobuf.TurnScratchSheetRequest + * @instance + */ + TurnScratchSheetRequest.prototype.targetSheet = 0; + + /** + * Creates a new TurnScratchSheetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.ITurnScratchSheetRequest=} [properties] Properties to set + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest instance + */ + TurnScratchSheetRequest.create = function create(properties) { + return new TurnScratchSheetRequest(properties); + }; + + /** + * Encodes the specified TurnScratchSheetRequest message. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.ITurnScratchSheetRequest} message TurnScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetSheet); + return writer; + }; + + /** + * Encodes the specified TurnScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.ITurnScratchSheetRequest} message TurnScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TurnScratchSheetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.targetSheet = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("targetSheet")) + throw $util.ProtocolError("missing required 'targetSheet'", { instance: message }); + return message; + }; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TurnScratchSheetRequest message. + * @function verify + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TurnScratchSheetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.targetSheet)) + return "targetSheet: integer expected"; + return null; + }; + + /** + * Creates a TurnScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest + */ + TurnScratchSheetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TurnScratchSheetRequest) + return object; + let message = new $root.wm.protobuf.TurnScratchSheetRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.targetSheet != null) + message.targetSheet = object.targetSheet >>> 0; + return message; + }; + + /** + * Creates a plain object from a TurnScratchSheetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.TurnScratchSheetRequest} message TurnScratchSheetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TurnScratchSheetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.targetSheet = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.targetSheet != null && message.hasOwnProperty("targetSheet")) + object.targetSheet = message.targetSheet; + return object; + }; + + /** + * Converts this TurnScratchSheetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.TurnScratchSheetRequest + * @instance + * @returns {Object.} JSON object + */ + TurnScratchSheetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TurnScratchSheetRequest + * @function getTypeUrl + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TurnScratchSheetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TurnScratchSheetRequest"; + }; + + return TurnScratchSheetRequest; + })(); + + protobuf.TurnScratchSheetResponse = (function() { + + /** + * Properties of a TurnScratchSheetResponse. + * @memberof wm.protobuf + * @interface ITurnScratchSheetResponse + * @property {wm.protobuf.ErrorCode} error TurnScratchSheetResponse error + */ + + /** + * Constructs a new TurnScratchSheetResponse. + * @memberof wm.protobuf + * @classdesc Represents a TurnScratchSheetResponse. + * @implements ITurnScratchSheetResponse + * @constructor + * @param {wm.protobuf.ITurnScratchSheetResponse=} [properties] Properties to set + */ + function TurnScratchSheetResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TurnScratchSheetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.TurnScratchSheetResponse + * @instance + */ + TurnScratchSheetResponse.prototype.error = 0; + + /** + * Creates a new TurnScratchSheetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.ITurnScratchSheetResponse=} [properties] Properties to set + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse instance + */ + TurnScratchSheetResponse.create = function create(properties) { + return new TurnScratchSheetResponse(properties); + }; + + /** + * Encodes the specified TurnScratchSheetResponse message. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.ITurnScratchSheetResponse} message TurnScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified TurnScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.ITurnScratchSheetResponse} message TurnScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TurnScratchSheetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TurnScratchSheetResponse message. + * @function verify + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TurnScratchSheetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a TurnScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse + */ + TurnScratchSheetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TurnScratchSheetResponse) + return object; + let message = new $root.wm.protobuf.TurnScratchSheetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a TurnScratchSheetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.TurnScratchSheetResponse} message TurnScratchSheetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TurnScratchSheetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this TurnScratchSheetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.TurnScratchSheetResponse + * @instance + * @returns {Object.} JSON object + */ + TurnScratchSheetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TurnScratchSheetResponse + * @function getTypeUrl + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TurnScratchSheetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TurnScratchSheetResponse"; + }; + + return TurnScratchSheetResponse; + })(); + + protobuf.CheckItemReceivableCarsRequest = (function() { + + /** + * Properties of a CheckItemReceivableCarsRequest. + * @memberof wm.protobuf + * @interface ICheckItemReceivableCarsRequest + * @property {number} userId CheckItemReceivableCarsRequest userId + * @property {Array.|null} [itemsToBeEarned] CheckItemReceivableCarsRequest itemsToBeEarned + */ + + /** + * Constructs a new CheckItemReceivableCarsRequest. + * @memberof wm.protobuf + * @classdesc Represents a CheckItemReceivableCarsRequest. + * @implements ICheckItemReceivableCarsRequest + * @constructor + * @param {wm.protobuf.ICheckItemReceivableCarsRequest=} [properties] Properties to set + */ + function CheckItemReceivableCarsRequest(properties) { + this.itemsToBeEarned = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckItemReceivableCarsRequest userId. + * @member {number} userId + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @instance + */ + CheckItemReceivableCarsRequest.prototype.userId = 0; + + /** + * CheckItemReceivableCarsRequest itemsToBeEarned. + * @member {Array.} itemsToBeEarned + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @instance + */ + CheckItemReceivableCarsRequest.prototype.itemsToBeEarned = $util.emptyArray; + + /** + * Creates a new CheckItemReceivableCarsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsRequest=} [properties] Properties to set + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest instance + */ + CheckItemReceivableCarsRequest.create = function create(properties) { + return new CheckItemReceivableCarsRequest(properties); + }; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsRequest} message CheckItemReceivableCarsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.itemsToBeEarned != null && message.itemsToBeEarned.length) + for (let i = 0; i < message.itemsToBeEarned.length; ++i) + $root.wm.protobuf.UserItem.encode(message.itemsToBeEarned[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsRequest} message CheckItemReceivableCarsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CheckItemReceivableCarsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + if (!(message.itemsToBeEarned && message.itemsToBeEarned.length)) + message.itemsToBeEarned = []; + message.itemsToBeEarned.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckItemReceivableCarsRequest message. + * @function verify + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckItemReceivableCarsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.itemsToBeEarned != null && message.hasOwnProperty("itemsToBeEarned")) { + if (!Array.isArray(message.itemsToBeEarned)) + return "itemsToBeEarned: array expected"; + for (let i = 0; i < message.itemsToBeEarned.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.itemsToBeEarned[i]); + if (error) + return "itemsToBeEarned." + error; + } + } + return null; + }; + + /** + * Creates a CheckItemReceivableCarsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest + */ + CheckItemReceivableCarsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CheckItemReceivableCarsRequest) + return object; + let message = new $root.wm.protobuf.CheckItemReceivableCarsRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.itemsToBeEarned) { + if (!Array.isArray(object.itemsToBeEarned)) + throw TypeError(".wm.protobuf.CheckItemReceivableCarsRequest.itemsToBeEarned: array expected"); + message.itemsToBeEarned = []; + for (let i = 0; i < object.itemsToBeEarned.length; ++i) { + if (typeof object.itemsToBeEarned[i] !== "object") + throw TypeError(".wm.protobuf.CheckItemReceivableCarsRequest.itemsToBeEarned: object expected"); + message.itemsToBeEarned[i] = $root.wm.protobuf.UserItem.fromObject(object.itemsToBeEarned[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CheckItemReceivableCarsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.CheckItemReceivableCarsRequest} message CheckItemReceivableCarsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckItemReceivableCarsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.itemsToBeEarned = []; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.itemsToBeEarned && message.itemsToBeEarned.length) { + object.itemsToBeEarned = []; + for (let j = 0; j < message.itemsToBeEarned.length; ++j) + object.itemsToBeEarned[j] = $root.wm.protobuf.UserItem.toObject(message.itemsToBeEarned[j], options); + } + return object; + }; + + /** + * Converts this CheckItemReceivableCarsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @instance + * @returns {Object.} JSON object + */ + CheckItemReceivableCarsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckItemReceivableCarsRequest + * @function getTypeUrl + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckItemReceivableCarsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CheckItemReceivableCarsRequest"; + }; + + return CheckItemReceivableCarsRequest; + })(); + + protobuf.CheckItemReceivableCarsResponse = (function() { + + /** + * Properties of a CheckItemReceivableCarsResponse. + * @memberof wm.protobuf + * @interface ICheckItemReceivableCarsResponse + * @property {wm.protobuf.ErrorCode} error CheckItemReceivableCarsResponse error + * @property {Array.|null} [carIds] CheckItemReceivableCarsResponse carIds + */ + + /** + * Constructs a new CheckItemReceivableCarsResponse. + * @memberof wm.protobuf + * @classdesc Represents a CheckItemReceivableCarsResponse. + * @implements ICheckItemReceivableCarsResponse + * @constructor + * @param {wm.protobuf.ICheckItemReceivableCarsResponse=} [properties] Properties to set + */ + function CheckItemReceivableCarsResponse(properties) { + this.carIds = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckItemReceivableCarsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @instance + */ + CheckItemReceivableCarsResponse.prototype.error = 0; + + /** + * CheckItemReceivableCarsResponse carIds. + * @member {Array.} carIds + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @instance + */ + CheckItemReceivableCarsResponse.prototype.carIds = $util.emptyArray; + + /** + * Creates a new CheckItemReceivableCarsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsResponse=} [properties] Properties to set + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse instance + */ + CheckItemReceivableCarsResponse.create = function create(properties) { + return new CheckItemReceivableCarsResponse(properties); + }; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsResponse} message CheckItemReceivableCarsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.carIds != null && message.carIds.length) + for (let i = 0; i < message.carIds.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.carIds[i]); + return writer; + }; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsResponse} message CheckItemReceivableCarsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CheckItemReceivableCarsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.carIds && message.carIds.length)) + message.carIds = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.carIds.push(reader.uint32()); + } else + message.carIds.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckItemReceivableCarsResponse message. + * @function verify + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckItemReceivableCarsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.carIds != null && message.hasOwnProperty("carIds")) { + if (!Array.isArray(message.carIds)) + return "carIds: array expected"; + for (let i = 0; i < message.carIds.length; ++i) + if (!$util.isInteger(message.carIds[i])) + return "carIds: integer[] expected"; + } + return null; + }; + + /** + * Creates a CheckItemReceivableCarsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse + */ + CheckItemReceivableCarsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CheckItemReceivableCarsResponse) + return object; + let message = new $root.wm.protobuf.CheckItemReceivableCarsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.carIds) { + if (!Array.isArray(object.carIds)) + throw TypeError(".wm.protobuf.CheckItemReceivableCarsResponse.carIds: array expected"); + message.carIds = []; + for (let i = 0; i < object.carIds.length; ++i) + message.carIds[i] = object.carIds[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a CheckItemReceivableCarsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.CheckItemReceivableCarsResponse} message CheckItemReceivableCarsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckItemReceivableCarsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.carIds = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.carIds && message.carIds.length) { + object.carIds = []; + for (let j = 0; j < message.carIds.length; ++j) + object.carIds[j] = message.carIds[j]; + } + return object; + }; + + /** + * Converts this CheckItemReceivableCarsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @instance + * @returns {Object.} JSON object + */ + CheckItemReceivableCarsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckItemReceivableCarsResponse + * @function getTypeUrl + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckItemReceivableCarsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CheckItemReceivableCarsResponse"; + }; + + return CheckItemReceivableCarsResponse; + })(); + + protobuf.ReceiveUserItemsRequest = (function() { + + /** + * Properties of a ReceiveUserItemsRequest. + * @memberof wm.protobuf + * @interface IReceiveUserItemsRequest + * @property {number} carId ReceiveUserItemsRequest carId + * @property {Array.|null} [targetItemIds] ReceiveUserItemsRequest targetItemIds + */ + + /** + * Constructs a new ReceiveUserItemsRequest. + * @memberof wm.protobuf + * @classdesc Represents a ReceiveUserItemsRequest. + * @implements IReceiveUserItemsRequest + * @constructor + * @param {wm.protobuf.IReceiveUserItemsRequest=} [properties] Properties to set + */ + function ReceiveUserItemsRequest(properties) { + this.targetItemIds = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReceiveUserItemsRequest carId. + * @member {number} carId + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @instance + */ + ReceiveUserItemsRequest.prototype.carId = 0; + + /** + * ReceiveUserItemsRequest targetItemIds. + * @member {Array.} targetItemIds + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @instance + */ + ReceiveUserItemsRequest.prototype.targetItemIds = $util.emptyArray; + + /** + * Creates a new ReceiveUserItemsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.IReceiveUserItemsRequest=} [properties] Properties to set + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest instance + */ + ReceiveUserItemsRequest.create = function create(properties) { + return new ReceiveUserItemsRequest(properties); + }; + + /** + * Encodes the specified ReceiveUserItemsRequest message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.IReceiveUserItemsRequest} message ReceiveUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.targetItemIds != null && message.targetItemIds.length) + for (let i = 0; i < message.targetItemIds.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetItemIds[i]); + return writer; + }; + + /** + * Encodes the specified ReceiveUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.IReceiveUserItemsRequest} message ReceiveUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ReceiveUserItemsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + if (!(message.targetItemIds && message.targetItemIds.length)) + message.targetItemIds = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targetItemIds.push(reader.uint32()); + } else + message.targetItemIds.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReceiveUserItemsRequest message. + * @function verify + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReceiveUserItemsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.targetItemIds != null && message.hasOwnProperty("targetItemIds")) { + if (!Array.isArray(message.targetItemIds)) + return "targetItemIds: array expected"; + for (let i = 0; i < message.targetItemIds.length; ++i) + if (!$util.isInteger(message.targetItemIds[i])) + return "targetItemIds: integer[] expected"; + } + return null; + }; + + /** + * Creates a ReceiveUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest + */ + ReceiveUserItemsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ReceiveUserItemsRequest) + return object; + let message = new $root.wm.protobuf.ReceiveUserItemsRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.targetItemIds) { + if (!Array.isArray(object.targetItemIds)) + throw TypeError(".wm.protobuf.ReceiveUserItemsRequest.targetItemIds: array expected"); + message.targetItemIds = []; + for (let i = 0; i < object.targetItemIds.length; ++i) + message.targetItemIds[i] = object.targetItemIds[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a ReceiveUserItemsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.ReceiveUserItemsRequest} message ReceiveUserItemsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReceiveUserItemsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.targetItemIds = []; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.targetItemIds && message.targetItemIds.length) { + object.targetItemIds = []; + for (let j = 0; j < message.targetItemIds.length; ++j) + object.targetItemIds[j] = message.targetItemIds[j]; + } + return object; + }; + + /** + * Converts this ReceiveUserItemsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @instance + * @returns {Object.} JSON object + */ + ReceiveUserItemsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReceiveUserItemsRequest + * @function getTypeUrl + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReceiveUserItemsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ReceiveUserItemsRequest"; + }; + + return ReceiveUserItemsRequest; + })(); + + protobuf.ReceiveUserItemsResponse = (function() { + + /** + * Properties of a ReceiveUserItemsResponse. + * @memberof wm.protobuf + * @interface IReceiveUserItemsResponse + * @property {wm.protobuf.ErrorCode} error ReceiveUserItemsResponse error + */ + + /** + * Constructs a new ReceiveUserItemsResponse. + * @memberof wm.protobuf + * @classdesc Represents a ReceiveUserItemsResponse. + * @implements IReceiveUserItemsResponse + * @constructor + * @param {wm.protobuf.IReceiveUserItemsResponse=} [properties] Properties to set + */ + function ReceiveUserItemsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReceiveUserItemsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @instance + */ + ReceiveUserItemsResponse.prototype.error = 0; + + /** + * Creates a new ReceiveUserItemsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.IReceiveUserItemsResponse=} [properties] Properties to set + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse instance + */ + ReceiveUserItemsResponse.create = function create(properties) { + return new ReceiveUserItemsResponse(properties); + }; + + /** + * Encodes the specified ReceiveUserItemsResponse message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.IReceiveUserItemsResponse} message ReceiveUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified ReceiveUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.IReceiveUserItemsResponse} message ReceiveUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ReceiveUserItemsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReceiveUserItemsResponse message. + * @function verify + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReceiveUserItemsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a ReceiveUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse + */ + ReceiveUserItemsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ReceiveUserItemsResponse) + return object; + let message = new $root.wm.protobuf.ReceiveUserItemsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a ReceiveUserItemsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.ReceiveUserItemsResponse} message ReceiveUserItemsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReceiveUserItemsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this ReceiveUserItemsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @instance + * @returns {Object.} JSON object + */ + ReceiveUserItemsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReceiveUserItemsResponse + * @function getTypeUrl + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReceiveUserItemsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ReceiveUserItemsResponse"; + }; + + return ReceiveUserItemsResponse; + })(); + + protobuf.UpdateEventModeSerialRequest = (function() { + + /** + * Properties of an UpdateEventModeSerialRequest. + * @memberof wm.protobuf + * @interface IUpdateEventModeSerialRequest + * @property {string|null} [eventModeSerial] UpdateEventModeSerialRequest eventModeSerial + */ + + /** + * Constructs a new UpdateEventModeSerialRequest. + * @memberof wm.protobuf + * @classdesc Represents an UpdateEventModeSerialRequest. + * @implements IUpdateEventModeSerialRequest + * @constructor + * @param {wm.protobuf.IUpdateEventModeSerialRequest=} [properties] Properties to set + */ + function UpdateEventModeSerialRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEventModeSerialRequest eventModeSerial. + * @member {string} eventModeSerial + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @instance + */ + UpdateEventModeSerialRequest.prototype.eventModeSerial = ""; + + /** + * Creates a new UpdateEventModeSerialRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.IUpdateEventModeSerialRequest=} [properties] Properties to set + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest instance + */ + UpdateEventModeSerialRequest.create = function create(properties) { + return new UpdateEventModeSerialRequest(properties); + }; + + /** + * Encodes the specified UpdateEventModeSerialRequest message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.IUpdateEventModeSerialRequest} message UpdateEventModeSerialRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventModeSerial != null && Object.hasOwnProperty.call(message, "eventModeSerial")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventModeSerial); + return writer; + }; + + /** + * Encodes the specified UpdateEventModeSerialRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.IUpdateEventModeSerialRequest} message UpdateEventModeSerialRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateEventModeSerialRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.eventModeSerial = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEventModeSerialRequest message. + * @function verify + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEventModeSerialRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + if (!$util.isString(message.eventModeSerial)) + return "eventModeSerial: string expected"; + return null; + }; + + /** + * Creates an UpdateEventModeSerialRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest + */ + UpdateEventModeSerialRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateEventModeSerialRequest) + return object; + let message = new $root.wm.protobuf.UpdateEventModeSerialRequest(); + if (object.eventModeSerial != null) + message.eventModeSerial = String(object.eventModeSerial); + return message; + }; + + /** + * Creates a plain object from an UpdateEventModeSerialRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.UpdateEventModeSerialRequest} message UpdateEventModeSerialRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEventModeSerialRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.eventModeSerial = ""; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + object.eventModeSerial = message.eventModeSerial; + return object; + }; + + /** + * Converts this UpdateEventModeSerialRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEventModeSerialRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEventModeSerialRequest + * @function getTypeUrl + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEventModeSerialRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateEventModeSerialRequest"; + }; + + return UpdateEventModeSerialRequest; + })(); + + protobuf.UpdateEventModeSerialResponse = (function() { + + /** + * Properties of an UpdateEventModeSerialResponse. + * @memberof wm.protobuf + * @interface IUpdateEventModeSerialResponse + * @property {wm.protobuf.ErrorCode} error UpdateEventModeSerialResponse error + * @property {wm.protobuf.EventModeSerialErrorCode} serialError UpdateEventModeSerialResponse serialError + * @property {string|null} [eventModeSerial] UpdateEventModeSerialResponse eventModeSerial + * @property {number|null} [startAt] UpdateEventModeSerialResponse startAt + * @property {number|null} [endAt] UpdateEventModeSerialResponse endAt + */ + + /** + * Constructs a new UpdateEventModeSerialResponse. + * @memberof wm.protobuf + * @classdesc Represents an UpdateEventModeSerialResponse. + * @implements IUpdateEventModeSerialResponse + * @constructor + * @param {wm.protobuf.IUpdateEventModeSerialResponse=} [properties] Properties to set + */ + function UpdateEventModeSerialResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEventModeSerialResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.error = 0; + + /** + * UpdateEventModeSerialResponse serialError. + * @member {wm.protobuf.EventModeSerialErrorCode} serialError + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.serialError = 0; + + /** + * UpdateEventModeSerialResponse eventModeSerial. + * @member {string} eventModeSerial + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.eventModeSerial = ""; + + /** + * UpdateEventModeSerialResponse startAt. + * @member {number} startAt + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.startAt = 0; + + /** + * UpdateEventModeSerialResponse endAt. + * @member {number} endAt + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.endAt = 0; + + /** + * Creates a new UpdateEventModeSerialResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.IUpdateEventModeSerialResponse=} [properties] Properties to set + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse instance + */ + UpdateEventModeSerialResponse.create = function create(properties) { + return new UpdateEventModeSerialResponse(properties); + }; + + /** + * Encodes the specified UpdateEventModeSerialResponse message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.IUpdateEventModeSerialResponse} message UpdateEventModeSerialResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.eventModeSerial != null && Object.hasOwnProperty.call(message, "eventModeSerial")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.eventModeSerial); + if (message.endAt != null && Object.hasOwnProperty.call(message, "endAt")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.endAt); + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.serialError); + if (message.startAt != null && Object.hasOwnProperty.call(message, "startAt")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.startAt); + return writer; + }; + + /** + * Encodes the specified UpdateEventModeSerialResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.IUpdateEventModeSerialResponse} message UpdateEventModeSerialResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateEventModeSerialResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 4: { + message.serialError = reader.int32(); + break; + } + case 2: { + message.eventModeSerial = reader.string(); + break; + } + case 5: { + message.startAt = reader.uint32(); + break; + } + case 3: { + message.endAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("serialError")) + throw $util.ProtocolError("missing required 'serialError'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEventModeSerialResponse message. + * @function verify + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEventModeSerialResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + switch (message.serialError) { + default: + return "serialError: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + if (!$util.isString(message.eventModeSerial)) + return "eventModeSerial: string expected"; + if (message.startAt != null && message.hasOwnProperty("startAt")) + if (!$util.isInteger(message.startAt)) + return "startAt: integer expected"; + if (message.endAt != null && message.hasOwnProperty("endAt")) + if (!$util.isInteger(message.endAt)) + return "endAt: integer expected"; + return null; + }; + + /** + * Creates an UpdateEventModeSerialResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse + */ + UpdateEventModeSerialResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateEventModeSerialResponse) + return object; + let message = new $root.wm.protobuf.UpdateEventModeSerialResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + switch (object.serialError) { + case "SERIAL_SUCCESS": + case 0: + message.serialError = 0; + break; + case "SERIAL_ATTEMPT_TO_CHANGE": + case 1: + message.serialError = 1; + break; + case "SERIAL_NO_INPUT": + case 2: + message.serialError = 2; + break; + case "SERIAL_INVALID": + case 3: + message.serialError = 3; + break; + case "SERIAL_EXPIRED": + case 4: + message.serialError = 4; + break; + case "SERIAL_OTHER_PLACE": + case 5: + message.serialError = 5; + break; + } + if (object.eventModeSerial != null) + message.eventModeSerial = String(object.eventModeSerial); + if (object.startAt != null) + message.startAt = object.startAt >>> 0; + if (object.endAt != null) + message.endAt = object.endAt >>> 0; + return message; + }; + + /** + * Creates a plain object from an UpdateEventModeSerialResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.UpdateEventModeSerialResponse} message UpdateEventModeSerialResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEventModeSerialResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.eventModeSerial = ""; + object.endAt = 0; + object.serialError = options.enums === String ? "SERIAL_SUCCESS" : 0; + object.startAt = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + object.eventModeSerial = message.eventModeSerial; + if (message.endAt != null && message.hasOwnProperty("endAt")) + object.endAt = message.endAt; + if (message.serialError != null && message.hasOwnProperty("serialError")) + object.serialError = options.enums === String ? $root.wm.protobuf.EventModeSerialErrorCode[message.serialError] : message.serialError; + if (message.startAt != null && message.hasOwnProperty("startAt")) + object.startAt = message.startAt; + return object; + }; + + /** + * Converts this UpdateEventModeSerialResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + * @returns {Object.} JSON object + */ + UpdateEventModeSerialResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEventModeSerialResponse + * @function getTypeUrl + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEventModeSerialResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateEventModeSerialResponse"; + }; + + return UpdateEventModeSerialResponse; + })(); + + protobuf.ParticipateInInviteFriendCampaignRequest = (function() { + + /** + * Properties of a ParticipateInInviteFriendCampaignRequest. + * @memberof wm.protobuf + * @interface IParticipateInInviteFriendCampaignRequest + * @property {number} invitingUserId ParticipateInInviteFriendCampaignRequest invitingUserId + * @property {number} invitedUserId ParticipateInInviteFriendCampaignRequest invitedUserId + * @property {number} sourceCarId ParticipateInInviteFriendCampaignRequest sourceCarId + * @property {boolean} transmission ParticipateInInviteFriendCampaignRequest transmission + */ + + /** + * Constructs a new ParticipateInInviteFriendCampaignRequest. + * @memberof wm.protobuf + * @classdesc Represents a ParticipateInInviteFriendCampaignRequest. + * @implements IParticipateInInviteFriendCampaignRequest + * @constructor + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest=} [properties] Properties to set + */ + function ParticipateInInviteFriendCampaignRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParticipateInInviteFriendCampaignRequest invitingUserId. + * @member {number} invitingUserId + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.invitingUserId = 0; + + /** + * ParticipateInInviteFriendCampaignRequest invitedUserId. + * @member {number} invitedUserId + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.invitedUserId = 0; + + /** + * ParticipateInInviteFriendCampaignRequest sourceCarId. + * @member {number} sourceCarId + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.sourceCarId = 0; + + /** + * ParticipateInInviteFriendCampaignRequest transmission. + * @member {boolean} transmission + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.transmission = false; + + /** + * Creates a new ParticipateInInviteFriendCampaignRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest=} [properties] Properties to set + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest instance + */ + ParticipateInInviteFriendCampaignRequest.create = function create(properties) { + return new ParticipateInInviteFriendCampaignRequest(properties); + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest} message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.invitingUserId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.invitedUserId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.sourceCarId); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.transmission); + return writer; + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest} message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.invitingUserId = reader.uint32(); + break; + } + case 2: { + message.invitedUserId = reader.uint32(); + break; + } + case 3: { + message.sourceCarId = reader.uint32(); + break; + } + case 4: { + message.transmission = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("invitingUserId")) + throw $util.ProtocolError("missing required 'invitingUserId'", { instance: message }); + if (!message.hasOwnProperty("invitedUserId")) + throw $util.ProtocolError("missing required 'invitedUserId'", { instance: message }); + if (!message.hasOwnProperty("sourceCarId")) + throw $util.ProtocolError("missing required 'sourceCarId'", { instance: message }); + if (!message.hasOwnProperty("transmission")) + throw $util.ProtocolError("missing required 'transmission'", { instance: message }); + return message; + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParticipateInInviteFriendCampaignRequest message. + * @function verify + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParticipateInInviteFriendCampaignRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.invitingUserId)) + return "invitingUserId: integer expected"; + if (!$util.isInteger(message.invitedUserId)) + return "invitedUserId: integer expected"; + if (!$util.isInteger(message.sourceCarId)) + return "sourceCarId: integer expected"; + if (typeof message.transmission !== "boolean") + return "transmission: boolean expected"; + return null; + }; + + /** + * Creates a ParticipateInInviteFriendCampaignRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest + */ + ParticipateInInviteFriendCampaignRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ParticipateInInviteFriendCampaignRequest) + return object; + let message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignRequest(); + if (object.invitingUserId != null) + message.invitingUserId = object.invitingUserId >>> 0; + if (object.invitedUserId != null) + message.invitedUserId = object.invitedUserId >>> 0; + if (object.sourceCarId != null) + message.sourceCarId = object.sourceCarId >>> 0; + if (object.transmission != null) + message.transmission = Boolean(object.transmission); + return message; + }; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.ParticipateInInviteFriendCampaignRequest} message ParticipateInInviteFriendCampaignRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParticipateInInviteFriendCampaignRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.invitingUserId = 0; + object.invitedUserId = 0; + object.sourceCarId = 0; + object.transmission = false; + } + if (message.invitingUserId != null && message.hasOwnProperty("invitingUserId")) + object.invitingUserId = message.invitingUserId; + if (message.invitedUserId != null && message.hasOwnProperty("invitedUserId")) + object.invitedUserId = message.invitedUserId; + if (message.sourceCarId != null && message.hasOwnProperty("sourceCarId")) + object.sourceCarId = message.sourceCarId; + if (message.transmission != null && message.hasOwnProperty("transmission")) + object.transmission = message.transmission; + return object; + }; + + /** + * Converts this ParticipateInInviteFriendCampaignRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + * @returns {Object.} JSON object + */ + ParticipateInInviteFriendCampaignRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignRequest + * @function getTypeUrl + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParticipateInInviteFriendCampaignRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ParticipateInInviteFriendCampaignRequest"; + }; + + return ParticipateInInviteFriendCampaignRequest; + })(); + + protobuf.ParticipateInInviteFriendCampaignResponse = (function() { + + /** + * Properties of a ParticipateInInviteFriendCampaignResponse. + * @memberof wm.protobuf + * @interface IParticipateInInviteFriendCampaignResponse + * @property {wm.protobuf.ErrorCode} error ParticipateInInviteFriendCampaignResponse error + */ + + /** + * Constructs a new ParticipateInInviteFriendCampaignResponse. + * @memberof wm.protobuf + * @classdesc Represents a ParticipateInInviteFriendCampaignResponse. + * @implements IParticipateInInviteFriendCampaignResponse + * @constructor + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse=} [properties] Properties to set + */ + function ParticipateInInviteFriendCampaignResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParticipateInInviteFriendCampaignResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @instance + */ + ParticipateInInviteFriendCampaignResponse.prototype.error = 0; + + /** + * Creates a new ParticipateInInviteFriendCampaignResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse=} [properties] Properties to set + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse instance + */ + ParticipateInInviteFriendCampaignResponse.create = function create(properties) { + return new ParticipateInInviteFriendCampaignResponse(properties); + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse} message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse} message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParticipateInInviteFriendCampaignResponse message. + * @function verify + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParticipateInInviteFriendCampaignResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a ParticipateInInviteFriendCampaignResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse + */ + ParticipateInInviteFriendCampaignResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ParticipateInInviteFriendCampaignResponse) + return object; + let message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.ParticipateInInviteFriendCampaignResponse} message ParticipateInInviteFriendCampaignResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParticipateInInviteFriendCampaignResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this ParticipateInInviteFriendCampaignResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @instance + * @returns {Object.} JSON object + */ + ParticipateInInviteFriendCampaignResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignResponse + * @function getTypeUrl + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParticipateInInviteFriendCampaignResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ParticipateInInviteFriendCampaignResponse"; + }; + + return ParticipateInInviteFriendCampaignResponse; + })(); + + protobuf.ConsumeUserItemRequest = (function() { + + /** + * Properties of a ConsumeUserItemRequest. + * @memberof wm.protobuf + * @interface IConsumeUserItemRequest + * @property {number} userId ConsumeUserItemRequest userId + * @property {number} carId ConsumeUserItemRequest carId + * @property {number} userItemId ConsumeUserItemRequest userItemId + */ + + /** + * Constructs a new ConsumeUserItemRequest. + * @memberof wm.protobuf + * @classdesc Represents a ConsumeUserItemRequest. + * @implements IConsumeUserItemRequest + * @constructor + * @param {wm.protobuf.IConsumeUserItemRequest=} [properties] Properties to set + */ + function ConsumeUserItemRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsumeUserItemRequest userId. + * @member {number} userId + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + */ + ConsumeUserItemRequest.prototype.userId = 0; + + /** + * ConsumeUserItemRequest carId. + * @member {number} carId + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + */ + ConsumeUserItemRequest.prototype.carId = 0; + + /** + * ConsumeUserItemRequest userItemId. + * @member {number} userItemId + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + */ + ConsumeUserItemRequest.prototype.userItemId = 0; + + /** + * Creates a new ConsumeUserItemRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.IConsumeUserItemRequest=} [properties] Properties to set + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest instance + */ + ConsumeUserItemRequest.create = function create(properties) { + return new ConsumeUserItemRequest(properties); + }; + + /** + * Encodes the specified ConsumeUserItemRequest message. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.IConsumeUserItemRequest} message ConsumeUserItemRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.carId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.userItemId); + return writer; + }; + + /** + * Encodes the specified ConsumeUserItemRequest message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.IConsumeUserItemRequest} message ConsumeUserItemRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ConsumeUserItemRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.carId = reader.uint32(); + break; + } + case 3: { + message.userItemId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("userItemId")) + throw $util.ProtocolError("missing required 'userItemId'", { instance: message }); + return message; + }; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsumeUserItemRequest message. + * @function verify + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsumeUserItemRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.userItemId)) + return "userItemId: integer expected"; + return null; + }; + + /** + * Creates a ConsumeUserItemRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest + */ + ConsumeUserItemRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ConsumeUserItemRequest) + return object; + let message = new $root.wm.protobuf.ConsumeUserItemRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.userItemId != null) + message.userItemId = object.userItemId >>> 0; + return message; + }; + + /** + * Creates a plain object from a ConsumeUserItemRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.ConsumeUserItemRequest} message ConsumeUserItemRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsumeUserItemRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.carId = 0; + object.userItemId = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + object.userItemId = message.userItemId; + return object; + }; + + /** + * Converts this ConsumeUserItemRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + * @returns {Object.} JSON object + */ + ConsumeUserItemRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConsumeUserItemRequest + * @function getTypeUrl + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConsumeUserItemRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ConsumeUserItemRequest"; + }; + + return ConsumeUserItemRequest; + })(); + + protobuf.ConsumeUserItemResponse = (function() { + + /** + * Properties of a ConsumeUserItemResponse. + * @memberof wm.protobuf + * @interface IConsumeUserItemResponse + * @property {wm.protobuf.ErrorCode} error ConsumeUserItemResponse error + */ + + /** + * Constructs a new ConsumeUserItemResponse. + * @memberof wm.protobuf + * @classdesc Represents a ConsumeUserItemResponse. + * @implements IConsumeUserItemResponse + * @constructor + * @param {wm.protobuf.IConsumeUserItemResponse=} [properties] Properties to set + */ + function ConsumeUserItemResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsumeUserItemResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.ConsumeUserItemResponse + * @instance + */ + ConsumeUserItemResponse.prototype.error = 0; + + /** + * Creates a new ConsumeUserItemResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.IConsumeUserItemResponse=} [properties] Properties to set + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse instance + */ + ConsumeUserItemResponse.create = function create(properties) { + return new ConsumeUserItemResponse(properties); + }; + + /** + * Encodes the specified ConsumeUserItemResponse message. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.IConsumeUserItemResponse} message ConsumeUserItemResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified ConsumeUserItemResponse message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.IConsumeUserItemResponse} message ConsumeUserItemResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ConsumeUserItemResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsumeUserItemResponse message. + * @function verify + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsumeUserItemResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a ConsumeUserItemResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse + */ + ConsumeUserItemResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ConsumeUserItemResponse) + return object; + let message = new $root.wm.protobuf.ConsumeUserItemResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a ConsumeUserItemResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.ConsumeUserItemResponse} message ConsumeUserItemResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsumeUserItemResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this ConsumeUserItemResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.ConsumeUserItemResponse + * @instance + * @returns {Object.} JSON object + */ + ConsumeUserItemResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConsumeUserItemResponse + * @function getTypeUrl + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConsumeUserItemResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ConsumeUserItemResponse"; + }; + + return ConsumeUserItemResponse; + })(); + + protobuf.SearchCarsByLevelRequest = (function() { + + /** + * Properties of a SearchCarsByLevelRequest. + * @memberof wm.protobuf + * @interface ISearchCarsByLevelRequest + * @property {number} carId SearchCarsByLevelRequest carId + * @property {number} ghostLevel SearchCarsByLevelRequest ghostLevel + * @property {number} area SearchCarsByLevelRequest area + * @property {number|null} [regionId] SearchCarsByLevelRequest regionId + */ + + /** + * Constructs a new SearchCarsByLevelRequest. + * @memberof wm.protobuf + * @classdesc Represents a SearchCarsByLevelRequest. + * @implements ISearchCarsByLevelRequest + * @constructor + * @param {wm.protobuf.ISearchCarsByLevelRequest=} [properties] Properties to set + */ + function SearchCarsByLevelRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchCarsByLevelRequest carId. + * @member {number} carId + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.carId = 0; + + /** + * SearchCarsByLevelRequest ghostLevel. + * @member {number} ghostLevel + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.ghostLevel = 0; + + /** + * SearchCarsByLevelRequest area. + * @member {number} area + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.area = 0; + + /** + * SearchCarsByLevelRequest regionId. + * @member {number} regionId + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.regionId = 0; + + /** + * Creates a new SearchCarsByLevelRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.ISearchCarsByLevelRequest=} [properties] Properties to set + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest instance + */ + SearchCarsByLevelRequest.create = function create(properties) { + return new SearchCarsByLevelRequest(properties); + }; + + /** + * Encodes the specified SearchCarsByLevelRequest message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.ISearchCarsByLevelRequest} message SearchCarsByLevelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ghostLevel); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + if (message.regionId != null && Object.hasOwnProperty.call(message, "regionId")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.regionId); + return writer; + }; + + /** + * Encodes the specified SearchCarsByLevelRequest message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.ISearchCarsByLevelRequest} message SearchCarsByLevelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SearchCarsByLevelRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.ghostLevel = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + case 4: { + message.regionId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("ghostLevel")) + throw $util.ProtocolError("missing required 'ghostLevel'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchCarsByLevelRequest message. + * @function verify + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchCarsByLevelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.ghostLevel)) + return "ghostLevel: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (message.regionId != null && message.hasOwnProperty("regionId")) + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + return null; + }; + + /** + * Creates a SearchCarsByLevelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest + */ + SearchCarsByLevelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SearchCarsByLevelRequest) + return object; + let message = new $root.wm.protobuf.SearchCarsByLevelRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.ghostLevel != null) + message.ghostLevel = object.ghostLevel >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + return message; + }; + + /** + * Creates a plain object from a SearchCarsByLevelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.SearchCarsByLevelRequest} message SearchCarsByLevelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchCarsByLevelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.ghostLevel = 0; + object.area = 0; + object.regionId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.ghostLevel != null && message.hasOwnProperty("ghostLevel")) + object.ghostLevel = message.ghostLevel; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + return object; + }; + + /** + * Converts this SearchCarsByLevelRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + * @returns {Object.} JSON object + */ + SearchCarsByLevelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchCarsByLevelRequest + * @function getTypeUrl + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchCarsByLevelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SearchCarsByLevelRequest"; + }; + + return SearchCarsByLevelRequest; + })(); + + protobuf.SearchCarsByLevelResponse = (function() { + + /** + * Properties of a SearchCarsByLevelResponse. + * @memberof wm.protobuf + * @interface ISearchCarsByLevelResponse + * @property {wm.protobuf.ErrorCode} error SearchCarsByLevelResponse error + * @property {number} ramp SearchCarsByLevelResponse ramp + * @property {number} path SearchCarsByLevelResponse path + * @property {Array.|null} [ghosts] SearchCarsByLevelResponse ghosts + * @property {wm.protobuf.PathSelectionMethod} selectionMethod SearchCarsByLevelResponse selectionMethod + * @property {Array.|null} [rates] SearchCarsByLevelResponse rates + */ + + /** + * Constructs a new SearchCarsByLevelResponse. + * @memberof wm.protobuf + * @classdesc Represents a SearchCarsByLevelResponse. + * @implements ISearchCarsByLevelResponse + * @constructor + * @param {wm.protobuf.ISearchCarsByLevelResponse=} [properties] Properties to set + */ + function SearchCarsByLevelResponse(properties) { + this.ghosts = []; + this.rates = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchCarsByLevelResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.error = 0; + + /** + * SearchCarsByLevelResponse ramp. + * @member {number} ramp + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.ramp = 0; + + /** + * SearchCarsByLevelResponse path. + * @member {number} path + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.path = 0; + + /** + * SearchCarsByLevelResponse ghosts. + * @member {Array.} ghosts + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.ghosts = $util.emptyArray; + + /** + * SearchCarsByLevelResponse selectionMethod. + * @member {wm.protobuf.PathSelectionMethod} selectionMethod + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.selectionMethod = 1; + + /** + * SearchCarsByLevelResponse rates. + * @member {Array.} rates + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.rates = $util.emptyArray; + + /** + * Creates a new SearchCarsByLevelResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.ISearchCarsByLevelResponse=} [properties] Properties to set + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse instance + */ + SearchCarsByLevelResponse.create = function create(properties) { + return new SearchCarsByLevelResponse(properties); + }; + + /** + * Encodes the specified SearchCarsByLevelResponse message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.ISearchCarsByLevelResponse} message SearchCarsByLevelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ramp); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.path); + if (message.ghosts != null && message.ghosts.length) + for (let i = 0; i < message.ghosts.length; ++i) + $root.wm.protobuf.GhostCar.encode(message.ghosts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.selectionMethod); + if (message.rates != null && message.rates.length) + for (let i = 0; i < message.rates.length; ++i) + $root.wm.protobuf.SearchCarsByLevelResponse.Rate.encode(message.rates[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchCarsByLevelResponse message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.ISearchCarsByLevelResponse} message SearchCarsByLevelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SearchCarsByLevelResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.ramp = reader.uint32(); + break; + } + case 3: { + message.path = reader.uint32(); + break; + } + case 4: { + if (!(message.ghosts && message.ghosts.length)) + message.ghosts = []; + message.ghosts.push($root.wm.protobuf.GhostCar.decode(reader, reader.uint32())); + break; + } + case 5: { + message.selectionMethod = reader.int32(); + break; + } + case 6: { + if (!(message.rates && message.rates.length)) + message.rates = []; + message.rates.push($root.wm.protobuf.SearchCarsByLevelResponse.Rate.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("ramp")) + throw $util.ProtocolError("missing required 'ramp'", { instance: message }); + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("selectionMethod")) + throw $util.ProtocolError("missing required 'selectionMethod'", { instance: message }); + return message; + }; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchCarsByLevelResponse message. + * @function verify + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchCarsByLevelResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.ghosts != null && message.hasOwnProperty("ghosts")) { + if (!Array.isArray(message.ghosts)) + return "ghosts: array expected"; + for (let i = 0; i < message.ghosts.length; ++i) { + let error = $root.wm.protobuf.GhostCar.verify(message.ghosts[i]); + if (error) + return "ghosts." + error; + } + } + switch (message.selectionMethod) { + default: + return "selectionMethod: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.rates != null && message.hasOwnProperty("rates")) { + if (!Array.isArray(message.rates)) + return "rates: array expected"; + for (let i = 0; i < message.rates.length; ++i) { + let error = $root.wm.protobuf.SearchCarsByLevelResponse.Rate.verify(message.rates[i]); + if (error) + return "rates." + error; + } + } + return null; + }; + + /** + * Creates a SearchCarsByLevelResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse + */ + SearchCarsByLevelResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SearchCarsByLevelResponse) + return object; + let message = new $root.wm.protobuf.SearchCarsByLevelResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.ghosts) { + if (!Array.isArray(object.ghosts)) + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.ghosts: array expected"); + message.ghosts = []; + for (let i = 0; i < object.ghosts.length; ++i) { + if (typeof object.ghosts[i] !== "object") + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.ghosts: object expected"); + message.ghosts[i] = $root.wm.protobuf.GhostCar.fromObject(object.ghosts[i]); + } + } + switch (object.selectionMethod) { + case "PATH_NEW": + case 1: + message.selectionMethod = 1; + break; + case "PATH_PLAIN": + case 2: + message.selectionMethod = 2; + break; + case "PATH_FRIEND": + case 3: + message.selectionMethod = 3; + break; + case "PATH_NORMAL": + case 4: + message.selectionMethod = 4; + break; + case "PATH_CHALLENGER": + case 5: + message.selectionMethod = 5; + break; + } + if (object.rates) { + if (!Array.isArray(object.rates)) + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.rates: array expected"); + message.rates = []; + for (let i = 0; i < object.rates.length; ++i) { + if (typeof object.rates[i] !== "object") + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.rates: object expected"); + message.rates[i] = $root.wm.protobuf.SearchCarsByLevelResponse.Rate.fromObject(object.rates[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SearchCarsByLevelResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse} message SearchCarsByLevelResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchCarsByLevelResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.ghosts = []; + object.rates = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.ramp = 0; + object.path = 0; + object.selectionMethod = options.enums === String ? "PATH_NEW" : 1; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.ghosts && message.ghosts.length) { + object.ghosts = []; + for (let j = 0; j < message.ghosts.length; ++j) + object.ghosts[j] = $root.wm.protobuf.GhostCar.toObject(message.ghosts[j], options); + } + if (message.selectionMethod != null && message.hasOwnProperty("selectionMethod")) + object.selectionMethod = options.enums === String ? $root.wm.protobuf.PathSelectionMethod[message.selectionMethod] : message.selectionMethod; + if (message.rates && message.rates.length) { + object.rates = []; + for (let j = 0; j < message.rates.length; ++j) + object.rates[j] = $root.wm.protobuf.SearchCarsByLevelResponse.Rate.toObject(message.rates[j], options); + } + return object; + }; + + /** + * Converts this SearchCarsByLevelResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + * @returns {Object.} JSON object + */ + SearchCarsByLevelResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchCarsByLevelResponse + * @function getTypeUrl + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchCarsByLevelResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SearchCarsByLevelResponse"; + }; + + SearchCarsByLevelResponse.Rate = (function() { + + /** + * Properties of a Rate. + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @interface IRate + * @property {number} carId Rate carId + * @property {wm.protobuf.GhostRateType} type Rate type + * @property {number|null} [rate] Rate rate + */ + + /** + * Constructs a new Rate. + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @classdesc Represents a Rate. + * @implements IRate + * @constructor + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate=} [properties] Properties to set + */ + function Rate(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Rate carId. + * @member {number} carId + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + */ + Rate.prototype.carId = 0; + + /** + * Rate type. + * @member {wm.protobuf.GhostRateType} type + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + */ + Rate.prototype.type = 1; + + /** + * Rate rate. + * @member {number} rate + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + */ + Rate.prototype.rate = 0; + + /** + * Creates a new Rate instance using the specified properties. + * @function create + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate=} [properties] Properties to set + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate instance + */ + Rate.create = function create(properties) { + return new Rate(properties); + }; + + /** + * Encodes the specified Rate message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate} message Rate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.rate != null && Object.hasOwnProperty.call(message, "rate")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rate); + return writer; + }; + + /** + * Encodes the specified Rate message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate} message Rate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Rate message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SearchCarsByLevelResponse.Rate(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.rate = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("type")) + throw $util.ProtocolError("missing required 'type'", { instance: message }); + return message; + }; + + /** + * Decodes a Rate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Rate message. + * @function verify + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.rate != null && message.hasOwnProperty("rate")) + if (!$util.isInteger(message.rate)) + return "rate: integer expected"; + return null; + }; + + /** + * Creates a Rate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate + */ + Rate.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SearchCarsByLevelResponse.Rate) + return object; + let message = new $root.wm.protobuf.SearchCarsByLevelResponse.Rate(); + if (object.carId != null) + message.carId = object.carId >>> 0; + switch (object.type) { + case "GHOST_RATE_UNKNOWN": + case 1: + message.type = 1; + break; + case "GHOST_RATE_INVALID": + case 2: + message.type = 2; + break; + case "GHOST_RATE_VALID": + case 3: + message.type = 3; + break; + } + if (object.rate != null) + message.rate = object.rate >>> 0; + return message; + }; + + /** + * Creates a plain object from a Rate message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.Rate} message Rate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rate.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.type = options.enums === String ? "GHOST_RATE_UNKNOWN" : 1; + object.rate = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.wm.protobuf.GhostRateType[message.type] : message.type; + if (message.rate != null && message.hasOwnProperty("rate")) + object.rate = message.rate; + return object; + }; + + /** + * Converts this Rate to JSON. + * @function toJSON + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + * @returns {Object.} JSON object + */ + Rate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Rate + * @function getTypeUrl + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Rate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SearchCarsByLevelResponse.Rate"; + }; + + return Rate; + })(); + + return SearchCarsByLevelResponse; + })(); + + protobuf.LoadPathsAndTuningsRequest = (function() { + + /** + * Properties of a LoadPathsAndTuningsRequest. + * @memberof wm.protobuf + * @interface ILoadPathsAndTuningsRequest + * @property {number} carId LoadPathsAndTuningsRequest carId + * @property {Array.|null} [selectedCars] LoadPathsAndTuningsRequest selectedCars + * @property {boolean|null} [returnImmediately] LoadPathsAndTuningsRequest returnImmediately + * @property {number|null} [stampTargetArea] LoadPathsAndTuningsRequest stampTargetArea + */ + + /** + * Constructs a new LoadPathsAndTuningsRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadPathsAndTuningsRequest. + * @implements ILoadPathsAndTuningsRequest + * @constructor + * @param {wm.protobuf.ILoadPathsAndTuningsRequest=} [properties] Properties to set + */ + function LoadPathsAndTuningsRequest(properties) { + this.selectedCars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadPathsAndTuningsRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.carId = 0; + + /** + * LoadPathsAndTuningsRequest selectedCars. + * @member {Array.} selectedCars + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.selectedCars = $util.emptyArray; + + /** + * LoadPathsAndTuningsRequest returnImmediately. + * @member {boolean} returnImmediately + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.returnImmediately = false; + + /** + * LoadPathsAndTuningsRequest stampTargetArea. + * @member {number} stampTargetArea + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.stampTargetArea = 0; + + /** + * Creates a new LoadPathsAndTuningsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest instance + */ + LoadPathsAndTuningsRequest.create = function create(properties) { + return new LoadPathsAndTuningsRequest(properties); + }; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsRequest} message LoadPathsAndTuningsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.selectedCars != null && message.selectedCars.length) + for (let i = 0; i < message.selectedCars.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.selectedCars[i]); + if (message.returnImmediately != null && Object.hasOwnProperty.call(message, "returnImmediately")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.returnImmediately); + if (message.stampTargetArea != null && Object.hasOwnProperty.call(message, "stampTargetArea")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stampTargetArea); + return writer; + }; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsRequest} message LoadPathsAndTuningsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadPathsAndTuningsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + if (!(message.selectedCars && message.selectedCars.length)) + message.selectedCars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.selectedCars.push(reader.uint32()); + } else + message.selectedCars.push(reader.uint32()); + break; + } + case 3: { + message.returnImmediately = reader.bool(); + break; + } + case 4: { + message.stampTargetArea = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadPathsAndTuningsRequest message. + * @function verify + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadPathsAndTuningsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.selectedCars != null && message.hasOwnProperty("selectedCars")) { + if (!Array.isArray(message.selectedCars)) + return "selectedCars: array expected"; + for (let i = 0; i < message.selectedCars.length; ++i) + if (!$util.isInteger(message.selectedCars[i])) + return "selectedCars: integer[] expected"; + } + if (message.returnImmediately != null && message.hasOwnProperty("returnImmediately")) + if (typeof message.returnImmediately !== "boolean") + return "returnImmediately: boolean expected"; + if (message.stampTargetArea != null && message.hasOwnProperty("stampTargetArea")) + if (!$util.isInteger(message.stampTargetArea)) + return "stampTargetArea: integer expected"; + return null; + }; + + /** + * Creates a LoadPathsAndTuningsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest + */ + LoadPathsAndTuningsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadPathsAndTuningsRequest) + return object; + let message = new $root.wm.protobuf.LoadPathsAndTuningsRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.selectedCars) { + if (!Array.isArray(object.selectedCars)) + throw TypeError(".wm.protobuf.LoadPathsAndTuningsRequest.selectedCars: array expected"); + message.selectedCars = []; + for (let i = 0; i < object.selectedCars.length; ++i) + message.selectedCars[i] = object.selectedCars[i] >>> 0; + } + if (object.returnImmediately != null) + message.returnImmediately = Boolean(object.returnImmediately); + if (object.stampTargetArea != null) + message.stampTargetArea = object.stampTargetArea >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadPathsAndTuningsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.LoadPathsAndTuningsRequest} message LoadPathsAndTuningsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadPathsAndTuningsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.selectedCars = []; + if (options.defaults) { + object.carId = 0; + object.returnImmediately = false; + object.stampTargetArea = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.selectedCars && message.selectedCars.length) { + object.selectedCars = []; + for (let j = 0; j < message.selectedCars.length; ++j) + object.selectedCars[j] = message.selectedCars[j]; + } + if (message.returnImmediately != null && message.hasOwnProperty("returnImmediately")) + object.returnImmediately = message.returnImmediately; + if (message.stampTargetArea != null && message.hasOwnProperty("stampTargetArea")) + object.stampTargetArea = message.stampTargetArea; + return object; + }; + + /** + * Converts this LoadPathsAndTuningsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + * @returns {Object.} JSON object + */ + LoadPathsAndTuningsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadPathsAndTuningsRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadPathsAndTuningsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadPathsAndTuningsRequest"; + }; + + return LoadPathsAndTuningsRequest; + })(); + + protobuf.LoadPathsAndTuningsResponse = (function() { + + /** + * Properties of a LoadPathsAndTuningsResponse. + * @memberof wm.protobuf + * @interface ILoadPathsAndTuningsResponse + * @property {wm.protobuf.ErrorCode} error LoadPathsAndTuningsResponse error + * @property {Array.|null} [data] LoadPathsAndTuningsResponse data + */ + + /** + * Constructs a new LoadPathsAndTuningsResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadPathsAndTuningsResponse. + * @implements ILoadPathsAndTuningsResponse + * @constructor + * @param {wm.protobuf.ILoadPathsAndTuningsResponse=} [properties] Properties to set + */ + function LoadPathsAndTuningsResponse(properties) { + this.data = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadPathsAndTuningsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @instance + */ + LoadPathsAndTuningsResponse.prototype.error = 0; + + /** + * LoadPathsAndTuningsResponse data. + * @member {Array.} data + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @instance + */ + LoadPathsAndTuningsResponse.prototype.data = $util.emptyArray; + + /** + * Creates a new LoadPathsAndTuningsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse instance + */ + LoadPathsAndTuningsResponse.create = function create(properties) { + return new LoadPathsAndTuningsResponse(properties); + }; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsResponse} message LoadPathsAndTuningsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.data != null && message.data.length) + for (let i = 0; i < message.data.length; ++i) + $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.encode(message.data[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsResponse} message LoadPathsAndTuningsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadPathsAndTuningsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.data && message.data.length)) + message.data = []; + message.data.push($root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadPathsAndTuningsResponse message. + * @function verify + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadPathsAndTuningsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.data != null && message.hasOwnProperty("data")) { + if (!Array.isArray(message.data)) + return "data: array expected"; + for (let i = 0; i < message.data.length; ++i) { + let error = $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify(message.data[i]); + if (error) + return "data." + error; + } + } + return null; + }; + + /** + * Creates a LoadPathsAndTuningsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse + */ + LoadPathsAndTuningsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadPathsAndTuningsResponse) + return object; + let message = new $root.wm.protobuf.LoadPathsAndTuningsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.data) { + if (!Array.isArray(object.data)) + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.data: array expected"); + message.data = []; + for (let i = 0; i < object.data.length; ++i) { + if (typeof object.data[i] !== "object") + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.data: object expected"); + message.data[i] = $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.fromObject(object.data[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadPathsAndTuningsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse} message LoadPathsAndTuningsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadPathsAndTuningsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.data = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.data && message.data.length) { + object.data = []; + for (let j = 0; j < message.data.length; ++j) + object.data[j] = $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.toObject(message.data[j], options); + } + return object; + }; + + /** + * Converts this LoadPathsAndTuningsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @instance + * @returns {Object.} JSON object + */ + LoadPathsAndTuningsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadPathsAndTuningsResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadPathsAndTuningsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadPathsAndTuningsResponse"; + }; + + LoadPathsAndTuningsResponse.CarTuningsByPath = (function() { + + /** + * Properties of a CarTuningsByPath. + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @interface ICarTuningsByPath + * @property {number} area CarTuningsByPath area + * @property {number} ramp CarTuningsByPath ramp + * @property {number} path CarTuningsByPath path + * @property {Array.|null} [carTunings] CarTuningsByPath carTunings + * @property {wm.protobuf.PathSelectionMethod} selectionMethod CarTuningsByPath selectionMethod + */ + + /** + * Constructs a new CarTuningsByPath. + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @classdesc Represents a CarTuningsByPath. + * @implements ICarTuningsByPath + * @constructor + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath=} [properties] Properties to set + */ + function CarTuningsByPath(properties) { + this.carTunings = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarTuningsByPath area. + * @member {number} area + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.area = 0; + + /** + * CarTuningsByPath ramp. + * @member {number} ramp + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.ramp = 0; + + /** + * CarTuningsByPath path. + * @member {number} path + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.path = 0; + + /** + * CarTuningsByPath carTunings. + * @member {Array.} carTunings + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.carTunings = $util.emptyArray; + + /** + * CarTuningsByPath selectionMethod. + * @member {wm.protobuf.PathSelectionMethod} selectionMethod + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.selectionMethod = 1; + + /** + * Creates a new CarTuningsByPath instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath=} [properties] Properties to set + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath instance + */ + CarTuningsByPath.create = function create(properties) { + return new CarTuningsByPath(properties); + }; + + /** + * Encodes the specified CarTuningsByPath message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath} message CarTuningsByPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuningsByPath.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.area); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ramp); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.path); + if (message.carTunings != null && message.carTunings.length) + for (let i = 0; i < message.carTunings.length; ++i) + $root.wm.protobuf.CarTuning.encode(message.carTunings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.selectionMethod); + return writer; + }; + + /** + * Encodes the specified CarTuningsByPath message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath} message CarTuningsByPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuningsByPath.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuningsByPath.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.area = reader.uint32(); + break; + } + case 2: { + message.ramp = reader.uint32(); + break; + } + case 3: { + message.path = reader.uint32(); + break; + } + case 4: { + if (!(message.carTunings && message.carTunings.length)) + message.carTunings = []; + message.carTunings.push($root.wm.protobuf.CarTuning.decode(reader, reader.uint32())); + break; + } + case 5: { + message.selectionMethod = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("ramp")) + throw $util.ProtocolError("missing required 'ramp'", { instance: message }); + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("selectionMethod")) + throw $util.ProtocolError("missing required 'selectionMethod'", { instance: message }); + return message; + }; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuningsByPath.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarTuningsByPath message. + * @function verify + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarTuningsByPath.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.carTunings != null && message.hasOwnProperty("carTunings")) { + if (!Array.isArray(message.carTunings)) + return "carTunings: array expected"; + for (let i = 0; i < message.carTunings.length; ++i) { + let error = $root.wm.protobuf.CarTuning.verify(message.carTunings[i]); + if (error) + return "carTunings." + error; + } + } + switch (message.selectionMethod) { + default: + return "selectionMethod: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a CarTuningsByPath message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath + */ + CarTuningsByPath.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath) + return object; + let message = new $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath(); + if (object.area != null) + message.area = object.area >>> 0; + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.carTunings) { + if (!Array.isArray(object.carTunings)) + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.carTunings: array expected"); + message.carTunings = []; + for (let i = 0; i < object.carTunings.length; ++i) { + if (typeof object.carTunings[i] !== "object") + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.carTunings: object expected"); + message.carTunings[i] = $root.wm.protobuf.CarTuning.fromObject(object.carTunings[i]); + } + } + switch (object.selectionMethod) { + case "PATH_NEW": + case 1: + message.selectionMethod = 1; + break; + case "PATH_PLAIN": + case 2: + message.selectionMethod = 2; + break; + case "PATH_FRIEND": + case 3: + message.selectionMethod = 3; + break; + case "PATH_NORMAL": + case 4: + message.selectionMethod = 4; + break; + case "PATH_CHALLENGER": + case 5: + message.selectionMethod = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a CarTuningsByPath message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} message CarTuningsByPath + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarTuningsByPath.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.carTunings = []; + if (options.defaults) { + object.area = 0; + object.ramp = 0; + object.path = 0; + object.selectionMethod = options.enums === String ? "PATH_NEW" : 1; + } + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.carTunings && message.carTunings.length) { + object.carTunings = []; + for (let j = 0; j < message.carTunings.length; ++j) + object.carTunings[j] = $root.wm.protobuf.CarTuning.toObject(message.carTunings[j], options); + } + if (message.selectionMethod != null && message.hasOwnProperty("selectionMethod")) + object.selectionMethod = options.enums === String ? $root.wm.protobuf.PathSelectionMethod[message.selectionMethod] : message.selectionMethod; + return object; + }; + + /** + * Converts this CarTuningsByPath to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + * @returns {Object.} JSON object + */ + CarTuningsByPath.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarTuningsByPath + * @function getTypeUrl + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarTuningsByPath.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath"; + }; + + return CarTuningsByPath; + })(); + + return LoadPathsAndTuningsResponse; + })(); + + protobuf.LoadGhostDriveDataRequest = (function() { + + /** + * Properties of a LoadGhostDriveDataRequest. + * @memberof wm.protobuf + * @interface ILoadGhostDriveDataRequest + * @property {number} path LoadGhostDriveDataRequest path + * @property {Array.|null} [carTunings] LoadGhostDriveDataRequest carTunings + */ + + /** + * Constructs a new LoadGhostDriveDataRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostDriveDataRequest. + * @implements ILoadGhostDriveDataRequest + * @constructor + * @param {wm.protobuf.ILoadGhostDriveDataRequest=} [properties] Properties to set + */ + function LoadGhostDriveDataRequest(properties) { + this.carTunings = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostDriveDataRequest path. + * @member {number} path + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @instance + */ + LoadGhostDriveDataRequest.prototype.path = 0; + + /** + * LoadGhostDriveDataRequest carTunings. + * @member {Array.} carTunings + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @instance + */ + LoadGhostDriveDataRequest.prototype.carTunings = $util.emptyArray; + + /** + * Creates a new LoadGhostDriveDataRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.ILoadGhostDriveDataRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest instance + */ + LoadGhostDriveDataRequest.create = function create(properties) { + return new LoadGhostDriveDataRequest(properties); + }; + + /** + * Encodes the specified LoadGhostDriveDataRequest message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.ILoadGhostDriveDataRequest} message LoadGhostDriveDataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.path); + if (message.carTunings != null && message.carTunings.length) + for (let i = 0; i < message.carTunings.length; ++i) + $root.wm.protobuf.CarTuning.encode(message.carTunings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostDriveDataRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.ILoadGhostDriveDataRequest} message LoadGhostDriveDataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostDriveDataRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.path = reader.uint32(); + break; + } + case 2: { + if (!(message.carTunings && message.carTunings.length)) + message.carTunings = []; + message.carTunings.push($root.wm.protobuf.CarTuning.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostDriveDataRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostDriveDataRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.carTunings != null && message.hasOwnProperty("carTunings")) { + if (!Array.isArray(message.carTunings)) + return "carTunings: array expected"; + for (let i = 0; i < message.carTunings.length; ++i) { + let error = $root.wm.protobuf.CarTuning.verify(message.carTunings[i]); + if (error) + return "carTunings." + error; + } + } + return null; + }; + + /** + * Creates a LoadGhostDriveDataRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest + */ + LoadGhostDriveDataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostDriveDataRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostDriveDataRequest(); + if (object.path != null) + message.path = object.path >>> 0; + if (object.carTunings) { + if (!Array.isArray(object.carTunings)) + throw TypeError(".wm.protobuf.LoadGhostDriveDataRequest.carTunings: array expected"); + message.carTunings = []; + for (let i = 0; i < object.carTunings.length; ++i) { + if (typeof object.carTunings[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataRequest.carTunings: object expected"); + message.carTunings[i] = $root.wm.protobuf.CarTuning.fromObject(object.carTunings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostDriveDataRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.LoadGhostDriveDataRequest} message LoadGhostDriveDataRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostDriveDataRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.carTunings = []; + if (options.defaults) + object.path = 0; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.carTunings && message.carTunings.length) { + object.carTunings = []; + for (let j = 0; j < message.carTunings.length; ++j) + object.carTunings[j] = $root.wm.protobuf.CarTuning.toObject(message.carTunings[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostDriveDataRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostDriveDataRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostDriveDataRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostDriveDataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostDriveDataRequest"; + }; + + return LoadGhostDriveDataRequest; + })(); + + protobuf.LoadGhostDriveDataResponse = (function() { + + /** + * Properties of a LoadGhostDriveDataResponse. + * @memberof wm.protobuf + * @interface ILoadGhostDriveDataResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostDriveDataResponse error + * @property {Array.|null} [data] LoadGhostDriveDataResponse data + */ + + /** + * Constructs a new LoadGhostDriveDataResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostDriveDataResponse. + * @implements ILoadGhostDriveDataResponse + * @constructor + * @param {wm.protobuf.ILoadGhostDriveDataResponse=} [properties] Properties to set + */ + function LoadGhostDriveDataResponse(properties) { + this.data = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostDriveDataResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @instance + */ + LoadGhostDriveDataResponse.prototype.error = 0; + + /** + * LoadGhostDriveDataResponse data. + * @member {Array.} data + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @instance + */ + LoadGhostDriveDataResponse.prototype.data = $util.emptyArray; + + /** + * Creates a new LoadGhostDriveDataResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.ILoadGhostDriveDataResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse instance + */ + LoadGhostDriveDataResponse.create = function create(properties) { + return new LoadGhostDriveDataResponse(properties); + }; + + /** + * Encodes the specified LoadGhostDriveDataResponse message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.ILoadGhostDriveDataResponse} message LoadGhostDriveDataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.data != null && message.data.length) + for (let i = 0; i < message.data.length; ++i) + $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.encode(message.data[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostDriveDataResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.ILoadGhostDriveDataResponse} message LoadGhostDriveDataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostDriveDataResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.data && message.data.length)) + message.data = []; + message.data.push($root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostDriveDataResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostDriveDataResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.data != null && message.hasOwnProperty("data")) { + if (!Array.isArray(message.data)) + return "data: array expected"; + for (let i = 0; i < message.data.length; ++i) { + let error = $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify(message.data[i]); + if (error) + return "data." + error; + } + } + return null; + }; + + /** + * Creates a LoadGhostDriveDataResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse + */ + LoadGhostDriveDataResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostDriveDataResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostDriveDataResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.data) { + if (!Array.isArray(object.data)) + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.data: array expected"); + message.data = []; + for (let i = 0; i < object.data.length; ++i) { + if (typeof object.data[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.data: object expected"); + message.data[i] = $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.fromObject(object.data[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostDriveDataResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse} message LoadGhostDriveDataResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostDriveDataResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.data = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.data && message.data.length) { + object.data = []; + for (let j = 0; j < message.data.length; ++j) + object.data[j] = $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.toObject(message.data[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostDriveDataResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostDriveDataResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostDriveDataResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostDriveDataResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostDriveDataResponse"; + }; + + LoadGhostDriveDataResponse.GhostDriveData = (function() { + + /** + * Properties of a GhostDriveData. + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @interface IGhostDriveData + * @property {number} carId GhostDriveData carId + * @property {wm.protobuf.GhostType} type GhostDriveData type + * @property {wm.protobuf.IBinaryData|null} [driveData] GhostDriveData driveData + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByUser] GhostDriveData trendBinaryByUser + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByCar] GhostDriveData trendBinaryByCar + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByArea] GhostDriveData trendBinaryByArea + */ + + /** + * Constructs a new GhostDriveData. + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @classdesc Represents a GhostDriveData. + * @implements IGhostDriveData + * @constructor + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData=} [properties] Properties to set + */ + function GhostDriveData(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostDriveData carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.carId = 0; + + /** + * GhostDriveData type. + * @member {wm.protobuf.GhostType} type + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.type = 1; + + /** + * GhostDriveData driveData. + * @member {wm.protobuf.IBinaryData|null|undefined} driveData + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.driveData = null; + + /** + * GhostDriveData trendBinaryByUser. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByUser + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.trendBinaryByUser = null; + + /** + * GhostDriveData trendBinaryByCar. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByCar + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.trendBinaryByCar = null; + + /** + * GhostDriveData trendBinaryByArea. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByArea + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.trendBinaryByArea = null; + + /** + * Creates a new GhostDriveData instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData instance + */ + GhostDriveData.create = function create(properties) { + return new GhostDriveData(properties); + }; + + /** + * Encodes the specified GhostDriveData message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData} message GhostDriveData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostDriveData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.driveData != null && Object.hasOwnProperty.call(message, "driveData")) + $root.wm.protobuf.BinaryData.encode(message.driveData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.trendBinaryByUser != null && Object.hasOwnProperty.call(message, "trendBinaryByUser")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByUser, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.trendBinaryByCar != null && Object.hasOwnProperty.call(message, "trendBinaryByCar")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByCar, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.trendBinaryByArea != null && Object.hasOwnProperty.call(message, "trendBinaryByArea")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByArea, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostDriveData message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData} message GhostDriveData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostDriveData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostDriveData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.driveData = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 4: { + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 5: { + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 6: { + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("type")) + throw $util.ProtocolError("missing required 'type'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostDriveData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostDriveData message. + * @function verify + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostDriveData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.driveData != null && message.hasOwnProperty("driveData")) { + let error = $root.wm.protobuf.BinaryData.verify(message.driveData); + if (error) + return "driveData." + error; + } + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByUser); + if (error) + return "trendBinaryByUser." + error; + } + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByCar); + if (error) + return "trendBinaryByCar." + error; + } + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByArea); + if (error) + return "trendBinaryByArea." + error; + } + return null; + }; + + /** + * Creates a GhostDriveData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData + */ + GhostDriveData.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData) + return object; + let message = new $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData(); + if (object.carId != null) + message.carId = object.carId >>> 0; + switch (object.type) { + case "GHOST_NORMAL": + case 1: + message.type = 1; + break; + case "GHOST_PINCH_RUNNER": + case 2: + message.type = 2; + break; + case "GHOST_DEFAULT": + case 3: + message.type = 3; + break; + } + if (object.driveData != null) { + if (typeof object.driveData !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.driveData: object expected"); + message.driveData = $root.wm.protobuf.BinaryData.fromObject(object.driveData); + } + if (object.trendBinaryByUser != null) { + if (typeof object.trendBinaryByUser !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.trendBinaryByUser: object expected"); + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByUser); + } + if (object.trendBinaryByCar != null) { + if (typeof object.trendBinaryByCar !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.trendBinaryByCar: object expected"); + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByCar); + } + if (object.trendBinaryByArea != null) { + if (typeof object.trendBinaryByArea !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.trendBinaryByArea: object expected"); + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByArea); + } + return message; + }; + + /** + * Creates a plain object from a GhostDriveData message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} message GhostDriveData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostDriveData.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.type = options.enums === String ? "GHOST_NORMAL" : 1; + object.driveData = null; + object.trendBinaryByUser = null; + object.trendBinaryByCar = null; + object.trendBinaryByArea = null; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.wm.protobuf.GhostType[message.type] : message.type; + if (message.driveData != null && message.hasOwnProperty("driveData")) + object.driveData = $root.wm.protobuf.BinaryData.toObject(message.driveData, options); + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) + object.trendBinaryByUser = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByUser, options); + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) + object.trendBinaryByCar = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByCar, options); + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) + object.trendBinaryByArea = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByArea, options); + return object; + }; + + /** + * Converts this GhostDriveData to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + * @returns {Object.} JSON object + */ + GhostDriveData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostDriveData + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostDriveData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData"; + }; + + return GhostDriveData; + })(); + + return LoadGhostDriveDataResponse; + })(); + + protobuf.Car = (function() { + + /** + * Properties of a Car. + * @memberof wm.protobuf + * @interface ICar + * @property {number|null} [carId] Car carId + * @property {number|null} [userId] Car userId + * @property {number|null} [regionId] Car regionId + * @property {string|null} [name] Car name + * @property {number|null} [manufacturer] Car manufacturer + * @property {number|null} [model] Car model + * @property {number|null} [visualModel] Car visualModel + * @property {number|null} [defaultColor] Car defaultColor + * @property {number} customColor Car customColor + * @property {number} wheel Car wheel + * @property {number} wheelColor Car wheelColor + * @property {number} aero Car aero + * @property {number} bonnet Car bonnet + * @property {number} wing Car wing + * @property {wm.protobuf.IGTWing|null} [gtWing] Car gtWing + * @property {number} mirror Car mirror + * @property {number} neon Car neon + * @property {number} trunk Car trunk + * @property {number} plate Car plate + * @property {number} plateColor Car plateColor + * @property {number} plateNumber Car plateNumber + * @property {number} tunePower Car tunePower + * @property {number} tuneHandling Car tuneHandling + * @property {string} title Car title + * @property {number} level Car level + * @property {boolean|null} [windowSticker] Car windowSticker + * @property {string|null} [windowStickerString] Car windowStickerString + * @property {number|null} [windowStickerFont] Car windowStickerFont + * @property {number|null} [windowDecoration] Car windowDecoration + * @property {number|null} [rivalMarker] Car rivalMarker + * @property {number|null} [lastPlayedAt] Car lastPlayedAt + * @property {wm.protobuf.IPlace|null} [lastPlayedPlace] Car lastPlayedPlace + * @property {number|null} [aura] Car aura + * @property {number|null} [auraMotif] Car auraMotif + * @property {number|null} [ghostLevel] Car ghostLevel + * @property {string|null} [country] Car country + * @property {string|null} [searchCode] Car searchCode + */ + + /** + * Constructs a new Car. + * @memberof wm.protobuf + * @classdesc Represents a Car. + * @implements ICar + * @constructor + * @param {wm.protobuf.ICar=} [properties] Properties to set + */ + function Car(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Car carId. + * @member {number} carId + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.carId = 0; + + /** + * Car userId. + * @member {number} userId + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.userId = 0; + + /** + * Car regionId. + * @member {number} regionId + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.regionId = 0; + + /** + * Car name. + * @member {string} name + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.name = ""; + + /** + * Car manufacturer. + * @member {number} manufacturer + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.manufacturer = 0; + + /** + * Car model. + * @member {number} model + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.model = 0; + + /** + * Car visualModel. + * @member {number} visualModel + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.visualModel = 0; + + /** + * Car defaultColor. + * @member {number} defaultColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.defaultColor = 0; + + /** + * Car customColor. + * @member {number} customColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.customColor = 0; + + /** + * Car wheel. + * @member {number} wheel + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.wheel = 0; + + /** + * Car wheelColor. + * @member {number} wheelColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.wheelColor = 0; + + /** + * Car aero. + * @member {number} aero + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.aero = 0; + + /** + * Car bonnet. + * @member {number} bonnet + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.bonnet = 0; + + /** + * Car wing. + * @member {number} wing + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.wing = 0; + + /** + * Car gtWing. + * @member {wm.protobuf.IGTWing|null|undefined} gtWing + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.gtWing = null; + + /** + * Car mirror. + * @member {number} mirror + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.mirror = 0; + + /** + * Car neon. + * @member {number} neon + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.neon = 0; + + /** + * Car trunk. + * @member {number} trunk + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.trunk = 0; + + /** + * Car plate. + * @member {number} plate + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.plate = 0; + + /** + * Car plateColor. + * @member {number} plateColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.plateColor = 0; + + /** + * Car plateNumber. + * @member {number} plateNumber + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.plateNumber = 0; + + /** + * Car tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.tunePower = 0; + + /** + * Car tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.tuneHandling = 0; + + /** + * Car title. + * @member {string} title + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.title = ""; + + /** + * Car level. + * @member {number} level + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.level = 0; + + /** + * Car windowSticker. + * @member {boolean} windowSticker + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowSticker = false; + + /** + * Car windowStickerString. + * @member {string} windowStickerString + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowStickerString = ""; + + /** + * Car windowStickerFont. + * @member {number} windowStickerFont + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowStickerFont = 0; + + /** + * Car windowDecoration. + * @member {number} windowDecoration + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowDecoration = 0; + + /** + * Car rivalMarker. + * @member {number} rivalMarker + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.rivalMarker = 0; + + /** + * Car lastPlayedAt. + * @member {number} lastPlayedAt + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.lastPlayedAt = 0; + + /** + * Car lastPlayedPlace. + * @member {wm.protobuf.IPlace|null|undefined} lastPlayedPlace + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.lastPlayedPlace = null; + + /** + * Car aura. + * @member {number} aura + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.aura = 0; + + /** + * Car auraMotif. + * @member {number} auraMotif + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.auraMotif = 0; + + /** + * Car ghostLevel. + * @member {number} ghostLevel + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.ghostLevel = 0; + + /** + * Car country. + * @member {string} country + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.country = ""; + + /** + * Car searchCode. + * @member {string} searchCode + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.searchCode = ""; + + /** + * Creates a new Car instance using the specified properties. + * @function create + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.ICar=} [properties] Properties to set + * @returns {wm.protobuf.Car} Car instance + */ + Car.create = function create(properties) { + return new Car(properties); + }; + + /** + * Encodes the specified Car message. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.ICar} message Car message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Car.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.userId); + if (message.regionId != null && Object.hasOwnProperty.call(message, "regionId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.regionId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + if (message.manufacturer != null && Object.hasOwnProperty.call(message, "manufacturer")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.manufacturer); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.model); + if (message.visualModel != null && Object.hasOwnProperty.call(message, "visualModel")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.visualModel); + if (message.defaultColor != null && Object.hasOwnProperty.call(message, "defaultColor")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.defaultColor); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.customColor); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.wheel); + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.wheelColor); + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.aero); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.bonnet); + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.wing); + if (message.gtWing != null && Object.hasOwnProperty.call(message, "gtWing")) + $root.wm.protobuf.GTWing.encode(message.gtWing, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.mirror); + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.neon); + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.trunk); + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.plate); + writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.plateColor); + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.plateNumber); + writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.tunePower); + writer.uint32(/* id 32, wireType 0 =*/256).uint32(message.tuneHandling); + writer.uint32(/* id 33, wireType 2 =*/266).string(message.title); + writer.uint32(/* id 34, wireType 0 =*/272).uint32(message.level); + if (message.windowSticker != null && Object.hasOwnProperty.call(message, "windowSticker")) + writer.uint32(/* id 35, wireType 0 =*/280).bool(message.windowSticker); + if (message.windowStickerString != null && Object.hasOwnProperty.call(message, "windowStickerString")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.windowStickerString); + if (message.windowStickerFont != null && Object.hasOwnProperty.call(message, "windowStickerFont")) + writer.uint32(/* id 38, wireType 0 =*/304).uint32(message.windowStickerFont); + if (message.windowDecoration != null && Object.hasOwnProperty.call(message, "windowDecoration")) + writer.uint32(/* id 39, wireType 0 =*/312).uint32(message.windowDecoration); + if (message.rivalMarker != null && Object.hasOwnProperty.call(message, "rivalMarker")) + writer.uint32(/* id 41, wireType 0 =*/328).uint32(message.rivalMarker); + if (message.lastPlayedAt != null && Object.hasOwnProperty.call(message, "lastPlayedAt")) + writer.uint32(/* id 45, wireType 0 =*/360).uint32(message.lastPlayedAt); + if (message.lastPlayedPlace != null && Object.hasOwnProperty.call(message, "lastPlayedPlace")) + $root.wm.protobuf.Place.encode(message.lastPlayedPlace, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + if (message.aura != null && Object.hasOwnProperty.call(message, "aura")) + writer.uint32(/* id 47, wireType 0 =*/376).uint32(message.aura); + if (message.auraMotif != null && Object.hasOwnProperty.call(message, "auraMotif")) + writer.uint32(/* id 48, wireType 0 =*/384).uint32(message.auraMotif); + if (message.ghostLevel != null && Object.hasOwnProperty.call(message, "ghostLevel")) + writer.uint32(/* id 49, wireType 0 =*/392).uint32(message.ghostLevel); + if (message.country != null && Object.hasOwnProperty.call(message, "country")) + writer.uint32(/* id 50, wireType 2 =*/402).string(message.country); + if (message.searchCode != null && Object.hasOwnProperty.call(message, "searchCode")) + writer.uint32(/* id 51, wireType 2 =*/410).string(message.searchCode); + return writer; + }; + + /** + * Encodes the specified Car message, length delimited. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.ICar} message Car message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Car.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Car message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Car + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Car} Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Car.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Car(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.userId = reader.uint32(); + break; + } + case 3: { + message.regionId = reader.uint32(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + case 5: { + message.manufacturer = reader.uint32(); + break; + } + case 6: { + message.model = reader.uint32(); + break; + } + case 7: { + message.visualModel = reader.uint32(); + break; + } + case 8: { + message.defaultColor = reader.uint32(); + break; + } + case 9: { + message.customColor = reader.uint32(); + break; + } + case 10: { + message.wheel = reader.uint32(); + break; + } + case 11: { + message.wheelColor = reader.uint32(); + break; + } + case 12: { + message.aero = reader.uint32(); + break; + } + case 13: { + message.bonnet = reader.uint32(); + break; + } + case 14: { + message.wing = reader.uint32(); + break; + } + case 15: { + message.gtWing = $root.wm.protobuf.GTWing.decode(reader, reader.uint32()); + break; + } + case 16: { + message.mirror = reader.uint32(); + break; + } + case 24: { + message.neon = reader.uint32(); + break; + } + case 25: { + message.trunk = reader.uint32(); + break; + } + case 26: { + message.plate = reader.uint32(); + break; + } + case 27: { + message.plateColor = reader.uint32(); + break; + } + case 28: { + message.plateNumber = reader.uint32(); + break; + } + case 31: { + message.tunePower = reader.uint32(); + break; + } + case 32: { + message.tuneHandling = reader.uint32(); + break; + } + case 33: { + message.title = reader.string(); + break; + } + case 34: { + message.level = reader.uint32(); + break; + } + case 35: { + message.windowSticker = reader.bool(); + break; + } + case 37: { + message.windowStickerString = reader.string(); + break; + } + case 38: { + message.windowStickerFont = reader.uint32(); + break; + } + case 39: { + message.windowDecoration = reader.uint32(); + break; + } + case 41: { + message.rivalMarker = reader.uint32(); + break; + } + case 45: { + message.lastPlayedAt = reader.uint32(); + break; + } + case 46: { + message.lastPlayedPlace = $root.wm.protobuf.Place.decode(reader, reader.uint32()); + break; + } + case 47: { + message.aura = reader.uint32(); + break; + } + case 48: { + message.auraMotif = reader.uint32(); + break; + } + case 49: { + message.ghostLevel = reader.uint32(); + break; + } + case 50: { + message.country = reader.string(); + break; + } + case 51: { + message.searchCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("customColor")) + throw $util.ProtocolError("missing required 'customColor'", { instance: message }); + if (!message.hasOwnProperty("wheel")) + throw $util.ProtocolError("missing required 'wheel'", { instance: message }); + if (!message.hasOwnProperty("wheelColor")) + throw $util.ProtocolError("missing required 'wheelColor'", { instance: message }); + if (!message.hasOwnProperty("aero")) + throw $util.ProtocolError("missing required 'aero'", { instance: message }); + if (!message.hasOwnProperty("bonnet")) + throw $util.ProtocolError("missing required 'bonnet'", { instance: message }); + if (!message.hasOwnProperty("wing")) + throw $util.ProtocolError("missing required 'wing'", { instance: message }); + if (!message.hasOwnProperty("mirror")) + throw $util.ProtocolError("missing required 'mirror'", { instance: message }); + if (!message.hasOwnProperty("neon")) + throw $util.ProtocolError("missing required 'neon'", { instance: message }); + if (!message.hasOwnProperty("trunk")) + throw $util.ProtocolError("missing required 'trunk'", { instance: message }); + if (!message.hasOwnProperty("plate")) + throw $util.ProtocolError("missing required 'plate'", { instance: message }); + if (!message.hasOwnProperty("plateColor")) + throw $util.ProtocolError("missing required 'plateColor'", { instance: message }); + if (!message.hasOwnProperty("plateNumber")) + throw $util.ProtocolError("missing required 'plateNumber'", { instance: message }); + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("title")) + throw $util.ProtocolError("missing required 'title'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + return message; + }; + + /** + * Decodes a Car message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Car + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Car} Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Car.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Car message. + * @function verify + * @memberof wm.protobuf.Car + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Car.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.regionId != null && message.hasOwnProperty("regionId")) + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + if (!$util.isInteger(message.manufacturer)) + return "manufacturer: integer expected"; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isInteger(message.model)) + return "model: integer expected"; + if (message.visualModel != null && message.hasOwnProperty("visualModel")) + if (!$util.isInteger(message.visualModel)) + return "visualModel: integer expected"; + if (message.defaultColor != null && message.hasOwnProperty("defaultColor")) + if (!$util.isInteger(message.defaultColor)) + return "defaultColor: integer expected"; + if (!$util.isInteger(message.customColor)) + return "customColor: integer expected"; + if (!$util.isInteger(message.wheel)) + return "wheel: integer expected"; + if (!$util.isInteger(message.wheelColor)) + return "wheelColor: integer expected"; + if (!$util.isInteger(message.aero)) + return "aero: integer expected"; + if (!$util.isInteger(message.bonnet)) + return "bonnet: integer expected"; + if (!$util.isInteger(message.wing)) + return "wing: integer expected"; + if (message.gtWing != null && message.hasOwnProperty("gtWing")) { + let error = $root.wm.protobuf.GTWing.verify(message.gtWing); + if (error) + return "gtWing." + error; + } + if (!$util.isInteger(message.mirror)) + return "mirror: integer expected"; + if (!$util.isInteger(message.neon)) + return "neon: integer expected"; + if (!$util.isInteger(message.trunk)) + return "trunk: integer expected"; + if (!$util.isInteger(message.plate)) + return "plate: integer expected"; + if (!$util.isInteger(message.plateColor)) + return "plateColor: integer expected"; + if (!$util.isInteger(message.plateNumber)) + return "plateNumber: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isString(message.title)) + return "title: string expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + if (message.windowSticker != null && message.hasOwnProperty("windowSticker")) + if (typeof message.windowSticker !== "boolean") + return "windowSticker: boolean expected"; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + if (!$util.isString(message.windowStickerString)) + return "windowStickerString: string expected"; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + if (!$util.isInteger(message.windowStickerFont)) + return "windowStickerFont: integer expected"; + if (message.windowDecoration != null && message.hasOwnProperty("windowDecoration")) + if (!$util.isInteger(message.windowDecoration)) + return "windowDecoration: integer expected"; + if (message.rivalMarker != null && message.hasOwnProperty("rivalMarker")) + if (!$util.isInteger(message.rivalMarker)) + return "rivalMarker: integer expected"; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + if (!$util.isInteger(message.lastPlayedAt)) + return "lastPlayedAt: integer expected"; + if (message.lastPlayedPlace != null && message.hasOwnProperty("lastPlayedPlace")) { + let error = $root.wm.protobuf.Place.verify(message.lastPlayedPlace); + if (error) + return "lastPlayedPlace." + error; + } + if (message.aura != null && message.hasOwnProperty("aura")) + if (!$util.isInteger(message.aura)) + return "aura: integer expected"; + if (message.auraMotif != null && message.hasOwnProperty("auraMotif")) + if (!$util.isInteger(message.auraMotif)) + return "auraMotif: integer expected"; + if (message.ghostLevel != null && message.hasOwnProperty("ghostLevel")) + if (!$util.isInteger(message.ghostLevel)) + return "ghostLevel: integer expected"; + if (message.country != null && message.hasOwnProperty("country")) + if (!$util.isString(message.country)) + return "country: string expected"; + if (message.searchCode != null && message.hasOwnProperty("searchCode")) + if (!$util.isString(message.searchCode)) + return "searchCode: string expected"; + return null; + }; + + /** + * Creates a Car message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Car + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Car} Car + */ + Car.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Car) + return object; + let message = new $root.wm.protobuf.Car(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.manufacturer != null) + message.manufacturer = object.manufacturer >>> 0; + if (object.model != null) + message.model = object.model >>> 0; + if (object.visualModel != null) + message.visualModel = object.visualModel >>> 0; + if (object.defaultColor != null) + message.defaultColor = object.defaultColor >>> 0; + if (object.customColor != null) + message.customColor = object.customColor >>> 0; + if (object.wheel != null) + message.wheel = object.wheel >>> 0; + if (object.wheelColor != null) + message.wheelColor = object.wheelColor >>> 0; + if (object.aero != null) + message.aero = object.aero >>> 0; + if (object.bonnet != null) + message.bonnet = object.bonnet >>> 0; + if (object.wing != null) + message.wing = object.wing >>> 0; + if (object.gtWing != null) { + if (typeof object.gtWing !== "object") + throw TypeError(".wm.protobuf.Car.gtWing: object expected"); + message.gtWing = $root.wm.protobuf.GTWing.fromObject(object.gtWing); + } + if (object.mirror != null) + message.mirror = object.mirror >>> 0; + if (object.neon != null) + message.neon = object.neon >>> 0; + if (object.trunk != null) + message.trunk = object.trunk >>> 0; + if (object.plate != null) + message.plate = object.plate >>> 0; + if (object.plateColor != null) + message.plateColor = object.plateColor >>> 0; + if (object.plateNumber != null) + message.plateNumber = object.plateNumber >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.title != null) + message.title = String(object.title); + if (object.level != null) + message.level = object.level >>> 0; + if (object.windowSticker != null) + message.windowSticker = Boolean(object.windowSticker); + if (object.windowStickerString != null) + message.windowStickerString = String(object.windowStickerString); + if (object.windowStickerFont != null) + message.windowStickerFont = object.windowStickerFont >>> 0; + if (object.windowDecoration != null) + message.windowDecoration = object.windowDecoration >>> 0; + if (object.rivalMarker != null) + message.rivalMarker = object.rivalMarker >>> 0; + if (object.lastPlayedAt != null) + message.lastPlayedAt = object.lastPlayedAt >>> 0; + if (object.lastPlayedPlace != null) { + if (typeof object.lastPlayedPlace !== "object") + throw TypeError(".wm.protobuf.Car.lastPlayedPlace: object expected"); + message.lastPlayedPlace = $root.wm.protobuf.Place.fromObject(object.lastPlayedPlace); + } + if (object.aura != null) + message.aura = object.aura >>> 0; + if (object.auraMotif != null) + message.auraMotif = object.auraMotif >>> 0; + if (object.ghostLevel != null) + message.ghostLevel = object.ghostLevel >>> 0; + if (object.country != null) + message.country = String(object.country); + if (object.searchCode != null) + message.searchCode = String(object.searchCode); + return message; + }; + + /** + * Creates a plain object from a Car message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.Car} message Car + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Car.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.userId = 0; + object.regionId = 0; + object.name = ""; + object.manufacturer = 0; + object.model = 0; + object.visualModel = 0; + object.defaultColor = 0; + object.customColor = 0; + object.wheel = 0; + object.wheelColor = 0; + object.aero = 0; + object.bonnet = 0; + object.wing = 0; + object.gtWing = null; + object.mirror = 0; + object.neon = 0; + object.trunk = 0; + object.plate = 0; + object.plateColor = 0; + object.plateNumber = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.title = ""; + object.level = 0; + object.windowSticker = false; + object.windowStickerString = ""; + object.windowStickerFont = 0; + object.windowDecoration = 0; + object.rivalMarker = 0; + object.lastPlayedAt = 0; + object.lastPlayedPlace = null; + object.aura = 0; + object.auraMotif = 0; + object.ghostLevel = 0; + object.country = ""; + object.searchCode = ""; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + object.manufacturer = message.manufacturer; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.visualModel != null && message.hasOwnProperty("visualModel")) + object.visualModel = message.visualModel; + if (message.defaultColor != null && message.hasOwnProperty("defaultColor")) + object.defaultColor = message.defaultColor; + if (message.customColor != null && message.hasOwnProperty("customColor")) + object.customColor = message.customColor; + if (message.wheel != null && message.hasOwnProperty("wheel")) + object.wheel = message.wheel; + if (message.wheelColor != null && message.hasOwnProperty("wheelColor")) + object.wheelColor = message.wheelColor; + if (message.aero != null && message.hasOwnProperty("aero")) + object.aero = message.aero; + if (message.bonnet != null && message.hasOwnProperty("bonnet")) + object.bonnet = message.bonnet; + if (message.wing != null && message.hasOwnProperty("wing")) + object.wing = message.wing; + if (message.gtWing != null && message.hasOwnProperty("gtWing")) + object.gtWing = $root.wm.protobuf.GTWing.toObject(message.gtWing, options); + if (message.mirror != null && message.hasOwnProperty("mirror")) + object.mirror = message.mirror; + if (message.neon != null && message.hasOwnProperty("neon")) + object.neon = message.neon; + if (message.trunk != null && message.hasOwnProperty("trunk")) + object.trunk = message.trunk; + if (message.plate != null && message.hasOwnProperty("plate")) + object.plate = message.plate; + if (message.plateColor != null && message.hasOwnProperty("plateColor")) + object.plateColor = message.plateColor; + if (message.plateNumber != null && message.hasOwnProperty("plateNumber")) + object.plateNumber = message.plateNumber; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + if (message.windowSticker != null && message.hasOwnProperty("windowSticker")) + object.windowSticker = message.windowSticker; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + object.windowStickerString = message.windowStickerString; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + object.windowStickerFont = message.windowStickerFont; + if (message.windowDecoration != null && message.hasOwnProperty("windowDecoration")) + object.windowDecoration = message.windowDecoration; + if (message.rivalMarker != null && message.hasOwnProperty("rivalMarker")) + object.rivalMarker = message.rivalMarker; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + object.lastPlayedAt = message.lastPlayedAt; + if (message.lastPlayedPlace != null && message.hasOwnProperty("lastPlayedPlace")) + object.lastPlayedPlace = $root.wm.protobuf.Place.toObject(message.lastPlayedPlace, options); + if (message.aura != null && message.hasOwnProperty("aura")) + object.aura = message.aura; + if (message.auraMotif != null && message.hasOwnProperty("auraMotif")) + object.auraMotif = message.auraMotif; + if (message.ghostLevel != null && message.hasOwnProperty("ghostLevel")) + object.ghostLevel = message.ghostLevel; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + if (message.searchCode != null && message.hasOwnProperty("searchCode")) + object.searchCode = message.searchCode; + return object; + }; + + /** + * Converts this Car to JSON. + * @function toJSON + * @memberof wm.protobuf.Car + * @instance + * @returns {Object.} JSON object + */ + Car.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Car + * @function getTypeUrl + * @memberof wm.protobuf.Car + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Car.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Car"; + }; + + return Car; + })(); + + protobuf.CarSetting = (function() { + + /** + * Properties of a CarSetting. + * @memberof wm.protobuf + * @interface ICarSetting + * @property {number|null} [carId] CarSetting carId + * @property {boolean} view CarSetting view + * @property {boolean} transmission CarSetting transmission + * @property {boolean} retire CarSetting retire + * @property {number} meter CarSetting meter + * @property {boolean} navigationMap CarSetting navigationMap + * @property {number} volume CarSetting volume + * @property {number} bgm CarSetting bgm + * @property {number} nameplate CarSetting nameplate + * @property {number} nameplateColor CarSetting nameplateColor + * @property {number} terminalBackground CarSetting terminalBackground + */ + + /** + * Constructs a new CarSetting. + * @memberof wm.protobuf + * @classdesc Represents a CarSetting. + * @implements ICarSetting + * @constructor + * @param {wm.protobuf.ICarSetting=} [properties] Properties to set + */ + function CarSetting(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarSetting carId. + * @member {number} carId + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.carId = 0; + + /** + * CarSetting view. + * @member {boolean} view + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.view = false; + + /** + * CarSetting transmission. + * @member {boolean} transmission + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.transmission = false; + + /** + * CarSetting retire. + * @member {boolean} retire + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.retire = false; + + /** + * CarSetting meter. + * @member {number} meter + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.meter = 0; + + /** + * CarSetting navigationMap. + * @member {boolean} navigationMap + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.navigationMap = false; + + /** + * CarSetting volume. + * @member {number} volume + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.volume = 0; + + /** + * CarSetting bgm. + * @member {number} bgm + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.bgm = 0; + + /** + * CarSetting nameplate. + * @member {number} nameplate + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.nameplate = 0; + + /** + * CarSetting nameplateColor. + * @member {number} nameplateColor + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.nameplateColor = 0; + + /** + * CarSetting terminalBackground. + * @member {number} terminalBackground + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.terminalBackground = 0; + + /** + * Creates a new CarSetting instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.ICarSetting=} [properties] Properties to set + * @returns {wm.protobuf.CarSetting} CarSetting instance + */ + CarSetting.create = function create(properties) { + return new CarSetting(properties); + }; + + /** + * Encodes the specified CarSetting message. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.ICarSetting} message CarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.view); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.transmission); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.retire); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.meter); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.navigationMap); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.volume); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.bgm); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.nameplate); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.nameplateColor); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.terminalBackground); + return writer; + }; + + /** + * Encodes the specified CarSetting message, length delimited. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.ICarSetting} message CarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarSetting message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarSetting} CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarSetting(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.view = reader.bool(); + break; + } + case 3: { + message.transmission = reader.bool(); + break; + } + case 4: { + message.retire = reader.bool(); + break; + } + case 5: { + message.meter = reader.uint32(); + break; + } + case 6: { + message.navigationMap = reader.bool(); + break; + } + case 7: { + message.volume = reader.uint32(); + break; + } + case 8: { + message.bgm = reader.uint32(); + break; + } + case 9: { + message.nameplate = reader.uint32(); + break; + } + case 10: { + message.nameplateColor = reader.uint32(); + break; + } + case 13: { + message.terminalBackground = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("view")) + throw $util.ProtocolError("missing required 'view'", { instance: message }); + if (!message.hasOwnProperty("transmission")) + throw $util.ProtocolError("missing required 'transmission'", { instance: message }); + if (!message.hasOwnProperty("retire")) + throw $util.ProtocolError("missing required 'retire'", { instance: message }); + if (!message.hasOwnProperty("meter")) + throw $util.ProtocolError("missing required 'meter'", { instance: message }); + if (!message.hasOwnProperty("navigationMap")) + throw $util.ProtocolError("missing required 'navigationMap'", { instance: message }); + if (!message.hasOwnProperty("volume")) + throw $util.ProtocolError("missing required 'volume'", { instance: message }); + if (!message.hasOwnProperty("bgm")) + throw $util.ProtocolError("missing required 'bgm'", { instance: message }); + if (!message.hasOwnProperty("nameplate")) + throw $util.ProtocolError("missing required 'nameplate'", { instance: message }); + if (!message.hasOwnProperty("nameplateColor")) + throw $util.ProtocolError("missing required 'nameplateColor'", { instance: message }); + if (!message.hasOwnProperty("terminalBackground")) + throw $util.ProtocolError("missing required 'terminalBackground'", { instance: message }); + return message; + }; + + /** + * Decodes a CarSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarSetting} CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarSetting message. + * @function verify + * @memberof wm.protobuf.CarSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (typeof message.view !== "boolean") + return "view: boolean expected"; + if (typeof message.transmission !== "boolean") + return "transmission: boolean expected"; + if (typeof message.retire !== "boolean") + return "retire: boolean expected"; + if (!$util.isInteger(message.meter)) + return "meter: integer expected"; + if (typeof message.navigationMap !== "boolean") + return "navigationMap: boolean expected"; + if (!$util.isInteger(message.volume)) + return "volume: integer expected"; + if (!$util.isInteger(message.bgm)) + return "bgm: integer expected"; + if (!$util.isInteger(message.nameplate)) + return "nameplate: integer expected"; + if (!$util.isInteger(message.nameplateColor)) + return "nameplateColor: integer expected"; + if (!$util.isInteger(message.terminalBackground)) + return "terminalBackground: integer expected"; + return null; + }; + + /** + * Creates a CarSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarSetting + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarSetting} CarSetting + */ + CarSetting.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarSetting) + return object; + let message = new $root.wm.protobuf.CarSetting(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.view != null) + message.view = Boolean(object.view); + if (object.transmission != null) + message.transmission = Boolean(object.transmission); + if (object.retire != null) + message.retire = Boolean(object.retire); + if (object.meter != null) + message.meter = object.meter >>> 0; + if (object.navigationMap != null) + message.navigationMap = Boolean(object.navigationMap); + if (object.volume != null) + message.volume = object.volume >>> 0; + if (object.bgm != null) + message.bgm = object.bgm >>> 0; + if (object.nameplate != null) + message.nameplate = object.nameplate >>> 0; + if (object.nameplateColor != null) + message.nameplateColor = object.nameplateColor >>> 0; + if (object.terminalBackground != null) + message.terminalBackground = object.terminalBackground >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.CarSetting} message CarSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.view = false; + object.transmission = false; + object.retire = false; + object.meter = 0; + object.navigationMap = false; + object.volume = 0; + object.bgm = 0; + object.nameplate = 0; + object.nameplateColor = 0; + object.terminalBackground = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.view != null && message.hasOwnProperty("view")) + object.view = message.view; + if (message.transmission != null && message.hasOwnProperty("transmission")) + object.transmission = message.transmission; + if (message.retire != null && message.hasOwnProperty("retire")) + object.retire = message.retire; + if (message.meter != null && message.hasOwnProperty("meter")) + object.meter = message.meter; + if (message.navigationMap != null && message.hasOwnProperty("navigationMap")) + object.navigationMap = message.navigationMap; + if (message.volume != null && message.hasOwnProperty("volume")) + object.volume = message.volume; + if (message.bgm != null && message.hasOwnProperty("bgm")) + object.bgm = message.bgm; + if (message.nameplate != null && message.hasOwnProperty("nameplate")) + object.nameplate = message.nameplate; + if (message.nameplateColor != null && message.hasOwnProperty("nameplateColor")) + object.nameplateColor = message.nameplateColor; + if (message.terminalBackground != null && message.hasOwnProperty("terminalBackground")) + object.terminalBackground = message.terminalBackground; + return object; + }; + + /** + * Converts this CarSetting to JSON. + * @function toJSON + * @memberof wm.protobuf.CarSetting + * @instance + * @returns {Object.} JSON object + */ + CarSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarSetting + * @function getTypeUrl + * @memberof wm.protobuf.CarSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarSetting"; + }; + + return CarSetting; + })(); + + protobuf.GTWing = (function() { + + /** + * Properties of a GTWing. + * @memberof wm.protobuf + * @interface IGTWing + * @property {number} pillar GTWing pillar + * @property {number} pillarMaterial GTWing pillarMaterial + * @property {number} mainWing GTWing mainWing + * @property {number} mainWingColor GTWing mainWingColor + * @property {number} wingTip GTWing wingTip + * @property {number} material GTWing material + */ + + /** + * Constructs a new GTWing. + * @memberof wm.protobuf + * @classdesc Represents a GTWing. + * @implements IGTWing + * @constructor + * @param {wm.protobuf.IGTWing=} [properties] Properties to set + */ + function GTWing(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GTWing pillar. + * @member {number} pillar + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.pillar = 0; + + /** + * GTWing pillarMaterial. + * @member {number} pillarMaterial + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.pillarMaterial = 0; + + /** + * GTWing mainWing. + * @member {number} mainWing + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.mainWing = 0; + + /** + * GTWing mainWingColor. + * @member {number} mainWingColor + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.mainWingColor = 0; + + /** + * GTWing wingTip. + * @member {number} wingTip + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.wingTip = 0; + + /** + * GTWing material. + * @member {number} material + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.material = 0; + + /** + * Creates a new GTWing instance using the specified properties. + * @function create + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.IGTWing=} [properties] Properties to set + * @returns {wm.protobuf.GTWing} GTWing instance + */ + GTWing.create = function create(properties) { + return new GTWing(properties); + }; + + /** + * Encodes the specified GTWing message. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.IGTWing} message GTWing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GTWing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.pillar); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.pillarMaterial); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.mainWing); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mainWingColor); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.wingTip); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.material); + return writer; + }; + + /** + * Encodes the specified GTWing message, length delimited. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.IGTWing} message GTWing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GTWing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GTWing message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GTWing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GTWing} GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GTWing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GTWing(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pillar = reader.uint32(); + break; + } + case 2: { + message.pillarMaterial = reader.uint32(); + break; + } + case 3: { + message.mainWing = reader.uint32(); + break; + } + case 4: { + message.mainWingColor = reader.uint32(); + break; + } + case 5: { + message.wingTip = reader.uint32(); + break; + } + case 6: { + message.material = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("pillar")) + throw $util.ProtocolError("missing required 'pillar'", { instance: message }); + if (!message.hasOwnProperty("pillarMaterial")) + throw $util.ProtocolError("missing required 'pillarMaterial'", { instance: message }); + if (!message.hasOwnProperty("mainWing")) + throw $util.ProtocolError("missing required 'mainWing'", { instance: message }); + if (!message.hasOwnProperty("mainWingColor")) + throw $util.ProtocolError("missing required 'mainWingColor'", { instance: message }); + if (!message.hasOwnProperty("wingTip")) + throw $util.ProtocolError("missing required 'wingTip'", { instance: message }); + if (!message.hasOwnProperty("material")) + throw $util.ProtocolError("missing required 'material'", { instance: message }); + return message; + }; + + /** + * Decodes a GTWing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GTWing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GTWing} GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GTWing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GTWing message. + * @function verify + * @memberof wm.protobuf.GTWing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GTWing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.pillar)) + return "pillar: integer expected"; + if (!$util.isInteger(message.pillarMaterial)) + return "pillarMaterial: integer expected"; + if (!$util.isInteger(message.mainWing)) + return "mainWing: integer expected"; + if (!$util.isInteger(message.mainWingColor)) + return "mainWingColor: integer expected"; + if (!$util.isInteger(message.wingTip)) + return "wingTip: integer expected"; + if (!$util.isInteger(message.material)) + return "material: integer expected"; + return null; + }; + + /** + * Creates a GTWing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GTWing + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GTWing} GTWing + */ + GTWing.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GTWing) + return object; + let message = new $root.wm.protobuf.GTWing(); + if (object.pillar != null) + message.pillar = object.pillar >>> 0; + if (object.pillarMaterial != null) + message.pillarMaterial = object.pillarMaterial >>> 0; + if (object.mainWing != null) + message.mainWing = object.mainWing >>> 0; + if (object.mainWingColor != null) + message.mainWingColor = object.mainWingColor >>> 0; + if (object.wingTip != null) + message.wingTip = object.wingTip >>> 0; + if (object.material != null) + message.material = object.material >>> 0; + return message; + }; + + /** + * Creates a plain object from a GTWing message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.GTWing} message GTWing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GTWing.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.pillar = 0; + object.pillarMaterial = 0; + object.mainWing = 0; + object.mainWingColor = 0; + object.wingTip = 0; + object.material = 0; + } + if (message.pillar != null && message.hasOwnProperty("pillar")) + object.pillar = message.pillar; + if (message.pillarMaterial != null && message.hasOwnProperty("pillarMaterial")) + object.pillarMaterial = message.pillarMaterial; + if (message.mainWing != null && message.hasOwnProperty("mainWing")) + object.mainWing = message.mainWing; + if (message.mainWingColor != null && message.hasOwnProperty("mainWingColor")) + object.mainWingColor = message.mainWingColor; + if (message.wingTip != null && message.hasOwnProperty("wingTip")) + object.wingTip = message.wingTip; + if (message.material != null && message.hasOwnProperty("material")) + object.material = message.material; + return object; + }; + + /** + * Converts this GTWing to JSON. + * @function toJSON + * @memberof wm.protobuf.GTWing + * @instance + * @returns {Object.} JSON object + */ + GTWing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GTWing + * @function getTypeUrl + * @memberof wm.protobuf.GTWing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GTWing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GTWing"; + }; + + return GTWing; + })(); + + protobuf.CarItem = (function() { + + /** + * Properties of a CarItem. + * @memberof wm.protobuf + * @interface ICarItem + * @property {wm.protobuf.ItemCategory} category CarItem category + * @property {number} itemId CarItem itemId + * @property {number|null} [amount] CarItem amount + */ + + /** + * Constructs a new CarItem. + * @memberof wm.protobuf + * @classdesc Represents a CarItem. + * @implements ICarItem + * @constructor + * @param {wm.protobuf.ICarItem=} [properties] Properties to set + */ + function CarItem(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarItem category. + * @member {wm.protobuf.ItemCategory} category + * @memberof wm.protobuf.CarItem + * @instance + */ + CarItem.prototype.category = 1; + + /** + * CarItem itemId. + * @member {number} itemId + * @memberof wm.protobuf.CarItem + * @instance + */ + CarItem.prototype.itemId = 0; + + /** + * CarItem amount. + * @member {number} amount + * @memberof wm.protobuf.CarItem + * @instance + */ + CarItem.prototype.amount = 0; + + /** + * Creates a new CarItem instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.ICarItem=} [properties] Properties to set + * @returns {wm.protobuf.CarItem} CarItem instance + */ + CarItem.create = function create(properties) { + return new CarItem(properties); + }; + + /** + * Encodes the specified CarItem message. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.ICarItem} message CarItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.itemId); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.amount); + return writer; + }; + + /** + * Encodes the specified CarItem message, length delimited. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.ICarItem} message CarItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarItem message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarItem} CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarItem(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.itemId = reader.uint32(); + break; + } + case 3: { + message.amount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("category")) + throw $util.ProtocolError("missing required 'category'", { instance: message }); + if (!message.hasOwnProperty("itemId")) + throw $util.ProtocolError("missing required 'itemId'", { instance: message }); + return message; + }; + + /** + * Decodes a CarItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarItem} CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarItem message. + * @function verify + * @memberof wm.protobuf.CarItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.category) { + default: + return "category: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + case 10: + case 12: + case 14: + case 15: + case 16: + case 17: + case 19: + case 22: + case 24: + case 25: + case 26: + case 27: + case 28: + case 201: + case 202: + case 203: + case 300: + case 301: + break; + } + if (!$util.isInteger(message.itemId)) + return "itemId: integer expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isInteger(message.amount)) + return "amount: integer expected"; + return null; + }; + + /** + * Creates a CarItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarItem + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarItem} CarItem + */ + CarItem.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarItem) + return object; + let message = new $root.wm.protobuf.CarItem(); + switch (object.category) { + case "CAT_CUSTOM_COLOR": + case 1: + message.category = 1; + break; + case "CAT_WHEEL": + case 2: + message.category = 2; + break; + case "CAT_AERO": + case 3: + message.category = 3; + break; + case "CAT_BONNET": + case 4: + message.category = 4; + break; + case "CAT_WING": + case 5: + message.category = 5; + break; + case "CAT_MIRROR": + case 6: + message.category = 6; + break; + case "CAT_NEON": + case 8: + message.category = 8; + break; + case "CAT_TRUNK": + case 9: + message.category = 9; + break; + case "CAT_NUMBER_PLATE": + case 10: + message.category = 10; + break; + case "CAT_GT_WING": + case 12: + message.category = 12; + break; + case "CAT_AURA_MOTIF": + case 14: + message.category = 14; + break; + case "CAT_METER": + case 15: + message.category = 15; + break; + case "CAT_BGM": + case 16: + message.category = 16; + break; + case "CAT_NAME_PLATE": + case 17: + message.category = 17; + break; + case "CAT_NUMBER": + case 19: + message.category = 19; + break; + case "CAT_BGM_TRACK": + case 22: + message.category = 22; + break; + case "CAT_WINDOW_STICKER_FONT": + case 24: + message.category = 24; + break; + case "CAT_WINDOW_DECORATION": + case 25: + message.category = 25; + break; + case "CAT_RIVAL_MARKER": + case 26: + message.category = 26; + break; + case "CAT_STAMP": + case 27: + message.category = 27; + break; + case "CAT_TERMINAL_BACKGROUND": + case 28: + message.category = 28; + break; + case "CAT_CAR_TICKET": + case 201: + message.category = 201; + break; + case "CAT_CONSUMPTION_ITEM": + case 202: + message.category = 202; + break; + case "CAT_CAR_TICKET_FREE": + case 203: + message.category = 203; + break; + case "CAT_AERO_FULLSET": + case 300: + message.category = 300; + break; + case "CAT_AERO_LIMITED": + case 301: + message.category = 301; + break; + } + if (object.itemId != null) + message.itemId = object.itemId >>> 0; + if (object.amount != null) + message.amount = object.amount >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarItem message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.CarItem} message CarItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.category = options.enums === String ? "CAT_CUSTOM_COLOR" : 1; + object.itemId = 0; + object.amount = 0; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.wm.protobuf.ItemCategory[message.category] : message.category; + if (message.itemId != null && message.hasOwnProperty("itemId")) + object.itemId = message.itemId; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this CarItem to JSON. + * @function toJSON + * @memberof wm.protobuf.CarItem + * @instance + * @returns {Object.} JSON object + */ + CarItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarItem + * @function getTypeUrl + * @memberof wm.protobuf.CarItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarItem"; + }; + + return CarItem; + })(); + + protobuf.CopiedCar = (function() { + + /** + * Properties of a CopiedCar. + * @memberof wm.protobuf + * @interface ICopiedCar + * @property {wm.protobuf.ICar} car CopiedCar car + * @property {number} remainingPlayCounts CopiedCar remainingPlayCounts + */ + + /** + * Constructs a new CopiedCar. + * @memberof wm.protobuf + * @classdesc Represents a CopiedCar. + * @implements ICopiedCar + * @constructor + * @param {wm.protobuf.ICopiedCar=} [properties] Properties to set + */ + function CopiedCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CopiedCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.CopiedCar + * @instance + */ + CopiedCar.prototype.car = null; + + /** + * CopiedCar remainingPlayCounts. + * @member {number} remainingPlayCounts + * @memberof wm.protobuf.CopiedCar + * @instance + */ + CopiedCar.prototype.remainingPlayCounts = 0; + + /** + * Creates a new CopiedCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.ICopiedCar=} [properties] Properties to set + * @returns {wm.protobuf.CopiedCar} CopiedCar instance + */ + CopiedCar.create = function create(properties) { + return new CopiedCar(properties); + }; + + /** + * Encodes the specified CopiedCar message. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.ICopiedCar} message CopiedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopiedCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.remainingPlayCounts); + return writer; + }; + + /** + * Encodes the specified CopiedCar message, length delimited. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.ICopiedCar} message CopiedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopiedCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CopiedCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CopiedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CopiedCar} CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopiedCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CopiedCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.remainingPlayCounts = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("remainingPlayCounts")) + throw $util.ProtocolError("missing required 'remainingPlayCounts'", { instance: message }); + return message; + }; + + /** + * Decodes a CopiedCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CopiedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CopiedCar} CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopiedCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CopiedCar message. + * @function verify + * @memberof wm.protobuf.CopiedCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CopiedCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.remainingPlayCounts)) + return "remainingPlayCounts: integer expected"; + return null; + }; + + /** + * Creates a CopiedCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CopiedCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CopiedCar} CopiedCar + */ + CopiedCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CopiedCar) + return object; + let message = new $root.wm.protobuf.CopiedCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.CopiedCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.remainingPlayCounts != null) + message.remainingPlayCounts = object.remainingPlayCounts >>> 0; + return message; + }; + + /** + * Creates a plain object from a CopiedCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.CopiedCar} message CopiedCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CopiedCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.remainingPlayCounts = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.remainingPlayCounts != null && message.hasOwnProperty("remainingPlayCounts")) + object.remainingPlayCounts = message.remainingPlayCounts; + return object; + }; + + /** + * Converts this CopiedCar to JSON. + * @function toJSON + * @memberof wm.protobuf.CopiedCar + * @instance + * @returns {Object.} JSON object + */ + CopiedCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CopiedCar + * @function getTypeUrl + * @memberof wm.protobuf.CopiedCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CopiedCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CopiedCar"; + }; + + return CopiedCar; + })(); + + protobuf.FriendCar = (function() { + + /** + * Properties of a FriendCar. + * @memberof wm.protobuf + * @interface IFriendCar + * @property {wm.protobuf.ICar} car FriendCar car + * @property {number|null} [friendshipLevel] FriendCar friendshipLevel + * @property {boolean} nonhuman FriendCar nonhuman + */ + + /** + * Constructs a new FriendCar. + * @memberof wm.protobuf + * @classdesc Represents a FriendCar. + * @implements IFriendCar + * @constructor + * @param {wm.protobuf.IFriendCar=} [properties] Properties to set + */ + function FriendCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FriendCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.FriendCar + * @instance + */ + FriendCar.prototype.car = null; + + /** + * FriendCar friendshipLevel. + * @member {number} friendshipLevel + * @memberof wm.protobuf.FriendCar + * @instance + */ + FriendCar.prototype.friendshipLevel = 0; + + /** + * FriendCar nonhuman. + * @member {boolean} nonhuman + * @memberof wm.protobuf.FriendCar + * @instance + */ + FriendCar.prototype.nonhuman = false; + + /** + * Creates a new FriendCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.IFriendCar=} [properties] Properties to set + * @returns {wm.protobuf.FriendCar} FriendCar instance + */ + FriendCar.create = function create(properties) { + return new FriendCar(properties); + }; + + /** + * Encodes the specified FriendCar message. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.IFriendCar} message FriendCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FriendCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.friendshipLevel != null && Object.hasOwnProperty.call(message, "friendshipLevel")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.friendshipLevel); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.nonhuman); + return writer; + }; + + /** + * Encodes the specified FriendCar message, length delimited. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.IFriendCar} message FriendCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FriendCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FriendCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.FriendCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.FriendCar} FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FriendCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.FriendCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.friendshipLevel = reader.uint32(); + break; + } + case 3: { + message.nonhuman = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("nonhuman")) + throw $util.ProtocolError("missing required 'nonhuman'", { instance: message }); + return message; + }; + + /** + * Decodes a FriendCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.FriendCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.FriendCar} FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FriendCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FriendCar message. + * @function verify + * @memberof wm.protobuf.FriendCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FriendCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.friendshipLevel != null && message.hasOwnProperty("friendshipLevel")) + if (!$util.isInteger(message.friendshipLevel)) + return "friendshipLevel: integer expected"; + if (typeof message.nonhuman !== "boolean") + return "nonhuman: boolean expected"; + return null; + }; + + /** + * Creates a FriendCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.FriendCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.FriendCar} FriendCar + */ + FriendCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.FriendCar) + return object; + let message = new $root.wm.protobuf.FriendCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.FriendCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.friendshipLevel != null) + message.friendshipLevel = object.friendshipLevel >>> 0; + if (object.nonhuman != null) + message.nonhuman = Boolean(object.nonhuman); + return message; + }; + + /** + * Creates a plain object from a FriendCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.FriendCar} message FriendCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FriendCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.friendshipLevel = 0; + object.nonhuman = false; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.friendshipLevel != null && message.hasOwnProperty("friendshipLevel")) + object.friendshipLevel = message.friendshipLevel; + if (message.nonhuman != null && message.hasOwnProperty("nonhuman")) + object.nonhuman = message.nonhuman; + return object; + }; + + /** + * Converts this FriendCar to JSON. + * @function toJSON + * @memberof wm.protobuf.FriendCar + * @instance + * @returns {Object.} JSON object + */ + FriendCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FriendCar + * @function getTypeUrl + * @memberof wm.protobuf.FriendCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FriendCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.FriendCar"; + }; + + return FriendCar; + })(); + + protobuf.ChallengerCar = (function() { + + /** + * Properties of a ChallengerCar. + * @memberof wm.protobuf + * @interface IChallengerCar + * @property {wm.protobuf.ICar} car ChallengerCar car + * @property {number} stamp ChallengerCar stamp + * @property {number} result ChallengerCar result + * @property {number} area ChallengerCar area + */ + + /** + * Constructs a new ChallengerCar. + * @memberof wm.protobuf + * @classdesc Represents a ChallengerCar. + * @implements IChallengerCar + * @constructor + * @param {wm.protobuf.IChallengerCar=} [properties] Properties to set + */ + function ChallengerCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChallengerCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.car = null; + + /** + * ChallengerCar stamp. + * @member {number} stamp + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.stamp = 0; + + /** + * ChallengerCar result. + * @member {number} result + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.result = 0; + + /** + * ChallengerCar area. + * @member {number} area + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.area = 0; + + /** + * Creates a new ChallengerCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.IChallengerCar=} [properties] Properties to set + * @returns {wm.protobuf.ChallengerCar} ChallengerCar instance + */ + ChallengerCar.create = function create(properties) { + return new ChallengerCar(properties); + }; + + /** + * Encodes the specified ChallengerCar message. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.IChallengerCar} message ChallengerCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChallengerCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stamp); + writer.uint32(/* id 4, wireType 0 =*/32).sint32(message.result); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.area); + return writer; + }; + + /** + * Encodes the specified ChallengerCar message, length delimited. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.IChallengerCar} message ChallengerCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChallengerCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ChallengerCar} ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChallengerCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ChallengerCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 3: { + message.stamp = reader.uint32(); + break; + } + case 4: { + message.result = reader.sint32(); + break; + } + case 5: { + message.area = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("stamp")) + throw $util.ProtocolError("missing required 'stamp'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ChallengerCar} ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChallengerCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChallengerCar message. + * @function verify + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChallengerCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.stamp)) + return "stamp: integer expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + return null; + }; + + /** + * Creates a ChallengerCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ChallengerCar} ChallengerCar + */ + ChallengerCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ChallengerCar) + return object; + let message = new $root.wm.protobuf.ChallengerCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.ChallengerCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.stamp != null) + message.stamp = object.stamp >>> 0; + if (object.result != null) + message.result = object.result | 0; + if (object.area != null) + message.area = object.area >>> 0; + return message; + }; + + /** + * Creates a plain object from a ChallengerCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.ChallengerCar} message ChallengerCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChallengerCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.stamp = 0; + object.result = 0; + object.area = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.stamp != null && message.hasOwnProperty("stamp")) + object.stamp = message.stamp; + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + return object; + }; + + /** + * Converts this ChallengerCar to JSON. + * @function toJSON + * @memberof wm.protobuf.ChallengerCar + * @instance + * @returns {Object.} JSON object + */ + ChallengerCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChallengerCar + * @function getTypeUrl + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChallengerCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ChallengerCar"; + }; + + return ChallengerCar; + })(); + + protobuf.StampTargetCar = (function() { + + /** + * Properties of a StampTargetCar. + * @memberof wm.protobuf + * @interface IStampTargetCar + * @property {wm.protobuf.ICar} car StampTargetCar car + * @property {number} returnCount StampTargetCar returnCount + * @property {boolean} locked StampTargetCar locked + * @property {boolean} recommended StampTargetCar recommended + */ + + /** + * Constructs a new StampTargetCar. + * @memberof wm.protobuf + * @classdesc Represents a StampTargetCar. + * @implements IStampTargetCar + * @constructor + * @param {wm.protobuf.IStampTargetCar=} [properties] Properties to set + */ + function StampTargetCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StampTargetCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.car = null; + + /** + * StampTargetCar returnCount. + * @member {number} returnCount + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.returnCount = 0; + + /** + * StampTargetCar locked. + * @member {boolean} locked + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.locked = false; + + /** + * StampTargetCar recommended. + * @member {boolean} recommended + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.recommended = false; + + /** + * Creates a new StampTargetCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.IStampTargetCar=} [properties] Properties to set + * @returns {wm.protobuf.StampTargetCar} StampTargetCar instance + */ + StampTargetCar.create = function create(properties) { + return new StampTargetCar(properties); + }; + + /** + * Encodes the specified StampTargetCar message. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.IStampTargetCar} message StampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StampTargetCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.returnCount); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.locked); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.recommended); + return writer; + }; + + /** + * Encodes the specified StampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.IStampTargetCar} message StampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StampTargetCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.StampTargetCar} StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StampTargetCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.StampTargetCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.returnCount = reader.uint32(); + break; + } + case 3: { + message.locked = reader.bool(); + break; + } + case 4: { + message.recommended = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("returnCount")) + throw $util.ProtocolError("missing required 'returnCount'", { instance: message }); + if (!message.hasOwnProperty("locked")) + throw $util.ProtocolError("missing required 'locked'", { instance: message }); + if (!message.hasOwnProperty("recommended")) + throw $util.ProtocolError("missing required 'recommended'", { instance: message }); + return message; + }; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.StampTargetCar} StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StampTargetCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StampTargetCar message. + * @function verify + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StampTargetCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.returnCount)) + return "returnCount: integer expected"; + if (typeof message.locked !== "boolean") + return "locked: boolean expected"; + if (typeof message.recommended !== "boolean") + return "recommended: boolean expected"; + return null; + }; + + /** + * Creates a StampTargetCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.StampTargetCar} StampTargetCar + */ + StampTargetCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.StampTargetCar) + return object; + let message = new $root.wm.protobuf.StampTargetCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.StampTargetCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.returnCount != null) + message.returnCount = object.returnCount >>> 0; + if (object.locked != null) + message.locked = Boolean(object.locked); + if (object.recommended != null) + message.recommended = Boolean(object.recommended); + return message; + }; + + /** + * Creates a plain object from a StampTargetCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.StampTargetCar} message StampTargetCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StampTargetCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.returnCount = 0; + object.locked = false; + object.recommended = false; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.returnCount != null && message.hasOwnProperty("returnCount")) + object.returnCount = message.returnCount; + if (message.locked != null && message.hasOwnProperty("locked")) + object.locked = message.locked; + if (message.recommended != null && message.hasOwnProperty("recommended")) + object.recommended = message.recommended; + return object; + }; + + /** + * Converts this StampTargetCar to JSON. + * @function toJSON + * @memberof wm.protobuf.StampTargetCar + * @instance + * @returns {Object.} JSON object + */ + StampTargetCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StampTargetCar + * @function getTypeUrl + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StampTargetCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.StampTargetCar"; + }; + + return StampTargetCar; + })(); + + protobuf.BookmarkedCar = (function() { + + /** + * Properties of a BookmarkedCar. + * @memberof wm.protobuf + * @interface IBookmarkedCar + * @property {wm.protobuf.ICar} car BookmarkedCar car + * @property {number} returnCount BookmarkedCar returnCount + */ + + /** + * Constructs a new BookmarkedCar. + * @memberof wm.protobuf + * @classdesc Represents a BookmarkedCar. + * @implements IBookmarkedCar + * @constructor + * @param {wm.protobuf.IBookmarkedCar=} [properties] Properties to set + */ + function BookmarkedCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BookmarkedCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.BookmarkedCar + * @instance + */ + BookmarkedCar.prototype.car = null; + + /** + * BookmarkedCar returnCount. + * @member {number} returnCount + * @memberof wm.protobuf.BookmarkedCar + * @instance + */ + BookmarkedCar.prototype.returnCount = 0; + + /** + * Creates a new BookmarkedCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.IBookmarkedCar=} [properties] Properties to set + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar instance + */ + BookmarkedCar.create = function create(properties) { + return new BookmarkedCar(properties); + }; + + /** + * Encodes the specified BookmarkedCar message. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.IBookmarkedCar} message BookmarkedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BookmarkedCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.returnCount); + return writer; + }; + + /** + * Encodes the specified BookmarkedCar message, length delimited. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.IBookmarkedCar} message BookmarkedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BookmarkedCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BookmarkedCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.BookmarkedCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.returnCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("returnCount")) + throw $util.ProtocolError("missing required 'returnCount'", { instance: message }); + return message; + }; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BookmarkedCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BookmarkedCar message. + * @function verify + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BookmarkedCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.returnCount)) + return "returnCount: integer expected"; + return null; + }; + + /** + * Creates a BookmarkedCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar + */ + BookmarkedCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.BookmarkedCar) + return object; + let message = new $root.wm.protobuf.BookmarkedCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.BookmarkedCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.returnCount != null) + message.returnCount = object.returnCount >>> 0; + return message; + }; + + /** + * Creates a plain object from a BookmarkedCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.BookmarkedCar} message BookmarkedCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BookmarkedCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.returnCount = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.returnCount != null && message.hasOwnProperty("returnCount")) + object.returnCount = message.returnCount; + return object; + }; + + /** + * Converts this BookmarkedCar to JSON. + * @function toJSON + * @memberof wm.protobuf.BookmarkedCar + * @instance + * @returns {Object.} JSON object + */ + BookmarkedCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BookmarkedCar + * @function getTypeUrl + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BookmarkedCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.BookmarkedCar"; + }; + + return BookmarkedCar; + })(); + + protobuf.PreviousVersionStampTargetCar = (function() { + + /** + * Properties of a PreviousVersionStampTargetCar. + * @memberof wm.protobuf + * @interface IPreviousVersionStampTargetCar + * @property {wm.protobuf.ICar} car PreviousVersionStampTargetCar car + * @property {number} returnCount PreviousVersionStampTargetCar returnCount + * @property {number|null} [currentCarId] PreviousVersionStampTargetCar currentCarId + */ + + /** + * Constructs a new PreviousVersionStampTargetCar. + * @memberof wm.protobuf + * @classdesc Represents a PreviousVersionStampTargetCar. + * @implements IPreviousVersionStampTargetCar + * @constructor + * @param {wm.protobuf.IPreviousVersionStampTargetCar=} [properties] Properties to set + */ + function PreviousVersionStampTargetCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PreviousVersionStampTargetCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + */ + PreviousVersionStampTargetCar.prototype.car = null; + + /** + * PreviousVersionStampTargetCar returnCount. + * @member {number} returnCount + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + */ + PreviousVersionStampTargetCar.prototype.returnCount = 0; + + /** + * PreviousVersionStampTargetCar currentCarId. + * @member {number} currentCarId + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + */ + PreviousVersionStampTargetCar.prototype.currentCarId = 0; + + /** + * Creates a new PreviousVersionStampTargetCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.IPreviousVersionStampTargetCar=} [properties] Properties to set + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar instance + */ + PreviousVersionStampTargetCar.create = function create(properties) { + return new PreviousVersionStampTargetCar(properties); + }; + + /** + * Encodes the specified PreviousVersionStampTargetCar message. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.IPreviousVersionStampTargetCar} message PreviousVersionStampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviousVersionStampTargetCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.currentCarId != null && Object.hasOwnProperty.call(message, "currentCarId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.currentCarId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.returnCount); + return writer; + }; + + /** + * Encodes the specified PreviousVersionStampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.IPreviousVersionStampTargetCar} message PreviousVersionStampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviousVersionStampTargetCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviousVersionStampTargetCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PreviousVersionStampTargetCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 3: { + message.returnCount = reader.uint32(); + break; + } + case 2: { + message.currentCarId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("returnCount")) + throw $util.ProtocolError("missing required 'returnCount'", { instance: message }); + return message; + }; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviousVersionStampTargetCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PreviousVersionStampTargetCar message. + * @function verify + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreviousVersionStampTargetCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.returnCount)) + return "returnCount: integer expected"; + if (message.currentCarId != null && message.hasOwnProperty("currentCarId")) + if (!$util.isInteger(message.currentCarId)) + return "currentCarId: integer expected"; + return null; + }; + + /** + * Creates a PreviousVersionStampTargetCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar + */ + PreviousVersionStampTargetCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PreviousVersionStampTargetCar) + return object; + let message = new $root.wm.protobuf.PreviousVersionStampTargetCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.PreviousVersionStampTargetCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.returnCount != null) + message.returnCount = object.returnCount >>> 0; + if (object.currentCarId != null) + message.currentCarId = object.currentCarId >>> 0; + return message; + }; + + /** + * Creates a plain object from a PreviousVersionStampTargetCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.PreviousVersionStampTargetCar} message PreviousVersionStampTargetCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreviousVersionStampTargetCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.currentCarId = 0; + object.returnCount = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.currentCarId != null && message.hasOwnProperty("currentCarId")) + object.currentCarId = message.currentCarId; + if (message.returnCount != null && message.hasOwnProperty("returnCount")) + object.returnCount = message.returnCount; + return object; + }; + + /** + * Converts this PreviousVersionStampTargetCar to JSON. + * @function toJSON + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + * @returns {Object.} JSON object + */ + PreviousVersionStampTargetCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PreviousVersionStampTargetCar + * @function getTypeUrl + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PreviousVersionStampTargetCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PreviousVersionStampTargetCar"; + }; + + return PreviousVersionStampTargetCar; + })(); + + protobuf.GhostCar = (function() { + + /** + * Properties of a GhostCar. + * @memberof wm.protobuf + * @interface IGhostCar + * @property {wm.protobuf.ICar} car GhostCar car + * @property {number|null} [area] GhostCar area + * @property {number|null} [ramp] GhostCar ramp + * @property {number|null} [path] GhostCar path + * @property {boolean|null} [nonhuman] GhostCar nonhuman + * @property {wm.protobuf.GhostType|null} [type] GhostCar type + * @property {number|Long|null} [trailId] GhostCar trailId + */ + + /** + * Constructs a new GhostCar. + * @memberof wm.protobuf + * @classdesc Represents a GhostCar. + * @implements IGhostCar + * @constructor + * @param {wm.protobuf.IGhostCar=} [properties] Properties to set + */ + function GhostCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.car = null; + + /** + * GhostCar area. + * @member {number} area + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.area = 0; + + /** + * GhostCar ramp. + * @member {number} ramp + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.ramp = 0; + + /** + * GhostCar path. + * @member {number} path + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.path = 0; + + /** + * GhostCar nonhuman. + * @member {boolean} nonhuman + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.nonhuman = false; + + /** + * GhostCar type. + * @member {wm.protobuf.GhostType} type + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.type = 1; + + /** + * GhostCar trailId. + * @member {number|Long} trailId + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.trailId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new GhostCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.IGhostCar=} [properties] Properties to set + * @returns {wm.protobuf.GhostCar} GhostCar instance + */ + GhostCar.create = function create(properties) { + return new GhostCar(properties); + }; + + /** + * Encodes the specified GhostCar message. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.IGhostCar} message GhostCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.area != null && Object.hasOwnProperty.call(message, "area")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.area); + if (message.ramp != null && Object.hasOwnProperty.call(message, "ramp")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.ramp); + if (message.nonhuman != null && Object.hasOwnProperty.call(message, "nonhuman")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.nonhuman); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.type); + if (message.trailId != null && Object.hasOwnProperty.call(message, "trailId")) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.trailId); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.path); + return writer; + }; + + /** + * Encodes the specified GhostCar message, length delimited. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.IGhostCar} message GhostCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCar} GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.area = reader.uint32(); + break; + } + case 3: { + message.ramp = reader.uint32(); + break; + } + case 8: { + message.path = reader.uint32(); + break; + } + case 4: { + message.nonhuman = reader.bool(); + break; + } + case 6: { + message.type = reader.int32(); + break; + } + case 7: { + message.trailId = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCar} GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCar message. + * @function verify + * @memberof wm.protobuf.GhostCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.area != null && message.hasOwnProperty("area")) + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (message.ramp != null && message.hasOwnProperty("ramp")) + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.nonhuman != null && message.hasOwnProperty("nonhuman")) + if (typeof message.nonhuman !== "boolean") + return "nonhuman: boolean expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.trailId != null && message.hasOwnProperty("trailId")) + if (!$util.isInteger(message.trailId) && !(message.trailId && $util.isInteger(message.trailId.low) && $util.isInteger(message.trailId.high))) + return "trailId: integer|Long expected"; + return null; + }; + + /** + * Creates a GhostCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCar} GhostCar + */ + GhostCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCar) + return object; + let message = new $root.wm.protobuf.GhostCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.GhostCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.area != null) + message.area = object.area >>> 0; + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.nonhuman != null) + message.nonhuman = Boolean(object.nonhuman); + switch (object.type) { + case "GHOST_NORMAL": + case 1: + message.type = 1; + break; + case "GHOST_PINCH_RUNNER": + case 2: + message.type = 2; + break; + case "GHOST_DEFAULT": + case 3: + message.type = 3; + break; + } + if (object.trailId != null) + if ($util.Long) + (message.trailId = $util.Long.fromValue(object.trailId)).unsigned = true; + else if (typeof object.trailId === "string") + message.trailId = parseInt(object.trailId, 10); + else if (typeof object.trailId === "number") + message.trailId = object.trailId; + else if (typeof object.trailId === "object") + message.trailId = new $util.LongBits(object.trailId.low >>> 0, object.trailId.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a GhostCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.GhostCar} message GhostCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.area = 0; + object.ramp = 0; + object.nonhuman = false; + object.type = options.enums === String ? "GHOST_NORMAL" : 1; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.trailId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trailId = options.longs === String ? "0" : 0; + object.path = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.nonhuman != null && message.hasOwnProperty("nonhuman")) + object.nonhuman = message.nonhuman; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.wm.protobuf.GhostType[message.type] : message.type; + if (message.trailId != null && message.hasOwnProperty("trailId")) + if (typeof message.trailId === "number") + object.trailId = options.longs === String ? String(message.trailId) : message.trailId; + else + object.trailId = options.longs === String ? $util.Long.prototype.toString.call(message.trailId) : options.longs === Number ? new $util.LongBits(message.trailId.low >>> 0, message.trailId.high >>> 0).toNumber(true) : message.trailId; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this GhostCar to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCar + * @instance + * @returns {Object.} JSON object + */ + GhostCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCar + * @function getTypeUrl + * @memberof wm.protobuf.GhostCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCar"; + }; + + return GhostCar; + })(); + + protobuf.Place = (function() { + + /** + * Properties of a Place. + * @memberof wm.protobuf + * @interface IPlace + * @property {string} placeId Place placeId + * @property {string} shopName Place shopName + * @property {number} regionId Place regionId + * @property {string} country Place country + */ + + /** + * Constructs a new Place. + * @memberof wm.protobuf + * @classdesc Represents a Place. + * @implements IPlace + * @constructor + * @param {wm.protobuf.IPlace=} [properties] Properties to set + */ + function Place(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Place placeId. + * @member {string} placeId + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.placeId = ""; + + /** + * Place shopName. + * @member {string} shopName + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.shopName = ""; + + /** + * Place regionId. + * @member {number} regionId + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.regionId = 0; + + /** + * Place country. + * @member {string} country + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.country = ""; + + /** + * Creates a new Place instance using the specified properties. + * @function create + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.IPlace=} [properties] Properties to set + * @returns {wm.protobuf.Place} Place instance + */ + Place.create = function create(properties) { + return new Place(properties); + }; + + /** + * Encodes the specified Place message. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.IPlace} message Place message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Place.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.placeId); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shopName); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.regionId); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.country); + return writer; + }; + + /** + * Encodes the specified Place message, length delimited. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.IPlace} message Place message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Place.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Place message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Place + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Place} Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Place.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Place(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.placeId = reader.string(); + break; + } + case 2: { + message.shopName = reader.string(); + break; + } + case 3: { + message.regionId = reader.uint32(); + break; + } + case 4: { + message.country = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("placeId")) + throw $util.ProtocolError("missing required 'placeId'", { instance: message }); + if (!message.hasOwnProperty("shopName")) + throw $util.ProtocolError("missing required 'shopName'", { instance: message }); + if (!message.hasOwnProperty("regionId")) + throw $util.ProtocolError("missing required 'regionId'", { instance: message }); + if (!message.hasOwnProperty("country")) + throw $util.ProtocolError("missing required 'country'", { instance: message }); + return message; + }; + + /** + * Decodes a Place message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Place + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Place} Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Place.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Place message. + * @function verify + * @memberof wm.protobuf.Place + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Place.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.placeId)) + return "placeId: string expected"; + if (!$util.isString(message.shopName)) + return "shopName: string expected"; + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (!$util.isString(message.country)) + return "country: string expected"; + return null; + }; + + /** + * Creates a Place message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Place + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Place} Place + */ + Place.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Place) + return object; + let message = new $root.wm.protobuf.Place(); + if (object.placeId != null) + message.placeId = String(object.placeId); + if (object.shopName != null) + message.shopName = String(object.shopName); + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.country != null) + message.country = String(object.country); + return message; + }; + + /** + * Creates a plain object from a Place message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.Place} message Place + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Place.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.placeId = ""; + object.shopName = ""; + object.regionId = 0; + object.country = ""; + } + if (message.placeId != null && message.hasOwnProperty("placeId")) + object.placeId = message.placeId; + if (message.shopName != null && message.hasOwnProperty("shopName")) + object.shopName = message.shopName; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + return object; + }; + + /** + * Converts this Place to JSON. + * @function toJSON + * @memberof wm.protobuf.Place + * @instance + * @returns {Object.} JSON object + */ + Place.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Place + * @function getTypeUrl + * @memberof wm.protobuf.Place + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Place.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Place"; + }; + + return Place; + })(); + + protobuf.SystemSetting = (function() { + + /** + * Properties of a SystemSetting. + * @memberof wm.protobuf + * @interface ISystemSetting + * @property {number} mCoinChute SystemSetting mCoinChute + * @property {number} mBuyCardCost SystemSetting mBuyCardCost + * @property {number} mGameCost SystemSetting mGameCost + * @property {number} mContinueCost SystemSetting mContinueCost + * @property {number} mFullCourseCost SystemSetting mFullCourseCost + * @property {boolean} mFreePlay SystemSetting mFreePlay + * @property {number|null} [mPcbId] SystemSetting mPcbId + * @property {boolean} mIcCardRw SystemSetting mIcCardRw + * @property {boolean} mIcCardVender SystemSetting mIcCardVender + * @property {boolean|null} [mMgCardRw] SystemSetting mMgCardRw + * @property {boolean|null} [mForceFeedback] SystemSetting mForceFeedback + * @property {boolean} mWinsAndRemains SystemSetting mWinsAndRemains + * @property {number} mEventMode SystemSetting mEventMode + * @property {boolean} mEventModeDist SystemSetting mEventModeDist + * @property {number} mCloseType SystemSetting mCloseType + * @property {number} mCloseSun SystemSetting mCloseSun + * @property {number} mCloseMon SystemSetting mCloseMon + * @property {number} mCloseTue SystemSetting mCloseTue + * @property {number} mCloseWed SystemSetting mCloseWed + * @property {number} mCloseThu SystemSetting mCloseThu + * @property {number} mCloseFri SystemSetting mCloseFri + * @property {number} mCloseSat SystemSetting mCloseSat + * @property {number} mCloseDay SystemSetting mCloseDay + * @property {boolean|null} [mTouchPanel] SystemSetting mTouchPanel + * @property {number} mGameVol SystemSetting mGameVol + * @property {number} mAttractVol SystemSetting mAttractVol + * @property {number|null} [mCalibHandleCenter] SystemSetting mCalibHandleCenter + * @property {number|null} [mCalibAccelCenter] SystemSetting mCalibAccelCenter + * @property {number|null} [mCalibBrakeCenter] SystemSetting mCalibBrakeCenter + * @property {number|null} [mCalibTouchLeft] SystemSetting mCalibTouchLeft + * @property {number|null} [mCalibTouchRight] SystemSetting mCalibTouchRight + * @property {number|null} [mCalibTouchTop] SystemSetting mCalibTouchTop + * @property {number|null} [mCalibTouchBottom] SystemSetting mCalibTouchBottom + */ + + /** + * Constructs a new SystemSetting. + * @memberof wm.protobuf + * @classdesc Represents a SystemSetting. + * @implements ISystemSetting + * @constructor + * @param {wm.protobuf.ISystemSetting=} [properties] Properties to set + */ + function SystemSetting(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SystemSetting mCoinChute. + * @member {number} mCoinChute + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCoinChute = 0; + + /** + * SystemSetting mBuyCardCost. + * @member {number} mBuyCardCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mBuyCardCost = 0; + + /** + * SystemSetting mGameCost. + * @member {number} mGameCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mGameCost = 0; + + /** + * SystemSetting mContinueCost. + * @member {number} mContinueCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mContinueCost = 0; + + /** + * SystemSetting mFullCourseCost. + * @member {number} mFullCourseCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mFullCourseCost = 0; + + /** + * SystemSetting mFreePlay. + * @member {boolean} mFreePlay + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mFreePlay = false; + + /** + * SystemSetting mPcbId. + * @member {number} mPcbId + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mPcbId = 0; + + /** + * SystemSetting mIcCardRw. + * @member {boolean} mIcCardRw + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mIcCardRw = false; + + /** + * SystemSetting mIcCardVender. + * @member {boolean} mIcCardVender + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mIcCardVender = false; + + /** + * SystemSetting mMgCardRw. + * @member {boolean} mMgCardRw + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mMgCardRw = false; + + /** + * SystemSetting mForceFeedback. + * @member {boolean} mForceFeedback + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mForceFeedback = false; + + /** + * SystemSetting mWinsAndRemains. + * @member {boolean} mWinsAndRemains + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mWinsAndRemains = false; + + /** + * SystemSetting mEventMode. + * @member {number} mEventMode + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mEventMode = 0; + + /** + * SystemSetting mEventModeDist. + * @member {boolean} mEventModeDist + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mEventModeDist = false; + + /** + * SystemSetting mCloseType. + * @member {number} mCloseType + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseType = 0; + + /** + * SystemSetting mCloseSun. + * @member {number} mCloseSun + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseSun = 0; + + /** + * SystemSetting mCloseMon. + * @member {number} mCloseMon + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseMon = 0; + + /** + * SystemSetting mCloseTue. + * @member {number} mCloseTue + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseTue = 0; + + /** + * SystemSetting mCloseWed. + * @member {number} mCloseWed + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseWed = 0; + + /** + * SystemSetting mCloseThu. + * @member {number} mCloseThu + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseThu = 0; + + /** + * SystemSetting mCloseFri. + * @member {number} mCloseFri + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseFri = 0; + + /** + * SystemSetting mCloseSat. + * @member {number} mCloseSat + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseSat = 0; + + /** + * SystemSetting mCloseDay. + * @member {number} mCloseDay + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseDay = 0; + + /** + * SystemSetting mTouchPanel. + * @member {boolean} mTouchPanel + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mTouchPanel = false; + + /** + * SystemSetting mGameVol. + * @member {number} mGameVol + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mGameVol = 0; + + /** + * SystemSetting mAttractVol. + * @member {number} mAttractVol + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mAttractVol = 0; + + /** + * SystemSetting mCalibHandleCenter. + * @member {number} mCalibHandleCenter + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibHandleCenter = 0; + + /** + * SystemSetting mCalibAccelCenter. + * @member {number} mCalibAccelCenter + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibAccelCenter = 0; + + /** + * SystemSetting mCalibBrakeCenter. + * @member {number} mCalibBrakeCenter + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibBrakeCenter = 0; + + /** + * SystemSetting mCalibTouchLeft. + * @member {number} mCalibTouchLeft + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchLeft = 0; + + /** + * SystemSetting mCalibTouchRight. + * @member {number} mCalibTouchRight + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchRight = 0; + + /** + * SystemSetting mCalibTouchTop. + * @member {number} mCalibTouchTop + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchTop = 0; + + /** + * SystemSetting mCalibTouchBottom. + * @member {number} mCalibTouchBottom + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchBottom = 0; + + /** + * Creates a new SystemSetting instance using the specified properties. + * @function create + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.ISystemSetting=} [properties] Properties to set + * @returns {wm.protobuf.SystemSetting} SystemSetting instance + */ + SystemSetting.create = function create(properties) { + return new SystemSetting(properties); + }; + + /** + * Encodes the specified SystemSetting message. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.ISystemSetting} message SystemSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.mCoinChute); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.mBuyCardCost); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.mGameCost); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mContinueCost); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.mFullCourseCost); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.mFreePlay); + if (message.mPcbId != null && Object.hasOwnProperty.call(message, "mPcbId")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.mPcbId); + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.mIcCardRw); + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.mIcCardVender); + if (message.mMgCardRw != null && Object.hasOwnProperty.call(message, "mMgCardRw")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.mMgCardRw); + if (message.mForceFeedback != null && Object.hasOwnProperty.call(message, "mForceFeedback")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.mForceFeedback); + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.mWinsAndRemains); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.mEventMode); + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.mEventModeDist); + writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.mCloseType); + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.mCloseSun); + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.mCloseMon); + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.mCloseTue); + writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.mCloseWed); + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.mCloseThu); + writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.mCloseFri); + writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.mCloseSat); + writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.mCloseDay); + if (message.mTouchPanel != null && Object.hasOwnProperty.call(message, "mTouchPanel")) + writer.uint32(/* id 24, wireType 0 =*/192).bool(message.mTouchPanel); + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.mGameVol); + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.mAttractVol); + if (message.mCalibHandleCenter != null && Object.hasOwnProperty.call(message, "mCalibHandleCenter")) + writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.mCalibHandleCenter); + if (message.mCalibAccelCenter != null && Object.hasOwnProperty.call(message, "mCalibAccelCenter")) + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.mCalibAccelCenter); + if (message.mCalibBrakeCenter != null && Object.hasOwnProperty.call(message, "mCalibBrakeCenter")) + writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.mCalibBrakeCenter); + if (message.mCalibTouchLeft != null && Object.hasOwnProperty.call(message, "mCalibTouchLeft")) + writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.mCalibTouchLeft); + if (message.mCalibTouchRight != null && Object.hasOwnProperty.call(message, "mCalibTouchRight")) + writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.mCalibTouchRight); + if (message.mCalibTouchTop != null && Object.hasOwnProperty.call(message, "mCalibTouchTop")) + writer.uint32(/* id 32, wireType 0 =*/256).uint32(message.mCalibTouchTop); + if (message.mCalibTouchBottom != null && Object.hasOwnProperty.call(message, "mCalibTouchBottom")) + writer.uint32(/* id 33, wireType 0 =*/264).uint32(message.mCalibTouchBottom); + return writer; + }; + + /** + * Encodes the specified SystemSetting message, length delimited. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.ISystemSetting} message SystemSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SystemSetting message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SystemSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SystemSetting} SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SystemSetting(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mCoinChute = reader.uint32(); + break; + } + case 2: { + message.mBuyCardCost = reader.uint32(); + break; + } + case 3: { + message.mGameCost = reader.uint32(); + break; + } + case 4: { + message.mContinueCost = reader.uint32(); + break; + } + case 5: { + message.mFullCourseCost = reader.uint32(); + break; + } + case 6: { + message.mFreePlay = reader.bool(); + break; + } + case 7: { + message.mPcbId = reader.uint32(); + break; + } + case 8: { + message.mIcCardRw = reader.bool(); + break; + } + case 9: { + message.mIcCardVender = reader.bool(); + break; + } + case 10: { + message.mMgCardRw = reader.bool(); + break; + } + case 11: { + message.mForceFeedback = reader.bool(); + break; + } + case 12: { + message.mWinsAndRemains = reader.bool(); + break; + } + case 13: { + message.mEventMode = reader.uint32(); + break; + } + case 14: { + message.mEventModeDist = reader.bool(); + break; + } + case 15: { + message.mCloseType = reader.uint32(); + break; + } + case 16: { + message.mCloseSun = reader.uint32(); + break; + } + case 17: { + message.mCloseMon = reader.uint32(); + break; + } + case 18: { + message.mCloseTue = reader.uint32(); + break; + } + case 19: { + message.mCloseWed = reader.uint32(); + break; + } + case 20: { + message.mCloseThu = reader.uint32(); + break; + } + case 21: { + message.mCloseFri = reader.uint32(); + break; + } + case 22: { + message.mCloseSat = reader.uint32(); + break; + } + case 23: { + message.mCloseDay = reader.uint32(); + break; + } + case 24: { + message.mTouchPanel = reader.bool(); + break; + } + case 25: { + message.mGameVol = reader.uint32(); + break; + } + case 26: { + message.mAttractVol = reader.uint32(); + break; + } + case 27: { + message.mCalibHandleCenter = reader.uint32(); + break; + } + case 28: { + message.mCalibAccelCenter = reader.uint32(); + break; + } + case 29: { + message.mCalibBrakeCenter = reader.uint32(); + break; + } + case 30: { + message.mCalibTouchLeft = reader.uint32(); + break; + } + case 31: { + message.mCalibTouchRight = reader.uint32(); + break; + } + case 32: { + message.mCalibTouchTop = reader.uint32(); + break; + } + case 33: { + message.mCalibTouchBottom = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("mCoinChute")) + throw $util.ProtocolError("missing required 'mCoinChute'", { instance: message }); + if (!message.hasOwnProperty("mBuyCardCost")) + throw $util.ProtocolError("missing required 'mBuyCardCost'", { instance: message }); + if (!message.hasOwnProperty("mGameCost")) + throw $util.ProtocolError("missing required 'mGameCost'", { instance: message }); + if (!message.hasOwnProperty("mContinueCost")) + throw $util.ProtocolError("missing required 'mContinueCost'", { instance: message }); + if (!message.hasOwnProperty("mFullCourseCost")) + throw $util.ProtocolError("missing required 'mFullCourseCost'", { instance: message }); + if (!message.hasOwnProperty("mFreePlay")) + throw $util.ProtocolError("missing required 'mFreePlay'", { instance: message }); + if (!message.hasOwnProperty("mIcCardRw")) + throw $util.ProtocolError("missing required 'mIcCardRw'", { instance: message }); + if (!message.hasOwnProperty("mIcCardVender")) + throw $util.ProtocolError("missing required 'mIcCardVender'", { instance: message }); + if (!message.hasOwnProperty("mWinsAndRemains")) + throw $util.ProtocolError("missing required 'mWinsAndRemains'", { instance: message }); + if (!message.hasOwnProperty("mEventMode")) + throw $util.ProtocolError("missing required 'mEventMode'", { instance: message }); + if (!message.hasOwnProperty("mEventModeDist")) + throw $util.ProtocolError("missing required 'mEventModeDist'", { instance: message }); + if (!message.hasOwnProperty("mCloseType")) + throw $util.ProtocolError("missing required 'mCloseType'", { instance: message }); + if (!message.hasOwnProperty("mCloseSun")) + throw $util.ProtocolError("missing required 'mCloseSun'", { instance: message }); + if (!message.hasOwnProperty("mCloseMon")) + throw $util.ProtocolError("missing required 'mCloseMon'", { instance: message }); + if (!message.hasOwnProperty("mCloseTue")) + throw $util.ProtocolError("missing required 'mCloseTue'", { instance: message }); + if (!message.hasOwnProperty("mCloseWed")) + throw $util.ProtocolError("missing required 'mCloseWed'", { instance: message }); + if (!message.hasOwnProperty("mCloseThu")) + throw $util.ProtocolError("missing required 'mCloseThu'", { instance: message }); + if (!message.hasOwnProperty("mCloseFri")) + throw $util.ProtocolError("missing required 'mCloseFri'", { instance: message }); + if (!message.hasOwnProperty("mCloseSat")) + throw $util.ProtocolError("missing required 'mCloseSat'", { instance: message }); + if (!message.hasOwnProperty("mCloseDay")) + throw $util.ProtocolError("missing required 'mCloseDay'", { instance: message }); + if (!message.hasOwnProperty("mGameVol")) + throw $util.ProtocolError("missing required 'mGameVol'", { instance: message }); + if (!message.hasOwnProperty("mAttractVol")) + throw $util.ProtocolError("missing required 'mAttractVol'", { instance: message }); + return message; + }; + + /** + * Decodes a SystemSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SystemSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SystemSetting} SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SystemSetting message. + * @function verify + * @memberof wm.protobuf.SystemSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SystemSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.mCoinChute)) + return "mCoinChute: integer expected"; + if (!$util.isInteger(message.mBuyCardCost)) + return "mBuyCardCost: integer expected"; + if (!$util.isInteger(message.mGameCost)) + return "mGameCost: integer expected"; + if (!$util.isInteger(message.mContinueCost)) + return "mContinueCost: integer expected"; + if (!$util.isInteger(message.mFullCourseCost)) + return "mFullCourseCost: integer expected"; + if (typeof message.mFreePlay !== "boolean") + return "mFreePlay: boolean expected"; + if (message.mPcbId != null && message.hasOwnProperty("mPcbId")) + if (!$util.isInteger(message.mPcbId)) + return "mPcbId: integer expected"; + if (typeof message.mIcCardRw !== "boolean") + return "mIcCardRw: boolean expected"; + if (typeof message.mIcCardVender !== "boolean") + return "mIcCardVender: boolean expected"; + if (message.mMgCardRw != null && message.hasOwnProperty("mMgCardRw")) + if (typeof message.mMgCardRw !== "boolean") + return "mMgCardRw: boolean expected"; + if (message.mForceFeedback != null && message.hasOwnProperty("mForceFeedback")) + if (typeof message.mForceFeedback !== "boolean") + return "mForceFeedback: boolean expected"; + if (typeof message.mWinsAndRemains !== "boolean") + return "mWinsAndRemains: boolean expected"; + if (!$util.isInteger(message.mEventMode)) + return "mEventMode: integer expected"; + if (typeof message.mEventModeDist !== "boolean") + return "mEventModeDist: boolean expected"; + if (!$util.isInteger(message.mCloseType)) + return "mCloseType: integer expected"; + if (!$util.isInteger(message.mCloseSun)) + return "mCloseSun: integer expected"; + if (!$util.isInteger(message.mCloseMon)) + return "mCloseMon: integer expected"; + if (!$util.isInteger(message.mCloseTue)) + return "mCloseTue: integer expected"; + if (!$util.isInteger(message.mCloseWed)) + return "mCloseWed: integer expected"; + if (!$util.isInteger(message.mCloseThu)) + return "mCloseThu: integer expected"; + if (!$util.isInteger(message.mCloseFri)) + return "mCloseFri: integer expected"; + if (!$util.isInteger(message.mCloseSat)) + return "mCloseSat: integer expected"; + if (!$util.isInteger(message.mCloseDay)) + return "mCloseDay: integer expected"; + if (message.mTouchPanel != null && message.hasOwnProperty("mTouchPanel")) + if (typeof message.mTouchPanel !== "boolean") + return "mTouchPanel: boolean expected"; + if (!$util.isInteger(message.mGameVol)) + return "mGameVol: integer expected"; + if (!$util.isInteger(message.mAttractVol)) + return "mAttractVol: integer expected"; + if (message.mCalibHandleCenter != null && message.hasOwnProperty("mCalibHandleCenter")) + if (!$util.isInteger(message.mCalibHandleCenter)) + return "mCalibHandleCenter: integer expected"; + if (message.mCalibAccelCenter != null && message.hasOwnProperty("mCalibAccelCenter")) + if (!$util.isInteger(message.mCalibAccelCenter)) + return "mCalibAccelCenter: integer expected"; + if (message.mCalibBrakeCenter != null && message.hasOwnProperty("mCalibBrakeCenter")) + if (!$util.isInteger(message.mCalibBrakeCenter)) + return "mCalibBrakeCenter: integer expected"; + if (message.mCalibTouchLeft != null && message.hasOwnProperty("mCalibTouchLeft")) + if (!$util.isInteger(message.mCalibTouchLeft)) + return "mCalibTouchLeft: integer expected"; + if (message.mCalibTouchRight != null && message.hasOwnProperty("mCalibTouchRight")) + if (!$util.isInteger(message.mCalibTouchRight)) + return "mCalibTouchRight: integer expected"; + if (message.mCalibTouchTop != null && message.hasOwnProperty("mCalibTouchTop")) + if (!$util.isInteger(message.mCalibTouchTop)) + return "mCalibTouchTop: integer expected"; + if (message.mCalibTouchBottom != null && message.hasOwnProperty("mCalibTouchBottom")) + if (!$util.isInteger(message.mCalibTouchBottom)) + return "mCalibTouchBottom: integer expected"; + return null; + }; + + /** + * Creates a SystemSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SystemSetting + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SystemSetting} SystemSetting + */ + SystemSetting.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SystemSetting) + return object; + let message = new $root.wm.protobuf.SystemSetting(); + if (object.mCoinChute != null) + message.mCoinChute = object.mCoinChute >>> 0; + if (object.mBuyCardCost != null) + message.mBuyCardCost = object.mBuyCardCost >>> 0; + if (object.mGameCost != null) + message.mGameCost = object.mGameCost >>> 0; + if (object.mContinueCost != null) + message.mContinueCost = object.mContinueCost >>> 0; + if (object.mFullCourseCost != null) + message.mFullCourseCost = object.mFullCourseCost >>> 0; + if (object.mFreePlay != null) + message.mFreePlay = Boolean(object.mFreePlay); + if (object.mPcbId != null) + message.mPcbId = object.mPcbId >>> 0; + if (object.mIcCardRw != null) + message.mIcCardRw = Boolean(object.mIcCardRw); + if (object.mIcCardVender != null) + message.mIcCardVender = Boolean(object.mIcCardVender); + if (object.mMgCardRw != null) + message.mMgCardRw = Boolean(object.mMgCardRw); + if (object.mForceFeedback != null) + message.mForceFeedback = Boolean(object.mForceFeedback); + if (object.mWinsAndRemains != null) + message.mWinsAndRemains = Boolean(object.mWinsAndRemains); + if (object.mEventMode != null) + message.mEventMode = object.mEventMode >>> 0; + if (object.mEventModeDist != null) + message.mEventModeDist = Boolean(object.mEventModeDist); + if (object.mCloseType != null) + message.mCloseType = object.mCloseType >>> 0; + if (object.mCloseSun != null) + message.mCloseSun = object.mCloseSun >>> 0; + if (object.mCloseMon != null) + message.mCloseMon = object.mCloseMon >>> 0; + if (object.mCloseTue != null) + message.mCloseTue = object.mCloseTue >>> 0; + if (object.mCloseWed != null) + message.mCloseWed = object.mCloseWed >>> 0; + if (object.mCloseThu != null) + message.mCloseThu = object.mCloseThu >>> 0; + if (object.mCloseFri != null) + message.mCloseFri = object.mCloseFri >>> 0; + if (object.mCloseSat != null) + message.mCloseSat = object.mCloseSat >>> 0; + if (object.mCloseDay != null) + message.mCloseDay = object.mCloseDay >>> 0; + if (object.mTouchPanel != null) + message.mTouchPanel = Boolean(object.mTouchPanel); + if (object.mGameVol != null) + message.mGameVol = object.mGameVol >>> 0; + if (object.mAttractVol != null) + message.mAttractVol = object.mAttractVol >>> 0; + if (object.mCalibHandleCenter != null) + message.mCalibHandleCenter = object.mCalibHandleCenter >>> 0; + if (object.mCalibAccelCenter != null) + message.mCalibAccelCenter = object.mCalibAccelCenter >>> 0; + if (object.mCalibBrakeCenter != null) + message.mCalibBrakeCenter = object.mCalibBrakeCenter >>> 0; + if (object.mCalibTouchLeft != null) + message.mCalibTouchLeft = object.mCalibTouchLeft >>> 0; + if (object.mCalibTouchRight != null) + message.mCalibTouchRight = object.mCalibTouchRight >>> 0; + if (object.mCalibTouchTop != null) + message.mCalibTouchTop = object.mCalibTouchTop >>> 0; + if (object.mCalibTouchBottom != null) + message.mCalibTouchBottom = object.mCalibTouchBottom >>> 0; + return message; + }; + + /** + * Creates a plain object from a SystemSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.SystemSetting} message SystemSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SystemSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.mCoinChute = 0; + object.mBuyCardCost = 0; + object.mGameCost = 0; + object.mContinueCost = 0; + object.mFullCourseCost = 0; + object.mFreePlay = false; + object.mPcbId = 0; + object.mIcCardRw = false; + object.mIcCardVender = false; + object.mMgCardRw = false; + object.mForceFeedback = false; + object.mWinsAndRemains = false; + object.mEventMode = 0; + object.mEventModeDist = false; + object.mCloseType = 0; + object.mCloseSun = 0; + object.mCloseMon = 0; + object.mCloseTue = 0; + object.mCloseWed = 0; + object.mCloseThu = 0; + object.mCloseFri = 0; + object.mCloseSat = 0; + object.mCloseDay = 0; + object.mTouchPanel = false; + object.mGameVol = 0; + object.mAttractVol = 0; + object.mCalibHandleCenter = 0; + object.mCalibAccelCenter = 0; + object.mCalibBrakeCenter = 0; + object.mCalibTouchLeft = 0; + object.mCalibTouchRight = 0; + object.mCalibTouchTop = 0; + object.mCalibTouchBottom = 0; + } + if (message.mCoinChute != null && message.hasOwnProperty("mCoinChute")) + object.mCoinChute = message.mCoinChute; + if (message.mBuyCardCost != null && message.hasOwnProperty("mBuyCardCost")) + object.mBuyCardCost = message.mBuyCardCost; + if (message.mGameCost != null && message.hasOwnProperty("mGameCost")) + object.mGameCost = message.mGameCost; + if (message.mContinueCost != null && message.hasOwnProperty("mContinueCost")) + object.mContinueCost = message.mContinueCost; + if (message.mFullCourseCost != null && message.hasOwnProperty("mFullCourseCost")) + object.mFullCourseCost = message.mFullCourseCost; + if (message.mFreePlay != null && message.hasOwnProperty("mFreePlay")) + object.mFreePlay = message.mFreePlay; + if (message.mPcbId != null && message.hasOwnProperty("mPcbId")) + object.mPcbId = message.mPcbId; + if (message.mIcCardRw != null && message.hasOwnProperty("mIcCardRw")) + object.mIcCardRw = message.mIcCardRw; + if (message.mIcCardVender != null && message.hasOwnProperty("mIcCardVender")) + object.mIcCardVender = message.mIcCardVender; + if (message.mMgCardRw != null && message.hasOwnProperty("mMgCardRw")) + object.mMgCardRw = message.mMgCardRw; + if (message.mForceFeedback != null && message.hasOwnProperty("mForceFeedback")) + object.mForceFeedback = message.mForceFeedback; + if (message.mWinsAndRemains != null && message.hasOwnProperty("mWinsAndRemains")) + object.mWinsAndRemains = message.mWinsAndRemains; + if (message.mEventMode != null && message.hasOwnProperty("mEventMode")) + object.mEventMode = message.mEventMode; + if (message.mEventModeDist != null && message.hasOwnProperty("mEventModeDist")) + object.mEventModeDist = message.mEventModeDist; + if (message.mCloseType != null && message.hasOwnProperty("mCloseType")) + object.mCloseType = message.mCloseType; + if (message.mCloseSun != null && message.hasOwnProperty("mCloseSun")) + object.mCloseSun = message.mCloseSun; + if (message.mCloseMon != null && message.hasOwnProperty("mCloseMon")) + object.mCloseMon = message.mCloseMon; + if (message.mCloseTue != null && message.hasOwnProperty("mCloseTue")) + object.mCloseTue = message.mCloseTue; + if (message.mCloseWed != null && message.hasOwnProperty("mCloseWed")) + object.mCloseWed = message.mCloseWed; + if (message.mCloseThu != null && message.hasOwnProperty("mCloseThu")) + object.mCloseThu = message.mCloseThu; + if (message.mCloseFri != null && message.hasOwnProperty("mCloseFri")) + object.mCloseFri = message.mCloseFri; + if (message.mCloseSat != null && message.hasOwnProperty("mCloseSat")) + object.mCloseSat = message.mCloseSat; + if (message.mCloseDay != null && message.hasOwnProperty("mCloseDay")) + object.mCloseDay = message.mCloseDay; + if (message.mTouchPanel != null && message.hasOwnProperty("mTouchPanel")) + object.mTouchPanel = message.mTouchPanel; + if (message.mGameVol != null && message.hasOwnProperty("mGameVol")) + object.mGameVol = message.mGameVol; + if (message.mAttractVol != null && message.hasOwnProperty("mAttractVol")) + object.mAttractVol = message.mAttractVol; + if (message.mCalibHandleCenter != null && message.hasOwnProperty("mCalibHandleCenter")) + object.mCalibHandleCenter = message.mCalibHandleCenter; + if (message.mCalibAccelCenter != null && message.hasOwnProperty("mCalibAccelCenter")) + object.mCalibAccelCenter = message.mCalibAccelCenter; + if (message.mCalibBrakeCenter != null && message.hasOwnProperty("mCalibBrakeCenter")) + object.mCalibBrakeCenter = message.mCalibBrakeCenter; + if (message.mCalibTouchLeft != null && message.hasOwnProperty("mCalibTouchLeft")) + object.mCalibTouchLeft = message.mCalibTouchLeft; + if (message.mCalibTouchRight != null && message.hasOwnProperty("mCalibTouchRight")) + object.mCalibTouchRight = message.mCalibTouchRight; + if (message.mCalibTouchTop != null && message.hasOwnProperty("mCalibTouchTop")) + object.mCalibTouchTop = message.mCalibTouchTop; + if (message.mCalibTouchBottom != null && message.hasOwnProperty("mCalibTouchBottom")) + object.mCalibTouchBottom = message.mCalibTouchBottom; + return object; + }; + + /** + * Converts this SystemSetting to JSON. + * @function toJSON + * @memberof wm.protobuf.SystemSetting + * @instance + * @returns {Object.} JSON object + */ + SystemSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SystemSetting + * @function getTypeUrl + * @memberof wm.protobuf.SystemSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SystemSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SystemSetting"; + }; + + return SystemSetting; + })(); + + protobuf.GhostCompetitionSchedule = (function() { + + /** + * Properties of a GhostCompetitionSchedule. + * @memberof wm.protobuf + * @interface IGhostCompetitionSchedule + * @property {number} competitionId GhostCompetitionSchedule competitionId + * @property {number} qualifyingPeriodStartAt GhostCompetitionSchedule qualifyingPeriodStartAt + * @property {number} qualifyingPeriodCloseAt GhostCompetitionSchedule qualifyingPeriodCloseAt + * @property {number} competitionStartAt GhostCompetitionSchedule competitionStartAt + * @property {number} competitionCloseAt GhostCompetitionSchedule competitionCloseAt + * @property {number} competitionEndAt GhostCompetitionSchedule competitionEndAt + * @property {number} lengthOfPeriod GhostCompetitionSchedule lengthOfPeriod + * @property {number} lengthOfInterval GhostCompetitionSchedule lengthOfInterval + * @property {number} area GhostCompetitionSchedule area + * @property {number} minigamePatternId GhostCompetitionSchedule minigamePatternId + */ + + /** + * Constructs a new GhostCompetitionSchedule. + * @memberof wm.protobuf + * @classdesc Represents a GhostCompetitionSchedule. + * @implements IGhostCompetitionSchedule + * @constructor + * @param {wm.protobuf.IGhostCompetitionSchedule=} [properties] Properties to set + */ + function GhostCompetitionSchedule(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionSchedule competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionId = 0; + + /** + * GhostCompetitionSchedule qualifyingPeriodStartAt. + * @member {number} qualifyingPeriodStartAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.qualifyingPeriodStartAt = 0; + + /** + * GhostCompetitionSchedule qualifyingPeriodCloseAt. + * @member {number} qualifyingPeriodCloseAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.qualifyingPeriodCloseAt = 0; + + /** + * GhostCompetitionSchedule competitionStartAt. + * @member {number} competitionStartAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionStartAt = 0; + + /** + * GhostCompetitionSchedule competitionCloseAt. + * @member {number} competitionCloseAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionCloseAt = 0; + + /** + * GhostCompetitionSchedule competitionEndAt. + * @member {number} competitionEndAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionEndAt = 0; + + /** + * GhostCompetitionSchedule lengthOfPeriod. + * @member {number} lengthOfPeriod + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.lengthOfPeriod = 0; + + /** + * GhostCompetitionSchedule lengthOfInterval. + * @member {number} lengthOfInterval + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.lengthOfInterval = 0; + + /** + * GhostCompetitionSchedule area. + * @member {number} area + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.area = 0; + + /** + * GhostCompetitionSchedule minigamePatternId. + * @member {number} minigamePatternId + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.minigamePatternId = 0; + + /** + * Creates a new GhostCompetitionSchedule instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.IGhostCompetitionSchedule=} [properties] Properties to set + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule instance + */ + GhostCompetitionSchedule.create = function create(properties) { + return new GhostCompetitionSchedule(properties); + }; + + /** + * Encodes the specified GhostCompetitionSchedule message. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.IGhostCompetitionSchedule} message GhostCompetitionSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.competitionId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.qualifyingPeriodStartAt); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.qualifyingPeriodCloseAt); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.competitionStartAt); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.competitionCloseAt); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.competitionEndAt); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.lengthOfPeriod); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.lengthOfInterval); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.area); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.minigamePatternId); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionSchedule message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.IGhostCompetitionSchedule} message GhostCompetitionSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionSchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCompetitionSchedule(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.competitionId = reader.uint32(); + break; + } + case 2: { + message.qualifyingPeriodStartAt = reader.uint32(); + break; + } + case 3: { + message.qualifyingPeriodCloseAt = reader.uint32(); + break; + } + case 4: { + message.competitionStartAt = reader.uint32(); + break; + } + case 5: { + message.competitionCloseAt = reader.uint32(); + break; + } + case 6: { + message.competitionEndAt = reader.uint32(); + break; + } + case 7: { + message.lengthOfPeriod = reader.uint32(); + break; + } + case 8: { + message.lengthOfInterval = reader.uint32(); + break; + } + case 9: { + message.area = reader.uint32(); + break; + } + case 10: { + message.minigamePatternId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + if (!message.hasOwnProperty("qualifyingPeriodStartAt")) + throw $util.ProtocolError("missing required 'qualifyingPeriodStartAt'", { instance: message }); + if (!message.hasOwnProperty("qualifyingPeriodCloseAt")) + throw $util.ProtocolError("missing required 'qualifyingPeriodCloseAt'", { instance: message }); + if (!message.hasOwnProperty("competitionStartAt")) + throw $util.ProtocolError("missing required 'competitionStartAt'", { instance: message }); + if (!message.hasOwnProperty("competitionCloseAt")) + throw $util.ProtocolError("missing required 'competitionCloseAt'", { instance: message }); + if (!message.hasOwnProperty("competitionEndAt")) + throw $util.ProtocolError("missing required 'competitionEndAt'", { instance: message }); + if (!message.hasOwnProperty("lengthOfPeriod")) + throw $util.ProtocolError("missing required 'lengthOfPeriod'", { instance: message }); + if (!message.hasOwnProperty("lengthOfInterval")) + throw $util.ProtocolError("missing required 'lengthOfInterval'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("minigamePatternId")) + throw $util.ProtocolError("missing required 'minigamePatternId'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionSchedule message. + * @function verify + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + if (!$util.isInteger(message.qualifyingPeriodStartAt)) + return "qualifyingPeriodStartAt: integer expected"; + if (!$util.isInteger(message.qualifyingPeriodCloseAt)) + return "qualifyingPeriodCloseAt: integer expected"; + if (!$util.isInteger(message.competitionStartAt)) + return "competitionStartAt: integer expected"; + if (!$util.isInteger(message.competitionCloseAt)) + return "competitionCloseAt: integer expected"; + if (!$util.isInteger(message.competitionEndAt)) + return "competitionEndAt: integer expected"; + if (!$util.isInteger(message.lengthOfPeriod)) + return "lengthOfPeriod: integer expected"; + if (!$util.isInteger(message.lengthOfInterval)) + return "lengthOfInterval: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.minigamePatternId)) + return "minigamePatternId: integer expected"; + return null; + }; + + /** + * Creates a GhostCompetitionSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule + */ + GhostCompetitionSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCompetitionSchedule) + return object; + let message = new $root.wm.protobuf.GhostCompetitionSchedule(); + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + if (object.qualifyingPeriodStartAt != null) + message.qualifyingPeriodStartAt = object.qualifyingPeriodStartAt >>> 0; + if (object.qualifyingPeriodCloseAt != null) + message.qualifyingPeriodCloseAt = object.qualifyingPeriodCloseAt >>> 0; + if (object.competitionStartAt != null) + message.competitionStartAt = object.competitionStartAt >>> 0; + if (object.competitionCloseAt != null) + message.competitionCloseAt = object.competitionCloseAt >>> 0; + if (object.competitionEndAt != null) + message.competitionEndAt = object.competitionEndAt >>> 0; + if (object.lengthOfPeriod != null) + message.lengthOfPeriod = object.lengthOfPeriod >>> 0; + if (object.lengthOfInterval != null) + message.lengthOfInterval = object.lengthOfInterval >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.minigamePatternId != null) + message.minigamePatternId = object.minigamePatternId >>> 0; + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.GhostCompetitionSchedule} message GhostCompetitionSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.competitionId = 0; + object.qualifyingPeriodStartAt = 0; + object.qualifyingPeriodCloseAt = 0; + object.competitionStartAt = 0; + object.competitionCloseAt = 0; + object.competitionEndAt = 0; + object.lengthOfPeriod = 0; + object.lengthOfInterval = 0; + object.area = 0; + object.minigamePatternId = 0; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + if (message.qualifyingPeriodStartAt != null && message.hasOwnProperty("qualifyingPeriodStartAt")) + object.qualifyingPeriodStartAt = message.qualifyingPeriodStartAt; + if (message.qualifyingPeriodCloseAt != null && message.hasOwnProperty("qualifyingPeriodCloseAt")) + object.qualifyingPeriodCloseAt = message.qualifyingPeriodCloseAt; + if (message.competitionStartAt != null && message.hasOwnProperty("competitionStartAt")) + object.competitionStartAt = message.competitionStartAt; + if (message.competitionCloseAt != null && message.hasOwnProperty("competitionCloseAt")) + object.competitionCloseAt = message.competitionCloseAt; + if (message.competitionEndAt != null && message.hasOwnProperty("competitionEndAt")) + object.competitionEndAt = message.competitionEndAt; + if (message.lengthOfPeriod != null && message.hasOwnProperty("lengthOfPeriod")) + object.lengthOfPeriod = message.lengthOfPeriod; + if (message.lengthOfInterval != null && message.hasOwnProperty("lengthOfInterval")) + object.lengthOfInterval = message.lengthOfInterval; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.minigamePatternId != null && message.hasOwnProperty("minigamePatternId")) + object.minigamePatternId = message.minigamePatternId; + return object; + }; + + /** + * Converts this GhostCompetitionSchedule to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionSchedule + * @function getTypeUrl + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCompetitionSchedule"; + }; + + return GhostCompetitionSchedule; + })(); + + protobuf.GhostCompetitionParameter = (function() { + + /** + * Properties of a GhostCompetitionParameter. + * @memberof wm.protobuf + * @interface IGhostCompetitionParameter + * @property {Array.|null} [parameters1] GhostCompetitionParameter parameters1 + * @property {boolean} parameters2 GhostCompetitionParameter parameters2 + */ + + /** + * Constructs a new GhostCompetitionParameter. + * @memberof wm.protobuf + * @classdesc Represents a GhostCompetitionParameter. + * @implements IGhostCompetitionParameter + * @constructor + * @param {wm.protobuf.IGhostCompetitionParameter=} [properties] Properties to set + */ + function GhostCompetitionParameter(properties) { + this.parameters1 = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionParameter parameters1. + * @member {Array.} parameters1 + * @memberof wm.protobuf.GhostCompetitionParameter + * @instance + */ + GhostCompetitionParameter.prototype.parameters1 = $util.emptyArray; + + /** + * GhostCompetitionParameter parameters2. + * @member {boolean} parameters2 + * @memberof wm.protobuf.GhostCompetitionParameter + * @instance + */ + GhostCompetitionParameter.prototype.parameters2 = false; + + /** + * Creates a new GhostCompetitionParameter instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.IGhostCompetitionParameter=} [properties] Properties to set + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter instance + */ + GhostCompetitionParameter.create = function create(properties) { + return new GhostCompetitionParameter(properties); + }; + + /** + * Encodes the specified GhostCompetitionParameter message. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.IGhostCompetitionParameter} message GhostCompetitionParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionParameter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameters1 != null && message.parameters1.length) + for (let i = 0; i < message.parameters1.length; ++i) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.parameters1[i]); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.parameters2); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionParameter message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.IGhostCompetitionParameter} message GhostCompetitionParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionParameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionParameter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCompetitionParameter(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.parameters1 && message.parameters1.length)) + message.parameters1 = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.parameters1.push(reader.float()); + } else + message.parameters1.push(reader.float()); + break; + } + case 2: { + message.parameters2 = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("parameters2")) + throw $util.ProtocolError("missing required 'parameters2'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionParameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionParameter message. + * @function verify + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionParameter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameters1 != null && message.hasOwnProperty("parameters1")) { + if (!Array.isArray(message.parameters1)) + return "parameters1: array expected"; + for (let i = 0; i < message.parameters1.length; ++i) + if (typeof message.parameters1[i] !== "number") + return "parameters1: number[] expected"; + } + if (typeof message.parameters2 !== "boolean") + return "parameters2: boolean expected"; + return null; + }; + + /** + * Creates a GhostCompetitionParameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter + */ + GhostCompetitionParameter.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCompetitionParameter) + return object; + let message = new $root.wm.protobuf.GhostCompetitionParameter(); + if (object.parameters1) { + if (!Array.isArray(object.parameters1)) + throw TypeError(".wm.protobuf.GhostCompetitionParameter.parameters1: array expected"); + message.parameters1 = []; + for (let i = 0; i < object.parameters1.length; ++i) + message.parameters1[i] = Number(object.parameters1[i]); + } + if (object.parameters2 != null) + message.parameters2 = Boolean(object.parameters2); + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionParameter message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.GhostCompetitionParameter} message GhostCompetitionParameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionParameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.parameters1 = []; + if (options.defaults) + object.parameters2 = false; + if (message.parameters1 && message.parameters1.length) { + object.parameters1 = []; + for (let j = 0; j < message.parameters1.length; ++j) + object.parameters1[j] = options.json && !isFinite(message.parameters1[j]) ? String(message.parameters1[j]) : message.parameters1[j]; + } + if (message.parameters2 != null && message.hasOwnProperty("parameters2")) + object.parameters2 = message.parameters2; + return object; + }; + + /** + * Converts this GhostCompetitionParameter to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCompetitionParameter + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionParameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionParameter + * @function getTypeUrl + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCompetitionParameter"; + }; + + return GhostCompetitionParameter; + })(); + + protobuf.TransferNotice = (function() { + + /** + * Properties of a TransferNotice. + * @memberof wm.protobuf + * @interface ITransferNotice + * @property {boolean} needToSeeTransferred TransferNotice needToSeeTransferred + * @property {number|null} [totalMaxiGold] TransferNotice totalMaxiGold + * @property {number|null} [numOfPorscheCars] TransferNotice numOfPorscheCars + * @property {Array.|null} [porscheModels] TransferNotice porscheModels + * @property {boolean|null} [hasR35] TransferNotice hasR35 + */ + + /** + * Constructs a new TransferNotice. + * @memberof wm.protobuf + * @classdesc Represents a TransferNotice. + * @implements ITransferNotice + * @constructor + * @param {wm.protobuf.ITransferNotice=} [properties] Properties to set + */ + function TransferNotice(properties) { + this.porscheModels = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransferNotice needToSeeTransferred. + * @member {boolean} needToSeeTransferred + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.needToSeeTransferred = false; + + /** + * TransferNotice totalMaxiGold. + * @member {number} totalMaxiGold + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.totalMaxiGold = 0; + + /** + * TransferNotice numOfPorscheCars. + * @member {number} numOfPorscheCars + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.numOfPorscheCars = 0; + + /** + * TransferNotice porscheModels. + * @member {Array.} porscheModels + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.porscheModels = $util.emptyArray; + + /** + * TransferNotice hasR35. + * @member {boolean} hasR35 + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.hasR35 = false; + + /** + * Creates a new TransferNotice instance using the specified properties. + * @function create + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.ITransferNotice=} [properties] Properties to set + * @returns {wm.protobuf.TransferNotice} TransferNotice instance + */ + TransferNotice.create = function create(properties) { + return new TransferNotice(properties); + }; + + /** + * Encodes the specified TransferNotice message. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.ITransferNotice} message TransferNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferNotice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.needToSeeTransferred); + if (message.totalMaxiGold != null && Object.hasOwnProperty.call(message, "totalMaxiGold")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.totalMaxiGold); + if (message.numOfPorscheCars != null && Object.hasOwnProperty.call(message, "numOfPorscheCars")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.numOfPorscheCars); + if (message.porscheModels != null && message.porscheModels.length) + for (let i = 0; i < message.porscheModels.length; ++i) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.porscheModels[i]); + if (message.hasR35 != null && Object.hasOwnProperty.call(message, "hasR35")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.hasR35); + return writer; + }; + + /** + * Encodes the specified TransferNotice message, length delimited. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.ITransferNotice} message TransferNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferNotice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransferNotice message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TransferNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TransferNotice} TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferNotice.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TransferNotice(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.needToSeeTransferred = reader.bool(); + break; + } + case 2: { + message.totalMaxiGold = reader.uint32(); + break; + } + case 3: { + message.numOfPorscheCars = reader.uint32(); + break; + } + case 4: { + if (!(message.porscheModels && message.porscheModels.length)) + message.porscheModels = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.porscheModels.push(reader.uint32()); + } else + message.porscheModels.push(reader.uint32()); + break; + } + case 5: { + message.hasR35 = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("needToSeeTransferred")) + throw $util.ProtocolError("missing required 'needToSeeTransferred'", { instance: message }); + return message; + }; + + /** + * Decodes a TransferNotice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TransferNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TransferNotice} TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferNotice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransferNotice message. + * @function verify + * @memberof wm.protobuf.TransferNotice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransferNotice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (typeof message.needToSeeTransferred !== "boolean") + return "needToSeeTransferred: boolean expected"; + if (message.totalMaxiGold != null && message.hasOwnProperty("totalMaxiGold")) + if (!$util.isInteger(message.totalMaxiGold)) + return "totalMaxiGold: integer expected"; + if (message.numOfPorscheCars != null && message.hasOwnProperty("numOfPorscheCars")) + if (!$util.isInteger(message.numOfPorscheCars)) + return "numOfPorscheCars: integer expected"; + if (message.porscheModels != null && message.hasOwnProperty("porscheModels")) { + if (!Array.isArray(message.porscheModels)) + return "porscheModels: array expected"; + for (let i = 0; i < message.porscheModels.length; ++i) + if (!$util.isInteger(message.porscheModels[i])) + return "porscheModels: integer[] expected"; + } + if (message.hasR35 != null && message.hasOwnProperty("hasR35")) + if (typeof message.hasR35 !== "boolean") + return "hasR35: boolean expected"; + return null; + }; + + /** + * Creates a TransferNotice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TransferNotice + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TransferNotice} TransferNotice + */ + TransferNotice.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TransferNotice) + return object; + let message = new $root.wm.protobuf.TransferNotice(); + if (object.needToSeeTransferred != null) + message.needToSeeTransferred = Boolean(object.needToSeeTransferred); + if (object.totalMaxiGold != null) + message.totalMaxiGold = object.totalMaxiGold >>> 0; + if (object.numOfPorscheCars != null) + message.numOfPorscheCars = object.numOfPorscheCars >>> 0; + if (object.porscheModels) { + if (!Array.isArray(object.porscheModels)) + throw TypeError(".wm.protobuf.TransferNotice.porscheModels: array expected"); + message.porscheModels = []; + for (let i = 0; i < object.porscheModels.length; ++i) + message.porscheModels[i] = object.porscheModels[i] >>> 0; + } + if (object.hasR35 != null) + message.hasR35 = Boolean(object.hasR35); + return message; + }; + + /** + * Creates a plain object from a TransferNotice message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.TransferNotice} message TransferNotice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransferNotice.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.porscheModels = []; + if (options.defaults) { + object.needToSeeTransferred = false; + object.totalMaxiGold = 0; + object.numOfPorscheCars = 0; + object.hasR35 = false; + } + if (message.needToSeeTransferred != null && message.hasOwnProperty("needToSeeTransferred")) + object.needToSeeTransferred = message.needToSeeTransferred; + if (message.totalMaxiGold != null && message.hasOwnProperty("totalMaxiGold")) + object.totalMaxiGold = message.totalMaxiGold; + if (message.numOfPorscheCars != null && message.hasOwnProperty("numOfPorscheCars")) + object.numOfPorscheCars = message.numOfPorscheCars; + if (message.porscheModels && message.porscheModels.length) { + object.porscheModels = []; + for (let j = 0; j < message.porscheModels.length; ++j) + object.porscheModels[j] = message.porscheModels[j]; + } + if (message.hasR35 != null && message.hasOwnProperty("hasR35")) + object.hasR35 = message.hasR35; + return object; + }; + + /** + * Converts this TransferNotice to JSON. + * @function toJSON + * @memberof wm.protobuf.TransferNotice + * @instance + * @returns {Object.} JSON object + */ + TransferNotice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransferNotice + * @function getTypeUrl + * @memberof wm.protobuf.TransferNotice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransferNotice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TransferNotice"; + }; + + return TransferNotice; + })(); + + protobuf.GameFeatureVersion = (function() { + + /** + * Properties of a GameFeatureVersion. + * @memberof wm.protobuf + * @interface IGameFeatureVersion + * @property {number} version GameFeatureVersion version + * @property {number} year GameFeatureVersion year + * @property {number} month GameFeatureVersion month + * @property {number} pluses GameFeatureVersion pluses + * @property {number} releaseAt GameFeatureVersion releaseAt + */ + + /** + * Constructs a new GameFeatureVersion. + * @memberof wm.protobuf + * @classdesc Represents a GameFeatureVersion. + * @implements IGameFeatureVersion + * @constructor + * @param {wm.protobuf.IGameFeatureVersion=} [properties] Properties to set + */ + function GameFeatureVersion(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GameFeatureVersion version. + * @member {number} version + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.version = 0; + + /** + * GameFeatureVersion year. + * @member {number} year + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.year = 0; + + /** + * GameFeatureVersion month. + * @member {number} month + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.month = 0; + + /** + * GameFeatureVersion pluses. + * @member {number} pluses + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.pluses = 0; + + /** + * GameFeatureVersion releaseAt. + * @member {number} releaseAt + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.releaseAt = 0; + + /** + * Creates a new GameFeatureVersion instance using the specified properties. + * @function create + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.IGameFeatureVersion=} [properties] Properties to set + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion instance + */ + GameFeatureVersion.create = function create(properties) { + return new GameFeatureVersion(properties); + }; + + /** + * Encodes the specified GameFeatureVersion message. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.IGameFeatureVersion} message GameFeatureVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GameFeatureVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.version); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.year); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.month); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.pluses); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.releaseAt); + return writer; + }; + + /** + * Encodes the specified GameFeatureVersion message, length delimited. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.IGameFeatureVersion} message GameFeatureVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GameFeatureVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GameFeatureVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GameFeatureVersion(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.uint32(); + break; + } + case 2: { + message.year = reader.uint32(); + break; + } + case 3: { + message.month = reader.uint32(); + break; + } + case 4: { + message.pluses = reader.uint32(); + break; + } + case 5: { + message.releaseAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("version")) + throw $util.ProtocolError("missing required 'version'", { instance: message }); + if (!message.hasOwnProperty("year")) + throw $util.ProtocolError("missing required 'year'", { instance: message }); + if (!message.hasOwnProperty("month")) + throw $util.ProtocolError("missing required 'month'", { instance: message }); + if (!message.hasOwnProperty("pluses")) + throw $util.ProtocolError("missing required 'pluses'", { instance: message }); + if (!message.hasOwnProperty("releaseAt")) + throw $util.ProtocolError("missing required 'releaseAt'", { instance: message }); + return message; + }; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GameFeatureVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GameFeatureVersion message. + * @function verify + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GameFeatureVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (!$util.isInteger(message.pluses)) + return "pluses: integer expected"; + if (!$util.isInteger(message.releaseAt)) + return "releaseAt: integer expected"; + return null; + }; + + /** + * Creates a GameFeatureVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion + */ + GameFeatureVersion.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GameFeatureVersion) + return object; + let message = new $root.wm.protobuf.GameFeatureVersion(); + if (object.version != null) + message.version = object.version >>> 0; + if (object.year != null) + message.year = object.year >>> 0; + if (object.month != null) + message.month = object.month >>> 0; + if (object.pluses != null) + message.pluses = object.pluses >>> 0; + if (object.releaseAt != null) + message.releaseAt = object.releaseAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a GameFeatureVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.GameFeatureVersion} message GameFeatureVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GameFeatureVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.version = 0; + object.year = 0; + object.month = 0; + object.pluses = 0; + object.releaseAt = 0; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.pluses != null && message.hasOwnProperty("pluses")) + object.pluses = message.pluses; + if (message.releaseAt != null && message.hasOwnProperty("releaseAt")) + object.releaseAt = message.releaseAt; + return object; + }; + + /** + * Converts this GameFeatureVersion to JSON. + * @function toJSON + * @memberof wm.protobuf.GameFeatureVersion + * @instance + * @returns {Object.} JSON object + */ + GameFeatureVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GameFeatureVersion + * @function getTypeUrl + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GameFeatureVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GameFeatureVersion"; + }; + + return GameFeatureVersion; + })(); + + protobuf.ScratchSheet = (function() { + + /** + * Properties of a ScratchSheet. + * @memberof wm.protobuf + * @interface IScratchSheet + * @property {Array.|null} [squares] ScratchSheet squares + */ + + /** + * Constructs a new ScratchSheet. + * @memberof wm.protobuf + * @classdesc Represents a ScratchSheet. + * @implements IScratchSheet + * @constructor + * @param {wm.protobuf.IScratchSheet=} [properties] Properties to set + */ + function ScratchSheet(properties) { + this.squares = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ScratchSheet squares. + * @member {Array.} squares + * @memberof wm.protobuf.ScratchSheet + * @instance + */ + ScratchSheet.prototype.squares = $util.emptyArray; + + /** + * Creates a new ScratchSheet instance using the specified properties. + * @function create + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.IScratchSheet=} [properties] Properties to set + * @returns {wm.protobuf.ScratchSheet} ScratchSheet instance + */ + ScratchSheet.create = function create(properties) { + return new ScratchSheet(properties); + }; + + /** + * Encodes the specified ScratchSheet message. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.IScratchSheet} message ScratchSheet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSheet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.squares != null && message.squares.length) + for (let i = 0; i < message.squares.length; ++i) + $root.wm.protobuf.ScratchSheet.ScratchSquare.encode(message.squares[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ScratchSheet message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.IScratchSheet} message ScratchSheet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSheet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ScratchSheet} ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSheet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ScratchSheet(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.squares && message.squares.length)) + message.squares = []; + message.squares.push($root.wm.protobuf.ScratchSheet.ScratchSquare.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ScratchSheet} ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSheet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScratchSheet message. + * @function verify + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScratchSheet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.squares != null && message.hasOwnProperty("squares")) { + if (!Array.isArray(message.squares)) + return "squares: array expected"; + for (let i = 0; i < message.squares.length; ++i) { + let error = $root.wm.protobuf.ScratchSheet.ScratchSquare.verify(message.squares[i]); + if (error) + return "squares." + error; + } + } + return null; + }; + + /** + * Creates a ScratchSheet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ScratchSheet} ScratchSheet + */ + ScratchSheet.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ScratchSheet) + return object; + let message = new $root.wm.protobuf.ScratchSheet(); + if (object.squares) { + if (!Array.isArray(object.squares)) + throw TypeError(".wm.protobuf.ScratchSheet.squares: array expected"); + message.squares = []; + for (let i = 0; i < object.squares.length; ++i) { + if (typeof object.squares[i] !== "object") + throw TypeError(".wm.protobuf.ScratchSheet.squares: object expected"); + message.squares[i] = $root.wm.protobuf.ScratchSheet.ScratchSquare.fromObject(object.squares[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ScratchSheet message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.ScratchSheet} message ScratchSheet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScratchSheet.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.squares = []; + if (message.squares && message.squares.length) { + object.squares = []; + for (let j = 0; j < message.squares.length; ++j) + object.squares[j] = $root.wm.protobuf.ScratchSheet.ScratchSquare.toObject(message.squares[j], options); + } + return object; + }; + + /** + * Converts this ScratchSheet to JSON. + * @function toJSON + * @memberof wm.protobuf.ScratchSheet + * @instance + * @returns {Object.} JSON object + */ + ScratchSheet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScratchSheet + * @function getTypeUrl + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScratchSheet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ScratchSheet"; + }; + + ScratchSheet.ScratchSquare = (function() { + + /** + * Properties of a ScratchSquare. + * @memberof wm.protobuf.ScratchSheet + * @interface IScratchSquare + * @property {wm.protobuf.ItemCategory} category ScratchSquare category + * @property {number} itemId ScratchSquare itemId + * @property {boolean} earned ScratchSquare earned + */ + + /** + * Constructs a new ScratchSquare. + * @memberof wm.protobuf.ScratchSheet + * @classdesc Represents a ScratchSquare. + * @implements IScratchSquare + * @constructor + * @param {wm.protobuf.ScratchSheet.IScratchSquare=} [properties] Properties to set + */ + function ScratchSquare(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ScratchSquare category. + * @member {wm.protobuf.ItemCategory} category + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + */ + ScratchSquare.prototype.category = 1; + + /** + * ScratchSquare itemId. + * @member {number} itemId + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + */ + ScratchSquare.prototype.itemId = 0; + + /** + * ScratchSquare earned. + * @member {boolean} earned + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + */ + ScratchSquare.prototype.earned = false; + + /** + * Creates a new ScratchSquare instance using the specified properties. + * @function create + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.IScratchSquare=} [properties] Properties to set + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare instance + */ + ScratchSquare.create = function create(properties) { + return new ScratchSquare(properties); + }; + + /** + * Encodes the specified ScratchSquare message. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.IScratchSquare} message ScratchSquare message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSquare.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.itemId); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.earned); + return writer; + }; + + /** + * Encodes the specified ScratchSquare message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.IScratchSquare} message ScratchSquare message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSquare.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSquare.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ScratchSheet.ScratchSquare(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.itemId = reader.uint32(); + break; + } + case 3: { + message.earned = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("category")) + throw $util.ProtocolError("missing required 'category'", { instance: message }); + if (!message.hasOwnProperty("itemId")) + throw $util.ProtocolError("missing required 'itemId'", { instance: message }); + if (!message.hasOwnProperty("earned")) + throw $util.ProtocolError("missing required 'earned'", { instance: message }); + return message; + }; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSquare.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScratchSquare message. + * @function verify + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScratchSquare.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.category) { + default: + return "category: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + case 10: + case 12: + case 14: + case 15: + case 16: + case 17: + case 19: + case 22: + case 24: + case 25: + case 26: + case 27: + case 28: + case 201: + case 202: + case 203: + case 300: + case 301: + break; + } + if (!$util.isInteger(message.itemId)) + return "itemId: integer expected"; + if (typeof message.earned !== "boolean") + return "earned: boolean expected"; + return null; + }; + + /** + * Creates a ScratchSquare message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare + */ + ScratchSquare.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ScratchSheet.ScratchSquare) + return object; + let message = new $root.wm.protobuf.ScratchSheet.ScratchSquare(); + switch (object.category) { + case "CAT_CUSTOM_COLOR": + case 1: + message.category = 1; + break; + case "CAT_WHEEL": + case 2: + message.category = 2; + break; + case "CAT_AERO": + case 3: + message.category = 3; + break; + case "CAT_BONNET": + case 4: + message.category = 4; + break; + case "CAT_WING": + case 5: + message.category = 5; + break; + case "CAT_MIRROR": + case 6: + message.category = 6; + break; + case "CAT_NEON": + case 8: + message.category = 8; + break; + case "CAT_TRUNK": + case 9: + message.category = 9; + break; + case "CAT_NUMBER_PLATE": + case 10: + message.category = 10; + break; + case "CAT_GT_WING": + case 12: + message.category = 12; + break; + case "CAT_AURA_MOTIF": + case 14: + message.category = 14; + break; + case "CAT_METER": + case 15: + message.category = 15; + break; + case "CAT_BGM": + case 16: + message.category = 16; + break; + case "CAT_NAME_PLATE": + case 17: + message.category = 17; + break; + case "CAT_NUMBER": + case 19: + message.category = 19; + break; + case "CAT_BGM_TRACK": + case 22: + message.category = 22; + break; + case "CAT_WINDOW_STICKER_FONT": + case 24: + message.category = 24; + break; + case "CAT_WINDOW_DECORATION": + case 25: + message.category = 25; + break; + case "CAT_RIVAL_MARKER": + case 26: + message.category = 26; + break; + case "CAT_STAMP": + case 27: + message.category = 27; + break; + case "CAT_TERMINAL_BACKGROUND": + case 28: + message.category = 28; + break; + case "CAT_CAR_TICKET": + case 201: + message.category = 201; + break; + case "CAT_CONSUMPTION_ITEM": + case 202: + message.category = 202; + break; + case "CAT_CAR_TICKET_FREE": + case 203: + message.category = 203; + break; + case "CAT_AERO_FULLSET": + case 300: + message.category = 300; + break; + case "CAT_AERO_LIMITED": + case 301: + message.category = 301; + break; + } + if (object.itemId != null) + message.itemId = object.itemId >>> 0; + if (object.earned != null) + message.earned = Boolean(object.earned); + return message; + }; + + /** + * Creates a plain object from a ScratchSquare message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.ScratchSquare} message ScratchSquare + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScratchSquare.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.category = options.enums === String ? "CAT_CUSTOM_COLOR" : 1; + object.itemId = 0; + object.earned = false; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.wm.protobuf.ItemCategory[message.category] : message.category; + if (message.itemId != null && message.hasOwnProperty("itemId")) + object.itemId = message.itemId; + if (message.earned != null && message.hasOwnProperty("earned")) + object.earned = message.earned; + return object; + }; + + /** + * Converts this ScratchSquare to JSON. + * @function toJSON + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + * @returns {Object.} JSON object + */ + ScratchSquare.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScratchSquare + * @function getTypeUrl + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScratchSquare.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ScratchSheet.ScratchSquare"; + }; + + return ScratchSquare; + })(); + + return ScratchSheet; + })(); + + protobuf.UserItem = (function() { + + /** + * Properties of a UserItem. + * @memberof wm.protobuf + * @interface IUserItem + * @property {wm.protobuf.ItemCategory} category UserItem category + * @property {number} itemId UserItem itemId + * @property {number|null} [userItemId] UserItem userItemId + * @property {number|null} [earnedAt] UserItem earnedAt + * @property {number|null} [expireAt] UserItem expireAt + */ + + /** + * Constructs a new UserItem. + * @memberof wm.protobuf + * @classdesc Represents a UserItem. + * @implements IUserItem + * @constructor + * @param {wm.protobuf.IUserItem=} [properties] Properties to set + */ + function UserItem(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserItem category. + * @member {wm.protobuf.ItemCategory} category + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.category = 1; + + /** + * UserItem itemId. + * @member {number} itemId + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.itemId = 0; + + /** + * UserItem userItemId. + * @member {number} userItemId + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.userItemId = 0; + + /** + * UserItem earnedAt. + * @member {number} earnedAt + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.earnedAt = 0; + + /** + * UserItem expireAt. + * @member {number} expireAt + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.expireAt = 0; + + /** + * Creates a new UserItem instance using the specified properties. + * @function create + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.IUserItem=} [properties] Properties to set + * @returns {wm.protobuf.UserItem} UserItem instance + */ + UserItem.create = function create(properties) { + return new UserItem(properties); + }; + + /** + * Encodes the specified UserItem message. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.IUserItem} message UserItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.itemId); + if (message.userItemId != null && Object.hasOwnProperty.call(message, "userItemId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.userItemId); + if (message.earnedAt != null && Object.hasOwnProperty.call(message, "earnedAt")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.earnedAt); + if (message.expireAt != null && Object.hasOwnProperty.call(message, "expireAt")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.expireAt); + return writer; + }; + + /** + * Encodes the specified UserItem message, length delimited. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.IUserItem} message UserItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserItem message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UserItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UserItem} UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UserItem(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.itemId = reader.uint32(); + break; + } + case 3: { + message.userItemId = reader.uint32(); + break; + } + case 4: { + message.earnedAt = reader.uint32(); + break; + } + case 5: { + message.expireAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("category")) + throw $util.ProtocolError("missing required 'category'", { instance: message }); + if (!message.hasOwnProperty("itemId")) + throw $util.ProtocolError("missing required 'itemId'", { instance: message }); + return message; + }; + + /** + * Decodes a UserItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UserItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UserItem} UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserItem message. + * @function verify + * @memberof wm.protobuf.UserItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.category) { + default: + return "category: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + case 10: + case 12: + case 14: + case 15: + case 16: + case 17: + case 19: + case 22: + case 24: + case 25: + case 26: + case 27: + case 28: + case 201: + case 202: + case 203: + case 300: + case 301: + break; + } + if (!$util.isInteger(message.itemId)) + return "itemId: integer expected"; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + if (!$util.isInteger(message.userItemId)) + return "userItemId: integer expected"; + if (message.earnedAt != null && message.hasOwnProperty("earnedAt")) + if (!$util.isInteger(message.earnedAt)) + return "earnedAt: integer expected"; + if (message.expireAt != null && message.hasOwnProperty("expireAt")) + if (!$util.isInteger(message.expireAt)) + return "expireAt: integer expected"; + return null; + }; + + /** + * Creates a UserItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UserItem + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UserItem} UserItem + */ + UserItem.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UserItem) + return object; + let message = new $root.wm.protobuf.UserItem(); + switch (object.category) { + case "CAT_CUSTOM_COLOR": + case 1: + message.category = 1; + break; + case "CAT_WHEEL": + case 2: + message.category = 2; + break; + case "CAT_AERO": + case 3: + message.category = 3; + break; + case "CAT_BONNET": + case 4: + message.category = 4; + break; + case "CAT_WING": + case 5: + message.category = 5; + break; + case "CAT_MIRROR": + case 6: + message.category = 6; + break; + case "CAT_NEON": + case 8: + message.category = 8; + break; + case "CAT_TRUNK": + case 9: + message.category = 9; + break; + case "CAT_NUMBER_PLATE": + case 10: + message.category = 10; + break; + case "CAT_GT_WING": + case 12: + message.category = 12; + break; + case "CAT_AURA_MOTIF": + case 14: + message.category = 14; + break; + case "CAT_METER": + case 15: + message.category = 15; + break; + case "CAT_BGM": + case 16: + message.category = 16; + break; + case "CAT_NAME_PLATE": + case 17: + message.category = 17; + break; + case "CAT_NUMBER": + case 19: + message.category = 19; + break; + case "CAT_BGM_TRACK": + case 22: + message.category = 22; + break; + case "CAT_WINDOW_STICKER_FONT": + case 24: + message.category = 24; + break; + case "CAT_WINDOW_DECORATION": + case 25: + message.category = 25; + break; + case "CAT_RIVAL_MARKER": + case 26: + message.category = 26; + break; + case "CAT_STAMP": + case 27: + message.category = 27; + break; + case "CAT_TERMINAL_BACKGROUND": + case 28: + message.category = 28; + break; + case "CAT_CAR_TICKET": + case 201: + message.category = 201; + break; + case "CAT_CONSUMPTION_ITEM": + case 202: + message.category = 202; + break; + case "CAT_CAR_TICKET_FREE": + case 203: + message.category = 203; + break; + case "CAT_AERO_FULLSET": + case 300: + message.category = 300; + break; + case "CAT_AERO_LIMITED": + case 301: + message.category = 301; + break; + } + if (object.itemId != null) + message.itemId = object.itemId >>> 0; + if (object.userItemId != null) + message.userItemId = object.userItemId >>> 0; + if (object.earnedAt != null) + message.earnedAt = object.earnedAt >>> 0; + if (object.expireAt != null) + message.expireAt = object.expireAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a UserItem message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.UserItem} message UserItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.category = options.enums === String ? "CAT_CUSTOM_COLOR" : 1; + object.itemId = 0; + object.userItemId = 0; + object.earnedAt = 0; + object.expireAt = 0; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.wm.protobuf.ItemCategory[message.category] : message.category; + if (message.itemId != null && message.hasOwnProperty("itemId")) + object.itemId = message.itemId; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + object.userItemId = message.userItemId; + if (message.earnedAt != null && message.hasOwnProperty("earnedAt")) + object.earnedAt = message.earnedAt; + if (message.expireAt != null && message.hasOwnProperty("expireAt")) + object.expireAt = message.expireAt; + return object; + }; + + /** + * Converts this UserItem to JSON. + * @function toJSON + * @memberof wm.protobuf.UserItem + * @instance + * @returns {Object.} JSON object + */ + UserItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserItem + * @function getTypeUrl + * @memberof wm.protobuf.UserItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UserItem"; + }; + + return UserItem; + })(); + + protobuf.InviteFriendCampaignSchedule = (function() { + + /** + * Properties of an InviteFriendCampaignSchedule. + * @memberof wm.protobuf + * @interface IInviteFriendCampaignSchedule + * @property {number} campaignId InviteFriendCampaignSchedule campaignId + * @property {number} startAt InviteFriendCampaignSchedule startAt + * @property {number} endAt InviteFriendCampaignSchedule endAt + * @property {number} couponUnreceivableAt InviteFriendCampaignSchedule couponUnreceivableAt + */ + + /** + * Constructs a new InviteFriendCampaignSchedule. + * @memberof wm.protobuf + * @classdesc Represents an InviteFriendCampaignSchedule. + * @implements IInviteFriendCampaignSchedule + * @constructor + * @param {wm.protobuf.IInviteFriendCampaignSchedule=} [properties] Properties to set + */ + function InviteFriendCampaignSchedule(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InviteFriendCampaignSchedule campaignId. + * @member {number} campaignId + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.campaignId = 0; + + /** + * InviteFriendCampaignSchedule startAt. + * @member {number} startAt + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.startAt = 0; + + /** + * InviteFriendCampaignSchedule endAt. + * @member {number} endAt + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.endAt = 0; + + /** + * InviteFriendCampaignSchedule couponUnreceivableAt. + * @member {number} couponUnreceivableAt + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.couponUnreceivableAt = 0; + + /** + * Creates a new InviteFriendCampaignSchedule instance using the specified properties. + * @function create + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.IInviteFriendCampaignSchedule=} [properties] Properties to set + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule instance + */ + InviteFriendCampaignSchedule.create = function create(properties) { + return new InviteFriendCampaignSchedule(properties); + }; + + /** + * Encodes the specified InviteFriendCampaignSchedule message. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.IInviteFriendCampaignSchedule} message InviteFriendCampaignSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InviteFriendCampaignSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.campaignId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.startAt); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.endAt); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.couponUnreceivableAt); + return writer; + }; + + /** + * Encodes the specified InviteFriendCampaignSchedule message, length delimited. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.IInviteFriendCampaignSchedule} message InviteFriendCampaignSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InviteFriendCampaignSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InviteFriendCampaignSchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.InviteFriendCampaignSchedule(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.campaignId = reader.uint32(); + break; + } + case 2: { + message.startAt = reader.uint32(); + break; + } + case 3: { + message.endAt = reader.uint32(); + break; + } + case 4: { + message.couponUnreceivableAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("campaignId")) + throw $util.ProtocolError("missing required 'campaignId'", { instance: message }); + if (!message.hasOwnProperty("startAt")) + throw $util.ProtocolError("missing required 'startAt'", { instance: message }); + if (!message.hasOwnProperty("endAt")) + throw $util.ProtocolError("missing required 'endAt'", { instance: message }); + if (!message.hasOwnProperty("couponUnreceivableAt")) + throw $util.ProtocolError("missing required 'couponUnreceivableAt'", { instance: message }); + return message; + }; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InviteFriendCampaignSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InviteFriendCampaignSchedule message. + * @function verify + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InviteFriendCampaignSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.campaignId)) + return "campaignId: integer expected"; + if (!$util.isInteger(message.startAt)) + return "startAt: integer expected"; + if (!$util.isInteger(message.endAt)) + return "endAt: integer expected"; + if (!$util.isInteger(message.couponUnreceivableAt)) + return "couponUnreceivableAt: integer expected"; + return null; + }; + + /** + * Creates an InviteFriendCampaignSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule + */ + InviteFriendCampaignSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.InviteFriendCampaignSchedule) + return object; + let message = new $root.wm.protobuf.InviteFriendCampaignSchedule(); + if (object.campaignId != null) + message.campaignId = object.campaignId >>> 0; + if (object.startAt != null) + message.startAt = object.startAt >>> 0; + if (object.endAt != null) + message.endAt = object.endAt >>> 0; + if (object.couponUnreceivableAt != null) + message.couponUnreceivableAt = object.couponUnreceivableAt >>> 0; + return message; + }; + + /** + * Creates a plain object from an InviteFriendCampaignSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.InviteFriendCampaignSchedule} message InviteFriendCampaignSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InviteFriendCampaignSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.campaignId = 0; + object.startAt = 0; + object.endAt = 0; + object.couponUnreceivableAt = 0; + } + if (message.campaignId != null && message.hasOwnProperty("campaignId")) + object.campaignId = message.campaignId; + if (message.startAt != null && message.hasOwnProperty("startAt")) + object.startAt = message.startAt; + if (message.endAt != null && message.hasOwnProperty("endAt")) + object.endAt = message.endAt; + if (message.couponUnreceivableAt != null && message.hasOwnProperty("couponUnreceivableAt")) + object.couponUnreceivableAt = message.couponUnreceivableAt; + return object; + }; + + /** + * Converts this InviteFriendCampaignSchedule to JSON. + * @function toJSON + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + * @returns {Object.} JSON object + */ + InviteFriendCampaignSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InviteFriendCampaignSchedule + * @function getTypeUrl + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InviteFriendCampaignSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.InviteFriendCampaignSchedule"; + }; + + return InviteFriendCampaignSchedule; + })(); + + protobuf.CarTuning = (function() { + + /** + * Properties of a CarTuning. + * @memberof wm.protobuf + * @interface ICarTuning + * @property {number} carId CarTuning carId + * @property {number} tunePower CarTuning tunePower + * @property {number} tuneHandling CarTuning tuneHandling + * @property {number|null} [lastPlayedAt] CarTuning lastPlayedAt + */ + + /** + * Constructs a new CarTuning. + * @memberof wm.protobuf + * @classdesc Represents a CarTuning. + * @implements ICarTuning + * @constructor + * @param {wm.protobuf.ICarTuning=} [properties] Properties to set + */ + function CarTuning(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarTuning carId. + * @member {number} carId + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.carId = 0; + + /** + * CarTuning tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.tunePower = 0; + + /** + * CarTuning tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.tuneHandling = 0; + + /** + * CarTuning lastPlayedAt. + * @member {number} lastPlayedAt + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.lastPlayedAt = 0; + + /** + * Creates a new CarTuning instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.ICarTuning=} [properties] Properties to set + * @returns {wm.protobuf.CarTuning} CarTuning instance + */ + CarTuning.create = function create(properties) { + return new CarTuning(properties); + }; + + /** + * Encodes the specified CarTuning message. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.ICarTuning} message CarTuning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tunePower); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuneHandling); + if (message.lastPlayedAt != null && Object.hasOwnProperty.call(message, "lastPlayedAt")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.lastPlayedAt); + return writer; + }; + + /** + * Encodes the specified CarTuning message, length delimited. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.ICarTuning} message CarTuning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarTuning message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarTuning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarTuning} CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarTuning(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.tunePower = reader.uint32(); + break; + } + case 3: { + message.tuneHandling = reader.uint32(); + break; + } + case 4: { + message.lastPlayedAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes a CarTuning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarTuning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarTuning} CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarTuning message. + * @function verify + * @memberof wm.protobuf.CarTuning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarTuning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + if (!$util.isInteger(message.lastPlayedAt)) + return "lastPlayedAt: integer expected"; + return null; + }; + + /** + * Creates a CarTuning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarTuning + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarTuning} CarTuning + */ + CarTuning.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarTuning) + return object; + let message = new $root.wm.protobuf.CarTuning(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.lastPlayedAt != null) + message.lastPlayedAt = object.lastPlayedAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarTuning message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.CarTuning} message CarTuning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarTuning.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.lastPlayedAt = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + object.lastPlayedAt = message.lastPlayedAt; + return object; + }; + + /** + * Converts this CarTuning to JSON. + * @function toJSON + * @memberof wm.protobuf.CarTuning + * @instance + * @returns {Object.} JSON object + */ + CarTuning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarTuning + * @function getTypeUrl + * @memberof wm.protobuf.CarTuning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarTuning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarTuning"; + }; + + return CarTuning; + })(); + + protobuf.BinaryData = (function() { + + /** + * Properties of a BinaryData. + * @memberof wm.protobuf + * @interface IBinaryData + * @property {Uint8Array} data BinaryData data + * @property {number} mergeSerial BinaryData mergeSerial + */ + + /** + * Constructs a new BinaryData. + * @memberof wm.protobuf + * @classdesc Represents a BinaryData. + * @implements IBinaryData + * @constructor + * @param {wm.protobuf.IBinaryData=} [properties] Properties to set + */ + function BinaryData(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BinaryData data. + * @member {Uint8Array} data + * @memberof wm.protobuf.BinaryData + * @instance + */ + BinaryData.prototype.data = $util.newBuffer([]); + + /** + * BinaryData mergeSerial. + * @member {number} mergeSerial + * @memberof wm.protobuf.BinaryData + * @instance + */ + BinaryData.prototype.mergeSerial = 0; + + /** + * Creates a new BinaryData instance using the specified properties. + * @function create + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.IBinaryData=} [properties] Properties to set + * @returns {wm.protobuf.BinaryData} BinaryData instance + */ + BinaryData.create = function create(properties) { + return new BinaryData(properties); + }; + + /** + * Encodes the specified BinaryData message. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.IBinaryData} message BinaryData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + writer.uint32(/* id 2, wireType 0 =*/16).sint32(message.mergeSerial); + return writer; + }; + + /** + * Encodes the specified BinaryData message, length delimited. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.IBinaryData} message BinaryData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BinaryData message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.BinaryData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.BinaryData} BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.BinaryData(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.data = reader.bytes(); + break; + } + case 2: { + message.mergeSerial = reader.sint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("data")) + throw $util.ProtocolError("missing required 'data'", { instance: message }); + if (!message.hasOwnProperty("mergeSerial")) + throw $util.ProtocolError("missing required 'mergeSerial'", { instance: message }); + return message; + }; + + /** + * Decodes a BinaryData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.BinaryData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.BinaryData} BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BinaryData message. + * @function verify + * @memberof wm.protobuf.BinaryData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BinaryData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (!$util.isInteger(message.mergeSerial)) + return "mergeSerial: integer expected"; + return null; + }; + + /** + * Creates a BinaryData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.BinaryData + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.BinaryData} BinaryData + */ + BinaryData.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.BinaryData) + return object; + let message = new $root.wm.protobuf.BinaryData(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + if (object.mergeSerial != null) + message.mergeSerial = object.mergeSerial | 0; + return message; + }; + + /** + * Creates a plain object from a BinaryData message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.BinaryData} message BinaryData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BinaryData.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.mergeSerial = 0; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.mergeSerial != null && message.hasOwnProperty("mergeSerial")) + object.mergeSerial = message.mergeSerial; + return object; + }; + + /** + * Converts this BinaryData to JSON. + * @function toJSON + * @memberof wm.protobuf.BinaryData + * @instance + * @returns {Object.} JSON object + */ + BinaryData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BinaryData + * @function getTypeUrl + * @memberof wm.protobuf.BinaryData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BinaryData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.BinaryData"; + }; + + return BinaryData; + })(); + + protobuf.GhostTrail = (function() { + + /** + * Properties of a GhostTrail. + * @memberof wm.protobuf + * @interface IGhostTrail + * @property {number} carId GhostTrail carId + * @property {number} area GhostTrail area + * @property {number} ramp GhostTrail ramp + * @property {number} path GhostTrail path + * @property {number} playedAt GhostTrail playedAt + * @property {wm.protobuf.IPlace|null} [playedPlace] GhostTrail playedPlace + * @property {Uint8Array} trail GhostTrail trail + */ + + /** + * Constructs a new GhostTrail. + * @memberof wm.protobuf + * @classdesc Represents a GhostTrail. + * @implements IGhostTrail + * @constructor + * @param {wm.protobuf.IGhostTrail=} [properties] Properties to set + */ + function GhostTrail(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostTrail carId. + * @member {number} carId + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.carId = 0; + + /** + * GhostTrail area. + * @member {number} area + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.area = 0; + + /** + * GhostTrail ramp. + * @member {number} ramp + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.ramp = 0; + + /** + * GhostTrail path. + * @member {number} path + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.path = 0; + + /** + * GhostTrail playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.playedAt = 0; + + /** + * GhostTrail playedPlace. + * @member {wm.protobuf.IPlace|null|undefined} playedPlace + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.playedPlace = null; + + /** + * GhostTrail trail. + * @member {Uint8Array} trail + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.trail = $util.newBuffer([]); + + /** + * Creates a new GhostTrail instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.IGhostTrail=} [properties] Properties to set + * @returns {wm.protobuf.GhostTrail} GhostTrail instance + */ + GhostTrail.create = function create(properties) { + return new GhostTrail(properties); + }; + + /** + * Encodes the specified GhostTrail message. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.IGhostTrail} message GhostTrail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostTrail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.area); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.ramp); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.playedAt); + if (message.playedPlace != null && Object.hasOwnProperty.call(message, "playedPlace")) + $root.wm.protobuf.Place.encode(message.playedPlace, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.trail); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.path); + return writer; + }; + + /** + * Encodes the specified GhostTrail message, length delimited. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.IGhostTrail} message GhostTrail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostTrail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostTrail message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostTrail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostTrail} GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostTrail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostTrail(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.area = reader.uint32(); + break; + } + case 3: { + message.ramp = reader.uint32(); + break; + } + case 7: { + message.path = reader.uint32(); + break; + } + case 4: { + message.playedAt = reader.uint32(); + break; + } + case 5: { + message.playedPlace = $root.wm.protobuf.Place.decode(reader, reader.uint32()); + break; + } + case 6: { + message.trail = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("ramp")) + throw $util.ProtocolError("missing required 'ramp'", { instance: message }); + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + if (!message.hasOwnProperty("trail")) + throw $util.ProtocolError("missing required 'trail'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostTrail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostTrail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostTrail} GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostTrail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostTrail message. + * @function verify + * @memberof wm.protobuf.GhostTrail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostTrail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (message.playedPlace != null && message.hasOwnProperty("playedPlace")) { + let error = $root.wm.protobuf.Place.verify(message.playedPlace); + if (error) + return "playedPlace." + error; + } + if (!(message.trail && typeof message.trail.length === "number" || $util.isString(message.trail))) + return "trail: buffer expected"; + return null; + }; + + /** + * Creates a GhostTrail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostTrail + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostTrail} GhostTrail + */ + GhostTrail.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostTrail) + return object; + let message = new $root.wm.protobuf.GhostTrail(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.playedPlace != null) { + if (typeof object.playedPlace !== "object") + throw TypeError(".wm.protobuf.GhostTrail.playedPlace: object expected"); + message.playedPlace = $root.wm.protobuf.Place.fromObject(object.playedPlace); + } + if (object.trail != null) + if (typeof object.trail === "string") + $util.base64.decode(object.trail, message.trail = $util.newBuffer($util.base64.length(object.trail)), 0); + else if (object.trail.length >= 0) + message.trail = object.trail; + return message; + }; + + /** + * Creates a plain object from a GhostTrail message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.GhostTrail} message GhostTrail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostTrail.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.area = 0; + object.ramp = 0; + object.playedAt = 0; + object.playedPlace = null; + if (options.bytes === String) + object.trail = ""; + else { + object.trail = []; + if (options.bytes !== Array) + object.trail = $util.newBuffer(object.trail); + } + object.path = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.playedPlace != null && message.hasOwnProperty("playedPlace")) + object.playedPlace = $root.wm.protobuf.Place.toObject(message.playedPlace, options); + if (message.trail != null && message.hasOwnProperty("trail")) + object.trail = options.bytes === String ? $util.base64.encode(message.trail, 0, message.trail.length) : options.bytes === Array ? Array.prototype.slice.call(message.trail) : message.trail; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this GhostTrail to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostTrail + * @instance + * @returns {Object.} JSON object + */ + GhostTrail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostTrail + * @function getTypeUrl + * @memberof wm.protobuf.GhostTrail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostTrail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostTrail"; + }; + + return GhostTrail; + })(); + + protobuf.PlaceList = (function() { + + /** + * Properties of a PlaceList. + * @memberof wm.protobuf + * @interface IPlaceList + * @property {Array.|null} [places] PlaceList places + */ + + /** + * Constructs a new PlaceList. + * @memberof wm.protobuf + * @classdesc Represents a PlaceList. + * @implements IPlaceList + * @constructor + * @param {wm.protobuf.IPlaceList=} [properties] Properties to set + */ + function PlaceList(properties) { + this.places = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlaceList places. + * @member {Array.} places + * @memberof wm.protobuf.PlaceList + * @instance + */ + PlaceList.prototype.places = $util.emptyArray; + + /** + * Creates a new PlaceList instance using the specified properties. + * @function create + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.IPlaceList=} [properties] Properties to set + * @returns {wm.protobuf.PlaceList} PlaceList instance + */ + PlaceList.create = function create(properties) { + return new PlaceList(properties); + }; + + /** + * Encodes the specified PlaceList message. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.IPlaceList} message PlaceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.places != null && message.places.length) + for (let i = 0; i < message.places.length; ++i) + $root.wm.protobuf.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PlaceList message, length delimited. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.IPlaceList} message PlaceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlaceList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PlaceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PlaceList} PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PlaceList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.places && message.places.length)) + message.places = []; + message.places.push($root.wm.protobuf.Place.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlaceList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PlaceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PlaceList} PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlaceList message. + * @function verify + * @memberof wm.protobuf.PlaceList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlaceList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.places != null && message.hasOwnProperty("places")) { + if (!Array.isArray(message.places)) + return "places: array expected"; + for (let i = 0; i < message.places.length; ++i) { + let error = $root.wm.protobuf.Place.verify(message.places[i]); + if (error) + return "places." + error; + } + } + return null; + }; + + /** + * Creates a PlaceList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PlaceList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PlaceList} PlaceList + */ + PlaceList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PlaceList) + return object; + let message = new $root.wm.protobuf.PlaceList(); + if (object.places) { + if (!Array.isArray(object.places)) + throw TypeError(".wm.protobuf.PlaceList.places: array expected"); + message.places = []; + for (let i = 0; i < object.places.length; ++i) { + if (typeof object.places[i] !== "object") + throw TypeError(".wm.protobuf.PlaceList.places: object expected"); + message.places[i] = $root.wm.protobuf.Place.fromObject(object.places[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PlaceList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.PlaceList} message PlaceList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlaceList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.places = []; + if (message.places && message.places.length) { + object.places = []; + for (let j = 0; j < message.places.length; ++j) + object.places[j] = $root.wm.protobuf.Place.toObject(message.places[j], options); + } + return object; + }; + + /** + * Converts this PlaceList to JSON. + * @function toJSON + * @memberof wm.protobuf.PlaceList + * @instance + * @returns {Object.} JSON object + */ + PlaceList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlaceList + * @function getTypeUrl + * @memberof wm.protobuf.PlaceList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaceList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PlaceList"; + }; + + return PlaceList; + })(); + + protobuf.GhostList = (function() { + + /** + * Properties of a GhostList. + * @memberof wm.protobuf + * @interface IGhostList + * @property {Array.|null} [ghosts] GhostList ghosts + */ + + /** + * Constructs a new GhostList. + * @memberof wm.protobuf + * @classdesc Represents a GhostList. + * @implements IGhostList + * @constructor + * @param {wm.protobuf.IGhostList=} [properties] Properties to set + */ + function GhostList(properties) { + this.ghosts = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostList ghosts. + * @member {Array.} ghosts + * @memberof wm.protobuf.GhostList + * @instance + */ + GhostList.prototype.ghosts = $util.emptyArray; + + /** + * Creates a new GhostList instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.IGhostList=} [properties] Properties to set + * @returns {wm.protobuf.GhostList} GhostList instance + */ + GhostList.create = function create(properties) { + return new GhostList(properties); + }; + + /** + * Encodes the specified GhostList message. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.IGhostList} message GhostList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ghosts != null && message.ghosts.length) + for (let i = 0; i < message.ghosts.length; ++i) + $root.wm.protobuf.GhostCar.encode(message.ghosts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostList message, length delimited. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.IGhostList} message GhostList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostList} GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.ghosts && message.ghosts.length)) + message.ghosts = []; + message.ghosts.push($root.wm.protobuf.GhostCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GhostList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostList} GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostList message. + * @function verify + * @memberof wm.protobuf.GhostList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ghosts != null && message.hasOwnProperty("ghosts")) { + if (!Array.isArray(message.ghosts)) + return "ghosts: array expected"; + for (let i = 0; i < message.ghosts.length; ++i) { + let error = $root.wm.protobuf.GhostCar.verify(message.ghosts[i]); + if (error) + return "ghosts." + error; + } + } + return null; + }; + + /** + * Creates a GhostList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostList} GhostList + */ + GhostList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostList) + return object; + let message = new $root.wm.protobuf.GhostList(); + if (object.ghosts) { + if (!Array.isArray(object.ghosts)) + throw TypeError(".wm.protobuf.GhostList.ghosts: array expected"); + message.ghosts = []; + for (let i = 0; i < object.ghosts.length; ++i) { + if (typeof object.ghosts[i] !== "object") + throw TypeError(".wm.protobuf.GhostList.ghosts: object expected"); + message.ghosts[i] = $root.wm.protobuf.GhostCar.fromObject(object.ghosts[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GhostList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.GhostList} message GhostList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.ghosts = []; + if (message.ghosts && message.ghosts.length) { + object.ghosts = []; + for (let j = 0; j < message.ghosts.length; ++j) + object.ghosts[j] = $root.wm.protobuf.GhostCar.toObject(message.ghosts[j], options); + } + return object; + }; + + /** + * Converts this GhostList to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostList + * @instance + * @returns {Object.} JSON object + */ + GhostList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostList + * @function getTypeUrl + * @memberof wm.protobuf.GhostList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostList"; + }; + + return GhostList; + })(); + + protobuf.CarSummary = (function() { + + /** + * Properties of a CarSummary. + * @memberof wm.protobuf + * @interface ICarSummary + * @property {number} hitCount CarSummary hitCount + * @property {Array.|null} [cars] CarSummary cars + */ + + /** + * Constructs a new CarSummary. + * @memberof wm.protobuf + * @classdesc Represents a CarSummary. + * @implements ICarSummary + * @constructor + * @param {wm.protobuf.ICarSummary=} [properties] Properties to set + */ + function CarSummary(properties) { + this.cars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarSummary hitCount. + * @member {number} hitCount + * @memberof wm.protobuf.CarSummary + * @instance + */ + CarSummary.prototype.hitCount = 0; + + /** + * CarSummary cars. + * @member {Array.} cars + * @memberof wm.protobuf.CarSummary + * @instance + */ + CarSummary.prototype.cars = $util.emptyArray; + + /** + * Creates a new CarSummary instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.ICarSummary=} [properties] Properties to set + * @returns {wm.protobuf.CarSummary} CarSummary instance + */ + CarSummary.create = function create(properties) { + return new CarSummary(properties); + }; + + /** + * Encodes the specified CarSummary message. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.ICarSummary} message CarSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.hitCount); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.Car.encode(message.cars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CarSummary message, length delimited. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.ICarSummary} message CarSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarSummary message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarSummary} CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarSummary(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hitCount = reader.uint32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("hitCount")) + throw $util.ProtocolError("missing required 'hitCount'", { instance: message }); + return message; + }; + + /** + * Decodes a CarSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarSummary} CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarSummary message. + * @function verify + * @memberof wm.protobuf.CarSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.hitCount)) + return "hitCount: integer expected"; + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + return null; + }; + + /** + * Creates a CarSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarSummary + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarSummary} CarSummary + */ + CarSummary.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarSummary) + return object; + let message = new $root.wm.protobuf.CarSummary(); + if (object.hitCount != null) + message.hitCount = object.hitCount >>> 0; + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.CarSummary.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.CarSummary.cars: object expected"); + message.cars[i] = $root.wm.protobuf.Car.fromObject(object.cars[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CarSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.CarSummary} message CarSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cars = []; + if (options.defaults) + object.hitCount = 0; + if (message.hitCount != null && message.hasOwnProperty("hitCount")) + object.hitCount = message.hitCount; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.Car.toObject(message.cars[j], options); + } + return object; + }; + + /** + * Converts this CarSummary to JSON. + * @function toJSON + * @memberof wm.protobuf.CarSummary + * @instance + * @returns {Object.} JSON object + */ + CarSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarSummary + * @function getTypeUrl + * @memberof wm.protobuf.CarSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarSummary"; + }; + + return CarSummary; + })(); + + protobuf.FileList = (function() { + + /** + * Properties of a FileList. + * @memberof wm.protobuf + * @interface IFileList + * @property {Array.|null} [files] FileList files + * @property {number|null} [interval] FileList interval + */ + + /** + * Constructs a new FileList. + * @memberof wm.protobuf + * @classdesc Represents a FileList. + * @implements IFileList + * @constructor + * @param {wm.protobuf.IFileList=} [properties] Properties to set + */ + function FileList(properties) { + this.files = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileList files. + * @member {Array.} files + * @memberof wm.protobuf.FileList + * @instance + */ + FileList.prototype.files = $util.emptyArray; + + /** + * FileList interval. + * @member {number} interval + * @memberof wm.protobuf.FileList + * @instance + */ + FileList.prototype.interval = 0; + + /** + * Creates a new FileList instance using the specified properties. + * @function create + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.IFileList=} [properties] Properties to set + * @returns {wm.protobuf.FileList} FileList instance + */ + FileList.create = function create(properties) { + return new FileList(properties); + }; + + /** + * Encodes the specified FileList message. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.IFileList} message FileList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.files != null && message.files.length) + for (let i = 0; i < message.files.length; ++i) + $root.wm.protobuf.FileList.FileInfo.encode(message.files[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.interval); + return writer; + }; + + /** + * Encodes the specified FileList message, length delimited. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.IFileList} message FileList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.FileList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.FileList} FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.FileList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.files && message.files.length)) + message.files = []; + message.files.push($root.wm.protobuf.FileList.FileInfo.decode(reader, reader.uint32())); + break; + } + case 2: { + message.interval = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.FileList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.FileList} FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileList message. + * @function verify + * @memberof wm.protobuf.FileList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.files != null && message.hasOwnProperty("files")) { + if (!Array.isArray(message.files)) + return "files: array expected"; + for (let i = 0; i < message.files.length; ++i) { + let error = $root.wm.protobuf.FileList.FileInfo.verify(message.files[i]); + if (error) + return "files." + error; + } + } + if (message.interval != null && message.hasOwnProperty("interval")) + if (!$util.isInteger(message.interval)) + return "interval: integer expected"; + return null; + }; + + /** + * Creates a FileList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.FileList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.FileList} FileList + */ + FileList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.FileList) + return object; + let message = new $root.wm.protobuf.FileList(); + if (object.files) { + if (!Array.isArray(object.files)) + throw TypeError(".wm.protobuf.FileList.files: array expected"); + message.files = []; + for (let i = 0; i < object.files.length; ++i) { + if (typeof object.files[i] !== "object") + throw TypeError(".wm.protobuf.FileList.files: object expected"); + message.files[i] = $root.wm.protobuf.FileList.FileInfo.fromObject(object.files[i]); + } + } + if (object.interval != null) + message.interval = object.interval >>> 0; + return message; + }; + + /** + * Creates a plain object from a FileList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.FileList} message FileList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.files = []; + if (options.defaults) + object.interval = 0; + if (message.files && message.files.length) { + object.files = []; + for (let j = 0; j < message.files.length; ++j) + object.files[j] = $root.wm.protobuf.FileList.FileInfo.toObject(message.files[j], options); + } + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = message.interval; + return object; + }; + + /** + * Converts this FileList to JSON. + * @function toJSON + * @memberof wm.protobuf.FileList + * @instance + * @returns {Object.} JSON object + */ + FileList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileList + * @function getTypeUrl + * @memberof wm.protobuf.FileList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.FileList"; + }; + + FileList.FileInfo = (function() { + + /** + * Properties of a FileInfo. + * @memberof wm.protobuf.FileList + * @interface IFileInfo + * @property {number} fileId FileInfo fileId + * @property {wm.protobuf.FileType} fileType FileInfo fileType + * @property {number} fileSize FileInfo fileSize + * @property {string} url FileInfo url + * @property {Uint8Array} sha1sum FileInfo sha1sum + * @property {number} notBefore FileInfo notBefore + * @property {number} notAfter FileInfo notAfter + */ + + /** + * Constructs a new FileInfo. + * @memberof wm.protobuf.FileList + * @classdesc Represents a FileInfo. + * @implements IFileInfo + * @constructor + * @param {wm.protobuf.FileList.IFileInfo=} [properties] Properties to set + */ + function FileInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileInfo fileId. + * @member {number} fileId + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.fileId = 0; + + /** + * FileInfo fileType. + * @member {wm.protobuf.FileType} fileType + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.fileType = 1; + + /** + * FileInfo fileSize. + * @member {number} fileSize + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.fileSize = 0; + + /** + * FileInfo url. + * @member {string} url + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.url = ""; + + /** + * FileInfo sha1sum. + * @member {Uint8Array} sha1sum + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.sha1sum = $util.newBuffer([]); + + /** + * FileInfo notBefore. + * @member {number} notBefore + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.notBefore = 0; + + /** + * FileInfo notAfter. + * @member {number} notAfter + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.notAfter = 0; + + /** + * Creates a new FileInfo instance using the specified properties. + * @function create + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.IFileInfo=} [properties] Properties to set + * @returns {wm.protobuf.FileList.FileInfo} FileInfo instance + */ + FileInfo.create = function create(properties) { + return new FileInfo(properties); + }; + + /** + * Encodes the specified FileInfo message. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.IFileInfo} message FileInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.fileId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.fileType); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.fileSize); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.url); + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.sha1sum); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.notBefore); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.notAfter); + return writer; + }; + + /** + * Encodes the specified FileInfo message, length delimited. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.IFileInfo} message FileInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileInfo message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.FileList.FileInfo} FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.FileList.FileInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fileId = reader.uint32(); + break; + } + case 2: { + message.fileType = reader.int32(); + break; + } + case 3: { + message.fileSize = reader.uint32(); + break; + } + case 4: { + message.url = reader.string(); + break; + } + case 5: { + message.sha1sum = reader.bytes(); + break; + } + case 6: { + message.notBefore = reader.uint32(); + break; + } + case 7: { + message.notAfter = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("fileId")) + throw $util.ProtocolError("missing required 'fileId'", { instance: message }); + if (!message.hasOwnProperty("fileType")) + throw $util.ProtocolError("missing required 'fileType'", { instance: message }); + if (!message.hasOwnProperty("fileSize")) + throw $util.ProtocolError("missing required 'fileSize'", { instance: message }); + if (!message.hasOwnProperty("url")) + throw $util.ProtocolError("missing required 'url'", { instance: message }); + if (!message.hasOwnProperty("sha1sum")) + throw $util.ProtocolError("missing required 'sha1sum'", { instance: message }); + if (!message.hasOwnProperty("notBefore")) + throw $util.ProtocolError("missing required 'notBefore'", { instance: message }); + if (!message.hasOwnProperty("notAfter")) + throw $util.ProtocolError("missing required 'notAfter'", { instance: message }); + return message; + }; + + /** + * Decodes a FileInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.FileList.FileInfo} FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileInfo message. + * @function verify + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.fileId)) + return "fileId: integer expected"; + switch (message.fileType) { + default: + return "fileType: enum value expected"; + case 1: + case 4: + case 6: + break; + } + if (!$util.isInteger(message.fileSize)) + return "fileSize: integer expected"; + if (!$util.isString(message.url)) + return "url: string expected"; + if (!(message.sha1sum && typeof message.sha1sum.length === "number" || $util.isString(message.sha1sum))) + return "sha1sum: buffer expected"; + if (!$util.isInteger(message.notBefore)) + return "notBefore: integer expected"; + if (!$util.isInteger(message.notAfter)) + return "notAfter: integer expected"; + return null; + }; + + /** + * Creates a FileInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.FileList.FileInfo} FileInfo + */ + FileInfo.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.FileList.FileInfo) + return object; + let message = new $root.wm.protobuf.FileList.FileInfo(); + if (object.fileId != null) + message.fileId = object.fileId >>> 0; + switch (object.fileType) { + case "FILE_PROMOTION_ANNOUNCEMENT": + case 1: + message.fileType = 1; + break; + case "FILE_FEATURE_ANNOUNCEMENT": + case 4: + message.fileType = 4; + break; + case "FILE_SPAPP_ANNOUNCEMENT": + case 6: + message.fileType = 6; + break; + } + if (object.fileSize != null) + message.fileSize = object.fileSize >>> 0; + if (object.url != null) + message.url = String(object.url); + if (object.sha1sum != null) + if (typeof object.sha1sum === "string") + $util.base64.decode(object.sha1sum, message.sha1sum = $util.newBuffer($util.base64.length(object.sha1sum)), 0); + else if (object.sha1sum.length >= 0) + message.sha1sum = object.sha1sum; + if (object.notBefore != null) + message.notBefore = object.notBefore >>> 0; + if (object.notAfter != null) + message.notAfter = object.notAfter >>> 0; + return message; + }; + + /** + * Creates a plain object from a FileInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.FileInfo} message FileInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.fileId = 0; + object.fileType = options.enums === String ? "FILE_PROMOTION_ANNOUNCEMENT" : 1; + object.fileSize = 0; + object.url = ""; + if (options.bytes === String) + object.sha1sum = ""; + else { + object.sha1sum = []; + if (options.bytes !== Array) + object.sha1sum = $util.newBuffer(object.sha1sum); + } + object.notBefore = 0; + object.notAfter = 0; + } + if (message.fileId != null && message.hasOwnProperty("fileId")) + object.fileId = message.fileId; + if (message.fileType != null && message.hasOwnProperty("fileType")) + object.fileType = options.enums === String ? $root.wm.protobuf.FileType[message.fileType] : message.fileType; + if (message.fileSize != null && message.hasOwnProperty("fileSize")) + object.fileSize = message.fileSize; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.sha1sum != null && message.hasOwnProperty("sha1sum")) + object.sha1sum = options.bytes === String ? $util.base64.encode(message.sha1sum, 0, message.sha1sum.length) : options.bytes === Array ? Array.prototype.slice.call(message.sha1sum) : message.sha1sum; + if (message.notBefore != null && message.hasOwnProperty("notBefore")) + object.notBefore = message.notBefore; + if (message.notAfter != null && message.hasOwnProperty("notAfter")) + object.notAfter = message.notAfter; + return object; + }; + + /** + * Converts this FileInfo to JSON. + * @function toJSON + * @memberof wm.protobuf.FileList.FileInfo + * @instance + * @returns {Object.} JSON object + */ + FileInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileInfo + * @function getTypeUrl + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.FileList.FileInfo"; + }; + + return FileInfo; + })(); + + return FileList; + })(); + + protobuf.GhostCompetitionTarget = (function() { + + /** + * Properties of a GhostCompetitionTarget. + * @memberof wm.protobuf + * @interface IGhostCompetitionTarget + * @property {number} competitionId GhostCompetitionTarget competitionId + * @property {number|null} [specialGhostId] GhostCompetitionTarget specialGhostId + * @property {wm.protobuf.IGhostCar} ghostCar GhostCompetitionTarget ghostCar + * @property {number|Long} trailId GhostCompetitionTarget trailId + * @property {number} updatedAt GhostCompetitionTarget updatedAt + * @property {wm.protobuf.IGhostCompetitionSchedule|null} [competitionSchedule] GhostCompetitionTarget competitionSchedule + */ + + /** + * Constructs a new GhostCompetitionTarget. + * @memberof wm.protobuf + * @classdesc Represents a GhostCompetitionTarget. + * @implements IGhostCompetitionTarget + * @constructor + * @param {wm.protobuf.IGhostCompetitionTarget=} [properties] Properties to set + */ + function GhostCompetitionTarget(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionTarget competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.competitionId = 0; + + /** + * GhostCompetitionTarget specialGhostId. + * @member {number} specialGhostId + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.specialGhostId = 0; + + /** + * GhostCompetitionTarget ghostCar. + * @member {wm.protobuf.IGhostCar} ghostCar + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.ghostCar = null; + + /** + * GhostCompetitionTarget trailId. + * @member {number|Long} trailId + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.trailId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GhostCompetitionTarget updatedAt. + * @member {number} updatedAt + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.updatedAt = 0; + + /** + * GhostCompetitionTarget competitionSchedule. + * @member {wm.protobuf.IGhostCompetitionSchedule|null|undefined} competitionSchedule + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.competitionSchedule = null; + + /** + * Creates a new GhostCompetitionTarget instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.IGhostCompetitionTarget=} [properties] Properties to set + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget instance + */ + GhostCompetitionTarget.create = function create(properties) { + return new GhostCompetitionTarget(properties); + }; + + /** + * Encodes the specified GhostCompetitionTarget message. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.IGhostCompetitionTarget} message GhostCompetitionTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionTarget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.competitionId); + if (message.specialGhostId != null && Object.hasOwnProperty.call(message, "specialGhostId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.specialGhostId); + $root.wm.protobuf.GhostCar.encode(message.ghostCar, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.trailId); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.updatedAt); + if (message.competitionSchedule != null && Object.hasOwnProperty.call(message, "competitionSchedule")) + $root.wm.protobuf.GhostCompetitionSchedule.encode(message.competitionSchedule, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionTarget message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.IGhostCompetitionTarget} message GhostCompetitionTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionTarget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionTarget.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCompetitionTarget(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.competitionId = reader.uint32(); + break; + } + case 2: { + message.specialGhostId = reader.uint32(); + break; + } + case 3: { + message.ghostCar = $root.wm.protobuf.GhostCar.decode(reader, reader.uint32()); + break; + } + case 4: { + message.trailId = reader.uint64(); + break; + } + case 5: { + message.updatedAt = reader.uint32(); + break; + } + case 6: { + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + if (!message.hasOwnProperty("ghostCar")) + throw $util.ProtocolError("missing required 'ghostCar'", { instance: message }); + if (!message.hasOwnProperty("trailId")) + throw $util.ProtocolError("missing required 'trailId'", { instance: message }); + if (!message.hasOwnProperty("updatedAt")) + throw $util.ProtocolError("missing required 'updatedAt'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionTarget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionTarget message. + * @function verify + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionTarget.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + if (message.specialGhostId != null && message.hasOwnProperty("specialGhostId")) + if (!$util.isInteger(message.specialGhostId)) + return "specialGhostId: integer expected"; + { + let error = $root.wm.protobuf.GhostCar.verify(message.ghostCar); + if (error) + return "ghostCar." + error; + } + if (!$util.isInteger(message.trailId) && !(message.trailId && $util.isInteger(message.trailId.low) && $util.isInteger(message.trailId.high))) + return "trailId: integer|Long expected"; + if (!$util.isInteger(message.updatedAt)) + return "updatedAt: integer expected"; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) { + let error = $root.wm.protobuf.GhostCompetitionSchedule.verify(message.competitionSchedule); + if (error) + return "competitionSchedule." + error; + } + return null; + }; + + /** + * Creates a GhostCompetitionTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget + */ + GhostCompetitionTarget.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCompetitionTarget) + return object; + let message = new $root.wm.protobuf.GhostCompetitionTarget(); + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + if (object.specialGhostId != null) + message.specialGhostId = object.specialGhostId >>> 0; + if (object.ghostCar != null) { + if (typeof object.ghostCar !== "object") + throw TypeError(".wm.protobuf.GhostCompetitionTarget.ghostCar: object expected"); + message.ghostCar = $root.wm.protobuf.GhostCar.fromObject(object.ghostCar); + } + if (object.trailId != null) + if ($util.Long) + (message.trailId = $util.Long.fromValue(object.trailId)).unsigned = true; + else if (typeof object.trailId === "string") + message.trailId = parseInt(object.trailId, 10); + else if (typeof object.trailId === "number") + message.trailId = object.trailId; + else if (typeof object.trailId === "object") + message.trailId = new $util.LongBits(object.trailId.low >>> 0, object.trailId.high >>> 0).toNumber(true); + if (object.updatedAt != null) + message.updatedAt = object.updatedAt >>> 0; + if (object.competitionSchedule != null) { + if (typeof object.competitionSchedule !== "object") + throw TypeError(".wm.protobuf.GhostCompetitionTarget.competitionSchedule: object expected"); + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.fromObject(object.competitionSchedule); + } + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.GhostCompetitionTarget} message GhostCompetitionTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionTarget.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.competitionId = 0; + object.specialGhostId = 0; + object.ghostCar = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.trailId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trailId = options.longs === String ? "0" : 0; + object.updatedAt = 0; + object.competitionSchedule = null; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + if (message.specialGhostId != null && message.hasOwnProperty("specialGhostId")) + object.specialGhostId = message.specialGhostId; + if (message.ghostCar != null && message.hasOwnProperty("ghostCar")) + object.ghostCar = $root.wm.protobuf.GhostCar.toObject(message.ghostCar, options); + if (message.trailId != null && message.hasOwnProperty("trailId")) + if (typeof message.trailId === "number") + object.trailId = options.longs === String ? String(message.trailId) : message.trailId; + else + object.trailId = options.longs === String ? $util.Long.prototype.toString.call(message.trailId) : options.longs === Number ? new $util.LongBits(message.trailId.low >>> 0, message.trailId.high >>> 0).toNumber(true) : message.trailId; + if (message.updatedAt != null && message.hasOwnProperty("updatedAt")) + object.updatedAt = message.updatedAt; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) + object.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.toObject(message.competitionSchedule, options); + return object; + }; + + /** + * Converts this GhostCompetitionTarget to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionTarget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionTarget + * @function getTypeUrl + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCompetitionTarget"; + }; + + return GhostCompetitionTarget; + })(); + + /** + * SystemConstant enum. + * @name wm.protobuf.SystemConstant + * @enum {number} + * @property {number} PROTOBUF_MESSAGE_REVISION=8053 PROTOBUF_MESSAGE_REVISION value + */ + protobuf.SystemConstant = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[8053] = "PROTOBUF_MESSAGE_REVISION"] = 8053; + return values; + })(); + + /** + * ErrorCode enum. + * @name wm.protobuf.ErrorCode + * @enum {number} + * @property {number} ERR_SUCCESS=0 ERR_SUCCESS value + * @property {number} ERR_REQUEST=1 ERR_REQUEST value + * @property {number} ERR_NOT_FOUND=2 ERR_NOT_FOUND value + * @property {number} ERR_ID_SERVER=3 ERR_ID_SERVER value + * @property {number} ERR_ID_BANNED=4 ERR_ID_BANNED value + * @property {number} ERR_USER_LOCKED=5 ERR_USER_LOCKED value + * @property {number} ERR_USER_VERSION=6 ERR_USER_VERSION value + * @property {number} ERR_NAME_CONFLICTED=7 ERR_NAME_CONFLICTED value + * @property {number} ERR_FORBIDDEN=9 ERR_FORBIDDEN value + * @property {number} ERR_USER_SUCCEEDED=11 ERR_USER_SUCCEEDED value + * @property {number} ERR_BEING_TRANSFERRED=12 ERR_BEING_TRANSFERRED value + * @property {number} ERR_SCRATCH_LOCKED=13 ERR_SCRATCH_LOCKED value + */ + protobuf.ErrorCode = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ERR_SUCCESS"] = 0; + values[valuesById[1] = "ERR_REQUEST"] = 1; + values[valuesById[2] = "ERR_NOT_FOUND"] = 2; + values[valuesById[3] = "ERR_ID_SERVER"] = 3; + values[valuesById[4] = "ERR_ID_BANNED"] = 4; + values[valuesById[5] = "ERR_USER_LOCKED"] = 5; + values[valuesById[6] = "ERR_USER_VERSION"] = 6; + values[valuesById[7] = "ERR_NAME_CONFLICTED"] = 7; + values[valuesById[9] = "ERR_FORBIDDEN"] = 9; + values[valuesById[11] = "ERR_USER_SUCCEEDED"] = 11; + values[valuesById[12] = "ERR_BEING_TRANSFERRED"] = 12; + values[valuesById[13] = "ERR_SCRATCH_LOCKED"] = 13; + return values; + })(); + + /** + * LineType enum. + * @name wm.protobuf.LineType + * @enum {number} + * @property {number} L_UNKNOWN=0 L_UNKNOWN value + * @property {number} L_MOBILE=1 L_MOBILE value + * @property {number} L_ISDN=2 L_ISDN value + * @property {number} L_BFLETS=3 L_BFLETS value + * @property {number} L_ADSL=4 L_ADSL value + * @property {number} L_WIRED=5 L_WIRED value + */ + protobuf.LineType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "L_UNKNOWN"] = 0; + values[valuesById[1] = "L_MOBILE"] = 1; + values[valuesById[2] = "L_ISDN"] = 2; + values[valuesById[3] = "L_BFLETS"] = 3; + values[valuesById[4] = "L_ADSL"] = 4; + values[valuesById[5] = "L_WIRED"] = 5; + return values; + })(); + + /** + * TerminalType enum. + * @name wm.protobuf.TerminalType + * @enum {number} + * @property {number} T_DRIVE=0 T_DRIVE value + * @property {number} T_TERMINAL=1 T_TERMINAL value + */ + protobuf.TerminalType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "T_DRIVE"] = 0; + values[valuesById[1] = "T_TERMINAL"] = 1; + return values; + })(); + + /** + * DeviceType enum. + * @name wm.protobuf.DeviceType + * @enum {number} + * @property {number} DEVICE_CARD=0 DEVICE_CARD value + * @property {number} DEVICE_PHONE=1 DEVICE_PHONE value + */ + protobuf.DeviceType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEVICE_CARD"] = 0; + values[valuesById[1] = "DEVICE_PHONE"] = 1; + return values; + })(); + + /** + * ItemCategory enum. + * @name wm.protobuf.ItemCategory + * @enum {number} + * @property {number} CAT_CUSTOM_COLOR=1 CAT_CUSTOM_COLOR value + * @property {number} CAT_WHEEL=2 CAT_WHEEL value + * @property {number} CAT_AERO=3 CAT_AERO value + * @property {number} CAT_BONNET=4 CAT_BONNET value + * @property {number} CAT_WING=5 CAT_WING value + * @property {number} CAT_MIRROR=6 CAT_MIRROR value + * @property {number} CAT_NEON=8 CAT_NEON value + * @property {number} CAT_TRUNK=9 CAT_TRUNK value + * @property {number} CAT_NUMBER_PLATE=10 CAT_NUMBER_PLATE value + * @property {number} CAT_GT_WING=12 CAT_GT_WING value + * @property {number} CAT_AURA_MOTIF=14 CAT_AURA_MOTIF value + * @property {number} CAT_METER=15 CAT_METER value + * @property {number} CAT_BGM=16 CAT_BGM value + * @property {number} CAT_NAME_PLATE=17 CAT_NAME_PLATE value + * @property {number} CAT_NUMBER=19 CAT_NUMBER value + * @property {number} CAT_BGM_TRACK=22 CAT_BGM_TRACK value + * @property {number} CAT_WINDOW_STICKER_FONT=24 CAT_WINDOW_STICKER_FONT value + * @property {number} CAT_WINDOW_DECORATION=25 CAT_WINDOW_DECORATION value + * @property {number} CAT_RIVAL_MARKER=26 CAT_RIVAL_MARKER value + * @property {number} CAT_STAMP=27 CAT_STAMP value + * @property {number} CAT_TERMINAL_BACKGROUND=28 CAT_TERMINAL_BACKGROUND value + * @property {number} CAT_CAR_TICKET=201 CAT_CAR_TICKET value + * @property {number} CAT_CONSUMPTION_ITEM=202 CAT_CONSUMPTION_ITEM value + * @property {number} CAT_CAR_TICKET_FREE=203 CAT_CAR_TICKET_FREE value + * @property {number} CAT_AERO_FULLSET=300 CAT_AERO_FULLSET value + * @property {number} CAT_AERO_LIMITED=301 CAT_AERO_LIMITED value + */ + protobuf.ItemCategory = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "CAT_CUSTOM_COLOR"] = 1; + values[valuesById[2] = "CAT_WHEEL"] = 2; + values[valuesById[3] = "CAT_AERO"] = 3; + values[valuesById[4] = "CAT_BONNET"] = 4; + values[valuesById[5] = "CAT_WING"] = 5; + values[valuesById[6] = "CAT_MIRROR"] = 6; + values[valuesById[8] = "CAT_NEON"] = 8; + values[valuesById[9] = "CAT_TRUNK"] = 9; + values[valuesById[10] = "CAT_NUMBER_PLATE"] = 10; + values[valuesById[12] = "CAT_GT_WING"] = 12; + values[valuesById[14] = "CAT_AURA_MOTIF"] = 14; + values[valuesById[15] = "CAT_METER"] = 15; + values[valuesById[16] = "CAT_BGM"] = 16; + values[valuesById[17] = "CAT_NAME_PLATE"] = 17; + values[valuesById[19] = "CAT_NUMBER"] = 19; + values[valuesById[22] = "CAT_BGM_TRACK"] = 22; + values[valuesById[24] = "CAT_WINDOW_STICKER_FONT"] = 24; + values[valuesById[25] = "CAT_WINDOW_DECORATION"] = 25; + values[valuesById[26] = "CAT_RIVAL_MARKER"] = 26; + values[valuesById[27] = "CAT_STAMP"] = 27; + values[valuesById[28] = "CAT_TERMINAL_BACKGROUND"] = 28; + values[valuesById[201] = "CAT_CAR_TICKET"] = 201; + values[valuesById[202] = "CAT_CONSUMPTION_ITEM"] = 202; + values[valuesById[203] = "CAT_CAR_TICKET_FREE"] = 203; + values[valuesById[300] = "CAT_AERO_FULLSET"] = 300; + values[valuesById[301] = "CAT_AERO_LIMITED"] = 301; + return values; + })(); + + /** + * TutorialType enum. + * @name wm.protobuf.TutorialType + * @enum {number} + * @property {number} TUTORIAL_ID_STORY=0 TUTORIAL_ID_STORY value + * @property {number} TUTORIAL_ID_TIME_ATTACK=1 TUTORIAL_ID_TIME_ATTACK value + * @property {number} TUTORIAL_ID_GHOST=2 TUTORIAL_ID_GHOST value + * @property {number} TUTORIAL_ID_GHOST_CHALLENGE=3 TUTORIAL_ID_GHOST_CHALLENGE value + * @property {number} TUTORIAL_ID_GHOST_LEVEL=4 TUTORIAL_ID_GHOST_LEVEL value + * @property {number} TUTORIAL_ID_UNUSED_5=5 TUTORIAL_ID_UNUSED_5 value + * @property {number} TUTORIAL_ID_GHOST_SEARCH=6 TUTORIAL_ID_GHOST_SEARCH value + * @property {number} TUTORIAL_ID_GHOST_COMPETITION=7 TUTORIAL_ID_GHOST_COMPETITION value + * @property {number} TUTORIAL_ID_HP600_CARD=8 TUTORIAL_ID_HP600_CARD value + * @property {number} TUTORIAL_ID_UNUSED_9=9 TUTORIAL_ID_UNUSED_9 value + * @property {number} TUTORIAL_ID_COMPETITION_QUALIFIED=10 TUTORIAL_ID_COMPETITION_QUALIFIED value + * @property {number} TUTORIAL_ID_COMPETITION_TERMINAL=11 TUTORIAL_ID_COMPETITION_TERMINAL value + * @property {number} TUTORIAL_ID_COMPETITION_NOTICE=12 TUTORIAL_ID_COMPETITION_NOTICE value + * @property {number} TUTORIAL_ID_COMPETITION_FINISHED=13 TUTORIAL_ID_COMPETITION_FINISHED value + * @property {number} TUTORIAL_ID_UNUSED_14=14 TUTORIAL_ID_UNUSED_14 value + * @property {number} TUTORIAL_ID_UNUSED_15=15 TUTORIAL_ID_UNUSED_15 value + * @property {number} TUTORIAL_ID_UNUSED_16=16 TUTORIAL_ID_UNUSED_16 value + * @property {number} TUTORIAL_ID_UNUSED_17=17 TUTORIAL_ID_UNUSED_17 value + * @property {number} TUTORIAL_ID_UNUSED_18=18 TUTORIAL_ID_UNUSED_18 value + * @property {number} TUTORIAL_ID_UNUSED_19=19 TUTORIAL_ID_UNUSED_19 value + * @property {number} TUTORIAL_ID_GHOST_STAMP=20 TUTORIAL_ID_GHOST_STAMP value + * @property {number} TUTORIAL_ID_GHOST_STAMP_DECLINED=21 TUTORIAL_ID_GHOST_STAMP_DECLINED value + * @property {number} TUTORIAL_ID_GHOST_STAMP_FRIENDS=22 TUTORIAL_ID_GHOST_STAMP_FRIENDS value + * @property {number} TUTORIAL_ID_TERMINAL_SCRATCH=23 TUTORIAL_ID_TERMINAL_SCRATCH value + * @property {number} TUTORIAL_ID_TURN_SCRATCH_SHEET=24 TUTORIAL_ID_TURN_SCRATCH_SHEET value + * @property {number} TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN=25 TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN value + * @property {number} TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE=26 TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE value + * @property {number} TUTORIAL_ID_VS_CONTINUE_TICKET=27 TUTORIAL_ID_VS_CONTINUE_TICKET value + * @property {number} TUTORIAL_ID_UNUSED_28=28 TUTORIAL_ID_UNUSED_28 value + * @property {number} TUTORIAL_ID_UNUSED_29=29 TUTORIAL_ID_UNUSED_29 value + * @property {number} TUTORIAL_ID_UNUSED_30=30 TUTORIAL_ID_UNUSED_30 value + * @property {number} TUTORIAL_ID_DRESS_UP=31 TUTORIAL_ID_DRESS_UP value + * @property {number} TUTORIAL_ID_MULTI_GHOST=32 TUTORIAL_ID_MULTI_GHOST value + * @property {number} TUTORIAL_ID_STORY_NEW_FEATURE=33 TUTORIAL_ID_STORY_NEW_FEATURE value + * @property {number} TUTORIAL_ID_GHOST_NEW_FEATURE=34 TUTORIAL_ID_GHOST_NEW_FEATURE value + * @property {number} TUTORIAL_ID_GHOST_REGION_MAP=35 TUTORIAL_ID_GHOST_REGION_MAP value + */ + protobuf.TutorialType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TUTORIAL_ID_STORY"] = 0; + values[valuesById[1] = "TUTORIAL_ID_TIME_ATTACK"] = 1; + values[valuesById[2] = "TUTORIAL_ID_GHOST"] = 2; + values[valuesById[3] = "TUTORIAL_ID_GHOST_CHALLENGE"] = 3; + values[valuesById[4] = "TUTORIAL_ID_GHOST_LEVEL"] = 4; + values[valuesById[5] = "TUTORIAL_ID_UNUSED_5"] = 5; + values[valuesById[6] = "TUTORIAL_ID_GHOST_SEARCH"] = 6; + values[valuesById[7] = "TUTORIAL_ID_GHOST_COMPETITION"] = 7; + values[valuesById[8] = "TUTORIAL_ID_HP600_CARD"] = 8; + values[valuesById[9] = "TUTORIAL_ID_UNUSED_9"] = 9; + values[valuesById[10] = "TUTORIAL_ID_COMPETITION_QUALIFIED"] = 10; + values[valuesById[11] = "TUTORIAL_ID_COMPETITION_TERMINAL"] = 11; + values[valuesById[12] = "TUTORIAL_ID_COMPETITION_NOTICE"] = 12; + values[valuesById[13] = "TUTORIAL_ID_COMPETITION_FINISHED"] = 13; + values[valuesById[14] = "TUTORIAL_ID_UNUSED_14"] = 14; + values[valuesById[15] = "TUTORIAL_ID_UNUSED_15"] = 15; + values[valuesById[16] = "TUTORIAL_ID_UNUSED_16"] = 16; + values[valuesById[17] = "TUTORIAL_ID_UNUSED_17"] = 17; + values[valuesById[18] = "TUTORIAL_ID_UNUSED_18"] = 18; + values[valuesById[19] = "TUTORIAL_ID_UNUSED_19"] = 19; + values[valuesById[20] = "TUTORIAL_ID_GHOST_STAMP"] = 20; + values[valuesById[21] = "TUTORIAL_ID_GHOST_STAMP_DECLINED"] = 21; + values[valuesById[22] = "TUTORIAL_ID_GHOST_STAMP_FRIENDS"] = 22; + values[valuesById[23] = "TUTORIAL_ID_TERMINAL_SCRATCH"] = 23; + values[valuesById[24] = "TUTORIAL_ID_TURN_SCRATCH_SHEET"] = 24; + values[valuesById[25] = "TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN"] = 25; + values[valuesById[26] = "TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE"] = 26; + values[valuesById[27] = "TUTORIAL_ID_VS_CONTINUE_TICKET"] = 27; + values[valuesById[28] = "TUTORIAL_ID_UNUSED_28"] = 28; + values[valuesById[29] = "TUTORIAL_ID_UNUSED_29"] = 29; + values[valuesById[30] = "TUTORIAL_ID_UNUSED_30"] = 30; + values[valuesById[31] = "TUTORIAL_ID_DRESS_UP"] = 31; + values[valuesById[32] = "TUTORIAL_ID_MULTI_GHOST"] = 32; + values[valuesById[33] = "TUTORIAL_ID_STORY_NEW_FEATURE"] = 33; + values[valuesById[34] = "TUTORIAL_ID_GHOST_NEW_FEATURE"] = 34; + values[valuesById[35] = "TUTORIAL_ID_GHOST_REGION_MAP"] = 35; + return values; + })(); + + /** + * GameMode enum. + * @name wm.protobuf.GameMode + * @enum {number} + * @property {number} MODE_STORY=1 MODE_STORY value + * @property {number} MODE_TIME_ATTACK=2 MODE_TIME_ATTACK value + * @property {number} MODE_VS_BATTLE=3 MODE_VS_BATTLE value + * @property {number} MODE_GHOST_BATTLE=4 MODE_GHOST_BATTLE value + * @property {number} MODE_EVENT=5 MODE_EVENT value + */ + protobuf.GameMode = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "MODE_STORY"] = 1; + values[valuesById[2] = "MODE_TIME_ATTACK"] = 2; + values[valuesById[3] = "MODE_VS_BATTLE"] = 3; + values[valuesById[4] = "MODE_GHOST_BATTLE"] = 4; + values[valuesById[5] = "MODE_EVENT"] = 5; + return values; + })(); + + /** + * GhostType enum. + * @name wm.protobuf.GhostType + * @enum {number} + * @property {number} GHOST_NORMAL=1 GHOST_NORMAL value + * @property {number} GHOST_PINCH_RUNNER=2 GHOST_PINCH_RUNNER value + * @property {number} GHOST_DEFAULT=3 GHOST_DEFAULT value + */ + protobuf.GhostType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "GHOST_NORMAL"] = 1; + values[valuesById[2] = "GHOST_PINCH_RUNNER"] = 2; + values[valuesById[3] = "GHOST_DEFAULT"] = 3; + return values; + })(); + + /** + * GhostSelectionMethod enum. + * @name wm.protobuf.GhostSelectionMethod + * @enum {number} + * @property {number} GHOST_SEARCH_BY_REGION=1 GHOST_SEARCH_BY_REGION value + * @property {number} GHOST_SELECT_BY_LEVEL=2 GHOST_SELECT_BY_LEVEL value + * @property {number} GHOST_SELECT_CROWN_MATCH=3 GHOST_SELECT_CROWN_MATCH value + * @property {number} GHOST_SELECT_STAMP_MATCH=4 GHOST_SELECT_STAMP_MATCH value + * @property {number} GHOST_SELECT_FROM_HISTORY=5 GHOST_SELECT_FROM_HISTORY value + * @property {number} GHOST_SEARCH_BY_SHOP=6 GHOST_SEARCH_BY_SHOP value + * @property {number} GHOST_SEARCH_BY_NAME=7 GHOST_SEARCH_BY_NAME value + * @property {number} GHOST_ACCEPT_CHALLENGER=8 GHOST_ACCEPT_CHALLENGER value + * @property {number} GHOST_APPOINTMENT=9 GHOST_APPOINTMENT value + * @property {number} GHOST_DEFAULT_OPPONENT=10 GHOST_DEFAULT_OPPONENT value + * @property {number} GHOST_COMPETITION=11 GHOST_COMPETITION value + * @property {number} GHOST_SELECT_FROM_BOOKMARKS=12 GHOST_SELECT_FROM_BOOKMARKS value + */ + protobuf.GhostSelectionMethod = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "GHOST_SEARCH_BY_REGION"] = 1; + values[valuesById[2] = "GHOST_SELECT_BY_LEVEL"] = 2; + values[valuesById[3] = "GHOST_SELECT_CROWN_MATCH"] = 3; + values[valuesById[4] = "GHOST_SELECT_STAMP_MATCH"] = 4; + values[valuesById[5] = "GHOST_SELECT_FROM_HISTORY"] = 5; + values[valuesById[6] = "GHOST_SEARCH_BY_SHOP"] = 6; + values[valuesById[7] = "GHOST_SEARCH_BY_NAME"] = 7; + values[valuesById[8] = "GHOST_ACCEPT_CHALLENGER"] = 8; + values[valuesById[9] = "GHOST_APPOINTMENT"] = 9; + values[valuesById[10] = "GHOST_DEFAULT_OPPONENT"] = 10; + values[valuesById[11] = "GHOST_COMPETITION"] = 11; + values[valuesById[12] = "GHOST_SELECT_FROM_BOOKMARKS"] = 12; + return values; + })(); + + /** + * GhostRateType enum. + * @name wm.protobuf.GhostRateType + * @enum {number} + * @property {number} GHOST_RATE_UNKNOWN=1 GHOST_RATE_UNKNOWN value + * @property {number} GHOST_RATE_INVALID=2 GHOST_RATE_INVALID value + * @property {number} GHOST_RATE_VALID=3 GHOST_RATE_VALID value + */ + protobuf.GhostRateType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "GHOST_RATE_UNKNOWN"] = 1; + values[valuesById[2] = "GHOST_RATE_INVALID"] = 2; + values[valuesById[3] = "GHOST_RATE_VALID"] = 3; + return values; + })(); + + /** + * PathSelectionMethod enum. + * @name wm.protobuf.PathSelectionMethod + * @enum {number} + * @property {number} PATH_NEW=1 PATH_NEW value + * @property {number} PATH_PLAIN=2 PATH_PLAIN value + * @property {number} PATH_FRIEND=3 PATH_FRIEND value + * @property {number} PATH_NORMAL=4 PATH_NORMAL value + * @property {number} PATH_CHALLENGER=5 PATH_CHALLENGER value + */ + protobuf.PathSelectionMethod = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "PATH_NEW"] = 1; + values[valuesById[2] = "PATH_PLAIN"] = 2; + values[valuesById[3] = "PATH_FRIEND"] = 3; + values[valuesById[4] = "PATH_NORMAL"] = 4; + values[valuesById[5] = "PATH_CHALLENGER"] = 5; + return values; + })(); + + /** + * NoticeEntry enum. + * @name wm.protobuf.NoticeEntry + * @enum {number} + * @property {number} NOTICE_UNUSED_1=1 NOTICE_UNUSED_1 value + * @property {number} NOTICE_UNUSED_2=2 NOTICE_UNUSED_2 value + * @property {number} NOTICE_UNUSED_3=3 NOTICE_UNUSED_3 value + * @property {number} NOTICE_UNUSED_4=4 NOTICE_UNUSED_4 value + * @property {number} NOTICE_UNUSED_5=5 NOTICE_UNUSED_5 value + * @property {number} NOTICE_UNUSED_6=6 NOTICE_UNUSED_6 value + * @property {number} NOTICE_UNUSED_7=7 NOTICE_UNUSED_7 value + * @property {number} NOTICE_UNUSED_8=8 NOTICE_UNUSED_8 value + * @property {number} NOTICE_UNUSED_9=9 NOTICE_UNUSED_9 value + * @property {number} NOTICE_UNUSED_10=10 NOTICE_UNUSED_10 value + * @property {number} NOTICE_UNUSED_11=11 NOTICE_UNUSED_11 value + * @property {number} NOTICE_UNUSED_12=12 NOTICE_UNUSED_12 value + */ + protobuf.NoticeEntry = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "NOTICE_UNUSED_1"] = 1; + values[valuesById[2] = "NOTICE_UNUSED_2"] = 2; + values[valuesById[3] = "NOTICE_UNUSED_3"] = 3; + values[valuesById[4] = "NOTICE_UNUSED_4"] = 4; + values[valuesById[5] = "NOTICE_UNUSED_5"] = 5; + values[valuesById[6] = "NOTICE_UNUSED_6"] = 6; + values[valuesById[7] = "NOTICE_UNUSED_7"] = 7; + values[valuesById[8] = "NOTICE_UNUSED_8"] = 8; + values[valuesById[9] = "NOTICE_UNUSED_9"] = 9; + values[valuesById[10] = "NOTICE_UNUSED_10"] = 10; + values[valuesById[11] = "NOTICE_UNUSED_11"] = 11; + values[valuesById[12] = "NOTICE_UNUSED_12"] = 12; + return values; + })(); + + /** + * FileType enum. + * @name wm.protobuf.FileType + * @enum {number} + * @property {number} FILE_PROMOTION_ANNOUNCEMENT=1 FILE_PROMOTION_ANNOUNCEMENT value + * @property {number} FILE_FEATURE_ANNOUNCEMENT=4 FILE_FEATURE_ANNOUNCEMENT value + * @property {number} FILE_SPAPP_ANNOUNCEMENT=6 FILE_SPAPP_ANNOUNCEMENT value + */ + protobuf.FileType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "FILE_PROMOTION_ANNOUNCEMENT"] = 1; + values[valuesById[4] = "FILE_FEATURE_ANNOUNCEMENT"] = 4; + values[valuesById[6] = "FILE_SPAPP_ANNOUNCEMENT"] = 6; + return values; + })(); + + /** + * GhostCompetitionParticipantState enum. + * @name wm.protobuf.GhostCompetitionParticipantState + * @enum {number} + * @property {number} COMPETITION_NOT_PARTICIPATED=1 COMPETITION_NOT_PARTICIPATED value + * @property {number} COMPETITION_QUALIFIED=2 COMPETITION_QUALIFIED value + * @property {number} COMPETITION_PARTICIPATED=3 COMPETITION_PARTICIPATED value + * @property {number} COMPETITION_WON=4 COMPETITION_WON value + */ + protobuf.GhostCompetitionParticipantState = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "COMPETITION_NOT_PARTICIPATED"] = 1; + values[valuesById[2] = "COMPETITION_QUALIFIED"] = 2; + values[valuesById[3] = "COMPETITION_PARTICIPATED"] = 3; + values[valuesById[4] = "COMPETITION_WON"] = 4; + return values; + })(); + + /** + * ScreenshotType enum. + * @name wm.protobuf.ScreenshotType + * @enum {number} + * @property {number} SS_GHOST_BATTLE=1 SS_GHOST_BATTLE value + * @property {number} SS_VERSUS_BATTLE=2 SS_VERSUS_BATTLE value + * @property {number} SS_TERMINAL=3 SS_TERMINAL value + * @property {number} SS_ACQUIRING_VERSUS_STAR=4 SS_ACQUIRING_VERSUS_STAR value + * @property {number} SS_ACQUIRING_AURA_MOTIF=5 SS_ACQUIRING_AURA_MOTIF value + * @property {number} SS_GHOST_REGION_MAP=6 SS_GHOST_REGION_MAP value + * @property {number} SS_ACQUIRING_CROWN=7 SS_ACQUIRING_CROWN value + * @property {number} SS_GHOST_COMPETITION_RESULT=8 SS_GHOST_COMPETITION_RESULT value + * @property {number} SS_TIME_ATTACK_RESULT=9 SS_TIME_ATTACK_RESULT value + * @property {number} SS_LEVEL_UP=10 SS_LEVEL_UP value + */ + protobuf.ScreenshotType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SS_GHOST_BATTLE"] = 1; + values[valuesById[2] = "SS_VERSUS_BATTLE"] = 2; + values[valuesById[3] = "SS_TERMINAL"] = 3; + values[valuesById[4] = "SS_ACQUIRING_VERSUS_STAR"] = 4; + values[valuesById[5] = "SS_ACQUIRING_AURA_MOTIF"] = 5; + values[valuesById[6] = "SS_GHOST_REGION_MAP"] = 6; + values[valuesById[7] = "SS_ACQUIRING_CROWN"] = 7; + values[valuesById[8] = "SS_GHOST_COMPETITION_RESULT"] = 8; + values[valuesById[9] = "SS_TIME_ATTACK_RESULT"] = 9; + values[valuesById[10] = "SS_LEVEL_UP"] = 10; + return values; + })(); + + /** + * TransferState enum. + * @name wm.protobuf.TransferState + * @enum {number} + * @property {number} NOT_REGISTERED=0 NOT_REGISTERED value + * @property {number} NEW_REGISTRATION=1 NEW_REGISTRATION value + * @property {number} TRANSFER_REQUIRED=2 TRANSFER_REQUIRED value + * @property {number} TRANSFERRING=3 TRANSFERRING value + * @property {number} TRANSFERRED=4 TRANSFERRED value + */ + protobuf.TransferState = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NOT_REGISTERED"] = 0; + values[valuesById[1] = "NEW_REGISTRATION"] = 1; + values[valuesById[2] = "TRANSFER_REQUIRED"] = 2; + values[valuesById[3] = "TRANSFERRING"] = 3; + values[valuesById[4] = "TRANSFERRED"] = 4; + return values; + })(); + + /** + * EventModeSerialErrorCode enum. + * @name wm.protobuf.EventModeSerialErrorCode + * @enum {number} + * @property {number} SERIAL_SUCCESS=0 SERIAL_SUCCESS value + * @property {number} SERIAL_ATTEMPT_TO_CHANGE=1 SERIAL_ATTEMPT_TO_CHANGE value + * @property {number} SERIAL_NO_INPUT=2 SERIAL_NO_INPUT value + * @property {number} SERIAL_INVALID=3 SERIAL_INVALID value + * @property {number} SERIAL_EXPIRED=4 SERIAL_EXPIRED value + * @property {number} SERIAL_OTHER_PLACE=5 SERIAL_OTHER_PLACE value + */ + protobuf.EventModeSerialErrorCode = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERIAL_SUCCESS"] = 0; + values[valuesById[1] = "SERIAL_ATTEMPT_TO_CHANGE"] = 1; + values[valuesById[2] = "SERIAL_NO_INPUT"] = 2; + values[valuesById[3] = "SERIAL_INVALID"] = 3; + values[valuesById[4] = "SERIAL_EXPIRED"] = 4; + values[valuesById[5] = "SERIAL_OTHER_PLACE"] = 5; + return values; + })(); + + /** + * ClientLogType enum. + * @name wm.protobuf.ClientLogType + * @enum {number} + * @property {number} LOG_LOAD_REPORT=0 LOG_LOAD_REPORT value + * @property {number} LOG_ERROR=1 LOG_ERROR value + */ + protobuf.ClientLogType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_LOAD_REPORT"] = 0; + values[valuesById[1] = "LOG_ERROR"] = 1; + return values; + })(); + + /** + * SmartphoneAppState enum. + * @name wm.protobuf.SmartphoneAppState + * @enum {number} + * @property {number} SPAPP_UNREGISTERED=0 SPAPP_UNREGISTERED value + * @property {number} SPAPP_KTID=1 SPAPP_KTID value + * @property {number} SPAPP_BNID=2 SPAPP_BNID value + */ + protobuf.SmartphoneAppState = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPAPP_UNREGISTERED"] = 0; + values[valuesById[1] = "SPAPP_KTID"] = 1; + values[valuesById[2] = "SPAPP_BNID"] = 2; + return values; + })(); + + return protobuf; + })(); + + return wm; +})(); + +export { $root as default }; diff --git a/src/wmmt/service.proto.d.ts b/src/wmmt/service.proto.d.ts new file mode 100644 index 0000000..2bb3c7e --- /dev/null +++ b/src/wmmt/service.proto.d.ts @@ -0,0 +1,20922 @@ +import * as $protobuf from "protobufjs"; +/** Namespace wm. */ +export namespace wm { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Represents a Rpc */ + class Rpc extends $protobuf.rpc.Service { + + /** + * Constructs a new Rpc service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Rpc service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Rpc; + + /** + * Calls register_system_info. + * @param request RegisterSystemInfoRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RegisterSystemInfoResponse + */ + public register_system_info(request: wm.protobuf.IRegisterSystemInfoRequest, callback: wm.protobuf.Rpc.register_system_infoCallback): void; + + /** + * Calls register_system_info. + * @param request RegisterSystemInfoRequest message or plain object + * @returns Promise + */ + public register_system_info(request: wm.protobuf.IRegisterSystemInfoRequest): Promise; + + /** + * Calls register_system_stats. + * @param request RegisterSystemStatsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RegisterSystemStatsResponse + */ + public register_system_stats(request: wm.protobuf.IRegisterSystemStatsRequest, callback: wm.protobuf.Rpc.register_system_statsCallback): void; + + /** + * Calls register_system_stats. + * @param request RegisterSystemStatsRequest message or plain object + * @returns Promise + */ + public register_system_stats(request: wm.protobuf.IRegisterSystemStatsRequest): Promise; + + /** + * Calls register_ghost_trail. + * @param request RegisterGhostTrailRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RegisterGhostTrailResponse + */ + public register_ghost_trail(request: wm.protobuf.IRegisterGhostTrailRequest, callback: wm.protobuf.Rpc.register_ghost_trailCallback): void; + + /** + * Calls register_ghost_trail. + * @param request RegisterGhostTrailRequest message or plain object + * @returns Promise + */ + public register_ghost_trail(request: wm.protobuf.IRegisterGhostTrailRequest): Promise; + + /** + * Calls load_user. + * @param request LoadUserRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadUserResponse + */ + public load_user(request: wm.protobuf.ILoadUserRequest, callback: wm.protobuf.Rpc.load_userCallback): void; + + /** + * Calls load_user. + * @param request LoadUserRequest message or plain object + * @returns Promise + */ + public load_user(request: wm.protobuf.ILoadUserRequest): Promise; + + /** + * Calls update_user_session. + * @param request UpdateUserSessionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UpdateUserSessionResponse + */ + public update_user_session(request: wm.protobuf.IUpdateUserSessionRequest, callback: wm.protobuf.Rpc.update_user_sessionCallback): void; + + /** + * Calls update_user_session. + * @param request UpdateUserSessionRequest message or plain object + * @returns Promise + */ + public update_user_session(request: wm.protobuf.IUpdateUserSessionRequest): Promise; + + /** + * Calls load_drive_information. + * @param request LoadDriveInformationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadDriveInformationResponse + */ + public load_drive_information(request: wm.protobuf.ILoadDriveInformationRequest, callback: wm.protobuf.Rpc.load_drive_informationCallback): void; + + /** + * Calls load_drive_information. + * @param request LoadDriveInformationRequest message or plain object + * @returns Promise + */ + public load_drive_information(request: wm.protobuf.ILoadDriveInformationRequest): Promise; + + /** + * Calls load_car. + * @param request LoadCarRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadCarResponse + */ + public load_car(request: wm.protobuf.ILoadCarRequest, callback: wm.protobuf.Rpc.load_carCallback): void; + + /** + * Calls load_car. + * @param request LoadCarRequest message or plain object + * @returns Promise + */ + public load_car(request: wm.protobuf.ILoadCarRequest): Promise; + + /** + * Calls create_car. + * @param request CreateCarRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CreateCarResponse + */ + public create_car(request: wm.protobuf.ICreateCarRequest, callback: wm.protobuf.Rpc.create_carCallback): void; + + /** + * Calls create_car. + * @param request CreateCarRequest message or plain object + * @returns Promise + */ + public create_car(request: wm.protobuf.ICreateCarRequest): Promise; + + /** + * Calls load_game_history. + * @param request LoadGameHistoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadGameHistoryResponse + */ + public load_game_history(request: wm.protobuf.ILoadGameHistoryRequest, callback: wm.protobuf.Rpc.load_game_historyCallback): void; + + /** + * Calls load_game_history. + * @param request LoadGameHistoryRequest message or plain object + * @returns Promise + */ + public load_game_history(request: wm.protobuf.ILoadGameHistoryRequest): Promise; + + /** + * Calls update_car. + * @param request UpdateCarRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UpdateCarResponse + */ + public update_car(request: wm.protobuf.IUpdateCarRequest, callback: wm.protobuf.Rpc.update_carCallback): void; + + /** + * Calls update_car. + * @param request UpdateCarRequest message or plain object + * @returns Promise + */ + public update_car(request: wm.protobuf.IUpdateCarRequest): Promise; + + /** + * Calls save_game_result. + * @param request SaveGameResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SaveGameResultResponse + */ + public save_game_result(request: wm.protobuf.ISaveGameResultRequest, callback: wm.protobuf.Rpc.save_game_resultCallback): void; + + /** + * Calls save_game_result. + * @param request SaveGameResultRequest message or plain object + * @returns Promise + */ + public save_game_result(request: wm.protobuf.ISaveGameResultRequest): Promise; + + /** + * Calls save_charge. + * @param request SaveChargeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SaveChargeResponse + */ + public save_charge(request: wm.protobuf.ISaveChargeRequest, callback: wm.protobuf.Rpc.save_chargeCallback): void; + + /** + * Calls save_charge. + * @param request SaveChargeRequest message or plain object + * @returns Promise + */ + public save_charge(request: wm.protobuf.ISaveChargeRequest): Promise; + + /** + * Calls load_ghost_battle_info. + * @param request LoadGhostBattleInfoRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadGhostBattleInfoResponse + */ + public load_ghost_battle_info(request: wm.protobuf.ILoadGhostBattleInfoRequest, callback: wm.protobuf.Rpc.load_ghost_battle_infoCallback): void; + + /** + * Calls load_ghost_battle_info. + * @param request LoadGhostBattleInfoRequest message or plain object + * @returns Promise + */ + public load_ghost_battle_info(request: wm.protobuf.ILoadGhostBattleInfoRequest): Promise; + + /** + * Calls load_stamp_target. + * @param request LoadStampTargetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadStampTargetResponse + */ + public load_stamp_target(request: wm.protobuf.ILoadStampTargetRequest, callback: wm.protobuf.Rpc.load_stamp_targetCallback): void; + + /** + * Calls load_stamp_target. + * @param request LoadStampTargetRequest message or plain object + * @returns Promise + */ + public load_stamp_target(request: wm.protobuf.ILoadStampTargetRequest): Promise; + + /** + * Calls lock_stamp_target. + * @param request LockStampTargetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LockStampTargetResponse + */ + public lock_stamp_target(request: wm.protobuf.ILockStampTargetRequest, callback: wm.protobuf.Rpc.lock_stamp_targetCallback): void; + + /** + * Calls lock_stamp_target. + * @param request LockStampTargetRequest message or plain object + * @returns Promise + */ + public lock_stamp_target(request: wm.protobuf.ILockStampTargetRequest): Promise; + + /** + * Calls load_ghost_competition_info. + * @param request LoadGhostCompetitionInfoRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadGhostCompetitionInfoResponse + */ + public load_ghost_competition_info(request: wm.protobuf.ILoadGhostCompetitionInfoRequest, callback: wm.protobuf.Rpc.load_ghost_competition_infoCallback): void; + + /** + * Calls load_ghost_competition_info. + * @param request LoadGhostCompetitionInfoRequest message or plain object + * @returns Promise + */ + public load_ghost_competition_info(request: wm.protobuf.ILoadGhostCompetitionInfoRequest): Promise; + + /** + * Calls load_time_attack_record. + * @param request LoadTimeAttackRecordRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadTimeAttackRecordResponse + */ + public load_time_attack_record(request: wm.protobuf.ILoadTimeAttackRecordRequest, callback: wm.protobuf.Rpc.load_time_attack_recordCallback): void; + + /** + * Calls load_time_attack_record. + * @param request LoadTimeAttackRecordRequest message or plain object + * @returns Promise + */ + public load_time_attack_record(request: wm.protobuf.ILoadTimeAttackRecordRequest): Promise; + + /** + * Calls save_terminal_result. + * @param request SaveTerminalResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SaveTerminalResultResponse + */ + public save_terminal_result(request: wm.protobuf.ISaveTerminalResultRequest, callback: wm.protobuf.Rpc.save_terminal_resultCallback): void; + + /** + * Calls save_terminal_result. + * @param request SaveTerminalResultRequest message or plain object + * @returns Promise + */ + public save_terminal_result(request: wm.protobuf.ISaveTerminalResultRequest): Promise; + + /** + * Calls ping. + * @param request PingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PingResponse + */ + public ping(request: wm.protobuf.IPingRequest, callback: wm.protobuf.Rpc.pingCallback): void; + + /** + * Calls ping. + * @param request PingRequest message or plain object + * @returns Promise + */ + public ping(request: wm.protobuf.IPingRequest): Promise; + + /** + * Calls load_terminal_information. + * @param request LoadTerminalInformationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadTerminalInformationResponse + */ + public load_terminal_information(request: wm.protobuf.ILoadTerminalInformationRequest, callback: wm.protobuf.Rpc.load_terminal_informationCallback): void; + + /** + * Calls load_terminal_information. + * @param request LoadTerminalInformationRequest message or plain object + * @returns Promise + */ + public load_terminal_information(request: wm.protobuf.ILoadTerminalInformationRequest): Promise; + + /** + * Calls create_user. + * @param request CreateUserRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CreateUserResponse + */ + public create_user(request: wm.protobuf.ICreateUserRequest, callback: wm.protobuf.Rpc.create_userCallback): void; + + /** + * Calls create_user. + * @param request CreateUserRequest message or plain object + * @returns Promise + */ + public create_user(request: wm.protobuf.ICreateUserRequest): Promise; + + /** + * Calls ask_access_code. + * @param request AskAccessCodeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AskAccessCodeResponse + */ + public ask_access_code(request: wm.protobuf.IAskAccessCodeRequest, callback: wm.protobuf.Rpc.ask_access_codeCallback): void; + + /** + * Calls ask_access_code. + * @param request AskAccessCodeRequest message or plain object + * @returns Promise + */ + public ask_access_code(request: wm.protobuf.IAskAccessCodeRequest): Promise; + + /** + * Calls register_opponent_ghost. + * @param request RegisterOpponentGhostRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RegisterOpponentGhostResponse + */ + public register_opponent_ghost(request: wm.protobuf.IRegisterOpponentGhostRequest, callback: wm.protobuf.Rpc.register_opponent_ghostCallback): void; + + /** + * Calls register_opponent_ghost. + * @param request RegisterOpponentGhostRequest message or plain object + * @returns Promise + */ + public register_opponent_ghost(request: wm.protobuf.IRegisterOpponentGhostRequest): Promise; + + /** + * Calls load_bookmarks. + * @param request LoadBookmarksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadBookmarksResponse + */ + public load_bookmarks(request: wm.protobuf.ILoadBookmarksRequest, callback: wm.protobuf.Rpc.load_bookmarksCallback): void; + + /** + * Calls load_bookmarks. + * @param request LoadBookmarksRequest message or plain object + * @returns Promise + */ + public load_bookmarks(request: wm.protobuf.ILoadBookmarksRequest): Promise; + + /** + * Calls save_bookmarks. + * @param request SaveBookmarksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SaveBookmarksResponse + */ + public save_bookmarks(request: wm.protobuf.ISaveBookmarksRequest, callback: wm.protobuf.Rpc.save_bookmarksCallback): void; + + /** + * Calls save_bookmarks. + * @param request SaveBookmarksRequest message or plain object + * @returns Promise + */ + public save_bookmarks(request: wm.protobuf.ISaveBookmarksRequest): Promise; + + /** + * Calls grant_car_right. + * @param request GrantCarRightRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GrantCarRightResponse + */ + public grant_car_right(request: wm.protobuf.IGrantCarRightRequest, callback: wm.protobuf.Rpc.grant_car_rightCallback): void; + + /** + * Calls grant_car_right. + * @param request GrantCarRightRequest message or plain object + * @returns Promise + */ + public grant_car_right(request: wm.protobuf.IGrantCarRightRequest): Promise; + + /** + * Calls load_ghost_competition_ranking. + * @param request LoadGhostCompetitionRankingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadGhostCompetitionRankingResponse + */ + public load_ghost_competition_ranking(request: wm.protobuf.ILoadGhostCompetitionRankingRequest, callback: wm.protobuf.Rpc.load_ghost_competition_rankingCallback): void; + + /** + * Calls load_ghost_competition_ranking. + * @param request LoadGhostCompetitionRankingRequest message or plain object + * @returns Promise + */ + public load_ghost_competition_ranking(request: wm.protobuf.ILoadGhostCompetitionRankingRequest): Promise; + + /** + * Calls load_unreceived_user_items. + * @param request LoadUnreceivedUserItemsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadUnreceivedUserItemsResponse + */ + public load_unreceived_user_items(request: wm.protobuf.ILoadUnreceivedUserItemsRequest, callback: wm.protobuf.Rpc.load_unreceived_user_itemsCallback): void; + + /** + * Calls load_unreceived_user_items. + * @param request LoadUnreceivedUserItemsRequest message or plain object + * @returns Promise + */ + public load_unreceived_user_items(request: wm.protobuf.ILoadUnreceivedUserItemsRequest): Promise; + + /** + * Calls start_transfer. + * @param request StartTransferRequest message or plain object + * @param callback Node-style callback called with the error, if any, and StartTransferResponse + */ + public start_transfer(request: wm.protobuf.IStartTransferRequest, callback: wm.protobuf.Rpc.start_transferCallback): void; + + /** + * Calls start_transfer. + * @param request StartTransferRequest message or plain object + * @returns Promise + */ + public start_transfer(request: wm.protobuf.IStartTransferRequest): Promise; + + /** + * Calls save_screenshot. + * @param request SaveScreenshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SaveScreenshotResponse + */ + public save_screenshot(request: wm.protobuf.ISaveScreenshotRequest, callback: wm.protobuf.Rpc.save_screenshotCallback): void; + + /** + * Calls save_screenshot. + * @param request SaveScreenshotRequest message or plain object + * @returns Promise + */ + public save_screenshot(request: wm.protobuf.ISaveScreenshotRequest): Promise; + + /** + * Calls load_scratch_information. + * @param request LoadScratchInformationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadScratchInformationResponse + */ + public load_scratch_information(request: wm.protobuf.ILoadScratchInformationRequest, callback: wm.protobuf.Rpc.load_scratch_informationCallback): void; + + /** + * Calls load_scratch_information. + * @param request LoadScratchInformationRequest message or plain object + * @returns Promise + */ + public load_scratch_information(request: wm.protobuf.ILoadScratchInformationRequest): Promise; + + /** + * Calls save_scratch_sheet. + * @param request SaveScratchSheetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SaveScratchSheetResponse + */ + public save_scratch_sheet(request: wm.protobuf.ISaveScratchSheetRequest, callback: wm.protobuf.Rpc.save_scratch_sheetCallback): void; + + /** + * Calls save_scratch_sheet. + * @param request SaveScratchSheetRequest message or plain object + * @returns Promise + */ + public save_scratch_sheet(request: wm.protobuf.ISaveScratchSheetRequest): Promise; + + /** + * Calls turn_scratch_sheet. + * @param request TurnScratchSheetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TurnScratchSheetResponse + */ + public turn_scratch_sheet(request: wm.protobuf.ITurnScratchSheetRequest, callback: wm.protobuf.Rpc.turn_scratch_sheetCallback): void; + + /** + * Calls turn_scratch_sheet. + * @param request TurnScratchSheetRequest message or plain object + * @returns Promise + */ + public turn_scratch_sheet(request: wm.protobuf.ITurnScratchSheetRequest): Promise; + + /** + * Calls check_item_receivable_cars. + * @param request CheckItemReceivableCarsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CheckItemReceivableCarsResponse + */ + public check_item_receivable_cars(request: wm.protobuf.ICheckItemReceivableCarsRequest, callback: wm.protobuf.Rpc.check_item_receivable_carsCallback): void; + + /** + * Calls check_item_receivable_cars. + * @param request CheckItemReceivableCarsRequest message or plain object + * @returns Promise + */ + public check_item_receivable_cars(request: wm.protobuf.ICheckItemReceivableCarsRequest): Promise; + + /** + * Calls receive_user_items. + * @param request ReceiveUserItemsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReceiveUserItemsResponse + */ + public receive_user_items(request: wm.protobuf.IReceiveUserItemsRequest, callback: wm.protobuf.Rpc.receive_user_itemsCallback): void; + + /** + * Calls receive_user_items. + * @param request ReceiveUserItemsRequest message or plain object + * @returns Promise + */ + public receive_user_items(request: wm.protobuf.IReceiveUserItemsRequest): Promise; + + /** + * Calls update_event_mode_serial. + * @param request UpdateEventModeSerialRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UpdateEventModeSerialResponse + */ + public update_event_mode_serial(request: wm.protobuf.IUpdateEventModeSerialRequest, callback: wm.protobuf.Rpc.update_event_mode_serialCallback): void; + + /** + * Calls update_event_mode_serial. + * @param request UpdateEventModeSerialRequest message or plain object + * @returns Promise + */ + public update_event_mode_serial(request: wm.protobuf.IUpdateEventModeSerialRequest): Promise; + + /** + * Calls consume_user_item. + * @param request ConsumeUserItemRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConsumeUserItemResponse + */ + public consume_user_item(request: wm.protobuf.IConsumeUserItemRequest, callback: wm.protobuf.Rpc.consume_user_itemCallback): void; + + /** + * Calls consume_user_item. + * @param request ConsumeUserItemRequest message or plain object + * @returns Promise + */ + public consume_user_item(request: wm.protobuf.IConsumeUserItemRequest): Promise; + + /** + * Calls search_cars_by_level. + * @param request SearchCarsByLevelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchCarsByLevelResponse + */ + public search_cars_by_level(request: wm.protobuf.ISearchCarsByLevelRequest, callback: wm.protobuf.Rpc.search_cars_by_levelCallback): void; + + /** + * Calls search_cars_by_level. + * @param request SearchCarsByLevelRequest message or plain object + * @returns Promise + */ + public search_cars_by_level(request: wm.protobuf.ISearchCarsByLevelRequest): Promise; + + /** + * Calls load_paths_and_tunings. + * @param request LoadPathsAndTuningsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadPathsAndTuningsResponse + */ + public load_paths_and_tunings(request: wm.protobuf.ILoadPathsAndTuningsRequest, callback: wm.protobuf.Rpc.load_paths_and_tuningsCallback): void; + + /** + * Calls load_paths_and_tunings. + * @param request LoadPathsAndTuningsRequest message or plain object + * @returns Promise + */ + public load_paths_and_tunings(request: wm.protobuf.ILoadPathsAndTuningsRequest): Promise; + + /** + * Calls load_ghost_drive_data. + * @param request LoadGhostDriveDataRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LoadGhostDriveDataResponse + */ + public load_ghost_drive_data(request: wm.protobuf.ILoadGhostDriveDataRequest, callback: wm.protobuf.Rpc.load_ghost_drive_dataCallback): void; + + /** + * Calls load_ghost_drive_data. + * @param request LoadGhostDriveDataRequest message or plain object + * @returns Promise + */ + public load_ghost_drive_data(request: wm.protobuf.ILoadGhostDriveDataRequest): Promise; + + /** + * Calls participate_in_invite_friend_campaign. + * @param request ParticipateInInviteFriendCampaignRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ParticipateInInviteFriendCampaignResponse + */ + public participate_in_invite_friend_campaign(request: wm.protobuf.IParticipateInInviteFriendCampaignRequest, callback: wm.protobuf.Rpc.participate_in_invite_friend_campaignCallback): void; + + /** + * Calls participate_in_invite_friend_campaign. + * @param request ParticipateInInviteFriendCampaignRequest message or plain object + * @returns Promise + */ + public participate_in_invite_friend_campaign(request: wm.protobuf.IParticipateInInviteFriendCampaignRequest): Promise; + + /** + * Calls lock_crown. + * @param request LockCrownRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LockCrownResponse + */ + public lock_crown(request: wm.protobuf.ILockCrownRequest, callback: wm.protobuf.Rpc.lock_crownCallback): void; + + /** + * Calls lock_crown. + * @param request LockCrownRequest message or plain object + * @returns Promise + */ + public lock_crown(request: wm.protobuf.ILockCrownRequest): Promise; + + /** + * Calls submit_client_log. + * @param request SubmitClientLogRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SubmitClientLogResponse + */ + public submit_client_log(request: wm.protobuf.ISubmitClientLogRequest, callback: wm.protobuf.Rpc.submit_client_logCallback): void; + + /** + * Calls submit_client_log. + * @param request SubmitClientLogRequest message or plain object + * @returns Promise + */ + public submit_client_log(request: wm.protobuf.ISubmitClientLogRequest): Promise; + } + + namespace Rpc { + + /** + * Callback as used by {@link wm.protobuf.Rpc#register_system_info}. + * @param error Error, if any + * @param [response] RegisterSystemInfoResponse + */ + type register_system_infoCallback = (error: (Error|null), response?: wm.protobuf.RegisterSystemInfoResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#register_system_stats}. + * @param error Error, if any + * @param [response] RegisterSystemStatsResponse + */ + type register_system_statsCallback = (error: (Error|null), response?: wm.protobuf.RegisterSystemStatsResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#register_ghost_trail}. + * @param error Error, if any + * @param [response] RegisterGhostTrailResponse + */ + type register_ghost_trailCallback = (error: (Error|null), response?: wm.protobuf.RegisterGhostTrailResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_user}. + * @param error Error, if any + * @param [response] LoadUserResponse + */ + type load_userCallback = (error: (Error|null), response?: wm.protobuf.LoadUserResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#update_user_session}. + * @param error Error, if any + * @param [response] UpdateUserSessionResponse + */ + type update_user_sessionCallback = (error: (Error|null), response?: wm.protobuf.UpdateUserSessionResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_drive_information}. + * @param error Error, if any + * @param [response] LoadDriveInformationResponse + */ + type load_drive_informationCallback = (error: (Error|null), response?: wm.protobuf.LoadDriveInformationResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_car}. + * @param error Error, if any + * @param [response] LoadCarResponse + */ + type load_carCallback = (error: (Error|null), response?: wm.protobuf.LoadCarResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#create_car}. + * @param error Error, if any + * @param [response] CreateCarResponse + */ + type create_carCallback = (error: (Error|null), response?: wm.protobuf.CreateCarResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_game_history}. + * @param error Error, if any + * @param [response] LoadGameHistoryResponse + */ + type load_game_historyCallback = (error: (Error|null), response?: wm.protobuf.LoadGameHistoryResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#update_car}. + * @param error Error, if any + * @param [response] UpdateCarResponse + */ + type update_carCallback = (error: (Error|null), response?: wm.protobuf.UpdateCarResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#save_game_result}. + * @param error Error, if any + * @param [response] SaveGameResultResponse + */ + type save_game_resultCallback = (error: (Error|null), response?: wm.protobuf.SaveGameResultResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#save_charge}. + * @param error Error, if any + * @param [response] SaveChargeResponse + */ + type save_chargeCallback = (error: (Error|null), response?: wm.protobuf.SaveChargeResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_ghost_battle_info}. + * @param error Error, if any + * @param [response] LoadGhostBattleInfoResponse + */ + type load_ghost_battle_infoCallback = (error: (Error|null), response?: wm.protobuf.LoadGhostBattleInfoResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_stamp_target}. + * @param error Error, if any + * @param [response] LoadStampTargetResponse + */ + type load_stamp_targetCallback = (error: (Error|null), response?: wm.protobuf.LoadStampTargetResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#lock_stamp_target}. + * @param error Error, if any + * @param [response] LockStampTargetResponse + */ + type lock_stamp_targetCallback = (error: (Error|null), response?: wm.protobuf.LockStampTargetResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_ghost_competition_info}. + * @param error Error, if any + * @param [response] LoadGhostCompetitionInfoResponse + */ + type load_ghost_competition_infoCallback = (error: (Error|null), response?: wm.protobuf.LoadGhostCompetitionInfoResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_time_attack_record}. + * @param error Error, if any + * @param [response] LoadTimeAttackRecordResponse + */ + type load_time_attack_recordCallback = (error: (Error|null), response?: wm.protobuf.LoadTimeAttackRecordResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#save_terminal_result}. + * @param error Error, if any + * @param [response] SaveTerminalResultResponse + */ + type save_terminal_resultCallback = (error: (Error|null), response?: wm.protobuf.SaveTerminalResultResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#ping}. + * @param error Error, if any + * @param [response] PingResponse + */ + type pingCallback = (error: (Error|null), response?: wm.protobuf.PingResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_terminal_information}. + * @param error Error, if any + * @param [response] LoadTerminalInformationResponse + */ + type load_terminal_informationCallback = (error: (Error|null), response?: wm.protobuf.LoadTerminalInformationResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#create_user}. + * @param error Error, if any + * @param [response] CreateUserResponse + */ + type create_userCallback = (error: (Error|null), response?: wm.protobuf.CreateUserResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#ask_access_code}. + * @param error Error, if any + * @param [response] AskAccessCodeResponse + */ + type ask_access_codeCallback = (error: (Error|null), response?: wm.protobuf.AskAccessCodeResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#register_opponent_ghost}. + * @param error Error, if any + * @param [response] RegisterOpponentGhostResponse + */ + type register_opponent_ghostCallback = (error: (Error|null), response?: wm.protobuf.RegisterOpponentGhostResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_bookmarks}. + * @param error Error, if any + * @param [response] LoadBookmarksResponse + */ + type load_bookmarksCallback = (error: (Error|null), response?: wm.protobuf.LoadBookmarksResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#save_bookmarks}. + * @param error Error, if any + * @param [response] SaveBookmarksResponse + */ + type save_bookmarksCallback = (error: (Error|null), response?: wm.protobuf.SaveBookmarksResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#grant_car_right}. + * @param error Error, if any + * @param [response] GrantCarRightResponse + */ + type grant_car_rightCallback = (error: (Error|null), response?: wm.protobuf.GrantCarRightResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_ghost_competition_ranking}. + * @param error Error, if any + * @param [response] LoadGhostCompetitionRankingResponse + */ + type load_ghost_competition_rankingCallback = (error: (Error|null), response?: wm.protobuf.LoadGhostCompetitionRankingResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_unreceived_user_items}. + * @param error Error, if any + * @param [response] LoadUnreceivedUserItemsResponse + */ + type load_unreceived_user_itemsCallback = (error: (Error|null), response?: wm.protobuf.LoadUnreceivedUserItemsResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#start_transfer}. + * @param error Error, if any + * @param [response] StartTransferResponse + */ + type start_transferCallback = (error: (Error|null), response?: wm.protobuf.StartTransferResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#save_screenshot}. + * @param error Error, if any + * @param [response] SaveScreenshotResponse + */ + type save_screenshotCallback = (error: (Error|null), response?: wm.protobuf.SaveScreenshotResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_scratch_information}. + * @param error Error, if any + * @param [response] LoadScratchInformationResponse + */ + type load_scratch_informationCallback = (error: (Error|null), response?: wm.protobuf.LoadScratchInformationResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#save_scratch_sheet}. + * @param error Error, if any + * @param [response] SaveScratchSheetResponse + */ + type save_scratch_sheetCallback = (error: (Error|null), response?: wm.protobuf.SaveScratchSheetResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#turn_scratch_sheet}. + * @param error Error, if any + * @param [response] TurnScratchSheetResponse + */ + type turn_scratch_sheetCallback = (error: (Error|null), response?: wm.protobuf.TurnScratchSheetResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#check_item_receivable_cars}. + * @param error Error, if any + * @param [response] CheckItemReceivableCarsResponse + */ + type check_item_receivable_carsCallback = (error: (Error|null), response?: wm.protobuf.CheckItemReceivableCarsResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#receive_user_items}. + * @param error Error, if any + * @param [response] ReceiveUserItemsResponse + */ + type receive_user_itemsCallback = (error: (Error|null), response?: wm.protobuf.ReceiveUserItemsResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#update_event_mode_serial}. + * @param error Error, if any + * @param [response] UpdateEventModeSerialResponse + */ + type update_event_mode_serialCallback = (error: (Error|null), response?: wm.protobuf.UpdateEventModeSerialResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#consume_user_item}. + * @param error Error, if any + * @param [response] ConsumeUserItemResponse + */ + type consume_user_itemCallback = (error: (Error|null), response?: wm.protobuf.ConsumeUserItemResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#search_cars_by_level}. + * @param error Error, if any + * @param [response] SearchCarsByLevelResponse + */ + type search_cars_by_levelCallback = (error: (Error|null), response?: wm.protobuf.SearchCarsByLevelResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_paths_and_tunings}. + * @param error Error, if any + * @param [response] LoadPathsAndTuningsResponse + */ + type load_paths_and_tuningsCallback = (error: (Error|null), response?: wm.protobuf.LoadPathsAndTuningsResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_ghost_drive_data}. + * @param error Error, if any + * @param [response] LoadGhostDriveDataResponse + */ + type load_ghost_drive_dataCallback = (error: (Error|null), response?: wm.protobuf.LoadGhostDriveDataResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#participate_in_invite_friend_campaign}. + * @param error Error, if any + * @param [response] ParticipateInInviteFriendCampaignResponse + */ + type participate_in_invite_friend_campaignCallback = (error: (Error|null), response?: wm.protobuf.ParticipateInInviteFriendCampaignResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#lock_crown}. + * @param error Error, if any + * @param [response] LockCrownResponse + */ + type lock_crownCallback = (error: (Error|null), response?: wm.protobuf.LockCrownResponse) => void; + + /** + * Callback as used by {@link wm.protobuf.Rpc#submit_client_log}. + * @param error Error, if any + * @param [response] SubmitClientLogResponse + */ + type submit_client_logCallback = (error: (Error|null), response?: wm.protobuf.SubmitClientLogResponse) => void; + } + + /** Represents a Resource */ + class Resource extends $protobuf.rpc.Service { + + /** + * Constructs a new Resource service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Resource service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Resource; + + /** + * Calls ghost_trail. + * @param request GhostTrailQuery message or plain object + * @param callback Node-style callback called with the error, if any, and GhostTrail + */ + public ghost_trail(request: wm.protobuf.IGhostTrailQuery, callback: wm.protobuf.Resource.ghost_trailCallback): void; + + /** + * Calls ghost_trail. + * @param request GhostTrailQuery message or plain object + * @returns Promise + */ + public ghost_trail(request: wm.protobuf.IGhostTrailQuery): Promise; + + /** + * Calls place_list. + * @param request PlaceListQuery message or plain object + * @param callback Node-style callback called with the error, if any, and PlaceList + */ + public place_list(request: wm.protobuf.IPlaceListQuery, callback: wm.protobuf.Resource.place_listCallback): void; + + /** + * Calls place_list. + * @param request PlaceListQuery message or plain object + * @returns Promise + */ + public place_list(request: wm.protobuf.IPlaceListQuery): Promise; + + /** + * Calls ghost_list. + * @param request GhostListQuery message or plain object + * @param callback Node-style callback called with the error, if any, and GhostList + */ + public ghost_list(request: wm.protobuf.IGhostListQuery, callback: wm.protobuf.Resource.ghost_listCallback): void; + + /** + * Calls ghost_list. + * @param request GhostListQuery message or plain object + * @returns Promise + */ + public ghost_list(request: wm.protobuf.IGhostListQuery): Promise; + + /** + * Calls car_summary. + * @param request CarSummaryQuery message or plain object + * @param callback Node-style callback called with the error, if any, and CarSummary + */ + public car_summary(request: wm.protobuf.ICarSummaryQuery, callback: wm.protobuf.Resource.car_summaryCallback): void; + + /** + * Calls car_summary. + * @param request CarSummaryQuery message or plain object + * @returns Promise + */ + public car_summary(request: wm.protobuf.ICarSummaryQuery): Promise; + + /** + * Calls file_list. + * @param request FileListQuery message or plain object + * @param callback Node-style callback called with the error, if any, and FileList + */ + public file_list(request: wm.protobuf.IFileListQuery, callback: wm.protobuf.Resource.file_listCallback): void; + + /** + * Calls file_list. + * @param request FileListQuery message or plain object + * @returns Promise + */ + public file_list(request: wm.protobuf.IFileListQuery): Promise; + + /** + * Calls ghost_competition_target. + * @param request GhostCompetitionTargetQuery message or plain object + * @param callback Node-style callback called with the error, if any, and GhostCompetitionTarget + */ + public ghost_competition_target(request: wm.protobuf.IGhostCompetitionTargetQuery, callback: wm.protobuf.Resource.ghost_competition_targetCallback): void; + + /** + * Calls ghost_competition_target. + * @param request GhostCompetitionTargetQuery message or plain object + * @returns Promise + */ + public ghost_competition_target(request: wm.protobuf.IGhostCompetitionTargetQuery): Promise; + + /** + * Calls crown_list. + * @param request CrownListQuery message or plain object + * @param callback Node-style callback called with the error, if any, and CrownList + */ + public crown_list(request: wm.protobuf.ICrownListQuery, callback: wm.protobuf.Resource.crown_listCallback): void; + + /** + * Calls crown_list. + * @param request CrownListQuery message or plain object + * @returns Promise + */ + public crown_list(request: wm.protobuf.ICrownListQuery): Promise; + + /** + * Calls ranking. + * @param request RankingQuery message or plain object + * @param callback Node-style callback called with the error, if any, and Ranking + */ + public ranking(request: wm.protobuf.IRankingQuery, callback: wm.protobuf.Resource.rankingCallback): void; + + /** + * Calls ranking. + * @param request RankingQuery message or plain object + * @returns Promise + */ + public ranking(request: wm.protobuf.IRankingQuery): Promise; + } + + namespace Resource { + + /** + * Callback as used by {@link wm.protobuf.Resource#ghost_trail}. + * @param error Error, if any + * @param [response] GhostTrail + */ + type ghost_trailCallback = (error: (Error|null), response?: wm.protobuf.GhostTrail) => void; + + /** + * Callback as used by {@link wm.protobuf.Resource#place_list}. + * @param error Error, if any + * @param [response] PlaceList + */ + type place_listCallback = (error: (Error|null), response?: wm.protobuf.PlaceList) => void; + + /** + * Callback as used by {@link wm.protobuf.Resource#ghost_list}. + * @param error Error, if any + * @param [response] GhostList + */ + type ghost_listCallback = (error: (Error|null), response?: wm.protobuf.GhostList) => void; + + /** + * Callback as used by {@link wm.protobuf.Resource#car_summary}. + * @param error Error, if any + * @param [response] CarSummary + */ + type car_summaryCallback = (error: (Error|null), response?: wm.protobuf.CarSummary) => void; + + /** + * Callback as used by {@link wm.protobuf.Resource#file_list}. + * @param error Error, if any + * @param [response] FileList + */ + type file_listCallback = (error: (Error|null), response?: wm.protobuf.FileList) => void; + + /** + * Callback as used by {@link wm.protobuf.Resource#ghost_competition_target}. + * @param error Error, if any + * @param [response] GhostCompetitionTarget + */ + type ghost_competition_targetCallback = (error: (Error|null), response?: wm.protobuf.GhostCompetitionTarget) => void; + + /** + * Callback as used by {@link wm.protobuf.Resource#crown_list}. + * @param error Error, if any + * @param [response] CrownList + */ + type crown_listCallback = (error: (Error|null), response?: wm.protobuf.CrownList) => void; + + /** + * Callback as used by {@link wm.protobuf.Resource#ranking}. + * @param error Error, if any + * @param [response] Ranking + */ + type rankingCallback = (error: (Error|null), response?: wm.protobuf.Ranking) => void; + } + + /** Properties of a PlaceListQuery. */ + interface IPlaceListQuery { + + /** PlaceListQuery regionId */ + regionId?: (number|null); + } + + /** Represents a PlaceListQuery. */ + class PlaceListQuery implements IPlaceListQuery { + + /** + * Constructs a new PlaceListQuery. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPlaceListQuery); + + /** PlaceListQuery regionId. */ + public regionId: number; + + /** + * Creates a new PlaceListQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns PlaceListQuery instance + */ + public static create(properties?: wm.protobuf.IPlaceListQuery): wm.protobuf.PlaceListQuery; + + /** + * Encodes the specified PlaceListQuery message. Does not implicitly {@link wm.protobuf.PlaceListQuery.verify|verify} messages. + * @param message PlaceListQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPlaceListQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlaceListQuery message, length delimited. Does not implicitly {@link wm.protobuf.PlaceListQuery.verify|verify} messages. + * @param message PlaceListQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPlaceListQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlaceListQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlaceListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PlaceListQuery; + + /** + * Decodes a PlaceListQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlaceListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PlaceListQuery; + + /** + * Verifies a PlaceListQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlaceListQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlaceListQuery + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PlaceListQuery; + + /** + * Creates a plain object from a PlaceListQuery message. Also converts values to other types if specified. + * @param message PlaceListQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PlaceListQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlaceListQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlaceListQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostListQuery. */ + interface IGhostListQuery { + + /** GhostListQuery carId */ + carId: number; + + /** GhostListQuery area */ + area?: (number|null); + } + + /** Represents a GhostListQuery. */ + class GhostListQuery implements IGhostListQuery { + + /** + * Constructs a new GhostListQuery. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostListQuery); + + /** GhostListQuery carId. */ + public carId: number; + + /** GhostListQuery area. */ + public area: number; + + /** + * Creates a new GhostListQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostListQuery instance + */ + public static create(properties?: wm.protobuf.IGhostListQuery): wm.protobuf.GhostListQuery; + + /** + * Encodes the specified GhostListQuery message. Does not implicitly {@link wm.protobuf.GhostListQuery.verify|verify} messages. + * @param message GhostListQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostListQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostListQuery message, length delimited. Does not implicitly {@link wm.protobuf.GhostListQuery.verify|verify} messages. + * @param message GhostListQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostListQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostListQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostListQuery; + + /** + * Decodes a GhostListQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostListQuery; + + /** + * Verifies a GhostListQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostListQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostListQuery + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostListQuery; + + /** + * Creates a plain object from a GhostListQuery message. Also converts values to other types if specified. + * @param message GhostListQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostListQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostListQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostListQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostTrailQuery. */ + interface IGhostTrailQuery { + + /** GhostTrailQuery carId */ + carId: number; + + /** GhostTrailQuery area */ + area?: (number|null); + + /** GhostTrailQuery trailId */ + trailId?: (number|Long|null); + } + + /** Represents a GhostTrailQuery. */ + class GhostTrailQuery implements IGhostTrailQuery { + + /** + * Constructs a new GhostTrailQuery. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostTrailQuery); + + /** GhostTrailQuery carId. */ + public carId: number; + + /** GhostTrailQuery area. */ + public area: number; + + /** GhostTrailQuery trailId. */ + public trailId: (number|Long); + + /** + * Creates a new GhostTrailQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostTrailQuery instance + */ + public static create(properties?: wm.protobuf.IGhostTrailQuery): wm.protobuf.GhostTrailQuery; + + /** + * Encodes the specified GhostTrailQuery message. Does not implicitly {@link wm.protobuf.GhostTrailQuery.verify|verify} messages. + * @param message GhostTrailQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostTrailQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostTrailQuery message, length delimited. Does not implicitly {@link wm.protobuf.GhostTrailQuery.verify|verify} messages. + * @param message GhostTrailQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostTrailQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostTrailQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostTrailQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostTrailQuery; + + /** + * Decodes a GhostTrailQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostTrailQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostTrailQuery; + + /** + * Verifies a GhostTrailQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostTrailQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostTrailQuery + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostTrailQuery; + + /** + * Creates a plain object from a GhostTrailQuery message. Also converts values to other types if specified. + * @param message GhostTrailQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostTrailQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostTrailQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostTrailQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarSummaryQuery. */ + interface ICarSummaryQuery { + + /** CarSummaryQuery regionId */ + regionId?: (number|null); + + /** CarSummaryQuery ghostLevel */ + ghostLevel?: (number|null); + + /** CarSummaryQuery manufacturer */ + manufacturer?: (number|null); + + /** CarSummaryQuery model */ + model?: (number|null); + + /** CarSummaryQuery name */ + name?: (string|null); + + /** CarSummaryQuery searchCode */ + searchCode?: (string|null); + + /** CarSummaryQuery lastPlayedPlaceId */ + lastPlayedPlaceId?: (string|null); + + /** CarSummaryQuery limit */ + limit?: (number|null); + } + + /** Represents a CarSummaryQuery. */ + class CarSummaryQuery implements ICarSummaryQuery { + + /** + * Constructs a new CarSummaryQuery. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarSummaryQuery); + + /** CarSummaryQuery regionId. */ + public regionId: number; + + /** CarSummaryQuery ghostLevel. */ + public ghostLevel: number; + + /** CarSummaryQuery manufacturer. */ + public manufacturer: number; + + /** CarSummaryQuery model. */ + public model: number; + + /** CarSummaryQuery name. */ + public name: string; + + /** CarSummaryQuery searchCode. */ + public searchCode: string; + + /** CarSummaryQuery lastPlayedPlaceId. */ + public lastPlayedPlaceId: string; + + /** CarSummaryQuery limit. */ + public limit: number; + + /** + * Creates a new CarSummaryQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns CarSummaryQuery instance + */ + public static create(properties?: wm.protobuf.ICarSummaryQuery): wm.protobuf.CarSummaryQuery; + + /** + * Encodes the specified CarSummaryQuery message. Does not implicitly {@link wm.protobuf.CarSummaryQuery.verify|verify} messages. + * @param message CarSummaryQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarSummaryQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarSummaryQuery message, length delimited. Does not implicitly {@link wm.protobuf.CarSummaryQuery.verify|verify} messages. + * @param message CarSummaryQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarSummaryQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarSummaryQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarSummaryQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarSummaryQuery; + + /** + * Decodes a CarSummaryQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarSummaryQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarSummaryQuery; + + /** + * Verifies a CarSummaryQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarSummaryQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarSummaryQuery + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarSummaryQuery; + + /** + * Creates a plain object from a CarSummaryQuery message. Also converts values to other types if specified. + * @param message CarSummaryQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarSummaryQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarSummaryQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarSummaryQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileListQuery. */ + interface IFileListQuery { + } + + /** Represents a FileListQuery. */ + class FileListQuery implements IFileListQuery { + + /** + * Constructs a new FileListQuery. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IFileListQuery); + + /** + * Creates a new FileListQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns FileListQuery instance + */ + public static create(properties?: wm.protobuf.IFileListQuery): wm.protobuf.FileListQuery; + + /** + * Encodes the specified FileListQuery message. Does not implicitly {@link wm.protobuf.FileListQuery.verify|verify} messages. + * @param message FileListQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IFileListQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileListQuery message, length delimited. Does not implicitly {@link wm.protobuf.FileListQuery.verify|verify} messages. + * @param message FileListQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IFileListQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileListQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.FileListQuery; + + /** + * Decodes a FileListQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.FileListQuery; + + /** + * Verifies a FileListQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileListQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileListQuery + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.FileListQuery; + + /** + * Creates a plain object from a FileListQuery message. Also converts values to other types if specified. + * @param message FileListQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.FileListQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileListQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileListQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCompetitionTargetQuery. */ + interface IGhostCompetitionTargetQuery { + + /** GhostCompetitionTargetQuery competitionId */ + competitionId: number; + + /** GhostCompetitionTargetQuery periodId */ + periodId?: (number|null); + } + + /** Represents a GhostCompetitionTargetQuery. */ + class GhostCompetitionTargetQuery implements IGhostCompetitionTargetQuery { + + /** + * Constructs a new GhostCompetitionTargetQuery. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCompetitionTargetQuery); + + /** GhostCompetitionTargetQuery competitionId. */ + public competitionId: number; + + /** GhostCompetitionTargetQuery periodId. */ + public periodId: number; + + /** + * Creates a new GhostCompetitionTargetQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionTargetQuery instance + */ + public static create(properties?: wm.protobuf.IGhostCompetitionTargetQuery): wm.protobuf.GhostCompetitionTargetQuery; + + /** + * Encodes the specified GhostCompetitionTargetQuery message. Does not implicitly {@link wm.protobuf.GhostCompetitionTargetQuery.verify|verify} messages. + * @param message GhostCompetitionTargetQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCompetitionTargetQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionTargetQuery message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionTargetQuery.verify|verify} messages. + * @param message GhostCompetitionTargetQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCompetitionTargetQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionTargetQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionTargetQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCompetitionTargetQuery; + + /** + * Decodes a GhostCompetitionTargetQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionTargetQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCompetitionTargetQuery; + + /** + * Verifies a GhostCompetitionTargetQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionTargetQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionTargetQuery + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCompetitionTargetQuery; + + /** + * Creates a plain object from a GhostCompetitionTargetQuery message. Also converts values to other types if specified. + * @param message GhostCompetitionTargetQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCompetitionTargetQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionTargetQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionTargetQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LockCrownRequest. */ + interface ILockCrownRequest { + + /** LockCrownRequest carId */ + carId?: (number|null); + + /** LockCrownRequest area */ + area?: (number|null); + + /** LockCrownRequest lockTime */ + lockTime: number; + } + + /** Represents a LockCrownRequest. */ + class LockCrownRequest implements ILockCrownRequest { + + /** + * Constructs a new LockCrownRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILockCrownRequest); + + /** LockCrownRequest carId. */ + public carId: number; + + /** LockCrownRequest area. */ + public area: number; + + /** LockCrownRequest lockTime. */ + public lockTime: number; + + /** + * Creates a new LockCrownRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LockCrownRequest instance + */ + public static create(properties?: wm.protobuf.ILockCrownRequest): wm.protobuf.LockCrownRequest; + + /** + * Encodes the specified LockCrownRequest message. Does not implicitly {@link wm.protobuf.LockCrownRequest.verify|verify} messages. + * @param message LockCrownRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILockCrownRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LockCrownRequest message, length delimited. Does not implicitly {@link wm.protobuf.LockCrownRequest.verify|verify} messages. + * @param message LockCrownRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILockCrownRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LockCrownRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LockCrownRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LockCrownRequest; + + /** + * Decodes a LockCrownRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LockCrownRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LockCrownRequest; + + /** + * Verifies a LockCrownRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LockCrownRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LockCrownRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LockCrownRequest; + + /** + * Creates a plain object from a LockCrownRequest message. Also converts values to other types if specified. + * @param message LockCrownRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LockCrownRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LockCrownRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LockCrownRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LockCrownResponse. */ + interface ILockCrownResponse { + + /** LockCrownResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a LockCrownResponse. */ + class LockCrownResponse implements ILockCrownResponse { + + /** + * Constructs a new LockCrownResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILockCrownResponse); + + /** LockCrownResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new LockCrownResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LockCrownResponse instance + */ + public static create(properties?: wm.protobuf.ILockCrownResponse): wm.protobuf.LockCrownResponse; + + /** + * Encodes the specified LockCrownResponse message. Does not implicitly {@link wm.protobuf.LockCrownResponse.verify|verify} messages. + * @param message LockCrownResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILockCrownResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LockCrownResponse message, length delimited. Does not implicitly {@link wm.protobuf.LockCrownResponse.verify|verify} messages. + * @param message LockCrownResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILockCrownResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LockCrownResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LockCrownResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LockCrownResponse; + + /** + * Decodes a LockCrownResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LockCrownResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LockCrownResponse; + + /** + * Verifies a LockCrownResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LockCrownResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LockCrownResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LockCrownResponse; + + /** + * Creates a plain object from a LockCrownResponse message. Also converts values to other types if specified. + * @param message LockCrownResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LockCrownResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LockCrownResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LockCrownResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Crown. */ + interface ICrown { + + /** Crown carId */ + carId: number; + + /** Crown area */ + area: number; + + /** Crown unlockAt */ + unlockAt?: (number|null); + + /** Crown car */ + car?: (wm.protobuf.ICar|null); + } + + /** Represents a Crown. */ + class Crown implements ICrown { + + /** + * Constructs a new Crown. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICrown); + + /** Crown carId. */ + public carId: number; + + /** Crown area. */ + public area: number; + + /** Crown unlockAt. */ + public unlockAt: number; + + /** Crown car. */ + public car?: (wm.protobuf.ICar|null); + + /** + * Creates a new Crown instance using the specified properties. + * @param [properties] Properties to set + * @returns Crown instance + */ + public static create(properties?: wm.protobuf.ICrown): wm.protobuf.Crown; + + /** + * Encodes the specified Crown message. Does not implicitly {@link wm.protobuf.Crown.verify|verify} messages. + * @param message Crown message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICrown, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Crown message, length delimited. Does not implicitly {@link wm.protobuf.Crown.verify|verify} messages. + * @param message Crown message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICrown, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Crown message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Crown + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Crown; + + /** + * Decodes a Crown message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Crown + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Crown; + + /** + * Verifies a Crown message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Crown message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Crown + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Crown; + + /** + * Creates a plain object from a Crown message. Also converts values to other types if specified. + * @param message Crown + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Crown, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Crown to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Crown + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CrownListQuery. */ + interface ICrownListQuery { + + /** CrownListQuery carId */ + carId?: (number|null); + + /** CrownListQuery area */ + area?: (number|null); + } + + /** Represents a CrownListQuery. */ + class CrownListQuery implements ICrownListQuery { + + /** + * Constructs a new CrownListQuery. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICrownListQuery); + + /** CrownListQuery carId. */ + public carId: number; + + /** CrownListQuery area. */ + public area: number; + + /** + * Creates a new CrownListQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns CrownListQuery instance + */ + public static create(properties?: wm.protobuf.ICrownListQuery): wm.protobuf.CrownListQuery; + + /** + * Encodes the specified CrownListQuery message. Does not implicitly {@link wm.protobuf.CrownListQuery.verify|verify} messages. + * @param message CrownListQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICrownListQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CrownListQuery message, length delimited. Does not implicitly {@link wm.protobuf.CrownListQuery.verify|verify} messages. + * @param message CrownListQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICrownListQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CrownListQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CrownListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CrownListQuery; + + /** + * Decodes a CrownListQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CrownListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CrownListQuery; + + /** + * Verifies a CrownListQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CrownListQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CrownListQuery + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CrownListQuery; + + /** + * Creates a plain object from a CrownListQuery message. Also converts values to other types if specified. + * @param message CrownListQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CrownListQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CrownListQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CrownListQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CrownList. */ + interface ICrownList { + + /** CrownList crowns */ + crowns?: (wm.protobuf.ICrown[]|null); + } + + /** Represents a CrownList. */ + class CrownList implements ICrownList { + + /** + * Constructs a new CrownList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICrownList); + + /** CrownList crowns. */ + public crowns: wm.protobuf.ICrown[]; + + /** + * Creates a new CrownList instance using the specified properties. + * @param [properties] Properties to set + * @returns CrownList instance + */ + public static create(properties?: wm.protobuf.ICrownList): wm.protobuf.CrownList; + + /** + * Encodes the specified CrownList message. Does not implicitly {@link wm.protobuf.CrownList.verify|verify} messages. + * @param message CrownList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICrownList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CrownList message, length delimited. Does not implicitly {@link wm.protobuf.CrownList.verify|verify} messages. + * @param message CrownList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICrownList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CrownList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CrownList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CrownList; + + /** + * Decodes a CrownList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CrownList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CrownList; + + /** + * Verifies a CrownList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CrownList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CrownList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CrownList; + + /** + * Creates a plain object from a CrownList message. Also converts values to other types if specified. + * @param message CrownList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CrownList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CrownList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CrownList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RankingQuery. */ + interface IRankingQuery { + + /** RankingQuery rankingType */ + rankingType?: (wm.protobuf.RankingType|null); + } + + /** Represents a RankingQuery. */ + class RankingQuery implements IRankingQuery { + + /** + * Constructs a new RankingQuery. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRankingQuery); + + /** RankingQuery rankingType. */ + public rankingType: wm.protobuf.RankingType; + + /** + * Creates a new RankingQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns RankingQuery instance + */ + public static create(properties?: wm.protobuf.IRankingQuery): wm.protobuf.RankingQuery; + + /** + * Encodes the specified RankingQuery message. Does not implicitly {@link wm.protobuf.RankingQuery.verify|verify} messages. + * @param message RankingQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRankingQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RankingQuery message, length delimited. Does not implicitly {@link wm.protobuf.RankingQuery.verify|verify} messages. + * @param message RankingQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRankingQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RankingQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RankingQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RankingQuery; + + /** + * Decodes a RankingQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RankingQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RankingQuery; + + /** + * Verifies a RankingQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RankingQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RankingQuery + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RankingQuery; + + /** + * Creates a plain object from a RankingQuery message. Also converts values to other types if specified. + * @param message RankingQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RankingQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RankingQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RankingQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Ranking. */ + interface IRanking { + + /** Ranking lists */ + lists?: (wm.protobuf.Ranking.IList[]|null); + } + + /** Represents a Ranking. */ + class Ranking implements IRanking { + + /** + * Constructs a new Ranking. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRanking); + + /** Ranking lists. */ + public lists: wm.protobuf.Ranking.IList[]; + + /** + * Creates a new Ranking instance using the specified properties. + * @param [properties] Properties to set + * @returns Ranking instance + */ + public static create(properties?: wm.protobuf.IRanking): wm.protobuf.Ranking; + + /** + * Encodes the specified Ranking message. Does not implicitly {@link wm.protobuf.Ranking.verify|verify} messages. + * @param message Ranking message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRanking, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Ranking message, length delimited. Does not implicitly {@link wm.protobuf.Ranking.verify|verify} messages. + * @param message Ranking message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRanking, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Ranking message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Ranking + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Ranking; + + /** + * Decodes a Ranking message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Ranking + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Ranking; + + /** + * Verifies a Ranking message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Ranking message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Ranking + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Ranking; + + /** + * Creates a plain object from a Ranking message. Also converts values to other types if specified. + * @param message Ranking + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Ranking, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Ranking to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Ranking + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Ranking { + + /** Properties of a List. */ + interface IList { + + /** List rankingType */ + rankingType: wm.protobuf.RankingType; + + /** List topRecords */ + topRecords?: (wm.protobuf.Ranking.IEntry[]|null); + } + + /** Represents a List. */ + class List implements IList { + + /** + * Constructs a new List. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.Ranking.IList); + + /** List rankingType. */ + public rankingType: wm.protobuf.RankingType; + + /** List topRecords. */ + public topRecords: wm.protobuf.Ranking.IEntry[]; + + /** + * Creates a new List instance using the specified properties. + * @param [properties] Properties to set + * @returns List instance + */ + public static create(properties?: wm.protobuf.Ranking.IList): wm.protobuf.Ranking.List; + + /** + * Encodes the specified List message. Does not implicitly {@link wm.protobuf.Ranking.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.Ranking.IList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified List message, length delimited. Does not implicitly {@link wm.protobuf.Ranking.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.Ranking.IList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a List message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns List + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Ranking.List; + + /** + * Decodes a List message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns List + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Ranking.List; + + /** + * Verifies a List message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a List message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns List + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Ranking.List; + + /** + * Creates a plain object from a List message. Also converts values to other types if specified. + * @param message List + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Ranking.List, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this List to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for List + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Entry. */ + interface IEntry { + + /** Entry rank */ + rank: number; + + /** Entry result */ + result: number; + + /** Entry carId */ + carId: number; + + /** Entry name */ + name: string; + + /** Entry regionId */ + regionId: number; + + /** Entry model */ + model: number; + + /** Entry visualModel */ + visualModel: number; + + /** Entry defaultColor */ + defaultColor: number; + + /** Entry tunePower */ + tunePower: number; + + /** Entry tuneHandling */ + tuneHandling: number; + + /** Entry title */ + title: string; + + /** Entry level */ + level: number; + } + + /** Represents an Entry. */ + class Entry implements IEntry { + + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.Ranking.IEntry); + + /** Entry rank. */ + public rank: number; + + /** Entry result. */ + public result: number; + + /** Entry carId. */ + public carId: number; + + /** Entry name. */ + public name: string; + + /** Entry regionId. */ + public regionId: number; + + /** Entry model. */ + public model: number; + + /** Entry visualModel. */ + public visualModel: number; + + /** Entry defaultColor. */ + public defaultColor: number; + + /** Entry tunePower. */ + public tunePower: number; + + /** Entry tuneHandling. */ + public tuneHandling: number; + + /** Entry title. */ + public title: string; + + /** Entry level. */ + public level: number; + + /** + * Creates a new Entry instance using the specified properties. + * @param [properties] Properties to set + * @returns Entry instance + */ + public static create(properties?: wm.protobuf.Ranking.IEntry): wm.protobuf.Ranking.Entry; + + /** + * Encodes the specified Entry message. Does not implicitly {@link wm.protobuf.Ranking.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.Ranking.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link wm.protobuf.Ranking.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.Ranking.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Ranking.Entry; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Ranking.Entry; + + /** + * Verifies an Entry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entry + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Ranking.Entry; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Ranking.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** RankingType enum. */ + enum RankingType { + RANKING_TA_C1IN = 0, + RANKING_TA_C1OUT = 1, + RANKING_TA_RINGLEFT = 2, + RANKING_TA_RINGRIGHT = 3, + RANKING_TA_SUBTOKYO_3_4 = 4, + RANKING_TA_SUBTOKYO_5 = 5, + RANKING_TA_WANGANEAST = 6, + RANKING_TA_WANGANWEST = 7, + RANKING_TA_K1_DOWN = 8, + RANKING_TA_K1_UP = 9, + RANKING_TA_YAESUIN = 10, + RANKING_TA_YAESUOUT = 11, + RANKING_TA_YOKOHAMAIN = 12, + RANKING_TA_YOKOHAMAOUT = 13, + RANKING_TA_NAGOYA = 14, + RANKING_TA_OSAKA = 15, + RANKING_TA_KOBE = 16, + RANKING_TA_FUKUOKA = 17, + RANKING_TA_HAKONEFOR = 18, + RANKING_TA_HAKONEBACK = 19, + RANKING_TA_TURNPIKE_UP = 20, + RANKING_TA_TURNPIKE_DOWN = 21, + RANKING_TA_TOKYOALL = 22, + RANKING_TA_KANAGAWAALL = 23, + RANKING_TA_HIROSHIMA = 24, + RANKING_VS_STAR = 100, + RANKING_GHOST_DEFEATED_COUNT = 101 + } + + /** Properties of a RegisterSystemInfoRequest. */ + interface IRegisterSystemInfoRequest { + + /** RegisterSystemInfoRequest pcbSerial */ + pcbSerial: string; + + /** RegisterSystemInfoRequest terminalType */ + terminalType: wm.protobuf.TerminalType; + + /** RegisterSystemInfoRequest romVersion */ + romVersion: number; + + /** RegisterSystemInfoRequest country */ + country: string; + + /** RegisterSystemInfoRequest lineType */ + lineType: wm.protobuf.LineType; + + /** RegisterSystemInfoRequest shopName */ + shopName: string; + + /** RegisterSystemInfoRequest shopNickname */ + shopNickname: string; + + /** RegisterSystemInfoRequest allnetPlaceId */ + allnetPlaceId?: (number|null); + + /** RegisterSystemInfoRequest allnetRegion0 */ + allnetRegion0?: (number|null); + + /** RegisterSystemInfoRequest muchaPlaceId */ + muchaPlaceId?: (string|null); + + /** RegisterSystemInfoRequest muchaPrefectureId */ + muchaPrefectureId?: (number|null); + + /** RegisterSystemInfoRequest regionName0 */ + regionName0: string; + + /** RegisterSystemInfoRequest regionName1 */ + regionName1: string; + + /** RegisterSystemInfoRequest regionName2 */ + regionName2: string; + + /** RegisterSystemInfoRequest regionName3 */ + regionName3: string; + + /** RegisterSystemInfoRequest timezoneOffset */ + timezoneOffset: number; + + /** RegisterSystemInfoRequest systemSetting */ + systemSetting: wm.protobuf.ISystemSetting; + + /** RegisterSystemInfoRequest errorLogs */ + errorLogs?: (wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry[]|null); + } + + /** Represents a RegisterSystemInfoRequest. */ + class RegisterSystemInfoRequest implements IRegisterSystemInfoRequest { + + /** + * Constructs a new RegisterSystemInfoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemInfoRequest); + + /** RegisterSystemInfoRequest pcbSerial. */ + public pcbSerial: string; + + /** RegisterSystemInfoRequest terminalType. */ + public terminalType: wm.protobuf.TerminalType; + + /** RegisterSystemInfoRequest romVersion. */ + public romVersion: number; + + /** RegisterSystemInfoRequest country. */ + public country: string; + + /** RegisterSystemInfoRequest lineType. */ + public lineType: wm.protobuf.LineType; + + /** RegisterSystemInfoRequest shopName. */ + public shopName: string; + + /** RegisterSystemInfoRequest shopNickname. */ + public shopNickname: string; + + /** RegisterSystemInfoRequest allnetPlaceId. */ + public allnetPlaceId: number; + + /** RegisterSystemInfoRequest allnetRegion0. */ + public allnetRegion0: number; + + /** RegisterSystemInfoRequest muchaPlaceId. */ + public muchaPlaceId: string; + + /** RegisterSystemInfoRequest muchaPrefectureId. */ + public muchaPrefectureId: number; + + /** RegisterSystemInfoRequest regionName0. */ + public regionName0: string; + + /** RegisterSystemInfoRequest regionName1. */ + public regionName1: string; + + /** RegisterSystemInfoRequest regionName2. */ + public regionName2: string; + + /** RegisterSystemInfoRequest regionName3. */ + public regionName3: string; + + /** RegisterSystemInfoRequest timezoneOffset. */ + public timezoneOffset: number; + + /** RegisterSystemInfoRequest systemSetting. */ + public systemSetting: wm.protobuf.ISystemSetting; + + /** RegisterSystemInfoRequest errorLogs. */ + public errorLogs: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry[]; + + /** + * Creates a new RegisterSystemInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemInfoRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemInfoRequest): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Encodes the specified RegisterSystemInfoRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @param message RegisterSystemInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @param message RegisterSystemInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Verifies a RegisterSystemInfoRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemInfoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemInfoRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Creates a plain object from a RegisterSystemInfoRequest message. Also converts values to other types if specified. + * @param message RegisterSystemInfoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemInfoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemInfoRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RegisterSystemInfoRequest { + + /** Properties of an ErrorLogEntry. */ + interface IErrorLogEntry { + + /** ErrorLogEntry datetime */ + datetime: number; + + /** ErrorLogEntry message */ + message: string; + } + + /** Represents an ErrorLogEntry. */ + class ErrorLogEntry implements IErrorLogEntry { + + /** + * Constructs a new ErrorLogEntry. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry); + + /** ErrorLogEntry datetime. */ + public datetime: number; + + /** ErrorLogEntry message. */ + public message: string; + + /** + * Creates a new ErrorLogEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorLogEntry instance + */ + public static create(properties?: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Encodes the specified ErrorLogEntry message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @param message ErrorLogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorLogEntry message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @param message ErrorLogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Verifies an ErrorLogEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ErrorLogEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorLogEntry + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Creates a plain object from an ErrorLogEntry message. Also converts values to other types if specified. + * @param message ErrorLogEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorLogEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorLogEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RegisterSystemInfoResponse. */ + interface IRegisterSystemInfoResponse { + + /** RegisterSystemInfoResponse error */ + error: wm.protobuf.ErrorCode; + + /** RegisterSystemInfoResponse regionId */ + regionId: number; + + /** RegisterSystemInfoResponse placeId */ + placeId: string; + + /** RegisterSystemInfoResponse allowedClientLogTypes */ + allowedClientLogTypes?: (wm.protobuf.ClientLogType[]|null); + + /** RegisterSystemInfoResponse featureVersion */ + featureVersion: wm.protobuf.IGameFeatureVersion; + + /** RegisterSystemInfoResponse latestCompetitionId */ + latestCompetitionId?: (number|null); + + /** RegisterSystemInfoResponse competitionSchedule */ + competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** RegisterSystemInfoResponse scratchNotes */ + scratchNotes?: (string|null); + + /** RegisterSystemInfoResponse inviteFriendCampaignSchedule */ + inviteFriendCampaignSchedule?: (wm.protobuf.IInviteFriendCampaignSchedule|null); + + /** RegisterSystemInfoResponse ghostSelectionMinRedoWait */ + ghostSelectionMinRedoWait: number; + + /** RegisterSystemInfoResponse ghostSelectionMaxRedoWait */ + ghostSelectionMaxRedoWait: number; + } + + /** Represents a RegisterSystemInfoResponse. */ + class RegisterSystemInfoResponse implements IRegisterSystemInfoResponse { + + /** + * Constructs a new RegisterSystemInfoResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemInfoResponse); + + /** RegisterSystemInfoResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** RegisterSystemInfoResponse regionId. */ + public regionId: number; + + /** RegisterSystemInfoResponse placeId. */ + public placeId: string; + + /** RegisterSystemInfoResponse allowedClientLogTypes. */ + public allowedClientLogTypes: wm.protobuf.ClientLogType[]; + + /** RegisterSystemInfoResponse featureVersion. */ + public featureVersion: wm.protobuf.IGameFeatureVersion; + + /** RegisterSystemInfoResponse latestCompetitionId. */ + public latestCompetitionId: number; + + /** RegisterSystemInfoResponse competitionSchedule. */ + public competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** RegisterSystemInfoResponse scratchNotes. */ + public scratchNotes: string; + + /** RegisterSystemInfoResponse inviteFriendCampaignSchedule. */ + public inviteFriendCampaignSchedule?: (wm.protobuf.IInviteFriendCampaignSchedule|null); + + /** RegisterSystemInfoResponse ghostSelectionMinRedoWait. */ + public ghostSelectionMinRedoWait: number; + + /** RegisterSystemInfoResponse ghostSelectionMaxRedoWait. */ + public ghostSelectionMaxRedoWait: number; + + /** + * Creates a new RegisterSystemInfoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemInfoResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemInfoResponse): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Encodes the specified RegisterSystemInfoResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @param message RegisterSystemInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @param message RegisterSystemInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Verifies a RegisterSystemInfoResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemInfoResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemInfoResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Creates a plain object from a RegisterSystemInfoResponse message. Also converts values to other types if specified. + * @param message RegisterSystemInfoResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemInfoResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemInfoResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterSystemStatsRequest. */ + interface IRegisterSystemStatsRequest { + + /** RegisterSystemStatsRequest pcbSerial */ + pcbSerial: string; + + /** RegisterSystemStatsRequest driveStats */ + driveStats?: (wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null); + + /** RegisterSystemStatsRequest terminalStats */ + terminalStats?: (wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null); + } + + /** Represents a RegisterSystemStatsRequest. */ + class RegisterSystemStatsRequest implements IRegisterSystemStatsRequest { + + /** + * Constructs a new RegisterSystemStatsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemStatsRequest); + + /** RegisterSystemStatsRequest pcbSerial. */ + public pcbSerial: string; + + /** RegisterSystemStatsRequest driveStats. */ + public driveStats?: (wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null); + + /** RegisterSystemStatsRequest terminalStats. */ + public terminalStats?: (wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null); + + /** + * Creates a new RegisterSystemStatsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemStatsRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemStatsRequest): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Encodes the specified RegisterSystemStatsRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @param message RegisterSystemStatsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemStatsRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @param message RegisterSystemStatsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Verifies a RegisterSystemStatsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemStatsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemStatsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Creates a plain object from a RegisterSystemStatsRequest message. Also converts values to other types if specified. + * @param message RegisterSystemStatsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemStatsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemStatsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RegisterSystemStatsRequest { + + /** Properties of a DriveStats. */ + interface IDriveStats { + + /** DriveStats operation */ + operation?: (number[]|null); + + /** DriveStats story */ + story?: (number[]|null); + + /** DriveStats versus */ + versus?: (number[]|null); + + /** DriveStats ghost */ + ghost?: (number[]|null); + + /** DriveStats timeAttack */ + timeAttack?: (number[]|null); + + /** DriveStats event */ + event?: (number[]|null); + } + + /** Represents a DriveStats. */ + class DriveStats implements IDriveStats { + + /** + * Constructs a new DriveStats. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.RegisterSystemStatsRequest.IDriveStats); + + /** DriveStats operation. */ + public operation: number[]; + + /** DriveStats story. */ + public story: number[]; + + /** DriveStats versus. */ + public versus: number[]; + + /** DriveStats ghost. */ + public ghost: number[]; + + /** DriveStats timeAttack. */ + public timeAttack: number[]; + + /** DriveStats event. */ + public event: number[]; + + /** + * Creates a new DriveStats instance using the specified properties. + * @param [properties] Properties to set + * @returns DriveStats instance + */ + public static create(properties?: wm.protobuf.RegisterSystemStatsRequest.IDriveStats): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Encodes the specified DriveStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @param message DriveStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.RegisterSystemStatsRequest.IDriveStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DriveStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @param message DriveStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.RegisterSystemStatsRequest.IDriveStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DriveStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Decodes a DriveStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Verifies a DriveStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DriveStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DriveStats + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Creates a plain object from a DriveStats message. Also converts values to other types if specified. + * @param message DriveStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsRequest.DriveStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DriveStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DriveStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TerminalStats. */ + interface ITerminalStats { + + /** TerminalStats operation */ + operation?: (number[]|null); + } + + /** Represents a TerminalStats. */ + class TerminalStats implements ITerminalStats { + + /** + * Constructs a new TerminalStats. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats); + + /** TerminalStats operation. */ + public operation: number[]; + + /** + * Creates a new TerminalStats instance using the specified properties. + * @param [properties] Properties to set + * @returns TerminalStats instance + */ + public static create(properties?: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Encodes the specified TerminalStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @param message TerminalStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerminalStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @param message TerminalStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerminalStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Decodes a TerminalStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Verifies a TerminalStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerminalStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerminalStats + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Creates a plain object from a TerminalStats message. Also converts values to other types if specified. + * @param message TerminalStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsRequest.TerminalStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerminalStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerminalStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RegisterSystemStatsResponse. */ + interface IRegisterSystemStatsResponse { + + /** RegisterSystemStatsResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a RegisterSystemStatsResponse. */ + class RegisterSystemStatsResponse implements IRegisterSystemStatsResponse { + + /** + * Constructs a new RegisterSystemStatsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemStatsResponse); + + /** RegisterSystemStatsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new RegisterSystemStatsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemStatsResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemStatsResponse): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Encodes the specified RegisterSystemStatsResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @param message RegisterSystemStatsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemStatsResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @param message RegisterSystemStatsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Verifies a RegisterSystemStatsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemStatsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemStatsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Creates a plain object from a RegisterSystemStatsResponse message. Also converts values to other types if specified. + * @param message RegisterSystemStatsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemStatsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemStatsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterGhostTrailRequest. */ + interface IRegisterGhostTrailRequest { + + /** RegisterGhostTrailRequest ghostSessionId */ + ghostSessionId: (number|Long); + + /** RegisterGhostTrailRequest ghost */ + ghost: wm.protobuf.IGhostCar; + + /** RegisterGhostTrailRequest trail */ + trail: Uint8Array; + + /** RegisterGhostTrailRequest time */ + time?: (number|null); + + /** RegisterGhostTrailRequest driveData */ + driveData?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByArea */ + trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByCar */ + trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByUser */ + trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + } + + /** Represents a RegisterGhostTrailRequest. */ + class RegisterGhostTrailRequest implements IRegisterGhostTrailRequest { + + /** + * Constructs a new RegisterGhostTrailRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterGhostTrailRequest); + + /** RegisterGhostTrailRequest ghostSessionId. */ + public ghostSessionId: (number|Long); + + /** RegisterGhostTrailRequest ghost. */ + public ghost: wm.protobuf.IGhostCar; + + /** RegisterGhostTrailRequest trail. */ + public trail: Uint8Array; + + /** RegisterGhostTrailRequest time. */ + public time: number; + + /** RegisterGhostTrailRequest driveData. */ + public driveData?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByArea. */ + public trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByCar. */ + public trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByUser. */ + public trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + + /** + * Creates a new RegisterGhostTrailRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterGhostTrailRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterGhostTrailRequest): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Encodes the specified RegisterGhostTrailRequest message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @param message RegisterGhostTrailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterGhostTrailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterGhostTrailRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @param message RegisterGhostTrailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterGhostTrailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Verifies a RegisterGhostTrailRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterGhostTrailRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterGhostTrailRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Creates a plain object from a RegisterGhostTrailRequest message. Also converts values to other types if specified. + * @param message RegisterGhostTrailRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterGhostTrailRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterGhostTrailRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterGhostTrailRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterGhostTrailResponse. */ + interface IRegisterGhostTrailResponse { + + /** RegisterGhostTrailResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a RegisterGhostTrailResponse. */ + class RegisterGhostTrailResponse implements IRegisterGhostTrailResponse { + + /** + * Constructs a new RegisterGhostTrailResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterGhostTrailResponse); + + /** RegisterGhostTrailResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new RegisterGhostTrailResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterGhostTrailResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterGhostTrailResponse): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Encodes the specified RegisterGhostTrailResponse message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @param message RegisterGhostTrailResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterGhostTrailResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterGhostTrailResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @param message RegisterGhostTrailResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterGhostTrailResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Verifies a RegisterGhostTrailResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterGhostTrailResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterGhostTrailResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Creates a plain object from a RegisterGhostTrailResponse message. Also converts values to other types if specified. + * @param message RegisterGhostTrailResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterGhostTrailResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterGhostTrailResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterGhostTrailResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadUserRequest. */ + interface ILoadUserRequest { + + /** LoadUserRequest cardChipId */ + cardChipId?: (string|null); + + /** LoadUserRequest accessCode */ + accessCode?: (string|null); + + /** LoadUserRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** LoadUserRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** LoadUserRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** LoadUserRequest userId */ + userId?: (number|null); + + /** LoadUserRequest romVersion */ + romVersion: number; + + /** LoadUserRequest maxCars */ + maxCars: number; + + /** LoadUserRequest createUser */ + createUser?: (boolean|null); + } + + /** Represents a LoadUserRequest. */ + class LoadUserRequest implements ILoadUserRequest { + + /** + * Constructs a new LoadUserRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUserRequest); + + /** LoadUserRequest cardChipId. */ + public cardChipId: string; + + /** LoadUserRequest accessCode. */ + public accessCode: string; + + /** LoadUserRequest cardTypeCode. */ + public cardTypeCode: number; + + /** LoadUserRequest cardRegionCode. */ + public cardRegionCode: number; + + /** LoadUserRequest device. */ + public device: wm.protobuf.DeviceType; + + /** LoadUserRequest userId. */ + public userId: number; + + /** LoadUserRequest romVersion. */ + public romVersion: number; + + /** LoadUserRequest maxCars. */ + public maxCars: number; + + /** LoadUserRequest createUser. */ + public createUser: boolean; + + /** + * Creates a new LoadUserRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUserRequest instance + */ + public static create(properties?: wm.protobuf.ILoadUserRequest): wm.protobuf.LoadUserRequest; + + /** + * Encodes the specified LoadUserRequest message. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @param message LoadUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @param message LoadUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUserRequest; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUserRequest; + + /** + * Verifies a LoadUserRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUserRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUserRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUserRequest; + + /** + * Creates a plain object from a LoadUserRequest message. Also converts values to other types if specified. + * @param message LoadUserRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUserRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUserRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUserRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadUserResponse. */ + interface ILoadUserResponse { + + /** LoadUserResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadUserResponse unlockAt */ + unlockAt?: (number|null); + + /** LoadUserResponse accessCode */ + accessCode?: (string|null); + + /** LoadUserResponse banapassportAmId */ + banapassportAmId?: (number|null); + + /** LoadUserResponse mbid */ + mbid?: (number|null); + + /** LoadUserResponse userId */ + userId?: (number|null); + + /** LoadUserResponse numOfOwnedCars */ + numOfOwnedCars: number; + + /** LoadUserResponse cars */ + cars?: (wm.protobuf.ICar[]|null); + + /** LoadUserResponse carStates */ + carStates?: (wm.protobuf.LoadUserResponse.ICarState[]|null); + + /** LoadUserResponse unusedCarTickets */ + unusedCarTickets?: (wm.protobuf.IUserItem[]|null); + + /** LoadUserResponse tutorials */ + tutorials?: (boolean[]|null); + + /** LoadUserResponse competitionUserState */ + competitionUserState?: (wm.protobuf.GhostCompetitionParticipantState|null); + + /** LoadUserResponse windowStickerString */ + windowStickerString?: (string|null); + + /** LoadUserResponse windowStickerFont */ + windowStickerFont?: (number|null); + + /** LoadUserResponse spappState */ + spappState: wm.protobuf.SmartphoneAppState; + + /** LoadUserResponse transferState */ + transferState: wm.protobuf.TransferState; + + /** LoadUserResponse totalVsStarCount */ + totalVsStarCount?: (number|null); + + /** LoadUserResponse totalVsMedalPoint */ + totalVsMedalPoint?: (number|null); + + /** LoadUserResponse copiedCar */ + copiedCar?: (wm.protobuf.ICopiedCar|null); + + /** LoadUserResponse wasCreatedToday */ + wasCreatedToday?: (boolean|null); + + /** LoadUserResponse participatedInInviteFriendCampaign */ + participatedInInviteFriendCampaign?: (boolean|null); + } + + /** Represents a LoadUserResponse. */ + class LoadUserResponse implements ILoadUserResponse { + + /** + * Constructs a new LoadUserResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUserResponse); + + /** LoadUserResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadUserResponse unlockAt. */ + public unlockAt: number; + + /** LoadUserResponse accessCode. */ + public accessCode: string; + + /** LoadUserResponse banapassportAmId. */ + public banapassportAmId: number; + + /** LoadUserResponse mbid. */ + public mbid: number; + + /** LoadUserResponse userId. */ + public userId: number; + + /** LoadUserResponse numOfOwnedCars. */ + public numOfOwnedCars: number; + + /** LoadUserResponse cars. */ + public cars: wm.protobuf.ICar[]; + + /** LoadUserResponse carStates. */ + public carStates: wm.protobuf.LoadUserResponse.ICarState[]; + + /** LoadUserResponse unusedCarTickets. */ + public unusedCarTickets: wm.protobuf.IUserItem[]; + + /** LoadUserResponse tutorials. */ + public tutorials: boolean[]; + + /** LoadUserResponse competitionUserState. */ + public competitionUserState: wm.protobuf.GhostCompetitionParticipantState; + + /** LoadUserResponse windowStickerString. */ + public windowStickerString: string; + + /** LoadUserResponse windowStickerFont. */ + public windowStickerFont: number; + + /** LoadUserResponse spappState. */ + public spappState: wm.protobuf.SmartphoneAppState; + + /** LoadUserResponse transferState. */ + public transferState: wm.protobuf.TransferState; + + /** LoadUserResponse totalVsStarCount. */ + public totalVsStarCount: number; + + /** LoadUserResponse totalVsMedalPoint. */ + public totalVsMedalPoint: number; + + /** LoadUserResponse copiedCar. */ + public copiedCar?: (wm.protobuf.ICopiedCar|null); + + /** LoadUserResponse wasCreatedToday. */ + public wasCreatedToday: boolean; + + /** LoadUserResponse participatedInInviteFriendCampaign. */ + public participatedInInviteFriendCampaign: boolean; + + /** + * Creates a new LoadUserResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUserResponse instance + */ + public static create(properties?: wm.protobuf.ILoadUserResponse): wm.protobuf.LoadUserResponse; + + /** + * Encodes the specified LoadUserResponse message. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @param message LoadUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @param message LoadUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUserResponse; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUserResponse; + + /** + * Verifies a LoadUserResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUserResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUserResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUserResponse; + + /** + * Creates a plain object from a LoadUserResponse message. Also converts values to other types if specified. + * @param message LoadUserResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUserResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUserResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUserResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadUserResponse { + + /** Properties of a CarState. */ + interface ICarState { + + /** CarState hasOpponentGhost */ + hasOpponentGhost: boolean; + + /** CarState competitionState */ + competitionState?: (wm.protobuf.GhostCompetitionParticipantState|null); + + /** CarState toBeDeleted */ + toBeDeleted: boolean; + + /** CarState eventJoined */ + eventJoined: boolean; + + /** CarState transferred */ + transferred: boolean; + + /** CarState driveLastPlayedAt */ + driveLastPlayedAt?: (number|null); + } + + /** Represents a CarState. */ + class CarState implements ICarState { + + /** + * Constructs a new CarState. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadUserResponse.ICarState); + + /** CarState hasOpponentGhost. */ + public hasOpponentGhost: boolean; + + /** CarState competitionState. */ + public competitionState: wm.protobuf.GhostCompetitionParticipantState; + + /** CarState toBeDeleted. */ + public toBeDeleted: boolean; + + /** CarState eventJoined. */ + public eventJoined: boolean; + + /** CarState transferred. */ + public transferred: boolean; + + /** CarState driveLastPlayedAt. */ + public driveLastPlayedAt: number; + + /** + * Creates a new CarState instance using the specified properties. + * @param [properties] Properties to set + * @returns CarState instance + */ + public static create(properties?: wm.protobuf.LoadUserResponse.ICarState): wm.protobuf.LoadUserResponse.CarState; + + /** + * Encodes the specified CarState message. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @param message CarState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadUserResponse.ICarState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarState message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @param message CarState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadUserResponse.ICarState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUserResponse.CarState; + + /** + * Decodes a CarState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUserResponse.CarState; + + /** + * Verifies a CarState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarState + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUserResponse.CarState; + + /** + * Creates a plain object from a CarState message. Also converts values to other types if specified. + * @param message CarState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUserResponse.CarState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an UpdateUserSessionRequest. */ + interface IUpdateUserSessionRequest { + + /** UpdateUserSessionRequest userId */ + userId?: (number|null); + + /** UpdateUserSessionRequest cardChipId */ + cardChipId?: (string|null); + + /** UpdateUserSessionRequest accessCode */ + accessCode?: (string|null); + + /** UpdateUserSessionRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** UpdateUserSessionRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** UpdateUserSessionRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** UpdateUserSessionRequest unlockAt */ + unlockAt: number; + + /** UpdateUserSessionRequest acceptVs */ + acceptVs?: (boolean|null); + } + + /** Represents an UpdateUserSessionRequest. */ + class UpdateUserSessionRequest implements IUpdateUserSessionRequest { + + /** + * Constructs a new UpdateUserSessionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateUserSessionRequest); + + /** UpdateUserSessionRequest userId. */ + public userId: number; + + /** UpdateUserSessionRequest cardChipId. */ + public cardChipId: string; + + /** UpdateUserSessionRequest accessCode. */ + public accessCode: string; + + /** UpdateUserSessionRequest cardTypeCode. */ + public cardTypeCode: number; + + /** UpdateUserSessionRequest cardRegionCode. */ + public cardRegionCode: number; + + /** UpdateUserSessionRequest device. */ + public device: wm.protobuf.DeviceType; + + /** UpdateUserSessionRequest unlockAt. */ + public unlockAt: number; + + /** UpdateUserSessionRequest acceptVs. */ + public acceptVs: boolean; + + /** + * Creates a new UpdateUserSessionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserSessionRequest instance + */ + public static create(properties?: wm.protobuf.IUpdateUserSessionRequest): wm.protobuf.UpdateUserSessionRequest; + + /** + * Encodes the specified UpdateUserSessionRequest message. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @param message UpdateUserSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateUserSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserSessionRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @param message UpdateUserSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateUserSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateUserSessionRequest; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateUserSessionRequest; + + /** + * Verifies an UpdateUserSessionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateUserSessionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserSessionRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateUserSessionRequest; + + /** + * Creates a plain object from an UpdateUserSessionRequest message. Also converts values to other types if specified. + * @param message UpdateUserSessionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateUserSessionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserSessionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserSessionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateUserSessionResponse. */ + interface IUpdateUserSessionResponse { + + /** UpdateUserSessionResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents an UpdateUserSessionResponse. */ + class UpdateUserSessionResponse implements IUpdateUserSessionResponse { + + /** + * Constructs a new UpdateUserSessionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateUserSessionResponse); + + /** UpdateUserSessionResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new UpdateUserSessionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserSessionResponse instance + */ + public static create(properties?: wm.protobuf.IUpdateUserSessionResponse): wm.protobuf.UpdateUserSessionResponse; + + /** + * Encodes the specified UpdateUserSessionResponse message. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @param message UpdateUserSessionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateUserSessionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserSessionResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @param message UpdateUserSessionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateUserSessionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateUserSessionResponse; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateUserSessionResponse; + + /** + * Verifies an UpdateUserSessionResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateUserSessionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserSessionResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateUserSessionResponse; + + /** + * Creates a plain object from an UpdateUserSessionResponse message. Also converts values to other types if specified. + * @param message UpdateUserSessionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateUserSessionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserSessionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserSessionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadDriveInformationRequest. */ + interface ILoadDriveInformationRequest { + + /** LoadDriveInformationRequest userId */ + userId?: (number|null); + } + + /** Represents a LoadDriveInformationRequest. */ + class LoadDriveInformationRequest implements ILoadDriveInformationRequest { + + /** + * Constructs a new LoadDriveInformationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadDriveInformationRequest); + + /** LoadDriveInformationRequest userId. */ + public userId: number; + + /** + * Creates a new LoadDriveInformationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadDriveInformationRequest instance + */ + public static create(properties?: wm.protobuf.ILoadDriveInformationRequest): wm.protobuf.LoadDriveInformationRequest; + + /** + * Encodes the specified LoadDriveInformationRequest message. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @param message LoadDriveInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadDriveInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadDriveInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @param message LoadDriveInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadDriveInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadDriveInformationRequest; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadDriveInformationRequest; + + /** + * Verifies a LoadDriveInformationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadDriveInformationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadDriveInformationRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadDriveInformationRequest; + + /** + * Creates a plain object from a LoadDriveInformationRequest message. Also converts values to other types if specified. + * @param message LoadDriveInformationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadDriveInformationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadDriveInformationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadDriveInformationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadDriveInformationResponse. */ + interface ILoadDriveInformationResponse { + + /** LoadDriveInformationResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadDriveInformationResponse noticeWindow */ + noticeWindow?: (wm.protobuf.NoticeEntry[]|null); + + /** LoadDriveInformationResponse noticeWindowMessage */ + noticeWindowMessage?: (string[]|null); + + /** LoadDriveInformationResponse transferNotice */ + transferNotice?: (wm.protobuf.ITransferNotice|null); + + /** LoadDriveInformationResponse restrictedModels */ + restrictedModels?: (number[]|null); + + /** LoadDriveInformationResponse announceFeature */ + announceFeature?: (boolean|null); + + /** LoadDriveInformationResponse announceMobile */ + announceMobile?: (boolean|null); + + /** LoadDriveInformationResponse availableTickets */ + availableTickets?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a LoadDriveInformationResponse. */ + class LoadDriveInformationResponse implements ILoadDriveInformationResponse { + + /** + * Constructs a new LoadDriveInformationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadDriveInformationResponse); + + /** LoadDriveInformationResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadDriveInformationResponse noticeWindow. */ + public noticeWindow: wm.protobuf.NoticeEntry[]; + + /** LoadDriveInformationResponse noticeWindowMessage. */ + public noticeWindowMessage: string[]; + + /** LoadDriveInformationResponse transferNotice. */ + public transferNotice?: (wm.protobuf.ITransferNotice|null); + + /** LoadDriveInformationResponse restrictedModels. */ + public restrictedModels: number[]; + + /** LoadDriveInformationResponse announceFeature. */ + public announceFeature: boolean; + + /** LoadDriveInformationResponse announceMobile. */ + public announceMobile: boolean; + + /** LoadDriveInformationResponse availableTickets. */ + public availableTickets: wm.protobuf.IUserItem[]; + + /** + * Creates a new LoadDriveInformationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadDriveInformationResponse instance + */ + public static create(properties?: wm.protobuf.ILoadDriveInformationResponse): wm.protobuf.LoadDriveInformationResponse; + + /** + * Encodes the specified LoadDriveInformationResponse message. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @param message LoadDriveInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadDriveInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadDriveInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @param message LoadDriveInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadDriveInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadDriveInformationResponse; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadDriveInformationResponse; + + /** + * Verifies a LoadDriveInformationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadDriveInformationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadDriveInformationResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadDriveInformationResponse; + + /** + * Creates a plain object from a LoadDriveInformationResponse message. Also converts values to other types if specified. + * @param message LoadDriveInformationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadDriveInformationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadDriveInformationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadDriveInformationResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadCarRequest. */ + interface ILoadCarRequest { + + /** LoadCarRequest carId */ + carId: number; + + /** LoadCarRequest eventMode */ + eventMode?: (boolean|null); + + /** LoadCarRequest eventModeSerial */ + eventModeSerial?: (string|null); + } + + /** Represents a LoadCarRequest. */ + class LoadCarRequest implements ILoadCarRequest { + + /** + * Constructs a new LoadCarRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadCarRequest); + + /** LoadCarRequest carId. */ + public carId: number; + + /** LoadCarRequest eventMode. */ + public eventMode: boolean; + + /** LoadCarRequest eventModeSerial. */ + public eventModeSerial: string; + + /** + * Creates a new LoadCarRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadCarRequest instance + */ + public static create(properties?: wm.protobuf.ILoadCarRequest): wm.protobuf.LoadCarRequest; + + /** + * Encodes the specified LoadCarRequest message. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @param message LoadCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @param message LoadCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadCarRequest; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadCarRequest; + + /** + * Verifies a LoadCarRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadCarRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadCarRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadCarRequest; + + /** + * Creates a plain object from a LoadCarRequest message. Also converts values to other types if specified. + * @param message LoadCarRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadCarRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadCarRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadCarRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadCarResponse. */ + interface ILoadCarResponse { + + /** LoadCarResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadCarResponse car */ + car: wm.protobuf.ICar; + + /** LoadCarResponse tuningPoint */ + tuningPoint: number; + + /** LoadCarResponse odometer */ + odometer: number; + + /** LoadCarResponse playCount */ + playCount: number; + + /** LoadCarResponse earnedCustomColor */ + earnedCustomColor: boolean; + + /** LoadCarResponse setting */ + setting: wm.protobuf.ICarSetting; + + /** LoadCarResponse vsPlayCount */ + vsPlayCount: number; + + /** LoadCarResponse vsBurstCount */ + vsBurstCount: number; + + /** LoadCarResponse vsStarCount */ + vsStarCount: number; + + /** LoadCarResponse vsStarCountMax */ + vsStarCountMax: number; + + /** LoadCarResponse vsCoolOrWild */ + vsCoolOrWild: number; + + /** LoadCarResponse vsSmoothOrRough */ + vsSmoothOrRough: number; + + /** LoadCarResponse vsTripleStarMedals */ + vsTripleStarMedals: number; + + /** LoadCarResponse vsDoubleStarMedals */ + vsDoubleStarMedals: number; + + /** LoadCarResponse vsSingleStarMedals */ + vsSingleStarMedals: number; + + /** LoadCarResponse vsPlainMedals */ + vsPlainMedals: number; + + /** LoadCarResponse rgPlayCount */ + rgPlayCount: number; + + /** LoadCarResponse rgWinCount */ + rgWinCount: number; + + /** LoadCarResponse rgTrophy */ + rgTrophy: number; + + /** LoadCarResponse rgPreviousVersionPlayCount */ + rgPreviousVersionPlayCount: number; + + /** LoadCarResponse rgScore */ + rgScore: number; + + /** LoadCarResponse rgRegionMapScore */ + rgRegionMapScore?: (number[]|null); + + /** LoadCarResponse rgRegions */ + rgRegions?: (number[]|null); + + /** LoadCarResponse rgStamp */ + rgStamp: number; + + /** LoadCarResponse rgAcquireAllCrowns */ + rgAcquireAllCrowns: boolean; + + /** LoadCarResponse dressupLevel */ + dressupLevel: number; + + /** LoadCarResponse dressupPoint */ + dressupPoint: number; + + /** LoadCarResponse stPlayCount */ + stPlayCount: number; + + /** LoadCarResponse stClearBits */ + stClearBits: number; + + /** LoadCarResponse stClearDivCount */ + stClearDivCount: number; + + /** LoadCarResponse stClearCount */ + stClearCount: number; + + /** LoadCarResponse stLoseBits */ + stLoseBits: (number|Long); + + /** LoadCarResponse stConsecutiveWins */ + stConsecutiveWins: number; + + /** LoadCarResponse stConsecutiveWinsMax */ + stConsecutiveWinsMax: number; + + /** LoadCarResponse stCompleted_100Episodes */ + stCompleted_100Episodes: boolean; + + /** LoadCarResponse challenger */ + challenger?: (wm.protobuf.IChallengerCar|null); + + /** LoadCarResponse challengerReturnCount */ + challengerReturnCount?: (number|null); + + /** LoadCarResponse numOfChallengers */ + numOfChallengers?: (number|null); + + /** LoadCarResponse opponentGhost */ + opponentGhost?: (wm.protobuf.IGhostCar|null); + + /** LoadCarResponse opponentTrailId */ + opponentTrailId?: (number|Long|null); + + /** LoadCarResponse opponentCompetitionId */ + opponentCompetitionId?: (number|null); + + /** LoadCarResponse competitionParameter */ + competitionParameter?: (wm.protobuf.IGhostCompetitionParameter|null); + + /** LoadCarResponse specialTitles */ + specialTitles?: (string[]|null); + + /** LoadCarResponse earnedTitles */ + earnedTitles?: (string[]|null); + + /** LoadCarResponse ownedItems */ + ownedItems?: (wm.protobuf.ICarItem[]|null); + + /** LoadCarResponse auraMotifAutoChange */ + auraMotifAutoChange: boolean; + + /** LoadCarResponse screenshotCount */ + screenshotCount: number; + + /** LoadCarResponse announceEventModePrize */ + announceEventModePrize?: (boolean|null); + + /** LoadCarResponse transferred */ + transferred: boolean; + + /** LoadCarResponse driveLastPlayedAt */ + driveLastPlayedAt?: (number|null); + + /** LoadCarResponse insurance */ + insurance?: (wm.protobuf.LoadCarResponse.IStoryInsurance|null); + } + + /** Represents a LoadCarResponse. */ + class LoadCarResponse implements ILoadCarResponse { + + /** + * Constructs a new LoadCarResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadCarResponse); + + /** LoadCarResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadCarResponse car. */ + public car: wm.protobuf.ICar; + + /** LoadCarResponse tuningPoint. */ + public tuningPoint: number; + + /** LoadCarResponse odometer. */ + public odometer: number; + + /** LoadCarResponse playCount. */ + public playCount: number; + + /** LoadCarResponse earnedCustomColor. */ + public earnedCustomColor: boolean; + + /** LoadCarResponse setting. */ + public setting: wm.protobuf.ICarSetting; + + /** LoadCarResponse vsPlayCount. */ + public vsPlayCount: number; + + /** LoadCarResponse vsBurstCount. */ + public vsBurstCount: number; + + /** LoadCarResponse vsStarCount. */ + public vsStarCount: number; + + /** LoadCarResponse vsStarCountMax. */ + public vsStarCountMax: number; + + /** LoadCarResponse vsCoolOrWild. */ + public vsCoolOrWild: number; + + /** LoadCarResponse vsSmoothOrRough. */ + public vsSmoothOrRough: number; + + /** LoadCarResponse vsTripleStarMedals. */ + public vsTripleStarMedals: number; + + /** LoadCarResponse vsDoubleStarMedals. */ + public vsDoubleStarMedals: number; + + /** LoadCarResponse vsSingleStarMedals. */ + public vsSingleStarMedals: number; + + /** LoadCarResponse vsPlainMedals. */ + public vsPlainMedals: number; + + /** LoadCarResponse rgPlayCount. */ + public rgPlayCount: number; + + /** LoadCarResponse rgWinCount. */ + public rgWinCount: number; + + /** LoadCarResponse rgTrophy. */ + public rgTrophy: number; + + /** LoadCarResponse rgPreviousVersionPlayCount. */ + public rgPreviousVersionPlayCount: number; + + /** LoadCarResponse rgScore. */ + public rgScore: number; + + /** LoadCarResponse rgRegionMapScore. */ + public rgRegionMapScore: number[]; + + /** LoadCarResponse rgRegions. */ + public rgRegions: number[]; + + /** LoadCarResponse rgStamp. */ + public rgStamp: number; + + /** LoadCarResponse rgAcquireAllCrowns. */ + public rgAcquireAllCrowns: boolean; + + /** LoadCarResponse dressupLevel. */ + public dressupLevel: number; + + /** LoadCarResponse dressupPoint. */ + public dressupPoint: number; + + /** LoadCarResponse stPlayCount. */ + public stPlayCount: number; + + /** LoadCarResponse stClearBits. */ + public stClearBits: number; + + /** LoadCarResponse stClearDivCount. */ + public stClearDivCount: number; + + /** LoadCarResponse stClearCount. */ + public stClearCount: number; + + /** LoadCarResponse stLoseBits. */ + public stLoseBits: (number|Long); + + /** LoadCarResponse stConsecutiveWins. */ + public stConsecutiveWins: number; + + /** LoadCarResponse stConsecutiveWinsMax. */ + public stConsecutiveWinsMax: number; + + /** LoadCarResponse stCompleted_100Episodes. */ + public stCompleted_100Episodes: boolean; + + /** LoadCarResponse challenger. */ + public challenger?: (wm.protobuf.IChallengerCar|null); + + /** LoadCarResponse challengerReturnCount. */ + public challengerReturnCount: number; + + /** LoadCarResponse numOfChallengers. */ + public numOfChallengers: number; + + /** LoadCarResponse opponentGhost. */ + public opponentGhost?: (wm.protobuf.IGhostCar|null); + + /** LoadCarResponse opponentTrailId. */ + public opponentTrailId: (number|Long); + + /** LoadCarResponse opponentCompetitionId. */ + public opponentCompetitionId: number; + + /** LoadCarResponse competitionParameter. */ + public competitionParameter?: (wm.protobuf.IGhostCompetitionParameter|null); + + /** LoadCarResponse specialTitles. */ + public specialTitles: string[]; + + /** LoadCarResponse earnedTitles. */ + public earnedTitles: string[]; + + /** LoadCarResponse ownedItems. */ + public ownedItems: wm.protobuf.ICarItem[]; + + /** LoadCarResponse auraMotifAutoChange. */ + public auraMotifAutoChange: boolean; + + /** LoadCarResponse screenshotCount. */ + public screenshotCount: number; + + /** LoadCarResponse announceEventModePrize. */ + public announceEventModePrize: boolean; + + /** LoadCarResponse transferred. */ + public transferred: boolean; + + /** LoadCarResponse driveLastPlayedAt. */ + public driveLastPlayedAt: number; + + /** LoadCarResponse insurance. */ + public insurance?: (wm.protobuf.LoadCarResponse.IStoryInsurance|null); + + /** + * Creates a new LoadCarResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadCarResponse instance + */ + public static create(properties?: wm.protobuf.ILoadCarResponse): wm.protobuf.LoadCarResponse; + + /** + * Encodes the specified LoadCarResponse message. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @param message LoadCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @param message LoadCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadCarResponse; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadCarResponse; + + /** + * Verifies a LoadCarResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadCarResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadCarResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadCarResponse; + + /** + * Creates a plain object from a LoadCarResponse message. Also converts values to other types if specified. + * @param message LoadCarResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadCarResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadCarResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadCarResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadCarResponse { + + /** Properties of a StoryInsurance. */ + interface IStoryInsurance { + + /** StoryInsurance numOfRemains */ + numOfRemains: number; + } + + /** Represents a StoryInsurance. */ + class StoryInsurance implements IStoryInsurance { + + /** + * Constructs a new StoryInsurance. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadCarResponse.IStoryInsurance); + + /** StoryInsurance numOfRemains. */ + public numOfRemains: number; + + /** + * Creates a new StoryInsurance instance using the specified properties. + * @param [properties] Properties to set + * @returns StoryInsurance instance + */ + public static create(properties?: wm.protobuf.LoadCarResponse.IStoryInsurance): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Encodes the specified StoryInsurance message. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @param message StoryInsurance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadCarResponse.IStoryInsurance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoryInsurance message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @param message StoryInsurance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadCarResponse.IStoryInsurance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Verifies a StoryInsurance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StoryInsurance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoryInsurance + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Creates a plain object from a StoryInsurance message. Also converts values to other types if specified. + * @param message StoryInsurance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadCarResponse.StoryInsurance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoryInsurance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoryInsurance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateCarRequest. */ + interface ICreateCarRequest { + + /** CreateCarRequest userId */ + userId?: (number|null); + + /** CreateCarRequest banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateCarRequest cardChipId */ + cardChipId?: (string|null); + + /** CreateCarRequest accessCode */ + accessCode?: (string|null); + + /** CreateCarRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** CreateCarRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** CreateCarRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** CreateCarRequest car */ + car: wm.protobuf.ICar; + + /** CreateCarRequest transmission */ + transmission: boolean; + + /** CreateCarRequest timestamp */ + timestamp: number; + + /** CreateCarRequest userItemId */ + userItemId?: (number|null); + + /** CreateCarRequest deletedCarId */ + deletedCarId?: (number|null); + } + + /** Represents a CreateCarRequest. */ + class CreateCarRequest implements ICreateCarRequest { + + /** + * Constructs a new CreateCarRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateCarRequest); + + /** CreateCarRequest userId. */ + public userId: number; + + /** CreateCarRequest banapassportAmId. */ + public banapassportAmId: number; + + /** CreateCarRequest cardChipId. */ + public cardChipId: string; + + /** CreateCarRequest accessCode. */ + public accessCode: string; + + /** CreateCarRequest cardTypeCode. */ + public cardTypeCode: number; + + /** CreateCarRequest cardRegionCode. */ + public cardRegionCode: number; + + /** CreateCarRequest device. */ + public device: wm.protobuf.DeviceType; + + /** CreateCarRequest car. */ + public car: wm.protobuf.ICar; + + /** CreateCarRequest transmission. */ + public transmission: boolean; + + /** CreateCarRequest timestamp. */ + public timestamp: number; + + /** CreateCarRequest userItemId. */ + public userItemId: number; + + /** CreateCarRequest deletedCarId. */ + public deletedCarId: number; + + /** + * Creates a new CreateCarRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCarRequest instance + */ + public static create(properties?: wm.protobuf.ICreateCarRequest): wm.protobuf.CreateCarRequest; + + /** + * Encodes the specified CreateCarRequest message. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @param message CreateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @param message CreateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateCarRequest; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateCarRequest; + + /** + * Verifies a CreateCarRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCarRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCarRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateCarRequest; + + /** + * Creates a plain object from a CreateCarRequest message. Also converts values to other types if specified. + * @param message CreateCarRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateCarRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCarRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCarRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateCarResponse. */ + interface ICreateCarResponse { + + /** CreateCarResponse error */ + error: wm.protobuf.ErrorCode; + + /** CreateCarResponse accessCode */ + accessCode?: (string|null); + + /** CreateCarResponse banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateCarResponse mbid */ + mbid?: (number|null); + + /** CreateCarResponse userId */ + userId: number; + + /** CreateCarResponse carId */ + carId: number; + + /** CreateCarResponse stClearBits */ + stClearBits?: (number|null); + + /** CreateCarResponse stClearDivCount */ + stClearDivCount?: (number|null); + + /** CreateCarResponse stClearCount */ + stClearCount?: (number|null); + + /** CreateCarResponse stLoseBits */ + stLoseBits?: (number|Long|null); + + /** CreateCarResponse stConsecutiveWins */ + stConsecutiveWins?: (number|null); + + /** CreateCarResponse stConsecutiveWinsMax */ + stConsecutiveWinsMax?: (number|null); + + /** CreateCarResponse fullTunedCarCouponUnreceivableAt */ + fullTunedCarCouponUnreceivableAt?: (number|null); + } + + /** Represents a CreateCarResponse. */ + class CreateCarResponse implements ICreateCarResponse { + + /** + * Constructs a new CreateCarResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateCarResponse); + + /** CreateCarResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** CreateCarResponse accessCode. */ + public accessCode: string; + + /** CreateCarResponse banapassportAmId. */ + public banapassportAmId: number; + + /** CreateCarResponse mbid. */ + public mbid: number; + + /** CreateCarResponse userId. */ + public userId: number; + + /** CreateCarResponse carId. */ + public carId: number; + + /** CreateCarResponse stClearBits. */ + public stClearBits: number; + + /** CreateCarResponse stClearDivCount. */ + public stClearDivCount: number; + + /** CreateCarResponse stClearCount. */ + public stClearCount: number; + + /** CreateCarResponse stLoseBits. */ + public stLoseBits: (number|Long); + + /** CreateCarResponse stConsecutiveWins. */ + public stConsecutiveWins: number; + + /** CreateCarResponse stConsecutiveWinsMax. */ + public stConsecutiveWinsMax: number; + + /** CreateCarResponse fullTunedCarCouponUnreceivableAt. */ + public fullTunedCarCouponUnreceivableAt: number; + + /** + * Creates a new CreateCarResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCarResponse instance + */ + public static create(properties?: wm.protobuf.ICreateCarResponse): wm.protobuf.CreateCarResponse; + + /** + * Encodes the specified CreateCarResponse message. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @param message CreateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @param message CreateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateCarResponse; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateCarResponse; + + /** + * Verifies a CreateCarResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCarResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCarResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateCarResponse; + + /** + * Creates a plain object from a CreateCarResponse message. Also converts values to other types if specified. + * @param message CreateCarResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateCarResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCarResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCarResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGameHistoryRequest. */ + interface ILoadGameHistoryRequest { + + /** LoadGameHistoryRequest carId */ + carId: number; + } + + /** Represents a LoadGameHistoryRequest. */ + class LoadGameHistoryRequest implements ILoadGameHistoryRequest { + + /** + * Constructs a new LoadGameHistoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGameHistoryRequest); + + /** LoadGameHistoryRequest carId. */ + public carId: number; + + /** + * Creates a new LoadGameHistoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGameHistoryRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGameHistoryRequest): wm.protobuf.LoadGameHistoryRequest; + + /** + * Encodes the specified LoadGameHistoryRequest message. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @param message LoadGameHistoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGameHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGameHistoryRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @param message LoadGameHistoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGameHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryRequest; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryRequest; + + /** + * Verifies a LoadGameHistoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGameHistoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGameHistoryRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryRequest; + + /** + * Creates a plain object from a LoadGameHistoryRequest message. Also converts values to other types if specified. + * @param message LoadGameHistoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGameHistoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGameHistoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGameHistoryResponse. */ + interface ILoadGameHistoryResponse { + + /** LoadGameHistoryResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGameHistoryResponse taRecords */ + taRecords?: (wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord[]|null); + + /** LoadGameHistoryResponse taRankingUpdatedAt */ + taRankingUpdatedAt: number; + + /** LoadGameHistoryResponse ghostHistory */ + ghostHistory?: (wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord[]|null); + + /** LoadGameHistoryResponse ghostBattleCount */ + ghostBattleCount: number; + + /** LoadGameHistoryResponse ghostBattleWinCount */ + ghostBattleWinCount: number; + + /** LoadGameHistoryResponse stampSheetCount */ + stampSheetCount: number; + + /** LoadGameHistoryResponse stampSheet */ + stampSheet?: (number[]|null); + } + + /** Represents a LoadGameHistoryResponse. */ + class LoadGameHistoryResponse implements ILoadGameHistoryResponse { + + /** + * Constructs a new LoadGameHistoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGameHistoryResponse); + + /** LoadGameHistoryResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGameHistoryResponse taRecords. */ + public taRecords: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord[]; + + /** LoadGameHistoryResponse taRankingUpdatedAt. */ + public taRankingUpdatedAt: number; + + /** LoadGameHistoryResponse ghostHistory. */ + public ghostHistory: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord[]; + + /** LoadGameHistoryResponse ghostBattleCount. */ + public ghostBattleCount: number; + + /** LoadGameHistoryResponse ghostBattleWinCount. */ + public ghostBattleWinCount: number; + + /** LoadGameHistoryResponse stampSheetCount. */ + public stampSheetCount: number; + + /** LoadGameHistoryResponse stampSheet. */ + public stampSheet: number[]; + + /** + * Creates a new LoadGameHistoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGameHistoryResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGameHistoryResponse): wm.protobuf.LoadGameHistoryResponse; + + /** + * Encodes the specified LoadGameHistoryResponse message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @param message LoadGameHistoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGameHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGameHistoryResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @param message LoadGameHistoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGameHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse; + + /** + * Verifies a LoadGameHistoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGameHistoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGameHistoryResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse; + + /** + * Creates a plain object from a LoadGameHistoryResponse message. Also converts values to other types if specified. + * @param message LoadGameHistoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGameHistoryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGameHistoryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGameHistoryResponse { + + /** Properties of a TimeAttackRecord. */ + interface ITimeAttackRecord { + + /** TimeAttackRecord course */ + course: number; + + /** TimeAttackRecord time */ + time?: (number|null); + + /** TimeAttackRecord tunePower */ + tunePower?: (number|null); + + /** TimeAttackRecord tuneHandling */ + tuneHandling?: (number|null); + + /** TimeAttackRecord wholeRank */ + wholeRank?: (number|null); + + /** TimeAttackRecord wholeParticipants */ + wholeParticipants: number; + + /** TimeAttackRecord modelRank */ + modelRank?: (number|null); + + /** TimeAttackRecord modelParticipants */ + modelParticipants: number; + } + + /** Represents a TimeAttackRecord. */ + class TimeAttackRecord implements ITimeAttackRecord { + + /** + * Constructs a new TimeAttackRecord. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord); + + /** TimeAttackRecord course. */ + public course: number; + + /** TimeAttackRecord time. */ + public time: number; + + /** TimeAttackRecord tunePower. */ + public tunePower: number; + + /** TimeAttackRecord tuneHandling. */ + public tuneHandling: number; + + /** TimeAttackRecord wholeRank. */ + public wholeRank: number; + + /** TimeAttackRecord wholeParticipants. */ + public wholeParticipants: number; + + /** TimeAttackRecord modelRank. */ + public modelRank: number; + + /** TimeAttackRecord modelParticipants. */ + public modelParticipants: number; + + /** + * Creates a new TimeAttackRecord instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeAttackRecord instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Encodes the specified TimeAttackRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @param message TimeAttackRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeAttackRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @param message TimeAttackRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Verifies a TimeAttackRecord message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeAttackRecord message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeAttackRecord + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Creates a plain object from a TimeAttackRecord message. Also converts values to other types if specified. + * @param message TimeAttackRecord + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeAttackRecord to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeAttackRecord + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostBattleRecord. */ + interface IGhostBattleRecord { + + /** GhostBattleRecord carSetting */ + carSetting: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting; + + /** GhostBattleRecord opponent */ + opponent: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar; + + /** GhostBattleRecord mobs */ + mobs?: (wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar[]|null); + + /** GhostBattleRecord area */ + area: number; + + /** GhostBattleRecord playedAt */ + playedAt: number; + + /** GhostBattleRecord playedShopName */ + playedShopName: string; + } + + /** Represents a GhostBattleRecord. */ + class GhostBattleRecord implements IGhostBattleRecord { + + /** + * Constructs a new GhostBattleRecord. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord); + + /** GhostBattleRecord carSetting. */ + public carSetting: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting; + + /** GhostBattleRecord opponent. */ + public opponent: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar; + + /** GhostBattleRecord mobs. */ + public mobs: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar[]; + + /** GhostBattleRecord area. */ + public area: number; + + /** GhostBattleRecord playedAt. */ + public playedAt: number; + + /** GhostBattleRecord playedShopName. */ + public playedShopName: string; + + /** + * Creates a new GhostBattleRecord instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleRecord instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Encodes the specified GhostBattleRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @param message GhostBattleRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @param message GhostBattleRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Verifies a GhostBattleRecord message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleRecord message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleRecord + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Creates a plain object from a GhostBattleRecord message. Also converts values to other types if specified. + * @param message GhostBattleRecord + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleRecord to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleRecord + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GhostBattleRecord { + + /** Properties of a GhostCarSetting. */ + interface IGhostCarSetting { + + /** GhostCarSetting tunePower */ + tunePower: number; + + /** GhostCarSetting tuneHandling */ + tuneHandling: number; + } + + /** Represents a GhostCarSetting. */ + class GhostCarSetting implements IGhostCarSetting { + + /** + * Constructs a new GhostCarSetting. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting); + + /** GhostCarSetting tunePower. */ + public tunePower: number; + + /** GhostCarSetting tuneHandling. */ + public tuneHandling: number; + + /** + * Creates a new GhostCarSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCarSetting instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Encodes the specified GhostCarSetting message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @param message GhostCarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCarSetting message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @param message GhostCarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Verifies a GhostCarSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCarSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCarSetting + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Creates a plain object from a GhostCarSetting message. Also converts values to other types if specified. + * @param message GhostCarSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCarSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCarSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostBattleRecordCar. */ + interface IGhostBattleRecordCar { + + /** GhostBattleRecordCar car */ + car: wm.protobuf.ICar; + + /** GhostBattleRecordCar result */ + result: number; + } + + /** Represents a GhostBattleRecordCar. */ + class GhostBattleRecordCar implements IGhostBattleRecordCar { + + /** + * Constructs a new GhostBattleRecordCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar); + + /** GhostBattleRecordCar car. */ + public car: wm.protobuf.ICar; + + /** GhostBattleRecordCar result. */ + public result: number; + + /** + * Creates a new GhostBattleRecordCar instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleRecordCar instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Encodes the specified GhostBattleRecordCar message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @param message GhostBattleRecordCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleRecordCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @param message GhostBattleRecordCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Verifies a GhostBattleRecordCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleRecordCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleRecordCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Creates a plain object from a GhostBattleRecordCar message. Also converts values to other types if specified. + * @param message GhostBattleRecordCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleRecordCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleRecordCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of an UpdateCarRequest. */ + interface IUpdateCarRequest { + + /** UpdateCarRequest carId */ + carId: number; + + /** UpdateCarRequest car */ + car?: (wm.protobuf.ICar|null); + + /** UpdateCarRequest earnedItems */ + earnedItems?: (wm.protobuf.ICarItem[]|null); + + /** UpdateCarRequest setting */ + setting?: (wm.protobuf.ICarSetting|null); + + /** UpdateCarRequest toBeDeleted */ + toBeDeleted?: (boolean|null); + + /** UpdateCarRequest auraMotifAutoChange */ + auraMotifAutoChange?: (boolean|null); + + /** UpdateCarRequest rgStamp */ + rgStamp?: (number|null); + + /** UpdateCarRequest timestamp */ + timestamp: number; + } + + /** Represents an UpdateCarRequest. */ + class UpdateCarRequest implements IUpdateCarRequest { + + /** + * Constructs a new UpdateCarRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateCarRequest); + + /** UpdateCarRequest carId. */ + public carId: number; + + /** UpdateCarRequest car. */ + public car?: (wm.protobuf.ICar|null); + + /** UpdateCarRequest earnedItems. */ + public earnedItems: wm.protobuf.ICarItem[]; + + /** UpdateCarRequest setting. */ + public setting?: (wm.protobuf.ICarSetting|null); + + /** UpdateCarRequest toBeDeleted. */ + public toBeDeleted: boolean; + + /** UpdateCarRequest auraMotifAutoChange. */ + public auraMotifAutoChange: boolean; + + /** UpdateCarRequest rgStamp. */ + public rgStamp: number; + + /** UpdateCarRequest timestamp. */ + public timestamp: number; + + /** + * Creates a new UpdateCarRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCarRequest instance + */ + public static create(properties?: wm.protobuf.IUpdateCarRequest): wm.protobuf.UpdateCarRequest; + + /** + * Encodes the specified UpdateCarRequest message. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @param message UpdateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @param message UpdateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateCarRequest; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateCarRequest; + + /** + * Verifies an UpdateCarRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateCarRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCarRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateCarRequest; + + /** + * Creates a plain object from an UpdateCarRequest message. Also converts values to other types if specified. + * @param message UpdateCarRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateCarRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCarRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCarRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateCarResponse. */ + interface IUpdateCarResponse { + + /** UpdateCarResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents an UpdateCarResponse. */ + class UpdateCarResponse implements IUpdateCarResponse { + + /** + * Constructs a new UpdateCarResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateCarResponse); + + /** UpdateCarResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new UpdateCarResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCarResponse instance + */ + public static create(properties?: wm.protobuf.IUpdateCarResponse): wm.protobuf.UpdateCarResponse; + + /** + * Encodes the specified UpdateCarResponse message. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @param message UpdateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @param message UpdateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateCarResponse; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateCarResponse; + + /** + * Verifies an UpdateCarResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateCarResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCarResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateCarResponse; + + /** + * Creates a plain object from an UpdateCarResponse message. Also converts values to other types if specified. + * @param message UpdateCarResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateCarResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCarResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCarResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveGameResultRequest. */ + interface ISaveGameResultRequest { + + /** SaveGameResultRequest carId */ + carId: number; + + /** SaveGameResultRequest gameMode */ + gameMode: wm.protobuf.GameMode; + + /** SaveGameResultRequest playedAt */ + playedAt: number; + + /** SaveGameResultRequest playCount */ + playCount: number; + + /** SaveGameResultRequest retired */ + retired: boolean; + + /** SaveGameResultRequest timeup */ + timeup: boolean; + + /** SaveGameResultRequest car */ + car?: (wm.protobuf.ICar|null); + + /** SaveGameResultRequest setting */ + setting?: (wm.protobuf.ICarSetting|null); + + /** SaveGameResultRequest odometer */ + odometer?: (number|null); + + /** SaveGameResultRequest earnedCustomColor */ + earnedCustomColor?: (boolean|null); + + /** SaveGameResultRequest confirmedTutorials */ + confirmedTutorials?: (wm.protobuf.TutorialType[]|null); + + /** SaveGameResultRequest earnedItems */ + earnedItems?: (wm.protobuf.ICarItem[]|null); + + /** SaveGameResultRequest earnedUserItems */ + earnedUserItems?: (wm.protobuf.IUserItem[]|null); + + /** SaveGameResultRequest preservedTitles */ + preservedTitles?: (string[]|null); + + /** SaveGameResultRequest neighborCars */ + neighborCars?: (number[]|null); + + /** SaveGameResultRequest stResult */ + stResult?: (wm.protobuf.SaveGameResultRequest.IStoryResult|null); + + /** SaveGameResultRequest taResult */ + taResult?: (wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null); + + /** SaveGameResultRequest vsResult */ + vsResult?: (wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null); + + /** SaveGameResultRequest rgResult */ + rgResult?: (wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null); + } + + /** Represents a SaveGameResultRequest. */ + class SaveGameResultRequest implements ISaveGameResultRequest { + + /** + * Constructs a new SaveGameResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveGameResultRequest); + + /** SaveGameResultRequest carId. */ + public carId: number; + + /** SaveGameResultRequest gameMode. */ + public gameMode: wm.protobuf.GameMode; + + /** SaveGameResultRequest playedAt. */ + public playedAt: number; + + /** SaveGameResultRequest playCount. */ + public playCount: number; + + /** SaveGameResultRequest retired. */ + public retired: boolean; + + /** SaveGameResultRequest timeup. */ + public timeup: boolean; + + /** SaveGameResultRequest car. */ + public car?: (wm.protobuf.ICar|null); + + /** SaveGameResultRequest setting. */ + public setting?: (wm.protobuf.ICarSetting|null); + + /** SaveGameResultRequest odometer. */ + public odometer: number; + + /** SaveGameResultRequest earnedCustomColor. */ + public earnedCustomColor: boolean; + + /** SaveGameResultRequest confirmedTutorials. */ + public confirmedTutorials: wm.protobuf.TutorialType[]; + + /** SaveGameResultRequest earnedItems. */ + public earnedItems: wm.protobuf.ICarItem[]; + + /** SaveGameResultRequest earnedUserItems. */ + public earnedUserItems: wm.protobuf.IUserItem[]; + + /** SaveGameResultRequest preservedTitles. */ + public preservedTitles: string[]; + + /** SaveGameResultRequest neighborCars. */ + public neighborCars: number[]; + + /** SaveGameResultRequest stResult. */ + public stResult?: (wm.protobuf.SaveGameResultRequest.IStoryResult|null); + + /** SaveGameResultRequest taResult. */ + public taResult?: (wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null); + + /** SaveGameResultRequest vsResult. */ + public vsResult?: (wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null); + + /** SaveGameResultRequest rgResult. */ + public rgResult?: (wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null); + + /** + * Creates a new SaveGameResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveGameResultRequest instance + */ + public static create(properties?: wm.protobuf.ISaveGameResultRequest): wm.protobuf.SaveGameResultRequest; + + /** + * Encodes the specified SaveGameResultRequest message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @param message SaveGameResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveGameResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveGameResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @param message SaveGameResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveGameResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest; + + /** + * Verifies a SaveGameResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveGameResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveGameResultRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest; + + /** + * Creates a plain object from a SaveGameResultRequest message. Also converts values to other types if specified. + * @param message SaveGameResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveGameResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveGameResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SaveGameResultRequest { + + /** Properties of a StoryResult. */ + interface IStoryResult { + + /** StoryResult stPlayCount */ + stPlayCount: number; + + /** StoryResult stPlayedStory */ + stPlayedStory: number; + + /** StoryResult tuningPoint */ + tuningPoint?: (number|null); + + /** StoryResult stClearBits */ + stClearBits?: (number|null); + + /** StoryResult stClearDivCount */ + stClearDivCount?: (number|null); + + /** StoryResult stClearCount */ + stClearCount?: (number|null); + + /** StoryResult stLoseBits */ + stLoseBits?: (number|Long|null); + + /** StoryResult stConsecutiveWins */ + stConsecutiveWins?: (number|null); + + /** StoryResult stCompleted_100Episodes */ + stCompleted_100Episodes?: (boolean|null); + + /** StoryResult isInsuranceUsed */ + isInsuranceUsed?: (boolean|null); + } + + /** Represents a StoryResult. */ + class StoryResult implements IStoryResult { + + /** + * Constructs a new StoryResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.IStoryResult); + + /** StoryResult stPlayCount. */ + public stPlayCount: number; + + /** StoryResult stPlayedStory. */ + public stPlayedStory: number; + + /** StoryResult tuningPoint. */ + public tuningPoint: number; + + /** StoryResult stClearBits. */ + public stClearBits: number; + + /** StoryResult stClearDivCount. */ + public stClearDivCount: number; + + /** StoryResult stClearCount. */ + public stClearCount: number; + + /** StoryResult stLoseBits. */ + public stLoseBits: (number|Long); + + /** StoryResult stConsecutiveWins. */ + public stConsecutiveWins: number; + + /** StoryResult stCompleted_100Episodes. */ + public stCompleted_100Episodes: boolean; + + /** StoryResult isInsuranceUsed. */ + public isInsuranceUsed: boolean; + + /** + * Creates a new StoryResult instance using the specified properties. + * @param [properties] Properties to set + * @returns StoryResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.IStoryResult): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Encodes the specified StoryResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @param message StoryResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.IStoryResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoryResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @param message StoryResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.IStoryResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoryResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Decodes a StoryResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Verifies a StoryResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StoryResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoryResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Creates a plain object from a StoryResult message. Also converts values to other types if specified. + * @param message StoryResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.StoryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoryResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoryResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeAttackResult. */ + interface ITimeAttackResult { + + /** TimeAttackResult time */ + time: number; + + /** TimeAttackResult course */ + course: number; + + /** TimeAttackResult isMorning */ + isMorning: boolean; + + /** TimeAttackResult section_1Time */ + section_1Time: number; + + /** TimeAttackResult section_2Time */ + section_2Time: number; + + /** TimeAttackResult section_3Time */ + section_3Time: number; + + /** TimeAttackResult section_4Time */ + section_4Time: number; + + /** TimeAttackResult section_5Time */ + section_5Time?: (number|null); + + /** TimeAttackResult section_6Time */ + section_6Time?: (number|null); + + /** TimeAttackResult section_7Time */ + section_7Time?: (number|null); + + /** TimeAttackResult wholeRank */ + wholeRank?: (number|null); + + /** TimeAttackResult modelRank */ + modelRank?: (number|null); + } + + /** Represents a TimeAttackResult. */ + class TimeAttackResult implements ITimeAttackResult { + + /** + * Constructs a new TimeAttackResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.ITimeAttackResult); + + /** TimeAttackResult time. */ + public time: number; + + /** TimeAttackResult course. */ + public course: number; + + /** TimeAttackResult isMorning. */ + public isMorning: boolean; + + /** TimeAttackResult section_1Time. */ + public section_1Time: number; + + /** TimeAttackResult section_2Time. */ + public section_2Time: number; + + /** TimeAttackResult section_3Time. */ + public section_3Time: number; + + /** TimeAttackResult section_4Time. */ + public section_4Time: number; + + /** TimeAttackResult section_5Time. */ + public section_5Time: number; + + /** TimeAttackResult section_6Time. */ + public section_6Time: number; + + /** TimeAttackResult section_7Time. */ + public section_7Time: number; + + /** TimeAttackResult wholeRank. */ + public wholeRank: number; + + /** TimeAttackResult modelRank. */ + public modelRank: number; + + /** + * Creates a new TimeAttackResult instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeAttackResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.ITimeAttackResult): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Encodes the specified TimeAttackResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @param message TimeAttackResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.ITimeAttackResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeAttackResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @param message TimeAttackResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.ITimeAttackResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Verifies a TimeAttackResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeAttackResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeAttackResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Creates a plain object from a TimeAttackResult message. Also converts values to other types if specified. + * @param message TimeAttackResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.TimeAttackResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeAttackResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeAttackResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VersusBattleResult. */ + interface IVersusBattleResult { + + /** VersusBattleResult result */ + result: number; + + /** VersusBattleResult survived */ + survived: boolean; + + /** VersusBattleResult opponentCarId */ + opponentCarId?: (number[]|null); + + /** VersusBattleResult numOfPlayers */ + numOfPlayers: number; + + /** VersusBattleResult area */ + area: number; + + /** VersusBattleResult isMorning */ + isMorning: boolean; + + /** VersusBattleResult vsPlayCount */ + vsPlayCount: number; + + /** VersusBattleResult vsBurstCount */ + vsBurstCount?: (number|null); + + /** VersusBattleResult vsStarCount */ + vsStarCount?: (number|null); + + /** VersusBattleResult vsCoolOrWild */ + vsCoolOrWild?: (number|null); + + /** VersusBattleResult vsSmoothOrRough */ + vsSmoothOrRough?: (number|null); + + /** VersusBattleResult vsTripleStarMedals */ + vsTripleStarMedals?: (number|null); + + /** VersusBattleResult vsDoubleStarMedals */ + vsDoubleStarMedals?: (number|null); + + /** VersusBattleResult vsSingleStarMedals */ + vsSingleStarMedals?: (number|null); + + /** VersusBattleResult vsPlainMedals */ + vsPlainMedals?: (number|null); + } + + /** Represents a VersusBattleResult. */ + class VersusBattleResult implements IVersusBattleResult { + + /** + * Constructs a new VersusBattleResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.IVersusBattleResult); + + /** VersusBattleResult result. */ + public result: number; + + /** VersusBattleResult survived. */ + public survived: boolean; + + /** VersusBattleResult opponentCarId. */ + public opponentCarId: number[]; + + /** VersusBattleResult numOfPlayers. */ + public numOfPlayers: number; + + /** VersusBattleResult area. */ + public area: number; + + /** VersusBattleResult isMorning. */ + public isMorning: boolean; + + /** VersusBattleResult vsPlayCount. */ + public vsPlayCount: number; + + /** VersusBattleResult vsBurstCount. */ + public vsBurstCount: number; + + /** VersusBattleResult vsStarCount. */ + public vsStarCount: number; + + /** VersusBattleResult vsCoolOrWild. */ + public vsCoolOrWild: number; + + /** VersusBattleResult vsSmoothOrRough. */ + public vsSmoothOrRough: number; + + /** VersusBattleResult vsTripleStarMedals. */ + public vsTripleStarMedals: number; + + /** VersusBattleResult vsDoubleStarMedals. */ + public vsDoubleStarMedals: number; + + /** VersusBattleResult vsSingleStarMedals. */ + public vsSingleStarMedals: number; + + /** VersusBattleResult vsPlainMedals. */ + public vsPlainMedals: number; + + /** + * Creates a new VersusBattleResult instance using the specified properties. + * @param [properties] Properties to set + * @returns VersusBattleResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.IVersusBattleResult): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Encodes the specified VersusBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @param message VersusBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.IVersusBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VersusBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @param message VersusBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.IVersusBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Verifies a VersusBattleResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VersusBattleResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersusBattleResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Creates a plain object from a VersusBattleResult message. Also converts values to other types if specified. + * @param message VersusBattleResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.VersusBattleResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VersusBattleResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VersusBattleResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostBattleResult. */ + interface IGhostBattleResult { + + /** GhostBattleResult opponents */ + opponents?: (wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent[]|null); + + /** GhostBattleResult path */ + path: number; + + /** GhostBattleResult isMorning */ + isMorning: boolean; + + /** GhostBattleResult selectionMethod */ + selectionMethod: wm.protobuf.GhostSelectionMethod; + + /** GhostBattleResult stampSheetCount */ + stampSheetCount?: (number|null); + + /** GhostBattleResult stampSheet */ + stampSheet?: (number[]|null); + + /** GhostBattleResult rgStamp */ + rgStamp?: (number|null); + + /** GhostBattleResult confirmedTransferredStampTargetCarIds */ + confirmedTransferredStampTargetCarIds?: (number[]|null); + + /** GhostBattleResult rgPlayCount */ + rgPlayCount: number; + + /** GhostBattleResult dressupLevel */ + dressupLevel?: (number|null); + + /** GhostBattleResult dressupPoint */ + dressupPoint?: (number|null); + + /** GhostBattleResult rgRegionMapScore */ + rgRegionMapScore?: (number[]|null); + + /** GhostBattleResult competitionId */ + competitionId?: (number|null); + + /** GhostBattleResult periodId */ + periodId?: (number|null); + + /** GhostBattleResult brakingPoint */ + brakingPoint?: (number|null); + + /** GhostBattleResult acquireCrown */ + acquireCrown?: (boolean|null); + + /** GhostBattleResult acquireAllCrowns */ + acquireAllCrowns?: (boolean|null); + } + + /** Represents a GhostBattleResult. */ + class GhostBattleResult implements IGhostBattleResult { + + /** + * Constructs a new GhostBattleResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.IGhostBattleResult); + + /** GhostBattleResult opponents. */ + public opponents: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent[]; + + /** GhostBattleResult path. */ + public path: number; + + /** GhostBattleResult isMorning. */ + public isMorning: boolean; + + /** GhostBattleResult selectionMethod. */ + public selectionMethod: wm.protobuf.GhostSelectionMethod; + + /** GhostBattleResult stampSheetCount. */ + public stampSheetCount: number; + + /** GhostBattleResult stampSheet. */ + public stampSheet: number[]; + + /** GhostBattleResult rgStamp. */ + public rgStamp: number; + + /** GhostBattleResult confirmedTransferredStampTargetCarIds. */ + public confirmedTransferredStampTargetCarIds: number[]; + + /** GhostBattleResult rgPlayCount. */ + public rgPlayCount: number; + + /** GhostBattleResult dressupLevel. */ + public dressupLevel: number; + + /** GhostBattleResult dressupPoint. */ + public dressupPoint: number; + + /** GhostBattleResult rgRegionMapScore. */ + public rgRegionMapScore: number[]; + + /** GhostBattleResult competitionId. */ + public competitionId: number; + + /** GhostBattleResult periodId. */ + public periodId: number; + + /** GhostBattleResult brakingPoint. */ + public brakingPoint: number; + + /** GhostBattleResult acquireCrown. */ + public acquireCrown: boolean; + + /** GhostBattleResult acquireAllCrowns. */ + public acquireAllCrowns: boolean; + + /** + * Creates a new GhostBattleResult instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.IGhostBattleResult): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Encodes the specified GhostBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @param message GhostBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.IGhostBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @param message GhostBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.IGhostBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Verifies a GhostBattleResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Creates a plain object from a GhostBattleResult message. Also converts values to other types if specified. + * @param message GhostBattleResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GhostBattleResult { + + /** Properties of a GhostBattleOpponent. */ + interface IGhostBattleOpponent { + + /** GhostBattleOpponent result */ + result: number; + + /** GhostBattleOpponent carId */ + carId: number; + + /** GhostBattleOpponent tunePower */ + tunePower: number; + + /** GhostBattleOpponent tuneHandling */ + tuneHandling: number; + + /** GhostBattleOpponent receiveStamp */ + receiveStamp?: (boolean|null); + } + + /** Represents a GhostBattleOpponent. */ + class GhostBattleOpponent implements IGhostBattleOpponent { + + /** + * Constructs a new GhostBattleOpponent. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent); + + /** GhostBattleOpponent result. */ + public result: number; + + /** GhostBattleOpponent carId. */ + public carId: number; + + /** GhostBattleOpponent tunePower. */ + public tunePower: number; + + /** GhostBattleOpponent tuneHandling. */ + public tuneHandling: number; + + /** GhostBattleOpponent receiveStamp. */ + public receiveStamp: boolean; + + /** + * Creates a new GhostBattleOpponent instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleOpponent instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Encodes the specified GhostBattleOpponent message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @param message GhostBattleOpponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleOpponent message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @param message GhostBattleOpponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Verifies a GhostBattleOpponent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleOpponent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleOpponent + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Creates a plain object from a GhostBattleOpponent message. Also converts values to other types if specified. + * @param message GhostBattleOpponent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleOpponent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleOpponent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a SaveGameResultResponse. */ + interface ISaveGameResultResponse { + + /** SaveGameResultResponse error */ + error: wm.protobuf.ErrorCode; + + /** SaveGameResultResponse ghostSessionId */ + ghostSessionId?: (number|Long|null); + + /** SaveGameResultResponse availableTickets */ + availableTickets?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a SaveGameResultResponse. */ + class SaveGameResultResponse implements ISaveGameResultResponse { + + /** + * Constructs a new SaveGameResultResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveGameResultResponse); + + /** SaveGameResultResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** SaveGameResultResponse ghostSessionId. */ + public ghostSessionId: (number|Long); + + /** SaveGameResultResponse availableTickets. */ + public availableTickets: wm.protobuf.IUserItem[]; + + /** + * Creates a new SaveGameResultResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveGameResultResponse instance + */ + public static create(properties?: wm.protobuf.ISaveGameResultResponse): wm.protobuf.SaveGameResultResponse; + + /** + * Encodes the specified SaveGameResultResponse message. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @param message SaveGameResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveGameResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveGameResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @param message SaveGameResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveGameResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultResponse; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultResponse; + + /** + * Verifies a SaveGameResultResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveGameResultResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveGameResultResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultResponse; + + /** + * Creates a plain object from a SaveGameResultResponse message. Also converts values to other types if specified. + * @param message SaveGameResultResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveGameResultResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveGameResultResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveChargeRequest. */ + interface ISaveChargeRequest { + + /** SaveChargeRequest chargeLogs */ + chargeLogs?: (wm.protobuf.SaveChargeRequest.IChargeLog[]|null); + } + + /** Represents a SaveChargeRequest. */ + class SaveChargeRequest implements ISaveChargeRequest { + + /** + * Constructs a new SaveChargeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveChargeRequest); + + /** SaveChargeRequest chargeLogs. */ + public chargeLogs: wm.protobuf.SaveChargeRequest.IChargeLog[]; + + /** + * Creates a new SaveChargeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveChargeRequest instance + */ + public static create(properties?: wm.protobuf.ISaveChargeRequest): wm.protobuf.SaveChargeRequest; + + /** + * Encodes the specified SaveChargeRequest message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @param message SaveChargeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveChargeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveChargeRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @param message SaveChargeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveChargeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveChargeRequest; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveChargeRequest; + + /** + * Verifies a SaveChargeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveChargeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveChargeRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveChargeRequest; + + /** + * Creates a plain object from a SaveChargeRequest message. Also converts values to other types if specified. + * @param message SaveChargeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveChargeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveChargeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveChargeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SaveChargeRequest { + + /** Properties of a ChargeLog. */ + interface IChargeLog { + + /** ChargeLog datetime */ + datetime: number; + + /** ChargeLog pcbSerial */ + pcbSerial: string; + + /** ChargeLog placeId */ + placeId: string; + + /** ChargeLog userId */ + userId?: (number|null); + } + + /** Represents a ChargeLog. */ + class ChargeLog implements IChargeLog { + + /** + * Constructs a new ChargeLog. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveChargeRequest.IChargeLog); + + /** ChargeLog datetime. */ + public datetime: number; + + /** ChargeLog pcbSerial. */ + public pcbSerial: string; + + /** ChargeLog placeId. */ + public placeId: string; + + /** ChargeLog userId. */ + public userId: number; + + /** + * Creates a new ChargeLog instance using the specified properties. + * @param [properties] Properties to set + * @returns ChargeLog instance + */ + public static create(properties?: wm.protobuf.SaveChargeRequest.IChargeLog): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Encodes the specified ChargeLog message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @param message ChargeLog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveChargeRequest.IChargeLog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChargeLog message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @param message ChargeLog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveChargeRequest.IChargeLog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChargeLog message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Decodes a ChargeLog message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Verifies a ChargeLog message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChargeLog message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChargeLog + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Creates a plain object from a ChargeLog message. Also converts values to other types if specified. + * @param message ChargeLog + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveChargeRequest.ChargeLog, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChargeLog to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChargeLog + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SaveChargeResponse. */ + interface ISaveChargeResponse { + + /** SaveChargeResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveChargeResponse. */ + class SaveChargeResponse implements ISaveChargeResponse { + + /** + * Constructs a new SaveChargeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveChargeResponse); + + /** SaveChargeResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveChargeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveChargeResponse instance + */ + public static create(properties?: wm.protobuf.ISaveChargeResponse): wm.protobuf.SaveChargeResponse; + + /** + * Encodes the specified SaveChargeResponse message. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @param message SaveChargeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveChargeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveChargeResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @param message SaveChargeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveChargeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveChargeResponse; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveChargeResponse; + + /** + * Verifies a SaveChargeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveChargeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveChargeResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveChargeResponse; + + /** + * Creates a plain object from a SaveChargeResponse message. Also converts values to other types if specified. + * @param message SaveChargeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveChargeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveChargeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveChargeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostBattleInfoRequest. */ + interface ILoadGhostBattleInfoRequest { + + /** LoadGhostBattleInfoRequest carId */ + carId: number; + } + + /** Represents a LoadGhostBattleInfoRequest. */ + class LoadGhostBattleInfoRequest implements ILoadGhostBattleInfoRequest { + + /** + * Constructs a new LoadGhostBattleInfoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostBattleInfoRequest); + + /** LoadGhostBattleInfoRequest carId. */ + public carId: number; + + /** + * Creates a new LoadGhostBattleInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostBattleInfoRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostBattleInfoRequest): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @param message LoadGhostBattleInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostBattleInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @param message LoadGhostBattleInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostBattleInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Verifies a LoadGhostBattleInfoRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostBattleInfoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostBattleInfoRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Creates a plain object from a LoadGhostBattleInfoRequest message. Also converts values to other types if specified. + * @param message LoadGhostBattleInfoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostBattleInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostBattleInfoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostBattleInfoRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostBattleInfoResponse. */ + interface ILoadGhostBattleInfoResponse { + + /** LoadGhostBattleInfoResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostBattleInfoResponse friendCars */ + friendCars?: (wm.protobuf.IFriendCar[]|null); + + /** LoadGhostBattleInfoResponse challengers */ + challengers?: (wm.protobuf.IChallengerCar[]|null); + + /** LoadGhostBattleInfoResponse stampTargetCars */ + stampTargetCars?: (wm.protobuf.IStampTargetCar[]|null); + + /** LoadGhostBattleInfoResponse previousVersionStampTargetCars */ + previousVersionStampTargetCars?: (wm.protobuf.IPreviousVersionStampTargetCar[]|null); + + /** LoadGhostBattleInfoResponse bookmarkedCars */ + bookmarkedCars?: (wm.protobuf.IBookmarkedCar[]|null); + + /** LoadGhostBattleInfoResponse history */ + history?: (wm.protobuf.ICar[]|null); + + /** LoadGhostBattleInfoResponse weakenedCars */ + weakenedCars?: (wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar[]|null); + + /** LoadGhostBattleInfoResponse stampSheetCount */ + stampSheetCount: number; + + /** LoadGhostBattleInfoResponse stampSheet */ + stampSheet?: (number[]|null); + + /** LoadGhostBattleInfoResponse stampReturnStats */ + stampReturnStats?: (number[]|null); + } + + /** Represents a LoadGhostBattleInfoResponse. */ + class LoadGhostBattleInfoResponse implements ILoadGhostBattleInfoResponse { + + /** + * Constructs a new LoadGhostBattleInfoResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostBattleInfoResponse); + + /** LoadGhostBattleInfoResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostBattleInfoResponse friendCars. */ + public friendCars: wm.protobuf.IFriendCar[]; + + /** LoadGhostBattleInfoResponse challengers. */ + public challengers: wm.protobuf.IChallengerCar[]; + + /** LoadGhostBattleInfoResponse stampTargetCars. */ + public stampTargetCars: wm.protobuf.IStampTargetCar[]; + + /** LoadGhostBattleInfoResponse previousVersionStampTargetCars. */ + public previousVersionStampTargetCars: wm.protobuf.IPreviousVersionStampTargetCar[]; + + /** LoadGhostBattleInfoResponse bookmarkedCars. */ + public bookmarkedCars: wm.protobuf.IBookmarkedCar[]; + + /** LoadGhostBattleInfoResponse history. */ + public history: wm.protobuf.ICar[]; + + /** LoadGhostBattleInfoResponse weakenedCars. */ + public weakenedCars: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar[]; + + /** LoadGhostBattleInfoResponse stampSheetCount. */ + public stampSheetCount: number; + + /** LoadGhostBattleInfoResponse stampSheet. */ + public stampSheet: number[]; + + /** LoadGhostBattleInfoResponse stampReturnStats. */ + public stampReturnStats: number[]; + + /** + * Creates a new LoadGhostBattleInfoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostBattleInfoResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostBattleInfoResponse): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @param message LoadGhostBattleInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostBattleInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @param message LoadGhostBattleInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostBattleInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Verifies a LoadGhostBattleInfoResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostBattleInfoResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostBattleInfoResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Creates a plain object from a LoadGhostBattleInfoResponse message. Also converts values to other types if specified. + * @param message LoadGhostBattleInfoResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostBattleInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostBattleInfoResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostBattleInfoResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGhostBattleInfoResponse { + + /** Properties of a WeakenedCar. */ + interface IWeakenedCar { + + /** WeakenedCar carId */ + carId: number; + + /** WeakenedCar consecutiveLosses */ + consecutiveLosses: number; + } + + /** Represents a WeakenedCar. */ + class WeakenedCar implements IWeakenedCar { + + /** + * Constructs a new WeakenedCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar); + + /** WeakenedCar carId. */ + public carId: number; + + /** WeakenedCar consecutiveLosses. */ + public consecutiveLosses: number; + + /** + * Creates a new WeakenedCar instance using the specified properties. + * @param [properties] Properties to set + * @returns WeakenedCar instance + */ + public static create(properties?: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Encodes the specified WeakenedCar message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @param message WeakenedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeakenedCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @param message WeakenedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Verifies a WeakenedCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WeakenedCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeakenedCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Creates a plain object from a WeakenedCar message. Also converts values to other types if specified. + * @param message WeakenedCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeakenedCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WeakenedCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadStampTargetRequest. */ + interface ILoadStampTargetRequest { + + /** LoadStampTargetRequest carId */ + carId: number; + + /** LoadStampTargetRequest needToPromote */ + needToPromote: boolean; + } + + /** Represents a LoadStampTargetRequest. */ + class LoadStampTargetRequest implements ILoadStampTargetRequest { + + /** + * Constructs a new LoadStampTargetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadStampTargetRequest); + + /** LoadStampTargetRequest carId. */ + public carId: number; + + /** LoadStampTargetRequest needToPromote. */ + public needToPromote: boolean; + + /** + * Creates a new LoadStampTargetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadStampTargetRequest instance + */ + public static create(properties?: wm.protobuf.ILoadStampTargetRequest): wm.protobuf.LoadStampTargetRequest; + + /** + * Encodes the specified LoadStampTargetRequest message. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @param message LoadStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @param message LoadStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadStampTargetRequest; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadStampTargetRequest; + + /** + * Verifies a LoadStampTargetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadStampTargetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadStampTargetRequest; + + /** + * Creates a plain object from a LoadStampTargetRequest message. Also converts values to other types if specified. + * @param message LoadStampTargetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadStampTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadStampTargetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadStampTargetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadStampTargetResponse. */ + interface ILoadStampTargetResponse { + + /** LoadStampTargetResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadStampTargetResponse cars */ + cars?: (wm.protobuf.IStampTargetCar[]|null); + + /** LoadStampTargetResponse challengers */ + challengers?: (wm.protobuf.IChallengerCar[]|null); + } + + /** Represents a LoadStampTargetResponse. */ + class LoadStampTargetResponse implements ILoadStampTargetResponse { + + /** + * Constructs a new LoadStampTargetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadStampTargetResponse); + + /** LoadStampTargetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadStampTargetResponse cars. */ + public cars: wm.protobuf.IStampTargetCar[]; + + /** LoadStampTargetResponse challengers. */ + public challengers: wm.protobuf.IChallengerCar[]; + + /** + * Creates a new LoadStampTargetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadStampTargetResponse instance + */ + public static create(properties?: wm.protobuf.ILoadStampTargetResponse): wm.protobuf.LoadStampTargetResponse; + + /** + * Encodes the specified LoadStampTargetResponse message. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @param message LoadStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @param message LoadStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadStampTargetResponse; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadStampTargetResponse; + + /** + * Verifies a LoadStampTargetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadStampTargetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadStampTargetResponse; + + /** + * Creates a plain object from a LoadStampTargetResponse message. Also converts values to other types if specified. + * @param message LoadStampTargetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadStampTargetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadStampTargetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadStampTargetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LockStampTargetRequest. */ + interface ILockStampTargetRequest { + + /** LockStampTargetRequest carId */ + carId: number; + + /** LockStampTargetRequest targetCars */ + targetCars?: (number[]|null); + } + + /** Represents a LockStampTargetRequest. */ + class LockStampTargetRequest implements ILockStampTargetRequest { + + /** + * Constructs a new LockStampTargetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILockStampTargetRequest); + + /** LockStampTargetRequest carId. */ + public carId: number; + + /** LockStampTargetRequest targetCars. */ + public targetCars: number[]; + + /** + * Creates a new LockStampTargetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LockStampTargetRequest instance + */ + public static create(properties?: wm.protobuf.ILockStampTargetRequest): wm.protobuf.LockStampTargetRequest; + + /** + * Encodes the specified LockStampTargetRequest message. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @param message LockStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILockStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LockStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @param message LockStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILockStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LockStampTargetRequest; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LockStampTargetRequest; + + /** + * Verifies a LockStampTargetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LockStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LockStampTargetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LockStampTargetRequest; + + /** + * Creates a plain object from a LockStampTargetRequest message. Also converts values to other types if specified. + * @param message LockStampTargetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LockStampTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LockStampTargetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LockStampTargetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LockStampTargetResponse. */ + interface ILockStampTargetResponse { + + /** LockStampTargetResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a LockStampTargetResponse. */ + class LockStampTargetResponse implements ILockStampTargetResponse { + + /** + * Constructs a new LockStampTargetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILockStampTargetResponse); + + /** LockStampTargetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new LockStampTargetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LockStampTargetResponse instance + */ + public static create(properties?: wm.protobuf.ILockStampTargetResponse): wm.protobuf.LockStampTargetResponse; + + /** + * Encodes the specified LockStampTargetResponse message. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @param message LockStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILockStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LockStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @param message LockStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILockStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LockStampTargetResponse; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LockStampTargetResponse; + + /** + * Verifies a LockStampTargetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LockStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LockStampTargetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LockStampTargetResponse; + + /** + * Creates a plain object from a LockStampTargetResponse message. Also converts values to other types if specified. + * @param message LockStampTargetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LockStampTargetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LockStampTargetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LockStampTargetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionInfoRequest. */ + interface ILoadGhostCompetitionInfoRequest { + + /** LoadGhostCompetitionInfoRequest carId */ + carId: number; + + /** LoadGhostCompetitionInfoRequest competitionId */ + competitionId: number; + } + + /** Represents a LoadGhostCompetitionInfoRequest. */ + class LoadGhostCompetitionInfoRequest implements ILoadGhostCompetitionInfoRequest { + + /** + * Constructs a new LoadGhostCompetitionInfoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionInfoRequest); + + /** LoadGhostCompetitionInfoRequest carId. */ + public carId: number; + + /** LoadGhostCompetitionInfoRequest competitionId. */ + public competitionId: number; + + /** + * Creates a new LoadGhostCompetitionInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionInfoRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionInfoRequest): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @param message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @param message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Verifies a LoadGhostCompetitionInfoRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionInfoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionInfoRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoRequest message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionInfoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionInfoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionInfoResponse. */ + interface ILoadGhostCompetitionInfoResponse { + + /** LoadGhostCompetitionInfoResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionInfoResponse periodId */ + periodId?: (number|null); + + /** LoadGhostCompetitionInfoResponse closed */ + closed: boolean; + + /** LoadGhostCompetitionInfoResponse brakingPoint */ + brakingPoint?: (number|null); + + /** LoadGhostCompetitionInfoResponse qualified */ + qualified?: (boolean|null); + + /** LoadGhostCompetitionInfoResponse topResults */ + topResults?: (number[]|null); + + /** LoadGhostCompetitionInfoResponse result */ + result?: (number|null); + + /** LoadGhostCompetitionInfoResponse rank */ + rank?: (number|null); + + /** LoadGhostCompetitionInfoResponse parameters1 */ + parameters1?: (number[]|null); + + /** LoadGhostCompetitionInfoResponse parameters2 */ + parameters2?: (boolean|null); + } + + /** Represents a LoadGhostCompetitionInfoResponse. */ + class LoadGhostCompetitionInfoResponse implements ILoadGhostCompetitionInfoResponse { + + /** + * Constructs a new LoadGhostCompetitionInfoResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionInfoResponse); + + /** LoadGhostCompetitionInfoResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionInfoResponse periodId. */ + public periodId: number; + + /** LoadGhostCompetitionInfoResponse closed. */ + public closed: boolean; + + /** LoadGhostCompetitionInfoResponse brakingPoint. */ + public brakingPoint: number; + + /** LoadGhostCompetitionInfoResponse qualified. */ + public qualified: boolean; + + /** LoadGhostCompetitionInfoResponse topResults. */ + public topResults: number[]; + + /** LoadGhostCompetitionInfoResponse result. */ + public result: number; + + /** LoadGhostCompetitionInfoResponse rank. */ + public rank: number; + + /** LoadGhostCompetitionInfoResponse parameters1. */ + public parameters1: number[]; + + /** LoadGhostCompetitionInfoResponse parameters2. */ + public parameters2: boolean; + + /** + * Creates a new LoadGhostCompetitionInfoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionInfoResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionInfoResponse): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @param message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @param message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Verifies a LoadGhostCompetitionInfoResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionInfoResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionInfoResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoResponse message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionInfoResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionInfoResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTimeAttackRecordRequest. */ + interface ILoadTimeAttackRecordRequest { + + /** LoadTimeAttackRecordRequest carId */ + carId?: (number|null); + + /** LoadTimeAttackRecordRequest model */ + model: number; + + /** LoadTimeAttackRecordRequest course */ + course: number; + } + + /** Represents a LoadTimeAttackRecordRequest. */ + class LoadTimeAttackRecordRequest implements ILoadTimeAttackRecordRequest { + + /** + * Constructs a new LoadTimeAttackRecordRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTimeAttackRecordRequest); + + /** LoadTimeAttackRecordRequest carId. */ + public carId: number; + + /** LoadTimeAttackRecordRequest model. */ + public model: number; + + /** LoadTimeAttackRecordRequest course. */ + public course: number; + + /** + * Creates a new LoadTimeAttackRecordRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTimeAttackRecordRequest instance + */ + public static create(properties?: wm.protobuf.ILoadTimeAttackRecordRequest): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @param message LoadTimeAttackRecordRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTimeAttackRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @param message LoadTimeAttackRecordRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTimeAttackRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Verifies a LoadTimeAttackRecordRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTimeAttackRecordRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTimeAttackRecordRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Creates a plain object from a LoadTimeAttackRecordRequest message. Also converts values to other types if specified. + * @param message LoadTimeAttackRecordRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTimeAttackRecordRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTimeAttackRecordRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTimeAttackRecordRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTimeAttackRecordResponse. */ + interface ILoadTimeAttackRecordResponse { + + /** LoadTimeAttackRecordResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadTimeAttackRecordResponse wholeRanking */ + wholeRanking?: (number[]|null); + + /** LoadTimeAttackRecordResponse modelRanking */ + modelRanking?: (number[]|null); + + /** LoadTimeAttackRecordResponse personalBestTime */ + personalBestTime?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_1Time */ + pbSection_1Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_2Time */ + pbSection_2Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_3Time */ + pbSection_3Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_4Time */ + pbSection_4Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_5Time */ + pbSection_5Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_6Time */ + pbSection_6Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_7Time */ + pbSection_7Time?: (number|null); + } + + /** Represents a LoadTimeAttackRecordResponse. */ + class LoadTimeAttackRecordResponse implements ILoadTimeAttackRecordResponse { + + /** + * Constructs a new LoadTimeAttackRecordResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTimeAttackRecordResponse); + + /** LoadTimeAttackRecordResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadTimeAttackRecordResponse wholeRanking. */ + public wholeRanking: number[]; + + /** LoadTimeAttackRecordResponse modelRanking. */ + public modelRanking: number[]; + + /** LoadTimeAttackRecordResponse personalBestTime. */ + public personalBestTime: number; + + /** LoadTimeAttackRecordResponse pbSection_1Time. */ + public pbSection_1Time: number; + + /** LoadTimeAttackRecordResponse pbSection_2Time. */ + public pbSection_2Time: number; + + /** LoadTimeAttackRecordResponse pbSection_3Time. */ + public pbSection_3Time: number; + + /** LoadTimeAttackRecordResponse pbSection_4Time. */ + public pbSection_4Time: number; + + /** LoadTimeAttackRecordResponse pbSection_5Time. */ + public pbSection_5Time: number; + + /** LoadTimeAttackRecordResponse pbSection_6Time. */ + public pbSection_6Time: number; + + /** LoadTimeAttackRecordResponse pbSection_7Time. */ + public pbSection_7Time: number; + + /** + * Creates a new LoadTimeAttackRecordResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTimeAttackRecordResponse instance + */ + public static create(properties?: wm.protobuf.ILoadTimeAttackRecordResponse): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @param message LoadTimeAttackRecordResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTimeAttackRecordResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @param message LoadTimeAttackRecordResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTimeAttackRecordResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Verifies a LoadTimeAttackRecordResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTimeAttackRecordResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTimeAttackRecordResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Creates a plain object from a LoadTimeAttackRecordResponse message. Also converts values to other types if specified. + * @param message LoadTimeAttackRecordResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTimeAttackRecordResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTimeAttackRecordResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTimeAttackRecordResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveTerminalResultRequest. */ + interface ISaveTerminalResultRequest { + + /** SaveTerminalResultRequest userId */ + userId: number; + + /** SaveTerminalResultRequest timestamp */ + timestamp: number; + + /** SaveTerminalResultRequest carOrder */ + carOrder?: (number[]|null); + + /** SaveTerminalResultRequest confirmedTutorials */ + confirmedTutorials?: (wm.protobuf.TutorialType[]|null); + + /** SaveTerminalResultRequest garageMenuEntered */ + garageMenuEntered?: (boolean|null); + } + + /** Represents a SaveTerminalResultRequest. */ + class SaveTerminalResultRequest implements ISaveTerminalResultRequest { + + /** + * Constructs a new SaveTerminalResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveTerminalResultRequest); + + /** SaveTerminalResultRequest userId. */ + public userId: number; + + /** SaveTerminalResultRequest timestamp. */ + public timestamp: number; + + /** SaveTerminalResultRequest carOrder. */ + public carOrder: number[]; + + /** SaveTerminalResultRequest confirmedTutorials. */ + public confirmedTutorials: wm.protobuf.TutorialType[]; + + /** SaveTerminalResultRequest garageMenuEntered. */ + public garageMenuEntered: boolean; + + /** + * Creates a new SaveTerminalResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveTerminalResultRequest instance + */ + public static create(properties?: wm.protobuf.ISaveTerminalResultRequest): wm.protobuf.SaveTerminalResultRequest; + + /** + * Encodes the specified SaveTerminalResultRequest message. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @param message SaveTerminalResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveTerminalResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveTerminalResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @param message SaveTerminalResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveTerminalResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveTerminalResultRequest; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveTerminalResultRequest; + + /** + * Verifies a SaveTerminalResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveTerminalResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveTerminalResultRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveTerminalResultRequest; + + /** + * Creates a plain object from a SaveTerminalResultRequest message. Also converts values to other types if specified. + * @param message SaveTerminalResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveTerminalResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveTerminalResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveTerminalResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveTerminalResultResponse. */ + interface ISaveTerminalResultResponse { + + /** SaveTerminalResultResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveTerminalResultResponse. */ + class SaveTerminalResultResponse implements ISaveTerminalResultResponse { + + /** + * Constructs a new SaveTerminalResultResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveTerminalResultResponse); + + /** SaveTerminalResultResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveTerminalResultResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveTerminalResultResponse instance + */ + public static create(properties?: wm.protobuf.ISaveTerminalResultResponse): wm.protobuf.SaveTerminalResultResponse; + + /** + * Encodes the specified SaveTerminalResultResponse message. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @param message SaveTerminalResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveTerminalResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveTerminalResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @param message SaveTerminalResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveTerminalResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveTerminalResultResponse; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveTerminalResultResponse; + + /** + * Verifies a SaveTerminalResultResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveTerminalResultResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveTerminalResultResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveTerminalResultResponse; + + /** + * Creates a plain object from a SaveTerminalResultResponse message. Also converts values to other types if specified. + * @param message SaveTerminalResultResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveTerminalResultResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveTerminalResultResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveTerminalResultResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PingRequest. */ + interface IPingRequest { + + /** PingRequest ping */ + ping?: (number|null); + } + + /** Represents a PingRequest. */ + class PingRequest implements IPingRequest { + + /** + * Constructs a new PingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPingRequest); + + /** PingRequest ping. */ + public ping: number; + + /** + * Creates a new PingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PingRequest instance + */ + public static create(properties?: wm.protobuf.IPingRequest): wm.protobuf.PingRequest; + + /** + * Encodes the specified PingRequest message. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @param message PingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PingRequest message, length delimited. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @param message PingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PingRequest; + + /** + * Decodes a PingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PingRequest; + + /** + * Verifies a PingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PingRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PingRequest; + + /** + * Creates a plain object from a PingRequest message. Also converts values to other types if specified. + * @param message PingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PingResponse. */ + interface IPingResponse { + + /** PingResponse error */ + error: wm.protobuf.ErrorCode; + + /** PingResponse pong */ + pong: number; + } + + /** Represents a PingResponse. */ + class PingResponse implements IPingResponse { + + /** + * Constructs a new PingResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPingResponse); + + /** PingResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** PingResponse pong. */ + public pong: number; + + /** + * Creates a new PingResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PingResponse instance + */ + public static create(properties?: wm.protobuf.IPingResponse): wm.protobuf.PingResponse; + + /** + * Encodes the specified PingResponse message. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @param message PingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PingResponse message, length delimited. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @param message PingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PingResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PingResponse; + + /** + * Decodes a PingResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PingResponse; + + /** + * Verifies a PingResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PingResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PingResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PingResponse; + + /** + * Creates a plain object from a PingResponse message. Also converts values to other types if specified. + * @param message PingResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PingResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PingResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PingResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTerminalInformationRequest. */ + interface ILoadTerminalInformationRequest { + + /** LoadTerminalInformationRequest userId */ + userId: number; + } + + /** Represents a LoadTerminalInformationRequest. */ + class LoadTerminalInformationRequest implements ILoadTerminalInformationRequest { + + /** + * Constructs a new LoadTerminalInformationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTerminalInformationRequest); + + /** LoadTerminalInformationRequest userId. */ + public userId: number; + + /** + * Creates a new LoadTerminalInformationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTerminalInformationRequest instance + */ + public static create(properties?: wm.protobuf.ILoadTerminalInformationRequest): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Encodes the specified LoadTerminalInformationRequest message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @param message LoadTerminalInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTerminalInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTerminalInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @param message LoadTerminalInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTerminalInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Verifies a LoadTerminalInformationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTerminalInformationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTerminalInformationRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Creates a plain object from a LoadTerminalInformationRequest message. Also converts values to other types if specified. + * @param message LoadTerminalInformationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTerminalInformationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTerminalInformationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTerminalInformationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTerminalInformationResponse. */ + interface ILoadTerminalInformationResponse { + + /** LoadTerminalInformationResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadTerminalInformationResponse prizeReceivable */ + prizeReceivable: boolean; + + /** LoadTerminalInformationResponse noticeEntries */ + noticeEntries?: (wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice[]|null); + + /** LoadTerminalInformationResponse noticeMessage */ + noticeMessage?: (string[]|null); + + /** LoadTerminalInformationResponse noticeWindow */ + noticeWindow?: (wm.protobuf.NoticeEntry[]|null); + + /** LoadTerminalInformationResponse noticeWindowMessage */ + noticeWindowMessage?: (string[]|null); + + /** LoadTerminalInformationResponse transferNotice */ + transferNotice: wm.protobuf.ITransferNotice; + + /** LoadTerminalInformationResponse announceFeature */ + announceFeature: boolean; + + /** LoadTerminalInformationResponse freeScratched */ + freeScratched: boolean; + + /** LoadTerminalInformationResponse restrictedModels */ + restrictedModels?: (number[]|null); + } + + /** Represents a LoadTerminalInformationResponse. */ + class LoadTerminalInformationResponse implements ILoadTerminalInformationResponse { + + /** + * Constructs a new LoadTerminalInformationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTerminalInformationResponse); + + /** LoadTerminalInformationResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadTerminalInformationResponse prizeReceivable. */ + public prizeReceivable: boolean; + + /** LoadTerminalInformationResponse noticeEntries. */ + public noticeEntries: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice[]; + + /** LoadTerminalInformationResponse noticeMessage. */ + public noticeMessage: string[]; + + /** LoadTerminalInformationResponse noticeWindow. */ + public noticeWindow: wm.protobuf.NoticeEntry[]; + + /** LoadTerminalInformationResponse noticeWindowMessage. */ + public noticeWindowMessage: string[]; + + /** LoadTerminalInformationResponse transferNotice. */ + public transferNotice: wm.protobuf.ITransferNotice; + + /** LoadTerminalInformationResponse announceFeature. */ + public announceFeature: boolean; + + /** LoadTerminalInformationResponse freeScratched. */ + public freeScratched: boolean; + + /** LoadTerminalInformationResponse restrictedModels. */ + public restrictedModels: number[]; + + /** + * Creates a new LoadTerminalInformationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTerminalInformationResponse instance + */ + public static create(properties?: wm.protobuf.ILoadTerminalInformationResponse): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Encodes the specified LoadTerminalInformationResponse message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @param message LoadTerminalInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTerminalInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTerminalInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @param message LoadTerminalInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTerminalInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Verifies a LoadTerminalInformationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTerminalInformationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTerminalInformationResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Creates a plain object from a LoadTerminalInformationResponse message. Also converts values to other types if specified. + * @param message LoadTerminalInformationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTerminalInformationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTerminalInformationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTerminalInformationResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadTerminalInformationResponse { + + /** Properties of a TerminalNotice. */ + interface ITerminalNotice { + + /** TerminalNotice noticeType */ + noticeType: wm.protobuf.NoticeEntry; + + /** TerminalNotice field_1 */ + field_1?: (string|null); + + /** TerminalNotice field_2 */ + field_2?: (number|null); + + /** TerminalNotice field_3 */ + field_3?: (number|null); + } + + /** Represents a TerminalNotice. */ + class TerminalNotice implements ITerminalNotice { + + /** + * Constructs a new TerminalNotice. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice); + + /** TerminalNotice noticeType. */ + public noticeType: wm.protobuf.NoticeEntry; + + /** TerminalNotice field_1. */ + public field_1: string; + + /** TerminalNotice field_2. */ + public field_2: number; + + /** TerminalNotice field_3. */ + public field_3: number; + + /** + * Creates a new TerminalNotice instance using the specified properties. + * @param [properties] Properties to set + * @returns TerminalNotice instance + */ + public static create(properties?: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Encodes the specified TerminalNotice message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @param message TerminalNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerminalNotice message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @param message TerminalNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Verifies a TerminalNotice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerminalNotice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerminalNotice + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Creates a plain object from a TerminalNotice message. Also converts values to other types if specified. + * @param message TerminalNotice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTerminalInformationResponse.TerminalNotice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerminalNotice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerminalNotice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateUserRequest. */ + interface ICreateUserRequest { + + /** CreateUserRequest banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateUserRequest cardChipId */ + cardChipId?: (string|null); + + /** CreateUserRequest accessCode */ + accessCode?: (string|null); + + /** CreateUserRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** CreateUserRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** CreateUserRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** CreateUserRequest timestamp */ + timestamp: number; + } + + /** Represents a CreateUserRequest. */ + class CreateUserRequest implements ICreateUserRequest { + + /** + * Constructs a new CreateUserRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateUserRequest); + + /** CreateUserRequest banapassportAmId. */ + public banapassportAmId: number; + + /** CreateUserRequest cardChipId. */ + public cardChipId: string; + + /** CreateUserRequest accessCode. */ + public accessCode: string; + + /** CreateUserRequest cardTypeCode. */ + public cardTypeCode: number; + + /** CreateUserRequest cardRegionCode. */ + public cardRegionCode: number; + + /** CreateUserRequest device. */ + public device: wm.protobuf.DeviceType; + + /** CreateUserRequest timestamp. */ + public timestamp: number; + + /** + * Creates a new CreateUserRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserRequest instance + */ + public static create(properties?: wm.protobuf.ICreateUserRequest): wm.protobuf.CreateUserRequest; + + /** + * Encodes the specified CreateUserRequest message. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @param message CreateUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @param message CreateUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateUserRequest; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateUserRequest; + + /** + * Verifies a CreateUserRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateUserRequest; + + /** + * Creates a plain object from a CreateUserRequest message. Also converts values to other types if specified. + * @param message CreateUserRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateUserRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateUserResponse. */ + interface ICreateUserResponse { + + /** CreateUserResponse error */ + error: wm.protobuf.ErrorCode; + + /** CreateUserResponse accessCode */ + accessCode?: (string|null); + + /** CreateUserResponse banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateUserResponse mbid */ + mbid?: (number|null); + + /** CreateUserResponse userId */ + userId: number; + } + + /** Represents a CreateUserResponse. */ + class CreateUserResponse implements ICreateUserResponse { + + /** + * Constructs a new CreateUserResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateUserResponse); + + /** CreateUserResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** CreateUserResponse accessCode. */ + public accessCode: string; + + /** CreateUserResponse banapassportAmId. */ + public banapassportAmId: number; + + /** CreateUserResponse mbid. */ + public mbid: number; + + /** CreateUserResponse userId. */ + public userId: number; + + /** + * Creates a new CreateUserResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserResponse instance + */ + public static create(properties?: wm.protobuf.ICreateUserResponse): wm.protobuf.CreateUserResponse; + + /** + * Encodes the specified CreateUserResponse message. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @param message CreateUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @param message CreateUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateUserResponse; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateUserResponse; + + /** + * Verifies a CreateUserResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateUserResponse; + + /** + * Creates a plain object from a CreateUserResponse message. Also converts values to other types if specified. + * @param message CreateUserResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateUserResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AskAccessCodeRequest. */ + interface IAskAccessCodeRequest { + + /** AskAccessCodeRequest cardChipId */ + cardChipId: string; + } + + /** Represents an AskAccessCodeRequest. */ + class AskAccessCodeRequest implements IAskAccessCodeRequest { + + /** + * Constructs a new AskAccessCodeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IAskAccessCodeRequest); + + /** AskAccessCodeRequest cardChipId. */ + public cardChipId: string; + + /** + * Creates a new AskAccessCodeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AskAccessCodeRequest instance + */ + public static create(properties?: wm.protobuf.IAskAccessCodeRequest): wm.protobuf.AskAccessCodeRequest; + + /** + * Encodes the specified AskAccessCodeRequest message. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @param message AskAccessCodeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IAskAccessCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AskAccessCodeRequest message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @param message AskAccessCodeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IAskAccessCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.AskAccessCodeRequest; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.AskAccessCodeRequest; + + /** + * Verifies an AskAccessCodeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AskAccessCodeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AskAccessCodeRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.AskAccessCodeRequest; + + /** + * Creates a plain object from an AskAccessCodeRequest message. Also converts values to other types if specified. + * @param message AskAccessCodeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.AskAccessCodeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AskAccessCodeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AskAccessCodeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AskAccessCodeResponse. */ + interface IAskAccessCodeResponse { + + /** AskAccessCodeResponse error */ + error: wm.protobuf.ErrorCode; + + /** AskAccessCodeResponse accessCode */ + accessCode: string; + } + + /** Represents an AskAccessCodeResponse. */ + class AskAccessCodeResponse implements IAskAccessCodeResponse { + + /** + * Constructs a new AskAccessCodeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IAskAccessCodeResponse); + + /** AskAccessCodeResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** AskAccessCodeResponse accessCode. */ + public accessCode: string; + + /** + * Creates a new AskAccessCodeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AskAccessCodeResponse instance + */ + public static create(properties?: wm.protobuf.IAskAccessCodeResponse): wm.protobuf.AskAccessCodeResponse; + + /** + * Encodes the specified AskAccessCodeResponse message. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @param message AskAccessCodeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IAskAccessCodeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AskAccessCodeResponse message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @param message AskAccessCodeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IAskAccessCodeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.AskAccessCodeResponse; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.AskAccessCodeResponse; + + /** + * Verifies an AskAccessCodeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AskAccessCodeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AskAccessCodeResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.AskAccessCodeResponse; + + /** + * Creates a plain object from an AskAccessCodeResponse message. Also converts values to other types if specified. + * @param message AskAccessCodeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.AskAccessCodeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AskAccessCodeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AskAccessCodeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterOpponentGhostRequest. */ + interface IRegisterOpponentGhostRequest { + + /** RegisterOpponentGhostRequest carId */ + carId: number; + + /** RegisterOpponentGhostRequest specialGhostId */ + specialGhostId: number; + } + + /** Represents a RegisterOpponentGhostRequest. */ + class RegisterOpponentGhostRequest implements IRegisterOpponentGhostRequest { + + /** + * Constructs a new RegisterOpponentGhostRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterOpponentGhostRequest); + + /** RegisterOpponentGhostRequest carId. */ + public carId: number; + + /** RegisterOpponentGhostRequest specialGhostId. */ + public specialGhostId: number; + + /** + * Creates a new RegisterOpponentGhostRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterOpponentGhostRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterOpponentGhostRequest): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Encodes the specified RegisterOpponentGhostRequest message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @param message RegisterOpponentGhostRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterOpponentGhostRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterOpponentGhostRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @param message RegisterOpponentGhostRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterOpponentGhostRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Verifies a RegisterOpponentGhostRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterOpponentGhostRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterOpponentGhostRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Creates a plain object from a RegisterOpponentGhostRequest message. Also converts values to other types if specified. + * @param message RegisterOpponentGhostRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterOpponentGhostRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterOpponentGhostRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterOpponentGhostRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterOpponentGhostResponse. */ + interface IRegisterOpponentGhostResponse { + + /** RegisterOpponentGhostResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a RegisterOpponentGhostResponse. */ + class RegisterOpponentGhostResponse implements IRegisterOpponentGhostResponse { + + /** + * Constructs a new RegisterOpponentGhostResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterOpponentGhostResponse); + + /** RegisterOpponentGhostResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new RegisterOpponentGhostResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterOpponentGhostResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterOpponentGhostResponse): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Encodes the specified RegisterOpponentGhostResponse message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @param message RegisterOpponentGhostResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterOpponentGhostResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterOpponentGhostResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @param message RegisterOpponentGhostResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterOpponentGhostResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Verifies a RegisterOpponentGhostResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterOpponentGhostResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterOpponentGhostResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Creates a plain object from a RegisterOpponentGhostResponse message. Also converts values to other types if specified. + * @param message RegisterOpponentGhostResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterOpponentGhostResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterOpponentGhostResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterOpponentGhostResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GrantCarRightRequest. */ + interface IGrantCarRightRequest { + + /** GrantCarRightRequest userId */ + userId: number; + + /** GrantCarRightRequest targetUserId */ + targetUserId: number; + + /** GrantCarRightRequest timestamp */ + timestamp: number; + } + + /** Represents a GrantCarRightRequest. */ + class GrantCarRightRequest implements IGrantCarRightRequest { + + /** + * Constructs a new GrantCarRightRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGrantCarRightRequest); + + /** GrantCarRightRequest userId. */ + public userId: number; + + /** GrantCarRightRequest targetUserId. */ + public targetUserId: number; + + /** GrantCarRightRequest timestamp. */ + public timestamp: number; + + /** + * Creates a new GrantCarRightRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GrantCarRightRequest instance + */ + public static create(properties?: wm.protobuf.IGrantCarRightRequest): wm.protobuf.GrantCarRightRequest; + + /** + * Encodes the specified GrantCarRightRequest message. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @param message GrantCarRightRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGrantCarRightRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GrantCarRightRequest message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @param message GrantCarRightRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGrantCarRightRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GrantCarRightRequest; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GrantCarRightRequest; + + /** + * Verifies a GrantCarRightRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GrantCarRightRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GrantCarRightRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GrantCarRightRequest; + + /** + * Creates a plain object from a GrantCarRightRequest message. Also converts values to other types if specified. + * @param message GrantCarRightRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GrantCarRightRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GrantCarRightRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GrantCarRightRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GrantCarRightResponse. */ + interface IGrantCarRightResponse { + + /** GrantCarRightResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a GrantCarRightResponse. */ + class GrantCarRightResponse implements IGrantCarRightResponse { + + /** + * Constructs a new GrantCarRightResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGrantCarRightResponse); + + /** GrantCarRightResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new GrantCarRightResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GrantCarRightResponse instance + */ + public static create(properties?: wm.protobuf.IGrantCarRightResponse): wm.protobuf.GrantCarRightResponse; + + /** + * Encodes the specified GrantCarRightResponse message. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @param message GrantCarRightResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGrantCarRightResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GrantCarRightResponse message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @param message GrantCarRightResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGrantCarRightResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GrantCarRightResponse; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GrantCarRightResponse; + + /** + * Verifies a GrantCarRightResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GrantCarRightResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GrantCarRightResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GrantCarRightResponse; + + /** + * Creates a plain object from a GrantCarRightResponse message. Also converts values to other types if specified. + * @param message GrantCarRightResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GrantCarRightResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GrantCarRightResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GrantCarRightResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionRankingRequest. */ + interface ILoadGhostCompetitionRankingRequest { + + /** LoadGhostCompetitionRankingRequest carId */ + carId: number; + + /** LoadGhostCompetitionRankingRequest competitionId */ + competitionId: number; + } + + /** Represents a LoadGhostCompetitionRankingRequest. */ + class LoadGhostCompetitionRankingRequest implements ILoadGhostCompetitionRankingRequest { + + /** + * Constructs a new LoadGhostCompetitionRankingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionRankingRequest); + + /** LoadGhostCompetitionRankingRequest carId. */ + public carId: number; + + /** LoadGhostCompetitionRankingRequest competitionId. */ + public competitionId: number; + + /** + * Creates a new LoadGhostCompetitionRankingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionRankingRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionRankingRequest): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @param message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionRankingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @param message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionRankingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Verifies a LoadGhostCompetitionRankingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionRankingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionRankingRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingRequest message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionRankingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionRankingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionRankingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionRankingResponse. */ + interface ILoadGhostCompetitionRankingResponse { + + /** LoadGhostCompetitionRankingResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionRankingResponse periodId */ + periodId?: (number|null); + + /** LoadGhostCompetitionRankingResponse numOfParticipants */ + numOfParticipants: number; + + /** LoadGhostCompetitionRankingResponse competitionSchedule */ + competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** LoadGhostCompetitionRankingResponse ownRecord */ + ownRecord?: (wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null); + + /** LoadGhostCompetitionRankingResponse topRecords */ + topRecords?: (wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry[]|null); + } + + /** Represents a LoadGhostCompetitionRankingResponse. */ + class LoadGhostCompetitionRankingResponse implements ILoadGhostCompetitionRankingResponse { + + /** + * Constructs a new LoadGhostCompetitionRankingResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionRankingResponse); + + /** LoadGhostCompetitionRankingResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionRankingResponse periodId. */ + public periodId: number; + + /** LoadGhostCompetitionRankingResponse numOfParticipants. */ + public numOfParticipants: number; + + /** LoadGhostCompetitionRankingResponse competitionSchedule. */ + public competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** LoadGhostCompetitionRankingResponse ownRecord. */ + public ownRecord?: (wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null); + + /** LoadGhostCompetitionRankingResponse topRecords. */ + public topRecords: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry[]; + + /** + * Creates a new LoadGhostCompetitionRankingResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionRankingResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionRankingResponse): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @param message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionRankingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @param message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionRankingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Verifies a LoadGhostCompetitionRankingResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionRankingResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionRankingResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingResponse message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionRankingResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionRankingResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionRankingResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGhostCompetitionRankingResponse { + + /** Properties of an Entry. */ + interface IEntry { + + /** Entry rank */ + rank: number; + + /** Entry result */ + result: number; + + /** Entry carId */ + carId: number; + + /** Entry name */ + name: string; + + /** Entry regionId */ + regionId: number; + + /** Entry model */ + model: number; + + /** Entry visualModel */ + visualModel: number; + + /** Entry defaultColor */ + defaultColor: number; + + /** Entry title */ + title: string; + + /** Entry level */ + level: number; + + /** Entry windowStickerString */ + windowStickerString?: (string|null); + + /** Entry playedShopName */ + playedShopName: string; + + /** Entry playedAt */ + playedAt: number; + } + + /** Represents an Entry. */ + class Entry implements IEntry { + + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry); + + /** Entry rank. */ + public rank: number; + + /** Entry result. */ + public result: number; + + /** Entry carId. */ + public carId: number; + + /** Entry name. */ + public name: string; + + /** Entry regionId. */ + public regionId: number; + + /** Entry model. */ + public model: number; + + /** Entry visualModel. */ + public visualModel: number; + + /** Entry defaultColor. */ + public defaultColor: number; + + /** Entry title. */ + public title: string; + + /** Entry level. */ + public level: number; + + /** Entry windowStickerString. */ + public windowStickerString: string; + + /** Entry playedShopName. */ + public playedShopName: string; + + /** Entry playedAt. */ + public playedAt: number; + + /** + * Creates a new Entry instance using the specified properties. + * @param [properties] Properties to set + * @returns Entry instance + */ + public static create(properties?: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Encodes the specified Entry message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Verifies an Entry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entry + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionRankingResponse.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadUnreceivedUserItemsRequest. */ + interface ILoadUnreceivedUserItemsRequest { + + /** LoadUnreceivedUserItemsRequest userId */ + userId: number; + } + + /** Represents a LoadUnreceivedUserItemsRequest. */ + class LoadUnreceivedUserItemsRequest implements ILoadUnreceivedUserItemsRequest { + + /** + * Constructs a new LoadUnreceivedUserItemsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUnreceivedUserItemsRequest); + + /** LoadUnreceivedUserItemsRequest userId. */ + public userId: number; + + /** + * Creates a new LoadUnreceivedUserItemsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUnreceivedUserItemsRequest instance + */ + public static create(properties?: wm.protobuf.ILoadUnreceivedUserItemsRequest): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @param message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUnreceivedUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @param message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUnreceivedUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Verifies a LoadUnreceivedUserItemsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUnreceivedUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUnreceivedUserItemsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsRequest message. Also converts values to other types if specified. + * @param message LoadUnreceivedUserItemsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUnreceivedUserItemsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUnreceivedUserItemsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadUnreceivedUserItemsResponse. */ + interface ILoadUnreceivedUserItemsResponse { + + /** LoadUnreceivedUserItemsResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadUnreceivedUserItemsResponse ownedUserItems */ + ownedUserItems?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a LoadUnreceivedUserItemsResponse. */ + class LoadUnreceivedUserItemsResponse implements ILoadUnreceivedUserItemsResponse { + + /** + * Constructs a new LoadUnreceivedUserItemsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUnreceivedUserItemsResponse); + + /** LoadUnreceivedUserItemsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadUnreceivedUserItemsResponse ownedUserItems. */ + public ownedUserItems: wm.protobuf.IUserItem[]; + + /** + * Creates a new LoadUnreceivedUserItemsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUnreceivedUserItemsResponse instance + */ + public static create(properties?: wm.protobuf.ILoadUnreceivedUserItemsResponse): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @param message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUnreceivedUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @param message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUnreceivedUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Verifies a LoadUnreceivedUserItemsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUnreceivedUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUnreceivedUserItemsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsResponse message. Also converts values to other types if specified. + * @param message LoadUnreceivedUserItemsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUnreceivedUserItemsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUnreceivedUserItemsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBookmarksRequest. */ + interface ILoadBookmarksRequest { + + /** LoadBookmarksRequest userId */ + userId: number; + } + + /** Represents a LoadBookmarksRequest. */ + class LoadBookmarksRequest implements ILoadBookmarksRequest { + + /** + * Constructs a new LoadBookmarksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadBookmarksRequest); + + /** LoadBookmarksRequest userId. */ + public userId: number; + + /** + * Creates a new LoadBookmarksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBookmarksRequest instance + */ + public static create(properties?: wm.protobuf.ILoadBookmarksRequest): wm.protobuf.LoadBookmarksRequest; + + /** + * Encodes the specified LoadBookmarksRequest message. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @param message LoadBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @param message LoadBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadBookmarksRequest; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadBookmarksRequest; + + /** + * Verifies a LoadBookmarksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBookmarksRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadBookmarksRequest; + + /** + * Creates a plain object from a LoadBookmarksRequest message. Also converts values to other types if specified. + * @param message LoadBookmarksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadBookmarksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBookmarksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBookmarksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBookmarksResponse. */ + interface ILoadBookmarksResponse { + + /** LoadBookmarksResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadBookmarksResponse cars */ + cars?: (wm.protobuf.ICar[]|null); + } + + /** Represents a LoadBookmarksResponse. */ + class LoadBookmarksResponse implements ILoadBookmarksResponse { + + /** + * Constructs a new LoadBookmarksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadBookmarksResponse); + + /** LoadBookmarksResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadBookmarksResponse cars. */ + public cars: wm.protobuf.ICar[]; + + /** + * Creates a new LoadBookmarksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBookmarksResponse instance + */ + public static create(properties?: wm.protobuf.ILoadBookmarksResponse): wm.protobuf.LoadBookmarksResponse; + + /** + * Encodes the specified LoadBookmarksResponse message. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @param message LoadBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @param message LoadBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadBookmarksResponse; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadBookmarksResponse; + + /** + * Verifies a LoadBookmarksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBookmarksResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadBookmarksResponse; + + /** + * Creates a plain object from a LoadBookmarksResponse message. Also converts values to other types if specified. + * @param message LoadBookmarksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadBookmarksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBookmarksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBookmarksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveBookmarksRequest. */ + interface ISaveBookmarksRequest { + + /** SaveBookmarksRequest userId */ + userId: number; + + /** SaveBookmarksRequest cars */ + cars?: (number[]|null); + } + + /** Represents a SaveBookmarksRequest. */ + class SaveBookmarksRequest implements ISaveBookmarksRequest { + + /** + * Constructs a new SaveBookmarksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveBookmarksRequest); + + /** SaveBookmarksRequest userId. */ + public userId: number; + + /** SaveBookmarksRequest cars. */ + public cars: number[]; + + /** + * Creates a new SaveBookmarksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveBookmarksRequest instance + */ + public static create(properties?: wm.protobuf.ISaveBookmarksRequest): wm.protobuf.SaveBookmarksRequest; + + /** + * Encodes the specified SaveBookmarksRequest message. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @param message SaveBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @param message SaveBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveBookmarksRequest; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveBookmarksRequest; + + /** + * Verifies a SaveBookmarksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveBookmarksRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveBookmarksRequest; + + /** + * Creates a plain object from a SaveBookmarksRequest message. Also converts values to other types if specified. + * @param message SaveBookmarksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveBookmarksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveBookmarksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveBookmarksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveBookmarksResponse. */ + interface ISaveBookmarksResponse { + + /** SaveBookmarksResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveBookmarksResponse. */ + class SaveBookmarksResponse implements ISaveBookmarksResponse { + + /** + * Constructs a new SaveBookmarksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveBookmarksResponse); + + /** SaveBookmarksResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveBookmarksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveBookmarksResponse instance + */ + public static create(properties?: wm.protobuf.ISaveBookmarksResponse): wm.protobuf.SaveBookmarksResponse; + + /** + * Encodes the specified SaveBookmarksResponse message. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @param message SaveBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @param message SaveBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveBookmarksResponse; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveBookmarksResponse; + + /** + * Verifies a SaveBookmarksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveBookmarksResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveBookmarksResponse; + + /** + * Creates a plain object from a SaveBookmarksResponse message. Also converts values to other types if specified. + * @param message SaveBookmarksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveBookmarksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveBookmarksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveBookmarksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StartTransferRequest. */ + interface IStartTransferRequest { + + /** StartTransferRequest banapassportAmId */ + banapassportAmId: number; + } + + /** Represents a StartTransferRequest. */ + class StartTransferRequest implements IStartTransferRequest { + + /** + * Constructs a new StartTransferRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IStartTransferRequest); + + /** StartTransferRequest banapassportAmId. */ + public banapassportAmId: number; + + /** + * Creates a new StartTransferRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StartTransferRequest instance + */ + public static create(properties?: wm.protobuf.IStartTransferRequest): wm.protobuf.StartTransferRequest; + + /** + * Encodes the specified StartTransferRequest message. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @param message StartTransferRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IStartTransferRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartTransferRequest message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @param message StartTransferRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IStartTransferRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.StartTransferRequest; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.StartTransferRequest; + + /** + * Verifies a StartTransferRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartTransferRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartTransferRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.StartTransferRequest; + + /** + * Creates a plain object from a StartTransferRequest message. Also converts values to other types if specified. + * @param message StartTransferRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.StartTransferRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartTransferRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartTransferRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StartTransferResponse. */ + interface IStartTransferResponse { + + /** StartTransferResponse error */ + error: wm.protobuf.ErrorCode; + + /** StartTransferResponse userId */ + userId: number; + + /** StartTransferResponse pollingInterval */ + pollingInterval?: (number|null); + } + + /** Represents a StartTransferResponse. */ + class StartTransferResponse implements IStartTransferResponse { + + /** + * Constructs a new StartTransferResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IStartTransferResponse); + + /** StartTransferResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** StartTransferResponse userId. */ + public userId: number; + + /** StartTransferResponse pollingInterval. */ + public pollingInterval: number; + + /** + * Creates a new StartTransferResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns StartTransferResponse instance + */ + public static create(properties?: wm.protobuf.IStartTransferResponse): wm.protobuf.StartTransferResponse; + + /** + * Encodes the specified StartTransferResponse message. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @param message StartTransferResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IStartTransferResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartTransferResponse message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @param message StartTransferResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IStartTransferResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.StartTransferResponse; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.StartTransferResponse; + + /** + * Verifies a StartTransferResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartTransferResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartTransferResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.StartTransferResponse; + + /** + * Creates a plain object from a StartTransferResponse message. Also converts values to other types if specified. + * @param message StartTransferResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.StartTransferResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartTransferResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartTransferResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveScreenshotRequest. */ + interface ISaveScreenshotRequest { + + /** SaveScreenshotRequest carId */ + carId: number; + + /** SaveScreenshotRequest timestamp */ + timestamp: number; + + /** SaveScreenshotRequest playedAt */ + playedAt?: (number|null); + + /** SaveScreenshotRequest transparent */ + transparent?: (boolean|null); + + /** SaveScreenshotRequest imageType */ + imageType: wm.protobuf.ScreenshotType; + + /** SaveScreenshotRequest image */ + image?: (Uint8Array|null); + + /** SaveScreenshotRequest ghostMetadata */ + ghostMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null); + + /** SaveScreenshotRequest versusMetadata */ + versusMetadata?: (wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null); + + /** SaveScreenshotRequest terminalMetadata */ + terminalMetadata?: (wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null); + + /** SaveScreenshotRequest acquiringVsStarMetadata */ + acquiringVsStarMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null); + + /** SaveScreenshotRequest acquiringAuraMotifMetadata */ + acquiringAuraMotifMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null); + + /** SaveScreenshotRequest ghostRegionMapMetadata */ + ghostRegionMapMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null); + + /** SaveScreenshotRequest acquiringCrownMetadata */ + acquiringCrownMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null); + + /** SaveScreenshotRequest competitionResultMetadata */ + competitionResultMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null); + + /** SaveScreenshotRequest timeAttackResultMetadata */ + timeAttackResultMetadata?: (wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null); + + /** SaveScreenshotRequest levelUpMetadata */ + levelUpMetadata?: (wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null); + } + + /** Represents a SaveScreenshotRequest. */ + class SaveScreenshotRequest implements ISaveScreenshotRequest { + + /** + * Constructs a new SaveScreenshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScreenshotRequest); + + /** SaveScreenshotRequest carId. */ + public carId: number; + + /** SaveScreenshotRequest timestamp. */ + public timestamp: number; + + /** SaveScreenshotRequest playedAt. */ + public playedAt: number; + + /** SaveScreenshotRequest transparent. */ + public transparent: boolean; + + /** SaveScreenshotRequest imageType. */ + public imageType: wm.protobuf.ScreenshotType; + + /** SaveScreenshotRequest image. */ + public image: Uint8Array; + + /** SaveScreenshotRequest ghostMetadata. */ + public ghostMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null); + + /** SaveScreenshotRequest versusMetadata. */ + public versusMetadata?: (wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null); + + /** SaveScreenshotRequest terminalMetadata. */ + public terminalMetadata?: (wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null); + + /** SaveScreenshotRequest acquiringVsStarMetadata. */ + public acquiringVsStarMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null); + + /** SaveScreenshotRequest acquiringAuraMotifMetadata. */ + public acquiringAuraMotifMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null); + + /** SaveScreenshotRequest ghostRegionMapMetadata. */ + public ghostRegionMapMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null); + + /** SaveScreenshotRequest acquiringCrownMetadata. */ + public acquiringCrownMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null); + + /** SaveScreenshotRequest competitionResultMetadata. */ + public competitionResultMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null); + + /** SaveScreenshotRequest timeAttackResultMetadata. */ + public timeAttackResultMetadata?: (wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null); + + /** SaveScreenshotRequest levelUpMetadata. */ + public levelUpMetadata?: (wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null); + + /** + * Creates a new SaveScreenshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScreenshotRequest instance + */ + public static create(properties?: wm.protobuf.ISaveScreenshotRequest): wm.protobuf.SaveScreenshotRequest; + + /** + * Encodes the specified SaveScreenshotRequest message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @param message SaveScreenshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScreenshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScreenshotRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @param message SaveScreenshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScreenshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest; + + /** + * Verifies a SaveScreenshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScreenshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScreenshotRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest; + + /** + * Creates a plain object from a SaveScreenshotRequest message. Also converts values to other types if specified. + * @param message SaveScreenshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScreenshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScreenshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SaveScreenshotRequest { + + /** Properties of a GhostBattleMetadata. */ + interface IGhostBattleMetadata { + + /** GhostBattleMetadata tunePower */ + tunePower: number; + + /** GhostBattleMetadata tuneHandling */ + tuneHandling: number; + + /** GhostBattleMetadata area */ + area: number; + + /** GhostBattleMetadata stampReturnCount */ + stampReturnCount: number; + + /** GhostBattleMetadata opponents */ + opponents?: (wm.protobuf.SaveScreenshotRequest.IOpponentCar[]|null); + } + + /** Represents a GhostBattleMetadata. */ + class GhostBattleMetadata implements IGhostBattleMetadata { + + /** + * Constructs a new GhostBattleMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata); + + /** GhostBattleMetadata tunePower. */ + public tunePower: number; + + /** GhostBattleMetadata tuneHandling. */ + public tuneHandling: number; + + /** GhostBattleMetadata area. */ + public area: number; + + /** GhostBattleMetadata stampReturnCount. */ + public stampReturnCount: number; + + /** GhostBattleMetadata opponents. */ + public opponents: wm.protobuf.SaveScreenshotRequest.IOpponentCar[]; + + /** + * Creates a new GhostBattleMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Encodes the specified GhostBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @param message GhostBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @param message GhostBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Verifies a GhostBattleMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Creates a plain object from a GhostBattleMetadata message. Also converts values to other types if specified. + * @param message GhostBattleMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VersusBattleMetadata. */ + interface IVersusBattleMetadata { + + /** VersusBattleMetadata tunePower */ + tunePower: number; + + /** VersusBattleMetadata tuneHandling */ + tuneHandling: number; + + /** VersusBattleMetadata area */ + area: number; + + /** VersusBattleMetadata opponents */ + opponents?: (wm.protobuf.SaveScreenshotRequest.IOpponentCar[]|null); + } + + /** Represents a VersusBattleMetadata. */ + class VersusBattleMetadata implements IVersusBattleMetadata { + + /** + * Constructs a new VersusBattleMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata); + + /** VersusBattleMetadata tunePower. */ + public tunePower: number; + + /** VersusBattleMetadata tuneHandling. */ + public tuneHandling: number; + + /** VersusBattleMetadata area. */ + public area: number; + + /** VersusBattleMetadata opponents. */ + public opponents: wm.protobuf.SaveScreenshotRequest.IOpponentCar[]; + + /** + * Creates a new VersusBattleMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns VersusBattleMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Encodes the specified VersusBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @param message VersusBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VersusBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @param message VersusBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Verifies a VersusBattleMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VersusBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersusBattleMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Creates a plain object from a VersusBattleMetadata message. Also converts values to other types if specified. + * @param message VersusBattleMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VersusBattleMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VersusBattleMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TerminalMetadata. */ + interface ITerminalMetadata { + + /** TerminalMetadata tunePower */ + tunePower: number; + + /** TerminalMetadata tuneHandling */ + tuneHandling: number; + + /** TerminalMetadata name */ + name: string; + + /** TerminalMetadata title */ + title: string; + + /** TerminalMetadata level */ + level: number; + } + + /** Represents a TerminalMetadata. */ + class TerminalMetadata implements ITerminalMetadata { + + /** + * Constructs a new TerminalMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata); + + /** TerminalMetadata tunePower. */ + public tunePower: number; + + /** TerminalMetadata tuneHandling. */ + public tuneHandling: number; + + /** TerminalMetadata name. */ + public name: string; + + /** TerminalMetadata title. */ + public title: string; + + /** TerminalMetadata level. */ + public level: number; + + /** + * Creates a new TerminalMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns TerminalMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Encodes the specified TerminalMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @param message TerminalMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerminalMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @param message TerminalMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Verifies a TerminalMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerminalMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerminalMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Creates a plain object from a TerminalMetadata message. Also converts values to other types if specified. + * @param message TerminalMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.TerminalMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerminalMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerminalMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcquiringVersusStarMetadata. */ + interface IAcquiringVersusStarMetadata { + + /** AcquiringVersusStarMetadata tunePower */ + tunePower: number; + + /** AcquiringVersusStarMetadata tuneHandling */ + tuneHandling: number; + + /** AcquiringVersusStarMetadata vsStarCount */ + vsStarCount: number; + } + + /** Represents an AcquiringVersusStarMetadata. */ + class AcquiringVersusStarMetadata implements IAcquiringVersusStarMetadata { + + /** + * Constructs a new AcquiringVersusStarMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata); + + /** AcquiringVersusStarMetadata tunePower. */ + public tunePower: number; + + /** AcquiringVersusStarMetadata tuneHandling. */ + public tuneHandling: number; + + /** AcquiringVersusStarMetadata vsStarCount. */ + public vsStarCount: number; + + /** + * Creates a new AcquiringVersusStarMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AcquiringVersusStarMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Encodes the specified AcquiringVersusStarMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @param message AcquiringVersusStarMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcquiringVersusStarMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @param message AcquiringVersusStarMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Verifies an AcquiringVersusStarMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcquiringVersusStarMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcquiringVersusStarMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Creates a plain object from an AcquiringVersusStarMetadata message. Also converts values to other types if specified. + * @param message AcquiringVersusStarMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcquiringVersusStarMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcquiringVersusStarMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcquiringAuraMotifMetadata. */ + interface IAcquiringAuraMotifMetadata { + + /** AcquiringAuraMotifMetadata tunePower */ + tunePower: number; + + /** AcquiringAuraMotifMetadata tuneHandling */ + tuneHandling: number; + + /** AcquiringAuraMotifMetadata auraMotif */ + auraMotif: number; + } + + /** Represents an AcquiringAuraMotifMetadata. */ + class AcquiringAuraMotifMetadata implements IAcquiringAuraMotifMetadata { + + /** + * Constructs a new AcquiringAuraMotifMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata); + + /** AcquiringAuraMotifMetadata tunePower. */ + public tunePower: number; + + /** AcquiringAuraMotifMetadata tuneHandling. */ + public tuneHandling: number; + + /** AcquiringAuraMotifMetadata auraMotif. */ + public auraMotif: number; + + /** + * Creates a new AcquiringAuraMotifMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AcquiringAuraMotifMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @param message AcquiringAuraMotifMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @param message AcquiringAuraMotifMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Verifies an AcquiringAuraMotifMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcquiringAuraMotifMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcquiringAuraMotifMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Creates a plain object from an AcquiringAuraMotifMetadata message. Also converts values to other types if specified. + * @param message AcquiringAuraMotifMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcquiringAuraMotifMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcquiringAuraMotifMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostRegionMapMetadata. */ + interface IGhostRegionMapMetadata { + + /** GhostRegionMapMetadata tunePower */ + tunePower: number; + + /** GhostRegionMapMetadata tuneHandling */ + tuneHandling: number; + + /** GhostRegionMapMetadata rgScore */ + rgScore: number; + + /** GhostRegionMapMetadata rgRegionMapScore */ + rgRegionMapScore?: (number[]|null); + } + + /** Represents a GhostRegionMapMetadata. */ + class GhostRegionMapMetadata implements IGhostRegionMapMetadata { + + /** + * Constructs a new GhostRegionMapMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata); + + /** GhostRegionMapMetadata tunePower. */ + public tunePower: number; + + /** GhostRegionMapMetadata tuneHandling. */ + public tuneHandling: number; + + /** GhostRegionMapMetadata rgScore. */ + public rgScore: number; + + /** GhostRegionMapMetadata rgRegionMapScore. */ + public rgRegionMapScore: number[]; + + /** + * Creates a new GhostRegionMapMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostRegionMapMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Encodes the specified GhostRegionMapMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @param message GhostRegionMapMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostRegionMapMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @param message GhostRegionMapMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Verifies a GhostRegionMapMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostRegionMapMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostRegionMapMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Creates a plain object from a GhostRegionMapMetadata message. Also converts values to other types if specified. + * @param message GhostRegionMapMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostRegionMapMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostRegionMapMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcquiringCrownMetadata. */ + interface IAcquiringCrownMetadata { + + /** AcquiringCrownMetadata tunePower */ + tunePower: number; + + /** AcquiringCrownMetadata tuneHandling */ + tuneHandling: number; + + /** AcquiringCrownMetadata area */ + area: number; + } + + /** Represents an AcquiringCrownMetadata. */ + class AcquiringCrownMetadata implements IAcquiringCrownMetadata { + + /** + * Constructs a new AcquiringCrownMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata); + + /** AcquiringCrownMetadata tunePower. */ + public tunePower: number; + + /** AcquiringCrownMetadata tuneHandling. */ + public tuneHandling: number; + + /** AcquiringCrownMetadata area. */ + public area: number; + + /** + * Creates a new AcquiringCrownMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AcquiringCrownMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Encodes the specified AcquiringCrownMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @param message AcquiringCrownMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcquiringCrownMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @param message AcquiringCrownMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Verifies an AcquiringCrownMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcquiringCrownMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcquiringCrownMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Creates a plain object from an AcquiringCrownMetadata message. Also converts values to other types if specified. + * @param message AcquiringCrownMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcquiringCrownMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcquiringCrownMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCompetitionResultMetadata. */ + interface IGhostCompetitionResultMetadata { + + /** GhostCompetitionResultMetadata tunePower */ + tunePower: number; + + /** GhostCompetitionResultMetadata tuneHandling */ + tuneHandling: number; + + /** GhostCompetitionResultMetadata rank */ + rank?: (number|null); + + /** GhostCompetitionResultMetadata result */ + result: number; + } + + /** Represents a GhostCompetitionResultMetadata. */ + class GhostCompetitionResultMetadata implements IGhostCompetitionResultMetadata { + + /** + * Constructs a new GhostCompetitionResultMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata); + + /** GhostCompetitionResultMetadata tunePower. */ + public tunePower: number; + + /** GhostCompetitionResultMetadata tuneHandling. */ + public tuneHandling: number; + + /** GhostCompetitionResultMetadata rank. */ + public rank: number; + + /** GhostCompetitionResultMetadata result. */ + public result: number; + + /** + * Creates a new GhostCompetitionResultMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionResultMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Encodes the specified GhostCompetitionResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @param message GhostCompetitionResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @param message GhostCompetitionResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Verifies a GhostCompetitionResultMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionResultMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionResultMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Creates a plain object from a GhostCompetitionResultMetadata message. Also converts values to other types if specified. + * @param message GhostCompetitionResultMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionResultMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionResultMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeAttackResultMetadata. */ + interface ITimeAttackResultMetadata { + + /** TimeAttackResultMetadata tunePower */ + tunePower: number; + + /** TimeAttackResultMetadata tuneHandling */ + tuneHandling: number; + + /** TimeAttackResultMetadata course */ + course: number; + + /** TimeAttackResultMetadata wholeRank */ + wholeRank?: (number|null); + + /** TimeAttackResultMetadata modelRank */ + modelRank?: (number|null); + } + + /** Represents a TimeAttackResultMetadata. */ + class TimeAttackResultMetadata implements ITimeAttackResultMetadata { + + /** + * Constructs a new TimeAttackResultMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata); + + /** TimeAttackResultMetadata tunePower. */ + public tunePower: number; + + /** TimeAttackResultMetadata tuneHandling. */ + public tuneHandling: number; + + /** TimeAttackResultMetadata course. */ + public course: number; + + /** TimeAttackResultMetadata wholeRank. */ + public wholeRank: number; + + /** TimeAttackResultMetadata modelRank. */ + public modelRank: number; + + /** + * Creates a new TimeAttackResultMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeAttackResultMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Encodes the specified TimeAttackResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @param message TimeAttackResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeAttackResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @param message TimeAttackResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Verifies a TimeAttackResultMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeAttackResultMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeAttackResultMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Creates a plain object from a TimeAttackResultMetadata message. Also converts values to other types if specified. + * @param message TimeAttackResultMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeAttackResultMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeAttackResultMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LevelUpMetadata. */ + interface ILevelUpMetadata { + + /** LevelUpMetadata tunePower */ + tunePower: number; + + /** LevelUpMetadata tuneHandling */ + tuneHandling: number; + + /** LevelUpMetadata level */ + level: number; + } + + /** Represents a LevelUpMetadata. */ + class LevelUpMetadata implements ILevelUpMetadata { + + /** + * Constructs a new LevelUpMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata); + + /** LevelUpMetadata tunePower. */ + public tunePower: number; + + /** LevelUpMetadata tuneHandling. */ + public tuneHandling: number; + + /** LevelUpMetadata level. */ + public level: number; + + /** + * Creates a new LevelUpMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns LevelUpMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Encodes the specified LevelUpMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @param message LevelUpMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LevelUpMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @param message LevelUpMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Verifies a LevelUpMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LevelUpMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LevelUpMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Creates a plain object from a LevelUpMetadata message. Also converts values to other types if specified. + * @param message LevelUpMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.LevelUpMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LevelUpMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LevelUpMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OpponentCar. */ + interface IOpponentCar { + + /** OpponentCar carId */ + carId?: (number|null); + + /** OpponentCar tunePower */ + tunePower: number; + + /** OpponentCar tuneHandling */ + tuneHandling: number; + } + + /** Represents an OpponentCar. */ + class OpponentCar implements IOpponentCar { + + /** + * Constructs a new OpponentCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IOpponentCar); + + /** OpponentCar carId. */ + public carId: number; + + /** OpponentCar tunePower. */ + public tunePower: number; + + /** OpponentCar tuneHandling. */ + public tuneHandling: number; + + /** + * Creates a new OpponentCar instance using the specified properties. + * @param [properties] Properties to set + * @returns OpponentCar instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IOpponentCar): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Encodes the specified OpponentCar message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @param message OpponentCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IOpponentCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpponentCar message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @param message OpponentCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IOpponentCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpponentCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Decodes an OpponentCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Verifies an OpponentCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OpponentCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpponentCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Creates a plain object from an OpponentCar message. Also converts values to other types if specified. + * @param message OpponentCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.OpponentCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpponentCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpponentCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SaveScreenshotResponse. */ + interface ISaveScreenshotResponse { + + /** SaveScreenshotResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveScreenshotResponse. */ + class SaveScreenshotResponse implements ISaveScreenshotResponse { + + /** + * Constructs a new SaveScreenshotResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScreenshotResponse); + + /** SaveScreenshotResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveScreenshotResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScreenshotResponse instance + */ + public static create(properties?: wm.protobuf.ISaveScreenshotResponse): wm.protobuf.SaveScreenshotResponse; + + /** + * Encodes the specified SaveScreenshotResponse message. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @param message SaveScreenshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScreenshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScreenshotResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @param message SaveScreenshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScreenshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotResponse; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotResponse; + + /** + * Verifies a SaveScreenshotResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScreenshotResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScreenshotResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotResponse; + + /** + * Creates a plain object from a SaveScreenshotResponse message. Also converts values to other types if specified. + * @param message SaveScreenshotResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScreenshotResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScreenshotResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SubmitClientLogRequest. */ + interface ISubmitClientLogRequest { + + /** SubmitClientLogRequest data */ + data: Uint8Array; + + /** SubmitClientLogRequest modifiedAt */ + modifiedAt: number; + + /** SubmitClientLogRequest logType */ + logType: wm.protobuf.ClientLogType; + } + + /** Represents a SubmitClientLogRequest. */ + class SubmitClientLogRequest implements ISubmitClientLogRequest { + + /** + * Constructs a new SubmitClientLogRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISubmitClientLogRequest); + + /** SubmitClientLogRequest data. */ + public data: Uint8Array; + + /** SubmitClientLogRequest modifiedAt. */ + public modifiedAt: number; + + /** SubmitClientLogRequest logType. */ + public logType: wm.protobuf.ClientLogType; + + /** + * Creates a new SubmitClientLogRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SubmitClientLogRequest instance + */ + public static create(properties?: wm.protobuf.ISubmitClientLogRequest): wm.protobuf.SubmitClientLogRequest; + + /** + * Encodes the specified SubmitClientLogRequest message. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @param message SubmitClientLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISubmitClientLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubmitClientLogRequest message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @param message SubmitClientLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISubmitClientLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SubmitClientLogRequest; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SubmitClientLogRequest; + + /** + * Verifies a SubmitClientLogRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubmitClientLogRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubmitClientLogRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SubmitClientLogRequest; + + /** + * Creates a plain object from a SubmitClientLogRequest message. Also converts values to other types if specified. + * @param message SubmitClientLogRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SubmitClientLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubmitClientLogRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubmitClientLogRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SubmitClientLogResponse. */ + interface ISubmitClientLogResponse { + + /** SubmitClientLogResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SubmitClientLogResponse. */ + class SubmitClientLogResponse implements ISubmitClientLogResponse { + + /** + * Constructs a new SubmitClientLogResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISubmitClientLogResponse); + + /** SubmitClientLogResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SubmitClientLogResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SubmitClientLogResponse instance + */ + public static create(properties?: wm.protobuf.ISubmitClientLogResponse): wm.protobuf.SubmitClientLogResponse; + + /** + * Encodes the specified SubmitClientLogResponse message. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @param message SubmitClientLogResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISubmitClientLogResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubmitClientLogResponse message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @param message SubmitClientLogResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISubmitClientLogResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SubmitClientLogResponse; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SubmitClientLogResponse; + + /** + * Verifies a SubmitClientLogResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubmitClientLogResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubmitClientLogResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SubmitClientLogResponse; + + /** + * Creates a plain object from a SubmitClientLogResponse message. Also converts values to other types if specified. + * @param message SubmitClientLogResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SubmitClientLogResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubmitClientLogResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubmitClientLogResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadScratchInformationRequest. */ + interface ILoadScratchInformationRequest { + + /** LoadScratchInformationRequest userId */ + userId: number; + } + + /** Represents a LoadScratchInformationRequest. */ + class LoadScratchInformationRequest implements ILoadScratchInformationRequest { + + /** + * Constructs a new LoadScratchInformationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadScratchInformationRequest); + + /** LoadScratchInformationRequest userId. */ + public userId: number; + + /** + * Creates a new LoadScratchInformationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadScratchInformationRequest instance + */ + public static create(properties?: wm.protobuf.ILoadScratchInformationRequest): wm.protobuf.LoadScratchInformationRequest; + + /** + * Encodes the specified LoadScratchInformationRequest message. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @param message LoadScratchInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadScratchInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadScratchInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @param message LoadScratchInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadScratchInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadScratchInformationRequest; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadScratchInformationRequest; + + /** + * Verifies a LoadScratchInformationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadScratchInformationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadScratchInformationRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadScratchInformationRequest; + + /** + * Creates a plain object from a LoadScratchInformationRequest message. Also converts values to other types if specified. + * @param message LoadScratchInformationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadScratchInformationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadScratchInformationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadScratchInformationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadScratchInformationResponse. */ + interface ILoadScratchInformationResponse { + + /** LoadScratchInformationResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadScratchInformationResponse scratchSheets */ + scratchSheets?: (wm.protobuf.IScratchSheet[]|null); + + /** LoadScratchInformationResponse currentSheet */ + currentSheet: number; + + /** LoadScratchInformationResponse numOfScratched */ + numOfScratched: number; + + /** LoadScratchInformationResponse ownedUserItems */ + ownedUserItems?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a LoadScratchInformationResponse. */ + class LoadScratchInformationResponse implements ILoadScratchInformationResponse { + + /** + * Constructs a new LoadScratchInformationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadScratchInformationResponse); + + /** LoadScratchInformationResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadScratchInformationResponse scratchSheets. */ + public scratchSheets: wm.protobuf.IScratchSheet[]; + + /** LoadScratchInformationResponse currentSheet. */ + public currentSheet: number; + + /** LoadScratchInformationResponse numOfScratched. */ + public numOfScratched: number; + + /** LoadScratchInformationResponse ownedUserItems. */ + public ownedUserItems: wm.protobuf.IUserItem[]; + + /** + * Creates a new LoadScratchInformationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadScratchInformationResponse instance + */ + public static create(properties?: wm.protobuf.ILoadScratchInformationResponse): wm.protobuf.LoadScratchInformationResponse; + + /** + * Encodes the specified LoadScratchInformationResponse message. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @param message LoadScratchInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadScratchInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadScratchInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @param message LoadScratchInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadScratchInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadScratchInformationResponse; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadScratchInformationResponse; + + /** + * Verifies a LoadScratchInformationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadScratchInformationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadScratchInformationResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadScratchInformationResponse; + + /** + * Creates a plain object from a LoadScratchInformationResponse message. Also converts values to other types if specified. + * @param message LoadScratchInformationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadScratchInformationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadScratchInformationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadScratchInformationResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveScratchSheetRequest. */ + interface ISaveScratchSheetRequest { + + /** SaveScratchSheetRequest timestamp */ + timestamp: number; + + /** SaveScratchSheetRequest targetSheet */ + targetSheet: number; + + /** SaveScratchSheetRequest targetSquare */ + targetSquare: number; + + /** SaveScratchSheetRequest userId */ + userId: number; + } + + /** Represents a SaveScratchSheetRequest. */ + class SaveScratchSheetRequest implements ISaveScratchSheetRequest { + + /** + * Constructs a new SaveScratchSheetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScratchSheetRequest); + + /** SaveScratchSheetRequest timestamp. */ + public timestamp: number; + + /** SaveScratchSheetRequest targetSheet. */ + public targetSheet: number; + + /** SaveScratchSheetRequest targetSquare. */ + public targetSquare: number; + + /** SaveScratchSheetRequest userId. */ + public userId: number; + + /** + * Creates a new SaveScratchSheetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScratchSheetRequest instance + */ + public static create(properties?: wm.protobuf.ISaveScratchSheetRequest): wm.protobuf.SaveScratchSheetRequest; + + /** + * Encodes the specified SaveScratchSheetRequest message. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @param message SaveScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @param message SaveScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScratchSheetRequest; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScratchSheetRequest; + + /** + * Verifies a SaveScratchSheetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScratchSheetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScratchSheetRequest; + + /** + * Creates a plain object from a SaveScratchSheetRequest message. Also converts values to other types if specified. + * @param message SaveScratchSheetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScratchSheetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScratchSheetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScratchSheetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveScratchSheetResponse. */ + interface ISaveScratchSheetResponse { + + /** SaveScratchSheetResponse error */ + error: wm.protobuf.ErrorCode; + + /** SaveScratchSheetResponse scratchSheets */ + scratchSheets?: (wm.protobuf.IScratchSheet[]|null); + + /** SaveScratchSheetResponse currentSheet */ + currentSheet: number; + + /** SaveScratchSheetResponse numOfScratched */ + numOfScratched: number; + + /** SaveScratchSheetResponse earnedItem */ + earnedItem?: (wm.protobuf.IUserItem|null); + } + + /** Represents a SaveScratchSheetResponse. */ + class SaveScratchSheetResponse implements ISaveScratchSheetResponse { + + /** + * Constructs a new SaveScratchSheetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScratchSheetResponse); + + /** SaveScratchSheetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** SaveScratchSheetResponse scratchSheets. */ + public scratchSheets: wm.protobuf.IScratchSheet[]; + + /** SaveScratchSheetResponse currentSheet. */ + public currentSheet: number; + + /** SaveScratchSheetResponse numOfScratched. */ + public numOfScratched: number; + + /** SaveScratchSheetResponse earnedItem. */ + public earnedItem?: (wm.protobuf.IUserItem|null); + + /** + * Creates a new SaveScratchSheetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScratchSheetResponse instance + */ + public static create(properties?: wm.protobuf.ISaveScratchSheetResponse): wm.protobuf.SaveScratchSheetResponse; + + /** + * Encodes the specified SaveScratchSheetResponse message. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @param message SaveScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @param message SaveScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScratchSheetResponse; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScratchSheetResponse; + + /** + * Verifies a SaveScratchSheetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScratchSheetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScratchSheetResponse; + + /** + * Creates a plain object from a SaveScratchSheetResponse message. Also converts values to other types if specified. + * @param message SaveScratchSheetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScratchSheetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScratchSheetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScratchSheetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TurnScratchSheetRequest. */ + interface ITurnScratchSheetRequest { + + /** TurnScratchSheetRequest userId */ + userId: number; + + /** TurnScratchSheetRequest targetSheet */ + targetSheet: number; + } + + /** Represents a TurnScratchSheetRequest. */ + class TurnScratchSheetRequest implements ITurnScratchSheetRequest { + + /** + * Constructs a new TurnScratchSheetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITurnScratchSheetRequest); + + /** TurnScratchSheetRequest userId. */ + public userId: number; + + /** TurnScratchSheetRequest targetSheet. */ + public targetSheet: number; + + /** + * Creates a new TurnScratchSheetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TurnScratchSheetRequest instance + */ + public static create(properties?: wm.protobuf.ITurnScratchSheetRequest): wm.protobuf.TurnScratchSheetRequest; + + /** + * Encodes the specified TurnScratchSheetRequest message. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @param message TurnScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITurnScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TurnScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @param message TurnScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITurnScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TurnScratchSheetRequest; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TurnScratchSheetRequest; + + /** + * Verifies a TurnScratchSheetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TurnScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TurnScratchSheetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TurnScratchSheetRequest; + + /** + * Creates a plain object from a TurnScratchSheetRequest message. Also converts values to other types if specified. + * @param message TurnScratchSheetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TurnScratchSheetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TurnScratchSheetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TurnScratchSheetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TurnScratchSheetResponse. */ + interface ITurnScratchSheetResponse { + + /** TurnScratchSheetResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a TurnScratchSheetResponse. */ + class TurnScratchSheetResponse implements ITurnScratchSheetResponse { + + /** + * Constructs a new TurnScratchSheetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITurnScratchSheetResponse); + + /** TurnScratchSheetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new TurnScratchSheetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TurnScratchSheetResponse instance + */ + public static create(properties?: wm.protobuf.ITurnScratchSheetResponse): wm.protobuf.TurnScratchSheetResponse; + + /** + * Encodes the specified TurnScratchSheetResponse message. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @param message TurnScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITurnScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TurnScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @param message TurnScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITurnScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TurnScratchSheetResponse; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TurnScratchSheetResponse; + + /** + * Verifies a TurnScratchSheetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TurnScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TurnScratchSheetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TurnScratchSheetResponse; + + /** + * Creates a plain object from a TurnScratchSheetResponse message. Also converts values to other types if specified. + * @param message TurnScratchSheetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TurnScratchSheetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TurnScratchSheetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TurnScratchSheetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckItemReceivableCarsRequest. */ + interface ICheckItemReceivableCarsRequest { + + /** CheckItemReceivableCarsRequest userId */ + userId: number; + + /** CheckItemReceivableCarsRequest itemsToBeEarned */ + itemsToBeEarned?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a CheckItemReceivableCarsRequest. */ + class CheckItemReceivableCarsRequest implements ICheckItemReceivableCarsRequest { + + /** + * Constructs a new CheckItemReceivableCarsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICheckItemReceivableCarsRequest); + + /** CheckItemReceivableCarsRequest userId. */ + public userId: number; + + /** CheckItemReceivableCarsRequest itemsToBeEarned. */ + public itemsToBeEarned: wm.protobuf.IUserItem[]; + + /** + * Creates a new CheckItemReceivableCarsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckItemReceivableCarsRequest instance + */ + public static create(properties?: wm.protobuf.ICheckItemReceivableCarsRequest): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @param message CheckItemReceivableCarsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICheckItemReceivableCarsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @param message CheckItemReceivableCarsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICheckItemReceivableCarsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Verifies a CheckItemReceivableCarsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckItemReceivableCarsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckItemReceivableCarsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Creates a plain object from a CheckItemReceivableCarsRequest message. Also converts values to other types if specified. + * @param message CheckItemReceivableCarsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CheckItemReceivableCarsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckItemReceivableCarsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckItemReceivableCarsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckItemReceivableCarsResponse. */ + interface ICheckItemReceivableCarsResponse { + + /** CheckItemReceivableCarsResponse error */ + error: wm.protobuf.ErrorCode; + + /** CheckItemReceivableCarsResponse carIds */ + carIds?: (number[]|null); + } + + /** Represents a CheckItemReceivableCarsResponse. */ + class CheckItemReceivableCarsResponse implements ICheckItemReceivableCarsResponse { + + /** + * Constructs a new CheckItemReceivableCarsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICheckItemReceivableCarsResponse); + + /** CheckItemReceivableCarsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** CheckItemReceivableCarsResponse carIds. */ + public carIds: number[]; + + /** + * Creates a new CheckItemReceivableCarsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckItemReceivableCarsResponse instance + */ + public static create(properties?: wm.protobuf.ICheckItemReceivableCarsResponse): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @param message CheckItemReceivableCarsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICheckItemReceivableCarsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @param message CheckItemReceivableCarsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICheckItemReceivableCarsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Verifies a CheckItemReceivableCarsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckItemReceivableCarsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckItemReceivableCarsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Creates a plain object from a CheckItemReceivableCarsResponse message. Also converts values to other types if specified. + * @param message CheckItemReceivableCarsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CheckItemReceivableCarsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckItemReceivableCarsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckItemReceivableCarsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReceiveUserItemsRequest. */ + interface IReceiveUserItemsRequest { + + /** ReceiveUserItemsRequest carId */ + carId: number; + + /** ReceiveUserItemsRequest targetItemIds */ + targetItemIds?: (number[]|null); + } + + /** Represents a ReceiveUserItemsRequest. */ + class ReceiveUserItemsRequest implements IReceiveUserItemsRequest { + + /** + * Constructs a new ReceiveUserItemsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IReceiveUserItemsRequest); + + /** ReceiveUserItemsRequest carId. */ + public carId: number; + + /** ReceiveUserItemsRequest targetItemIds. */ + public targetItemIds: number[]; + + /** + * Creates a new ReceiveUserItemsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReceiveUserItemsRequest instance + */ + public static create(properties?: wm.protobuf.IReceiveUserItemsRequest): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Encodes the specified ReceiveUserItemsRequest message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @param message ReceiveUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IReceiveUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReceiveUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @param message ReceiveUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IReceiveUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Verifies a ReceiveUserItemsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReceiveUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReceiveUserItemsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Creates a plain object from a ReceiveUserItemsRequest message. Also converts values to other types if specified. + * @param message ReceiveUserItemsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ReceiveUserItemsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReceiveUserItemsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReceiveUserItemsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReceiveUserItemsResponse. */ + interface IReceiveUserItemsResponse { + + /** ReceiveUserItemsResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a ReceiveUserItemsResponse. */ + class ReceiveUserItemsResponse implements IReceiveUserItemsResponse { + + /** + * Constructs a new ReceiveUserItemsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IReceiveUserItemsResponse); + + /** ReceiveUserItemsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new ReceiveUserItemsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReceiveUserItemsResponse instance + */ + public static create(properties?: wm.protobuf.IReceiveUserItemsResponse): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Encodes the specified ReceiveUserItemsResponse message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @param message ReceiveUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IReceiveUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReceiveUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @param message ReceiveUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IReceiveUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Verifies a ReceiveUserItemsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReceiveUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReceiveUserItemsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Creates a plain object from a ReceiveUserItemsResponse message. Also converts values to other types if specified. + * @param message ReceiveUserItemsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ReceiveUserItemsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReceiveUserItemsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReceiveUserItemsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEventModeSerialRequest. */ + interface IUpdateEventModeSerialRequest { + + /** UpdateEventModeSerialRequest eventModeSerial */ + eventModeSerial?: (string|null); + } + + /** Represents an UpdateEventModeSerialRequest. */ + class UpdateEventModeSerialRequest implements IUpdateEventModeSerialRequest { + + /** + * Constructs a new UpdateEventModeSerialRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateEventModeSerialRequest); + + /** UpdateEventModeSerialRequest eventModeSerial. */ + public eventModeSerial: string; + + /** + * Creates a new UpdateEventModeSerialRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEventModeSerialRequest instance + */ + public static create(properties?: wm.protobuf.IUpdateEventModeSerialRequest): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Encodes the specified UpdateEventModeSerialRequest message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @param message UpdateEventModeSerialRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateEventModeSerialRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEventModeSerialRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @param message UpdateEventModeSerialRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateEventModeSerialRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Verifies an UpdateEventModeSerialRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEventModeSerialRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEventModeSerialRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Creates a plain object from an UpdateEventModeSerialRequest message. Also converts values to other types if specified. + * @param message UpdateEventModeSerialRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateEventModeSerialRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEventModeSerialRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEventModeSerialRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEventModeSerialResponse. */ + interface IUpdateEventModeSerialResponse { + + /** UpdateEventModeSerialResponse error */ + error: wm.protobuf.ErrorCode; + + /** UpdateEventModeSerialResponse serialError */ + serialError: wm.protobuf.EventModeSerialErrorCode; + + /** UpdateEventModeSerialResponse eventModeSerial */ + eventModeSerial?: (string|null); + + /** UpdateEventModeSerialResponse startAt */ + startAt?: (number|null); + + /** UpdateEventModeSerialResponse endAt */ + endAt?: (number|null); + } + + /** Represents an UpdateEventModeSerialResponse. */ + class UpdateEventModeSerialResponse implements IUpdateEventModeSerialResponse { + + /** + * Constructs a new UpdateEventModeSerialResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateEventModeSerialResponse); + + /** UpdateEventModeSerialResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** UpdateEventModeSerialResponse serialError. */ + public serialError: wm.protobuf.EventModeSerialErrorCode; + + /** UpdateEventModeSerialResponse eventModeSerial. */ + public eventModeSerial: string; + + /** UpdateEventModeSerialResponse startAt. */ + public startAt: number; + + /** UpdateEventModeSerialResponse endAt. */ + public endAt: number; + + /** + * Creates a new UpdateEventModeSerialResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEventModeSerialResponse instance + */ + public static create(properties?: wm.protobuf.IUpdateEventModeSerialResponse): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Encodes the specified UpdateEventModeSerialResponse message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @param message UpdateEventModeSerialResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateEventModeSerialResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEventModeSerialResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @param message UpdateEventModeSerialResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateEventModeSerialResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Verifies an UpdateEventModeSerialResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEventModeSerialResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEventModeSerialResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Creates a plain object from an UpdateEventModeSerialResponse message. Also converts values to other types if specified. + * @param message UpdateEventModeSerialResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateEventModeSerialResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEventModeSerialResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEventModeSerialResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParticipateInInviteFriendCampaignRequest. */ + interface IParticipateInInviteFriendCampaignRequest { + + /** ParticipateInInviteFriendCampaignRequest invitingUserId */ + invitingUserId: number; + + /** ParticipateInInviteFriendCampaignRequest invitedUserId */ + invitedUserId: number; + + /** ParticipateInInviteFriendCampaignRequest sourceCarId */ + sourceCarId: number; + + /** ParticipateInInviteFriendCampaignRequest transmission */ + transmission: boolean; + } + + /** Represents a ParticipateInInviteFriendCampaignRequest. */ + class ParticipateInInviteFriendCampaignRequest implements IParticipateInInviteFriendCampaignRequest { + + /** + * Constructs a new ParticipateInInviteFriendCampaignRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IParticipateInInviteFriendCampaignRequest); + + /** ParticipateInInviteFriendCampaignRequest invitingUserId. */ + public invitingUserId: number; + + /** ParticipateInInviteFriendCampaignRequest invitedUserId. */ + public invitedUserId: number; + + /** ParticipateInInviteFriendCampaignRequest sourceCarId. */ + public sourceCarId: number; + + /** ParticipateInInviteFriendCampaignRequest transmission. */ + public transmission: boolean; + + /** + * Creates a new ParticipateInInviteFriendCampaignRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ParticipateInInviteFriendCampaignRequest instance + */ + public static create(properties?: wm.protobuf.IParticipateInInviteFriendCampaignRequest): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IParticipateInInviteFriendCampaignRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IParticipateInInviteFriendCampaignRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Verifies a ParticipateInInviteFriendCampaignRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParticipateInInviteFriendCampaignRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParticipateInInviteFriendCampaignRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignRequest message. Also converts values to other types if specified. + * @param message ParticipateInInviteFriendCampaignRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ParticipateInInviteFriendCampaignRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParticipateInInviteFriendCampaignRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParticipateInInviteFriendCampaignResponse. */ + interface IParticipateInInviteFriendCampaignResponse { + + /** ParticipateInInviteFriendCampaignResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a ParticipateInInviteFriendCampaignResponse. */ + class ParticipateInInviteFriendCampaignResponse implements IParticipateInInviteFriendCampaignResponse { + + /** + * Constructs a new ParticipateInInviteFriendCampaignResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IParticipateInInviteFriendCampaignResponse); + + /** ParticipateInInviteFriendCampaignResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new ParticipateInInviteFriendCampaignResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ParticipateInInviteFriendCampaignResponse instance + */ + public static create(properties?: wm.protobuf.IParticipateInInviteFriendCampaignResponse): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IParticipateInInviteFriendCampaignResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IParticipateInInviteFriendCampaignResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Verifies a ParticipateInInviteFriendCampaignResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParticipateInInviteFriendCampaignResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParticipateInInviteFriendCampaignResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignResponse message. Also converts values to other types if specified. + * @param message ParticipateInInviteFriendCampaignResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ParticipateInInviteFriendCampaignResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParticipateInInviteFriendCampaignResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConsumeUserItemRequest. */ + interface IConsumeUserItemRequest { + + /** ConsumeUserItemRequest userId */ + userId: number; + + /** ConsumeUserItemRequest carId */ + carId: number; + + /** ConsumeUserItemRequest userItemId */ + userItemId: number; + } + + /** Represents a ConsumeUserItemRequest. */ + class ConsumeUserItemRequest implements IConsumeUserItemRequest { + + /** + * Constructs a new ConsumeUserItemRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IConsumeUserItemRequest); + + /** ConsumeUserItemRequest userId. */ + public userId: number; + + /** ConsumeUserItemRequest carId. */ + public carId: number; + + /** ConsumeUserItemRequest userItemId. */ + public userItemId: number; + + /** + * Creates a new ConsumeUserItemRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ConsumeUserItemRequest instance + */ + public static create(properties?: wm.protobuf.IConsumeUserItemRequest): wm.protobuf.ConsumeUserItemRequest; + + /** + * Encodes the specified ConsumeUserItemRequest message. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @param message ConsumeUserItemRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IConsumeUserItemRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConsumeUserItemRequest message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @param message ConsumeUserItemRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IConsumeUserItemRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ConsumeUserItemRequest; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ConsumeUserItemRequest; + + /** + * Verifies a ConsumeUserItemRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConsumeUserItemRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConsumeUserItemRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ConsumeUserItemRequest; + + /** + * Creates a plain object from a ConsumeUserItemRequest message. Also converts values to other types if specified. + * @param message ConsumeUserItemRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ConsumeUserItemRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConsumeUserItemRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConsumeUserItemRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConsumeUserItemResponse. */ + interface IConsumeUserItemResponse { + + /** ConsumeUserItemResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a ConsumeUserItemResponse. */ + class ConsumeUserItemResponse implements IConsumeUserItemResponse { + + /** + * Constructs a new ConsumeUserItemResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IConsumeUserItemResponse); + + /** ConsumeUserItemResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new ConsumeUserItemResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ConsumeUserItemResponse instance + */ + public static create(properties?: wm.protobuf.IConsumeUserItemResponse): wm.protobuf.ConsumeUserItemResponse; + + /** + * Encodes the specified ConsumeUserItemResponse message. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @param message ConsumeUserItemResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IConsumeUserItemResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConsumeUserItemResponse message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @param message ConsumeUserItemResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IConsumeUserItemResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ConsumeUserItemResponse; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ConsumeUserItemResponse; + + /** + * Verifies a ConsumeUserItemResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConsumeUserItemResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConsumeUserItemResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ConsumeUserItemResponse; + + /** + * Creates a plain object from a ConsumeUserItemResponse message. Also converts values to other types if specified. + * @param message ConsumeUserItemResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ConsumeUserItemResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConsumeUserItemResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConsumeUserItemResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchCarsByLevelRequest. */ + interface ISearchCarsByLevelRequest { + + /** SearchCarsByLevelRequest carId */ + carId: number; + + /** SearchCarsByLevelRequest ghostLevel */ + ghostLevel: number; + + /** SearchCarsByLevelRequest area */ + area: number; + + /** SearchCarsByLevelRequest regionId */ + regionId?: (number|null); + } + + /** Represents a SearchCarsByLevelRequest. */ + class SearchCarsByLevelRequest implements ISearchCarsByLevelRequest { + + /** + * Constructs a new SearchCarsByLevelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISearchCarsByLevelRequest); + + /** SearchCarsByLevelRequest carId. */ + public carId: number; + + /** SearchCarsByLevelRequest ghostLevel. */ + public ghostLevel: number; + + /** SearchCarsByLevelRequest area. */ + public area: number; + + /** SearchCarsByLevelRequest regionId. */ + public regionId: number; + + /** + * Creates a new SearchCarsByLevelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchCarsByLevelRequest instance + */ + public static create(properties?: wm.protobuf.ISearchCarsByLevelRequest): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Encodes the specified SearchCarsByLevelRequest message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @param message SearchCarsByLevelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISearchCarsByLevelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchCarsByLevelRequest message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @param message SearchCarsByLevelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISearchCarsByLevelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Verifies a SearchCarsByLevelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchCarsByLevelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchCarsByLevelRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Creates a plain object from a SearchCarsByLevelRequest message. Also converts values to other types if specified. + * @param message SearchCarsByLevelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SearchCarsByLevelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchCarsByLevelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchCarsByLevelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchCarsByLevelResponse. */ + interface ISearchCarsByLevelResponse { + + /** SearchCarsByLevelResponse error */ + error: wm.protobuf.ErrorCode; + + /** SearchCarsByLevelResponse ramp */ + ramp: number; + + /** SearchCarsByLevelResponse path */ + path: number; + + /** SearchCarsByLevelResponse ghosts */ + ghosts?: (wm.protobuf.IGhostCar[]|null); + + /** SearchCarsByLevelResponse selectionMethod */ + selectionMethod: wm.protobuf.PathSelectionMethod; + + /** SearchCarsByLevelResponse rates */ + rates?: (wm.protobuf.SearchCarsByLevelResponse.IRate[]|null); + } + + /** Represents a SearchCarsByLevelResponse. */ + class SearchCarsByLevelResponse implements ISearchCarsByLevelResponse { + + /** + * Constructs a new SearchCarsByLevelResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISearchCarsByLevelResponse); + + /** SearchCarsByLevelResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** SearchCarsByLevelResponse ramp. */ + public ramp: number; + + /** SearchCarsByLevelResponse path. */ + public path: number; + + /** SearchCarsByLevelResponse ghosts. */ + public ghosts: wm.protobuf.IGhostCar[]; + + /** SearchCarsByLevelResponse selectionMethod. */ + public selectionMethod: wm.protobuf.PathSelectionMethod; + + /** SearchCarsByLevelResponse rates. */ + public rates: wm.protobuf.SearchCarsByLevelResponse.IRate[]; + + /** + * Creates a new SearchCarsByLevelResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchCarsByLevelResponse instance + */ + public static create(properties?: wm.protobuf.ISearchCarsByLevelResponse): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Encodes the specified SearchCarsByLevelResponse message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @param message SearchCarsByLevelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISearchCarsByLevelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchCarsByLevelResponse message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @param message SearchCarsByLevelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISearchCarsByLevelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Verifies a SearchCarsByLevelResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchCarsByLevelResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchCarsByLevelResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Creates a plain object from a SearchCarsByLevelResponse message. Also converts values to other types if specified. + * @param message SearchCarsByLevelResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SearchCarsByLevelResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchCarsByLevelResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchCarsByLevelResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SearchCarsByLevelResponse { + + /** Properties of a Rate. */ + interface IRate { + + /** Rate carId */ + carId: number; + + /** Rate type */ + type: wm.protobuf.GhostRateType; + + /** Rate rate */ + rate?: (number|null); + } + + /** Represents a Rate. */ + class Rate implements IRate { + + /** + * Constructs a new Rate. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SearchCarsByLevelResponse.IRate); + + /** Rate carId. */ + public carId: number; + + /** Rate type. */ + public type: wm.protobuf.GhostRateType; + + /** Rate rate. */ + public rate: number; + + /** + * Creates a new Rate instance using the specified properties. + * @param [properties] Properties to set + * @returns Rate instance + */ + public static create(properties?: wm.protobuf.SearchCarsByLevelResponse.IRate): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Encodes the specified Rate message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @param message Rate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SearchCarsByLevelResponse.IRate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Rate message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @param message Rate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SearchCarsByLevelResponse.IRate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Rate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Decodes a Rate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Verifies a Rate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Rate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Rate + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Creates a plain object from a Rate message. Also converts values to other types if specified. + * @param message Rate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SearchCarsByLevelResponse.Rate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Rate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Rate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadPathsAndTuningsRequest. */ + interface ILoadPathsAndTuningsRequest { + + /** LoadPathsAndTuningsRequest carId */ + carId: number; + + /** LoadPathsAndTuningsRequest selectedCars */ + selectedCars?: (number[]|null); + + /** LoadPathsAndTuningsRequest returnImmediately */ + returnImmediately?: (boolean|null); + + /** LoadPathsAndTuningsRequest stampTargetArea */ + stampTargetArea?: (number|null); + } + + /** Represents a LoadPathsAndTuningsRequest. */ + class LoadPathsAndTuningsRequest implements ILoadPathsAndTuningsRequest { + + /** + * Constructs a new LoadPathsAndTuningsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadPathsAndTuningsRequest); + + /** LoadPathsAndTuningsRequest carId. */ + public carId: number; + + /** LoadPathsAndTuningsRequest selectedCars. */ + public selectedCars: number[]; + + /** LoadPathsAndTuningsRequest returnImmediately. */ + public returnImmediately: boolean; + + /** LoadPathsAndTuningsRequest stampTargetArea. */ + public stampTargetArea: number; + + /** + * Creates a new LoadPathsAndTuningsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadPathsAndTuningsRequest instance + */ + public static create(properties?: wm.protobuf.ILoadPathsAndTuningsRequest): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @param message LoadPathsAndTuningsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadPathsAndTuningsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @param message LoadPathsAndTuningsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadPathsAndTuningsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Verifies a LoadPathsAndTuningsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadPathsAndTuningsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadPathsAndTuningsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Creates a plain object from a LoadPathsAndTuningsRequest message. Also converts values to other types if specified. + * @param message LoadPathsAndTuningsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadPathsAndTuningsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadPathsAndTuningsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadPathsAndTuningsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadPathsAndTuningsResponse. */ + interface ILoadPathsAndTuningsResponse { + + /** LoadPathsAndTuningsResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadPathsAndTuningsResponse data */ + data?: (wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath[]|null); + } + + /** Represents a LoadPathsAndTuningsResponse. */ + class LoadPathsAndTuningsResponse implements ILoadPathsAndTuningsResponse { + + /** + * Constructs a new LoadPathsAndTuningsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadPathsAndTuningsResponse); + + /** LoadPathsAndTuningsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadPathsAndTuningsResponse data. */ + public data: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath[]; + + /** + * Creates a new LoadPathsAndTuningsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadPathsAndTuningsResponse instance + */ + public static create(properties?: wm.protobuf.ILoadPathsAndTuningsResponse): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @param message LoadPathsAndTuningsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadPathsAndTuningsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @param message LoadPathsAndTuningsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadPathsAndTuningsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Verifies a LoadPathsAndTuningsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadPathsAndTuningsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadPathsAndTuningsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Creates a plain object from a LoadPathsAndTuningsResponse message. Also converts values to other types if specified. + * @param message LoadPathsAndTuningsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadPathsAndTuningsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadPathsAndTuningsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadPathsAndTuningsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadPathsAndTuningsResponse { + + /** Properties of a CarTuningsByPath. */ + interface ICarTuningsByPath { + + /** CarTuningsByPath area */ + area: number; + + /** CarTuningsByPath ramp */ + ramp: number; + + /** CarTuningsByPath path */ + path: number; + + /** CarTuningsByPath carTunings */ + carTunings?: (wm.protobuf.ICarTuning[]|null); + + /** CarTuningsByPath selectionMethod */ + selectionMethod: wm.protobuf.PathSelectionMethod; + } + + /** Represents a CarTuningsByPath. */ + class CarTuningsByPath implements ICarTuningsByPath { + + /** + * Constructs a new CarTuningsByPath. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath); + + /** CarTuningsByPath area. */ + public area: number; + + /** CarTuningsByPath ramp. */ + public ramp: number; + + /** CarTuningsByPath path. */ + public path: number; + + /** CarTuningsByPath carTunings. */ + public carTunings: wm.protobuf.ICarTuning[]; + + /** CarTuningsByPath selectionMethod. */ + public selectionMethod: wm.protobuf.PathSelectionMethod; + + /** + * Creates a new CarTuningsByPath instance using the specified properties. + * @param [properties] Properties to set + * @returns CarTuningsByPath instance + */ + public static create(properties?: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Encodes the specified CarTuningsByPath message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @param message CarTuningsByPath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarTuningsByPath message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @param message CarTuningsByPath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Verifies a CarTuningsByPath message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarTuningsByPath message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarTuningsByPath + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Creates a plain object from a CarTuningsByPath message. Also converts values to other types if specified. + * @param message CarTuningsByPath + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarTuningsByPath to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarTuningsByPath + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadGhostDriveDataRequest. */ + interface ILoadGhostDriveDataRequest { + + /** LoadGhostDriveDataRequest path */ + path: number; + + /** LoadGhostDriveDataRequest carTunings */ + carTunings?: (wm.protobuf.ICarTuning[]|null); + } + + /** Represents a LoadGhostDriveDataRequest. */ + class LoadGhostDriveDataRequest implements ILoadGhostDriveDataRequest { + + /** + * Constructs a new LoadGhostDriveDataRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostDriveDataRequest); + + /** LoadGhostDriveDataRequest path. */ + public path: number; + + /** LoadGhostDriveDataRequest carTunings. */ + public carTunings: wm.protobuf.ICarTuning[]; + + /** + * Creates a new LoadGhostDriveDataRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostDriveDataRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostDriveDataRequest): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Encodes the specified LoadGhostDriveDataRequest message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @param message LoadGhostDriveDataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostDriveDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostDriveDataRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @param message LoadGhostDriveDataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostDriveDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Verifies a LoadGhostDriveDataRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostDriveDataRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostDriveDataRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Creates a plain object from a LoadGhostDriveDataRequest message. Also converts values to other types if specified. + * @param message LoadGhostDriveDataRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostDriveDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostDriveDataRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostDriveDataRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostDriveDataResponse. */ + interface ILoadGhostDriveDataResponse { + + /** LoadGhostDriveDataResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostDriveDataResponse data */ + data?: (wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData[]|null); + } + + /** Represents a LoadGhostDriveDataResponse. */ + class LoadGhostDriveDataResponse implements ILoadGhostDriveDataResponse { + + /** + * Constructs a new LoadGhostDriveDataResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostDriveDataResponse); + + /** LoadGhostDriveDataResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostDriveDataResponse data. */ + public data: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData[]; + + /** + * Creates a new LoadGhostDriveDataResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostDriveDataResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostDriveDataResponse): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Encodes the specified LoadGhostDriveDataResponse message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @param message LoadGhostDriveDataResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostDriveDataResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostDriveDataResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @param message LoadGhostDriveDataResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostDriveDataResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Verifies a LoadGhostDriveDataResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostDriveDataResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostDriveDataResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Creates a plain object from a LoadGhostDriveDataResponse message. Also converts values to other types if specified. + * @param message LoadGhostDriveDataResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostDriveDataResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostDriveDataResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostDriveDataResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGhostDriveDataResponse { + + /** Properties of a GhostDriveData. */ + interface IGhostDriveData { + + /** GhostDriveData carId */ + carId: number; + + /** GhostDriveData type */ + type: wm.protobuf.GhostType; + + /** GhostDriveData driveData */ + driveData?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByUser */ + trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByCar */ + trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByArea */ + trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + } + + /** Represents a GhostDriveData. */ + class GhostDriveData implements IGhostDriveData { + + /** + * Constructs a new GhostDriveData. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData); + + /** GhostDriveData carId. */ + public carId: number; + + /** GhostDriveData type. */ + public type: wm.protobuf.GhostType; + + /** GhostDriveData driveData. */ + public driveData?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByUser. */ + public trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByCar. */ + public trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByArea. */ + public trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + + /** + * Creates a new GhostDriveData instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostDriveData instance + */ + public static create(properties?: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Encodes the specified GhostDriveData message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @param message GhostDriveData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostDriveData message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @param message GhostDriveData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Verifies a GhostDriveData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostDriveData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostDriveData + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Creates a plain object from a GhostDriveData message. Also converts values to other types if specified. + * @param message GhostDriveData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostDriveData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostDriveData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Car. */ + interface ICar { + + /** Car carId */ + carId?: (number|null); + + /** Car userId */ + userId?: (number|null); + + /** Car regionId */ + regionId?: (number|null); + + /** Car name */ + name?: (string|null); + + /** Car manufacturer */ + manufacturer?: (number|null); + + /** Car model */ + model?: (number|null); + + /** Car visualModel */ + visualModel?: (number|null); + + /** Car defaultColor */ + defaultColor?: (number|null); + + /** Car customColor */ + customColor: number; + + /** Car wheel */ + wheel: number; + + /** Car wheelColor */ + wheelColor: number; + + /** Car aero */ + aero: number; + + /** Car bonnet */ + bonnet: number; + + /** Car wing */ + wing: number; + + /** Car gtWing */ + gtWing?: (wm.protobuf.IGTWing|null); + + /** Car mirror */ + mirror: number; + + /** Car neon */ + neon: number; + + /** Car trunk */ + trunk: number; + + /** Car plate */ + plate: number; + + /** Car plateColor */ + plateColor: number; + + /** Car plateNumber */ + plateNumber: number; + + /** Car tunePower */ + tunePower: number; + + /** Car tuneHandling */ + tuneHandling: number; + + /** Car title */ + title: string; + + /** Car level */ + level: number; + + /** Car windowSticker */ + windowSticker?: (boolean|null); + + /** Car windowStickerString */ + windowStickerString?: (string|null); + + /** Car windowStickerFont */ + windowStickerFont?: (number|null); + + /** Car windowDecoration */ + windowDecoration?: (number|null); + + /** Car rivalMarker */ + rivalMarker?: (number|null); + + /** Car lastPlayedAt */ + lastPlayedAt?: (number|null); + + /** Car lastPlayedPlace */ + lastPlayedPlace?: (wm.protobuf.IPlace|null); + + /** Car aura */ + aura?: (number|null); + + /** Car auraMotif */ + auraMotif?: (number|null); + + /** Car ghostLevel */ + ghostLevel?: (number|null); + + /** Car country */ + country?: (string|null); + + /** Car searchCode */ + searchCode?: (string|null); + } + + /** Represents a Car. */ + class Car implements ICar { + + /** + * Constructs a new Car. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICar); + + /** Car carId. */ + public carId: number; + + /** Car userId. */ + public userId: number; + + /** Car regionId. */ + public regionId: number; + + /** Car name. */ + public name: string; + + /** Car manufacturer. */ + public manufacturer: number; + + /** Car model. */ + public model: number; + + /** Car visualModel. */ + public visualModel: number; + + /** Car defaultColor. */ + public defaultColor: number; + + /** Car customColor. */ + public customColor: number; + + /** Car wheel. */ + public wheel: number; + + /** Car wheelColor. */ + public wheelColor: number; + + /** Car aero. */ + public aero: number; + + /** Car bonnet. */ + public bonnet: number; + + /** Car wing. */ + public wing: number; + + /** Car gtWing. */ + public gtWing?: (wm.protobuf.IGTWing|null); + + /** Car mirror. */ + public mirror: number; + + /** Car neon. */ + public neon: number; + + /** Car trunk. */ + public trunk: number; + + /** Car plate. */ + public plate: number; + + /** Car plateColor. */ + public plateColor: number; + + /** Car plateNumber. */ + public plateNumber: number; + + /** Car tunePower. */ + public tunePower: number; + + /** Car tuneHandling. */ + public tuneHandling: number; + + /** Car title. */ + public title: string; + + /** Car level. */ + public level: number; + + /** Car windowSticker. */ + public windowSticker: boolean; + + /** Car windowStickerString. */ + public windowStickerString: string; + + /** Car windowStickerFont. */ + public windowStickerFont: number; + + /** Car windowDecoration. */ + public windowDecoration: number; + + /** Car rivalMarker. */ + public rivalMarker: number; + + /** Car lastPlayedAt. */ + public lastPlayedAt: number; + + /** Car lastPlayedPlace. */ + public lastPlayedPlace?: (wm.protobuf.IPlace|null); + + /** Car aura. */ + public aura: number; + + /** Car auraMotif. */ + public auraMotif: number; + + /** Car ghostLevel. */ + public ghostLevel: number; + + /** Car country. */ + public country: string; + + /** Car searchCode. */ + public searchCode: string; + + /** + * Creates a new Car instance using the specified properties. + * @param [properties] Properties to set + * @returns Car instance + */ + public static create(properties?: wm.protobuf.ICar): wm.protobuf.Car; + + /** + * Encodes the specified Car message. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @param message Car message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Car message, length delimited. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @param message Car message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Car message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Car; + + /** + * Decodes a Car message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Car; + + /** + * Verifies a Car message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Car message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Car + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Car; + + /** + * Creates a plain object from a Car message. Also converts values to other types if specified. + * @param message Car + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Car, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Car to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Car + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarSetting. */ + interface ICarSetting { + + /** CarSetting carId */ + carId?: (number|null); + + /** CarSetting view */ + view: boolean; + + /** CarSetting transmission */ + transmission: boolean; + + /** CarSetting retire */ + retire: boolean; + + /** CarSetting meter */ + meter: number; + + /** CarSetting navigationMap */ + navigationMap: boolean; + + /** CarSetting volume */ + volume: number; + + /** CarSetting bgm */ + bgm: number; + + /** CarSetting nameplate */ + nameplate: number; + + /** CarSetting nameplateColor */ + nameplateColor: number; + + /** CarSetting terminalBackground */ + terminalBackground: number; + } + + /** Represents a CarSetting. */ + class CarSetting implements ICarSetting { + + /** + * Constructs a new CarSetting. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarSetting); + + /** CarSetting carId. */ + public carId: number; + + /** CarSetting view. */ + public view: boolean; + + /** CarSetting transmission. */ + public transmission: boolean; + + /** CarSetting retire. */ + public retire: boolean; + + /** CarSetting meter. */ + public meter: number; + + /** CarSetting navigationMap. */ + public navigationMap: boolean; + + /** CarSetting volume. */ + public volume: number; + + /** CarSetting bgm. */ + public bgm: number; + + /** CarSetting nameplate. */ + public nameplate: number; + + /** CarSetting nameplateColor. */ + public nameplateColor: number; + + /** CarSetting terminalBackground. */ + public terminalBackground: number; + + /** + * Creates a new CarSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns CarSetting instance + */ + public static create(properties?: wm.protobuf.ICarSetting): wm.protobuf.CarSetting; + + /** + * Encodes the specified CarSetting message. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @param message CarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarSetting message, length delimited. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @param message CarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarSetting; + + /** + * Decodes a CarSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarSetting; + + /** + * Verifies a CarSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarSetting + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarSetting; + + /** + * Creates a plain object from a CarSetting message. Also converts values to other types if specified. + * @param message CarSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GTWing. */ + interface IGTWing { + + /** GTWing pillar */ + pillar: number; + + /** GTWing pillarMaterial */ + pillarMaterial: number; + + /** GTWing mainWing */ + mainWing: number; + + /** GTWing mainWingColor */ + mainWingColor: number; + + /** GTWing wingTip */ + wingTip: number; + + /** GTWing material */ + material: number; + } + + /** Represents a GTWing. */ + class GTWing implements IGTWing { + + /** + * Constructs a new GTWing. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGTWing); + + /** GTWing pillar. */ + public pillar: number; + + /** GTWing pillarMaterial. */ + public pillarMaterial: number; + + /** GTWing mainWing. */ + public mainWing: number; + + /** GTWing mainWingColor. */ + public mainWingColor: number; + + /** GTWing wingTip. */ + public wingTip: number; + + /** GTWing material. */ + public material: number; + + /** + * Creates a new GTWing instance using the specified properties. + * @param [properties] Properties to set + * @returns GTWing instance + */ + public static create(properties?: wm.protobuf.IGTWing): wm.protobuf.GTWing; + + /** + * Encodes the specified GTWing message. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @param message GTWing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGTWing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GTWing message, length delimited. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @param message GTWing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGTWing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GTWing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GTWing; + + /** + * Decodes a GTWing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GTWing; + + /** + * Verifies a GTWing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GTWing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GTWing + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GTWing; + + /** + * Creates a plain object from a GTWing message. Also converts values to other types if specified. + * @param message GTWing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GTWing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GTWing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GTWing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarItem. */ + interface ICarItem { + + /** CarItem category */ + category: wm.protobuf.ItemCategory; + + /** CarItem itemId */ + itemId: number; + + /** CarItem amount */ + amount?: (number|null); + } + + /** Represents a CarItem. */ + class CarItem implements ICarItem { + + /** + * Constructs a new CarItem. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarItem); + + /** CarItem category. */ + public category: wm.protobuf.ItemCategory; + + /** CarItem itemId. */ + public itemId: number; + + /** CarItem amount. */ + public amount: number; + + /** + * Creates a new CarItem instance using the specified properties. + * @param [properties] Properties to set + * @returns CarItem instance + */ + public static create(properties?: wm.protobuf.ICarItem): wm.protobuf.CarItem; + + /** + * Encodes the specified CarItem message. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @param message CarItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarItem message, length delimited. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @param message CarItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarItem; + + /** + * Decodes a CarItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarItem; + + /** + * Verifies a CarItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarItem + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarItem; + + /** + * Creates a plain object from a CarItem message. Also converts values to other types if specified. + * @param message CarItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CopiedCar. */ + interface ICopiedCar { + + /** CopiedCar car */ + car: wm.protobuf.ICar; + + /** CopiedCar remainingPlayCounts */ + remainingPlayCounts: number; + } + + /** Represents a CopiedCar. */ + class CopiedCar implements ICopiedCar { + + /** + * Constructs a new CopiedCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICopiedCar); + + /** CopiedCar car. */ + public car: wm.protobuf.ICar; + + /** CopiedCar remainingPlayCounts. */ + public remainingPlayCounts: number; + + /** + * Creates a new CopiedCar instance using the specified properties. + * @param [properties] Properties to set + * @returns CopiedCar instance + */ + public static create(properties?: wm.protobuf.ICopiedCar): wm.protobuf.CopiedCar; + + /** + * Encodes the specified CopiedCar message. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @param message CopiedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICopiedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CopiedCar message, length delimited. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @param message CopiedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICopiedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CopiedCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CopiedCar; + + /** + * Decodes a CopiedCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CopiedCar; + + /** + * Verifies a CopiedCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CopiedCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CopiedCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CopiedCar; + + /** + * Creates a plain object from a CopiedCar message. Also converts values to other types if specified. + * @param message CopiedCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CopiedCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CopiedCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CopiedCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FriendCar. */ + interface IFriendCar { + + /** FriendCar car */ + car: wm.protobuf.ICar; + + /** FriendCar friendshipLevel */ + friendshipLevel?: (number|null); + + /** FriendCar nonhuman */ + nonhuman: boolean; + } + + /** Represents a FriendCar. */ + class FriendCar implements IFriendCar { + + /** + * Constructs a new FriendCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IFriendCar); + + /** FriendCar car. */ + public car: wm.protobuf.ICar; + + /** FriendCar friendshipLevel. */ + public friendshipLevel: number; + + /** FriendCar nonhuman. */ + public nonhuman: boolean; + + /** + * Creates a new FriendCar instance using the specified properties. + * @param [properties] Properties to set + * @returns FriendCar instance + */ + public static create(properties?: wm.protobuf.IFriendCar): wm.protobuf.FriendCar; + + /** + * Encodes the specified FriendCar message. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @param message FriendCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IFriendCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FriendCar message, length delimited. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @param message FriendCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IFriendCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FriendCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.FriendCar; + + /** + * Decodes a FriendCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.FriendCar; + + /** + * Verifies a FriendCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FriendCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FriendCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.FriendCar; + + /** + * Creates a plain object from a FriendCar message. Also converts values to other types if specified. + * @param message FriendCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.FriendCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FriendCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FriendCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChallengerCar. */ + interface IChallengerCar { + + /** ChallengerCar car */ + car: wm.protobuf.ICar; + + /** ChallengerCar stamp */ + stamp: number; + + /** ChallengerCar result */ + result: number; + + /** ChallengerCar area */ + area: number; + } + + /** Represents a ChallengerCar. */ + class ChallengerCar implements IChallengerCar { + + /** + * Constructs a new ChallengerCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IChallengerCar); + + /** ChallengerCar car. */ + public car: wm.protobuf.ICar; + + /** ChallengerCar stamp. */ + public stamp: number; + + /** ChallengerCar result. */ + public result: number; + + /** ChallengerCar area. */ + public area: number; + + /** + * Creates a new ChallengerCar instance using the specified properties. + * @param [properties] Properties to set + * @returns ChallengerCar instance + */ + public static create(properties?: wm.protobuf.IChallengerCar): wm.protobuf.ChallengerCar; + + /** + * Encodes the specified ChallengerCar message. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @param message ChallengerCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IChallengerCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChallengerCar message, length delimited. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @param message ChallengerCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IChallengerCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ChallengerCar; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ChallengerCar; + + /** + * Verifies a ChallengerCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChallengerCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChallengerCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ChallengerCar; + + /** + * Creates a plain object from a ChallengerCar message. Also converts values to other types if specified. + * @param message ChallengerCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ChallengerCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChallengerCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChallengerCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StampTargetCar. */ + interface IStampTargetCar { + + /** StampTargetCar car */ + car: wm.protobuf.ICar; + + /** StampTargetCar returnCount */ + returnCount: number; + + /** StampTargetCar locked */ + locked: boolean; + + /** StampTargetCar recommended */ + recommended: boolean; + } + + /** Represents a StampTargetCar. */ + class StampTargetCar implements IStampTargetCar { + + /** + * Constructs a new StampTargetCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IStampTargetCar); + + /** StampTargetCar car. */ + public car: wm.protobuf.ICar; + + /** StampTargetCar returnCount. */ + public returnCount: number; + + /** StampTargetCar locked. */ + public locked: boolean; + + /** StampTargetCar recommended. */ + public recommended: boolean; + + /** + * Creates a new StampTargetCar instance using the specified properties. + * @param [properties] Properties to set + * @returns StampTargetCar instance + */ + public static create(properties?: wm.protobuf.IStampTargetCar): wm.protobuf.StampTargetCar; + + /** + * Encodes the specified StampTargetCar message. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @param message StampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @param message StampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.StampTargetCar; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.StampTargetCar; + + /** + * Verifies a StampTargetCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StampTargetCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StampTargetCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.StampTargetCar; + + /** + * Creates a plain object from a StampTargetCar message. Also converts values to other types if specified. + * @param message StampTargetCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.StampTargetCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StampTargetCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StampTargetCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BookmarkedCar. */ + interface IBookmarkedCar { + + /** BookmarkedCar car */ + car: wm.protobuf.ICar; + + /** BookmarkedCar returnCount */ + returnCount: number; + } + + /** Represents a BookmarkedCar. */ + class BookmarkedCar implements IBookmarkedCar { + + /** + * Constructs a new BookmarkedCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IBookmarkedCar); + + /** BookmarkedCar car. */ + public car: wm.protobuf.ICar; + + /** BookmarkedCar returnCount. */ + public returnCount: number; + + /** + * Creates a new BookmarkedCar instance using the specified properties. + * @param [properties] Properties to set + * @returns BookmarkedCar instance + */ + public static create(properties?: wm.protobuf.IBookmarkedCar): wm.protobuf.BookmarkedCar; + + /** + * Encodes the specified BookmarkedCar message. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @param message BookmarkedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IBookmarkedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BookmarkedCar message, length delimited. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @param message BookmarkedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IBookmarkedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.BookmarkedCar; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.BookmarkedCar; + + /** + * Verifies a BookmarkedCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BookmarkedCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BookmarkedCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.BookmarkedCar; + + /** + * Creates a plain object from a BookmarkedCar message. Also converts values to other types if specified. + * @param message BookmarkedCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.BookmarkedCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BookmarkedCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BookmarkedCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PreviousVersionStampTargetCar. */ + interface IPreviousVersionStampTargetCar { + + /** PreviousVersionStampTargetCar car */ + car: wm.protobuf.ICar; + + /** PreviousVersionStampTargetCar returnCount */ + returnCount: number; + + /** PreviousVersionStampTargetCar currentCarId */ + currentCarId?: (number|null); + } + + /** Represents a PreviousVersionStampTargetCar. */ + class PreviousVersionStampTargetCar implements IPreviousVersionStampTargetCar { + + /** + * Constructs a new PreviousVersionStampTargetCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPreviousVersionStampTargetCar); + + /** PreviousVersionStampTargetCar car. */ + public car: wm.protobuf.ICar; + + /** PreviousVersionStampTargetCar returnCount. */ + public returnCount: number; + + /** PreviousVersionStampTargetCar currentCarId. */ + public currentCarId: number; + + /** + * Creates a new PreviousVersionStampTargetCar instance using the specified properties. + * @param [properties] Properties to set + * @returns PreviousVersionStampTargetCar instance + */ + public static create(properties?: wm.protobuf.IPreviousVersionStampTargetCar): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Encodes the specified PreviousVersionStampTargetCar message. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @param message PreviousVersionStampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPreviousVersionStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreviousVersionStampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @param message PreviousVersionStampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPreviousVersionStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Verifies a PreviousVersionStampTargetCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PreviousVersionStampTargetCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreviousVersionStampTargetCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Creates a plain object from a PreviousVersionStampTargetCar message. Also converts values to other types if specified. + * @param message PreviousVersionStampTargetCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PreviousVersionStampTargetCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreviousVersionStampTargetCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PreviousVersionStampTargetCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCar. */ + interface IGhostCar { + + /** GhostCar car */ + car: wm.protobuf.ICar; + + /** GhostCar area */ + area?: (number|null); + + /** GhostCar ramp */ + ramp?: (number|null); + + /** GhostCar path */ + path?: (number|null); + + /** GhostCar nonhuman */ + nonhuman?: (boolean|null); + + /** GhostCar type */ + type?: (wm.protobuf.GhostType|null); + + /** GhostCar trailId */ + trailId?: (number|Long|null); + } + + /** Represents a GhostCar. */ + class GhostCar implements IGhostCar { + + /** + * Constructs a new GhostCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCar); + + /** GhostCar car. */ + public car: wm.protobuf.ICar; + + /** GhostCar area. */ + public area: number; + + /** GhostCar ramp. */ + public ramp: number; + + /** GhostCar path. */ + public path: number; + + /** GhostCar nonhuman. */ + public nonhuman: boolean; + + /** GhostCar type. */ + public type: wm.protobuf.GhostType; + + /** GhostCar trailId. */ + public trailId: (number|Long); + + /** + * Creates a new GhostCar instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCar instance + */ + public static create(properties?: wm.protobuf.IGhostCar): wm.protobuf.GhostCar; + + /** + * Encodes the specified GhostCar message. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @param message GhostCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCar message, length delimited. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @param message GhostCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCar; + + /** + * Decodes a GhostCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCar; + + /** + * Verifies a GhostCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCar; + + /** + * Creates a plain object from a GhostCar message. Also converts values to other types if specified. + * @param message GhostCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Place. */ + interface IPlace { + + /** Place placeId */ + placeId: string; + + /** Place shopName */ + shopName: string; + + /** Place regionId */ + regionId: number; + + /** Place country */ + country: string; + } + + /** Represents a Place. */ + class Place implements IPlace { + + /** + * Constructs a new Place. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPlace); + + /** Place placeId. */ + public placeId: string; + + /** Place shopName. */ + public shopName: string; + + /** Place regionId. */ + public regionId: number; + + /** Place country. */ + public country: string; + + /** + * Creates a new Place instance using the specified properties. + * @param [properties] Properties to set + * @returns Place instance + */ + public static create(properties?: wm.protobuf.IPlace): wm.protobuf.Place; + + /** + * Encodes the specified Place message. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @param message Place message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Place message, length delimited. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @param message Place message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Place message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Place; + + /** + * Decodes a Place message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Place; + + /** + * Verifies a Place message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Place message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Place + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Place; + + /** + * Creates a plain object from a Place message. Also converts values to other types if specified. + * @param message Place + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Place, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Place to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Place + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SystemSetting. */ + interface ISystemSetting { + + /** SystemSetting mCoinChute */ + mCoinChute: number; + + /** SystemSetting mBuyCardCost */ + mBuyCardCost: number; + + /** SystemSetting mGameCost */ + mGameCost: number; + + /** SystemSetting mContinueCost */ + mContinueCost: number; + + /** SystemSetting mFullCourseCost */ + mFullCourseCost: number; + + /** SystemSetting mFreePlay */ + mFreePlay: boolean; + + /** SystemSetting mPcbId */ + mPcbId?: (number|null); + + /** SystemSetting mIcCardRw */ + mIcCardRw: boolean; + + /** SystemSetting mIcCardVender */ + mIcCardVender: boolean; + + /** SystemSetting mMgCardRw */ + mMgCardRw?: (boolean|null); + + /** SystemSetting mForceFeedback */ + mForceFeedback?: (boolean|null); + + /** SystemSetting mWinsAndRemains */ + mWinsAndRemains: boolean; + + /** SystemSetting mEventMode */ + mEventMode: number; + + /** SystemSetting mEventModeDist */ + mEventModeDist: boolean; + + /** SystemSetting mCloseType */ + mCloseType: number; + + /** SystemSetting mCloseSun */ + mCloseSun: number; + + /** SystemSetting mCloseMon */ + mCloseMon: number; + + /** SystemSetting mCloseTue */ + mCloseTue: number; + + /** SystemSetting mCloseWed */ + mCloseWed: number; + + /** SystemSetting mCloseThu */ + mCloseThu: number; + + /** SystemSetting mCloseFri */ + mCloseFri: number; + + /** SystemSetting mCloseSat */ + mCloseSat: number; + + /** SystemSetting mCloseDay */ + mCloseDay: number; + + /** SystemSetting mTouchPanel */ + mTouchPanel?: (boolean|null); + + /** SystemSetting mGameVol */ + mGameVol: number; + + /** SystemSetting mAttractVol */ + mAttractVol: number; + + /** SystemSetting mCalibHandleCenter */ + mCalibHandleCenter?: (number|null); + + /** SystemSetting mCalibAccelCenter */ + mCalibAccelCenter?: (number|null); + + /** SystemSetting mCalibBrakeCenter */ + mCalibBrakeCenter?: (number|null); + + /** SystemSetting mCalibTouchLeft */ + mCalibTouchLeft?: (number|null); + + /** SystemSetting mCalibTouchRight */ + mCalibTouchRight?: (number|null); + + /** SystemSetting mCalibTouchTop */ + mCalibTouchTop?: (number|null); + + /** SystemSetting mCalibTouchBottom */ + mCalibTouchBottom?: (number|null); + } + + /** Represents a SystemSetting. */ + class SystemSetting implements ISystemSetting { + + /** + * Constructs a new SystemSetting. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISystemSetting); + + /** SystemSetting mCoinChute. */ + public mCoinChute: number; + + /** SystemSetting mBuyCardCost. */ + public mBuyCardCost: number; + + /** SystemSetting mGameCost. */ + public mGameCost: number; + + /** SystemSetting mContinueCost. */ + public mContinueCost: number; + + /** SystemSetting mFullCourseCost. */ + public mFullCourseCost: number; + + /** SystemSetting mFreePlay. */ + public mFreePlay: boolean; + + /** SystemSetting mPcbId. */ + public mPcbId: number; + + /** SystemSetting mIcCardRw. */ + public mIcCardRw: boolean; + + /** SystemSetting mIcCardVender. */ + public mIcCardVender: boolean; + + /** SystemSetting mMgCardRw. */ + public mMgCardRw: boolean; + + /** SystemSetting mForceFeedback. */ + public mForceFeedback: boolean; + + /** SystemSetting mWinsAndRemains. */ + public mWinsAndRemains: boolean; + + /** SystemSetting mEventMode. */ + public mEventMode: number; + + /** SystemSetting mEventModeDist. */ + public mEventModeDist: boolean; + + /** SystemSetting mCloseType. */ + public mCloseType: number; + + /** SystemSetting mCloseSun. */ + public mCloseSun: number; + + /** SystemSetting mCloseMon. */ + public mCloseMon: number; + + /** SystemSetting mCloseTue. */ + public mCloseTue: number; + + /** SystemSetting mCloseWed. */ + public mCloseWed: number; + + /** SystemSetting mCloseThu. */ + public mCloseThu: number; + + /** SystemSetting mCloseFri. */ + public mCloseFri: number; + + /** SystemSetting mCloseSat. */ + public mCloseSat: number; + + /** SystemSetting mCloseDay. */ + public mCloseDay: number; + + /** SystemSetting mTouchPanel. */ + public mTouchPanel: boolean; + + /** SystemSetting mGameVol. */ + public mGameVol: number; + + /** SystemSetting mAttractVol. */ + public mAttractVol: number; + + /** SystemSetting mCalibHandleCenter. */ + public mCalibHandleCenter: number; + + /** SystemSetting mCalibAccelCenter. */ + public mCalibAccelCenter: number; + + /** SystemSetting mCalibBrakeCenter. */ + public mCalibBrakeCenter: number; + + /** SystemSetting mCalibTouchLeft. */ + public mCalibTouchLeft: number; + + /** SystemSetting mCalibTouchRight. */ + public mCalibTouchRight: number; + + /** SystemSetting mCalibTouchTop. */ + public mCalibTouchTop: number; + + /** SystemSetting mCalibTouchBottom. */ + public mCalibTouchBottom: number; + + /** + * Creates a new SystemSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns SystemSetting instance + */ + public static create(properties?: wm.protobuf.ISystemSetting): wm.protobuf.SystemSetting; + + /** + * Encodes the specified SystemSetting message. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @param message SystemSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISystemSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SystemSetting message, length delimited. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @param message SystemSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISystemSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SystemSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SystemSetting; + + /** + * Decodes a SystemSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SystemSetting; + + /** + * Verifies a SystemSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SystemSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SystemSetting + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SystemSetting; + + /** + * Creates a plain object from a SystemSetting message. Also converts values to other types if specified. + * @param message SystemSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SystemSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SystemSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SystemSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCompetitionSchedule. */ + interface IGhostCompetitionSchedule { + + /** GhostCompetitionSchedule competitionId */ + competitionId: number; + + /** GhostCompetitionSchedule qualifyingPeriodStartAt */ + qualifyingPeriodStartAt: number; + + /** GhostCompetitionSchedule qualifyingPeriodCloseAt */ + qualifyingPeriodCloseAt: number; + + /** GhostCompetitionSchedule competitionStartAt */ + competitionStartAt: number; + + /** GhostCompetitionSchedule competitionCloseAt */ + competitionCloseAt: number; + + /** GhostCompetitionSchedule competitionEndAt */ + competitionEndAt: number; + + /** GhostCompetitionSchedule lengthOfPeriod */ + lengthOfPeriod: number; + + /** GhostCompetitionSchedule lengthOfInterval */ + lengthOfInterval: number; + + /** GhostCompetitionSchedule area */ + area: number; + + /** GhostCompetitionSchedule minigamePatternId */ + minigamePatternId: number; + } + + /** Represents a GhostCompetitionSchedule. */ + class GhostCompetitionSchedule implements IGhostCompetitionSchedule { + + /** + * Constructs a new GhostCompetitionSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCompetitionSchedule); + + /** GhostCompetitionSchedule competitionId. */ + public competitionId: number; + + /** GhostCompetitionSchedule qualifyingPeriodStartAt. */ + public qualifyingPeriodStartAt: number; + + /** GhostCompetitionSchedule qualifyingPeriodCloseAt. */ + public qualifyingPeriodCloseAt: number; + + /** GhostCompetitionSchedule competitionStartAt. */ + public competitionStartAt: number; + + /** GhostCompetitionSchedule competitionCloseAt. */ + public competitionCloseAt: number; + + /** GhostCompetitionSchedule competitionEndAt. */ + public competitionEndAt: number; + + /** GhostCompetitionSchedule lengthOfPeriod. */ + public lengthOfPeriod: number; + + /** GhostCompetitionSchedule lengthOfInterval. */ + public lengthOfInterval: number; + + /** GhostCompetitionSchedule area. */ + public area: number; + + /** GhostCompetitionSchedule minigamePatternId. */ + public minigamePatternId: number; + + /** + * Creates a new GhostCompetitionSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionSchedule instance + */ + public static create(properties?: wm.protobuf.IGhostCompetitionSchedule): wm.protobuf.GhostCompetitionSchedule; + + /** + * Encodes the specified GhostCompetitionSchedule message. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @param message GhostCompetitionSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCompetitionSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionSchedule message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @param message GhostCompetitionSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCompetitionSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCompetitionSchedule; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCompetitionSchedule; + + /** + * Verifies a GhostCompetitionSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionSchedule + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCompetitionSchedule; + + /** + * Creates a plain object from a GhostCompetitionSchedule message. Also converts values to other types if specified. + * @param message GhostCompetitionSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCompetitionSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCompetitionParameter. */ + interface IGhostCompetitionParameter { + + /** GhostCompetitionParameter parameters1 */ + parameters1?: (number[]|null); + + /** GhostCompetitionParameter parameters2 */ + parameters2: boolean; + } + + /** Represents a GhostCompetitionParameter. */ + class GhostCompetitionParameter implements IGhostCompetitionParameter { + + /** + * Constructs a new GhostCompetitionParameter. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCompetitionParameter); + + /** GhostCompetitionParameter parameters1. */ + public parameters1: number[]; + + /** GhostCompetitionParameter parameters2. */ + public parameters2: boolean; + + /** + * Creates a new GhostCompetitionParameter instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionParameter instance + */ + public static create(properties?: wm.protobuf.IGhostCompetitionParameter): wm.protobuf.GhostCompetitionParameter; + + /** + * Encodes the specified GhostCompetitionParameter message. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @param message GhostCompetitionParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCompetitionParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionParameter message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @param message GhostCompetitionParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCompetitionParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCompetitionParameter; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCompetitionParameter; + + /** + * Verifies a GhostCompetitionParameter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionParameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionParameter + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCompetitionParameter; + + /** + * Creates a plain object from a GhostCompetitionParameter message. Also converts values to other types if specified. + * @param message GhostCompetitionParameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCompetitionParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionParameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionParameter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TransferNotice. */ + interface ITransferNotice { + + /** TransferNotice needToSeeTransferred */ + needToSeeTransferred: boolean; + + /** TransferNotice totalMaxiGold */ + totalMaxiGold?: (number|null); + + /** TransferNotice numOfPorscheCars */ + numOfPorscheCars?: (number|null); + + /** TransferNotice porscheModels */ + porscheModels?: (number[]|null); + + /** TransferNotice hasR35 */ + hasR35?: (boolean|null); + } + + /** Represents a TransferNotice. */ + class TransferNotice implements ITransferNotice { + + /** + * Constructs a new TransferNotice. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITransferNotice); + + /** TransferNotice needToSeeTransferred. */ + public needToSeeTransferred: boolean; + + /** TransferNotice totalMaxiGold. */ + public totalMaxiGold: number; + + /** TransferNotice numOfPorscheCars. */ + public numOfPorscheCars: number; + + /** TransferNotice porscheModels. */ + public porscheModels: number[]; + + /** TransferNotice hasR35. */ + public hasR35: boolean; + + /** + * Creates a new TransferNotice instance using the specified properties. + * @param [properties] Properties to set + * @returns TransferNotice instance + */ + public static create(properties?: wm.protobuf.ITransferNotice): wm.protobuf.TransferNotice; + + /** + * Encodes the specified TransferNotice message. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @param message TransferNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITransferNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransferNotice message, length delimited. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @param message TransferNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITransferNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransferNotice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TransferNotice; + + /** + * Decodes a TransferNotice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TransferNotice; + + /** + * Verifies a TransferNotice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransferNotice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransferNotice + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TransferNotice; + + /** + * Creates a plain object from a TransferNotice message. Also converts values to other types if specified. + * @param message TransferNotice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TransferNotice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransferNotice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransferNotice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GameFeatureVersion. */ + interface IGameFeatureVersion { + + /** GameFeatureVersion version */ + version: number; + + /** GameFeatureVersion year */ + year: number; + + /** GameFeatureVersion month */ + month: number; + + /** GameFeatureVersion pluses */ + pluses: number; + + /** GameFeatureVersion releaseAt */ + releaseAt: number; + } + + /** Represents a GameFeatureVersion. */ + class GameFeatureVersion implements IGameFeatureVersion { + + /** + * Constructs a new GameFeatureVersion. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGameFeatureVersion); + + /** GameFeatureVersion version. */ + public version: number; + + /** GameFeatureVersion year. */ + public year: number; + + /** GameFeatureVersion month. */ + public month: number; + + /** GameFeatureVersion pluses. */ + public pluses: number; + + /** GameFeatureVersion releaseAt. */ + public releaseAt: number; + + /** + * Creates a new GameFeatureVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns GameFeatureVersion instance + */ + public static create(properties?: wm.protobuf.IGameFeatureVersion): wm.protobuf.GameFeatureVersion; + + /** + * Encodes the specified GameFeatureVersion message. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @param message GameFeatureVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGameFeatureVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GameFeatureVersion message, length delimited. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @param message GameFeatureVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGameFeatureVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GameFeatureVersion; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GameFeatureVersion; + + /** + * Verifies a GameFeatureVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GameFeatureVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GameFeatureVersion + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GameFeatureVersion; + + /** + * Creates a plain object from a GameFeatureVersion message. Also converts values to other types if specified. + * @param message GameFeatureVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GameFeatureVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GameFeatureVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GameFeatureVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ScratchSheet. */ + interface IScratchSheet { + + /** ScratchSheet squares */ + squares?: (wm.protobuf.ScratchSheet.IScratchSquare[]|null); + } + + /** Represents a ScratchSheet. */ + class ScratchSheet implements IScratchSheet { + + /** + * Constructs a new ScratchSheet. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IScratchSheet); + + /** ScratchSheet squares. */ + public squares: wm.protobuf.ScratchSheet.IScratchSquare[]; + + /** + * Creates a new ScratchSheet instance using the specified properties. + * @param [properties] Properties to set + * @returns ScratchSheet instance + */ + public static create(properties?: wm.protobuf.IScratchSheet): wm.protobuf.ScratchSheet; + + /** + * Encodes the specified ScratchSheet message. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @param message ScratchSheet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IScratchSheet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScratchSheet message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @param message ScratchSheet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IScratchSheet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ScratchSheet; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ScratchSheet; + + /** + * Verifies a ScratchSheet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScratchSheet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScratchSheet + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ScratchSheet; + + /** + * Creates a plain object from a ScratchSheet message. Also converts values to other types if specified. + * @param message ScratchSheet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ScratchSheet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScratchSheet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScratchSheet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ScratchSheet { + + /** Properties of a ScratchSquare. */ + interface IScratchSquare { + + /** ScratchSquare category */ + category: wm.protobuf.ItemCategory; + + /** ScratchSquare itemId */ + itemId: number; + + /** ScratchSquare earned */ + earned: boolean; + } + + /** Represents a ScratchSquare. */ + class ScratchSquare implements IScratchSquare { + + /** + * Constructs a new ScratchSquare. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ScratchSheet.IScratchSquare); + + /** ScratchSquare category. */ + public category: wm.protobuf.ItemCategory; + + /** ScratchSquare itemId. */ + public itemId: number; + + /** ScratchSquare earned. */ + public earned: boolean; + + /** + * Creates a new ScratchSquare instance using the specified properties. + * @param [properties] Properties to set + * @returns ScratchSquare instance + */ + public static create(properties?: wm.protobuf.ScratchSheet.IScratchSquare): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Encodes the specified ScratchSquare message. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @param message ScratchSquare message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ScratchSheet.IScratchSquare, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScratchSquare message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @param message ScratchSquare message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ScratchSheet.IScratchSquare, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Verifies a ScratchSquare message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScratchSquare message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScratchSquare + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Creates a plain object from a ScratchSquare message. Also converts values to other types if specified. + * @param message ScratchSquare + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ScratchSheet.ScratchSquare, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScratchSquare to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScratchSquare + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a UserItem. */ + interface IUserItem { + + /** UserItem category */ + category: wm.protobuf.ItemCategory; + + /** UserItem itemId */ + itemId: number; + + /** UserItem userItemId */ + userItemId?: (number|null); + + /** UserItem earnedAt */ + earnedAt?: (number|null); + + /** UserItem expireAt */ + expireAt?: (number|null); + } + + /** Represents a UserItem. */ + class UserItem implements IUserItem { + + /** + * Constructs a new UserItem. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUserItem); + + /** UserItem category. */ + public category: wm.protobuf.ItemCategory; + + /** UserItem itemId. */ + public itemId: number; + + /** UserItem userItemId. */ + public userItemId: number; + + /** UserItem earnedAt. */ + public earnedAt: number; + + /** UserItem expireAt. */ + public expireAt: number; + + /** + * Creates a new UserItem instance using the specified properties. + * @param [properties] Properties to set + * @returns UserItem instance + */ + public static create(properties?: wm.protobuf.IUserItem): wm.protobuf.UserItem; + + /** + * Encodes the specified UserItem message. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @param message UserItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUserItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserItem message, length delimited. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @param message UserItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUserItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UserItem; + + /** + * Decodes a UserItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UserItem; + + /** + * Verifies a UserItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserItem + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UserItem; + + /** + * Creates a plain object from a UserItem message. Also converts values to other types if specified. + * @param message UserItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UserItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InviteFriendCampaignSchedule. */ + interface IInviteFriendCampaignSchedule { + + /** InviteFriendCampaignSchedule campaignId */ + campaignId: number; + + /** InviteFriendCampaignSchedule startAt */ + startAt: number; + + /** InviteFriendCampaignSchedule endAt */ + endAt: number; + + /** InviteFriendCampaignSchedule couponUnreceivableAt */ + couponUnreceivableAt: number; + } + + /** Represents an InviteFriendCampaignSchedule. */ + class InviteFriendCampaignSchedule implements IInviteFriendCampaignSchedule { + + /** + * Constructs a new InviteFriendCampaignSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IInviteFriendCampaignSchedule); + + /** InviteFriendCampaignSchedule campaignId. */ + public campaignId: number; + + /** InviteFriendCampaignSchedule startAt. */ + public startAt: number; + + /** InviteFriendCampaignSchedule endAt. */ + public endAt: number; + + /** InviteFriendCampaignSchedule couponUnreceivableAt. */ + public couponUnreceivableAt: number; + + /** + * Creates a new InviteFriendCampaignSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns InviteFriendCampaignSchedule instance + */ + public static create(properties?: wm.protobuf.IInviteFriendCampaignSchedule): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Encodes the specified InviteFriendCampaignSchedule message. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @param message InviteFriendCampaignSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IInviteFriendCampaignSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InviteFriendCampaignSchedule message, length delimited. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @param message InviteFriendCampaignSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IInviteFriendCampaignSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Verifies an InviteFriendCampaignSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InviteFriendCampaignSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InviteFriendCampaignSchedule + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Creates a plain object from an InviteFriendCampaignSchedule message. Also converts values to other types if specified. + * @param message InviteFriendCampaignSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.InviteFriendCampaignSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InviteFriendCampaignSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InviteFriendCampaignSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarTuning. */ + interface ICarTuning { + + /** CarTuning carId */ + carId: number; + + /** CarTuning tunePower */ + tunePower: number; + + /** CarTuning tuneHandling */ + tuneHandling: number; + + /** CarTuning lastPlayedAt */ + lastPlayedAt?: (number|null); + } + + /** Represents a CarTuning. */ + class CarTuning implements ICarTuning { + + /** + * Constructs a new CarTuning. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarTuning); + + /** CarTuning carId. */ + public carId: number; + + /** CarTuning tunePower. */ + public tunePower: number; + + /** CarTuning tuneHandling. */ + public tuneHandling: number; + + /** CarTuning lastPlayedAt. */ + public lastPlayedAt: number; + + /** + * Creates a new CarTuning instance using the specified properties. + * @param [properties] Properties to set + * @returns CarTuning instance + */ + public static create(properties?: wm.protobuf.ICarTuning): wm.protobuf.CarTuning; + + /** + * Encodes the specified CarTuning message. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @param message CarTuning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarTuning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarTuning message, length delimited. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @param message CarTuning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarTuning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarTuning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarTuning; + + /** + * Decodes a CarTuning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarTuning; + + /** + * Verifies a CarTuning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarTuning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarTuning + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarTuning; + + /** + * Creates a plain object from a CarTuning message. Also converts values to other types if specified. + * @param message CarTuning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarTuning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarTuning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarTuning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BinaryData. */ + interface IBinaryData { + + /** BinaryData data */ + data: Uint8Array; + + /** BinaryData mergeSerial */ + mergeSerial: number; + } + + /** Represents a BinaryData. */ + class BinaryData implements IBinaryData { + + /** + * Constructs a new BinaryData. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IBinaryData); + + /** BinaryData data. */ + public data: Uint8Array; + + /** BinaryData mergeSerial. */ + public mergeSerial: number; + + /** + * Creates a new BinaryData instance using the specified properties. + * @param [properties] Properties to set + * @returns BinaryData instance + */ + public static create(properties?: wm.protobuf.IBinaryData): wm.protobuf.BinaryData; + + /** + * Encodes the specified BinaryData message. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @param message BinaryData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IBinaryData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BinaryData message, length delimited. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @param message BinaryData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IBinaryData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BinaryData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.BinaryData; + + /** + * Decodes a BinaryData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.BinaryData; + + /** + * Verifies a BinaryData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BinaryData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BinaryData + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.BinaryData; + + /** + * Creates a plain object from a BinaryData message. Also converts values to other types if specified. + * @param message BinaryData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.BinaryData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BinaryData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BinaryData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostTrail. */ + interface IGhostTrail { + + /** GhostTrail carId */ + carId: number; + + /** GhostTrail area */ + area: number; + + /** GhostTrail ramp */ + ramp: number; + + /** GhostTrail path */ + path: number; + + /** GhostTrail playedAt */ + playedAt: number; + + /** GhostTrail playedPlace */ + playedPlace?: (wm.protobuf.IPlace|null); + + /** GhostTrail trail */ + trail: Uint8Array; + } + + /** Represents a GhostTrail. */ + class GhostTrail implements IGhostTrail { + + /** + * Constructs a new GhostTrail. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostTrail); + + /** GhostTrail carId. */ + public carId: number; + + /** GhostTrail area. */ + public area: number; + + /** GhostTrail ramp. */ + public ramp: number; + + /** GhostTrail path. */ + public path: number; + + /** GhostTrail playedAt. */ + public playedAt: number; + + /** GhostTrail playedPlace. */ + public playedPlace?: (wm.protobuf.IPlace|null); + + /** GhostTrail trail. */ + public trail: Uint8Array; + + /** + * Creates a new GhostTrail instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostTrail instance + */ + public static create(properties?: wm.protobuf.IGhostTrail): wm.protobuf.GhostTrail; + + /** + * Encodes the specified GhostTrail message. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @param message GhostTrail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostTrail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostTrail message, length delimited. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @param message GhostTrail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostTrail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostTrail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostTrail; + + /** + * Decodes a GhostTrail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostTrail; + + /** + * Verifies a GhostTrail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostTrail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostTrail + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostTrail; + + /** + * Creates a plain object from a GhostTrail message. Also converts values to other types if specified. + * @param message GhostTrail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostTrail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostTrail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostTrail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PlaceList. */ + interface IPlaceList { + + /** PlaceList places */ + places?: (wm.protobuf.IPlace[]|null); + } + + /** Represents a PlaceList. */ + class PlaceList implements IPlaceList { + + /** + * Constructs a new PlaceList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPlaceList); + + /** PlaceList places. */ + public places: wm.protobuf.IPlace[]; + + /** + * Creates a new PlaceList instance using the specified properties. + * @param [properties] Properties to set + * @returns PlaceList instance + */ + public static create(properties?: wm.protobuf.IPlaceList): wm.protobuf.PlaceList; + + /** + * Encodes the specified PlaceList message. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @param message PlaceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPlaceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlaceList message, length delimited. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @param message PlaceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPlaceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlaceList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PlaceList; + + /** + * Decodes a PlaceList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PlaceList; + + /** + * Verifies a PlaceList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlaceList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlaceList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PlaceList; + + /** + * Creates a plain object from a PlaceList message. Also converts values to other types if specified. + * @param message PlaceList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PlaceList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlaceList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlaceList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostList. */ + interface IGhostList { + + /** GhostList ghosts */ + ghosts?: (wm.protobuf.IGhostCar[]|null); + } + + /** Represents a GhostList. */ + class GhostList implements IGhostList { + + /** + * Constructs a new GhostList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostList); + + /** GhostList ghosts. */ + public ghosts: wm.protobuf.IGhostCar[]; + + /** + * Creates a new GhostList instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostList instance + */ + public static create(properties?: wm.protobuf.IGhostList): wm.protobuf.GhostList; + + /** + * Encodes the specified GhostList message. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @param message GhostList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostList message, length delimited. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @param message GhostList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostList; + + /** + * Decodes a GhostList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostList; + + /** + * Verifies a GhostList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostList; + + /** + * Creates a plain object from a GhostList message. Also converts values to other types if specified. + * @param message GhostList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarSummary. */ + interface ICarSummary { + + /** CarSummary hitCount */ + hitCount: number; + + /** CarSummary cars */ + cars?: (wm.protobuf.ICar[]|null); + } + + /** Represents a CarSummary. */ + class CarSummary implements ICarSummary { + + /** + * Constructs a new CarSummary. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarSummary); + + /** CarSummary hitCount. */ + public hitCount: number; + + /** CarSummary cars. */ + public cars: wm.protobuf.ICar[]; + + /** + * Creates a new CarSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns CarSummary instance + */ + public static create(properties?: wm.protobuf.ICarSummary): wm.protobuf.CarSummary; + + /** + * Encodes the specified CarSummary message. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @param message CarSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarSummary message, length delimited. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @param message CarSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarSummary; + + /** + * Decodes a CarSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarSummary; + + /** + * Verifies a CarSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarSummary + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarSummary; + + /** + * Creates a plain object from a CarSummary message. Also converts values to other types if specified. + * @param message CarSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileList. */ + interface IFileList { + + /** FileList files */ + files?: (wm.protobuf.FileList.IFileInfo[]|null); + + /** FileList interval */ + interval?: (number|null); + } + + /** Represents a FileList. */ + class FileList implements IFileList { + + /** + * Constructs a new FileList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IFileList); + + /** FileList files. */ + public files: wm.protobuf.FileList.IFileInfo[]; + + /** FileList interval. */ + public interval: number; + + /** + * Creates a new FileList instance using the specified properties. + * @param [properties] Properties to set + * @returns FileList instance + */ + public static create(properties?: wm.protobuf.IFileList): wm.protobuf.FileList; + + /** + * Encodes the specified FileList message. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @param message FileList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IFileList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileList message, length delimited. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @param message FileList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IFileList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.FileList; + + /** + * Decodes a FileList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.FileList; + + /** + * Verifies a FileList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.FileList; + + /** + * Creates a plain object from a FileList message. Also converts values to other types if specified. + * @param message FileList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.FileList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileList { + + /** Properties of a FileInfo. */ + interface IFileInfo { + + /** FileInfo fileId */ + fileId: number; + + /** FileInfo fileType */ + fileType: wm.protobuf.FileType; + + /** FileInfo fileSize */ + fileSize: number; + + /** FileInfo url */ + url: string; + + /** FileInfo sha1sum */ + sha1sum: Uint8Array; + + /** FileInfo notBefore */ + notBefore: number; + + /** FileInfo notAfter */ + notAfter: number; + } + + /** Represents a FileInfo. */ + class FileInfo implements IFileInfo { + + /** + * Constructs a new FileInfo. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.FileList.IFileInfo); + + /** FileInfo fileId. */ + public fileId: number; + + /** FileInfo fileType. */ + public fileType: wm.protobuf.FileType; + + /** FileInfo fileSize. */ + public fileSize: number; + + /** FileInfo url. */ + public url: string; + + /** FileInfo sha1sum. */ + public sha1sum: Uint8Array; + + /** FileInfo notBefore. */ + public notBefore: number; + + /** FileInfo notAfter. */ + public notAfter: number; + + /** + * Creates a new FileInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FileInfo instance + */ + public static create(properties?: wm.protobuf.FileList.IFileInfo): wm.protobuf.FileList.FileInfo; + + /** + * Encodes the specified FileInfo message. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @param message FileInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.FileList.IFileInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileInfo message, length delimited. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @param message FileInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.FileList.IFileInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.FileList.FileInfo; + + /** + * Decodes a FileInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.FileList.FileInfo; + + /** + * Verifies a FileInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileInfo + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.FileList.FileInfo; + + /** + * Creates a plain object from a FileInfo message. Also converts values to other types if specified. + * @param message FileInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.FileList.FileInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GhostCompetitionTarget. */ + interface IGhostCompetitionTarget { + + /** GhostCompetitionTarget competitionId */ + competitionId: number; + + /** GhostCompetitionTarget specialGhostId */ + specialGhostId?: (number|null); + + /** GhostCompetitionTarget ghostCar */ + ghostCar: wm.protobuf.IGhostCar; + + /** GhostCompetitionTarget trailId */ + trailId: (number|Long); + + /** GhostCompetitionTarget updatedAt */ + updatedAt: number; + + /** GhostCompetitionTarget competitionSchedule */ + competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + } + + /** Represents a GhostCompetitionTarget. */ + class GhostCompetitionTarget implements IGhostCompetitionTarget { + + /** + * Constructs a new GhostCompetitionTarget. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCompetitionTarget); + + /** GhostCompetitionTarget competitionId. */ + public competitionId: number; + + /** GhostCompetitionTarget specialGhostId. */ + public specialGhostId: number; + + /** GhostCompetitionTarget ghostCar. */ + public ghostCar: wm.protobuf.IGhostCar; + + /** GhostCompetitionTarget trailId. */ + public trailId: (number|Long); + + /** GhostCompetitionTarget updatedAt. */ + public updatedAt: number; + + /** GhostCompetitionTarget competitionSchedule. */ + public competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** + * Creates a new GhostCompetitionTarget instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionTarget instance + */ + public static create(properties?: wm.protobuf.IGhostCompetitionTarget): wm.protobuf.GhostCompetitionTarget; + + /** + * Encodes the specified GhostCompetitionTarget message. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @param message GhostCompetitionTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCompetitionTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionTarget message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @param message GhostCompetitionTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCompetitionTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCompetitionTarget; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCompetitionTarget; + + /** + * Verifies a GhostCompetitionTarget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionTarget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionTarget + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCompetitionTarget; + + /** + * Creates a plain object from a GhostCompetitionTarget message. Also converts values to other types if specified. + * @param message GhostCompetitionTarget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCompetitionTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionTarget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** SystemConstant enum. */ + enum SystemConstant { + PROTOBUF_MESSAGE_REVISION = 8053 + } + + /** ErrorCode enum. */ + enum ErrorCode { + ERR_SUCCESS = 0, + ERR_REQUEST = 1, + ERR_NOT_FOUND = 2, + ERR_ID_SERVER = 3, + ERR_ID_BANNED = 4, + ERR_USER_LOCKED = 5, + ERR_USER_VERSION = 6, + ERR_NAME_CONFLICTED = 7, + ERR_FORBIDDEN = 9, + ERR_USER_SUCCEEDED = 11, + ERR_BEING_TRANSFERRED = 12, + ERR_SCRATCH_LOCKED = 13 + } + + /** LineType enum. */ + enum LineType { + L_UNKNOWN = 0, + L_MOBILE = 1, + L_ISDN = 2, + L_BFLETS = 3, + L_ADSL = 4, + L_WIRED = 5 + } + + /** TerminalType enum. */ + enum TerminalType { + T_DRIVE = 0, + T_TERMINAL = 1 + } + + /** DeviceType enum. */ + enum DeviceType { + DEVICE_CARD = 0, + DEVICE_PHONE = 1 + } + + /** ItemCategory enum. */ + enum ItemCategory { + CAT_CUSTOM_COLOR = 1, + CAT_WHEEL = 2, + CAT_AERO = 3, + CAT_BONNET = 4, + CAT_WING = 5, + CAT_MIRROR = 6, + CAT_NEON = 8, + CAT_TRUNK = 9, + CAT_NUMBER_PLATE = 10, + CAT_GT_WING = 12, + CAT_AURA_MOTIF = 14, + CAT_METER = 15, + CAT_BGM = 16, + CAT_NAME_PLATE = 17, + CAT_NUMBER = 19, + CAT_BGM_TRACK = 22, + CAT_WINDOW_STICKER_FONT = 24, + CAT_WINDOW_DECORATION = 25, + CAT_RIVAL_MARKER = 26, + CAT_STAMP = 27, + CAT_TERMINAL_BACKGROUND = 28, + CAT_CAR_TICKET = 201, + CAT_CONSUMPTION_ITEM = 202, + CAT_CAR_TICKET_FREE = 203, + CAT_AERO_FULLSET = 300, + CAT_AERO_LIMITED = 301 + } + + /** TutorialType enum. */ + enum TutorialType { + TUTORIAL_ID_STORY = 0, + TUTORIAL_ID_TIME_ATTACK = 1, + TUTORIAL_ID_GHOST = 2, + TUTORIAL_ID_GHOST_CHALLENGE = 3, + TUTORIAL_ID_GHOST_LEVEL = 4, + TUTORIAL_ID_UNUSED_5 = 5, + TUTORIAL_ID_GHOST_SEARCH = 6, + TUTORIAL_ID_GHOST_COMPETITION = 7, + TUTORIAL_ID_HP600_CARD = 8, + TUTORIAL_ID_UNUSED_9 = 9, + TUTORIAL_ID_COMPETITION_QUALIFIED = 10, + TUTORIAL_ID_COMPETITION_TERMINAL = 11, + TUTORIAL_ID_COMPETITION_NOTICE = 12, + TUTORIAL_ID_COMPETITION_FINISHED = 13, + TUTORIAL_ID_UNUSED_14 = 14, + TUTORIAL_ID_UNUSED_15 = 15, + TUTORIAL_ID_UNUSED_16 = 16, + TUTORIAL_ID_UNUSED_17 = 17, + TUTORIAL_ID_UNUSED_18 = 18, + TUTORIAL_ID_UNUSED_19 = 19, + TUTORIAL_ID_GHOST_STAMP = 20, + TUTORIAL_ID_GHOST_STAMP_DECLINED = 21, + TUTORIAL_ID_GHOST_STAMP_FRIENDS = 22, + TUTORIAL_ID_TERMINAL_SCRATCH = 23, + TUTORIAL_ID_TURN_SCRATCH_SHEET = 24, + TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN = 25, + TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE = 26, + TUTORIAL_ID_VS_CONTINUE_TICKET = 27, + TUTORIAL_ID_UNUSED_28 = 28, + TUTORIAL_ID_UNUSED_29 = 29, + TUTORIAL_ID_UNUSED_30 = 30, + TUTORIAL_ID_DRESS_UP = 31, + TUTORIAL_ID_MULTI_GHOST = 32, + TUTORIAL_ID_STORY_NEW_FEATURE = 33, + TUTORIAL_ID_GHOST_NEW_FEATURE = 34, + TUTORIAL_ID_GHOST_REGION_MAP = 35 + } + + /** GameMode enum. */ + enum GameMode { + MODE_STORY = 1, + MODE_TIME_ATTACK = 2, + MODE_VS_BATTLE = 3, + MODE_GHOST_BATTLE = 4, + MODE_EVENT = 5 + } + + /** GhostType enum. */ + enum GhostType { + GHOST_NORMAL = 1, + GHOST_PINCH_RUNNER = 2, + GHOST_DEFAULT = 3 + } + + /** GhostSelectionMethod enum. */ + enum GhostSelectionMethod { + GHOST_SEARCH_BY_REGION = 1, + GHOST_SELECT_BY_LEVEL = 2, + GHOST_SELECT_CROWN_MATCH = 3, + GHOST_SELECT_STAMP_MATCH = 4, + GHOST_SELECT_FROM_HISTORY = 5, + GHOST_SEARCH_BY_SHOP = 6, + GHOST_SEARCH_BY_NAME = 7, + GHOST_ACCEPT_CHALLENGER = 8, + GHOST_APPOINTMENT = 9, + GHOST_DEFAULT_OPPONENT = 10, + GHOST_COMPETITION = 11, + GHOST_SELECT_FROM_BOOKMARKS = 12 + } + + /** GhostRateType enum. */ + enum GhostRateType { + GHOST_RATE_UNKNOWN = 1, + GHOST_RATE_INVALID = 2, + GHOST_RATE_VALID = 3 + } + + /** PathSelectionMethod enum. */ + enum PathSelectionMethod { + PATH_NEW = 1, + PATH_PLAIN = 2, + PATH_FRIEND = 3, + PATH_NORMAL = 4, + PATH_CHALLENGER = 5 + } + + /** NoticeEntry enum. */ + enum NoticeEntry { + NOTICE_UNUSED_1 = 1, + NOTICE_UNUSED_2 = 2, + NOTICE_UNUSED_3 = 3, + NOTICE_UNUSED_4 = 4, + NOTICE_UNUSED_5 = 5, + NOTICE_UNUSED_6 = 6, + NOTICE_UNUSED_7 = 7, + NOTICE_UNUSED_8 = 8, + NOTICE_UNUSED_9 = 9, + NOTICE_UNUSED_10 = 10, + NOTICE_UNUSED_11 = 11, + NOTICE_UNUSED_12 = 12 + } + + /** FileType enum. */ + enum FileType { + FILE_PROMOTION_ANNOUNCEMENT = 1, + FILE_FEATURE_ANNOUNCEMENT = 4, + FILE_SPAPP_ANNOUNCEMENT = 6 + } + + /** GhostCompetitionParticipantState enum. */ + enum GhostCompetitionParticipantState { + COMPETITION_NOT_PARTICIPATED = 1, + COMPETITION_QUALIFIED = 2, + COMPETITION_PARTICIPATED = 3, + COMPETITION_WON = 4 + } + + /** ScreenshotType enum. */ + enum ScreenshotType { + SS_GHOST_BATTLE = 1, + SS_VERSUS_BATTLE = 2, + SS_TERMINAL = 3, + SS_ACQUIRING_VERSUS_STAR = 4, + SS_ACQUIRING_AURA_MOTIF = 5, + SS_GHOST_REGION_MAP = 6, + SS_ACQUIRING_CROWN = 7, + SS_GHOST_COMPETITION_RESULT = 8, + SS_TIME_ATTACK_RESULT = 9, + SS_LEVEL_UP = 10 + } + + /** TransferState enum. */ + enum TransferState { + NOT_REGISTERED = 0, + NEW_REGISTRATION = 1, + TRANSFER_REQUIRED = 2, + TRANSFERRING = 3, + TRANSFERRED = 4 + } + + /** EventModeSerialErrorCode enum. */ + enum EventModeSerialErrorCode { + SERIAL_SUCCESS = 0, + SERIAL_ATTEMPT_TO_CHANGE = 1, + SERIAL_NO_INPUT = 2, + SERIAL_INVALID = 3, + SERIAL_EXPIRED = 4, + SERIAL_OTHER_PLACE = 5 + } + + /** ClientLogType enum. */ + enum ClientLogType { + LOG_LOAD_REPORT = 0, + LOG_ERROR = 1 + } + + /** SmartphoneAppState enum. */ + enum SmartphoneAppState { + SPAPP_UNREGISTERED = 0, + SPAPP_KTID = 1, + SPAPP_BNID = 2 + } + } +} diff --git a/src/wmmt/service.proto.js b/src/wmmt/service.proto.js new file mode 100644 index 0000000..0b93ff8 --- /dev/null +++ b/src/wmmt/service.proto.js @@ -0,0 +1,56887 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +import * as $protobuf from "protobufjs/minimal"; + +// Common aliases +const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +export const wm = $root.wm = (() => { + + /** + * Namespace wm. + * @exports wm + * @namespace + */ + const wm = {}; + + wm.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof wm + * @namespace + */ + const protobuf = {}; + + protobuf.Rpc = (function() { + + /** + * Constructs a new Rpc service. + * @memberof wm.protobuf + * @classdesc Represents a Rpc + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Rpc(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Rpc.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Rpc; + + /** + * Creates new Rpc service using the specified rpc implementation. + * @function create + * @memberof wm.protobuf.Rpc + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Rpc} RPC service. Useful where requests and/or responses are streamed. + */ + Rpc.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link wm.protobuf.Rpc#register_system_info}. + * @memberof wm.protobuf.Rpc + * @typedef register_system_infoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.RegisterSystemInfoResponse} [response] RegisterSystemInfoResponse + */ + + /** + * Calls register_system_info. + * @function register_system_info + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IRegisterSystemInfoRequest} request RegisterSystemInfoRequest message or plain object + * @param {wm.protobuf.Rpc.register_system_infoCallback} callback Node-style callback called with the error, if any, and RegisterSystemInfoResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.register_system_info = function register_system_info(request, callback) { + return this.rpcCall(register_system_info, $root.wm.protobuf.RegisterSystemInfoRequest, $root.wm.protobuf.RegisterSystemInfoResponse, request, callback); + }, "name", { value: "register_system_info" }); + + /** + * Calls register_system_info. + * @function register_system_info + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IRegisterSystemInfoRequest} request RegisterSystemInfoRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#register_system_stats}. + * @memberof wm.protobuf.Rpc + * @typedef register_system_statsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.RegisterSystemStatsResponse} [response] RegisterSystemStatsResponse + */ + + /** + * Calls register_system_stats. + * @function register_system_stats + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IRegisterSystemStatsRequest} request RegisterSystemStatsRequest message or plain object + * @param {wm.protobuf.Rpc.register_system_statsCallback} callback Node-style callback called with the error, if any, and RegisterSystemStatsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.register_system_stats = function register_system_stats(request, callback) { + return this.rpcCall(register_system_stats, $root.wm.protobuf.RegisterSystemStatsRequest, $root.wm.protobuf.RegisterSystemStatsResponse, request, callback); + }, "name", { value: "register_system_stats" }); + + /** + * Calls register_system_stats. + * @function register_system_stats + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IRegisterSystemStatsRequest} request RegisterSystemStatsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#register_ghost_trail}. + * @memberof wm.protobuf.Rpc + * @typedef register_ghost_trailCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.RegisterGhostTrailResponse} [response] RegisterGhostTrailResponse + */ + + /** + * Calls register_ghost_trail. + * @function register_ghost_trail + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IRegisterGhostTrailRequest} request RegisterGhostTrailRequest message or plain object + * @param {wm.protobuf.Rpc.register_ghost_trailCallback} callback Node-style callback called with the error, if any, and RegisterGhostTrailResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.register_ghost_trail = function register_ghost_trail(request, callback) { + return this.rpcCall(register_ghost_trail, $root.wm.protobuf.RegisterGhostTrailRequest, $root.wm.protobuf.RegisterGhostTrailResponse, request, callback); + }, "name", { value: "register_ghost_trail" }); + + /** + * Calls register_ghost_trail. + * @function register_ghost_trail + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IRegisterGhostTrailRequest} request RegisterGhostTrailRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_user}. + * @memberof wm.protobuf.Rpc + * @typedef load_userCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadUserResponse} [response] LoadUserResponse + */ + + /** + * Calls load_user. + * @function load_user + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadUserRequest} request LoadUserRequest message or plain object + * @param {wm.protobuf.Rpc.load_userCallback} callback Node-style callback called with the error, if any, and LoadUserResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_user = function load_user(request, callback) { + return this.rpcCall(load_user, $root.wm.protobuf.LoadUserRequest, $root.wm.protobuf.LoadUserResponse, request, callback); + }, "name", { value: "load_user" }); + + /** + * Calls load_user. + * @function load_user + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadUserRequest} request LoadUserRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#update_user_session}. + * @memberof wm.protobuf.Rpc + * @typedef update_user_sessionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.UpdateUserSessionResponse} [response] UpdateUserSessionResponse + */ + + /** + * Calls update_user_session. + * @function update_user_session + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IUpdateUserSessionRequest} request UpdateUserSessionRequest message or plain object + * @param {wm.protobuf.Rpc.update_user_sessionCallback} callback Node-style callback called with the error, if any, and UpdateUserSessionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.update_user_session = function update_user_session(request, callback) { + return this.rpcCall(update_user_session, $root.wm.protobuf.UpdateUserSessionRequest, $root.wm.protobuf.UpdateUserSessionResponse, request, callback); + }, "name", { value: "update_user_session" }); + + /** + * Calls update_user_session. + * @function update_user_session + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IUpdateUserSessionRequest} request UpdateUserSessionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_drive_information}. + * @memberof wm.protobuf.Rpc + * @typedef load_drive_informationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadDriveInformationResponse} [response] LoadDriveInformationResponse + */ + + /** + * Calls load_drive_information. + * @function load_drive_information + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadDriveInformationRequest} request LoadDriveInformationRequest message or plain object + * @param {wm.protobuf.Rpc.load_drive_informationCallback} callback Node-style callback called with the error, if any, and LoadDriveInformationResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_drive_information = function load_drive_information(request, callback) { + return this.rpcCall(load_drive_information, $root.wm.protobuf.LoadDriveInformationRequest, $root.wm.protobuf.LoadDriveInformationResponse, request, callback); + }, "name", { value: "load_drive_information" }); + + /** + * Calls load_drive_information. + * @function load_drive_information + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadDriveInformationRequest} request LoadDriveInformationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_car}. + * @memberof wm.protobuf.Rpc + * @typedef load_carCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadCarResponse} [response] LoadCarResponse + */ + + /** + * Calls load_car. + * @function load_car + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadCarRequest} request LoadCarRequest message or plain object + * @param {wm.protobuf.Rpc.load_carCallback} callback Node-style callback called with the error, if any, and LoadCarResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_car = function load_car(request, callback) { + return this.rpcCall(load_car, $root.wm.protobuf.LoadCarRequest, $root.wm.protobuf.LoadCarResponse, request, callback); + }, "name", { value: "load_car" }); + + /** + * Calls load_car. + * @function load_car + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadCarRequest} request LoadCarRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#create_car}. + * @memberof wm.protobuf.Rpc + * @typedef create_carCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.CreateCarResponse} [response] CreateCarResponse + */ + + /** + * Calls create_car. + * @function create_car + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ICreateCarRequest} request CreateCarRequest message or plain object + * @param {wm.protobuf.Rpc.create_carCallback} callback Node-style callback called with the error, if any, and CreateCarResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.create_car = function create_car(request, callback) { + return this.rpcCall(create_car, $root.wm.protobuf.CreateCarRequest, $root.wm.protobuf.CreateCarResponse, request, callback); + }, "name", { value: "create_car" }); + + /** + * Calls create_car. + * @function create_car + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ICreateCarRequest} request CreateCarRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_game_history}. + * @memberof wm.protobuf.Rpc + * @typedef load_game_historyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadGameHistoryResponse} [response] LoadGameHistoryResponse + */ + + /** + * Calls load_game_history. + * @function load_game_history + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadGameHistoryRequest} request LoadGameHistoryRequest message or plain object + * @param {wm.protobuf.Rpc.load_game_historyCallback} callback Node-style callback called with the error, if any, and LoadGameHistoryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_game_history = function load_game_history(request, callback) { + return this.rpcCall(load_game_history, $root.wm.protobuf.LoadGameHistoryRequest, $root.wm.protobuf.LoadGameHistoryResponse, request, callback); + }, "name", { value: "load_game_history" }); + + /** + * Calls load_game_history. + * @function load_game_history + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadGameHistoryRequest} request LoadGameHistoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#update_car}. + * @memberof wm.protobuf.Rpc + * @typedef update_carCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.UpdateCarResponse} [response] UpdateCarResponse + */ + + /** + * Calls update_car. + * @function update_car + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IUpdateCarRequest} request UpdateCarRequest message or plain object + * @param {wm.protobuf.Rpc.update_carCallback} callback Node-style callback called with the error, if any, and UpdateCarResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.update_car = function update_car(request, callback) { + return this.rpcCall(update_car, $root.wm.protobuf.UpdateCarRequest, $root.wm.protobuf.UpdateCarResponse, request, callback); + }, "name", { value: "update_car" }); + + /** + * Calls update_car. + * @function update_car + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IUpdateCarRequest} request UpdateCarRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#save_game_result}. + * @memberof wm.protobuf.Rpc + * @typedef save_game_resultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.SaveGameResultResponse} [response] SaveGameResultResponse + */ + + /** + * Calls save_game_result. + * @function save_game_result + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISaveGameResultRequest} request SaveGameResultRequest message or plain object + * @param {wm.protobuf.Rpc.save_game_resultCallback} callback Node-style callback called with the error, if any, and SaveGameResultResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.save_game_result = function save_game_result(request, callback) { + return this.rpcCall(save_game_result, $root.wm.protobuf.SaveGameResultRequest, $root.wm.protobuf.SaveGameResultResponse, request, callback); + }, "name", { value: "save_game_result" }); + + /** + * Calls save_game_result. + * @function save_game_result + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISaveGameResultRequest} request SaveGameResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#save_charge}. + * @memberof wm.protobuf.Rpc + * @typedef save_chargeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.SaveChargeResponse} [response] SaveChargeResponse + */ + + /** + * Calls save_charge. + * @function save_charge + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISaveChargeRequest} request SaveChargeRequest message or plain object + * @param {wm.protobuf.Rpc.save_chargeCallback} callback Node-style callback called with the error, if any, and SaveChargeResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.save_charge = function save_charge(request, callback) { + return this.rpcCall(save_charge, $root.wm.protobuf.SaveChargeRequest, $root.wm.protobuf.SaveChargeResponse, request, callback); + }, "name", { value: "save_charge" }); + + /** + * Calls save_charge. + * @function save_charge + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISaveChargeRequest} request SaveChargeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_ghost_battle_info}. + * @memberof wm.protobuf.Rpc + * @typedef load_ghost_battle_infoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadGhostBattleInfoResponse} [response] LoadGhostBattleInfoResponse + */ + + /** + * Calls load_ghost_battle_info. + * @function load_ghost_battle_info + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadGhostBattleInfoRequest} request LoadGhostBattleInfoRequest message or plain object + * @param {wm.protobuf.Rpc.load_ghost_battle_infoCallback} callback Node-style callback called with the error, if any, and LoadGhostBattleInfoResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_ghost_battle_info = function load_ghost_battle_info(request, callback) { + return this.rpcCall(load_ghost_battle_info, $root.wm.protobuf.LoadGhostBattleInfoRequest, $root.wm.protobuf.LoadGhostBattleInfoResponse, request, callback); + }, "name", { value: "load_ghost_battle_info" }); + + /** + * Calls load_ghost_battle_info. + * @function load_ghost_battle_info + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadGhostBattleInfoRequest} request LoadGhostBattleInfoRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_stamp_target}. + * @memberof wm.protobuf.Rpc + * @typedef load_stamp_targetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadStampTargetResponse} [response] LoadStampTargetResponse + */ + + /** + * Calls load_stamp_target. + * @function load_stamp_target + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadStampTargetRequest} request LoadStampTargetRequest message or plain object + * @param {wm.protobuf.Rpc.load_stamp_targetCallback} callback Node-style callback called with the error, if any, and LoadStampTargetResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_stamp_target = function load_stamp_target(request, callback) { + return this.rpcCall(load_stamp_target, $root.wm.protobuf.LoadStampTargetRequest, $root.wm.protobuf.LoadStampTargetResponse, request, callback); + }, "name", { value: "load_stamp_target" }); + + /** + * Calls load_stamp_target. + * @function load_stamp_target + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadStampTargetRequest} request LoadStampTargetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#lock_stamp_target}. + * @memberof wm.protobuf.Rpc + * @typedef lock_stamp_targetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LockStampTargetResponse} [response] LockStampTargetResponse + */ + + /** + * Calls lock_stamp_target. + * @function lock_stamp_target + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILockStampTargetRequest} request LockStampTargetRequest message or plain object + * @param {wm.protobuf.Rpc.lock_stamp_targetCallback} callback Node-style callback called with the error, if any, and LockStampTargetResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.lock_stamp_target = function lock_stamp_target(request, callback) { + return this.rpcCall(lock_stamp_target, $root.wm.protobuf.LockStampTargetRequest, $root.wm.protobuf.LockStampTargetResponse, request, callback); + }, "name", { value: "lock_stamp_target" }); + + /** + * Calls lock_stamp_target. + * @function lock_stamp_target + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILockStampTargetRequest} request LockStampTargetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_ghost_competition_info}. + * @memberof wm.protobuf.Rpc + * @typedef load_ghost_competition_infoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadGhostCompetitionInfoResponse} [response] LoadGhostCompetitionInfoResponse + */ + + /** + * Calls load_ghost_competition_info. + * @function load_ghost_competition_info + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest} request LoadGhostCompetitionInfoRequest message or plain object + * @param {wm.protobuf.Rpc.load_ghost_competition_infoCallback} callback Node-style callback called with the error, if any, and LoadGhostCompetitionInfoResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_ghost_competition_info = function load_ghost_competition_info(request, callback) { + return this.rpcCall(load_ghost_competition_info, $root.wm.protobuf.LoadGhostCompetitionInfoRequest, $root.wm.protobuf.LoadGhostCompetitionInfoResponse, request, callback); + }, "name", { value: "load_ghost_competition_info" }); + + /** + * Calls load_ghost_competition_info. + * @function load_ghost_competition_info + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest} request LoadGhostCompetitionInfoRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_time_attack_record}. + * @memberof wm.protobuf.Rpc + * @typedef load_time_attack_recordCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadTimeAttackRecordResponse} [response] LoadTimeAttackRecordResponse + */ + + /** + * Calls load_time_attack_record. + * @function load_time_attack_record + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadTimeAttackRecordRequest} request LoadTimeAttackRecordRequest message or plain object + * @param {wm.protobuf.Rpc.load_time_attack_recordCallback} callback Node-style callback called with the error, if any, and LoadTimeAttackRecordResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_time_attack_record = function load_time_attack_record(request, callback) { + return this.rpcCall(load_time_attack_record, $root.wm.protobuf.LoadTimeAttackRecordRequest, $root.wm.protobuf.LoadTimeAttackRecordResponse, request, callback); + }, "name", { value: "load_time_attack_record" }); + + /** + * Calls load_time_attack_record. + * @function load_time_attack_record + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadTimeAttackRecordRequest} request LoadTimeAttackRecordRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#save_terminal_result}. + * @memberof wm.protobuf.Rpc + * @typedef save_terminal_resultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.SaveTerminalResultResponse} [response] SaveTerminalResultResponse + */ + + /** + * Calls save_terminal_result. + * @function save_terminal_result + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISaveTerminalResultRequest} request SaveTerminalResultRequest message or plain object + * @param {wm.protobuf.Rpc.save_terminal_resultCallback} callback Node-style callback called with the error, if any, and SaveTerminalResultResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.save_terminal_result = function save_terminal_result(request, callback) { + return this.rpcCall(save_terminal_result, $root.wm.protobuf.SaveTerminalResultRequest, $root.wm.protobuf.SaveTerminalResultResponse, request, callback); + }, "name", { value: "save_terminal_result" }); + + /** + * Calls save_terminal_result. + * @function save_terminal_result + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISaveTerminalResultRequest} request SaveTerminalResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#ping}. + * @memberof wm.protobuf.Rpc + * @typedef pingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.PingResponse} [response] PingResponse + */ + + /** + * Calls ping. + * @function ping + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IPingRequest} request PingRequest message or plain object + * @param {wm.protobuf.Rpc.pingCallback} callback Node-style callback called with the error, if any, and PingResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.ping = function ping(request, callback) { + return this.rpcCall(ping, $root.wm.protobuf.PingRequest, $root.wm.protobuf.PingResponse, request, callback); + }, "name", { value: "ping" }); + + /** + * Calls ping. + * @function ping + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IPingRequest} request PingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_terminal_information}. + * @memberof wm.protobuf.Rpc + * @typedef load_terminal_informationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadTerminalInformationResponse} [response] LoadTerminalInformationResponse + */ + + /** + * Calls load_terminal_information. + * @function load_terminal_information + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadTerminalInformationRequest} request LoadTerminalInformationRequest message or plain object + * @param {wm.protobuf.Rpc.load_terminal_informationCallback} callback Node-style callback called with the error, if any, and LoadTerminalInformationResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_terminal_information = function load_terminal_information(request, callback) { + return this.rpcCall(load_terminal_information, $root.wm.protobuf.LoadTerminalInformationRequest, $root.wm.protobuf.LoadTerminalInformationResponse, request, callback); + }, "name", { value: "load_terminal_information" }); + + /** + * Calls load_terminal_information. + * @function load_terminal_information + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadTerminalInformationRequest} request LoadTerminalInformationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#create_user}. + * @memberof wm.protobuf.Rpc + * @typedef create_userCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.CreateUserResponse} [response] CreateUserResponse + */ + + /** + * Calls create_user. + * @function create_user + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ICreateUserRequest} request CreateUserRequest message or plain object + * @param {wm.protobuf.Rpc.create_userCallback} callback Node-style callback called with the error, if any, and CreateUserResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.create_user = function create_user(request, callback) { + return this.rpcCall(create_user, $root.wm.protobuf.CreateUserRequest, $root.wm.protobuf.CreateUserResponse, request, callback); + }, "name", { value: "create_user" }); + + /** + * Calls create_user. + * @function create_user + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ICreateUserRequest} request CreateUserRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#ask_access_code}. + * @memberof wm.protobuf.Rpc + * @typedef ask_access_codeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.AskAccessCodeResponse} [response] AskAccessCodeResponse + */ + + /** + * Calls ask_access_code. + * @function ask_access_code + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IAskAccessCodeRequest} request AskAccessCodeRequest message or plain object + * @param {wm.protobuf.Rpc.ask_access_codeCallback} callback Node-style callback called with the error, if any, and AskAccessCodeResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.ask_access_code = function ask_access_code(request, callback) { + return this.rpcCall(ask_access_code, $root.wm.protobuf.AskAccessCodeRequest, $root.wm.protobuf.AskAccessCodeResponse, request, callback); + }, "name", { value: "ask_access_code" }); + + /** + * Calls ask_access_code. + * @function ask_access_code + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IAskAccessCodeRequest} request AskAccessCodeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#register_opponent_ghost}. + * @memberof wm.protobuf.Rpc + * @typedef register_opponent_ghostCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.RegisterOpponentGhostResponse} [response] RegisterOpponentGhostResponse + */ + + /** + * Calls register_opponent_ghost. + * @function register_opponent_ghost + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IRegisterOpponentGhostRequest} request RegisterOpponentGhostRequest message or plain object + * @param {wm.protobuf.Rpc.register_opponent_ghostCallback} callback Node-style callback called with the error, if any, and RegisterOpponentGhostResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.register_opponent_ghost = function register_opponent_ghost(request, callback) { + return this.rpcCall(register_opponent_ghost, $root.wm.protobuf.RegisterOpponentGhostRequest, $root.wm.protobuf.RegisterOpponentGhostResponse, request, callback); + }, "name", { value: "register_opponent_ghost" }); + + /** + * Calls register_opponent_ghost. + * @function register_opponent_ghost + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IRegisterOpponentGhostRequest} request RegisterOpponentGhostRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_bookmarks}. + * @memberof wm.protobuf.Rpc + * @typedef load_bookmarksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadBookmarksResponse} [response] LoadBookmarksResponse + */ + + /** + * Calls load_bookmarks. + * @function load_bookmarks + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadBookmarksRequest} request LoadBookmarksRequest message or plain object + * @param {wm.protobuf.Rpc.load_bookmarksCallback} callback Node-style callback called with the error, if any, and LoadBookmarksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_bookmarks = function load_bookmarks(request, callback) { + return this.rpcCall(load_bookmarks, $root.wm.protobuf.LoadBookmarksRequest, $root.wm.protobuf.LoadBookmarksResponse, request, callback); + }, "name", { value: "load_bookmarks" }); + + /** + * Calls load_bookmarks. + * @function load_bookmarks + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadBookmarksRequest} request LoadBookmarksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#save_bookmarks}. + * @memberof wm.protobuf.Rpc + * @typedef save_bookmarksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.SaveBookmarksResponse} [response] SaveBookmarksResponse + */ + + /** + * Calls save_bookmarks. + * @function save_bookmarks + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISaveBookmarksRequest} request SaveBookmarksRequest message or plain object + * @param {wm.protobuf.Rpc.save_bookmarksCallback} callback Node-style callback called with the error, if any, and SaveBookmarksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.save_bookmarks = function save_bookmarks(request, callback) { + return this.rpcCall(save_bookmarks, $root.wm.protobuf.SaveBookmarksRequest, $root.wm.protobuf.SaveBookmarksResponse, request, callback); + }, "name", { value: "save_bookmarks" }); + + /** + * Calls save_bookmarks. + * @function save_bookmarks + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISaveBookmarksRequest} request SaveBookmarksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#grant_car_right}. + * @memberof wm.protobuf.Rpc + * @typedef grant_car_rightCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.GrantCarRightResponse} [response] GrantCarRightResponse + */ + + /** + * Calls grant_car_right. + * @function grant_car_right + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IGrantCarRightRequest} request GrantCarRightRequest message or plain object + * @param {wm.protobuf.Rpc.grant_car_rightCallback} callback Node-style callback called with the error, if any, and GrantCarRightResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.grant_car_right = function grant_car_right(request, callback) { + return this.rpcCall(grant_car_right, $root.wm.protobuf.GrantCarRightRequest, $root.wm.protobuf.GrantCarRightResponse, request, callback); + }, "name", { value: "grant_car_right" }); + + /** + * Calls grant_car_right. + * @function grant_car_right + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IGrantCarRightRequest} request GrantCarRightRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_ghost_competition_ranking}. + * @memberof wm.protobuf.Rpc + * @typedef load_ghost_competition_rankingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse} [response] LoadGhostCompetitionRankingResponse + */ + + /** + * Calls load_ghost_competition_ranking. + * @function load_ghost_competition_ranking + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest} request LoadGhostCompetitionRankingRequest message or plain object + * @param {wm.protobuf.Rpc.load_ghost_competition_rankingCallback} callback Node-style callback called with the error, if any, and LoadGhostCompetitionRankingResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_ghost_competition_ranking = function load_ghost_competition_ranking(request, callback) { + return this.rpcCall(load_ghost_competition_ranking, $root.wm.protobuf.LoadGhostCompetitionRankingRequest, $root.wm.protobuf.LoadGhostCompetitionRankingResponse, request, callback); + }, "name", { value: "load_ghost_competition_ranking" }); + + /** + * Calls load_ghost_competition_ranking. + * @function load_ghost_competition_ranking + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest} request LoadGhostCompetitionRankingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_unreceived_user_items}. + * @memberof wm.protobuf.Rpc + * @typedef load_unreceived_user_itemsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadUnreceivedUserItemsResponse} [response] LoadUnreceivedUserItemsResponse + */ + + /** + * Calls load_unreceived_user_items. + * @function load_unreceived_user_items + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest} request LoadUnreceivedUserItemsRequest message or plain object + * @param {wm.protobuf.Rpc.load_unreceived_user_itemsCallback} callback Node-style callback called with the error, if any, and LoadUnreceivedUserItemsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_unreceived_user_items = function load_unreceived_user_items(request, callback) { + return this.rpcCall(load_unreceived_user_items, $root.wm.protobuf.LoadUnreceivedUserItemsRequest, $root.wm.protobuf.LoadUnreceivedUserItemsResponse, request, callback); + }, "name", { value: "load_unreceived_user_items" }); + + /** + * Calls load_unreceived_user_items. + * @function load_unreceived_user_items + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest} request LoadUnreceivedUserItemsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#start_transfer}. + * @memberof wm.protobuf.Rpc + * @typedef start_transferCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.StartTransferResponse} [response] StartTransferResponse + */ + + /** + * Calls start_transfer. + * @function start_transfer + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IStartTransferRequest} request StartTransferRequest message or plain object + * @param {wm.protobuf.Rpc.start_transferCallback} callback Node-style callback called with the error, if any, and StartTransferResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.start_transfer = function start_transfer(request, callback) { + return this.rpcCall(start_transfer, $root.wm.protobuf.StartTransferRequest, $root.wm.protobuf.StartTransferResponse, request, callback); + }, "name", { value: "start_transfer" }); + + /** + * Calls start_transfer. + * @function start_transfer + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IStartTransferRequest} request StartTransferRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#save_screenshot}. + * @memberof wm.protobuf.Rpc + * @typedef save_screenshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.SaveScreenshotResponse} [response] SaveScreenshotResponse + */ + + /** + * Calls save_screenshot. + * @function save_screenshot + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISaveScreenshotRequest} request SaveScreenshotRequest message or plain object + * @param {wm.protobuf.Rpc.save_screenshotCallback} callback Node-style callback called with the error, if any, and SaveScreenshotResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.save_screenshot = function save_screenshot(request, callback) { + return this.rpcCall(save_screenshot, $root.wm.protobuf.SaveScreenshotRequest, $root.wm.protobuf.SaveScreenshotResponse, request, callback); + }, "name", { value: "save_screenshot" }); + + /** + * Calls save_screenshot. + * @function save_screenshot + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISaveScreenshotRequest} request SaveScreenshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_scratch_information}. + * @memberof wm.protobuf.Rpc + * @typedef load_scratch_informationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadScratchInformationResponse} [response] LoadScratchInformationResponse + */ + + /** + * Calls load_scratch_information. + * @function load_scratch_information + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadScratchInformationRequest} request LoadScratchInformationRequest message or plain object + * @param {wm.protobuf.Rpc.load_scratch_informationCallback} callback Node-style callback called with the error, if any, and LoadScratchInformationResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_scratch_information = function load_scratch_information(request, callback) { + return this.rpcCall(load_scratch_information, $root.wm.protobuf.LoadScratchInformationRequest, $root.wm.protobuf.LoadScratchInformationResponse, request, callback); + }, "name", { value: "load_scratch_information" }); + + /** + * Calls load_scratch_information. + * @function load_scratch_information + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadScratchInformationRequest} request LoadScratchInformationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#save_scratch_sheet}. + * @memberof wm.protobuf.Rpc + * @typedef save_scratch_sheetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.SaveScratchSheetResponse} [response] SaveScratchSheetResponse + */ + + /** + * Calls save_scratch_sheet. + * @function save_scratch_sheet + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISaveScratchSheetRequest} request SaveScratchSheetRequest message or plain object + * @param {wm.protobuf.Rpc.save_scratch_sheetCallback} callback Node-style callback called with the error, if any, and SaveScratchSheetResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.save_scratch_sheet = function save_scratch_sheet(request, callback) { + return this.rpcCall(save_scratch_sheet, $root.wm.protobuf.SaveScratchSheetRequest, $root.wm.protobuf.SaveScratchSheetResponse, request, callback); + }, "name", { value: "save_scratch_sheet" }); + + /** + * Calls save_scratch_sheet. + * @function save_scratch_sheet + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISaveScratchSheetRequest} request SaveScratchSheetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#turn_scratch_sheet}. + * @memberof wm.protobuf.Rpc + * @typedef turn_scratch_sheetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.TurnScratchSheetResponse} [response] TurnScratchSheetResponse + */ + + /** + * Calls turn_scratch_sheet. + * @function turn_scratch_sheet + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ITurnScratchSheetRequest} request TurnScratchSheetRequest message or plain object + * @param {wm.protobuf.Rpc.turn_scratch_sheetCallback} callback Node-style callback called with the error, if any, and TurnScratchSheetResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.turn_scratch_sheet = function turn_scratch_sheet(request, callback) { + return this.rpcCall(turn_scratch_sheet, $root.wm.protobuf.TurnScratchSheetRequest, $root.wm.protobuf.TurnScratchSheetResponse, request, callback); + }, "name", { value: "turn_scratch_sheet" }); + + /** + * Calls turn_scratch_sheet. + * @function turn_scratch_sheet + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ITurnScratchSheetRequest} request TurnScratchSheetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#check_item_receivable_cars}. + * @memberof wm.protobuf.Rpc + * @typedef check_item_receivable_carsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.CheckItemReceivableCarsResponse} [response] CheckItemReceivableCarsResponse + */ + + /** + * Calls check_item_receivable_cars. + * @function check_item_receivable_cars + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ICheckItemReceivableCarsRequest} request CheckItemReceivableCarsRequest message or plain object + * @param {wm.protobuf.Rpc.check_item_receivable_carsCallback} callback Node-style callback called with the error, if any, and CheckItemReceivableCarsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.check_item_receivable_cars = function check_item_receivable_cars(request, callback) { + return this.rpcCall(check_item_receivable_cars, $root.wm.protobuf.CheckItemReceivableCarsRequest, $root.wm.protobuf.CheckItemReceivableCarsResponse, request, callback); + }, "name", { value: "check_item_receivable_cars" }); + + /** + * Calls check_item_receivable_cars. + * @function check_item_receivable_cars + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ICheckItemReceivableCarsRequest} request CheckItemReceivableCarsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#receive_user_items}. + * @memberof wm.protobuf.Rpc + * @typedef receive_user_itemsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.ReceiveUserItemsResponse} [response] ReceiveUserItemsResponse + */ + + /** + * Calls receive_user_items. + * @function receive_user_items + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IReceiveUserItemsRequest} request ReceiveUserItemsRequest message or plain object + * @param {wm.protobuf.Rpc.receive_user_itemsCallback} callback Node-style callback called with the error, if any, and ReceiveUserItemsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.receive_user_items = function receive_user_items(request, callback) { + return this.rpcCall(receive_user_items, $root.wm.protobuf.ReceiveUserItemsRequest, $root.wm.protobuf.ReceiveUserItemsResponse, request, callback); + }, "name", { value: "receive_user_items" }); + + /** + * Calls receive_user_items. + * @function receive_user_items + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IReceiveUserItemsRequest} request ReceiveUserItemsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#update_event_mode_serial}. + * @memberof wm.protobuf.Rpc + * @typedef update_event_mode_serialCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.UpdateEventModeSerialResponse} [response] UpdateEventModeSerialResponse + */ + + /** + * Calls update_event_mode_serial. + * @function update_event_mode_serial + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IUpdateEventModeSerialRequest} request UpdateEventModeSerialRequest message or plain object + * @param {wm.protobuf.Rpc.update_event_mode_serialCallback} callback Node-style callback called with the error, if any, and UpdateEventModeSerialResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.update_event_mode_serial = function update_event_mode_serial(request, callback) { + return this.rpcCall(update_event_mode_serial, $root.wm.protobuf.UpdateEventModeSerialRequest, $root.wm.protobuf.UpdateEventModeSerialResponse, request, callback); + }, "name", { value: "update_event_mode_serial" }); + + /** + * Calls update_event_mode_serial. + * @function update_event_mode_serial + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IUpdateEventModeSerialRequest} request UpdateEventModeSerialRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#consume_user_item}. + * @memberof wm.protobuf.Rpc + * @typedef consume_user_itemCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.ConsumeUserItemResponse} [response] ConsumeUserItemResponse + */ + + /** + * Calls consume_user_item. + * @function consume_user_item + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IConsumeUserItemRequest} request ConsumeUserItemRequest message or plain object + * @param {wm.protobuf.Rpc.consume_user_itemCallback} callback Node-style callback called with the error, if any, and ConsumeUserItemResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.consume_user_item = function consume_user_item(request, callback) { + return this.rpcCall(consume_user_item, $root.wm.protobuf.ConsumeUserItemRequest, $root.wm.protobuf.ConsumeUserItemResponse, request, callback); + }, "name", { value: "consume_user_item" }); + + /** + * Calls consume_user_item. + * @function consume_user_item + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IConsumeUserItemRequest} request ConsumeUserItemRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#search_cars_by_level}. + * @memberof wm.protobuf.Rpc + * @typedef search_cars_by_levelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.SearchCarsByLevelResponse} [response] SearchCarsByLevelResponse + */ + + /** + * Calls search_cars_by_level. + * @function search_cars_by_level + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISearchCarsByLevelRequest} request SearchCarsByLevelRequest message or plain object + * @param {wm.protobuf.Rpc.search_cars_by_levelCallback} callback Node-style callback called with the error, if any, and SearchCarsByLevelResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.search_cars_by_level = function search_cars_by_level(request, callback) { + return this.rpcCall(search_cars_by_level, $root.wm.protobuf.SearchCarsByLevelRequest, $root.wm.protobuf.SearchCarsByLevelResponse, request, callback); + }, "name", { value: "search_cars_by_level" }); + + /** + * Calls search_cars_by_level. + * @function search_cars_by_level + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISearchCarsByLevelRequest} request SearchCarsByLevelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_paths_and_tunings}. + * @memberof wm.protobuf.Rpc + * @typedef load_paths_and_tuningsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadPathsAndTuningsResponse} [response] LoadPathsAndTuningsResponse + */ + + /** + * Calls load_paths_and_tunings. + * @function load_paths_and_tunings + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadPathsAndTuningsRequest} request LoadPathsAndTuningsRequest message or plain object + * @param {wm.protobuf.Rpc.load_paths_and_tuningsCallback} callback Node-style callback called with the error, if any, and LoadPathsAndTuningsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_paths_and_tunings = function load_paths_and_tunings(request, callback) { + return this.rpcCall(load_paths_and_tunings, $root.wm.protobuf.LoadPathsAndTuningsRequest, $root.wm.protobuf.LoadPathsAndTuningsResponse, request, callback); + }, "name", { value: "load_paths_and_tunings" }); + + /** + * Calls load_paths_and_tunings. + * @function load_paths_and_tunings + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadPathsAndTuningsRequest} request LoadPathsAndTuningsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#load_ghost_drive_data}. + * @memberof wm.protobuf.Rpc + * @typedef load_ghost_drive_dataCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LoadGhostDriveDataResponse} [response] LoadGhostDriveDataResponse + */ + + /** + * Calls load_ghost_drive_data. + * @function load_ghost_drive_data + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadGhostDriveDataRequest} request LoadGhostDriveDataRequest message or plain object + * @param {wm.protobuf.Rpc.load_ghost_drive_dataCallback} callback Node-style callback called with the error, if any, and LoadGhostDriveDataResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.load_ghost_drive_data = function load_ghost_drive_data(request, callback) { + return this.rpcCall(load_ghost_drive_data, $root.wm.protobuf.LoadGhostDriveDataRequest, $root.wm.protobuf.LoadGhostDriveDataResponse, request, callback); + }, "name", { value: "load_ghost_drive_data" }); + + /** + * Calls load_ghost_drive_data. + * @function load_ghost_drive_data + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILoadGhostDriveDataRequest} request LoadGhostDriveDataRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#participate_in_invite_friend_campaign}. + * @memberof wm.protobuf.Rpc + * @typedef participate_in_invite_friend_campaignCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.ParticipateInInviteFriendCampaignResponse} [response] ParticipateInInviteFriendCampaignResponse + */ + + /** + * Calls participate_in_invite_friend_campaign. + * @function participate_in_invite_friend_campaign + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest} request ParticipateInInviteFriendCampaignRequest message or plain object + * @param {wm.protobuf.Rpc.participate_in_invite_friend_campaignCallback} callback Node-style callback called with the error, if any, and ParticipateInInviteFriendCampaignResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.participate_in_invite_friend_campaign = function participate_in_invite_friend_campaign(request, callback) { + return this.rpcCall(participate_in_invite_friend_campaign, $root.wm.protobuf.ParticipateInInviteFriendCampaignRequest, $root.wm.protobuf.ParticipateInInviteFriendCampaignResponse, request, callback); + }, "name", { value: "participate_in_invite_friend_campaign" }); + + /** + * Calls participate_in_invite_friend_campaign. + * @function participate_in_invite_friend_campaign + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest} request ParticipateInInviteFriendCampaignRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#lock_crown}. + * @memberof wm.protobuf.Rpc + * @typedef lock_crownCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.LockCrownResponse} [response] LockCrownResponse + */ + + /** + * Calls lock_crown. + * @function lock_crown + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILockCrownRequest} request LockCrownRequest message or plain object + * @param {wm.protobuf.Rpc.lock_crownCallback} callback Node-style callback called with the error, if any, and LockCrownResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.lock_crown = function lock_crown(request, callback) { + return this.rpcCall(lock_crown, $root.wm.protobuf.LockCrownRequest, $root.wm.protobuf.LockCrownResponse, request, callback); + }, "name", { value: "lock_crown" }); + + /** + * Calls lock_crown. + * @function lock_crown + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ILockCrownRequest} request LockCrownRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Rpc#submit_client_log}. + * @memberof wm.protobuf.Rpc + * @typedef submit_client_logCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.SubmitClientLogResponse} [response] SubmitClientLogResponse + */ + + /** + * Calls submit_client_log. + * @function submit_client_log + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISubmitClientLogRequest} request SubmitClientLogRequest message or plain object + * @param {wm.protobuf.Rpc.submit_client_logCallback} callback Node-style callback called with the error, if any, and SubmitClientLogResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Rpc.prototype.submit_client_log = function submit_client_log(request, callback) { + return this.rpcCall(submit_client_log, $root.wm.protobuf.SubmitClientLogRequest, $root.wm.protobuf.SubmitClientLogResponse, request, callback); + }, "name", { value: "submit_client_log" }); + + /** + * Calls submit_client_log. + * @function submit_client_log + * @memberof wm.protobuf.Rpc + * @instance + * @param {wm.protobuf.ISubmitClientLogRequest} request SubmitClientLogRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Rpc; + })(); + + protobuf.Resource = (function() { + + /** + * Constructs a new Resource service. + * @memberof wm.protobuf + * @classdesc Represents a Resource + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Resource(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Resource.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Resource; + + /** + * Creates new Resource service using the specified rpc implementation. + * @function create + * @memberof wm.protobuf.Resource + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Resource} RPC service. Useful where requests and/or responses are streamed. + */ + Resource.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link wm.protobuf.Resource#ghost_trail}. + * @memberof wm.protobuf.Resource + * @typedef ghost_trailCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.GhostTrail} [response] GhostTrail + */ + + /** + * Calls ghost_trail. + * @function ghost_trail + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.IGhostTrailQuery} request GhostTrailQuery message or plain object + * @param {wm.protobuf.Resource.ghost_trailCallback} callback Node-style callback called with the error, if any, and GhostTrail + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Resource.prototype.ghost_trail = function ghost_trail(request, callback) { + return this.rpcCall(ghost_trail, $root.wm.protobuf.GhostTrailQuery, $root.wm.protobuf.GhostTrail, request, callback); + }, "name", { value: "ghost_trail" }); + + /** + * Calls ghost_trail. + * @function ghost_trail + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.IGhostTrailQuery} request GhostTrailQuery message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Resource#place_list}. + * @memberof wm.protobuf.Resource + * @typedef place_listCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.PlaceList} [response] PlaceList + */ + + /** + * Calls place_list. + * @function place_list + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.IPlaceListQuery} request PlaceListQuery message or plain object + * @param {wm.protobuf.Resource.place_listCallback} callback Node-style callback called with the error, if any, and PlaceList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Resource.prototype.place_list = function place_list(request, callback) { + return this.rpcCall(place_list, $root.wm.protobuf.PlaceListQuery, $root.wm.protobuf.PlaceList, request, callback); + }, "name", { value: "place_list" }); + + /** + * Calls place_list. + * @function place_list + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.IPlaceListQuery} request PlaceListQuery message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Resource#ghost_list}. + * @memberof wm.protobuf.Resource + * @typedef ghost_listCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.GhostList} [response] GhostList + */ + + /** + * Calls ghost_list. + * @function ghost_list + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.IGhostListQuery} request GhostListQuery message or plain object + * @param {wm.protobuf.Resource.ghost_listCallback} callback Node-style callback called with the error, if any, and GhostList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Resource.prototype.ghost_list = function ghost_list(request, callback) { + return this.rpcCall(ghost_list, $root.wm.protobuf.GhostListQuery, $root.wm.protobuf.GhostList, request, callback); + }, "name", { value: "ghost_list" }); + + /** + * Calls ghost_list. + * @function ghost_list + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.IGhostListQuery} request GhostListQuery message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Resource#car_summary}. + * @memberof wm.protobuf.Resource + * @typedef car_summaryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.CarSummary} [response] CarSummary + */ + + /** + * Calls car_summary. + * @function car_summary + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.ICarSummaryQuery} request CarSummaryQuery message or plain object + * @param {wm.protobuf.Resource.car_summaryCallback} callback Node-style callback called with the error, if any, and CarSummary + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Resource.prototype.car_summary = function car_summary(request, callback) { + return this.rpcCall(car_summary, $root.wm.protobuf.CarSummaryQuery, $root.wm.protobuf.CarSummary, request, callback); + }, "name", { value: "car_summary" }); + + /** + * Calls car_summary. + * @function car_summary + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.ICarSummaryQuery} request CarSummaryQuery message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Resource#file_list}. + * @memberof wm.protobuf.Resource + * @typedef file_listCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.FileList} [response] FileList + */ + + /** + * Calls file_list. + * @function file_list + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.IFileListQuery} request FileListQuery message or plain object + * @param {wm.protobuf.Resource.file_listCallback} callback Node-style callback called with the error, if any, and FileList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Resource.prototype.file_list = function file_list(request, callback) { + return this.rpcCall(file_list, $root.wm.protobuf.FileListQuery, $root.wm.protobuf.FileList, request, callback); + }, "name", { value: "file_list" }); + + /** + * Calls file_list. + * @function file_list + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.IFileListQuery} request FileListQuery message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Resource#ghost_competition_target}. + * @memberof wm.protobuf.Resource + * @typedef ghost_competition_targetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.GhostCompetitionTarget} [response] GhostCompetitionTarget + */ + + /** + * Calls ghost_competition_target. + * @function ghost_competition_target + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.IGhostCompetitionTargetQuery} request GhostCompetitionTargetQuery message or plain object + * @param {wm.protobuf.Resource.ghost_competition_targetCallback} callback Node-style callback called with the error, if any, and GhostCompetitionTarget + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Resource.prototype.ghost_competition_target = function ghost_competition_target(request, callback) { + return this.rpcCall(ghost_competition_target, $root.wm.protobuf.GhostCompetitionTargetQuery, $root.wm.protobuf.GhostCompetitionTarget, request, callback); + }, "name", { value: "ghost_competition_target" }); + + /** + * Calls ghost_competition_target. + * @function ghost_competition_target + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.IGhostCompetitionTargetQuery} request GhostCompetitionTargetQuery message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Resource#crown_list}. + * @memberof wm.protobuf.Resource + * @typedef crown_listCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.CrownList} [response] CrownList + */ + + /** + * Calls crown_list. + * @function crown_list + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.ICrownListQuery} request CrownListQuery message or plain object + * @param {wm.protobuf.Resource.crown_listCallback} callback Node-style callback called with the error, if any, and CrownList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Resource.prototype.crown_list = function crown_list(request, callback) { + return this.rpcCall(crown_list, $root.wm.protobuf.CrownListQuery, $root.wm.protobuf.CrownList, request, callback); + }, "name", { value: "crown_list" }); + + /** + * Calls crown_list. + * @function crown_list + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.ICrownListQuery} request CrownListQuery message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link wm.protobuf.Resource#ranking}. + * @memberof wm.protobuf.Resource + * @typedef rankingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {wm.protobuf.Ranking} [response] Ranking + */ + + /** + * Calls ranking. + * @function ranking + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.IRankingQuery} request RankingQuery message or plain object + * @param {wm.protobuf.Resource.rankingCallback} callback Node-style callback called with the error, if any, and Ranking + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Resource.prototype.ranking = function ranking(request, callback) { + return this.rpcCall(ranking, $root.wm.protobuf.RankingQuery, $root.wm.protobuf.Ranking, request, callback); + }, "name", { value: "ranking" }); + + /** + * Calls ranking. + * @function ranking + * @memberof wm.protobuf.Resource + * @instance + * @param {wm.protobuf.IRankingQuery} request RankingQuery message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Resource; + })(); + + protobuf.PlaceListQuery = (function() { + + /** + * Properties of a PlaceListQuery. + * @memberof wm.protobuf + * @interface IPlaceListQuery + * @property {number|null} [regionId] PlaceListQuery regionId + */ + + /** + * Constructs a new PlaceListQuery. + * @memberof wm.protobuf + * @classdesc Represents a PlaceListQuery. + * @implements IPlaceListQuery + * @constructor + * @param {wm.protobuf.IPlaceListQuery=} [properties] Properties to set + */ + function PlaceListQuery(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlaceListQuery regionId. + * @member {number} regionId + * @memberof wm.protobuf.PlaceListQuery + * @instance + */ + PlaceListQuery.prototype.regionId = 0; + + /** + * Creates a new PlaceListQuery instance using the specified properties. + * @function create + * @memberof wm.protobuf.PlaceListQuery + * @static + * @param {wm.protobuf.IPlaceListQuery=} [properties] Properties to set + * @returns {wm.protobuf.PlaceListQuery} PlaceListQuery instance + */ + PlaceListQuery.create = function create(properties) { + return new PlaceListQuery(properties); + }; + + /** + * Encodes the specified PlaceListQuery message. Does not implicitly {@link wm.protobuf.PlaceListQuery.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PlaceListQuery + * @static + * @param {wm.protobuf.IPlaceListQuery} message PlaceListQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceListQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.regionId != null && Object.hasOwnProperty.call(message, "regionId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.regionId); + return writer; + }; + + /** + * Encodes the specified PlaceListQuery message, length delimited. Does not implicitly {@link wm.protobuf.PlaceListQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PlaceListQuery + * @static + * @param {wm.protobuf.IPlaceListQuery} message PlaceListQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceListQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlaceListQuery message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PlaceListQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PlaceListQuery} PlaceListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceListQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PlaceListQuery(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.regionId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlaceListQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PlaceListQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PlaceListQuery} PlaceListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceListQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlaceListQuery message. + * @function verify + * @memberof wm.protobuf.PlaceListQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlaceListQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.regionId != null && message.hasOwnProperty("regionId")) + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + return null; + }; + + /** + * Creates a PlaceListQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PlaceListQuery + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PlaceListQuery} PlaceListQuery + */ + PlaceListQuery.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PlaceListQuery) + return object; + let message = new $root.wm.protobuf.PlaceListQuery(); + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + return message; + }; + + /** + * Creates a plain object from a PlaceListQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PlaceListQuery + * @static + * @param {wm.protobuf.PlaceListQuery} message PlaceListQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlaceListQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.regionId = 0; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + return object; + }; + + /** + * Converts this PlaceListQuery to JSON. + * @function toJSON + * @memberof wm.protobuf.PlaceListQuery + * @instance + * @returns {Object.} JSON object + */ + PlaceListQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlaceListQuery + * @function getTypeUrl + * @memberof wm.protobuf.PlaceListQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaceListQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PlaceListQuery"; + }; + + return PlaceListQuery; + })(); + + protobuf.GhostListQuery = (function() { + + /** + * Properties of a GhostListQuery. + * @memberof wm.protobuf + * @interface IGhostListQuery + * @property {number} carId GhostListQuery carId + * @property {number|null} [area] GhostListQuery area + */ + + /** + * Constructs a new GhostListQuery. + * @memberof wm.protobuf + * @classdesc Represents a GhostListQuery. + * @implements IGhostListQuery + * @constructor + * @param {wm.protobuf.IGhostListQuery=} [properties] Properties to set + */ + function GhostListQuery(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostListQuery carId. + * @member {number} carId + * @memberof wm.protobuf.GhostListQuery + * @instance + */ + GhostListQuery.prototype.carId = 0; + + /** + * GhostListQuery area. + * @member {number} area + * @memberof wm.protobuf.GhostListQuery + * @instance + */ + GhostListQuery.prototype.area = 0; + + /** + * Creates a new GhostListQuery instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostListQuery + * @static + * @param {wm.protobuf.IGhostListQuery=} [properties] Properties to set + * @returns {wm.protobuf.GhostListQuery} GhostListQuery instance + */ + GhostListQuery.create = function create(properties) { + return new GhostListQuery(properties); + }; + + /** + * Encodes the specified GhostListQuery message. Does not implicitly {@link wm.protobuf.GhostListQuery.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostListQuery + * @static + * @param {wm.protobuf.IGhostListQuery} message GhostListQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostListQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.area != null && Object.hasOwnProperty.call(message, "area")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.area); + return writer; + }; + + /** + * Encodes the specified GhostListQuery message, length delimited. Does not implicitly {@link wm.protobuf.GhostListQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostListQuery + * @static + * @param {wm.protobuf.IGhostListQuery} message GhostListQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostListQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostListQuery message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostListQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostListQuery} GhostListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostListQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostListQuery(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.area = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostListQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostListQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostListQuery} GhostListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostListQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostListQuery message. + * @function verify + * @memberof wm.protobuf.GhostListQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostListQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.area != null && message.hasOwnProperty("area")) + if (!$util.isInteger(message.area)) + return "area: integer expected"; + return null; + }; + + /** + * Creates a GhostListQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostListQuery + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostListQuery} GhostListQuery + */ + GhostListQuery.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostListQuery) + return object; + let message = new $root.wm.protobuf.GhostListQuery(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + return message; + }; + + /** + * Creates a plain object from a GhostListQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostListQuery + * @static + * @param {wm.protobuf.GhostListQuery} message GhostListQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostListQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.area = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + return object; + }; + + /** + * Converts this GhostListQuery to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostListQuery + * @instance + * @returns {Object.} JSON object + */ + GhostListQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostListQuery + * @function getTypeUrl + * @memberof wm.protobuf.GhostListQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostListQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostListQuery"; + }; + + return GhostListQuery; + })(); + + protobuf.GhostTrailQuery = (function() { + + /** + * Properties of a GhostTrailQuery. + * @memberof wm.protobuf + * @interface IGhostTrailQuery + * @property {number} carId GhostTrailQuery carId + * @property {number|null} [area] GhostTrailQuery area + * @property {number|Long|null} [trailId] GhostTrailQuery trailId + */ + + /** + * Constructs a new GhostTrailQuery. + * @memberof wm.protobuf + * @classdesc Represents a GhostTrailQuery. + * @implements IGhostTrailQuery + * @constructor + * @param {wm.protobuf.IGhostTrailQuery=} [properties] Properties to set + */ + function GhostTrailQuery(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostTrailQuery carId. + * @member {number} carId + * @memberof wm.protobuf.GhostTrailQuery + * @instance + */ + GhostTrailQuery.prototype.carId = 0; + + /** + * GhostTrailQuery area. + * @member {number} area + * @memberof wm.protobuf.GhostTrailQuery + * @instance + */ + GhostTrailQuery.prototype.area = 0; + + /** + * GhostTrailQuery trailId. + * @member {number|Long} trailId + * @memberof wm.protobuf.GhostTrailQuery + * @instance + */ + GhostTrailQuery.prototype.trailId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new GhostTrailQuery instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostTrailQuery + * @static + * @param {wm.protobuf.IGhostTrailQuery=} [properties] Properties to set + * @returns {wm.protobuf.GhostTrailQuery} GhostTrailQuery instance + */ + GhostTrailQuery.create = function create(properties) { + return new GhostTrailQuery(properties); + }; + + /** + * Encodes the specified GhostTrailQuery message. Does not implicitly {@link wm.protobuf.GhostTrailQuery.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostTrailQuery + * @static + * @param {wm.protobuf.IGhostTrailQuery} message GhostTrailQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostTrailQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.area != null && Object.hasOwnProperty.call(message, "area")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.area); + if (message.trailId != null && Object.hasOwnProperty.call(message, "trailId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.trailId); + return writer; + }; + + /** + * Encodes the specified GhostTrailQuery message, length delimited. Does not implicitly {@link wm.protobuf.GhostTrailQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostTrailQuery + * @static + * @param {wm.protobuf.IGhostTrailQuery} message GhostTrailQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostTrailQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostTrailQuery message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostTrailQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostTrailQuery} GhostTrailQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostTrailQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostTrailQuery(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.area = reader.uint32(); + break; + } + case 3: { + message.trailId = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostTrailQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostTrailQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostTrailQuery} GhostTrailQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostTrailQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostTrailQuery message. + * @function verify + * @memberof wm.protobuf.GhostTrailQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostTrailQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.area != null && message.hasOwnProperty("area")) + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (message.trailId != null && message.hasOwnProperty("trailId")) + if (!$util.isInteger(message.trailId) && !(message.trailId && $util.isInteger(message.trailId.low) && $util.isInteger(message.trailId.high))) + return "trailId: integer|Long expected"; + return null; + }; + + /** + * Creates a GhostTrailQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostTrailQuery + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostTrailQuery} GhostTrailQuery + */ + GhostTrailQuery.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostTrailQuery) + return object; + let message = new $root.wm.protobuf.GhostTrailQuery(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.trailId != null) + if ($util.Long) + (message.trailId = $util.Long.fromValue(object.trailId)).unsigned = true; + else if (typeof object.trailId === "string") + message.trailId = parseInt(object.trailId, 10); + else if (typeof object.trailId === "number") + message.trailId = object.trailId; + else if (typeof object.trailId === "object") + message.trailId = new $util.LongBits(object.trailId.low >>> 0, object.trailId.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a GhostTrailQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostTrailQuery + * @static + * @param {wm.protobuf.GhostTrailQuery} message GhostTrailQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostTrailQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.area = 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.trailId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trailId = options.longs === String ? "0" : 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.trailId != null && message.hasOwnProperty("trailId")) + if (typeof message.trailId === "number") + object.trailId = options.longs === String ? String(message.trailId) : message.trailId; + else + object.trailId = options.longs === String ? $util.Long.prototype.toString.call(message.trailId) : options.longs === Number ? new $util.LongBits(message.trailId.low >>> 0, message.trailId.high >>> 0).toNumber(true) : message.trailId; + return object; + }; + + /** + * Converts this GhostTrailQuery to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostTrailQuery + * @instance + * @returns {Object.} JSON object + */ + GhostTrailQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostTrailQuery + * @function getTypeUrl + * @memberof wm.protobuf.GhostTrailQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostTrailQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostTrailQuery"; + }; + + return GhostTrailQuery; + })(); + + protobuf.CarSummaryQuery = (function() { + + /** + * Properties of a CarSummaryQuery. + * @memberof wm.protobuf + * @interface ICarSummaryQuery + * @property {number|null} [regionId] CarSummaryQuery regionId + * @property {number|null} [ghostLevel] CarSummaryQuery ghostLevel + * @property {number|null} [manufacturer] CarSummaryQuery manufacturer + * @property {number|null} [model] CarSummaryQuery model + * @property {string|null} [name] CarSummaryQuery name + * @property {string|null} [searchCode] CarSummaryQuery searchCode + * @property {string|null} [lastPlayedPlaceId] CarSummaryQuery lastPlayedPlaceId + * @property {number|null} [limit] CarSummaryQuery limit + */ + + /** + * Constructs a new CarSummaryQuery. + * @memberof wm.protobuf + * @classdesc Represents a CarSummaryQuery. + * @implements ICarSummaryQuery + * @constructor + * @param {wm.protobuf.ICarSummaryQuery=} [properties] Properties to set + */ + function CarSummaryQuery(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarSummaryQuery regionId. + * @member {number} regionId + * @memberof wm.protobuf.CarSummaryQuery + * @instance + */ + CarSummaryQuery.prototype.regionId = 0; + + /** + * CarSummaryQuery ghostLevel. + * @member {number} ghostLevel + * @memberof wm.protobuf.CarSummaryQuery + * @instance + */ + CarSummaryQuery.prototype.ghostLevel = 0; + + /** + * CarSummaryQuery manufacturer. + * @member {number} manufacturer + * @memberof wm.protobuf.CarSummaryQuery + * @instance + */ + CarSummaryQuery.prototype.manufacturer = 0; + + /** + * CarSummaryQuery model. + * @member {number} model + * @memberof wm.protobuf.CarSummaryQuery + * @instance + */ + CarSummaryQuery.prototype.model = 0; + + /** + * CarSummaryQuery name. + * @member {string} name + * @memberof wm.protobuf.CarSummaryQuery + * @instance + */ + CarSummaryQuery.prototype.name = ""; + + /** + * CarSummaryQuery searchCode. + * @member {string} searchCode + * @memberof wm.protobuf.CarSummaryQuery + * @instance + */ + CarSummaryQuery.prototype.searchCode = ""; + + /** + * CarSummaryQuery lastPlayedPlaceId. + * @member {string} lastPlayedPlaceId + * @memberof wm.protobuf.CarSummaryQuery + * @instance + */ + CarSummaryQuery.prototype.lastPlayedPlaceId = ""; + + /** + * CarSummaryQuery limit. + * @member {number} limit + * @memberof wm.protobuf.CarSummaryQuery + * @instance + */ + CarSummaryQuery.prototype.limit = 0; + + /** + * Creates a new CarSummaryQuery instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarSummaryQuery + * @static + * @param {wm.protobuf.ICarSummaryQuery=} [properties] Properties to set + * @returns {wm.protobuf.CarSummaryQuery} CarSummaryQuery instance + */ + CarSummaryQuery.create = function create(properties) { + return new CarSummaryQuery(properties); + }; + + /** + * Encodes the specified CarSummaryQuery message. Does not implicitly {@link wm.protobuf.CarSummaryQuery.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarSummaryQuery + * @static + * @param {wm.protobuf.ICarSummaryQuery} message CarSummaryQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSummaryQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.regionId != null && Object.hasOwnProperty.call(message, "regionId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.regionId); + if (message.ghostLevel != null && Object.hasOwnProperty.call(message, "ghostLevel")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ghostLevel); + if (message.manufacturer != null && Object.hasOwnProperty.call(message, "manufacturer")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.manufacturer); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.model); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.searchCode != null && Object.hasOwnProperty.call(message, "searchCode")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.searchCode); + if (message.lastPlayedPlaceId != null && Object.hasOwnProperty.call(message, "lastPlayedPlaceId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.lastPlayedPlaceId); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.limit); + return writer; + }; + + /** + * Encodes the specified CarSummaryQuery message, length delimited. Does not implicitly {@link wm.protobuf.CarSummaryQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarSummaryQuery + * @static + * @param {wm.protobuf.ICarSummaryQuery} message CarSummaryQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSummaryQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarSummaryQuery message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarSummaryQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarSummaryQuery} CarSummaryQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSummaryQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarSummaryQuery(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.regionId = reader.uint32(); + break; + } + case 2: { + message.ghostLevel = reader.uint32(); + break; + } + case 3: { + message.manufacturer = reader.uint32(); + break; + } + case 4: { + message.model = reader.uint32(); + break; + } + case 5: { + message.name = reader.string(); + break; + } + case 6: { + message.searchCode = reader.string(); + break; + } + case 7: { + message.lastPlayedPlaceId = reader.string(); + break; + } + case 8: { + message.limit = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CarSummaryQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarSummaryQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarSummaryQuery} CarSummaryQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSummaryQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarSummaryQuery message. + * @function verify + * @memberof wm.protobuf.CarSummaryQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarSummaryQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.regionId != null && message.hasOwnProperty("regionId")) + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (message.ghostLevel != null && message.hasOwnProperty("ghostLevel")) + if (!$util.isInteger(message.ghostLevel)) + return "ghostLevel: integer expected"; + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + if (!$util.isInteger(message.manufacturer)) + return "manufacturer: integer expected"; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isInteger(message.model)) + return "model: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.searchCode != null && message.hasOwnProperty("searchCode")) + if (!$util.isString(message.searchCode)) + return "searchCode: string expected"; + if (message.lastPlayedPlaceId != null && message.hasOwnProperty("lastPlayedPlaceId")) + if (!$util.isString(message.lastPlayedPlaceId)) + return "lastPlayedPlaceId: string expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit)) + return "limit: integer expected"; + return null; + }; + + /** + * Creates a CarSummaryQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarSummaryQuery + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarSummaryQuery} CarSummaryQuery + */ + CarSummaryQuery.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarSummaryQuery) + return object; + let message = new $root.wm.protobuf.CarSummaryQuery(); + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.ghostLevel != null) + message.ghostLevel = object.ghostLevel >>> 0; + if (object.manufacturer != null) + message.manufacturer = object.manufacturer >>> 0; + if (object.model != null) + message.model = object.model >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.searchCode != null) + message.searchCode = String(object.searchCode); + if (object.lastPlayedPlaceId != null) + message.lastPlayedPlaceId = String(object.lastPlayedPlaceId); + if (object.limit != null) + message.limit = object.limit >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarSummaryQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarSummaryQuery + * @static + * @param {wm.protobuf.CarSummaryQuery} message CarSummaryQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarSummaryQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.regionId = 0; + object.ghostLevel = 0; + object.manufacturer = 0; + object.model = 0; + object.name = ""; + object.searchCode = ""; + object.lastPlayedPlaceId = ""; + object.limit = 0; + } + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.ghostLevel != null && message.hasOwnProperty("ghostLevel")) + object.ghostLevel = message.ghostLevel; + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + object.manufacturer = message.manufacturer; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.searchCode != null && message.hasOwnProperty("searchCode")) + object.searchCode = message.searchCode; + if (message.lastPlayedPlaceId != null && message.hasOwnProperty("lastPlayedPlaceId")) + object.lastPlayedPlaceId = message.lastPlayedPlaceId; + if (message.limit != null && message.hasOwnProperty("limit")) + object.limit = message.limit; + return object; + }; + + /** + * Converts this CarSummaryQuery to JSON. + * @function toJSON + * @memberof wm.protobuf.CarSummaryQuery + * @instance + * @returns {Object.} JSON object + */ + CarSummaryQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarSummaryQuery + * @function getTypeUrl + * @memberof wm.protobuf.CarSummaryQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarSummaryQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarSummaryQuery"; + }; + + return CarSummaryQuery; + })(); + + protobuf.FileListQuery = (function() { + + /** + * Properties of a FileListQuery. + * @memberof wm.protobuf + * @interface IFileListQuery + */ + + /** + * Constructs a new FileListQuery. + * @memberof wm.protobuf + * @classdesc Represents a FileListQuery. + * @implements IFileListQuery + * @constructor + * @param {wm.protobuf.IFileListQuery=} [properties] Properties to set + */ + function FileListQuery(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new FileListQuery instance using the specified properties. + * @function create + * @memberof wm.protobuf.FileListQuery + * @static + * @param {wm.protobuf.IFileListQuery=} [properties] Properties to set + * @returns {wm.protobuf.FileListQuery} FileListQuery instance + */ + FileListQuery.create = function create(properties) { + return new FileListQuery(properties); + }; + + /** + * Encodes the specified FileListQuery message. Does not implicitly {@link wm.protobuf.FileListQuery.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.FileListQuery + * @static + * @param {wm.protobuf.IFileListQuery} message FileListQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileListQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified FileListQuery message, length delimited. Does not implicitly {@link wm.protobuf.FileListQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.FileListQuery + * @static + * @param {wm.protobuf.IFileListQuery} message FileListQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileListQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileListQuery message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.FileListQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.FileListQuery} FileListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileListQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.FileListQuery(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileListQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.FileListQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.FileListQuery} FileListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileListQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileListQuery message. + * @function verify + * @memberof wm.protobuf.FileListQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileListQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a FileListQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.FileListQuery + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.FileListQuery} FileListQuery + */ + FileListQuery.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.FileListQuery) + return object; + return new $root.wm.protobuf.FileListQuery(); + }; + + /** + * Creates a plain object from a FileListQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.FileListQuery + * @static + * @param {wm.protobuf.FileListQuery} message FileListQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileListQuery.toObject = function toObject() { + return {}; + }; + + /** + * Converts this FileListQuery to JSON. + * @function toJSON + * @memberof wm.protobuf.FileListQuery + * @instance + * @returns {Object.} JSON object + */ + FileListQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileListQuery + * @function getTypeUrl + * @memberof wm.protobuf.FileListQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileListQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.FileListQuery"; + }; + + return FileListQuery; + })(); + + protobuf.GhostCompetitionTargetQuery = (function() { + + /** + * Properties of a GhostCompetitionTargetQuery. + * @memberof wm.protobuf + * @interface IGhostCompetitionTargetQuery + * @property {number} competitionId GhostCompetitionTargetQuery competitionId + * @property {number|null} [periodId] GhostCompetitionTargetQuery periodId + */ + + /** + * Constructs a new GhostCompetitionTargetQuery. + * @memberof wm.protobuf + * @classdesc Represents a GhostCompetitionTargetQuery. + * @implements IGhostCompetitionTargetQuery + * @constructor + * @param {wm.protobuf.IGhostCompetitionTargetQuery=} [properties] Properties to set + */ + function GhostCompetitionTargetQuery(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionTargetQuery competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.GhostCompetitionTargetQuery + * @instance + */ + GhostCompetitionTargetQuery.prototype.competitionId = 0; + + /** + * GhostCompetitionTargetQuery periodId. + * @member {number} periodId + * @memberof wm.protobuf.GhostCompetitionTargetQuery + * @instance + */ + GhostCompetitionTargetQuery.prototype.periodId = 0; + + /** + * Creates a new GhostCompetitionTargetQuery instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCompetitionTargetQuery + * @static + * @param {wm.protobuf.IGhostCompetitionTargetQuery=} [properties] Properties to set + * @returns {wm.protobuf.GhostCompetitionTargetQuery} GhostCompetitionTargetQuery instance + */ + GhostCompetitionTargetQuery.create = function create(properties) { + return new GhostCompetitionTargetQuery(properties); + }; + + /** + * Encodes the specified GhostCompetitionTargetQuery message. Does not implicitly {@link wm.protobuf.GhostCompetitionTargetQuery.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCompetitionTargetQuery + * @static + * @param {wm.protobuf.IGhostCompetitionTargetQuery} message GhostCompetitionTargetQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionTargetQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.competitionId); + if (message.periodId != null && Object.hasOwnProperty.call(message, "periodId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.periodId); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionTargetQuery message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionTargetQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCompetitionTargetQuery + * @static + * @param {wm.protobuf.IGhostCompetitionTargetQuery} message GhostCompetitionTargetQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionTargetQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionTargetQuery message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCompetitionTargetQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCompetitionTargetQuery} GhostCompetitionTargetQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionTargetQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCompetitionTargetQuery(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.competitionId = reader.uint32(); + break; + } + case 2: { + message.periodId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionTargetQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCompetitionTargetQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCompetitionTargetQuery} GhostCompetitionTargetQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionTargetQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionTargetQuery message. + * @function verify + * @memberof wm.protobuf.GhostCompetitionTargetQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionTargetQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + if (message.periodId != null && message.hasOwnProperty("periodId")) + if (!$util.isInteger(message.periodId)) + return "periodId: integer expected"; + return null; + }; + + /** + * Creates a GhostCompetitionTargetQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCompetitionTargetQuery + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCompetitionTargetQuery} GhostCompetitionTargetQuery + */ + GhostCompetitionTargetQuery.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCompetitionTargetQuery) + return object; + let message = new $root.wm.protobuf.GhostCompetitionTargetQuery(); + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + if (object.periodId != null) + message.periodId = object.periodId >>> 0; + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionTargetQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCompetitionTargetQuery + * @static + * @param {wm.protobuf.GhostCompetitionTargetQuery} message GhostCompetitionTargetQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionTargetQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.competitionId = 0; + object.periodId = 0; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + if (message.periodId != null && message.hasOwnProperty("periodId")) + object.periodId = message.periodId; + return object; + }; + + /** + * Converts this GhostCompetitionTargetQuery to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCompetitionTargetQuery + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionTargetQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionTargetQuery + * @function getTypeUrl + * @memberof wm.protobuf.GhostCompetitionTargetQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionTargetQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCompetitionTargetQuery"; + }; + + return GhostCompetitionTargetQuery; + })(); + + protobuf.LockCrownRequest = (function() { + + /** + * Properties of a LockCrownRequest. + * @memberof wm.protobuf + * @interface ILockCrownRequest + * @property {number|null} [carId] LockCrownRequest carId + * @property {number|null} [area] LockCrownRequest area + * @property {number} lockTime LockCrownRequest lockTime + */ + + /** + * Constructs a new LockCrownRequest. + * @memberof wm.protobuf + * @classdesc Represents a LockCrownRequest. + * @implements ILockCrownRequest + * @constructor + * @param {wm.protobuf.ILockCrownRequest=} [properties] Properties to set + */ + function LockCrownRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LockCrownRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LockCrownRequest + * @instance + */ + LockCrownRequest.prototype.carId = 0; + + /** + * LockCrownRequest area. + * @member {number} area + * @memberof wm.protobuf.LockCrownRequest + * @instance + */ + LockCrownRequest.prototype.area = 0; + + /** + * LockCrownRequest lockTime. + * @member {number} lockTime + * @memberof wm.protobuf.LockCrownRequest + * @instance + */ + LockCrownRequest.prototype.lockTime = 0; + + /** + * Creates a new LockCrownRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LockCrownRequest + * @static + * @param {wm.protobuf.ILockCrownRequest=} [properties] Properties to set + * @returns {wm.protobuf.LockCrownRequest} LockCrownRequest instance + */ + LockCrownRequest.create = function create(properties) { + return new LockCrownRequest(properties); + }; + + /** + * Encodes the specified LockCrownRequest message. Does not implicitly {@link wm.protobuf.LockCrownRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LockCrownRequest + * @static + * @param {wm.protobuf.ILockCrownRequest} message LockCrownRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockCrownRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.area != null && Object.hasOwnProperty.call(message, "area")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.area); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.lockTime); + return writer; + }; + + /** + * Encodes the specified LockCrownRequest message, length delimited. Does not implicitly {@link wm.protobuf.LockCrownRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LockCrownRequest + * @static + * @param {wm.protobuf.ILockCrownRequest} message LockCrownRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockCrownRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LockCrownRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LockCrownRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LockCrownRequest} LockCrownRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockCrownRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LockCrownRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.area = reader.uint32(); + break; + } + case 3: { + message.lockTime = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("lockTime")) + throw $util.ProtocolError("missing required 'lockTime'", { instance: message }); + return message; + }; + + /** + * Decodes a LockCrownRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LockCrownRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LockCrownRequest} LockCrownRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockCrownRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LockCrownRequest message. + * @function verify + * @memberof wm.protobuf.LockCrownRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LockCrownRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.area != null && message.hasOwnProperty("area")) + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.lockTime)) + return "lockTime: integer expected"; + return null; + }; + + /** + * Creates a LockCrownRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LockCrownRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LockCrownRequest} LockCrownRequest + */ + LockCrownRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LockCrownRequest) + return object; + let message = new $root.wm.protobuf.LockCrownRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.lockTime != null) + message.lockTime = object.lockTime >>> 0; + return message; + }; + + /** + * Creates a plain object from a LockCrownRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LockCrownRequest + * @static + * @param {wm.protobuf.LockCrownRequest} message LockCrownRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LockCrownRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.area = 0; + object.lockTime = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.lockTime != null && message.hasOwnProperty("lockTime")) + object.lockTime = message.lockTime; + return object; + }; + + /** + * Converts this LockCrownRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LockCrownRequest + * @instance + * @returns {Object.} JSON object + */ + LockCrownRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LockCrownRequest + * @function getTypeUrl + * @memberof wm.protobuf.LockCrownRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LockCrownRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LockCrownRequest"; + }; + + return LockCrownRequest; + })(); + + protobuf.LockCrownResponse = (function() { + + /** + * Properties of a LockCrownResponse. + * @memberof wm.protobuf + * @interface ILockCrownResponse + * @property {wm.protobuf.ErrorCode} error LockCrownResponse error + */ + + /** + * Constructs a new LockCrownResponse. + * @memberof wm.protobuf + * @classdesc Represents a LockCrownResponse. + * @implements ILockCrownResponse + * @constructor + * @param {wm.protobuf.ILockCrownResponse=} [properties] Properties to set + */ + function LockCrownResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LockCrownResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LockCrownResponse + * @instance + */ + LockCrownResponse.prototype.error = 0; + + /** + * Creates a new LockCrownResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LockCrownResponse + * @static + * @param {wm.protobuf.ILockCrownResponse=} [properties] Properties to set + * @returns {wm.protobuf.LockCrownResponse} LockCrownResponse instance + */ + LockCrownResponse.create = function create(properties) { + return new LockCrownResponse(properties); + }; + + /** + * Encodes the specified LockCrownResponse message. Does not implicitly {@link wm.protobuf.LockCrownResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LockCrownResponse + * @static + * @param {wm.protobuf.ILockCrownResponse} message LockCrownResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockCrownResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified LockCrownResponse message, length delimited. Does not implicitly {@link wm.protobuf.LockCrownResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LockCrownResponse + * @static + * @param {wm.protobuf.ILockCrownResponse} message LockCrownResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockCrownResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LockCrownResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LockCrownResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LockCrownResponse} LockCrownResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockCrownResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LockCrownResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LockCrownResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LockCrownResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LockCrownResponse} LockCrownResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockCrownResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LockCrownResponse message. + * @function verify + * @memberof wm.protobuf.LockCrownResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LockCrownResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a LockCrownResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LockCrownResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LockCrownResponse} LockCrownResponse + */ + LockCrownResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LockCrownResponse) + return object; + let message = new $root.wm.protobuf.LockCrownResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a LockCrownResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LockCrownResponse + * @static + * @param {wm.protobuf.LockCrownResponse} message LockCrownResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LockCrownResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this LockCrownResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LockCrownResponse + * @instance + * @returns {Object.} JSON object + */ + LockCrownResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LockCrownResponse + * @function getTypeUrl + * @memberof wm.protobuf.LockCrownResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LockCrownResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LockCrownResponse"; + }; + + return LockCrownResponse; + })(); + + protobuf.Crown = (function() { + + /** + * Properties of a Crown. + * @memberof wm.protobuf + * @interface ICrown + * @property {number} carId Crown carId + * @property {number} area Crown area + * @property {number|null} [unlockAt] Crown unlockAt + * @property {wm.protobuf.ICar|null} [car] Crown car + */ + + /** + * Constructs a new Crown. + * @memberof wm.protobuf + * @classdesc Represents a Crown. + * @implements ICrown + * @constructor + * @param {wm.protobuf.ICrown=} [properties] Properties to set + */ + function Crown(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Crown carId. + * @member {number} carId + * @memberof wm.protobuf.Crown + * @instance + */ + Crown.prototype.carId = 0; + + /** + * Crown area. + * @member {number} area + * @memberof wm.protobuf.Crown + * @instance + */ + Crown.prototype.area = 0; + + /** + * Crown unlockAt. + * @member {number} unlockAt + * @memberof wm.protobuf.Crown + * @instance + */ + Crown.prototype.unlockAt = 0; + + /** + * Crown car. + * @member {wm.protobuf.ICar|null|undefined} car + * @memberof wm.protobuf.Crown + * @instance + */ + Crown.prototype.car = null; + + /** + * Creates a new Crown instance using the specified properties. + * @function create + * @memberof wm.protobuf.Crown + * @static + * @param {wm.protobuf.ICrown=} [properties] Properties to set + * @returns {wm.protobuf.Crown} Crown instance + */ + Crown.create = function create(properties) { + return new Crown(properties); + }; + + /** + * Encodes the specified Crown message. Does not implicitly {@link wm.protobuf.Crown.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Crown + * @static + * @param {wm.protobuf.ICrown} message Crown message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Crown.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.area); + if (message.unlockAt != null && Object.hasOwnProperty.call(message, "unlockAt")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.unlockAt); + if (message.car != null && Object.hasOwnProperty.call(message, "car")) + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Crown message, length delimited. Does not implicitly {@link wm.protobuf.Crown.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Crown + * @static + * @param {wm.protobuf.ICrown} message Crown message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Crown.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Crown message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Crown + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Crown} Crown + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Crown.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Crown(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.area = reader.uint32(); + break; + } + case 3: { + message.unlockAt = reader.uint32(); + break; + } + case 4: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes a Crown message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Crown + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Crown} Crown + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Crown.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Crown message. + * @function verify + * @memberof wm.protobuf.Crown + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Crown.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (message.unlockAt != null && message.hasOwnProperty("unlockAt")) + if (!$util.isInteger(message.unlockAt)) + return "unlockAt: integer expected"; + if (message.car != null && message.hasOwnProperty("car")) { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + return null; + }; + + /** + * Creates a Crown message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Crown + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Crown} Crown + */ + Crown.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Crown) + return object; + let message = new $root.wm.protobuf.Crown(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.unlockAt != null) + message.unlockAt = object.unlockAt >>> 0; + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.Crown.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + return message; + }; + + /** + * Creates a plain object from a Crown message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Crown + * @static + * @param {wm.protobuf.Crown} message Crown + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Crown.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.area = 0; + object.unlockAt = 0; + object.car = null; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.unlockAt != null && message.hasOwnProperty("unlockAt")) + object.unlockAt = message.unlockAt; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + return object; + }; + + /** + * Converts this Crown to JSON. + * @function toJSON + * @memberof wm.protobuf.Crown + * @instance + * @returns {Object.} JSON object + */ + Crown.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Crown + * @function getTypeUrl + * @memberof wm.protobuf.Crown + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Crown.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Crown"; + }; + + return Crown; + })(); + + protobuf.CrownListQuery = (function() { + + /** + * Properties of a CrownListQuery. + * @memberof wm.protobuf + * @interface ICrownListQuery + * @property {number|null} [carId] CrownListQuery carId + * @property {number|null} [area] CrownListQuery area + */ + + /** + * Constructs a new CrownListQuery. + * @memberof wm.protobuf + * @classdesc Represents a CrownListQuery. + * @implements ICrownListQuery + * @constructor + * @param {wm.protobuf.ICrownListQuery=} [properties] Properties to set + */ + function CrownListQuery(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CrownListQuery carId. + * @member {number} carId + * @memberof wm.protobuf.CrownListQuery + * @instance + */ + CrownListQuery.prototype.carId = 0; + + /** + * CrownListQuery area. + * @member {number} area + * @memberof wm.protobuf.CrownListQuery + * @instance + */ + CrownListQuery.prototype.area = 0; + + /** + * Creates a new CrownListQuery instance using the specified properties. + * @function create + * @memberof wm.protobuf.CrownListQuery + * @static + * @param {wm.protobuf.ICrownListQuery=} [properties] Properties to set + * @returns {wm.protobuf.CrownListQuery} CrownListQuery instance + */ + CrownListQuery.create = function create(properties) { + return new CrownListQuery(properties); + }; + + /** + * Encodes the specified CrownListQuery message. Does not implicitly {@link wm.protobuf.CrownListQuery.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CrownListQuery + * @static + * @param {wm.protobuf.ICrownListQuery} message CrownListQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CrownListQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.area != null && Object.hasOwnProperty.call(message, "area")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.area); + return writer; + }; + + /** + * Encodes the specified CrownListQuery message, length delimited. Does not implicitly {@link wm.protobuf.CrownListQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CrownListQuery + * @static + * @param {wm.protobuf.ICrownListQuery} message CrownListQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CrownListQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CrownListQuery message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CrownListQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CrownListQuery} CrownListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CrownListQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CrownListQuery(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.area = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CrownListQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CrownListQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CrownListQuery} CrownListQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CrownListQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CrownListQuery message. + * @function verify + * @memberof wm.protobuf.CrownListQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CrownListQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.area != null && message.hasOwnProperty("area")) + if (!$util.isInteger(message.area)) + return "area: integer expected"; + return null; + }; + + /** + * Creates a CrownListQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CrownListQuery + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CrownListQuery} CrownListQuery + */ + CrownListQuery.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CrownListQuery) + return object; + let message = new $root.wm.protobuf.CrownListQuery(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + return message; + }; + + /** + * Creates a plain object from a CrownListQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CrownListQuery + * @static + * @param {wm.protobuf.CrownListQuery} message CrownListQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CrownListQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.area = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + return object; + }; + + /** + * Converts this CrownListQuery to JSON. + * @function toJSON + * @memberof wm.protobuf.CrownListQuery + * @instance + * @returns {Object.} JSON object + */ + CrownListQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CrownListQuery + * @function getTypeUrl + * @memberof wm.protobuf.CrownListQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CrownListQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CrownListQuery"; + }; + + return CrownListQuery; + })(); + + protobuf.CrownList = (function() { + + /** + * Properties of a CrownList. + * @memberof wm.protobuf + * @interface ICrownList + * @property {Array.|null} [crowns] CrownList crowns + */ + + /** + * Constructs a new CrownList. + * @memberof wm.protobuf + * @classdesc Represents a CrownList. + * @implements ICrownList + * @constructor + * @param {wm.protobuf.ICrownList=} [properties] Properties to set + */ + function CrownList(properties) { + this.crowns = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CrownList crowns. + * @member {Array.} crowns + * @memberof wm.protobuf.CrownList + * @instance + */ + CrownList.prototype.crowns = $util.emptyArray; + + /** + * Creates a new CrownList instance using the specified properties. + * @function create + * @memberof wm.protobuf.CrownList + * @static + * @param {wm.protobuf.ICrownList=} [properties] Properties to set + * @returns {wm.protobuf.CrownList} CrownList instance + */ + CrownList.create = function create(properties) { + return new CrownList(properties); + }; + + /** + * Encodes the specified CrownList message. Does not implicitly {@link wm.protobuf.CrownList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CrownList + * @static + * @param {wm.protobuf.ICrownList} message CrownList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CrownList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.crowns != null && message.crowns.length) + for (let i = 0; i < message.crowns.length; ++i) + $root.wm.protobuf.Crown.encode(message.crowns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CrownList message, length delimited. Does not implicitly {@link wm.protobuf.CrownList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CrownList + * @static + * @param {wm.protobuf.ICrownList} message CrownList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CrownList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CrownList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CrownList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CrownList} CrownList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CrownList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CrownList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.crowns && message.crowns.length)) + message.crowns = []; + message.crowns.push($root.wm.protobuf.Crown.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CrownList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CrownList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CrownList} CrownList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CrownList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CrownList message. + * @function verify + * @memberof wm.protobuf.CrownList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CrownList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.crowns != null && message.hasOwnProperty("crowns")) { + if (!Array.isArray(message.crowns)) + return "crowns: array expected"; + for (let i = 0; i < message.crowns.length; ++i) { + let error = $root.wm.protobuf.Crown.verify(message.crowns[i]); + if (error) + return "crowns." + error; + } + } + return null; + }; + + /** + * Creates a CrownList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CrownList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CrownList} CrownList + */ + CrownList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CrownList) + return object; + let message = new $root.wm.protobuf.CrownList(); + if (object.crowns) { + if (!Array.isArray(object.crowns)) + throw TypeError(".wm.protobuf.CrownList.crowns: array expected"); + message.crowns = []; + for (let i = 0; i < object.crowns.length; ++i) { + if (typeof object.crowns[i] !== "object") + throw TypeError(".wm.protobuf.CrownList.crowns: object expected"); + message.crowns[i] = $root.wm.protobuf.Crown.fromObject(object.crowns[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CrownList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CrownList + * @static + * @param {wm.protobuf.CrownList} message CrownList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CrownList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.crowns = []; + if (message.crowns && message.crowns.length) { + object.crowns = []; + for (let j = 0; j < message.crowns.length; ++j) + object.crowns[j] = $root.wm.protobuf.Crown.toObject(message.crowns[j], options); + } + return object; + }; + + /** + * Converts this CrownList to JSON. + * @function toJSON + * @memberof wm.protobuf.CrownList + * @instance + * @returns {Object.} JSON object + */ + CrownList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CrownList + * @function getTypeUrl + * @memberof wm.protobuf.CrownList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CrownList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CrownList"; + }; + + return CrownList; + })(); + + protobuf.RankingQuery = (function() { + + /** + * Properties of a RankingQuery. + * @memberof wm.protobuf + * @interface IRankingQuery + * @property {wm.protobuf.RankingType|null} [rankingType] RankingQuery rankingType + */ + + /** + * Constructs a new RankingQuery. + * @memberof wm.protobuf + * @classdesc Represents a RankingQuery. + * @implements IRankingQuery + * @constructor + * @param {wm.protobuf.IRankingQuery=} [properties] Properties to set + */ + function RankingQuery(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RankingQuery rankingType. + * @member {wm.protobuf.RankingType} rankingType + * @memberof wm.protobuf.RankingQuery + * @instance + */ + RankingQuery.prototype.rankingType = 0; + + /** + * Creates a new RankingQuery instance using the specified properties. + * @function create + * @memberof wm.protobuf.RankingQuery + * @static + * @param {wm.protobuf.IRankingQuery=} [properties] Properties to set + * @returns {wm.protobuf.RankingQuery} RankingQuery instance + */ + RankingQuery.create = function create(properties) { + return new RankingQuery(properties); + }; + + /** + * Encodes the specified RankingQuery message. Does not implicitly {@link wm.protobuf.RankingQuery.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RankingQuery + * @static + * @param {wm.protobuf.IRankingQuery} message RankingQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RankingQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rankingType != null && Object.hasOwnProperty.call(message, "rankingType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankingType); + return writer; + }; + + /** + * Encodes the specified RankingQuery message, length delimited. Does not implicitly {@link wm.protobuf.RankingQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RankingQuery + * @static + * @param {wm.protobuf.IRankingQuery} message RankingQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RankingQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RankingQuery message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RankingQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RankingQuery} RankingQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RankingQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RankingQuery(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rankingType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RankingQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RankingQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RankingQuery} RankingQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RankingQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RankingQuery message. + * @function verify + * @memberof wm.protobuf.RankingQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RankingQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rankingType != null && message.hasOwnProperty("rankingType")) + switch (message.rankingType) { + default: + return "rankingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 100: + case 101: + break; + } + return null; + }; + + /** + * Creates a RankingQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RankingQuery + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RankingQuery} RankingQuery + */ + RankingQuery.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RankingQuery) + return object; + let message = new $root.wm.protobuf.RankingQuery(); + switch (object.rankingType) { + case "RANKING_TA_C1IN": + case 0: + message.rankingType = 0; + break; + case "RANKING_TA_C1OUT": + case 1: + message.rankingType = 1; + break; + case "RANKING_TA_RINGLEFT": + case 2: + message.rankingType = 2; + break; + case "RANKING_TA_RINGRIGHT": + case 3: + message.rankingType = 3; + break; + case "RANKING_TA_SUBTOKYO_3_4": + case 4: + message.rankingType = 4; + break; + case "RANKING_TA_SUBTOKYO_5": + case 5: + message.rankingType = 5; + break; + case "RANKING_TA_WANGANEAST": + case 6: + message.rankingType = 6; + break; + case "RANKING_TA_WANGANWEST": + case 7: + message.rankingType = 7; + break; + case "RANKING_TA_K1_DOWN": + case 8: + message.rankingType = 8; + break; + case "RANKING_TA_K1_UP": + case 9: + message.rankingType = 9; + break; + case "RANKING_TA_YAESUIN": + case 10: + message.rankingType = 10; + break; + case "RANKING_TA_YAESUOUT": + case 11: + message.rankingType = 11; + break; + case "RANKING_TA_YOKOHAMAIN": + case 12: + message.rankingType = 12; + break; + case "RANKING_TA_YOKOHAMAOUT": + case 13: + message.rankingType = 13; + break; + case "RANKING_TA_NAGOYA": + case 14: + message.rankingType = 14; + break; + case "RANKING_TA_OSAKA": + case 15: + message.rankingType = 15; + break; + case "RANKING_TA_KOBE": + case 16: + message.rankingType = 16; + break; + case "RANKING_TA_FUKUOKA": + case 17: + message.rankingType = 17; + break; + case "RANKING_TA_HAKONEFOR": + case 18: + message.rankingType = 18; + break; + case "RANKING_TA_HAKONEBACK": + case 19: + message.rankingType = 19; + break; + case "RANKING_TA_TURNPIKE_UP": + case 20: + message.rankingType = 20; + break; + case "RANKING_TA_TURNPIKE_DOWN": + case 21: + message.rankingType = 21; + break; + case "RANKING_TA_TOKYOALL": + case 22: + message.rankingType = 22; + break; + case "RANKING_TA_KANAGAWAALL": + case 23: + message.rankingType = 23; + break; + case "RANKING_TA_HIROSHIMA": + case 24: + message.rankingType = 24; + break; + case "RANKING_VS_STAR": + case 100: + message.rankingType = 100; + break; + case "RANKING_GHOST_DEFEATED_COUNT": + case 101: + message.rankingType = 101; + break; + } + return message; + }; + + /** + * Creates a plain object from a RankingQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RankingQuery + * @static + * @param {wm.protobuf.RankingQuery} message RankingQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RankingQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.rankingType = options.enums === String ? "RANKING_TA_C1IN" : 0; + if (message.rankingType != null && message.hasOwnProperty("rankingType")) + object.rankingType = options.enums === String ? $root.wm.protobuf.RankingType[message.rankingType] : message.rankingType; + return object; + }; + + /** + * Converts this RankingQuery to JSON. + * @function toJSON + * @memberof wm.protobuf.RankingQuery + * @instance + * @returns {Object.} JSON object + */ + RankingQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RankingQuery + * @function getTypeUrl + * @memberof wm.protobuf.RankingQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RankingQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RankingQuery"; + }; + + return RankingQuery; + })(); + + protobuf.Ranking = (function() { + + /** + * Properties of a Ranking. + * @memberof wm.protobuf + * @interface IRanking + * @property {Array.|null} [lists] Ranking lists + */ + + /** + * Constructs a new Ranking. + * @memberof wm.protobuf + * @classdesc Represents a Ranking. + * @implements IRanking + * @constructor + * @param {wm.protobuf.IRanking=} [properties] Properties to set + */ + function Ranking(properties) { + this.lists = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Ranking lists. + * @member {Array.} lists + * @memberof wm.protobuf.Ranking + * @instance + */ + Ranking.prototype.lists = $util.emptyArray; + + /** + * Creates a new Ranking instance using the specified properties. + * @function create + * @memberof wm.protobuf.Ranking + * @static + * @param {wm.protobuf.IRanking=} [properties] Properties to set + * @returns {wm.protobuf.Ranking} Ranking instance + */ + Ranking.create = function create(properties) { + return new Ranking(properties); + }; + + /** + * Encodes the specified Ranking message. Does not implicitly {@link wm.protobuf.Ranking.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Ranking + * @static + * @param {wm.protobuf.IRanking} message Ranking message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Ranking.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lists != null && message.lists.length) + for (let i = 0; i < message.lists.length; ++i) + $root.wm.protobuf.Ranking.List.encode(message.lists[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Ranking message, length delimited. Does not implicitly {@link wm.protobuf.Ranking.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Ranking + * @static + * @param {wm.protobuf.IRanking} message Ranking message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Ranking.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Ranking message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Ranking + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Ranking} Ranking + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Ranking.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Ranking(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.lists && message.lists.length)) + message.lists = []; + message.lists.push($root.wm.protobuf.Ranking.List.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Ranking message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Ranking + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Ranking} Ranking + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Ranking.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Ranking message. + * @function verify + * @memberof wm.protobuf.Ranking + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Ranking.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lists != null && message.hasOwnProperty("lists")) { + if (!Array.isArray(message.lists)) + return "lists: array expected"; + for (let i = 0; i < message.lists.length; ++i) { + let error = $root.wm.protobuf.Ranking.List.verify(message.lists[i]); + if (error) + return "lists." + error; + } + } + return null; + }; + + /** + * Creates a Ranking message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Ranking + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Ranking} Ranking + */ + Ranking.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Ranking) + return object; + let message = new $root.wm.protobuf.Ranking(); + if (object.lists) { + if (!Array.isArray(object.lists)) + throw TypeError(".wm.protobuf.Ranking.lists: array expected"); + message.lists = []; + for (let i = 0; i < object.lists.length; ++i) { + if (typeof object.lists[i] !== "object") + throw TypeError(".wm.protobuf.Ranking.lists: object expected"); + message.lists[i] = $root.wm.protobuf.Ranking.List.fromObject(object.lists[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Ranking message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Ranking + * @static + * @param {wm.protobuf.Ranking} message Ranking + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Ranking.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.lists = []; + if (message.lists && message.lists.length) { + object.lists = []; + for (let j = 0; j < message.lists.length; ++j) + object.lists[j] = $root.wm.protobuf.Ranking.List.toObject(message.lists[j], options); + } + return object; + }; + + /** + * Converts this Ranking to JSON. + * @function toJSON + * @memberof wm.protobuf.Ranking + * @instance + * @returns {Object.} JSON object + */ + Ranking.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Ranking + * @function getTypeUrl + * @memberof wm.protobuf.Ranking + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Ranking.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Ranking"; + }; + + Ranking.List = (function() { + + /** + * Properties of a List. + * @memberof wm.protobuf.Ranking + * @interface IList + * @property {wm.protobuf.RankingType} rankingType List rankingType + * @property {Array.|null} [topRecords] List topRecords + */ + + /** + * Constructs a new List. + * @memberof wm.protobuf.Ranking + * @classdesc Represents a List. + * @implements IList + * @constructor + * @param {wm.protobuf.Ranking.IList=} [properties] Properties to set + */ + function List(properties) { + this.topRecords = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * List rankingType. + * @member {wm.protobuf.RankingType} rankingType + * @memberof wm.protobuf.Ranking.List + * @instance + */ + List.prototype.rankingType = 0; + + /** + * List topRecords. + * @member {Array.} topRecords + * @memberof wm.protobuf.Ranking.List + * @instance + */ + List.prototype.topRecords = $util.emptyArray; + + /** + * Creates a new List instance using the specified properties. + * @function create + * @memberof wm.protobuf.Ranking.List + * @static + * @param {wm.protobuf.Ranking.IList=} [properties] Properties to set + * @returns {wm.protobuf.Ranking.List} List instance + */ + List.create = function create(properties) { + return new List(properties); + }; + + /** + * Encodes the specified List message. Does not implicitly {@link wm.protobuf.Ranking.List.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Ranking.List + * @static + * @param {wm.protobuf.Ranking.IList} message List message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + List.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankingType); + if (message.topRecords != null && message.topRecords.length) + for (let i = 0; i < message.topRecords.length; ++i) + $root.wm.protobuf.Ranking.Entry.encode(message.topRecords[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified List message, length delimited. Does not implicitly {@link wm.protobuf.Ranking.List.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Ranking.List + * @static + * @param {wm.protobuf.Ranking.IList} message List message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + List.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a List message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Ranking.List + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Ranking.List} List + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + List.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Ranking.List(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rankingType = reader.int32(); + break; + } + case 2: { + if (!(message.topRecords && message.topRecords.length)) + message.topRecords = []; + message.topRecords.push($root.wm.protobuf.Ranking.Entry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("rankingType")) + throw $util.ProtocolError("missing required 'rankingType'", { instance: message }); + return message; + }; + + /** + * Decodes a List message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Ranking.List + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Ranking.List} List + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + List.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a List message. + * @function verify + * @memberof wm.protobuf.Ranking.List + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + List.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.rankingType) { + default: + return "rankingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 100: + case 101: + break; + } + if (message.topRecords != null && message.hasOwnProperty("topRecords")) { + if (!Array.isArray(message.topRecords)) + return "topRecords: array expected"; + for (let i = 0; i < message.topRecords.length; ++i) { + let error = $root.wm.protobuf.Ranking.Entry.verify(message.topRecords[i]); + if (error) + return "topRecords." + error; + } + } + return null; + }; + + /** + * Creates a List message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Ranking.List + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Ranking.List} List + */ + List.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Ranking.List) + return object; + let message = new $root.wm.protobuf.Ranking.List(); + switch (object.rankingType) { + case "RANKING_TA_C1IN": + case 0: + message.rankingType = 0; + break; + case "RANKING_TA_C1OUT": + case 1: + message.rankingType = 1; + break; + case "RANKING_TA_RINGLEFT": + case 2: + message.rankingType = 2; + break; + case "RANKING_TA_RINGRIGHT": + case 3: + message.rankingType = 3; + break; + case "RANKING_TA_SUBTOKYO_3_4": + case 4: + message.rankingType = 4; + break; + case "RANKING_TA_SUBTOKYO_5": + case 5: + message.rankingType = 5; + break; + case "RANKING_TA_WANGANEAST": + case 6: + message.rankingType = 6; + break; + case "RANKING_TA_WANGANWEST": + case 7: + message.rankingType = 7; + break; + case "RANKING_TA_K1_DOWN": + case 8: + message.rankingType = 8; + break; + case "RANKING_TA_K1_UP": + case 9: + message.rankingType = 9; + break; + case "RANKING_TA_YAESUIN": + case 10: + message.rankingType = 10; + break; + case "RANKING_TA_YAESUOUT": + case 11: + message.rankingType = 11; + break; + case "RANKING_TA_YOKOHAMAIN": + case 12: + message.rankingType = 12; + break; + case "RANKING_TA_YOKOHAMAOUT": + case 13: + message.rankingType = 13; + break; + case "RANKING_TA_NAGOYA": + case 14: + message.rankingType = 14; + break; + case "RANKING_TA_OSAKA": + case 15: + message.rankingType = 15; + break; + case "RANKING_TA_KOBE": + case 16: + message.rankingType = 16; + break; + case "RANKING_TA_FUKUOKA": + case 17: + message.rankingType = 17; + break; + case "RANKING_TA_HAKONEFOR": + case 18: + message.rankingType = 18; + break; + case "RANKING_TA_HAKONEBACK": + case 19: + message.rankingType = 19; + break; + case "RANKING_TA_TURNPIKE_UP": + case 20: + message.rankingType = 20; + break; + case "RANKING_TA_TURNPIKE_DOWN": + case 21: + message.rankingType = 21; + break; + case "RANKING_TA_TOKYOALL": + case 22: + message.rankingType = 22; + break; + case "RANKING_TA_KANAGAWAALL": + case 23: + message.rankingType = 23; + break; + case "RANKING_TA_HIROSHIMA": + case 24: + message.rankingType = 24; + break; + case "RANKING_VS_STAR": + case 100: + message.rankingType = 100; + break; + case "RANKING_GHOST_DEFEATED_COUNT": + case 101: + message.rankingType = 101; + break; + } + if (object.topRecords) { + if (!Array.isArray(object.topRecords)) + throw TypeError(".wm.protobuf.Ranking.List.topRecords: array expected"); + message.topRecords = []; + for (let i = 0; i < object.topRecords.length; ++i) { + if (typeof object.topRecords[i] !== "object") + throw TypeError(".wm.protobuf.Ranking.List.topRecords: object expected"); + message.topRecords[i] = $root.wm.protobuf.Ranking.Entry.fromObject(object.topRecords[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a List message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Ranking.List + * @static + * @param {wm.protobuf.Ranking.List} message List + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + List.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.topRecords = []; + if (options.defaults) + object.rankingType = options.enums === String ? "RANKING_TA_C1IN" : 0; + if (message.rankingType != null && message.hasOwnProperty("rankingType")) + object.rankingType = options.enums === String ? $root.wm.protobuf.RankingType[message.rankingType] : message.rankingType; + if (message.topRecords && message.topRecords.length) { + object.topRecords = []; + for (let j = 0; j < message.topRecords.length; ++j) + object.topRecords[j] = $root.wm.protobuf.Ranking.Entry.toObject(message.topRecords[j], options); + } + return object; + }; + + /** + * Converts this List to JSON. + * @function toJSON + * @memberof wm.protobuf.Ranking.List + * @instance + * @returns {Object.} JSON object + */ + List.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for List + * @function getTypeUrl + * @memberof wm.protobuf.Ranking.List + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + List.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Ranking.List"; + }; + + return List; + })(); + + Ranking.Entry = (function() { + + /** + * Properties of an Entry. + * @memberof wm.protobuf.Ranking + * @interface IEntry + * @property {number} rank Entry rank + * @property {number} result Entry result + * @property {number} carId Entry carId + * @property {string} name Entry name + * @property {number} regionId Entry regionId + * @property {number} model Entry model + * @property {number} visualModel Entry visualModel + * @property {number} defaultColor Entry defaultColor + * @property {number} tunePower Entry tunePower + * @property {number} tuneHandling Entry tuneHandling + * @property {string} title Entry title + * @property {number} level Entry level + */ + + /** + * Constructs a new Entry. + * @memberof wm.protobuf.Ranking + * @classdesc Represents an Entry. + * @implements IEntry + * @constructor + * @param {wm.protobuf.Ranking.IEntry=} [properties] Properties to set + */ + function Entry(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entry rank. + * @member {number} rank + * @memberof wm.protobuf.Ranking.Entry + * @instance + */ + Entry.prototype.rank = 0; + + /** + * Entry result. + * @member {number} result + * @memberof wm.protobuf.Ranking.Entry + * @instance + */ + Entry.prototype.result = 0; + + /** + * Entry carId. + * @member {number} carId + * @memberof wm.protobuf.Ranking.Entry + * @instance + */ + Entry.prototype.carId = 0; + + /** + * Entry name. + * @member {string} name + * @memberof wm.protobuf.Ranking.Entry + * @instance + */ + Entry.prototype.name = ""; + + /** + * Entry regionId. + * @member {number} regionId + * @memberof wm.protobuf.Ranking.Entry + * @instance + */ + Entry.prototype.regionId = 0; + + /** + * Entry model. + * @member {number} model + * @memberof wm.protobuf.Ranking.Entry + * @instance + */ + Entry.prototype.model = 0; + + /** + * Entry visualModel. + * @member {number} visualModel + * @memberof wm.protobuf.Ranking.Entry + * @instance + */ + Entry.prototype.visualModel = 0; + + /** + * Entry defaultColor. + * @member {number} defaultColor + * @memberof wm.protobuf.Ranking.Entry + * @instance + */ + Entry.prototype.defaultColor = 0; + + /** + * Entry tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.Ranking.Entry + * @instance + */ + Entry.prototype.tunePower = 0; + + /** + * Entry tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.Ranking.Entry + * @instance + */ + Entry.prototype.tuneHandling = 0; + + /** + * Entry title. + * @member {string} title + * @memberof wm.protobuf.Ranking.Entry + * @instance + */ + Entry.prototype.title = ""; + + /** + * Entry level. + * @member {number} level + * @memberof wm.protobuf.Ranking.Entry + * @instance + */ + Entry.prototype.level = 0; + + /** + * Creates a new Entry instance using the specified properties. + * @function create + * @memberof wm.protobuf.Ranking.Entry + * @static + * @param {wm.protobuf.Ranking.IEntry=} [properties] Properties to set + * @returns {wm.protobuf.Ranking.Entry} Entry instance + */ + Entry.create = function create(properties) { + return new Entry(properties); + }; + + /** + * Encodes the specified Entry message. Does not implicitly {@link wm.protobuf.Ranking.Entry.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Ranking.Entry + * @static + * @param {wm.protobuf.Ranking.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rank); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.result); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.carId); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.regionId); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.model); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.visualModel); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.defaultColor); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.tunePower); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.tuneHandling); + writer.uint32(/* id 11, wireType 2 =*/90).string(message.title); + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.level); + return writer; + }; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link wm.protobuf.Ranking.Entry.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Ranking.Entry + * @static + * @param {wm.protobuf.Ranking.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Ranking.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Ranking.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Ranking.Entry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rank = reader.uint32(); + break; + } + case 2: { + message.result = reader.uint32(); + break; + } + case 3: { + message.carId = reader.uint32(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + case 5: { + message.regionId = reader.uint32(); + break; + } + case 6: { + message.model = reader.uint32(); + break; + } + case 7: { + message.visualModel = reader.uint32(); + break; + } + case 8: { + message.defaultColor = reader.uint32(); + break; + } + case 9: { + message.tunePower = reader.uint32(); + break; + } + case 10: { + message.tuneHandling = reader.uint32(); + break; + } + case 11: { + message.title = reader.string(); + break; + } + case 12: { + message.level = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("rank")) + throw $util.ProtocolError("missing required 'rank'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("name")) + throw $util.ProtocolError("missing required 'name'", { instance: message }); + if (!message.hasOwnProperty("regionId")) + throw $util.ProtocolError("missing required 'regionId'", { instance: message }); + if (!message.hasOwnProperty("model")) + throw $util.ProtocolError("missing required 'model'", { instance: message }); + if (!message.hasOwnProperty("visualModel")) + throw $util.ProtocolError("missing required 'visualModel'", { instance: message }); + if (!message.hasOwnProperty("defaultColor")) + throw $util.ProtocolError("missing required 'defaultColor'", { instance: message }); + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("title")) + throw $util.ProtocolError("missing required 'title'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + return message; + }; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Ranking.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Ranking.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entry message. + * @function verify + * @memberof wm.protobuf.Ranking.Entry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isString(message.name)) + return "name: string expected"; + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (!$util.isInteger(message.model)) + return "model: integer expected"; + if (!$util.isInteger(message.visualModel)) + return "visualModel: integer expected"; + if (!$util.isInteger(message.defaultColor)) + return "defaultColor: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isString(message.title)) + return "title: string expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + return null; + }; + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Ranking.Entry + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Ranking.Entry} Entry + */ + Entry.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Ranking.Entry) + return object; + let message = new $root.wm.protobuf.Ranking.Entry(); + if (object.rank != null) + message.rank = object.rank >>> 0; + if (object.result != null) + message.result = object.result >>> 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.model != null) + message.model = object.model >>> 0; + if (object.visualModel != null) + message.visualModel = object.visualModel >>> 0; + if (object.defaultColor != null) + message.defaultColor = object.defaultColor >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.title != null) + message.title = String(object.title); + if (object.level != null) + message.level = object.level >>> 0; + return message; + }; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Ranking.Entry + * @static + * @param {wm.protobuf.Ranking.Entry} message Entry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.rank = 0; + object.result = 0; + object.carId = 0; + object.name = ""; + object.regionId = 0; + object.model = 0; + object.visualModel = 0; + object.defaultColor = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.title = ""; + object.level = 0; + } + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.visualModel != null && message.hasOwnProperty("visualModel")) + object.visualModel = message.visualModel; + if (message.defaultColor != null && message.hasOwnProperty("defaultColor")) + object.defaultColor = message.defaultColor; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + return object; + }; + + /** + * Converts this Entry to JSON. + * @function toJSON + * @memberof wm.protobuf.Ranking.Entry + * @instance + * @returns {Object.} JSON object + */ + Entry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entry + * @function getTypeUrl + * @memberof wm.protobuf.Ranking.Entry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Ranking.Entry"; + }; + + return Entry; + })(); + + return Ranking; + })(); + + /** + * RankingType enum. + * @name wm.protobuf.RankingType + * @enum {number} + * @property {number} RANKING_TA_C1IN=0 RANKING_TA_C1IN value + * @property {number} RANKING_TA_C1OUT=1 RANKING_TA_C1OUT value + * @property {number} RANKING_TA_RINGLEFT=2 RANKING_TA_RINGLEFT value + * @property {number} RANKING_TA_RINGRIGHT=3 RANKING_TA_RINGRIGHT value + * @property {number} RANKING_TA_SUBTOKYO_3_4=4 RANKING_TA_SUBTOKYO_3_4 value + * @property {number} RANKING_TA_SUBTOKYO_5=5 RANKING_TA_SUBTOKYO_5 value + * @property {number} RANKING_TA_WANGANEAST=6 RANKING_TA_WANGANEAST value + * @property {number} RANKING_TA_WANGANWEST=7 RANKING_TA_WANGANWEST value + * @property {number} RANKING_TA_K1_DOWN=8 RANKING_TA_K1_DOWN value + * @property {number} RANKING_TA_K1_UP=9 RANKING_TA_K1_UP value + * @property {number} RANKING_TA_YAESUIN=10 RANKING_TA_YAESUIN value + * @property {number} RANKING_TA_YAESUOUT=11 RANKING_TA_YAESUOUT value + * @property {number} RANKING_TA_YOKOHAMAIN=12 RANKING_TA_YOKOHAMAIN value + * @property {number} RANKING_TA_YOKOHAMAOUT=13 RANKING_TA_YOKOHAMAOUT value + * @property {number} RANKING_TA_NAGOYA=14 RANKING_TA_NAGOYA value + * @property {number} RANKING_TA_OSAKA=15 RANKING_TA_OSAKA value + * @property {number} RANKING_TA_KOBE=16 RANKING_TA_KOBE value + * @property {number} RANKING_TA_FUKUOKA=17 RANKING_TA_FUKUOKA value + * @property {number} RANKING_TA_HAKONEFOR=18 RANKING_TA_HAKONEFOR value + * @property {number} RANKING_TA_HAKONEBACK=19 RANKING_TA_HAKONEBACK value + * @property {number} RANKING_TA_TURNPIKE_UP=20 RANKING_TA_TURNPIKE_UP value + * @property {number} RANKING_TA_TURNPIKE_DOWN=21 RANKING_TA_TURNPIKE_DOWN value + * @property {number} RANKING_TA_TOKYOALL=22 RANKING_TA_TOKYOALL value + * @property {number} RANKING_TA_KANAGAWAALL=23 RANKING_TA_KANAGAWAALL value + * @property {number} RANKING_TA_HIROSHIMA=24 RANKING_TA_HIROSHIMA value + * @property {number} RANKING_VS_STAR=100 RANKING_VS_STAR value + * @property {number} RANKING_GHOST_DEFEATED_COUNT=101 RANKING_GHOST_DEFEATED_COUNT value + */ + protobuf.RankingType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RANKING_TA_C1IN"] = 0; + values[valuesById[1] = "RANKING_TA_C1OUT"] = 1; + values[valuesById[2] = "RANKING_TA_RINGLEFT"] = 2; + values[valuesById[3] = "RANKING_TA_RINGRIGHT"] = 3; + values[valuesById[4] = "RANKING_TA_SUBTOKYO_3_4"] = 4; + values[valuesById[5] = "RANKING_TA_SUBTOKYO_5"] = 5; + values[valuesById[6] = "RANKING_TA_WANGANEAST"] = 6; + values[valuesById[7] = "RANKING_TA_WANGANWEST"] = 7; + values[valuesById[8] = "RANKING_TA_K1_DOWN"] = 8; + values[valuesById[9] = "RANKING_TA_K1_UP"] = 9; + values[valuesById[10] = "RANKING_TA_YAESUIN"] = 10; + values[valuesById[11] = "RANKING_TA_YAESUOUT"] = 11; + values[valuesById[12] = "RANKING_TA_YOKOHAMAIN"] = 12; + values[valuesById[13] = "RANKING_TA_YOKOHAMAOUT"] = 13; + values[valuesById[14] = "RANKING_TA_NAGOYA"] = 14; + values[valuesById[15] = "RANKING_TA_OSAKA"] = 15; + values[valuesById[16] = "RANKING_TA_KOBE"] = 16; + values[valuesById[17] = "RANKING_TA_FUKUOKA"] = 17; + values[valuesById[18] = "RANKING_TA_HAKONEFOR"] = 18; + values[valuesById[19] = "RANKING_TA_HAKONEBACK"] = 19; + values[valuesById[20] = "RANKING_TA_TURNPIKE_UP"] = 20; + values[valuesById[21] = "RANKING_TA_TURNPIKE_DOWN"] = 21; + values[valuesById[22] = "RANKING_TA_TOKYOALL"] = 22; + values[valuesById[23] = "RANKING_TA_KANAGAWAALL"] = 23; + values[valuesById[24] = "RANKING_TA_HIROSHIMA"] = 24; + values[valuesById[100] = "RANKING_VS_STAR"] = 100; + values[valuesById[101] = "RANKING_GHOST_DEFEATED_COUNT"] = 101; + return values; + })(); + + protobuf.RegisterSystemInfoRequest = (function() { + + /** + * Properties of a RegisterSystemInfoRequest. + * @memberof wm.protobuf + * @interface IRegisterSystemInfoRequest + * @property {string} pcbSerial RegisterSystemInfoRequest pcbSerial + * @property {wm.protobuf.TerminalType} terminalType RegisterSystemInfoRequest terminalType + * @property {number} romVersion RegisterSystemInfoRequest romVersion + * @property {string} country RegisterSystemInfoRequest country + * @property {wm.protobuf.LineType} lineType RegisterSystemInfoRequest lineType + * @property {string} shopName RegisterSystemInfoRequest shopName + * @property {string} shopNickname RegisterSystemInfoRequest shopNickname + * @property {number|null} [allnetPlaceId] RegisterSystemInfoRequest allnetPlaceId + * @property {number|null} [allnetRegion0] RegisterSystemInfoRequest allnetRegion0 + * @property {string|null} [muchaPlaceId] RegisterSystemInfoRequest muchaPlaceId + * @property {number|null} [muchaPrefectureId] RegisterSystemInfoRequest muchaPrefectureId + * @property {string} regionName0 RegisterSystemInfoRequest regionName0 + * @property {string} regionName1 RegisterSystemInfoRequest regionName1 + * @property {string} regionName2 RegisterSystemInfoRequest regionName2 + * @property {string} regionName3 RegisterSystemInfoRequest regionName3 + * @property {number} timezoneOffset RegisterSystemInfoRequest timezoneOffset + * @property {wm.protobuf.ISystemSetting} systemSetting RegisterSystemInfoRequest systemSetting + * @property {Array.|null} [errorLogs] RegisterSystemInfoRequest errorLogs + */ + + /** + * Constructs a new RegisterSystemInfoRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemInfoRequest. + * @implements IRegisterSystemInfoRequest + * @constructor + * @param {wm.protobuf.IRegisterSystemInfoRequest=} [properties] Properties to set + */ + function RegisterSystemInfoRequest(properties) { + this.errorLogs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemInfoRequest pcbSerial. + * @member {string} pcbSerial + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.pcbSerial = ""; + + /** + * RegisterSystemInfoRequest terminalType. + * @member {wm.protobuf.TerminalType} terminalType + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.terminalType = 0; + + /** + * RegisterSystemInfoRequest romVersion. + * @member {number} romVersion + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.romVersion = 0; + + /** + * RegisterSystemInfoRequest country. + * @member {string} country + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.country = ""; + + /** + * RegisterSystemInfoRequest lineType. + * @member {wm.protobuf.LineType} lineType + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.lineType = 0; + + /** + * RegisterSystemInfoRequest shopName. + * @member {string} shopName + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.shopName = ""; + + /** + * RegisterSystemInfoRequest shopNickname. + * @member {string} shopNickname + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.shopNickname = ""; + + /** + * RegisterSystemInfoRequest allnetPlaceId. + * @member {number} allnetPlaceId + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.allnetPlaceId = 0; + + /** + * RegisterSystemInfoRequest allnetRegion0. + * @member {number} allnetRegion0 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.allnetRegion0 = 0; + + /** + * RegisterSystemInfoRequest muchaPlaceId. + * @member {string} muchaPlaceId + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.muchaPlaceId = ""; + + /** + * RegisterSystemInfoRequest muchaPrefectureId. + * @member {number} muchaPrefectureId + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.muchaPrefectureId = 0; + + /** + * RegisterSystemInfoRequest regionName0. + * @member {string} regionName0 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName0 = ""; + + /** + * RegisterSystemInfoRequest regionName1. + * @member {string} regionName1 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName1 = ""; + + /** + * RegisterSystemInfoRequest regionName2. + * @member {string} regionName2 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName2 = ""; + + /** + * RegisterSystemInfoRequest regionName3. + * @member {string} regionName3 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName3 = ""; + + /** + * RegisterSystemInfoRequest timezoneOffset. + * @member {number} timezoneOffset + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.timezoneOffset = 0; + + /** + * RegisterSystemInfoRequest systemSetting. + * @member {wm.protobuf.ISystemSetting} systemSetting + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.systemSetting = null; + + /** + * RegisterSystemInfoRequest errorLogs. + * @member {Array.} errorLogs + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.errorLogs = $util.emptyArray; + + /** + * Creates a new RegisterSystemInfoRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.IRegisterSystemInfoRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest instance + */ + RegisterSystemInfoRequest.create = function create(properties) { + return new RegisterSystemInfoRequest(properties); + }; + + /** + * Encodes the specified RegisterSystemInfoRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.IRegisterSystemInfoRequest} message RegisterSystemInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pcbSerial); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.terminalType); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.romVersion); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.country); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.lineType); + writer.uint32(/* id 6, wireType 2 =*/50).string(message.shopName); + writer.uint32(/* id 7, wireType 2 =*/58).string(message.shopNickname); + if (message.allnetPlaceId != null && Object.hasOwnProperty.call(message, "allnetPlaceId")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.allnetPlaceId); + if (message.allnetRegion0 != null && Object.hasOwnProperty.call(message, "allnetRegion0")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.allnetRegion0); + if (message.muchaPlaceId != null && Object.hasOwnProperty.call(message, "muchaPlaceId")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.muchaPlaceId); + if (message.muchaPrefectureId != null && Object.hasOwnProperty.call(message, "muchaPrefectureId")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.muchaPrefectureId); + writer.uint32(/* id 12, wireType 2 =*/98).string(message.regionName0); + writer.uint32(/* id 13, wireType 2 =*/106).string(message.regionName1); + writer.uint32(/* id 14, wireType 2 =*/114).string(message.regionName2); + writer.uint32(/* id 15, wireType 2 =*/122).string(message.regionName3); + writer.uint32(/* id 16, wireType 0 =*/128).sint32(message.timezoneOffset); + $root.wm.protobuf.SystemSetting.encode(message.systemSetting, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.errorLogs != null && message.errorLogs.length) + for (let i = 0; i < message.errorLogs.length; ++i) + $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.encode(message.errorLogs[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RegisterSystemInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.IRegisterSystemInfoRequest} message RegisterSystemInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pcbSerial = reader.string(); + break; + } + case 2: { + message.terminalType = reader.int32(); + break; + } + case 3: { + message.romVersion = reader.uint32(); + break; + } + case 4: { + message.country = reader.string(); + break; + } + case 5: { + message.lineType = reader.int32(); + break; + } + case 6: { + message.shopName = reader.string(); + break; + } + case 7: { + message.shopNickname = reader.string(); + break; + } + case 8: { + message.allnetPlaceId = reader.uint32(); + break; + } + case 9: { + message.allnetRegion0 = reader.uint32(); + break; + } + case 10: { + message.muchaPlaceId = reader.string(); + break; + } + case 11: { + message.muchaPrefectureId = reader.uint32(); + break; + } + case 12: { + message.regionName0 = reader.string(); + break; + } + case 13: { + message.regionName1 = reader.string(); + break; + } + case 14: { + message.regionName2 = reader.string(); + break; + } + case 15: { + message.regionName3 = reader.string(); + break; + } + case 16: { + message.timezoneOffset = reader.sint32(); + break; + } + case 17: { + message.systemSetting = $root.wm.protobuf.SystemSetting.decode(reader, reader.uint32()); + break; + } + case 18: { + if (!(message.errorLogs && message.errorLogs.length)) + message.errorLogs = []; + message.errorLogs.push($root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("pcbSerial")) + throw $util.ProtocolError("missing required 'pcbSerial'", { instance: message }); + if (!message.hasOwnProperty("terminalType")) + throw $util.ProtocolError("missing required 'terminalType'", { instance: message }); + if (!message.hasOwnProperty("romVersion")) + throw $util.ProtocolError("missing required 'romVersion'", { instance: message }); + if (!message.hasOwnProperty("country")) + throw $util.ProtocolError("missing required 'country'", { instance: message }); + if (!message.hasOwnProperty("lineType")) + throw $util.ProtocolError("missing required 'lineType'", { instance: message }); + if (!message.hasOwnProperty("shopName")) + throw $util.ProtocolError("missing required 'shopName'", { instance: message }); + if (!message.hasOwnProperty("shopNickname")) + throw $util.ProtocolError("missing required 'shopNickname'", { instance: message }); + if (!message.hasOwnProperty("regionName0")) + throw $util.ProtocolError("missing required 'regionName0'", { instance: message }); + if (!message.hasOwnProperty("regionName1")) + throw $util.ProtocolError("missing required 'regionName1'", { instance: message }); + if (!message.hasOwnProperty("regionName2")) + throw $util.ProtocolError("missing required 'regionName2'", { instance: message }); + if (!message.hasOwnProperty("regionName3")) + throw $util.ProtocolError("missing required 'regionName3'", { instance: message }); + if (!message.hasOwnProperty("timezoneOffset")) + throw $util.ProtocolError("missing required 'timezoneOffset'", { instance: message }); + if (!message.hasOwnProperty("systemSetting")) + throw $util.ProtocolError("missing required 'systemSetting'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemInfoRequest message. + * @function verify + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.pcbSerial)) + return "pcbSerial: string expected"; + switch (message.terminalType) { + default: + return "terminalType: enum value expected"; + case 0: + case 1: + break; + } + if (!$util.isInteger(message.romVersion)) + return "romVersion: integer expected"; + if (!$util.isString(message.country)) + return "country: string expected"; + switch (message.lineType) { + default: + return "lineType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (!$util.isString(message.shopName)) + return "shopName: string expected"; + if (!$util.isString(message.shopNickname)) + return "shopNickname: string expected"; + if (message.allnetPlaceId != null && message.hasOwnProperty("allnetPlaceId")) + if (!$util.isInteger(message.allnetPlaceId)) + return "allnetPlaceId: integer expected"; + if (message.allnetRegion0 != null && message.hasOwnProperty("allnetRegion0")) + if (!$util.isInteger(message.allnetRegion0)) + return "allnetRegion0: integer expected"; + if (message.muchaPlaceId != null && message.hasOwnProperty("muchaPlaceId")) + if (!$util.isString(message.muchaPlaceId)) + return "muchaPlaceId: string expected"; + if (message.muchaPrefectureId != null && message.hasOwnProperty("muchaPrefectureId")) + if (!$util.isInteger(message.muchaPrefectureId)) + return "muchaPrefectureId: integer expected"; + if (!$util.isString(message.regionName0)) + return "regionName0: string expected"; + if (!$util.isString(message.regionName1)) + return "regionName1: string expected"; + if (!$util.isString(message.regionName2)) + return "regionName2: string expected"; + if (!$util.isString(message.regionName3)) + return "regionName3: string expected"; + if (!$util.isInteger(message.timezoneOffset)) + return "timezoneOffset: integer expected"; + { + let error = $root.wm.protobuf.SystemSetting.verify(message.systemSetting); + if (error) + return "systemSetting." + error; + } + if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) { + if (!Array.isArray(message.errorLogs)) + return "errorLogs: array expected"; + for (let i = 0; i < message.errorLogs.length; ++i) { + let error = $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify(message.errorLogs[i]); + if (error) + return "errorLogs." + error; + } + } + return null; + }; + + /** + * Creates a RegisterSystemInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest + */ + RegisterSystemInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemInfoRequest) + return object; + let message = new $root.wm.protobuf.RegisterSystemInfoRequest(); + if (object.pcbSerial != null) + message.pcbSerial = String(object.pcbSerial); + switch (object.terminalType) { + case "T_DRIVE": + case 0: + message.terminalType = 0; + break; + case "T_TERMINAL": + case 1: + message.terminalType = 1; + break; + } + if (object.romVersion != null) + message.romVersion = object.romVersion >>> 0; + if (object.country != null) + message.country = String(object.country); + switch (object.lineType) { + case "L_UNKNOWN": + case 0: + message.lineType = 0; + break; + case "L_MOBILE": + case 1: + message.lineType = 1; + break; + case "L_ISDN": + case 2: + message.lineType = 2; + break; + case "L_BFLETS": + case 3: + message.lineType = 3; + break; + case "L_ADSL": + case 4: + message.lineType = 4; + break; + case "L_WIRED": + case 5: + message.lineType = 5; + break; + } + if (object.shopName != null) + message.shopName = String(object.shopName); + if (object.shopNickname != null) + message.shopNickname = String(object.shopNickname); + if (object.allnetPlaceId != null) + message.allnetPlaceId = object.allnetPlaceId >>> 0; + if (object.allnetRegion0 != null) + message.allnetRegion0 = object.allnetRegion0 >>> 0; + if (object.muchaPlaceId != null) + message.muchaPlaceId = String(object.muchaPlaceId); + if (object.muchaPrefectureId != null) + message.muchaPrefectureId = object.muchaPrefectureId >>> 0; + if (object.regionName0 != null) + message.regionName0 = String(object.regionName0); + if (object.regionName1 != null) + message.regionName1 = String(object.regionName1); + if (object.regionName2 != null) + message.regionName2 = String(object.regionName2); + if (object.regionName3 != null) + message.regionName3 = String(object.regionName3); + if (object.timezoneOffset != null) + message.timezoneOffset = object.timezoneOffset | 0; + if (object.systemSetting != null) { + if (typeof object.systemSetting !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoRequest.systemSetting: object expected"); + message.systemSetting = $root.wm.protobuf.SystemSetting.fromObject(object.systemSetting); + } + if (object.errorLogs) { + if (!Array.isArray(object.errorLogs)) + throw TypeError(".wm.protobuf.RegisterSystemInfoRequest.errorLogs: array expected"); + message.errorLogs = []; + for (let i = 0; i < object.errorLogs.length; ++i) { + if (typeof object.errorLogs[i] !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoRequest.errorLogs: object expected"); + message.errorLogs[i] = $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.fromObject(object.errorLogs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RegisterSystemInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest} message RegisterSystemInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.errorLogs = []; + if (options.defaults) { + object.pcbSerial = ""; + object.terminalType = options.enums === String ? "T_DRIVE" : 0; + object.romVersion = 0; + object.country = ""; + object.lineType = options.enums === String ? "L_UNKNOWN" : 0; + object.shopName = ""; + object.shopNickname = ""; + object.allnetPlaceId = 0; + object.allnetRegion0 = 0; + object.muchaPlaceId = ""; + object.muchaPrefectureId = 0; + object.regionName0 = ""; + object.regionName1 = ""; + object.regionName2 = ""; + object.regionName3 = ""; + object.timezoneOffset = 0; + object.systemSetting = null; + } + if (message.pcbSerial != null && message.hasOwnProperty("pcbSerial")) + object.pcbSerial = message.pcbSerial; + if (message.terminalType != null && message.hasOwnProperty("terminalType")) + object.terminalType = options.enums === String ? $root.wm.protobuf.TerminalType[message.terminalType] : message.terminalType; + if (message.romVersion != null && message.hasOwnProperty("romVersion")) + object.romVersion = message.romVersion; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + if (message.lineType != null && message.hasOwnProperty("lineType")) + object.lineType = options.enums === String ? $root.wm.protobuf.LineType[message.lineType] : message.lineType; + if (message.shopName != null && message.hasOwnProperty("shopName")) + object.shopName = message.shopName; + if (message.shopNickname != null && message.hasOwnProperty("shopNickname")) + object.shopNickname = message.shopNickname; + if (message.allnetPlaceId != null && message.hasOwnProperty("allnetPlaceId")) + object.allnetPlaceId = message.allnetPlaceId; + if (message.allnetRegion0 != null && message.hasOwnProperty("allnetRegion0")) + object.allnetRegion0 = message.allnetRegion0; + if (message.muchaPlaceId != null && message.hasOwnProperty("muchaPlaceId")) + object.muchaPlaceId = message.muchaPlaceId; + if (message.muchaPrefectureId != null && message.hasOwnProperty("muchaPrefectureId")) + object.muchaPrefectureId = message.muchaPrefectureId; + if (message.regionName0 != null && message.hasOwnProperty("regionName0")) + object.regionName0 = message.regionName0; + if (message.regionName1 != null && message.hasOwnProperty("regionName1")) + object.regionName1 = message.regionName1; + if (message.regionName2 != null && message.hasOwnProperty("regionName2")) + object.regionName2 = message.regionName2; + if (message.regionName3 != null && message.hasOwnProperty("regionName3")) + object.regionName3 = message.regionName3; + if (message.timezoneOffset != null && message.hasOwnProperty("timezoneOffset")) + object.timezoneOffset = message.timezoneOffset; + if (message.systemSetting != null && message.hasOwnProperty("systemSetting")) + object.systemSetting = $root.wm.protobuf.SystemSetting.toObject(message.systemSetting, options); + if (message.errorLogs && message.errorLogs.length) { + object.errorLogs = []; + for (let j = 0; j < message.errorLogs.length; ++j) + object.errorLogs[j] = $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.toObject(message.errorLogs[j], options); + } + return object; + }; + + /** + * Converts this RegisterSystemInfoRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemInfoRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemInfoRequest"; + }; + + RegisterSystemInfoRequest.ErrorLogEntry = (function() { + + /** + * Properties of an ErrorLogEntry. + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @interface IErrorLogEntry + * @property {number} datetime ErrorLogEntry datetime + * @property {string} message ErrorLogEntry message + */ + + /** + * Constructs a new ErrorLogEntry. + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @classdesc Represents an ErrorLogEntry. + * @implements IErrorLogEntry + * @constructor + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry=} [properties] Properties to set + */ + function ErrorLogEntry(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorLogEntry datetime. + * @member {number} datetime + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @instance + */ + ErrorLogEntry.prototype.datetime = 0; + + /** + * ErrorLogEntry message. + * @member {string} message + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @instance + */ + ErrorLogEntry.prototype.message = ""; + + /** + * Creates a new ErrorLogEntry instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry instance + */ + ErrorLogEntry.create = function create(properties) { + return new ErrorLogEntry(properties); + }; + + /** + * Encodes the specified ErrorLogEntry message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry} message ErrorLogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorLogEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.datetime); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + return writer; + }; + + /** + * Encodes the specified ErrorLogEntry message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry} message ErrorLogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorLogEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorLogEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datetime = reader.uint32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("datetime")) + throw $util.ProtocolError("missing required 'datetime'", { instance: message }); + if (!message.hasOwnProperty("message")) + throw $util.ProtocolError("missing required 'message'", { instance: message }); + return message; + }; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorLogEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorLogEntry message. + * @function verify + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorLogEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.datetime)) + return "datetime: integer expected"; + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates an ErrorLogEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry + */ + ErrorLogEntry.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry) + return object; + let message = new $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry(); + if (object.datetime != null) + message.datetime = object.datetime >>> 0; + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from an ErrorLogEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} message ErrorLogEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorLogEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.datetime = 0; + object.message = ""; + } + if (message.datetime != null && message.hasOwnProperty("datetime")) + object.datetime = message.datetime; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this ErrorLogEntry to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @instance + * @returns {Object.} JSON object + */ + ErrorLogEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorLogEntry + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorLogEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry"; + }; + + return ErrorLogEntry; + })(); + + return RegisterSystemInfoRequest; + })(); + + protobuf.RegisterSystemInfoResponse = (function() { + + /** + * Properties of a RegisterSystemInfoResponse. + * @memberof wm.protobuf + * @interface IRegisterSystemInfoResponse + * @property {wm.protobuf.ErrorCode} error RegisterSystemInfoResponse error + * @property {number} regionId RegisterSystemInfoResponse regionId + * @property {string} placeId RegisterSystemInfoResponse placeId + * @property {Array.|null} [allowedClientLogTypes] RegisterSystemInfoResponse allowedClientLogTypes + * @property {wm.protobuf.IGameFeatureVersion} featureVersion RegisterSystemInfoResponse featureVersion + * @property {number|null} [latestCompetitionId] RegisterSystemInfoResponse latestCompetitionId + * @property {wm.protobuf.IGhostCompetitionSchedule|null} [competitionSchedule] RegisterSystemInfoResponse competitionSchedule + * @property {string|null} [scratchNotes] RegisterSystemInfoResponse scratchNotes + * @property {wm.protobuf.IInviteFriendCampaignSchedule|null} [inviteFriendCampaignSchedule] RegisterSystemInfoResponse inviteFriendCampaignSchedule + * @property {number} ghostSelectionMinRedoWait RegisterSystemInfoResponse ghostSelectionMinRedoWait + * @property {number} ghostSelectionMaxRedoWait RegisterSystemInfoResponse ghostSelectionMaxRedoWait + */ + + /** + * Constructs a new RegisterSystemInfoResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemInfoResponse. + * @implements IRegisterSystemInfoResponse + * @constructor + * @param {wm.protobuf.IRegisterSystemInfoResponse=} [properties] Properties to set + */ + function RegisterSystemInfoResponse(properties) { + this.allowedClientLogTypes = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemInfoResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.error = 0; + + /** + * RegisterSystemInfoResponse regionId. + * @member {number} regionId + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.regionId = 0; + + /** + * RegisterSystemInfoResponse placeId. + * @member {string} placeId + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.placeId = ""; + + /** + * RegisterSystemInfoResponse allowedClientLogTypes. + * @member {Array.} allowedClientLogTypes + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.allowedClientLogTypes = $util.emptyArray; + + /** + * RegisterSystemInfoResponse featureVersion. + * @member {wm.protobuf.IGameFeatureVersion} featureVersion + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.featureVersion = null; + + /** + * RegisterSystemInfoResponse latestCompetitionId. + * @member {number} latestCompetitionId + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.latestCompetitionId = 0; + + /** + * RegisterSystemInfoResponse competitionSchedule. + * @member {wm.protobuf.IGhostCompetitionSchedule|null|undefined} competitionSchedule + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.competitionSchedule = null; + + /** + * RegisterSystemInfoResponse scratchNotes. + * @member {string} scratchNotes + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.scratchNotes = ""; + + /** + * RegisterSystemInfoResponse inviteFriendCampaignSchedule. + * @member {wm.protobuf.IInviteFriendCampaignSchedule|null|undefined} inviteFriendCampaignSchedule + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.inviteFriendCampaignSchedule = null; + + /** + * RegisterSystemInfoResponse ghostSelectionMinRedoWait. + * @member {number} ghostSelectionMinRedoWait + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.ghostSelectionMinRedoWait = 0; + + /** + * RegisterSystemInfoResponse ghostSelectionMaxRedoWait. + * @member {number} ghostSelectionMaxRedoWait + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.ghostSelectionMaxRedoWait = 0; + + /** + * Creates a new RegisterSystemInfoResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.IRegisterSystemInfoResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse instance + */ + RegisterSystemInfoResponse.create = function create(properties) { + return new RegisterSystemInfoResponse(properties); + }; + + /** + * Encodes the specified RegisterSystemInfoResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.IRegisterSystemInfoResponse} message RegisterSystemInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.regionId); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.placeId); + if (message.allowedClientLogTypes != null && message.allowedClientLogTypes.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (let i = 0; i < message.allowedClientLogTypes.length; ++i) + writer.int32(message.allowedClientLogTypes[i]); + writer.ldelim(); + } + $root.wm.protobuf.GameFeatureVersion.encode(message.featureVersion, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.latestCompetitionId != null && Object.hasOwnProperty.call(message, "latestCompetitionId")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.latestCompetitionId); + if (message.competitionSchedule != null && Object.hasOwnProperty.call(message, "competitionSchedule")) + $root.wm.protobuf.GhostCompetitionSchedule.encode(message.competitionSchedule, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.scratchNotes != null && Object.hasOwnProperty.call(message, "scratchNotes")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.scratchNotes); + if (message.inviteFriendCampaignSchedule != null && Object.hasOwnProperty.call(message, "inviteFriendCampaignSchedule")) + $root.wm.protobuf.InviteFriendCampaignSchedule.encode(message.inviteFriendCampaignSchedule, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.ghostSelectionMinRedoWait); + writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.ghostSelectionMaxRedoWait); + return writer; + }; + + /** + * Encodes the specified RegisterSystemInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.IRegisterSystemInfoResponse} message RegisterSystemInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.regionId = reader.uint32(); + break; + } + case 3: { + message.placeId = reader.string(); + break; + } + case 4: { + if (!(message.allowedClientLogTypes && message.allowedClientLogTypes.length)) + message.allowedClientLogTypes = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.allowedClientLogTypes.push(reader.int32()); + } else + message.allowedClientLogTypes.push(reader.int32()); + break; + } + case 10: { + message.featureVersion = $root.wm.protobuf.GameFeatureVersion.decode(reader, reader.uint32()); + break; + } + case 11: { + message.latestCompetitionId = reader.uint32(); + break; + } + case 12: { + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.decode(reader, reader.uint32()); + break; + } + case 19: { + message.scratchNotes = reader.string(); + break; + } + case 27: { + message.inviteFriendCampaignSchedule = $root.wm.protobuf.InviteFriendCampaignSchedule.decode(reader, reader.uint32()); + break; + } + case 28: { + message.ghostSelectionMinRedoWait = reader.uint32(); + break; + } + case 29: { + message.ghostSelectionMaxRedoWait = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("regionId")) + throw $util.ProtocolError("missing required 'regionId'", { instance: message }); + if (!message.hasOwnProperty("placeId")) + throw $util.ProtocolError("missing required 'placeId'", { instance: message }); + if (!message.hasOwnProperty("featureVersion")) + throw $util.ProtocolError("missing required 'featureVersion'", { instance: message }); + if (!message.hasOwnProperty("ghostSelectionMinRedoWait")) + throw $util.ProtocolError("missing required 'ghostSelectionMinRedoWait'", { instance: message }); + if (!message.hasOwnProperty("ghostSelectionMaxRedoWait")) + throw $util.ProtocolError("missing required 'ghostSelectionMaxRedoWait'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemInfoResponse message. + * @function verify + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (!$util.isString(message.placeId)) + return "placeId: string expected"; + if (message.allowedClientLogTypes != null && message.hasOwnProperty("allowedClientLogTypes")) { + if (!Array.isArray(message.allowedClientLogTypes)) + return "allowedClientLogTypes: array expected"; + for (let i = 0; i < message.allowedClientLogTypes.length; ++i) + switch (message.allowedClientLogTypes[i]) { + default: + return "allowedClientLogTypes: enum value[] expected"; + case 0: + case 1: + break; + } + } + { + let error = $root.wm.protobuf.GameFeatureVersion.verify(message.featureVersion); + if (error) + return "featureVersion." + error; + } + if (message.latestCompetitionId != null && message.hasOwnProperty("latestCompetitionId")) + if (!$util.isInteger(message.latestCompetitionId)) + return "latestCompetitionId: integer expected"; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) { + let error = $root.wm.protobuf.GhostCompetitionSchedule.verify(message.competitionSchedule); + if (error) + return "competitionSchedule." + error; + } + if (message.scratchNotes != null && message.hasOwnProperty("scratchNotes")) + if (!$util.isString(message.scratchNotes)) + return "scratchNotes: string expected"; + if (message.inviteFriendCampaignSchedule != null && message.hasOwnProperty("inviteFriendCampaignSchedule")) { + let error = $root.wm.protobuf.InviteFriendCampaignSchedule.verify(message.inviteFriendCampaignSchedule); + if (error) + return "inviteFriendCampaignSchedule." + error; + } + if (!$util.isInteger(message.ghostSelectionMinRedoWait)) + return "ghostSelectionMinRedoWait: integer expected"; + if (!$util.isInteger(message.ghostSelectionMaxRedoWait)) + return "ghostSelectionMaxRedoWait: integer expected"; + return null; + }; + + /** + * Creates a RegisterSystemInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse + */ + RegisterSystemInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemInfoResponse) + return object; + let message = new $root.wm.protobuf.RegisterSystemInfoResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.placeId != null) + message.placeId = String(object.placeId); + if (object.allowedClientLogTypes) { + if (!Array.isArray(object.allowedClientLogTypes)) + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.allowedClientLogTypes: array expected"); + message.allowedClientLogTypes = []; + for (let i = 0; i < object.allowedClientLogTypes.length; ++i) + switch (object.allowedClientLogTypes[i]) { + default: + case "LOG_LOAD_REPORT": + case 0: + message.allowedClientLogTypes[i] = 0; + break; + case "LOG_ERROR": + case 1: + message.allowedClientLogTypes[i] = 1; + break; + } + } + if (object.featureVersion != null) { + if (typeof object.featureVersion !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.featureVersion: object expected"); + message.featureVersion = $root.wm.protobuf.GameFeatureVersion.fromObject(object.featureVersion); + } + if (object.latestCompetitionId != null) + message.latestCompetitionId = object.latestCompetitionId >>> 0; + if (object.competitionSchedule != null) { + if (typeof object.competitionSchedule !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.competitionSchedule: object expected"); + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.fromObject(object.competitionSchedule); + } + if (object.scratchNotes != null) + message.scratchNotes = String(object.scratchNotes); + if (object.inviteFriendCampaignSchedule != null) { + if (typeof object.inviteFriendCampaignSchedule !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.inviteFriendCampaignSchedule: object expected"); + message.inviteFriendCampaignSchedule = $root.wm.protobuf.InviteFriendCampaignSchedule.fromObject(object.inviteFriendCampaignSchedule); + } + if (object.ghostSelectionMinRedoWait != null) + message.ghostSelectionMinRedoWait = object.ghostSelectionMinRedoWait >>> 0; + if (object.ghostSelectionMaxRedoWait != null) + message.ghostSelectionMaxRedoWait = object.ghostSelectionMaxRedoWait >>> 0; + return message; + }; + + /** + * Creates a plain object from a RegisterSystemInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.RegisterSystemInfoResponse} message RegisterSystemInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.allowedClientLogTypes = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.regionId = 0; + object.placeId = ""; + object.featureVersion = null; + object.latestCompetitionId = 0; + object.competitionSchedule = null; + object.scratchNotes = ""; + object.inviteFriendCampaignSchedule = null; + object.ghostSelectionMinRedoWait = 0; + object.ghostSelectionMaxRedoWait = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.placeId != null && message.hasOwnProperty("placeId")) + object.placeId = message.placeId; + if (message.allowedClientLogTypes && message.allowedClientLogTypes.length) { + object.allowedClientLogTypes = []; + for (let j = 0; j < message.allowedClientLogTypes.length; ++j) + object.allowedClientLogTypes[j] = options.enums === String ? $root.wm.protobuf.ClientLogType[message.allowedClientLogTypes[j]] : message.allowedClientLogTypes[j]; + } + if (message.featureVersion != null && message.hasOwnProperty("featureVersion")) + object.featureVersion = $root.wm.protobuf.GameFeatureVersion.toObject(message.featureVersion, options); + if (message.latestCompetitionId != null && message.hasOwnProperty("latestCompetitionId")) + object.latestCompetitionId = message.latestCompetitionId; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) + object.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.toObject(message.competitionSchedule, options); + if (message.scratchNotes != null && message.hasOwnProperty("scratchNotes")) + object.scratchNotes = message.scratchNotes; + if (message.inviteFriendCampaignSchedule != null && message.hasOwnProperty("inviteFriendCampaignSchedule")) + object.inviteFriendCampaignSchedule = $root.wm.protobuf.InviteFriendCampaignSchedule.toObject(message.inviteFriendCampaignSchedule, options); + if (message.ghostSelectionMinRedoWait != null && message.hasOwnProperty("ghostSelectionMinRedoWait")) + object.ghostSelectionMinRedoWait = message.ghostSelectionMinRedoWait; + if (message.ghostSelectionMaxRedoWait != null && message.hasOwnProperty("ghostSelectionMaxRedoWait")) + object.ghostSelectionMaxRedoWait = message.ghostSelectionMaxRedoWait; + return object; + }; + + /** + * Converts this RegisterSystemInfoResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemInfoResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemInfoResponse"; + }; + + return RegisterSystemInfoResponse; + })(); + + protobuf.RegisterSystemStatsRequest = (function() { + + /** + * Properties of a RegisterSystemStatsRequest. + * @memberof wm.protobuf + * @interface IRegisterSystemStatsRequest + * @property {string} pcbSerial RegisterSystemStatsRequest pcbSerial + * @property {wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null} [driveStats] RegisterSystemStatsRequest driveStats + * @property {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null} [terminalStats] RegisterSystemStatsRequest terminalStats + */ + + /** + * Constructs a new RegisterSystemStatsRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemStatsRequest. + * @implements IRegisterSystemStatsRequest + * @constructor + * @param {wm.protobuf.IRegisterSystemStatsRequest=} [properties] Properties to set + */ + function RegisterSystemStatsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemStatsRequest pcbSerial. + * @member {string} pcbSerial + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + */ + RegisterSystemStatsRequest.prototype.pcbSerial = ""; + + /** + * RegisterSystemStatsRequest driveStats. + * @member {wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null|undefined} driveStats + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + */ + RegisterSystemStatsRequest.prototype.driveStats = null; + + /** + * RegisterSystemStatsRequest terminalStats. + * @member {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null|undefined} terminalStats + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + */ + RegisterSystemStatsRequest.prototype.terminalStats = null; + + /** + * Creates a new RegisterSystemStatsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.IRegisterSystemStatsRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest instance + */ + RegisterSystemStatsRequest.create = function create(properties) { + return new RegisterSystemStatsRequest(properties); + }; + + /** + * Encodes the specified RegisterSystemStatsRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.IRegisterSystemStatsRequest} message RegisterSystemStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pcbSerial); + if (message.driveStats != null && Object.hasOwnProperty.call(message, "driveStats")) + $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.encode(message.driveStats, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.terminalStats != null && Object.hasOwnProperty.call(message, "terminalStats")) + $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.encode(message.terminalStats, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RegisterSystemStatsRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.IRegisterSystemStatsRequest} message RegisterSystemStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pcbSerial = reader.string(); + break; + } + case 2: { + message.driveStats = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.decode(reader, reader.uint32()); + break; + } + case 3: { + message.terminalStats = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("pcbSerial")) + throw $util.ProtocolError("missing required 'pcbSerial'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemStatsRequest message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemStatsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.pcbSerial)) + return "pcbSerial: string expected"; + if (message.driveStats != null && message.hasOwnProperty("driveStats")) { + let error = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify(message.driveStats); + if (error) + return "driveStats." + error; + } + if (message.terminalStats != null && message.hasOwnProperty("terminalStats")) { + let error = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify(message.terminalStats); + if (error) + return "terminalStats." + error; + } + return null; + }; + + /** + * Creates a RegisterSystemStatsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest + */ + RegisterSystemStatsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsRequest) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsRequest(); + if (object.pcbSerial != null) + message.pcbSerial = String(object.pcbSerial); + if (object.driveStats != null) { + if (typeof object.driveStats !== "object") + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.driveStats: object expected"); + message.driveStats = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.fromObject(object.driveStats); + } + if (object.terminalStats != null) { + if (typeof object.terminalStats !== "object") + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.terminalStats: object expected"); + message.terminalStats = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.fromObject(object.terminalStats); + } + return message; + }; + + /** + * Creates a plain object from a RegisterSystemStatsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest} message RegisterSystemStatsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemStatsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.pcbSerial = ""; + object.driveStats = null; + object.terminalStats = null; + } + if (message.pcbSerial != null && message.hasOwnProperty("pcbSerial")) + object.pcbSerial = message.pcbSerial; + if (message.driveStats != null && message.hasOwnProperty("driveStats")) + object.driveStats = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.toObject(message.driveStats, options); + if (message.terminalStats != null && message.hasOwnProperty("terminalStats")) + object.terminalStats = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.toObject(message.terminalStats, options); + return object; + }; + + /** + * Converts this RegisterSystemStatsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemStatsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemStatsRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemStatsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsRequest"; + }; + + RegisterSystemStatsRequest.DriveStats = (function() { + + /** + * Properties of a DriveStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @interface IDriveStats + * @property {Array.|null} [operation] DriveStats operation + * @property {Array.|null} [story] DriveStats story + * @property {Array.|null} [versus] DriveStats versus + * @property {Array.|null} [ghost] DriveStats ghost + * @property {Array.|null} [timeAttack] DriveStats timeAttack + * @property {Array.|null} [event] DriveStats event + */ + + /** + * Constructs a new DriveStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @classdesc Represents a DriveStats. + * @implements IDriveStats + * @constructor + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats=} [properties] Properties to set + */ + function DriveStats(properties) { + this.operation = []; + this.story = []; + this.versus = []; + this.ghost = []; + this.timeAttack = []; + this.event = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DriveStats operation. + * @member {Array.} operation + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.operation = $util.emptyArray; + + /** + * DriveStats story. + * @member {Array.} story + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.story = $util.emptyArray; + + /** + * DriveStats versus. + * @member {Array.} versus + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.versus = $util.emptyArray; + + /** + * DriveStats ghost. + * @member {Array.} ghost + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.ghost = $util.emptyArray; + + /** + * DriveStats timeAttack. + * @member {Array.} timeAttack + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.timeAttack = $util.emptyArray; + + /** + * DriveStats event. + * @member {Array.} event + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.event = $util.emptyArray; + + /** + * Creates a new DriveStats instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats instance + */ + DriveStats.create = function create(properties) { + return new DriveStats(properties); + }; + + /** + * Encodes the specified DriveStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats} message DriveStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DriveStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && message.operation.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (let i = 0; i < message.operation.length; ++i) + writer.uint32(message.operation[i]); + writer.ldelim(); + } + if (message.story != null && message.story.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (let i = 0; i < message.story.length; ++i) + writer.uint32(message.story[i]); + writer.ldelim(); + } + if (message.versus != null && message.versus.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (let i = 0; i < message.versus.length; ++i) + writer.uint32(message.versus[i]); + writer.ldelim(); + } + if (message.ghost != null && message.ghost.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (let i = 0; i < message.ghost.length; ++i) + writer.uint32(message.ghost[i]); + writer.ldelim(); + } + if (message.timeAttack != null && message.timeAttack.length) { + writer.uint32(/* id 5, wireType 2 =*/42).fork(); + for (let i = 0; i < message.timeAttack.length; ++i) + writer.uint32(message.timeAttack[i]); + writer.ldelim(); + } + if (message.event != null && message.event.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (let i = 0; i < message.event.length; ++i) + writer.uint32(message.event[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified DriveStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats} message DriveStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DriveStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DriveStats message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DriveStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operation && message.operation.length)) + message.operation = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.operation.push(reader.uint32()); + } else + message.operation.push(reader.uint32()); + break; + } + case 2: { + if (!(message.story && message.story.length)) + message.story = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.story.push(reader.uint32()); + } else + message.story.push(reader.uint32()); + break; + } + case 3: { + if (!(message.versus && message.versus.length)) + message.versus = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.versus.push(reader.uint32()); + } else + message.versus.push(reader.uint32()); + break; + } + case 4: { + if (!(message.ghost && message.ghost.length)) + message.ghost = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.ghost.push(reader.uint32()); + } else + message.ghost.push(reader.uint32()); + break; + } + case 5: { + if (!(message.timeAttack && message.timeAttack.length)) + message.timeAttack = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.timeAttack.push(reader.uint32()); + } else + message.timeAttack.push(reader.uint32()); + break; + } + case 6: { + if (!(message.event && message.event.length)) + message.event = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.event.push(reader.uint32()); + } else + message.event.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DriveStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DriveStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DriveStats message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DriveStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) { + if (!Array.isArray(message.operation)) + return "operation: array expected"; + for (let i = 0; i < message.operation.length; ++i) + if (!$util.isInteger(message.operation[i])) + return "operation: integer[] expected"; + } + if (message.story != null && message.hasOwnProperty("story")) { + if (!Array.isArray(message.story)) + return "story: array expected"; + for (let i = 0; i < message.story.length; ++i) + if (!$util.isInteger(message.story[i])) + return "story: integer[] expected"; + } + if (message.versus != null && message.hasOwnProperty("versus")) { + if (!Array.isArray(message.versus)) + return "versus: array expected"; + for (let i = 0; i < message.versus.length; ++i) + if (!$util.isInteger(message.versus[i])) + return "versus: integer[] expected"; + } + if (message.ghost != null && message.hasOwnProperty("ghost")) { + if (!Array.isArray(message.ghost)) + return "ghost: array expected"; + for (let i = 0; i < message.ghost.length; ++i) + if (!$util.isInteger(message.ghost[i])) + return "ghost: integer[] expected"; + } + if (message.timeAttack != null && message.hasOwnProperty("timeAttack")) { + if (!Array.isArray(message.timeAttack)) + return "timeAttack: array expected"; + for (let i = 0; i < message.timeAttack.length; ++i) + if (!$util.isInteger(message.timeAttack[i])) + return "timeAttack: integer[] expected"; + } + if (message.event != null && message.hasOwnProperty("event")) { + if (!Array.isArray(message.event)) + return "event: array expected"; + for (let i = 0; i < message.event.length; ++i) + if (!$util.isInteger(message.event[i])) + return "event: integer[] expected"; + } + return null; + }; + + /** + * Creates a DriveStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats + */ + DriveStats.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats(); + if (object.operation) { + if (!Array.isArray(object.operation)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.operation: array expected"); + message.operation = []; + for (let i = 0; i < object.operation.length; ++i) + message.operation[i] = object.operation[i] >>> 0; + } + if (object.story) { + if (!Array.isArray(object.story)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.story: array expected"); + message.story = []; + for (let i = 0; i < object.story.length; ++i) + message.story[i] = object.story[i] >>> 0; + } + if (object.versus) { + if (!Array.isArray(object.versus)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.versus: array expected"); + message.versus = []; + for (let i = 0; i < object.versus.length; ++i) + message.versus[i] = object.versus[i] >>> 0; + } + if (object.ghost) { + if (!Array.isArray(object.ghost)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.ghost: array expected"); + message.ghost = []; + for (let i = 0; i < object.ghost.length; ++i) + message.ghost[i] = object.ghost[i] >>> 0; + } + if (object.timeAttack) { + if (!Array.isArray(object.timeAttack)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.timeAttack: array expected"); + message.timeAttack = []; + for (let i = 0; i < object.timeAttack.length; ++i) + message.timeAttack[i] = object.timeAttack[i] >>> 0; + } + if (object.event) { + if (!Array.isArray(object.event)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.event: array expected"); + message.event = []; + for (let i = 0; i < object.event.length; ++i) + message.event[i] = object.event[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a DriveStats message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.DriveStats} message DriveStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DriveStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.operation = []; + object.story = []; + object.versus = []; + object.ghost = []; + object.timeAttack = []; + object.event = []; + } + if (message.operation && message.operation.length) { + object.operation = []; + for (let j = 0; j < message.operation.length; ++j) + object.operation[j] = message.operation[j]; + } + if (message.story && message.story.length) { + object.story = []; + for (let j = 0; j < message.story.length; ++j) + object.story[j] = message.story[j]; + } + if (message.versus && message.versus.length) { + object.versus = []; + for (let j = 0; j < message.versus.length; ++j) + object.versus[j] = message.versus[j]; + } + if (message.ghost && message.ghost.length) { + object.ghost = []; + for (let j = 0; j < message.ghost.length; ++j) + object.ghost[j] = message.ghost[j]; + } + if (message.timeAttack && message.timeAttack.length) { + object.timeAttack = []; + for (let j = 0; j < message.timeAttack.length; ++j) + object.timeAttack[j] = message.timeAttack[j]; + } + if (message.event && message.event.length) { + object.event = []; + for (let j = 0; j < message.event.length; ++j) + object.event[j] = message.event[j]; + } + return object; + }; + + /** + * Converts this DriveStats to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + * @returns {Object.} JSON object + */ + DriveStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DriveStats + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DriveStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsRequest.DriveStats"; + }; + + return DriveStats; + })(); + + RegisterSystemStatsRequest.TerminalStats = (function() { + + /** + * Properties of a TerminalStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @interface ITerminalStats + * @property {Array.|null} [operation] TerminalStats operation + */ + + /** + * Constructs a new TerminalStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @classdesc Represents a TerminalStats. + * @implements ITerminalStats + * @constructor + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats=} [properties] Properties to set + */ + function TerminalStats(properties) { + this.operation = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerminalStats operation. + * @member {Array.} operation + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @instance + */ + TerminalStats.prototype.operation = $util.emptyArray; + + /** + * Creates a new TerminalStats instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats instance + */ + TerminalStats.create = function create(properties) { + return new TerminalStats(properties); + }; + + /** + * Encodes the specified TerminalStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats} message TerminalStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && message.operation.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (let i = 0; i < message.operation.length; ++i) + writer.uint32(message.operation[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified TerminalStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats} message TerminalStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerminalStats message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operation && message.operation.length)) + message.operation = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.operation.push(reader.uint32()); + } else + message.operation.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TerminalStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerminalStats message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerminalStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) { + if (!Array.isArray(message.operation)) + return "operation: array expected"; + for (let i = 0; i < message.operation.length; ++i) + if (!$util.isInteger(message.operation[i])) + return "operation: integer[] expected"; + } + return null; + }; + + /** + * Creates a TerminalStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats + */ + TerminalStats.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats(); + if (object.operation) { + if (!Array.isArray(object.operation)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.TerminalStats.operation: array expected"); + message.operation = []; + for (let i = 0; i < object.operation.length; ++i) + message.operation[i] = object.operation[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a TerminalStats message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} message TerminalStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerminalStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.operation = []; + if (message.operation && message.operation.length) { + object.operation = []; + for (let j = 0; j < message.operation.length; ++j) + object.operation[j] = message.operation[j]; + } + return object; + }; + + /** + * Converts this TerminalStats to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @instance + * @returns {Object.} JSON object + */ + TerminalStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerminalStats + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerminalStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsRequest.TerminalStats"; + }; + + return TerminalStats; + })(); + + return RegisterSystemStatsRequest; + })(); + + protobuf.RegisterSystemStatsResponse = (function() { + + /** + * Properties of a RegisterSystemStatsResponse. + * @memberof wm.protobuf + * @interface IRegisterSystemStatsResponse + * @property {wm.protobuf.ErrorCode} error RegisterSystemStatsResponse error + */ + + /** + * Constructs a new RegisterSystemStatsResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemStatsResponse. + * @implements IRegisterSystemStatsResponse + * @constructor + * @param {wm.protobuf.IRegisterSystemStatsResponse=} [properties] Properties to set + */ + function RegisterSystemStatsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemStatsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @instance + */ + RegisterSystemStatsResponse.prototype.error = 0; + + /** + * Creates a new RegisterSystemStatsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.IRegisterSystemStatsResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse instance + */ + RegisterSystemStatsResponse.create = function create(properties) { + return new RegisterSystemStatsResponse(properties); + }; + + /** + * Encodes the specified RegisterSystemStatsResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.IRegisterSystemStatsResponse} message RegisterSystemStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified RegisterSystemStatsResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.IRegisterSystemStatsResponse} message RegisterSystemStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemStatsResponse message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemStatsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a RegisterSystemStatsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse + */ + RegisterSystemStatsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsResponse) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a RegisterSystemStatsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.RegisterSystemStatsResponse} message RegisterSystemStatsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemStatsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this RegisterSystemStatsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemStatsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemStatsResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemStatsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsResponse"; + }; + + return RegisterSystemStatsResponse; + })(); + + protobuf.RegisterGhostTrailRequest = (function() { + + /** + * Properties of a RegisterGhostTrailRequest. + * @memberof wm.protobuf + * @interface IRegisterGhostTrailRequest + * @property {number|Long} ghostSessionId RegisterGhostTrailRequest ghostSessionId + * @property {wm.protobuf.IGhostCar} ghost RegisterGhostTrailRequest ghost + * @property {Uint8Array} trail RegisterGhostTrailRequest trail + * @property {number|null} [time] RegisterGhostTrailRequest time + * @property {wm.protobuf.IBinaryData|null} [driveData] RegisterGhostTrailRequest driveData + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByArea] RegisterGhostTrailRequest trendBinaryByArea + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByCar] RegisterGhostTrailRequest trendBinaryByCar + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByUser] RegisterGhostTrailRequest trendBinaryByUser + */ + + /** + * Constructs a new RegisterGhostTrailRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterGhostTrailRequest. + * @implements IRegisterGhostTrailRequest + * @constructor + * @param {wm.protobuf.IRegisterGhostTrailRequest=} [properties] Properties to set + */ + function RegisterGhostTrailRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterGhostTrailRequest ghostSessionId. + * @member {number|Long} ghostSessionId + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.ghostSessionId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * RegisterGhostTrailRequest ghost. + * @member {wm.protobuf.IGhostCar} ghost + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.ghost = null; + + /** + * RegisterGhostTrailRequest trail. + * @member {Uint8Array} trail + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trail = $util.newBuffer([]); + + /** + * RegisterGhostTrailRequest time. + * @member {number} time + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.time = 0; + + /** + * RegisterGhostTrailRequest driveData. + * @member {wm.protobuf.IBinaryData|null|undefined} driveData + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.driveData = null; + + /** + * RegisterGhostTrailRequest trendBinaryByArea. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByArea + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trendBinaryByArea = null; + + /** + * RegisterGhostTrailRequest trendBinaryByCar. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByCar + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trendBinaryByCar = null; + + /** + * RegisterGhostTrailRequest trendBinaryByUser. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByUser + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trendBinaryByUser = null; + + /** + * Creates a new RegisterGhostTrailRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.IRegisterGhostTrailRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest instance + */ + RegisterGhostTrailRequest.create = function create(properties) { + return new RegisterGhostTrailRequest(properties); + }; + + /** + * Encodes the specified RegisterGhostTrailRequest message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.IRegisterGhostTrailRequest} message RegisterGhostTrailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.ghostSessionId); + $root.wm.protobuf.GhostCar.encode(message.ghost, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.trail); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time); + if (message.driveData != null && Object.hasOwnProperty.call(message, "driveData")) + $root.wm.protobuf.BinaryData.encode(message.driveData, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.trendBinaryByArea != null && Object.hasOwnProperty.call(message, "trendBinaryByArea")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByArea, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.trendBinaryByCar != null && Object.hasOwnProperty.call(message, "trendBinaryByCar")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByCar, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.trendBinaryByUser != null && Object.hasOwnProperty.call(message, "trendBinaryByUser")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByUser, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RegisterGhostTrailRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.IRegisterGhostTrailRequest} message RegisterGhostTrailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterGhostTrailRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ghostSessionId = reader.uint64(); + break; + } + case 2: { + message.ghost = $root.wm.protobuf.GhostCar.decode(reader, reader.uint32()); + break; + } + case 3: { + message.trail = reader.bytes(); + break; + } + case 4: { + message.time = reader.uint32(); + break; + } + case 5: { + message.driveData = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 6: { + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 7: { + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 8: { + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("ghostSessionId")) + throw $util.ProtocolError("missing required 'ghostSessionId'", { instance: message }); + if (!message.hasOwnProperty("ghost")) + throw $util.ProtocolError("missing required 'ghost'", { instance: message }); + if (!message.hasOwnProperty("trail")) + throw $util.ProtocolError("missing required 'trail'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterGhostTrailRequest message. + * @function verify + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterGhostTrailRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.ghostSessionId) && !(message.ghostSessionId && $util.isInteger(message.ghostSessionId.low) && $util.isInteger(message.ghostSessionId.high))) + return "ghostSessionId: integer|Long expected"; + { + let error = $root.wm.protobuf.GhostCar.verify(message.ghost); + if (error) + return "ghost." + error; + } + if (!(message.trail && typeof message.trail.length === "number" || $util.isString(message.trail))) + return "trail: buffer expected"; + if (message.time != null && message.hasOwnProperty("time")) + if (!$util.isInteger(message.time)) + return "time: integer expected"; + if (message.driveData != null && message.hasOwnProperty("driveData")) { + let error = $root.wm.protobuf.BinaryData.verify(message.driveData); + if (error) + return "driveData." + error; + } + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByArea); + if (error) + return "trendBinaryByArea." + error; + } + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByCar); + if (error) + return "trendBinaryByCar." + error; + } + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByUser); + if (error) + return "trendBinaryByUser." + error; + } + return null; + }; + + /** + * Creates a RegisterGhostTrailRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest + */ + RegisterGhostTrailRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterGhostTrailRequest) + return object; + let message = new $root.wm.protobuf.RegisterGhostTrailRequest(); + if (object.ghostSessionId != null) + if ($util.Long) + (message.ghostSessionId = $util.Long.fromValue(object.ghostSessionId)).unsigned = true; + else if (typeof object.ghostSessionId === "string") + message.ghostSessionId = parseInt(object.ghostSessionId, 10); + else if (typeof object.ghostSessionId === "number") + message.ghostSessionId = object.ghostSessionId; + else if (typeof object.ghostSessionId === "object") + message.ghostSessionId = new $util.LongBits(object.ghostSessionId.low >>> 0, object.ghostSessionId.high >>> 0).toNumber(true); + if (object.ghost != null) { + if (typeof object.ghost !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.ghost: object expected"); + message.ghost = $root.wm.protobuf.GhostCar.fromObject(object.ghost); + } + if (object.trail != null) + if (typeof object.trail === "string") + $util.base64.decode(object.trail, message.trail = $util.newBuffer($util.base64.length(object.trail)), 0); + else if (object.trail.length >= 0) + message.trail = object.trail; + if (object.time != null) + message.time = object.time >>> 0; + if (object.driveData != null) { + if (typeof object.driveData !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.driveData: object expected"); + message.driveData = $root.wm.protobuf.BinaryData.fromObject(object.driveData); + } + if (object.trendBinaryByArea != null) { + if (typeof object.trendBinaryByArea !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.trendBinaryByArea: object expected"); + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByArea); + } + if (object.trendBinaryByCar != null) { + if (typeof object.trendBinaryByCar !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.trendBinaryByCar: object expected"); + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByCar); + } + if (object.trendBinaryByUser != null) { + if (typeof object.trendBinaryByUser !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.trendBinaryByUser: object expected"); + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByUser); + } + return message; + }; + + /** + * Creates a plain object from a RegisterGhostTrailRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.RegisterGhostTrailRequest} message RegisterGhostTrailRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterGhostTrailRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.ghostSessionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ghostSessionId = options.longs === String ? "0" : 0; + object.ghost = null; + if (options.bytes === String) + object.trail = ""; + else { + object.trail = []; + if (options.bytes !== Array) + object.trail = $util.newBuffer(object.trail); + } + object.time = 0; + object.driveData = null; + object.trendBinaryByArea = null; + object.trendBinaryByCar = null; + object.trendBinaryByUser = null; + } + if (message.ghostSessionId != null && message.hasOwnProperty("ghostSessionId")) + if (typeof message.ghostSessionId === "number") + object.ghostSessionId = options.longs === String ? String(message.ghostSessionId) : message.ghostSessionId; + else + object.ghostSessionId = options.longs === String ? $util.Long.prototype.toString.call(message.ghostSessionId) : options.longs === Number ? new $util.LongBits(message.ghostSessionId.low >>> 0, message.ghostSessionId.high >>> 0).toNumber(true) : message.ghostSessionId; + if (message.ghost != null && message.hasOwnProperty("ghost")) + object.ghost = $root.wm.protobuf.GhostCar.toObject(message.ghost, options); + if (message.trail != null && message.hasOwnProperty("trail")) + object.trail = options.bytes === String ? $util.base64.encode(message.trail, 0, message.trail.length) : options.bytes === Array ? Array.prototype.slice.call(message.trail) : message.trail; + if (message.time != null && message.hasOwnProperty("time")) + object.time = message.time; + if (message.driveData != null && message.hasOwnProperty("driveData")) + object.driveData = $root.wm.protobuf.BinaryData.toObject(message.driveData, options); + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) + object.trendBinaryByArea = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByArea, options); + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) + object.trendBinaryByCar = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByCar, options); + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) + object.trendBinaryByUser = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByUser, options); + return object; + }; + + /** + * Converts this RegisterGhostTrailRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterGhostTrailRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterGhostTrailRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterGhostTrailRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterGhostTrailRequest"; + }; + + return RegisterGhostTrailRequest; + })(); + + protobuf.RegisterGhostTrailResponse = (function() { + + /** + * Properties of a RegisterGhostTrailResponse. + * @memberof wm.protobuf + * @interface IRegisterGhostTrailResponse + * @property {wm.protobuf.ErrorCode} error RegisterGhostTrailResponse error + */ + + /** + * Constructs a new RegisterGhostTrailResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterGhostTrailResponse. + * @implements IRegisterGhostTrailResponse + * @constructor + * @param {wm.protobuf.IRegisterGhostTrailResponse=} [properties] Properties to set + */ + function RegisterGhostTrailResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterGhostTrailResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @instance + */ + RegisterGhostTrailResponse.prototype.error = 0; + + /** + * Creates a new RegisterGhostTrailResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.IRegisterGhostTrailResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse instance + */ + RegisterGhostTrailResponse.create = function create(properties) { + return new RegisterGhostTrailResponse(properties); + }; + + /** + * Encodes the specified RegisterGhostTrailResponse message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.IRegisterGhostTrailResponse} message RegisterGhostTrailResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified RegisterGhostTrailResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.IRegisterGhostTrailResponse} message RegisterGhostTrailResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterGhostTrailResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterGhostTrailResponse message. + * @function verify + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterGhostTrailResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a RegisterGhostTrailResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse + */ + RegisterGhostTrailResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterGhostTrailResponse) + return object; + let message = new $root.wm.protobuf.RegisterGhostTrailResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a RegisterGhostTrailResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.RegisterGhostTrailResponse} message RegisterGhostTrailResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterGhostTrailResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this RegisterGhostTrailResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterGhostTrailResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterGhostTrailResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterGhostTrailResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterGhostTrailResponse"; + }; + + return RegisterGhostTrailResponse; + })(); + + protobuf.LoadUserRequest = (function() { + + /** + * Properties of a LoadUserRequest. + * @memberof wm.protobuf + * @interface ILoadUserRequest + * @property {string|null} [cardChipId] LoadUserRequest cardChipId + * @property {string|null} [accessCode] LoadUserRequest accessCode + * @property {number|null} [cardTypeCode] LoadUserRequest cardTypeCode + * @property {number|null} [cardRegionCode] LoadUserRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] LoadUserRequest device + * @property {number|null} [userId] LoadUserRequest userId + * @property {number} romVersion LoadUserRequest romVersion + * @property {number} maxCars LoadUserRequest maxCars + * @property {boolean|null} [createUser] LoadUserRequest createUser + */ + + /** + * Constructs a new LoadUserRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadUserRequest. + * @implements ILoadUserRequest + * @constructor + * @param {wm.protobuf.ILoadUserRequest=} [properties] Properties to set + */ + function LoadUserRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUserRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.cardChipId = ""; + + /** + * LoadUserRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.accessCode = ""; + + /** + * LoadUserRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.cardTypeCode = 0; + + /** + * LoadUserRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.cardRegionCode = 0; + + /** + * LoadUserRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.device = 0; + + /** + * LoadUserRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.userId = 0; + + /** + * LoadUserRequest romVersion. + * @member {number} romVersion + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.romVersion = 0; + + /** + * LoadUserRequest maxCars. + * @member {number} maxCars + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.maxCars = 0; + + /** + * LoadUserRequest createUser. + * @member {boolean} createUser + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.createUser = false; + + /** + * Creates a new LoadUserRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.ILoadUserRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest instance + */ + LoadUserRequest.create = function create(properties) { + return new LoadUserRequest(properties); + }; + + /** + * Encodes the specified LoadUserRequest message. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.ILoadUserRequest} message LoadUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.device); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.userId); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.romVersion); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.maxCars); + if (message.createUser != null && Object.hasOwnProperty.call(message, "createUser")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.createUser); + return writer; + }; + + /** + * Encodes the specified LoadUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.ILoadUserRequest} message LoadUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUserRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cardChipId = reader.string(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + case 3: { + message.cardTypeCode = reader.uint32(); + break; + } + case 4: { + message.cardRegionCode = reader.uint32(); + break; + } + case 5: { + message.device = reader.int32(); + break; + } + case 6: { + message.userId = reader.uint32(); + break; + } + case 7: { + message.romVersion = reader.uint32(); + break; + } + case 8: { + message.maxCars = reader.uint32(); + break; + } + case 9: { + message.createUser = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("romVersion")) + throw $util.ProtocolError("missing required 'romVersion'", { instance: message }); + if (!message.hasOwnProperty("maxCars")) + throw $util.ProtocolError("missing required 'maxCars'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUserRequest message. + * @function verify + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUserRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.romVersion)) + return "romVersion: integer expected"; + if (!$util.isInteger(message.maxCars)) + return "maxCars: integer expected"; + if (message.createUser != null && message.hasOwnProperty("createUser")) + if (typeof message.createUser !== "boolean") + return "createUser: boolean expected"; + return null; + }; + + /** + * Creates a LoadUserRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest + */ + LoadUserRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUserRequest) + return object; + let message = new $root.wm.protobuf.LoadUserRequest(); + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.romVersion != null) + message.romVersion = object.romVersion >>> 0; + if (object.maxCars != null) + message.maxCars = object.maxCars >>> 0; + if (object.createUser != null) + message.createUser = Boolean(object.createUser); + return message; + }; + + /** + * Creates a plain object from a LoadUserRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.LoadUserRequest} message LoadUserRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUserRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.userId = 0; + object.romVersion = 0; + object.maxCars = 0; + object.createUser = false; + } + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.romVersion != null && message.hasOwnProperty("romVersion")) + object.romVersion = message.romVersion; + if (message.maxCars != null && message.hasOwnProperty("maxCars")) + object.maxCars = message.maxCars; + if (message.createUser != null && message.hasOwnProperty("createUser")) + object.createUser = message.createUser; + return object; + }; + + /** + * Converts this LoadUserRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUserRequest + * @instance + * @returns {Object.} JSON object + */ + LoadUserRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUserRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUserRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUserRequest"; + }; + + return LoadUserRequest; + })(); + + protobuf.LoadUserResponse = (function() { + + /** + * Properties of a LoadUserResponse. + * @memberof wm.protobuf + * @interface ILoadUserResponse + * @property {wm.protobuf.ErrorCode} error LoadUserResponse error + * @property {number|null} [unlockAt] LoadUserResponse unlockAt + * @property {string|null} [accessCode] LoadUserResponse accessCode + * @property {number|null} [banapassportAmId] LoadUserResponse banapassportAmId + * @property {number|null} [mbid] LoadUserResponse mbid + * @property {number|null} [userId] LoadUserResponse userId + * @property {number} numOfOwnedCars LoadUserResponse numOfOwnedCars + * @property {Array.|null} [cars] LoadUserResponse cars + * @property {Array.|null} [carStates] LoadUserResponse carStates + * @property {Array.|null} [unusedCarTickets] LoadUserResponse unusedCarTickets + * @property {Array.|null} [tutorials] LoadUserResponse tutorials + * @property {wm.protobuf.GhostCompetitionParticipantState|null} [competitionUserState] LoadUserResponse competitionUserState + * @property {string|null} [windowStickerString] LoadUserResponse windowStickerString + * @property {number|null} [windowStickerFont] LoadUserResponse windowStickerFont + * @property {wm.protobuf.SmartphoneAppState} spappState LoadUserResponse spappState + * @property {wm.protobuf.TransferState} transferState LoadUserResponse transferState + * @property {number|null} [totalVsStarCount] LoadUserResponse totalVsStarCount + * @property {number|null} [totalVsMedalPoint] LoadUserResponse totalVsMedalPoint + * @property {wm.protobuf.ICopiedCar|null} [copiedCar] LoadUserResponse copiedCar + * @property {boolean|null} [wasCreatedToday] LoadUserResponse wasCreatedToday + * @property {boolean|null} [participatedInInviteFriendCampaign] LoadUserResponse participatedInInviteFriendCampaign + */ + + /** + * Constructs a new LoadUserResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadUserResponse. + * @implements ILoadUserResponse + * @constructor + * @param {wm.protobuf.ILoadUserResponse=} [properties] Properties to set + */ + function LoadUserResponse(properties) { + this.cars = []; + this.carStates = []; + this.unusedCarTickets = []; + this.tutorials = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUserResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.error = 0; + + /** + * LoadUserResponse unlockAt. + * @member {number} unlockAt + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.unlockAt = 0; + + /** + * LoadUserResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.accessCode = ""; + + /** + * LoadUserResponse banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.banapassportAmId = 0; + + /** + * LoadUserResponse mbid. + * @member {number} mbid + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.mbid = 0; + + /** + * LoadUserResponse userId. + * @member {number} userId + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.userId = 0; + + /** + * LoadUserResponse numOfOwnedCars. + * @member {number} numOfOwnedCars + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.numOfOwnedCars = 0; + + /** + * LoadUserResponse cars. + * @member {Array.} cars + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.cars = $util.emptyArray; + + /** + * LoadUserResponse carStates. + * @member {Array.} carStates + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.carStates = $util.emptyArray; + + /** + * LoadUserResponse unusedCarTickets. + * @member {Array.} unusedCarTickets + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.unusedCarTickets = $util.emptyArray; + + /** + * LoadUserResponse tutorials. + * @member {Array.} tutorials + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.tutorials = $util.emptyArray; + + /** + * LoadUserResponse competitionUserState. + * @member {wm.protobuf.GhostCompetitionParticipantState} competitionUserState + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.competitionUserState = 1; + + /** + * LoadUserResponse windowStickerString. + * @member {string} windowStickerString + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.windowStickerString = ""; + + /** + * LoadUserResponse windowStickerFont. + * @member {number} windowStickerFont + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.windowStickerFont = 0; + + /** + * LoadUserResponse spappState. + * @member {wm.protobuf.SmartphoneAppState} spappState + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.spappState = 0; + + /** + * LoadUserResponse transferState. + * @member {wm.protobuf.TransferState} transferState + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.transferState = 0; + + /** + * LoadUserResponse totalVsStarCount. + * @member {number} totalVsStarCount + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.totalVsStarCount = 0; + + /** + * LoadUserResponse totalVsMedalPoint. + * @member {number} totalVsMedalPoint + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.totalVsMedalPoint = 0; + + /** + * LoadUserResponse copiedCar. + * @member {wm.protobuf.ICopiedCar|null|undefined} copiedCar + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.copiedCar = null; + + /** + * LoadUserResponse wasCreatedToday. + * @member {boolean} wasCreatedToday + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.wasCreatedToday = false; + + /** + * LoadUserResponse participatedInInviteFriendCampaign. + * @member {boolean} participatedInInviteFriendCampaign + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.participatedInInviteFriendCampaign = false; + + /** + * Creates a new LoadUserResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.ILoadUserResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse instance + */ + LoadUserResponse.create = function create(properties) { + return new LoadUserResponse(properties); + }; + + /** + * Encodes the specified LoadUserResponse message. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.ILoadUserResponse} message LoadUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.unlockAt != null && Object.hasOwnProperty.call(message, "unlockAt")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.unlockAt); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.accessCode); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.banapassportAmId); + if (message.mbid != null && Object.hasOwnProperty.call(message, "mbid")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.mbid); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.userId); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.numOfOwnedCars); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.Car.encode(message.cars[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.carStates != null && message.carStates.length) + for (let i = 0; i < message.carStates.length; ++i) + $root.wm.protobuf.LoadUserResponse.CarState.encode(message.carStates[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.unusedCarTickets != null && message.unusedCarTickets.length) + for (let i = 0; i < message.unusedCarTickets.length; ++i) + $root.wm.protobuf.UserItem.encode(message.unusedCarTickets[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.tutorials != null && message.tutorials.length) + for (let i = 0; i < message.tutorials.length; ++i) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.tutorials[i]); + if (message.competitionUserState != null && Object.hasOwnProperty.call(message, "competitionUserState")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.competitionUserState); + if (message.windowStickerString != null && Object.hasOwnProperty.call(message, "windowStickerString")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.windowStickerString); + if (message.windowStickerFont != null && Object.hasOwnProperty.call(message, "windowStickerFont")) + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.windowStickerFont); + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.spappState); + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.transferState); + if (message.totalVsStarCount != null && Object.hasOwnProperty.call(message, "totalVsStarCount")) + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.totalVsStarCount); + if (message.totalVsMedalPoint != null && Object.hasOwnProperty.call(message, "totalVsMedalPoint")) + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.totalVsMedalPoint); + if (message.copiedCar != null && Object.hasOwnProperty.call(message, "copiedCar")) + $root.wm.protobuf.CopiedCar.encode(message.copiedCar, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.wasCreatedToday != null && Object.hasOwnProperty.call(message, "wasCreatedToday")) + writer.uint32(/* id 28, wireType 0 =*/224).bool(message.wasCreatedToday); + if (message.participatedInInviteFriendCampaign != null && Object.hasOwnProperty.call(message, "participatedInInviteFriendCampaign")) + writer.uint32(/* id 29, wireType 0 =*/232).bool(message.participatedInInviteFriendCampaign); + return writer; + }; + + /** + * Encodes the specified LoadUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.ILoadUserResponse} message LoadUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUserResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.unlockAt = reader.uint32(); + break; + } + case 3: { + message.accessCode = reader.string(); + break; + } + case 4: { + message.banapassportAmId = reader.uint32(); + break; + } + case 5: { + message.mbid = reader.uint32(); + break; + } + case 6: { + message.userId = reader.uint32(); + break; + } + case 10: { + message.numOfOwnedCars = reader.uint32(); + break; + } + case 11: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + case 12: { + if (!(message.carStates && message.carStates.length)) + message.carStates = []; + message.carStates.push($root.wm.protobuf.LoadUserResponse.CarState.decode(reader, reader.uint32())); + break; + } + case 13: { + if (!(message.unusedCarTickets && message.unusedCarTickets.length)) + message.unusedCarTickets = []; + message.unusedCarTickets.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + case 15: { + if (!(message.tutorials && message.tutorials.length)) + message.tutorials = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.tutorials.push(reader.bool()); + } else + message.tutorials.push(reader.bool()); + break; + } + case 17: { + message.competitionUserState = reader.int32(); + break; + } + case 19: { + message.windowStickerString = reader.string(); + break; + } + case 20: { + message.windowStickerFont = reader.uint32(); + break; + } + case 21: { + message.spappState = reader.int32(); + break; + } + case 22: { + message.transferState = reader.int32(); + break; + } + case 25: { + message.totalVsStarCount = reader.uint32(); + break; + } + case 26: { + message.totalVsMedalPoint = reader.uint32(); + break; + } + case 27: { + message.copiedCar = $root.wm.protobuf.CopiedCar.decode(reader, reader.uint32()); + break; + } + case 28: { + message.wasCreatedToday = reader.bool(); + break; + } + case 29: { + message.participatedInInviteFriendCampaign = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("numOfOwnedCars")) + throw $util.ProtocolError("missing required 'numOfOwnedCars'", { instance: message }); + if (!message.hasOwnProperty("spappState")) + throw $util.ProtocolError("missing required 'spappState'", { instance: message }); + if (!message.hasOwnProperty("transferState")) + throw $util.ProtocolError("missing required 'transferState'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUserResponse message. + * @function verify + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUserResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.unlockAt != null && message.hasOwnProperty("unlockAt")) + if (!$util.isInteger(message.unlockAt)) + return "unlockAt: integer expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.mbid != null && message.hasOwnProperty("mbid")) + if (!$util.isInteger(message.mbid)) + return "mbid: integer expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.numOfOwnedCars)) + return "numOfOwnedCars: integer expected"; + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + if (message.carStates != null && message.hasOwnProperty("carStates")) { + if (!Array.isArray(message.carStates)) + return "carStates: array expected"; + for (let i = 0; i < message.carStates.length; ++i) { + let error = $root.wm.protobuf.LoadUserResponse.CarState.verify(message.carStates[i]); + if (error) + return "carStates." + error; + } + } + if (message.unusedCarTickets != null && message.hasOwnProperty("unusedCarTickets")) { + if (!Array.isArray(message.unusedCarTickets)) + return "unusedCarTickets: array expected"; + for (let i = 0; i < message.unusedCarTickets.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.unusedCarTickets[i]); + if (error) + return "unusedCarTickets." + error; + } + } + if (message.tutorials != null && message.hasOwnProperty("tutorials")) { + if (!Array.isArray(message.tutorials)) + return "tutorials: array expected"; + for (let i = 0; i < message.tutorials.length; ++i) + if (typeof message.tutorials[i] !== "boolean") + return "tutorials: boolean[] expected"; + } + if (message.competitionUserState != null && message.hasOwnProperty("competitionUserState")) + switch (message.competitionUserState) { + default: + return "competitionUserState: enum value expected"; + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + if (!$util.isString(message.windowStickerString)) + return "windowStickerString: string expected"; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + if (!$util.isInteger(message.windowStickerFont)) + return "windowStickerFont: integer expected"; + switch (message.spappState) { + default: + return "spappState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + switch (message.transferState) { + default: + return "transferState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.totalVsStarCount != null && message.hasOwnProperty("totalVsStarCount")) + if (!$util.isInteger(message.totalVsStarCount)) + return "totalVsStarCount: integer expected"; + if (message.totalVsMedalPoint != null && message.hasOwnProperty("totalVsMedalPoint")) + if (!$util.isInteger(message.totalVsMedalPoint)) + return "totalVsMedalPoint: integer expected"; + if (message.copiedCar != null && message.hasOwnProperty("copiedCar")) { + let error = $root.wm.protobuf.CopiedCar.verify(message.copiedCar); + if (error) + return "copiedCar." + error; + } + if (message.wasCreatedToday != null && message.hasOwnProperty("wasCreatedToday")) + if (typeof message.wasCreatedToday !== "boolean") + return "wasCreatedToday: boolean expected"; + if (message.participatedInInviteFriendCampaign != null && message.hasOwnProperty("participatedInInviteFriendCampaign")) + if (typeof message.participatedInInviteFriendCampaign !== "boolean") + return "participatedInInviteFriendCampaign: boolean expected"; + return null; + }; + + /** + * Creates a LoadUserResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse + */ + LoadUserResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUserResponse) + return object; + let message = new $root.wm.protobuf.LoadUserResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.unlockAt != null) + message.unlockAt = object.unlockAt >>> 0; + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.mbid != null) + message.mbid = object.mbid >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.numOfOwnedCars != null) + message.numOfOwnedCars = object.numOfOwnedCars >>> 0; + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.LoadUserResponse.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.cars: object expected"); + message.cars[i] = $root.wm.protobuf.Car.fromObject(object.cars[i]); + } + } + if (object.carStates) { + if (!Array.isArray(object.carStates)) + throw TypeError(".wm.protobuf.LoadUserResponse.carStates: array expected"); + message.carStates = []; + for (let i = 0; i < object.carStates.length; ++i) { + if (typeof object.carStates[i] !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.carStates: object expected"); + message.carStates[i] = $root.wm.protobuf.LoadUserResponse.CarState.fromObject(object.carStates[i]); + } + } + if (object.unusedCarTickets) { + if (!Array.isArray(object.unusedCarTickets)) + throw TypeError(".wm.protobuf.LoadUserResponse.unusedCarTickets: array expected"); + message.unusedCarTickets = []; + for (let i = 0; i < object.unusedCarTickets.length; ++i) { + if (typeof object.unusedCarTickets[i] !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.unusedCarTickets: object expected"); + message.unusedCarTickets[i] = $root.wm.protobuf.UserItem.fromObject(object.unusedCarTickets[i]); + } + } + if (object.tutorials) { + if (!Array.isArray(object.tutorials)) + throw TypeError(".wm.protobuf.LoadUserResponse.tutorials: array expected"); + message.tutorials = []; + for (let i = 0; i < object.tutorials.length; ++i) + message.tutorials[i] = Boolean(object.tutorials[i]); + } + switch (object.competitionUserState) { + case "COMPETITION_NOT_PARTICIPATED": + case 1: + message.competitionUserState = 1; + break; + case "COMPETITION_QUALIFIED": + case 2: + message.competitionUserState = 2; + break; + case "COMPETITION_PARTICIPATED": + case 3: + message.competitionUserState = 3; + break; + case "COMPETITION_WON": + case 4: + message.competitionUserState = 4; + break; + } + if (object.windowStickerString != null) + message.windowStickerString = String(object.windowStickerString); + if (object.windowStickerFont != null) + message.windowStickerFont = object.windowStickerFont >>> 0; + switch (object.spappState) { + case "SPAPP_UNREGISTERED": + case 0: + message.spappState = 0; + break; + case "SPAPP_KTID": + case 1: + message.spappState = 1; + break; + case "SPAPP_BNID": + case 2: + message.spappState = 2; + break; + } + switch (object.transferState) { + case "NOT_REGISTERED": + case 0: + message.transferState = 0; + break; + case "NEW_REGISTRATION": + case 1: + message.transferState = 1; + break; + case "TRANSFER_REQUIRED": + case 2: + message.transferState = 2; + break; + case "TRANSFERRING": + case 3: + message.transferState = 3; + break; + case "TRANSFERRED": + case 4: + message.transferState = 4; + break; + } + if (object.totalVsStarCount != null) + message.totalVsStarCount = object.totalVsStarCount >>> 0; + if (object.totalVsMedalPoint != null) + message.totalVsMedalPoint = object.totalVsMedalPoint >>> 0; + if (object.copiedCar != null) { + if (typeof object.copiedCar !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.copiedCar: object expected"); + message.copiedCar = $root.wm.protobuf.CopiedCar.fromObject(object.copiedCar); + } + if (object.wasCreatedToday != null) + message.wasCreatedToday = Boolean(object.wasCreatedToday); + if (object.participatedInInviteFriendCampaign != null) + message.participatedInInviteFriendCampaign = Boolean(object.participatedInInviteFriendCampaign); + return message; + }; + + /** + * Creates a plain object from a LoadUserResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.LoadUserResponse} message LoadUserResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUserResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.cars = []; + object.carStates = []; + object.unusedCarTickets = []; + object.tutorials = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.unlockAt = 0; + object.accessCode = ""; + object.banapassportAmId = 0; + object.mbid = 0; + object.userId = 0; + object.numOfOwnedCars = 0; + object.competitionUserState = options.enums === String ? "COMPETITION_NOT_PARTICIPATED" : 1; + object.windowStickerString = ""; + object.windowStickerFont = 0; + object.spappState = options.enums === String ? "SPAPP_UNREGISTERED" : 0; + object.transferState = options.enums === String ? "NOT_REGISTERED" : 0; + object.totalVsStarCount = 0; + object.totalVsMedalPoint = 0; + object.copiedCar = null; + object.wasCreatedToday = false; + object.participatedInInviteFriendCampaign = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.unlockAt != null && message.hasOwnProperty("unlockAt")) + object.unlockAt = message.unlockAt; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.mbid != null && message.hasOwnProperty("mbid")) + object.mbid = message.mbid; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.numOfOwnedCars != null && message.hasOwnProperty("numOfOwnedCars")) + object.numOfOwnedCars = message.numOfOwnedCars; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.Car.toObject(message.cars[j], options); + } + if (message.carStates && message.carStates.length) { + object.carStates = []; + for (let j = 0; j < message.carStates.length; ++j) + object.carStates[j] = $root.wm.protobuf.LoadUserResponse.CarState.toObject(message.carStates[j], options); + } + if (message.unusedCarTickets && message.unusedCarTickets.length) { + object.unusedCarTickets = []; + for (let j = 0; j < message.unusedCarTickets.length; ++j) + object.unusedCarTickets[j] = $root.wm.protobuf.UserItem.toObject(message.unusedCarTickets[j], options); + } + if (message.tutorials && message.tutorials.length) { + object.tutorials = []; + for (let j = 0; j < message.tutorials.length; ++j) + object.tutorials[j] = message.tutorials[j]; + } + if (message.competitionUserState != null && message.hasOwnProperty("competitionUserState")) + object.competitionUserState = options.enums === String ? $root.wm.protobuf.GhostCompetitionParticipantState[message.competitionUserState] : message.competitionUserState; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + object.windowStickerString = message.windowStickerString; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + object.windowStickerFont = message.windowStickerFont; + if (message.spappState != null && message.hasOwnProperty("spappState")) + object.spappState = options.enums === String ? $root.wm.protobuf.SmartphoneAppState[message.spappState] : message.spappState; + if (message.transferState != null && message.hasOwnProperty("transferState")) + object.transferState = options.enums === String ? $root.wm.protobuf.TransferState[message.transferState] : message.transferState; + if (message.totalVsStarCount != null && message.hasOwnProperty("totalVsStarCount")) + object.totalVsStarCount = message.totalVsStarCount; + if (message.totalVsMedalPoint != null && message.hasOwnProperty("totalVsMedalPoint")) + object.totalVsMedalPoint = message.totalVsMedalPoint; + if (message.copiedCar != null && message.hasOwnProperty("copiedCar")) + object.copiedCar = $root.wm.protobuf.CopiedCar.toObject(message.copiedCar, options); + if (message.wasCreatedToday != null && message.hasOwnProperty("wasCreatedToday")) + object.wasCreatedToday = message.wasCreatedToday; + if (message.participatedInInviteFriendCampaign != null && message.hasOwnProperty("participatedInInviteFriendCampaign")) + object.participatedInInviteFriendCampaign = message.participatedInInviteFriendCampaign; + return object; + }; + + /** + * Converts this LoadUserResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUserResponse + * @instance + * @returns {Object.} JSON object + */ + LoadUserResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUserResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUserResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUserResponse"; + }; + + LoadUserResponse.CarState = (function() { + + /** + * Properties of a CarState. + * @memberof wm.protobuf.LoadUserResponse + * @interface ICarState + * @property {boolean} hasOpponentGhost CarState hasOpponentGhost + * @property {wm.protobuf.GhostCompetitionParticipantState|null} [competitionState] CarState competitionState + * @property {boolean} toBeDeleted CarState toBeDeleted + * @property {boolean} eventJoined CarState eventJoined + * @property {boolean} transferred CarState transferred + * @property {number|null} [driveLastPlayedAt] CarState driveLastPlayedAt + */ + + /** + * Constructs a new CarState. + * @memberof wm.protobuf.LoadUserResponse + * @classdesc Represents a CarState. + * @implements ICarState + * @constructor + * @param {wm.protobuf.LoadUserResponse.ICarState=} [properties] Properties to set + */ + function CarState(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarState hasOpponentGhost. + * @member {boolean} hasOpponentGhost + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.hasOpponentGhost = false; + + /** + * CarState competitionState. + * @member {wm.protobuf.GhostCompetitionParticipantState} competitionState + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.competitionState = 1; + + /** + * CarState toBeDeleted. + * @member {boolean} toBeDeleted + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.toBeDeleted = false; + + /** + * CarState eventJoined. + * @member {boolean} eventJoined + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.eventJoined = false; + + /** + * CarState transferred. + * @member {boolean} transferred + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.transferred = false; + + /** + * CarState driveLastPlayedAt. + * @member {number} driveLastPlayedAt + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.driveLastPlayedAt = 0; + + /** + * Creates a new CarState instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.ICarState=} [properties] Properties to set + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState instance + */ + CarState.create = function create(properties) { + return new CarState(properties); + }; + + /** + * Encodes the specified CarState message. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.ICarState} message CarState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.hasOpponentGhost); + if (message.competitionState != null && Object.hasOwnProperty.call(message, "competitionState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.competitionState); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.toBeDeleted); + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.eventJoined); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.transferred); + if (message.driveLastPlayedAt != null && Object.hasOwnProperty.call(message, "driveLastPlayedAt")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.driveLastPlayedAt); + return writer; + }; + + /** + * Encodes the specified CarState message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.ICarState} message CarState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarState message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUserResponse.CarState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hasOpponentGhost = reader.bool(); + break; + } + case 2: { + message.competitionState = reader.int32(); + break; + } + case 4: { + message.toBeDeleted = reader.bool(); + break; + } + case 5: { + message.eventJoined = reader.bool(); + break; + } + case 6: { + message.transferred = reader.bool(); + break; + } + case 7: { + message.driveLastPlayedAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("hasOpponentGhost")) + throw $util.ProtocolError("missing required 'hasOpponentGhost'", { instance: message }); + if (!message.hasOwnProperty("toBeDeleted")) + throw $util.ProtocolError("missing required 'toBeDeleted'", { instance: message }); + if (!message.hasOwnProperty("eventJoined")) + throw $util.ProtocolError("missing required 'eventJoined'", { instance: message }); + if (!message.hasOwnProperty("transferred")) + throw $util.ProtocolError("missing required 'transferred'", { instance: message }); + return message; + }; + + /** + * Decodes a CarState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarState message. + * @function verify + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (typeof message.hasOpponentGhost !== "boolean") + return "hasOpponentGhost: boolean expected"; + if (message.competitionState != null && message.hasOwnProperty("competitionState")) + switch (message.competitionState) { + default: + return "competitionState: enum value expected"; + case 1: + case 2: + case 3: + case 4: + break; + } + if (typeof message.toBeDeleted !== "boolean") + return "toBeDeleted: boolean expected"; + if (typeof message.eventJoined !== "boolean") + return "eventJoined: boolean expected"; + if (typeof message.transferred !== "boolean") + return "transferred: boolean expected"; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + if (!$util.isInteger(message.driveLastPlayedAt)) + return "driveLastPlayedAt: integer expected"; + return null; + }; + + /** + * Creates a CarState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState + */ + CarState.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUserResponse.CarState) + return object; + let message = new $root.wm.protobuf.LoadUserResponse.CarState(); + if (object.hasOpponentGhost != null) + message.hasOpponentGhost = Boolean(object.hasOpponentGhost); + switch (object.competitionState) { + case "COMPETITION_NOT_PARTICIPATED": + case 1: + message.competitionState = 1; + break; + case "COMPETITION_QUALIFIED": + case 2: + message.competitionState = 2; + break; + case "COMPETITION_PARTICIPATED": + case 3: + message.competitionState = 3; + break; + case "COMPETITION_WON": + case 4: + message.competitionState = 4; + break; + } + if (object.toBeDeleted != null) + message.toBeDeleted = Boolean(object.toBeDeleted); + if (object.eventJoined != null) + message.eventJoined = Boolean(object.eventJoined); + if (object.transferred != null) + message.transferred = Boolean(object.transferred); + if (object.driveLastPlayedAt != null) + message.driveLastPlayedAt = object.driveLastPlayedAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarState message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.CarState} message CarState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.hasOpponentGhost = false; + object.competitionState = options.enums === String ? "COMPETITION_NOT_PARTICIPATED" : 1; + object.toBeDeleted = false; + object.eventJoined = false; + object.transferred = false; + object.driveLastPlayedAt = 0; + } + if (message.hasOpponentGhost != null && message.hasOwnProperty("hasOpponentGhost")) + object.hasOpponentGhost = message.hasOpponentGhost; + if (message.competitionState != null && message.hasOwnProperty("competitionState")) + object.competitionState = options.enums === String ? $root.wm.protobuf.GhostCompetitionParticipantState[message.competitionState] : message.competitionState; + if (message.toBeDeleted != null && message.hasOwnProperty("toBeDeleted")) + object.toBeDeleted = message.toBeDeleted; + if (message.eventJoined != null && message.hasOwnProperty("eventJoined")) + object.eventJoined = message.eventJoined; + if (message.transferred != null && message.hasOwnProperty("transferred")) + object.transferred = message.transferred; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + object.driveLastPlayedAt = message.driveLastPlayedAt; + return object; + }; + + /** + * Converts this CarState to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + * @returns {Object.} JSON object + */ + CarState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarState + * @function getTypeUrl + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUserResponse.CarState"; + }; + + return CarState; + })(); + + return LoadUserResponse; + })(); + + protobuf.UpdateUserSessionRequest = (function() { + + /** + * Properties of an UpdateUserSessionRequest. + * @memberof wm.protobuf + * @interface IUpdateUserSessionRequest + * @property {number|null} [userId] UpdateUserSessionRequest userId + * @property {string|null} [cardChipId] UpdateUserSessionRequest cardChipId + * @property {string|null} [accessCode] UpdateUserSessionRequest accessCode + * @property {number|null} [cardTypeCode] UpdateUserSessionRequest cardTypeCode + * @property {number|null} [cardRegionCode] UpdateUserSessionRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] UpdateUserSessionRequest device + * @property {number} unlockAt UpdateUserSessionRequest unlockAt + * @property {boolean|null} [acceptVs] UpdateUserSessionRequest acceptVs + */ + + /** + * Constructs a new UpdateUserSessionRequest. + * @memberof wm.protobuf + * @classdesc Represents an UpdateUserSessionRequest. + * @implements IUpdateUserSessionRequest + * @constructor + * @param {wm.protobuf.IUpdateUserSessionRequest=} [properties] Properties to set + */ + function UpdateUserSessionRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserSessionRequest userId. + * @member {number} userId + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.userId = 0; + + /** + * UpdateUserSessionRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.cardChipId = ""; + + /** + * UpdateUserSessionRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.accessCode = ""; + + /** + * UpdateUserSessionRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.cardTypeCode = 0; + + /** + * UpdateUserSessionRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.cardRegionCode = 0; + + /** + * UpdateUserSessionRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.device = 0; + + /** + * UpdateUserSessionRequest unlockAt. + * @member {number} unlockAt + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.unlockAt = 0; + + /** + * UpdateUserSessionRequest acceptVs. + * @member {boolean} acceptVs + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.acceptVs = false; + + /** + * Creates a new UpdateUserSessionRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.IUpdateUserSessionRequest=} [properties] Properties to set + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest instance + */ + UpdateUserSessionRequest.create = function create(properties) { + return new UpdateUserSessionRequest(properties); + }; + + /** + * Encodes the specified UpdateUserSessionRequest message. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.IUpdateUserSessionRequest} message UpdateUserSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.device); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.unlockAt); + if (message.acceptVs != null && Object.hasOwnProperty.call(message, "acceptVs")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.acceptVs); + return writer; + }; + + /** + * Encodes the specified UpdateUserSessionRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.IUpdateUserSessionRequest} message UpdateUserSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateUserSessionRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.cardChipId = reader.string(); + break; + } + case 3: { + message.accessCode = reader.string(); + break; + } + case 4: { + message.cardTypeCode = reader.uint32(); + break; + } + case 5: { + message.cardRegionCode = reader.uint32(); + break; + } + case 6: { + message.device = reader.int32(); + break; + } + case 7: { + message.unlockAt = reader.uint32(); + break; + } + case 8: { + message.acceptVs = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("unlockAt")) + throw $util.ProtocolError("missing required 'unlockAt'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserSessionRequest message. + * @function verify + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserSessionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + if (!$util.isInteger(message.unlockAt)) + return "unlockAt: integer expected"; + if (message.acceptVs != null && message.hasOwnProperty("acceptVs")) + if (typeof message.acceptVs !== "boolean") + return "acceptVs: boolean expected"; + return null; + }; + + /** + * Creates an UpdateUserSessionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest + */ + UpdateUserSessionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateUserSessionRequest) + return object; + let message = new $root.wm.protobuf.UpdateUserSessionRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.unlockAt != null) + message.unlockAt = object.unlockAt >>> 0; + if (object.acceptVs != null) + message.acceptVs = Boolean(object.acceptVs); + return message; + }; + + /** + * Creates a plain object from an UpdateUserSessionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.UpdateUserSessionRequest} message UpdateUserSessionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserSessionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.unlockAt = 0; + object.acceptVs = false; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.unlockAt != null && message.hasOwnProperty("unlockAt")) + object.unlockAt = message.unlockAt; + if (message.acceptVs != null && message.hasOwnProperty("acceptVs")) + object.acceptVs = message.acceptVs; + return object; + }; + + /** + * Converts this UpdateUserSessionRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUserSessionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserSessionRequest + * @function getTypeUrl + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateUserSessionRequest"; + }; + + return UpdateUserSessionRequest; + })(); + + protobuf.UpdateUserSessionResponse = (function() { + + /** + * Properties of an UpdateUserSessionResponse. + * @memberof wm.protobuf + * @interface IUpdateUserSessionResponse + * @property {wm.protobuf.ErrorCode} error UpdateUserSessionResponse error + */ + + /** + * Constructs a new UpdateUserSessionResponse. + * @memberof wm.protobuf + * @classdesc Represents an UpdateUserSessionResponse. + * @implements IUpdateUserSessionResponse + * @constructor + * @param {wm.protobuf.IUpdateUserSessionResponse=} [properties] Properties to set + */ + function UpdateUserSessionResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserSessionResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.UpdateUserSessionResponse + * @instance + */ + UpdateUserSessionResponse.prototype.error = 0; + + /** + * Creates a new UpdateUserSessionResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.IUpdateUserSessionResponse=} [properties] Properties to set + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse instance + */ + UpdateUserSessionResponse.create = function create(properties) { + return new UpdateUserSessionResponse(properties); + }; + + /** + * Encodes the specified UpdateUserSessionResponse message. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.IUpdateUserSessionResponse} message UpdateUserSessionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified UpdateUserSessionResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.IUpdateUserSessionResponse} message UpdateUserSessionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateUserSessionResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserSessionResponse message. + * @function verify + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserSessionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates an UpdateUserSessionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse + */ + UpdateUserSessionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateUserSessionResponse) + return object; + let message = new $root.wm.protobuf.UpdateUserSessionResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from an UpdateUserSessionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.UpdateUserSessionResponse} message UpdateUserSessionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserSessionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this UpdateUserSessionResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateUserSessionResponse + * @instance + * @returns {Object.} JSON object + */ + UpdateUserSessionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserSessionResponse + * @function getTypeUrl + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserSessionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateUserSessionResponse"; + }; + + return UpdateUserSessionResponse; + })(); + + protobuf.LoadDriveInformationRequest = (function() { + + /** + * Properties of a LoadDriveInformationRequest. + * @memberof wm.protobuf + * @interface ILoadDriveInformationRequest + * @property {number|null} [userId] LoadDriveInformationRequest userId + */ + + /** + * Constructs a new LoadDriveInformationRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadDriveInformationRequest. + * @implements ILoadDriveInformationRequest + * @constructor + * @param {wm.protobuf.ILoadDriveInformationRequest=} [properties] Properties to set + */ + function LoadDriveInformationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadDriveInformationRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadDriveInformationRequest + * @instance + */ + LoadDriveInformationRequest.prototype.userId = 0; + + /** + * Creates a new LoadDriveInformationRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.ILoadDriveInformationRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest instance + */ + LoadDriveInformationRequest.create = function create(properties) { + return new LoadDriveInformationRequest(properties); + }; + + /** + * Encodes the specified LoadDriveInformationRequest message. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.ILoadDriveInformationRequest} message LoadDriveInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadDriveInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.ILoadDriveInformationRequest} message LoadDriveInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadDriveInformationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadDriveInformationRequest message. + * @function verify + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadDriveInformationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadDriveInformationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest + */ + LoadDriveInformationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadDriveInformationRequest) + return object; + let message = new $root.wm.protobuf.LoadDriveInformationRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadDriveInformationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.LoadDriveInformationRequest} message LoadDriveInformationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadDriveInformationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadDriveInformationRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadDriveInformationRequest + * @instance + * @returns {Object.} JSON object + */ + LoadDriveInformationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadDriveInformationRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadDriveInformationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadDriveInformationRequest"; + }; + + return LoadDriveInformationRequest; + })(); + + protobuf.LoadDriveInformationResponse = (function() { + + /** + * Properties of a LoadDriveInformationResponse. + * @memberof wm.protobuf + * @interface ILoadDriveInformationResponse + * @property {wm.protobuf.ErrorCode} error LoadDriveInformationResponse error + * @property {Array.|null} [noticeWindow] LoadDriveInformationResponse noticeWindow + * @property {Array.|null} [noticeWindowMessage] LoadDriveInformationResponse noticeWindowMessage + * @property {wm.protobuf.ITransferNotice|null} [transferNotice] LoadDriveInformationResponse transferNotice + * @property {Array.|null} [restrictedModels] LoadDriveInformationResponse restrictedModels + * @property {boolean|null} [announceFeature] LoadDriveInformationResponse announceFeature + * @property {boolean|null} [announceMobile] LoadDriveInformationResponse announceMobile + * @property {Array.|null} [availableTickets] LoadDriveInformationResponse availableTickets + */ + + /** + * Constructs a new LoadDriveInformationResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadDriveInformationResponse. + * @implements ILoadDriveInformationResponse + * @constructor + * @param {wm.protobuf.ILoadDriveInformationResponse=} [properties] Properties to set + */ + function LoadDriveInformationResponse(properties) { + this.noticeWindow = []; + this.noticeWindowMessage = []; + this.restrictedModels = []; + this.availableTickets = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadDriveInformationResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.error = 0; + + /** + * LoadDriveInformationResponse noticeWindow. + * @member {Array.} noticeWindow + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.noticeWindow = $util.emptyArray; + + /** + * LoadDriveInformationResponse noticeWindowMessage. + * @member {Array.} noticeWindowMessage + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.noticeWindowMessage = $util.emptyArray; + + /** + * LoadDriveInformationResponse transferNotice. + * @member {wm.protobuf.ITransferNotice|null|undefined} transferNotice + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.transferNotice = null; + + /** + * LoadDriveInformationResponse restrictedModels. + * @member {Array.} restrictedModels + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.restrictedModels = $util.emptyArray; + + /** + * LoadDriveInformationResponse announceFeature. + * @member {boolean} announceFeature + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.announceFeature = false; + + /** + * LoadDriveInformationResponse announceMobile. + * @member {boolean} announceMobile + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.announceMobile = false; + + /** + * LoadDriveInformationResponse availableTickets. + * @member {Array.} availableTickets + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.availableTickets = $util.emptyArray; + + /** + * Creates a new LoadDriveInformationResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.ILoadDriveInformationResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse instance + */ + LoadDriveInformationResponse.create = function create(properties) { + return new LoadDriveInformationResponse(properties); + }; + + /** + * Encodes the specified LoadDriveInformationResponse message. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.ILoadDriveInformationResponse} message LoadDriveInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.noticeWindow != null && message.noticeWindow.length) + for (let i = 0; i < message.noticeWindow.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.noticeWindow[i]); + if (message.noticeWindowMessage != null && message.noticeWindowMessage.length) + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.noticeWindowMessage[i]); + if (message.transferNotice != null && Object.hasOwnProperty.call(message, "transferNotice")) + $root.wm.protobuf.TransferNotice.encode(message.transferNotice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.restrictedModels != null && message.restrictedModels.length) + for (let i = 0; i < message.restrictedModels.length; ++i) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.restrictedModels[i]); + if (message.announceFeature != null && Object.hasOwnProperty.call(message, "announceFeature")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.announceFeature); + if (message.announceMobile != null && Object.hasOwnProperty.call(message, "announceMobile")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.announceMobile); + if (message.availableTickets != null && message.availableTickets.length) + for (let i = 0; i < message.availableTickets.length; ++i) + $root.wm.protobuf.UserItem.encode(message.availableTickets[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadDriveInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.ILoadDriveInformationResponse} message LoadDriveInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadDriveInformationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.noticeWindow && message.noticeWindow.length)) + message.noticeWindow = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.noticeWindow.push(reader.int32()); + } else + message.noticeWindow.push(reader.int32()); + break; + } + case 3: { + if (!(message.noticeWindowMessage && message.noticeWindowMessage.length)) + message.noticeWindowMessage = []; + message.noticeWindowMessage.push(reader.string()); + break; + } + case 4: { + message.transferNotice = $root.wm.protobuf.TransferNotice.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.restrictedModels && message.restrictedModels.length)) + message.restrictedModels = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedModels.push(reader.uint32()); + } else + message.restrictedModels.push(reader.uint32()); + break; + } + case 7: { + message.announceFeature = reader.bool(); + break; + } + case 8: { + message.announceMobile = reader.bool(); + break; + } + case 9: { + if (!(message.availableTickets && message.availableTickets.length)) + message.availableTickets = []; + message.availableTickets.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadDriveInformationResponse message. + * @function verify + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadDriveInformationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.noticeWindow != null && message.hasOwnProperty("noticeWindow")) { + if (!Array.isArray(message.noticeWindow)) + return "noticeWindow: array expected"; + for (let i = 0; i < message.noticeWindow.length; ++i) + switch (message.noticeWindow[i]) { + default: + return "noticeWindow: enum value[] expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + } + if (message.noticeWindowMessage != null && message.hasOwnProperty("noticeWindowMessage")) { + if (!Array.isArray(message.noticeWindowMessage)) + return "noticeWindowMessage: array expected"; + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + if (!$util.isString(message.noticeWindowMessage[i])) + return "noticeWindowMessage: string[] expected"; + } + if (message.transferNotice != null && message.hasOwnProperty("transferNotice")) { + let error = $root.wm.protobuf.TransferNotice.verify(message.transferNotice); + if (error) + return "transferNotice." + error; + } + if (message.restrictedModels != null && message.hasOwnProperty("restrictedModels")) { + if (!Array.isArray(message.restrictedModels)) + return "restrictedModels: array expected"; + for (let i = 0; i < message.restrictedModels.length; ++i) + if (!$util.isInteger(message.restrictedModels[i])) + return "restrictedModels: integer[] expected"; + } + if (message.announceFeature != null && message.hasOwnProperty("announceFeature")) + if (typeof message.announceFeature !== "boolean") + return "announceFeature: boolean expected"; + if (message.announceMobile != null && message.hasOwnProperty("announceMobile")) + if (typeof message.announceMobile !== "boolean") + return "announceMobile: boolean expected"; + if (message.availableTickets != null && message.hasOwnProperty("availableTickets")) { + if (!Array.isArray(message.availableTickets)) + return "availableTickets: array expected"; + for (let i = 0; i < message.availableTickets.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.availableTickets[i]); + if (error) + return "availableTickets." + error; + } + } + return null; + }; + + /** + * Creates a LoadDriveInformationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse + */ + LoadDriveInformationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadDriveInformationResponse) + return object; + let message = new $root.wm.protobuf.LoadDriveInformationResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.noticeWindow) { + if (!Array.isArray(object.noticeWindow)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.noticeWindow: array expected"); + message.noticeWindow = []; + for (let i = 0; i < object.noticeWindow.length; ++i) + switch (object.noticeWindow[i]) { + default: + case "NOTICE_UNUSED_1": + case 1: + message.noticeWindow[i] = 1; + break; + case "NOTICE_UNUSED_2": + case 2: + message.noticeWindow[i] = 2; + break; + case "NOTICE_UNUSED_3": + case 3: + message.noticeWindow[i] = 3; + break; + case "NOTICE_UNUSED_4": + case 4: + message.noticeWindow[i] = 4; + break; + case "NOTICE_UNUSED_5": + case 5: + message.noticeWindow[i] = 5; + break; + case "NOTICE_UNUSED_6": + case 6: + message.noticeWindow[i] = 6; + break; + case "NOTICE_UNUSED_7": + case 7: + message.noticeWindow[i] = 7; + break; + case "NOTICE_UNUSED_8": + case 8: + message.noticeWindow[i] = 8; + break; + case "NOTICE_UNUSED_9": + case 9: + message.noticeWindow[i] = 9; + break; + case "NOTICE_UNUSED_10": + case 10: + message.noticeWindow[i] = 10; + break; + case "NOTICE_UNUSED_11": + case 11: + message.noticeWindow[i] = 11; + break; + case "NOTICE_UNUSED_12": + case 12: + message.noticeWindow[i] = 12; + break; + } + } + if (object.noticeWindowMessage) { + if (!Array.isArray(object.noticeWindowMessage)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.noticeWindowMessage: array expected"); + message.noticeWindowMessage = []; + for (let i = 0; i < object.noticeWindowMessage.length; ++i) + message.noticeWindowMessage[i] = String(object.noticeWindowMessage[i]); + } + if (object.transferNotice != null) { + if (typeof object.transferNotice !== "object") + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.transferNotice: object expected"); + message.transferNotice = $root.wm.protobuf.TransferNotice.fromObject(object.transferNotice); + } + if (object.restrictedModels) { + if (!Array.isArray(object.restrictedModels)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.restrictedModels: array expected"); + message.restrictedModels = []; + for (let i = 0; i < object.restrictedModels.length; ++i) + message.restrictedModels[i] = object.restrictedModels[i] >>> 0; + } + if (object.announceFeature != null) + message.announceFeature = Boolean(object.announceFeature); + if (object.announceMobile != null) + message.announceMobile = Boolean(object.announceMobile); + if (object.availableTickets) { + if (!Array.isArray(object.availableTickets)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.availableTickets: array expected"); + message.availableTickets = []; + for (let i = 0; i < object.availableTickets.length; ++i) { + if (typeof object.availableTickets[i] !== "object") + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.availableTickets: object expected"); + message.availableTickets[i] = $root.wm.protobuf.UserItem.fromObject(object.availableTickets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadDriveInformationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.LoadDriveInformationResponse} message LoadDriveInformationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadDriveInformationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.noticeWindow = []; + object.noticeWindowMessage = []; + object.restrictedModels = []; + object.availableTickets = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.transferNotice = null; + object.announceFeature = false; + object.announceMobile = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.noticeWindow && message.noticeWindow.length) { + object.noticeWindow = []; + for (let j = 0; j < message.noticeWindow.length; ++j) + object.noticeWindow[j] = options.enums === String ? $root.wm.protobuf.NoticeEntry[message.noticeWindow[j]] : message.noticeWindow[j]; + } + if (message.noticeWindowMessage && message.noticeWindowMessage.length) { + object.noticeWindowMessage = []; + for (let j = 0; j < message.noticeWindowMessage.length; ++j) + object.noticeWindowMessage[j] = message.noticeWindowMessage[j]; + } + if (message.transferNotice != null && message.hasOwnProperty("transferNotice")) + object.transferNotice = $root.wm.protobuf.TransferNotice.toObject(message.transferNotice, options); + if (message.restrictedModels && message.restrictedModels.length) { + object.restrictedModels = []; + for (let j = 0; j < message.restrictedModels.length; ++j) + object.restrictedModels[j] = message.restrictedModels[j]; + } + if (message.announceFeature != null && message.hasOwnProperty("announceFeature")) + object.announceFeature = message.announceFeature; + if (message.announceMobile != null && message.hasOwnProperty("announceMobile")) + object.announceMobile = message.announceMobile; + if (message.availableTickets && message.availableTickets.length) { + object.availableTickets = []; + for (let j = 0; j < message.availableTickets.length; ++j) + object.availableTickets[j] = $root.wm.protobuf.UserItem.toObject(message.availableTickets[j], options); + } + return object; + }; + + /** + * Converts this LoadDriveInformationResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + * @returns {Object.} JSON object + */ + LoadDriveInformationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadDriveInformationResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadDriveInformationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadDriveInformationResponse"; + }; + + return LoadDriveInformationResponse; + })(); + + protobuf.LoadCarRequest = (function() { + + /** + * Properties of a LoadCarRequest. + * @memberof wm.protobuf + * @interface ILoadCarRequest + * @property {number} carId LoadCarRequest carId + * @property {boolean|null} [eventMode] LoadCarRequest eventMode + * @property {string|null} [eventModeSerial] LoadCarRequest eventModeSerial + */ + + /** + * Constructs a new LoadCarRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadCarRequest. + * @implements ILoadCarRequest + * @constructor + * @param {wm.protobuf.ILoadCarRequest=} [properties] Properties to set + */ + function LoadCarRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadCarRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadCarRequest + * @instance + */ + LoadCarRequest.prototype.carId = 0; + + /** + * LoadCarRequest eventMode. + * @member {boolean} eventMode + * @memberof wm.protobuf.LoadCarRequest + * @instance + */ + LoadCarRequest.prototype.eventMode = false; + + /** + * LoadCarRequest eventModeSerial. + * @member {string} eventModeSerial + * @memberof wm.protobuf.LoadCarRequest + * @instance + */ + LoadCarRequest.prototype.eventModeSerial = ""; + + /** + * Creates a new LoadCarRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.ILoadCarRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest instance + */ + LoadCarRequest.create = function create(properties) { + return new LoadCarRequest(properties); + }; + + /** + * Encodes the specified LoadCarRequest message. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.ILoadCarRequest} message LoadCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.eventMode != null && Object.hasOwnProperty.call(message, "eventMode")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.eventMode); + if (message.eventModeSerial != null && Object.hasOwnProperty.call(message, "eventModeSerial")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.eventModeSerial); + return writer; + }; + + /** + * Encodes the specified LoadCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.ILoadCarRequest} message LoadCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadCarRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.eventMode = reader.bool(); + break; + } + case 3: { + message.eventModeSerial = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadCarRequest message. + * @function verify + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadCarRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.eventMode != null && message.hasOwnProperty("eventMode")) + if (typeof message.eventMode !== "boolean") + return "eventMode: boolean expected"; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + if (!$util.isString(message.eventModeSerial)) + return "eventModeSerial: string expected"; + return null; + }; + + /** + * Creates a LoadCarRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest + */ + LoadCarRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadCarRequest) + return object; + let message = new $root.wm.protobuf.LoadCarRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.eventMode != null) + message.eventMode = Boolean(object.eventMode); + if (object.eventModeSerial != null) + message.eventModeSerial = String(object.eventModeSerial); + return message; + }; + + /** + * Creates a plain object from a LoadCarRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.LoadCarRequest} message LoadCarRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadCarRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.eventMode = false; + object.eventModeSerial = ""; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.eventMode != null && message.hasOwnProperty("eventMode")) + object.eventMode = message.eventMode; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + object.eventModeSerial = message.eventModeSerial; + return object; + }; + + /** + * Converts this LoadCarRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadCarRequest + * @instance + * @returns {Object.} JSON object + */ + LoadCarRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadCarRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadCarRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadCarRequest"; + }; + + return LoadCarRequest; + })(); + + protobuf.LoadCarResponse = (function() { + + /** + * Properties of a LoadCarResponse. + * @memberof wm.protobuf + * @interface ILoadCarResponse + * @property {wm.protobuf.ErrorCode} error LoadCarResponse error + * @property {wm.protobuf.ICar} car LoadCarResponse car + * @property {number} tuningPoint LoadCarResponse tuningPoint + * @property {number} odometer LoadCarResponse odometer + * @property {number} playCount LoadCarResponse playCount + * @property {boolean} earnedCustomColor LoadCarResponse earnedCustomColor + * @property {wm.protobuf.ICarSetting} setting LoadCarResponse setting + * @property {number} vsPlayCount LoadCarResponse vsPlayCount + * @property {number} vsBurstCount LoadCarResponse vsBurstCount + * @property {number} vsStarCount LoadCarResponse vsStarCount + * @property {number} vsStarCountMax LoadCarResponse vsStarCountMax + * @property {number} vsCoolOrWild LoadCarResponse vsCoolOrWild + * @property {number} vsSmoothOrRough LoadCarResponse vsSmoothOrRough + * @property {number} vsTripleStarMedals LoadCarResponse vsTripleStarMedals + * @property {number} vsDoubleStarMedals LoadCarResponse vsDoubleStarMedals + * @property {number} vsSingleStarMedals LoadCarResponse vsSingleStarMedals + * @property {number} vsPlainMedals LoadCarResponse vsPlainMedals + * @property {number} rgPlayCount LoadCarResponse rgPlayCount + * @property {number} rgWinCount LoadCarResponse rgWinCount + * @property {number} rgTrophy LoadCarResponse rgTrophy + * @property {number} rgPreviousVersionPlayCount LoadCarResponse rgPreviousVersionPlayCount + * @property {number} rgScore LoadCarResponse rgScore + * @property {Array.|null} [rgRegionMapScore] LoadCarResponse rgRegionMapScore + * @property {Array.|null} [rgRegions] LoadCarResponse rgRegions + * @property {number} rgStamp LoadCarResponse rgStamp + * @property {boolean} rgAcquireAllCrowns LoadCarResponse rgAcquireAllCrowns + * @property {number} dressupLevel LoadCarResponse dressupLevel + * @property {number} dressupPoint LoadCarResponse dressupPoint + * @property {number} stPlayCount LoadCarResponse stPlayCount + * @property {number} stClearBits LoadCarResponse stClearBits + * @property {number} stClearDivCount LoadCarResponse stClearDivCount + * @property {number} stClearCount LoadCarResponse stClearCount + * @property {number|Long} stLoseBits LoadCarResponse stLoseBits + * @property {number} stConsecutiveWins LoadCarResponse stConsecutiveWins + * @property {number} stConsecutiveWinsMax LoadCarResponse stConsecutiveWinsMax + * @property {boolean} stCompleted_100Episodes LoadCarResponse stCompleted_100Episodes + * @property {wm.protobuf.IChallengerCar|null} [challenger] LoadCarResponse challenger + * @property {number|null} [challengerReturnCount] LoadCarResponse challengerReturnCount + * @property {number|null} [numOfChallengers] LoadCarResponse numOfChallengers + * @property {wm.protobuf.IGhostCar|null} [opponentGhost] LoadCarResponse opponentGhost + * @property {number|Long|null} [opponentTrailId] LoadCarResponse opponentTrailId + * @property {number|null} [opponentCompetitionId] LoadCarResponse opponentCompetitionId + * @property {wm.protobuf.IGhostCompetitionParameter|null} [competitionParameter] LoadCarResponse competitionParameter + * @property {Array.|null} [specialTitles] LoadCarResponse specialTitles + * @property {Array.|null} [earnedTitles] LoadCarResponse earnedTitles + * @property {Array.|null} [ownedItems] LoadCarResponse ownedItems + * @property {boolean} auraMotifAutoChange LoadCarResponse auraMotifAutoChange + * @property {number} screenshotCount LoadCarResponse screenshotCount + * @property {boolean|null} [announceEventModePrize] LoadCarResponse announceEventModePrize + * @property {boolean} transferred LoadCarResponse transferred + * @property {number|null} [driveLastPlayedAt] LoadCarResponse driveLastPlayedAt + * @property {wm.protobuf.LoadCarResponse.IStoryInsurance|null} [insurance] LoadCarResponse insurance + */ + + /** + * Constructs a new LoadCarResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadCarResponse. + * @implements ILoadCarResponse + * @constructor + * @param {wm.protobuf.ILoadCarResponse=} [properties] Properties to set + */ + function LoadCarResponse(properties) { + this.rgRegionMapScore = []; + this.rgRegions = []; + this.specialTitles = []; + this.earnedTitles = []; + this.ownedItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadCarResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.error = 0; + + /** + * LoadCarResponse car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.car = null; + + /** + * LoadCarResponse tuningPoint. + * @member {number} tuningPoint + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.tuningPoint = 0; + + /** + * LoadCarResponse odometer. + * @member {number} odometer + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.odometer = 0; + + /** + * LoadCarResponse playCount. + * @member {number} playCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.playCount = 0; + + /** + * LoadCarResponse earnedCustomColor. + * @member {boolean} earnedCustomColor + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.earnedCustomColor = false; + + /** + * LoadCarResponse setting. + * @member {wm.protobuf.ICarSetting} setting + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.setting = null; + + /** + * LoadCarResponse vsPlayCount. + * @member {number} vsPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsPlayCount = 0; + + /** + * LoadCarResponse vsBurstCount. + * @member {number} vsBurstCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsBurstCount = 0; + + /** + * LoadCarResponse vsStarCount. + * @member {number} vsStarCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsStarCount = 0; + + /** + * LoadCarResponse vsStarCountMax. + * @member {number} vsStarCountMax + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsStarCountMax = 0; + + /** + * LoadCarResponse vsCoolOrWild. + * @member {number} vsCoolOrWild + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsCoolOrWild = 0; + + /** + * LoadCarResponse vsSmoothOrRough. + * @member {number} vsSmoothOrRough + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsSmoothOrRough = 0; + + /** + * LoadCarResponse vsTripleStarMedals. + * @member {number} vsTripleStarMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsTripleStarMedals = 0; + + /** + * LoadCarResponse vsDoubleStarMedals. + * @member {number} vsDoubleStarMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsDoubleStarMedals = 0; + + /** + * LoadCarResponse vsSingleStarMedals. + * @member {number} vsSingleStarMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsSingleStarMedals = 0; + + /** + * LoadCarResponse vsPlainMedals. + * @member {number} vsPlainMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsPlainMedals = 0; + + /** + * LoadCarResponse rgPlayCount. + * @member {number} rgPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgPlayCount = 0; + + /** + * LoadCarResponse rgWinCount. + * @member {number} rgWinCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgWinCount = 0; + + /** + * LoadCarResponse rgTrophy. + * @member {number} rgTrophy + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgTrophy = 0; + + /** + * LoadCarResponse rgPreviousVersionPlayCount. + * @member {number} rgPreviousVersionPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgPreviousVersionPlayCount = 0; + + /** + * LoadCarResponse rgScore. + * @member {number} rgScore + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgScore = 0; + + /** + * LoadCarResponse rgRegionMapScore. + * @member {Array.} rgRegionMapScore + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgRegionMapScore = $util.emptyArray; + + /** + * LoadCarResponse rgRegions. + * @member {Array.} rgRegions + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgRegions = $util.emptyArray; + + /** + * LoadCarResponse rgStamp. + * @member {number} rgStamp + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgStamp = 0; + + /** + * LoadCarResponse rgAcquireAllCrowns. + * @member {boolean} rgAcquireAllCrowns + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgAcquireAllCrowns = false; + + /** + * LoadCarResponse dressupLevel. + * @member {number} dressupLevel + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.dressupLevel = 0; + + /** + * LoadCarResponse dressupPoint. + * @member {number} dressupPoint + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.dressupPoint = 0; + + /** + * LoadCarResponse stPlayCount. + * @member {number} stPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stPlayCount = 0; + + /** + * LoadCarResponse stClearBits. + * @member {number} stClearBits + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stClearBits = 0; + + /** + * LoadCarResponse stClearDivCount. + * @member {number} stClearDivCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stClearDivCount = 0; + + /** + * LoadCarResponse stClearCount. + * @member {number} stClearCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stClearCount = 0; + + /** + * LoadCarResponse stLoseBits. + * @member {number|Long} stLoseBits + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stLoseBits = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * LoadCarResponse stConsecutiveWins. + * @member {number} stConsecutiveWins + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stConsecutiveWins = 0; + + /** + * LoadCarResponse stConsecutiveWinsMax. + * @member {number} stConsecutiveWinsMax + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stConsecutiveWinsMax = 0; + + /** + * LoadCarResponse stCompleted_100Episodes. + * @member {boolean} stCompleted_100Episodes + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stCompleted_100Episodes = false; + + /** + * LoadCarResponse challenger. + * @member {wm.protobuf.IChallengerCar|null|undefined} challenger + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.challenger = null; + + /** + * LoadCarResponse challengerReturnCount. + * @member {number} challengerReturnCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.challengerReturnCount = 0; + + /** + * LoadCarResponse numOfChallengers. + * @member {number} numOfChallengers + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.numOfChallengers = 0; + + /** + * LoadCarResponse opponentGhost. + * @member {wm.protobuf.IGhostCar|null|undefined} opponentGhost + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.opponentGhost = null; + + /** + * LoadCarResponse opponentTrailId. + * @member {number|Long} opponentTrailId + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.opponentTrailId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * LoadCarResponse opponentCompetitionId. + * @member {number} opponentCompetitionId + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.opponentCompetitionId = 0; + + /** + * LoadCarResponse competitionParameter. + * @member {wm.protobuf.IGhostCompetitionParameter|null|undefined} competitionParameter + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.competitionParameter = null; + + /** + * LoadCarResponse specialTitles. + * @member {Array.} specialTitles + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.specialTitles = $util.emptyArray; + + /** + * LoadCarResponse earnedTitles. + * @member {Array.} earnedTitles + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.earnedTitles = $util.emptyArray; + + /** + * LoadCarResponse ownedItems. + * @member {Array.} ownedItems + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.ownedItems = $util.emptyArray; + + /** + * LoadCarResponse auraMotifAutoChange. + * @member {boolean} auraMotifAutoChange + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.auraMotifAutoChange = false; + + /** + * LoadCarResponse screenshotCount. + * @member {number} screenshotCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.screenshotCount = 0; + + /** + * LoadCarResponse announceEventModePrize. + * @member {boolean} announceEventModePrize + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.announceEventModePrize = false; + + /** + * LoadCarResponse transferred. + * @member {boolean} transferred + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.transferred = false; + + /** + * LoadCarResponse driveLastPlayedAt. + * @member {number} driveLastPlayedAt + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.driveLastPlayedAt = 0; + + /** + * LoadCarResponse insurance. + * @member {wm.protobuf.LoadCarResponse.IStoryInsurance|null|undefined} insurance + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.insurance = null; + + /** + * Creates a new LoadCarResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.ILoadCarResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse instance + */ + LoadCarResponse.create = function create(properties) { + return new LoadCarResponse(properties); + }; + + /** + * Encodes the specified LoadCarResponse message. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.ILoadCarResponse} message LoadCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuningPoint); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.odometer); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.playCount); + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.earnedCustomColor); + $root.wm.protobuf.CarSetting.encode(message.setting, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.vsPlayCount); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.vsBurstCount); + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.vsStarCount); + writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.vsStarCountMax); + writer.uint32(/* id 16, wireType 0 =*/128).sint32(message.vsCoolOrWild); + writer.uint32(/* id 17, wireType 0 =*/136).sint32(message.vsSmoothOrRough); + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.vsTripleStarMedals); + writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.vsDoubleStarMedals); + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.vsSingleStarMedals); + writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.vsPlainMedals); + writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.rgPlayCount); + writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.rgWinCount); + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.rgTrophy); + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.rgScore); + if (message.rgRegionMapScore != null && message.rgRegionMapScore.length) + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.rgRegionMapScore[i]); + writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.rgStamp); + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.dressupLevel); + writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.dressupPoint); + if (message.rgRegions != null && message.rgRegions.length) + for (let i = 0; i < message.rgRegions.length; ++i) + writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.rgRegions[i]); + writer.uint32(/* id 34, wireType 0 =*/272).uint32(message.stPlayCount); + writer.uint32(/* id 35, wireType 0 =*/280).uint32(message.stClearBits); + writer.uint32(/* id 36, wireType 0 =*/288).uint32(message.stClearDivCount); + writer.uint32(/* id 37, wireType 0 =*/296).uint32(message.stClearCount); + writer.uint32(/* id 38, wireType 0 =*/304).uint64(message.stLoseBits); + writer.uint32(/* id 40, wireType 0 =*/320).uint32(message.stConsecutiveWins); + writer.uint32(/* id 41, wireType 0 =*/328).uint32(message.stConsecutiveWinsMax); + if (message.challenger != null && Object.hasOwnProperty.call(message, "challenger")) + $root.wm.protobuf.ChallengerCar.encode(message.challenger, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.challengerReturnCount != null && Object.hasOwnProperty.call(message, "challengerReturnCount")) + writer.uint32(/* id 43, wireType 0 =*/344).uint32(message.challengerReturnCount); + if (message.opponentGhost != null && Object.hasOwnProperty.call(message, "opponentGhost")) + $root.wm.protobuf.GhostCar.encode(message.opponentGhost, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); + if (message.opponentTrailId != null && Object.hasOwnProperty.call(message, "opponentTrailId")) + writer.uint32(/* id 45, wireType 0 =*/360).uint64(message.opponentTrailId); + if (message.opponentCompetitionId != null && Object.hasOwnProperty.call(message, "opponentCompetitionId")) + writer.uint32(/* id 46, wireType 0 =*/368).uint32(message.opponentCompetitionId); + if (message.competitionParameter != null && Object.hasOwnProperty.call(message, "competitionParameter")) + $root.wm.protobuf.GhostCompetitionParameter.encode(message.competitionParameter, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.specialTitles != null && message.specialTitles.length) + for (let i = 0; i < message.specialTitles.length; ++i) + writer.uint32(/* id 48, wireType 2 =*/386).string(message.specialTitles[i]); + if (message.earnedTitles != null && message.earnedTitles.length) + for (let i = 0; i < message.earnedTitles.length; ++i) + writer.uint32(/* id 49, wireType 2 =*/394).string(message.earnedTitles[i]); + if (message.ownedItems != null && message.ownedItems.length) + for (let i = 0; i < message.ownedItems.length; ++i) + $root.wm.protobuf.CarItem.encode(message.ownedItems[i], writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + writer.uint32(/* id 51, wireType 0 =*/408).bool(message.auraMotifAutoChange); + writer.uint32(/* id 53, wireType 0 =*/424).uint32(message.screenshotCount); + if (message.numOfChallengers != null && Object.hasOwnProperty.call(message, "numOfChallengers")) + writer.uint32(/* id 55, wireType 0 =*/440).uint32(message.numOfChallengers); + if (message.announceEventModePrize != null && Object.hasOwnProperty.call(message, "announceEventModePrize")) + writer.uint32(/* id 58, wireType 0 =*/464).bool(message.announceEventModePrize); + writer.uint32(/* id 59, wireType 0 =*/472).bool(message.rgAcquireAllCrowns); + writer.uint32(/* id 60, wireType 0 =*/480).bool(message.transferred); + if (message.driveLastPlayedAt != null && Object.hasOwnProperty.call(message, "driveLastPlayedAt")) + writer.uint32(/* id 61, wireType 0 =*/488).uint32(message.driveLastPlayedAt); + if (message.insurance != null && Object.hasOwnProperty.call(message, "insurance")) + $root.wm.protobuf.LoadCarResponse.StoryInsurance.encode(message.insurance, writer.uint32(/* id 62, wireType 2 =*/498).fork()).ldelim(); + writer.uint32(/* id 63, wireType 0 =*/504).bool(message.stCompleted_100Episodes); + writer.uint32(/* id 64, wireType 0 =*/512).uint32(message.rgPreviousVersionPlayCount); + return writer; + }; + + /** + * Encodes the specified LoadCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.ILoadCarResponse} message LoadCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadCarResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 3: { + message.tuningPoint = reader.uint32(); + break; + } + case 6: { + message.odometer = reader.uint32(); + break; + } + case 7: { + message.playCount = reader.uint32(); + break; + } + case 8: { + message.earnedCustomColor = reader.bool(); + break; + } + case 10: { + message.setting = $root.wm.protobuf.CarSetting.decode(reader, reader.uint32()); + break; + } + case 12: { + message.vsPlayCount = reader.uint32(); + break; + } + case 13: { + message.vsBurstCount = reader.uint32(); + break; + } + case 14: { + message.vsStarCount = reader.uint32(); + break; + } + case 15: { + message.vsStarCountMax = reader.uint32(); + break; + } + case 16: { + message.vsCoolOrWild = reader.sint32(); + break; + } + case 17: { + message.vsSmoothOrRough = reader.sint32(); + break; + } + case 18: { + message.vsTripleStarMedals = reader.uint32(); + break; + } + case 19: { + message.vsDoubleStarMedals = reader.uint32(); + break; + } + case 20: { + message.vsSingleStarMedals = reader.uint32(); + break; + } + case 21: { + message.vsPlainMedals = reader.uint32(); + break; + } + case 22: { + message.rgPlayCount = reader.uint32(); + break; + } + case 23: { + message.rgWinCount = reader.uint32(); + break; + } + case 24: { + message.rgTrophy = reader.uint32(); + break; + } + case 64: { + message.rgPreviousVersionPlayCount = reader.uint32(); + break; + } + case 25: { + message.rgScore = reader.uint32(); + break; + } + case 26: { + if (!(message.rgRegionMapScore && message.rgRegionMapScore.length)) + message.rgRegionMapScore = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegionMapScore.push(reader.uint32()); + } else + message.rgRegionMapScore.push(reader.uint32()); + break; + } + case 30: { + if (!(message.rgRegions && message.rgRegions.length)) + message.rgRegions = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegions.push(reader.uint32()); + } else + message.rgRegions.push(reader.uint32()); + break; + } + case 27: { + message.rgStamp = reader.uint32(); + break; + } + case 59: { + message.rgAcquireAllCrowns = reader.bool(); + break; + } + case 28: { + message.dressupLevel = reader.uint32(); + break; + } + case 29: { + message.dressupPoint = reader.uint32(); + break; + } + case 34: { + message.stPlayCount = reader.uint32(); + break; + } + case 35: { + message.stClearBits = reader.uint32(); + break; + } + case 36: { + message.stClearDivCount = reader.uint32(); + break; + } + case 37: { + message.stClearCount = reader.uint32(); + break; + } + case 38: { + message.stLoseBits = reader.uint64(); + break; + } + case 40: { + message.stConsecutiveWins = reader.uint32(); + break; + } + case 41: { + message.stConsecutiveWinsMax = reader.uint32(); + break; + } + case 63: { + message.stCompleted_100Episodes = reader.bool(); + break; + } + case 42: { + message.challenger = $root.wm.protobuf.ChallengerCar.decode(reader, reader.uint32()); + break; + } + case 43: { + message.challengerReturnCount = reader.uint32(); + break; + } + case 55: { + message.numOfChallengers = reader.uint32(); + break; + } + case 44: { + message.opponentGhost = $root.wm.protobuf.GhostCar.decode(reader, reader.uint32()); + break; + } + case 45: { + message.opponentTrailId = reader.uint64(); + break; + } + case 46: { + message.opponentCompetitionId = reader.uint32(); + break; + } + case 47: { + message.competitionParameter = $root.wm.protobuf.GhostCompetitionParameter.decode(reader, reader.uint32()); + break; + } + case 48: { + if (!(message.specialTitles && message.specialTitles.length)) + message.specialTitles = []; + message.specialTitles.push(reader.string()); + break; + } + case 49: { + if (!(message.earnedTitles && message.earnedTitles.length)) + message.earnedTitles = []; + message.earnedTitles.push(reader.string()); + break; + } + case 50: { + if (!(message.ownedItems && message.ownedItems.length)) + message.ownedItems = []; + message.ownedItems.push($root.wm.protobuf.CarItem.decode(reader, reader.uint32())); + break; + } + case 51: { + message.auraMotifAutoChange = reader.bool(); + break; + } + case 53: { + message.screenshotCount = reader.uint32(); + break; + } + case 58: { + message.announceEventModePrize = reader.bool(); + break; + } + case 60: { + message.transferred = reader.bool(); + break; + } + case 61: { + message.driveLastPlayedAt = reader.uint32(); + break; + } + case 62: { + message.insurance = $root.wm.protobuf.LoadCarResponse.StoryInsurance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("tuningPoint")) + throw $util.ProtocolError("missing required 'tuningPoint'", { instance: message }); + if (!message.hasOwnProperty("odometer")) + throw $util.ProtocolError("missing required 'odometer'", { instance: message }); + if (!message.hasOwnProperty("playCount")) + throw $util.ProtocolError("missing required 'playCount'", { instance: message }); + if (!message.hasOwnProperty("earnedCustomColor")) + throw $util.ProtocolError("missing required 'earnedCustomColor'", { instance: message }); + if (!message.hasOwnProperty("setting")) + throw $util.ProtocolError("missing required 'setting'", { instance: message }); + if (!message.hasOwnProperty("vsPlayCount")) + throw $util.ProtocolError("missing required 'vsPlayCount'", { instance: message }); + if (!message.hasOwnProperty("vsBurstCount")) + throw $util.ProtocolError("missing required 'vsBurstCount'", { instance: message }); + if (!message.hasOwnProperty("vsStarCount")) + throw $util.ProtocolError("missing required 'vsStarCount'", { instance: message }); + if (!message.hasOwnProperty("vsStarCountMax")) + throw $util.ProtocolError("missing required 'vsStarCountMax'", { instance: message }); + if (!message.hasOwnProperty("vsCoolOrWild")) + throw $util.ProtocolError("missing required 'vsCoolOrWild'", { instance: message }); + if (!message.hasOwnProperty("vsSmoothOrRough")) + throw $util.ProtocolError("missing required 'vsSmoothOrRough'", { instance: message }); + if (!message.hasOwnProperty("vsTripleStarMedals")) + throw $util.ProtocolError("missing required 'vsTripleStarMedals'", { instance: message }); + if (!message.hasOwnProperty("vsDoubleStarMedals")) + throw $util.ProtocolError("missing required 'vsDoubleStarMedals'", { instance: message }); + if (!message.hasOwnProperty("vsSingleStarMedals")) + throw $util.ProtocolError("missing required 'vsSingleStarMedals'", { instance: message }); + if (!message.hasOwnProperty("vsPlainMedals")) + throw $util.ProtocolError("missing required 'vsPlainMedals'", { instance: message }); + if (!message.hasOwnProperty("rgPlayCount")) + throw $util.ProtocolError("missing required 'rgPlayCount'", { instance: message }); + if (!message.hasOwnProperty("rgWinCount")) + throw $util.ProtocolError("missing required 'rgWinCount'", { instance: message }); + if (!message.hasOwnProperty("rgTrophy")) + throw $util.ProtocolError("missing required 'rgTrophy'", { instance: message }); + if (!message.hasOwnProperty("rgPreviousVersionPlayCount")) + throw $util.ProtocolError("missing required 'rgPreviousVersionPlayCount'", { instance: message }); + if (!message.hasOwnProperty("rgScore")) + throw $util.ProtocolError("missing required 'rgScore'", { instance: message }); + if (!message.hasOwnProperty("rgStamp")) + throw $util.ProtocolError("missing required 'rgStamp'", { instance: message }); + if (!message.hasOwnProperty("rgAcquireAllCrowns")) + throw $util.ProtocolError("missing required 'rgAcquireAllCrowns'", { instance: message }); + if (!message.hasOwnProperty("dressupLevel")) + throw $util.ProtocolError("missing required 'dressupLevel'", { instance: message }); + if (!message.hasOwnProperty("dressupPoint")) + throw $util.ProtocolError("missing required 'dressupPoint'", { instance: message }); + if (!message.hasOwnProperty("stPlayCount")) + throw $util.ProtocolError("missing required 'stPlayCount'", { instance: message }); + if (!message.hasOwnProperty("stClearBits")) + throw $util.ProtocolError("missing required 'stClearBits'", { instance: message }); + if (!message.hasOwnProperty("stClearDivCount")) + throw $util.ProtocolError("missing required 'stClearDivCount'", { instance: message }); + if (!message.hasOwnProperty("stClearCount")) + throw $util.ProtocolError("missing required 'stClearCount'", { instance: message }); + if (!message.hasOwnProperty("stLoseBits")) + throw $util.ProtocolError("missing required 'stLoseBits'", { instance: message }); + if (!message.hasOwnProperty("stConsecutiveWins")) + throw $util.ProtocolError("missing required 'stConsecutiveWins'", { instance: message }); + if (!message.hasOwnProperty("stConsecutiveWinsMax")) + throw $util.ProtocolError("missing required 'stConsecutiveWinsMax'", { instance: message }); + if (!message.hasOwnProperty("stCompleted_100Episodes")) + throw $util.ProtocolError("missing required 'stCompleted_100Episodes'", { instance: message }); + if (!message.hasOwnProperty("auraMotifAutoChange")) + throw $util.ProtocolError("missing required 'auraMotifAutoChange'", { instance: message }); + if (!message.hasOwnProperty("screenshotCount")) + throw $util.ProtocolError("missing required 'screenshotCount'", { instance: message }); + if (!message.hasOwnProperty("transferred")) + throw $util.ProtocolError("missing required 'transferred'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadCarResponse message. + * @function verify + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadCarResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.tuningPoint)) + return "tuningPoint: integer expected"; + if (!$util.isInteger(message.odometer)) + return "odometer: integer expected"; + if (!$util.isInteger(message.playCount)) + return "playCount: integer expected"; + if (typeof message.earnedCustomColor !== "boolean") + return "earnedCustomColor: boolean expected"; + { + let error = $root.wm.protobuf.CarSetting.verify(message.setting); + if (error) + return "setting." + error; + } + if (!$util.isInteger(message.vsPlayCount)) + return "vsPlayCount: integer expected"; + if (!$util.isInteger(message.vsBurstCount)) + return "vsBurstCount: integer expected"; + if (!$util.isInteger(message.vsStarCount)) + return "vsStarCount: integer expected"; + if (!$util.isInteger(message.vsStarCountMax)) + return "vsStarCountMax: integer expected"; + if (!$util.isInteger(message.vsCoolOrWild)) + return "vsCoolOrWild: integer expected"; + if (!$util.isInteger(message.vsSmoothOrRough)) + return "vsSmoothOrRough: integer expected"; + if (!$util.isInteger(message.vsTripleStarMedals)) + return "vsTripleStarMedals: integer expected"; + if (!$util.isInteger(message.vsDoubleStarMedals)) + return "vsDoubleStarMedals: integer expected"; + if (!$util.isInteger(message.vsSingleStarMedals)) + return "vsSingleStarMedals: integer expected"; + if (!$util.isInteger(message.vsPlainMedals)) + return "vsPlainMedals: integer expected"; + if (!$util.isInteger(message.rgPlayCount)) + return "rgPlayCount: integer expected"; + if (!$util.isInteger(message.rgWinCount)) + return "rgWinCount: integer expected"; + if (!$util.isInteger(message.rgTrophy)) + return "rgTrophy: integer expected"; + if (!$util.isInteger(message.rgPreviousVersionPlayCount)) + return "rgPreviousVersionPlayCount: integer expected"; + if (!$util.isInteger(message.rgScore)) + return "rgScore: integer expected"; + if (message.rgRegionMapScore != null && message.hasOwnProperty("rgRegionMapScore")) { + if (!Array.isArray(message.rgRegionMapScore)) + return "rgRegionMapScore: array expected"; + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + if (!$util.isInteger(message.rgRegionMapScore[i])) + return "rgRegionMapScore: integer[] expected"; + } + if (message.rgRegions != null && message.hasOwnProperty("rgRegions")) { + if (!Array.isArray(message.rgRegions)) + return "rgRegions: array expected"; + for (let i = 0; i < message.rgRegions.length; ++i) + if (!$util.isInteger(message.rgRegions[i])) + return "rgRegions: integer[] expected"; + } + if (!$util.isInteger(message.rgStamp)) + return "rgStamp: integer expected"; + if (typeof message.rgAcquireAllCrowns !== "boolean") + return "rgAcquireAllCrowns: boolean expected"; + if (!$util.isInteger(message.dressupLevel)) + return "dressupLevel: integer expected"; + if (!$util.isInteger(message.dressupPoint)) + return "dressupPoint: integer expected"; + if (!$util.isInteger(message.stPlayCount)) + return "stPlayCount: integer expected"; + if (!$util.isInteger(message.stClearBits)) + return "stClearBits: integer expected"; + if (!$util.isInteger(message.stClearDivCount)) + return "stClearDivCount: integer expected"; + if (!$util.isInteger(message.stClearCount)) + return "stClearCount: integer expected"; + if (!$util.isInteger(message.stLoseBits) && !(message.stLoseBits && $util.isInteger(message.stLoseBits.low) && $util.isInteger(message.stLoseBits.high))) + return "stLoseBits: integer|Long expected"; + if (!$util.isInteger(message.stConsecutiveWins)) + return "stConsecutiveWins: integer expected"; + if (!$util.isInteger(message.stConsecutiveWinsMax)) + return "stConsecutiveWinsMax: integer expected"; + if (typeof message.stCompleted_100Episodes !== "boolean") + return "stCompleted_100Episodes: boolean expected"; + if (message.challenger != null && message.hasOwnProperty("challenger")) { + let error = $root.wm.protobuf.ChallengerCar.verify(message.challenger); + if (error) + return "challenger." + error; + } + if (message.challengerReturnCount != null && message.hasOwnProperty("challengerReturnCount")) + if (!$util.isInteger(message.challengerReturnCount)) + return "challengerReturnCount: integer expected"; + if (message.numOfChallengers != null && message.hasOwnProperty("numOfChallengers")) + if (!$util.isInteger(message.numOfChallengers)) + return "numOfChallengers: integer expected"; + if (message.opponentGhost != null && message.hasOwnProperty("opponentGhost")) { + let error = $root.wm.protobuf.GhostCar.verify(message.opponentGhost); + if (error) + return "opponentGhost." + error; + } + if (message.opponentTrailId != null && message.hasOwnProperty("opponentTrailId")) + if (!$util.isInteger(message.opponentTrailId) && !(message.opponentTrailId && $util.isInteger(message.opponentTrailId.low) && $util.isInteger(message.opponentTrailId.high))) + return "opponentTrailId: integer|Long expected"; + if (message.opponentCompetitionId != null && message.hasOwnProperty("opponentCompetitionId")) + if (!$util.isInteger(message.opponentCompetitionId)) + return "opponentCompetitionId: integer expected"; + if (message.competitionParameter != null && message.hasOwnProperty("competitionParameter")) { + let error = $root.wm.protobuf.GhostCompetitionParameter.verify(message.competitionParameter); + if (error) + return "competitionParameter." + error; + } + if (message.specialTitles != null && message.hasOwnProperty("specialTitles")) { + if (!Array.isArray(message.specialTitles)) + return "specialTitles: array expected"; + for (let i = 0; i < message.specialTitles.length; ++i) + if (!$util.isString(message.specialTitles[i])) + return "specialTitles: string[] expected"; + } + if (message.earnedTitles != null && message.hasOwnProperty("earnedTitles")) { + if (!Array.isArray(message.earnedTitles)) + return "earnedTitles: array expected"; + for (let i = 0; i < message.earnedTitles.length; ++i) + if (!$util.isString(message.earnedTitles[i])) + return "earnedTitles: string[] expected"; + } + if (message.ownedItems != null && message.hasOwnProperty("ownedItems")) { + if (!Array.isArray(message.ownedItems)) + return "ownedItems: array expected"; + for (let i = 0; i < message.ownedItems.length; ++i) { + let error = $root.wm.protobuf.CarItem.verify(message.ownedItems[i]); + if (error) + return "ownedItems." + error; + } + } + if (typeof message.auraMotifAutoChange !== "boolean") + return "auraMotifAutoChange: boolean expected"; + if (!$util.isInteger(message.screenshotCount)) + return "screenshotCount: integer expected"; + if (message.announceEventModePrize != null && message.hasOwnProperty("announceEventModePrize")) + if (typeof message.announceEventModePrize !== "boolean") + return "announceEventModePrize: boolean expected"; + if (typeof message.transferred !== "boolean") + return "transferred: boolean expected"; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + if (!$util.isInteger(message.driveLastPlayedAt)) + return "driveLastPlayedAt: integer expected"; + if (message.insurance != null && message.hasOwnProperty("insurance")) { + let error = $root.wm.protobuf.LoadCarResponse.StoryInsurance.verify(message.insurance); + if (error) + return "insurance." + error; + } + return null; + }; + + /** + * Creates a LoadCarResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse + */ + LoadCarResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadCarResponse) + return object; + let message = new $root.wm.protobuf.LoadCarResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.tuningPoint != null) + message.tuningPoint = object.tuningPoint >>> 0; + if (object.odometer != null) + message.odometer = object.odometer >>> 0; + if (object.playCount != null) + message.playCount = object.playCount >>> 0; + if (object.earnedCustomColor != null) + message.earnedCustomColor = Boolean(object.earnedCustomColor); + if (object.setting != null) { + if (typeof object.setting !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.setting: object expected"); + message.setting = $root.wm.protobuf.CarSetting.fromObject(object.setting); + } + if (object.vsPlayCount != null) + message.vsPlayCount = object.vsPlayCount >>> 0; + if (object.vsBurstCount != null) + message.vsBurstCount = object.vsBurstCount >>> 0; + if (object.vsStarCount != null) + message.vsStarCount = object.vsStarCount >>> 0; + if (object.vsStarCountMax != null) + message.vsStarCountMax = object.vsStarCountMax >>> 0; + if (object.vsCoolOrWild != null) + message.vsCoolOrWild = object.vsCoolOrWild | 0; + if (object.vsSmoothOrRough != null) + message.vsSmoothOrRough = object.vsSmoothOrRough | 0; + if (object.vsTripleStarMedals != null) + message.vsTripleStarMedals = object.vsTripleStarMedals >>> 0; + if (object.vsDoubleStarMedals != null) + message.vsDoubleStarMedals = object.vsDoubleStarMedals >>> 0; + if (object.vsSingleStarMedals != null) + message.vsSingleStarMedals = object.vsSingleStarMedals >>> 0; + if (object.vsPlainMedals != null) + message.vsPlainMedals = object.vsPlainMedals >>> 0; + if (object.rgPlayCount != null) + message.rgPlayCount = object.rgPlayCount >>> 0; + if (object.rgWinCount != null) + message.rgWinCount = object.rgWinCount >>> 0; + if (object.rgTrophy != null) + message.rgTrophy = object.rgTrophy >>> 0; + if (object.rgPreviousVersionPlayCount != null) + message.rgPreviousVersionPlayCount = object.rgPreviousVersionPlayCount >>> 0; + if (object.rgScore != null) + message.rgScore = object.rgScore >>> 0; + if (object.rgRegionMapScore) { + if (!Array.isArray(object.rgRegionMapScore)) + throw TypeError(".wm.protobuf.LoadCarResponse.rgRegionMapScore: array expected"); + message.rgRegionMapScore = []; + for (let i = 0; i < object.rgRegionMapScore.length; ++i) + message.rgRegionMapScore[i] = object.rgRegionMapScore[i] >>> 0; + } + if (object.rgRegions) { + if (!Array.isArray(object.rgRegions)) + throw TypeError(".wm.protobuf.LoadCarResponse.rgRegions: array expected"); + message.rgRegions = []; + for (let i = 0; i < object.rgRegions.length; ++i) + message.rgRegions[i] = object.rgRegions[i] >>> 0; + } + if (object.rgStamp != null) + message.rgStamp = object.rgStamp >>> 0; + if (object.rgAcquireAllCrowns != null) + message.rgAcquireAllCrowns = Boolean(object.rgAcquireAllCrowns); + if (object.dressupLevel != null) + message.dressupLevel = object.dressupLevel >>> 0; + if (object.dressupPoint != null) + message.dressupPoint = object.dressupPoint >>> 0; + if (object.stPlayCount != null) + message.stPlayCount = object.stPlayCount >>> 0; + if (object.stClearBits != null) + message.stClearBits = object.stClearBits >>> 0; + if (object.stClearDivCount != null) + message.stClearDivCount = object.stClearDivCount >>> 0; + if (object.stClearCount != null) + message.stClearCount = object.stClearCount >>> 0; + if (object.stLoseBits != null) + if ($util.Long) + (message.stLoseBits = $util.Long.fromValue(object.stLoseBits)).unsigned = true; + else if (typeof object.stLoseBits === "string") + message.stLoseBits = parseInt(object.stLoseBits, 10); + else if (typeof object.stLoseBits === "number") + message.stLoseBits = object.stLoseBits; + else if (typeof object.stLoseBits === "object") + message.stLoseBits = new $util.LongBits(object.stLoseBits.low >>> 0, object.stLoseBits.high >>> 0).toNumber(true); + if (object.stConsecutiveWins != null) + message.stConsecutiveWins = object.stConsecutiveWins >>> 0; + if (object.stConsecutiveWinsMax != null) + message.stConsecutiveWinsMax = object.stConsecutiveWinsMax >>> 0; + if (object.stCompleted_100Episodes != null) + message.stCompleted_100Episodes = Boolean(object.stCompleted_100Episodes); + if (object.challenger != null) { + if (typeof object.challenger !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.challenger: object expected"); + message.challenger = $root.wm.protobuf.ChallengerCar.fromObject(object.challenger); + } + if (object.challengerReturnCount != null) + message.challengerReturnCount = object.challengerReturnCount >>> 0; + if (object.numOfChallengers != null) + message.numOfChallengers = object.numOfChallengers >>> 0; + if (object.opponentGhost != null) { + if (typeof object.opponentGhost !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.opponentGhost: object expected"); + message.opponentGhost = $root.wm.protobuf.GhostCar.fromObject(object.opponentGhost); + } + if (object.opponentTrailId != null) + if ($util.Long) + (message.opponentTrailId = $util.Long.fromValue(object.opponentTrailId)).unsigned = true; + else if (typeof object.opponentTrailId === "string") + message.opponentTrailId = parseInt(object.opponentTrailId, 10); + else if (typeof object.opponentTrailId === "number") + message.opponentTrailId = object.opponentTrailId; + else if (typeof object.opponentTrailId === "object") + message.opponentTrailId = new $util.LongBits(object.opponentTrailId.low >>> 0, object.opponentTrailId.high >>> 0).toNumber(true); + if (object.opponentCompetitionId != null) + message.opponentCompetitionId = object.opponentCompetitionId >>> 0; + if (object.competitionParameter != null) { + if (typeof object.competitionParameter !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.competitionParameter: object expected"); + message.competitionParameter = $root.wm.protobuf.GhostCompetitionParameter.fromObject(object.competitionParameter); + } + if (object.specialTitles) { + if (!Array.isArray(object.specialTitles)) + throw TypeError(".wm.protobuf.LoadCarResponse.specialTitles: array expected"); + message.specialTitles = []; + for (let i = 0; i < object.specialTitles.length; ++i) + message.specialTitles[i] = String(object.specialTitles[i]); + } + if (object.earnedTitles) { + if (!Array.isArray(object.earnedTitles)) + throw TypeError(".wm.protobuf.LoadCarResponse.earnedTitles: array expected"); + message.earnedTitles = []; + for (let i = 0; i < object.earnedTitles.length; ++i) + message.earnedTitles[i] = String(object.earnedTitles[i]); + } + if (object.ownedItems) { + if (!Array.isArray(object.ownedItems)) + throw TypeError(".wm.protobuf.LoadCarResponse.ownedItems: array expected"); + message.ownedItems = []; + for (let i = 0; i < object.ownedItems.length; ++i) { + if (typeof object.ownedItems[i] !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.ownedItems: object expected"); + message.ownedItems[i] = $root.wm.protobuf.CarItem.fromObject(object.ownedItems[i]); + } + } + if (object.auraMotifAutoChange != null) + message.auraMotifAutoChange = Boolean(object.auraMotifAutoChange); + if (object.screenshotCount != null) + message.screenshotCount = object.screenshotCount >>> 0; + if (object.announceEventModePrize != null) + message.announceEventModePrize = Boolean(object.announceEventModePrize); + if (object.transferred != null) + message.transferred = Boolean(object.transferred); + if (object.driveLastPlayedAt != null) + message.driveLastPlayedAt = object.driveLastPlayedAt >>> 0; + if (object.insurance != null) { + if (typeof object.insurance !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.insurance: object expected"); + message.insurance = $root.wm.protobuf.LoadCarResponse.StoryInsurance.fromObject(object.insurance); + } + return message; + }; + + /** + * Creates a plain object from a LoadCarResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.LoadCarResponse} message LoadCarResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadCarResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.rgRegionMapScore = []; + object.rgRegions = []; + object.specialTitles = []; + object.earnedTitles = []; + object.ownedItems = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.car = null; + object.tuningPoint = 0; + object.odometer = 0; + object.playCount = 0; + object.earnedCustomColor = false; + object.setting = null; + object.vsPlayCount = 0; + object.vsBurstCount = 0; + object.vsStarCount = 0; + object.vsStarCountMax = 0; + object.vsCoolOrWild = 0; + object.vsSmoothOrRough = 0; + object.vsTripleStarMedals = 0; + object.vsDoubleStarMedals = 0; + object.vsSingleStarMedals = 0; + object.vsPlainMedals = 0; + object.rgPlayCount = 0; + object.rgWinCount = 0; + object.rgTrophy = 0; + object.rgScore = 0; + object.rgStamp = 0; + object.dressupLevel = 0; + object.dressupPoint = 0; + object.stPlayCount = 0; + object.stClearBits = 0; + object.stClearDivCount = 0; + object.stClearCount = 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.stLoseBits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.stLoseBits = options.longs === String ? "0" : 0; + object.stConsecutiveWins = 0; + object.stConsecutiveWinsMax = 0; + object.challenger = null; + object.challengerReturnCount = 0; + object.opponentGhost = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.opponentTrailId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.opponentTrailId = options.longs === String ? "0" : 0; + object.opponentCompetitionId = 0; + object.competitionParameter = null; + object.auraMotifAutoChange = false; + object.screenshotCount = 0; + object.numOfChallengers = 0; + object.announceEventModePrize = false; + object.rgAcquireAllCrowns = false; + object.transferred = false; + object.driveLastPlayedAt = 0; + object.insurance = null; + object.stCompleted_100Episodes = false; + object.rgPreviousVersionPlayCount = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.tuningPoint != null && message.hasOwnProperty("tuningPoint")) + object.tuningPoint = message.tuningPoint; + if (message.odometer != null && message.hasOwnProperty("odometer")) + object.odometer = message.odometer; + if (message.playCount != null && message.hasOwnProperty("playCount")) + object.playCount = message.playCount; + if (message.earnedCustomColor != null && message.hasOwnProperty("earnedCustomColor")) + object.earnedCustomColor = message.earnedCustomColor; + if (message.setting != null && message.hasOwnProperty("setting")) + object.setting = $root.wm.protobuf.CarSetting.toObject(message.setting, options); + if (message.vsPlayCount != null && message.hasOwnProperty("vsPlayCount")) + object.vsPlayCount = message.vsPlayCount; + if (message.vsBurstCount != null && message.hasOwnProperty("vsBurstCount")) + object.vsBurstCount = message.vsBurstCount; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + object.vsStarCount = message.vsStarCount; + if (message.vsStarCountMax != null && message.hasOwnProperty("vsStarCountMax")) + object.vsStarCountMax = message.vsStarCountMax; + if (message.vsCoolOrWild != null && message.hasOwnProperty("vsCoolOrWild")) + object.vsCoolOrWild = message.vsCoolOrWild; + if (message.vsSmoothOrRough != null && message.hasOwnProperty("vsSmoothOrRough")) + object.vsSmoothOrRough = message.vsSmoothOrRough; + if (message.vsTripleStarMedals != null && message.hasOwnProperty("vsTripleStarMedals")) + object.vsTripleStarMedals = message.vsTripleStarMedals; + if (message.vsDoubleStarMedals != null && message.hasOwnProperty("vsDoubleStarMedals")) + object.vsDoubleStarMedals = message.vsDoubleStarMedals; + if (message.vsSingleStarMedals != null && message.hasOwnProperty("vsSingleStarMedals")) + object.vsSingleStarMedals = message.vsSingleStarMedals; + if (message.vsPlainMedals != null && message.hasOwnProperty("vsPlainMedals")) + object.vsPlainMedals = message.vsPlainMedals; + if (message.rgPlayCount != null && message.hasOwnProperty("rgPlayCount")) + object.rgPlayCount = message.rgPlayCount; + if (message.rgWinCount != null && message.hasOwnProperty("rgWinCount")) + object.rgWinCount = message.rgWinCount; + if (message.rgTrophy != null && message.hasOwnProperty("rgTrophy")) + object.rgTrophy = message.rgTrophy; + if (message.rgScore != null && message.hasOwnProperty("rgScore")) + object.rgScore = message.rgScore; + if (message.rgRegionMapScore && message.rgRegionMapScore.length) { + object.rgRegionMapScore = []; + for (let j = 0; j < message.rgRegionMapScore.length; ++j) + object.rgRegionMapScore[j] = message.rgRegionMapScore[j]; + } + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + object.rgStamp = message.rgStamp; + if (message.dressupLevel != null && message.hasOwnProperty("dressupLevel")) + object.dressupLevel = message.dressupLevel; + if (message.dressupPoint != null && message.hasOwnProperty("dressupPoint")) + object.dressupPoint = message.dressupPoint; + if (message.rgRegions && message.rgRegions.length) { + object.rgRegions = []; + for (let j = 0; j < message.rgRegions.length; ++j) + object.rgRegions[j] = message.rgRegions[j]; + } + if (message.stPlayCount != null && message.hasOwnProperty("stPlayCount")) + object.stPlayCount = message.stPlayCount; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + object.stClearBits = message.stClearBits; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + object.stClearDivCount = message.stClearDivCount; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + object.stClearCount = message.stClearCount; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (typeof message.stLoseBits === "number") + object.stLoseBits = options.longs === String ? String(message.stLoseBits) : message.stLoseBits; + else + object.stLoseBits = options.longs === String ? $util.Long.prototype.toString.call(message.stLoseBits) : options.longs === Number ? new $util.LongBits(message.stLoseBits.low >>> 0, message.stLoseBits.high >>> 0).toNumber(true) : message.stLoseBits; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + object.stConsecutiveWins = message.stConsecutiveWins; + if (message.stConsecutiveWinsMax != null && message.hasOwnProperty("stConsecutiveWinsMax")) + object.stConsecutiveWinsMax = message.stConsecutiveWinsMax; + if (message.challenger != null && message.hasOwnProperty("challenger")) + object.challenger = $root.wm.protobuf.ChallengerCar.toObject(message.challenger, options); + if (message.challengerReturnCount != null && message.hasOwnProperty("challengerReturnCount")) + object.challengerReturnCount = message.challengerReturnCount; + if (message.opponentGhost != null && message.hasOwnProperty("opponentGhost")) + object.opponentGhost = $root.wm.protobuf.GhostCar.toObject(message.opponentGhost, options); + if (message.opponentTrailId != null && message.hasOwnProperty("opponentTrailId")) + if (typeof message.opponentTrailId === "number") + object.opponentTrailId = options.longs === String ? String(message.opponentTrailId) : message.opponentTrailId; + else + object.opponentTrailId = options.longs === String ? $util.Long.prototype.toString.call(message.opponentTrailId) : options.longs === Number ? new $util.LongBits(message.opponentTrailId.low >>> 0, message.opponentTrailId.high >>> 0).toNumber(true) : message.opponentTrailId; + if (message.opponentCompetitionId != null && message.hasOwnProperty("opponentCompetitionId")) + object.opponentCompetitionId = message.opponentCompetitionId; + if (message.competitionParameter != null && message.hasOwnProperty("competitionParameter")) + object.competitionParameter = $root.wm.protobuf.GhostCompetitionParameter.toObject(message.competitionParameter, options); + if (message.specialTitles && message.specialTitles.length) { + object.specialTitles = []; + for (let j = 0; j < message.specialTitles.length; ++j) + object.specialTitles[j] = message.specialTitles[j]; + } + if (message.earnedTitles && message.earnedTitles.length) { + object.earnedTitles = []; + for (let j = 0; j < message.earnedTitles.length; ++j) + object.earnedTitles[j] = message.earnedTitles[j]; + } + if (message.ownedItems && message.ownedItems.length) { + object.ownedItems = []; + for (let j = 0; j < message.ownedItems.length; ++j) + object.ownedItems[j] = $root.wm.protobuf.CarItem.toObject(message.ownedItems[j], options); + } + if (message.auraMotifAutoChange != null && message.hasOwnProperty("auraMotifAutoChange")) + object.auraMotifAutoChange = message.auraMotifAutoChange; + if (message.screenshotCount != null && message.hasOwnProperty("screenshotCount")) + object.screenshotCount = message.screenshotCount; + if (message.numOfChallengers != null && message.hasOwnProperty("numOfChallengers")) + object.numOfChallengers = message.numOfChallengers; + if (message.announceEventModePrize != null && message.hasOwnProperty("announceEventModePrize")) + object.announceEventModePrize = message.announceEventModePrize; + if (message.rgAcquireAllCrowns != null && message.hasOwnProperty("rgAcquireAllCrowns")) + object.rgAcquireAllCrowns = message.rgAcquireAllCrowns; + if (message.transferred != null && message.hasOwnProperty("transferred")) + object.transferred = message.transferred; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + object.driveLastPlayedAt = message.driveLastPlayedAt; + if (message.insurance != null && message.hasOwnProperty("insurance")) + object.insurance = $root.wm.protobuf.LoadCarResponse.StoryInsurance.toObject(message.insurance, options); + if (message.stCompleted_100Episodes != null && message.hasOwnProperty("stCompleted_100Episodes")) + object.stCompleted_100Episodes = message.stCompleted_100Episodes; + if (message.rgPreviousVersionPlayCount != null && message.hasOwnProperty("rgPreviousVersionPlayCount")) + object.rgPreviousVersionPlayCount = message.rgPreviousVersionPlayCount; + return object; + }; + + /** + * Converts this LoadCarResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadCarResponse + * @instance + * @returns {Object.} JSON object + */ + LoadCarResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadCarResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadCarResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadCarResponse"; + }; + + LoadCarResponse.StoryInsurance = (function() { + + /** + * Properties of a StoryInsurance. + * @memberof wm.protobuf.LoadCarResponse + * @interface IStoryInsurance + * @property {number} numOfRemains StoryInsurance numOfRemains + */ + + /** + * Constructs a new StoryInsurance. + * @memberof wm.protobuf.LoadCarResponse + * @classdesc Represents a StoryInsurance. + * @implements IStoryInsurance + * @constructor + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance=} [properties] Properties to set + */ + function StoryInsurance(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoryInsurance numOfRemains. + * @member {number} numOfRemains + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @instance + */ + StoryInsurance.prototype.numOfRemains = 0; + + /** + * Creates a new StoryInsurance instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance=} [properties] Properties to set + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance instance + */ + StoryInsurance.create = function create(properties) { + return new StoryInsurance(properties); + }; + + /** + * Encodes the specified StoryInsurance message. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance} message StoryInsurance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryInsurance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.numOfRemains); + return writer; + }; + + /** + * Encodes the specified StoryInsurance message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance} message StoryInsurance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryInsurance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryInsurance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadCarResponse.StoryInsurance(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.numOfRemains = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("numOfRemains")) + throw $util.ProtocolError("missing required 'numOfRemains'", { instance: message }); + return message; + }; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryInsurance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoryInsurance message. + * @function verify + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoryInsurance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.numOfRemains)) + return "numOfRemains: integer expected"; + return null; + }; + + /** + * Creates a StoryInsurance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance + */ + StoryInsurance.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadCarResponse.StoryInsurance) + return object; + let message = new $root.wm.protobuf.LoadCarResponse.StoryInsurance(); + if (object.numOfRemains != null) + message.numOfRemains = object.numOfRemains >>> 0; + return message; + }; + + /** + * Creates a plain object from a StoryInsurance message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.StoryInsurance} message StoryInsurance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoryInsurance.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.numOfRemains = 0; + if (message.numOfRemains != null && message.hasOwnProperty("numOfRemains")) + object.numOfRemains = message.numOfRemains; + return object; + }; + + /** + * Converts this StoryInsurance to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @instance + * @returns {Object.} JSON object + */ + StoryInsurance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoryInsurance + * @function getTypeUrl + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoryInsurance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadCarResponse.StoryInsurance"; + }; + + return StoryInsurance; + })(); + + return LoadCarResponse; + })(); + + protobuf.CreateCarRequest = (function() { + + /** + * Properties of a CreateCarRequest. + * @memberof wm.protobuf + * @interface ICreateCarRequest + * @property {number|null} [userId] CreateCarRequest userId + * @property {number|null} [banapassportAmId] CreateCarRequest banapassportAmId + * @property {string|null} [cardChipId] CreateCarRequest cardChipId + * @property {string|null} [accessCode] CreateCarRequest accessCode + * @property {number|null} [cardTypeCode] CreateCarRequest cardTypeCode + * @property {number|null} [cardRegionCode] CreateCarRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] CreateCarRequest device + * @property {wm.protobuf.ICar} car CreateCarRequest car + * @property {boolean} transmission CreateCarRequest transmission + * @property {number} timestamp CreateCarRequest timestamp + * @property {number|null} [userItemId] CreateCarRequest userItemId + * @property {number|null} [deletedCarId] CreateCarRequest deletedCarId + */ + + /** + * Constructs a new CreateCarRequest. + * @memberof wm.protobuf + * @classdesc Represents a CreateCarRequest. + * @implements ICreateCarRequest + * @constructor + * @param {wm.protobuf.ICreateCarRequest=} [properties] Properties to set + */ + function CreateCarRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCarRequest userId. + * @member {number} userId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.userId = 0; + + /** + * CreateCarRequest banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.banapassportAmId = 0; + + /** + * CreateCarRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.cardChipId = ""; + + /** + * CreateCarRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.accessCode = ""; + + /** + * CreateCarRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.cardTypeCode = 0; + + /** + * CreateCarRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.cardRegionCode = 0; + + /** + * CreateCarRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.device = 0; + + /** + * CreateCarRequest car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.car = null; + + /** + * CreateCarRequest transmission. + * @member {boolean} transmission + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.transmission = false; + + /** + * CreateCarRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.timestamp = 0; + + /** + * CreateCarRequest userItemId. + * @member {number} userItemId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.userItemId = 0; + + /** + * CreateCarRequest deletedCarId. + * @member {number} deletedCarId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.deletedCarId = 0; + + /** + * Creates a new CreateCarRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.ICreateCarRequest=} [properties] Properties to set + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest instance + */ + CreateCarRequest.create = function create(properties) { + return new CreateCarRequest(properties); + }; + + /** + * Encodes the specified CreateCarRequest message. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.ICreateCarRequest} message CreateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.banapassportAmId); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.device); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.transmission); + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.timestamp); + if (message.userItemId != null && Object.hasOwnProperty.call(message, "userItemId")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.userItemId); + if (message.deletedCarId != null && Object.hasOwnProperty.call(message, "deletedCarId")) + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.deletedCarId); + return writer; + }; + + /** + * Encodes the specified CreateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.ICreateCarRequest} message CreateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateCarRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.banapassportAmId = reader.uint32(); + break; + } + case 3: { + message.cardChipId = reader.string(); + break; + } + case 4: { + message.accessCode = reader.string(); + break; + } + case 5: { + message.cardTypeCode = reader.uint32(); + break; + } + case 6: { + message.cardRegionCode = reader.uint32(); + break; + } + case 7: { + message.device = reader.int32(); + break; + } + case 8: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 9: { + message.transmission = reader.bool(); + break; + } + case 11: { + message.timestamp = reader.uint32(); + break; + } + case 12: { + message.userItemId = reader.uint32(); + break; + } + case 13: { + message.deletedCarId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("transmission")) + throw $util.ProtocolError("missing required 'transmission'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCarRequest message. + * @function verify + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCarRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (typeof message.transmission !== "boolean") + return "transmission: boolean expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + if (!$util.isInteger(message.userItemId)) + return "userItemId: integer expected"; + if (message.deletedCarId != null && message.hasOwnProperty("deletedCarId")) + if (!$util.isInteger(message.deletedCarId)) + return "deletedCarId: integer expected"; + return null; + }; + + /** + * Creates a CreateCarRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest + */ + CreateCarRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateCarRequest) + return object; + let message = new $root.wm.protobuf.CreateCarRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.CreateCarRequest.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.transmission != null) + message.transmission = Boolean(object.transmission); + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.userItemId != null) + message.userItemId = object.userItemId >>> 0; + if (object.deletedCarId != null) + message.deletedCarId = object.deletedCarId >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateCarRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.CreateCarRequest} message CreateCarRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCarRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.banapassportAmId = 0; + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.car = null; + object.transmission = false; + object.timestamp = 0; + object.userItemId = 0; + object.deletedCarId = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.transmission != null && message.hasOwnProperty("transmission")) + object.transmission = message.transmission; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + object.userItemId = message.userItemId; + if (message.deletedCarId != null && message.hasOwnProperty("deletedCarId")) + object.deletedCarId = message.deletedCarId; + return object; + }; + + /** + * Converts this CreateCarRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateCarRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCarRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCarRequest + * @function getTypeUrl + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCarRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateCarRequest"; + }; + + return CreateCarRequest; + })(); + + protobuf.CreateCarResponse = (function() { + + /** + * Properties of a CreateCarResponse. + * @memberof wm.protobuf + * @interface ICreateCarResponse + * @property {wm.protobuf.ErrorCode} error CreateCarResponse error + * @property {string|null} [accessCode] CreateCarResponse accessCode + * @property {number|null} [banapassportAmId] CreateCarResponse banapassportAmId + * @property {number|null} [mbid] CreateCarResponse mbid + * @property {number} userId CreateCarResponse userId + * @property {number} carId CreateCarResponse carId + * @property {number|null} [stClearBits] CreateCarResponse stClearBits + * @property {number|null} [stClearDivCount] CreateCarResponse stClearDivCount + * @property {number|null} [stClearCount] CreateCarResponse stClearCount + * @property {number|Long|null} [stLoseBits] CreateCarResponse stLoseBits + * @property {number|null} [stConsecutiveWins] CreateCarResponse stConsecutiveWins + * @property {number|null} [stConsecutiveWinsMax] CreateCarResponse stConsecutiveWinsMax + * @property {number|null} [fullTunedCarCouponUnreceivableAt] CreateCarResponse fullTunedCarCouponUnreceivableAt + */ + + /** + * Constructs a new CreateCarResponse. + * @memberof wm.protobuf + * @classdesc Represents a CreateCarResponse. + * @implements ICreateCarResponse + * @constructor + * @param {wm.protobuf.ICreateCarResponse=} [properties] Properties to set + */ + function CreateCarResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCarResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.error = 0; + + /** + * CreateCarResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.accessCode = ""; + + /** + * CreateCarResponse banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.banapassportAmId = 0; + + /** + * CreateCarResponse mbid. + * @member {number} mbid + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.mbid = 0; + + /** + * CreateCarResponse userId. + * @member {number} userId + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.userId = 0; + + /** + * CreateCarResponse carId. + * @member {number} carId + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.carId = 0; + + /** + * CreateCarResponse stClearBits. + * @member {number} stClearBits + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stClearBits = 0; + + /** + * CreateCarResponse stClearDivCount. + * @member {number} stClearDivCount + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stClearDivCount = 0; + + /** + * CreateCarResponse stClearCount. + * @member {number} stClearCount + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stClearCount = 0; + + /** + * CreateCarResponse stLoseBits. + * @member {number|Long} stLoseBits + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stLoseBits = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * CreateCarResponse stConsecutiveWins. + * @member {number} stConsecutiveWins + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stConsecutiveWins = 0; + + /** + * CreateCarResponse stConsecutiveWinsMax. + * @member {number} stConsecutiveWinsMax + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stConsecutiveWinsMax = 0; + + /** + * CreateCarResponse fullTunedCarCouponUnreceivableAt. + * @member {number} fullTunedCarCouponUnreceivableAt + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.fullTunedCarCouponUnreceivableAt = 0; + + /** + * Creates a new CreateCarResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.ICreateCarResponse=} [properties] Properties to set + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse instance + */ + CreateCarResponse.create = function create(properties) { + return new CreateCarResponse(properties); + }; + + /** + * Encodes the specified CreateCarResponse message. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.ICreateCarResponse} message CreateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.banapassportAmId); + if (message.mbid != null && Object.hasOwnProperty.call(message, "mbid")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mbid); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.userId); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.carId); + if (message.stClearBits != null && Object.hasOwnProperty.call(message, "stClearBits")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stClearBits); + if (message.stClearDivCount != null && Object.hasOwnProperty.call(message, "stClearDivCount")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.stClearDivCount); + if (message.stClearCount != null && Object.hasOwnProperty.call(message, "stClearCount")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.stClearCount); + if (message.stLoseBits != null && Object.hasOwnProperty.call(message, "stLoseBits")) + writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.stLoseBits); + if (message.stConsecutiveWins != null && Object.hasOwnProperty.call(message, "stConsecutiveWins")) + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.stConsecutiveWins); + if (message.stConsecutiveWinsMax != null && Object.hasOwnProperty.call(message, "stConsecutiveWinsMax")) + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.stConsecutiveWinsMax); + if (message.fullTunedCarCouponUnreceivableAt != null && Object.hasOwnProperty.call(message, "fullTunedCarCouponUnreceivableAt")) + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.fullTunedCarCouponUnreceivableAt); + return writer; + }; + + /** + * Encodes the specified CreateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.ICreateCarResponse} message CreateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateCarResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + case 3: { + message.banapassportAmId = reader.uint32(); + break; + } + case 4: { + message.mbid = reader.uint32(); + break; + } + case 5: { + message.userId = reader.uint32(); + break; + } + case 6: { + message.carId = reader.uint32(); + break; + } + case 8: { + message.stClearBits = reader.uint32(); + break; + } + case 9: { + message.stClearDivCount = reader.uint32(); + break; + } + case 10: { + message.stClearCount = reader.uint32(); + break; + } + case 11: { + message.stLoseBits = reader.uint64(); + break; + } + case 13: { + message.stConsecutiveWins = reader.uint32(); + break; + } + case 14: { + message.stConsecutiveWinsMax = reader.uint32(); + break; + } + case 17: { + message.fullTunedCarCouponUnreceivableAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCarResponse message. + * @function verify + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCarResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.mbid != null && message.hasOwnProperty("mbid")) + if (!$util.isInteger(message.mbid)) + return "mbid: integer expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + if (!$util.isInteger(message.stClearBits)) + return "stClearBits: integer expected"; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + if (!$util.isInteger(message.stClearDivCount)) + return "stClearDivCount: integer expected"; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + if (!$util.isInteger(message.stClearCount)) + return "stClearCount: integer expected"; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (!$util.isInteger(message.stLoseBits) && !(message.stLoseBits && $util.isInteger(message.stLoseBits.low) && $util.isInteger(message.stLoseBits.high))) + return "stLoseBits: integer|Long expected"; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + if (!$util.isInteger(message.stConsecutiveWins)) + return "stConsecutiveWins: integer expected"; + if (message.stConsecutiveWinsMax != null && message.hasOwnProperty("stConsecutiveWinsMax")) + if (!$util.isInteger(message.stConsecutiveWinsMax)) + return "stConsecutiveWinsMax: integer expected"; + if (message.fullTunedCarCouponUnreceivableAt != null && message.hasOwnProperty("fullTunedCarCouponUnreceivableAt")) + if (!$util.isInteger(message.fullTunedCarCouponUnreceivableAt)) + return "fullTunedCarCouponUnreceivableAt: integer expected"; + return null; + }; + + /** + * Creates a CreateCarResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse + */ + CreateCarResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateCarResponse) + return object; + let message = new $root.wm.protobuf.CreateCarResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.mbid != null) + message.mbid = object.mbid >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.stClearBits != null) + message.stClearBits = object.stClearBits >>> 0; + if (object.stClearDivCount != null) + message.stClearDivCount = object.stClearDivCount >>> 0; + if (object.stClearCount != null) + message.stClearCount = object.stClearCount >>> 0; + if (object.stLoseBits != null) + if ($util.Long) + (message.stLoseBits = $util.Long.fromValue(object.stLoseBits)).unsigned = true; + else if (typeof object.stLoseBits === "string") + message.stLoseBits = parseInt(object.stLoseBits, 10); + else if (typeof object.stLoseBits === "number") + message.stLoseBits = object.stLoseBits; + else if (typeof object.stLoseBits === "object") + message.stLoseBits = new $util.LongBits(object.stLoseBits.low >>> 0, object.stLoseBits.high >>> 0).toNumber(true); + if (object.stConsecutiveWins != null) + message.stConsecutiveWins = object.stConsecutiveWins >>> 0; + if (object.stConsecutiveWinsMax != null) + message.stConsecutiveWinsMax = object.stConsecutiveWinsMax >>> 0; + if (object.fullTunedCarCouponUnreceivableAt != null) + message.fullTunedCarCouponUnreceivableAt = object.fullTunedCarCouponUnreceivableAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateCarResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.CreateCarResponse} message CreateCarResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCarResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.accessCode = ""; + object.banapassportAmId = 0; + object.mbid = 0; + object.userId = 0; + object.carId = 0; + object.stClearBits = 0; + object.stClearDivCount = 0; + object.stClearCount = 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.stLoseBits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.stLoseBits = options.longs === String ? "0" : 0; + object.stConsecutiveWins = 0; + object.stConsecutiveWinsMax = 0; + object.fullTunedCarCouponUnreceivableAt = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.mbid != null && message.hasOwnProperty("mbid")) + object.mbid = message.mbid; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + object.stClearBits = message.stClearBits; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + object.stClearDivCount = message.stClearDivCount; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + object.stClearCount = message.stClearCount; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (typeof message.stLoseBits === "number") + object.stLoseBits = options.longs === String ? String(message.stLoseBits) : message.stLoseBits; + else + object.stLoseBits = options.longs === String ? $util.Long.prototype.toString.call(message.stLoseBits) : options.longs === Number ? new $util.LongBits(message.stLoseBits.low >>> 0, message.stLoseBits.high >>> 0).toNumber(true) : message.stLoseBits; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + object.stConsecutiveWins = message.stConsecutiveWins; + if (message.stConsecutiveWinsMax != null && message.hasOwnProperty("stConsecutiveWinsMax")) + object.stConsecutiveWinsMax = message.stConsecutiveWinsMax; + if (message.fullTunedCarCouponUnreceivableAt != null && message.hasOwnProperty("fullTunedCarCouponUnreceivableAt")) + object.fullTunedCarCouponUnreceivableAt = message.fullTunedCarCouponUnreceivableAt; + return object; + }; + + /** + * Converts this CreateCarResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateCarResponse + * @instance + * @returns {Object.} JSON object + */ + CreateCarResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCarResponse + * @function getTypeUrl + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCarResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateCarResponse"; + }; + + return CreateCarResponse; + })(); + + protobuf.LoadGameHistoryRequest = (function() { + + /** + * Properties of a LoadGameHistoryRequest. + * @memberof wm.protobuf + * @interface ILoadGameHistoryRequest + * @property {number} carId LoadGameHistoryRequest carId + */ + + /** + * Constructs a new LoadGameHistoryRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGameHistoryRequest. + * @implements ILoadGameHistoryRequest + * @constructor + * @param {wm.protobuf.ILoadGameHistoryRequest=} [properties] Properties to set + */ + function LoadGameHistoryRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGameHistoryRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGameHistoryRequest + * @instance + */ + LoadGameHistoryRequest.prototype.carId = 0; + + /** + * Creates a new LoadGameHistoryRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.ILoadGameHistoryRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest instance + */ + LoadGameHistoryRequest.create = function create(properties) { + return new LoadGameHistoryRequest(properties); + }; + + /** + * Encodes the specified LoadGameHistoryRequest message. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.ILoadGameHistoryRequest} message LoadGameHistoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + return writer; + }; + + /** + * Encodes the specified LoadGameHistoryRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.ILoadGameHistoryRequest} message LoadGameHistoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGameHistoryRequest message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGameHistoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + return null; + }; + + /** + * Creates a LoadGameHistoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest + */ + LoadGameHistoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryRequest) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGameHistoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.LoadGameHistoryRequest} message LoadGameHistoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGameHistoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + return object; + }; + + /** + * Converts this LoadGameHistoryRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGameHistoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGameHistoryRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGameHistoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryRequest"; + }; + + return LoadGameHistoryRequest; + })(); + + protobuf.LoadGameHistoryResponse = (function() { + + /** + * Properties of a LoadGameHistoryResponse. + * @memberof wm.protobuf + * @interface ILoadGameHistoryResponse + * @property {wm.protobuf.ErrorCode} error LoadGameHistoryResponse error + * @property {Array.|null} [taRecords] LoadGameHistoryResponse taRecords + * @property {number} taRankingUpdatedAt LoadGameHistoryResponse taRankingUpdatedAt + * @property {Array.|null} [ghostHistory] LoadGameHistoryResponse ghostHistory + * @property {number} ghostBattleCount LoadGameHistoryResponse ghostBattleCount + * @property {number} ghostBattleWinCount LoadGameHistoryResponse ghostBattleWinCount + * @property {number} stampSheetCount LoadGameHistoryResponse stampSheetCount + * @property {Array.|null} [stampSheet] LoadGameHistoryResponse stampSheet + */ + + /** + * Constructs a new LoadGameHistoryResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGameHistoryResponse. + * @implements ILoadGameHistoryResponse + * @constructor + * @param {wm.protobuf.ILoadGameHistoryResponse=} [properties] Properties to set + */ + function LoadGameHistoryResponse(properties) { + this.taRecords = []; + this.ghostHistory = []; + this.stampSheet = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGameHistoryResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.error = 0; + + /** + * LoadGameHistoryResponse taRecords. + * @member {Array.} taRecords + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.taRecords = $util.emptyArray; + + /** + * LoadGameHistoryResponse taRankingUpdatedAt. + * @member {number} taRankingUpdatedAt + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.taRankingUpdatedAt = 0; + + /** + * LoadGameHistoryResponse ghostHistory. + * @member {Array.} ghostHistory + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.ghostHistory = $util.emptyArray; + + /** + * LoadGameHistoryResponse ghostBattleCount. + * @member {number} ghostBattleCount + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.ghostBattleCount = 0; + + /** + * LoadGameHistoryResponse ghostBattleWinCount. + * @member {number} ghostBattleWinCount + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.ghostBattleWinCount = 0; + + /** + * LoadGameHistoryResponse stampSheetCount. + * @member {number} stampSheetCount + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.stampSheetCount = 0; + + /** + * LoadGameHistoryResponse stampSheet. + * @member {Array.} stampSheet + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.stampSheet = $util.emptyArray; + + /** + * Creates a new LoadGameHistoryResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.ILoadGameHistoryResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse instance + */ + LoadGameHistoryResponse.create = function create(properties) { + return new LoadGameHistoryResponse(properties); + }; + + /** + * Encodes the specified LoadGameHistoryResponse message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.ILoadGameHistoryResponse} message LoadGameHistoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.taRecords != null && message.taRecords.length) + for (let i = 0; i < message.taRecords.length; ++i) + $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.encode(message.taRecords[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.taRankingUpdatedAt); + if (message.ghostHistory != null && message.ghostHistory.length) + for (let i = 0; i < message.ghostHistory.length; ++i) + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.encode(message.ghostHistory[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.ghostBattleCount); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.ghostBattleWinCount); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.stampSheetCount); + if (message.stampSheet != null && message.stampSheet.length) + for (let i = 0; i < message.stampSheet.length; ++i) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stampSheet[i]); + return writer; + }; + + /** + * Encodes the specified LoadGameHistoryResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.ILoadGameHistoryResponse} message LoadGameHistoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.taRecords && message.taRecords.length)) + message.taRecords = []; + message.taRecords.push($root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.decode(reader, reader.uint32())); + break; + } + case 3: { + message.taRankingUpdatedAt = reader.uint32(); + break; + } + case 4: { + if (!(message.ghostHistory && message.ghostHistory.length)) + message.ghostHistory = []; + message.ghostHistory.push($root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.decode(reader, reader.uint32())); + break; + } + case 5: { + message.ghostBattleCount = reader.uint32(); + break; + } + case 6: { + message.ghostBattleWinCount = reader.uint32(); + break; + } + case 7: { + message.stampSheetCount = reader.uint32(); + break; + } + case 8: { + if (!(message.stampSheet && message.stampSheet.length)) + message.stampSheet = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampSheet.push(reader.uint32()); + } else + message.stampSheet.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("taRankingUpdatedAt")) + throw $util.ProtocolError("missing required 'taRankingUpdatedAt'", { instance: message }); + if (!message.hasOwnProperty("ghostBattleCount")) + throw $util.ProtocolError("missing required 'ghostBattleCount'", { instance: message }); + if (!message.hasOwnProperty("ghostBattleWinCount")) + throw $util.ProtocolError("missing required 'ghostBattleWinCount'", { instance: message }); + if (!message.hasOwnProperty("stampSheetCount")) + throw $util.ProtocolError("missing required 'stampSheetCount'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGameHistoryResponse message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGameHistoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.taRecords != null && message.hasOwnProperty("taRecords")) { + if (!Array.isArray(message.taRecords)) + return "taRecords: array expected"; + for (let i = 0; i < message.taRecords.length; ++i) { + let error = $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify(message.taRecords[i]); + if (error) + return "taRecords." + error; + } + } + if (!$util.isInteger(message.taRankingUpdatedAt)) + return "taRankingUpdatedAt: integer expected"; + if (message.ghostHistory != null && message.hasOwnProperty("ghostHistory")) { + if (!Array.isArray(message.ghostHistory)) + return "ghostHistory: array expected"; + for (let i = 0; i < message.ghostHistory.length; ++i) { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify(message.ghostHistory[i]); + if (error) + return "ghostHistory." + error; + } + } + if (!$util.isInteger(message.ghostBattleCount)) + return "ghostBattleCount: integer expected"; + if (!$util.isInteger(message.ghostBattleWinCount)) + return "ghostBattleWinCount: integer expected"; + if (!$util.isInteger(message.stampSheetCount)) + return "stampSheetCount: integer expected"; + if (message.stampSheet != null && message.hasOwnProperty("stampSheet")) { + if (!Array.isArray(message.stampSheet)) + return "stampSheet: array expected"; + for (let i = 0; i < message.stampSheet.length; ++i) + if (!$util.isInteger(message.stampSheet[i])) + return "stampSheet: integer[] expected"; + } + return null; + }; + + /** + * Creates a LoadGameHistoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse + */ + LoadGameHistoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.taRecords) { + if (!Array.isArray(object.taRecords)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.taRecords: array expected"); + message.taRecords = []; + for (let i = 0; i < object.taRecords.length; ++i) { + if (typeof object.taRecords[i] !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.taRecords: object expected"); + message.taRecords[i] = $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.fromObject(object.taRecords[i]); + } + } + if (object.taRankingUpdatedAt != null) + message.taRankingUpdatedAt = object.taRankingUpdatedAt >>> 0; + if (object.ghostHistory) { + if (!Array.isArray(object.ghostHistory)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.ghostHistory: array expected"); + message.ghostHistory = []; + for (let i = 0; i < object.ghostHistory.length; ++i) { + if (typeof object.ghostHistory[i] !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.ghostHistory: object expected"); + message.ghostHistory[i] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.fromObject(object.ghostHistory[i]); + } + } + if (object.ghostBattleCount != null) + message.ghostBattleCount = object.ghostBattleCount >>> 0; + if (object.ghostBattleWinCount != null) + message.ghostBattleWinCount = object.ghostBattleWinCount >>> 0; + if (object.stampSheetCount != null) + message.stampSheetCount = object.stampSheetCount >>> 0; + if (object.stampSheet) { + if (!Array.isArray(object.stampSheet)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.stampSheet: array expected"); + message.stampSheet = []; + for (let i = 0; i < object.stampSheet.length; ++i) + message.stampSheet[i] = object.stampSheet[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LoadGameHistoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.LoadGameHistoryResponse} message LoadGameHistoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGameHistoryResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.taRecords = []; + object.ghostHistory = []; + object.stampSheet = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.taRankingUpdatedAt = 0; + object.ghostBattleCount = 0; + object.ghostBattleWinCount = 0; + object.stampSheetCount = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.taRecords && message.taRecords.length) { + object.taRecords = []; + for (let j = 0; j < message.taRecords.length; ++j) + object.taRecords[j] = $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.toObject(message.taRecords[j], options); + } + if (message.taRankingUpdatedAt != null && message.hasOwnProperty("taRankingUpdatedAt")) + object.taRankingUpdatedAt = message.taRankingUpdatedAt; + if (message.ghostHistory && message.ghostHistory.length) { + object.ghostHistory = []; + for (let j = 0; j < message.ghostHistory.length; ++j) + object.ghostHistory[j] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.toObject(message.ghostHistory[j], options); + } + if (message.ghostBattleCount != null && message.hasOwnProperty("ghostBattleCount")) + object.ghostBattleCount = message.ghostBattleCount; + if (message.ghostBattleWinCount != null && message.hasOwnProperty("ghostBattleWinCount")) + object.ghostBattleWinCount = message.ghostBattleWinCount; + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + object.stampSheetCount = message.stampSheetCount; + if (message.stampSheet && message.stampSheet.length) { + object.stampSheet = []; + for (let j = 0; j < message.stampSheet.length; ++j) + object.stampSheet[j] = message.stampSheet[j]; + } + return object; + }; + + /** + * Converts this LoadGameHistoryResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGameHistoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGameHistoryResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGameHistoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse"; + }; + + LoadGameHistoryResponse.TimeAttackRecord = (function() { + + /** + * Properties of a TimeAttackRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @interface ITimeAttackRecord + * @property {number} course TimeAttackRecord course + * @property {number|null} [time] TimeAttackRecord time + * @property {number|null} [tunePower] TimeAttackRecord tunePower + * @property {number|null} [tuneHandling] TimeAttackRecord tuneHandling + * @property {number|null} [wholeRank] TimeAttackRecord wholeRank + * @property {number} wholeParticipants TimeAttackRecord wholeParticipants + * @property {number|null} [modelRank] TimeAttackRecord modelRank + * @property {number} modelParticipants TimeAttackRecord modelParticipants + */ + + /** + * Constructs a new TimeAttackRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @classdesc Represents a TimeAttackRecord. + * @implements ITimeAttackRecord + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord=} [properties] Properties to set + */ + function TimeAttackRecord(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeAttackRecord course. + * @member {number} course + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.course = 0; + + /** + * TimeAttackRecord time. + * @member {number} time + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.time = 0; + + /** + * TimeAttackRecord tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.tunePower = 0; + + /** + * TimeAttackRecord tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.tuneHandling = 0; + + /** + * TimeAttackRecord wholeRank. + * @member {number} wholeRank + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.wholeRank = 0; + + /** + * TimeAttackRecord wholeParticipants. + * @member {number} wholeParticipants + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.wholeParticipants = 0; + + /** + * TimeAttackRecord modelRank. + * @member {number} modelRank + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.modelRank = 0; + + /** + * TimeAttackRecord modelParticipants. + * @member {number} modelParticipants + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.modelParticipants = 0; + + /** + * Creates a new TimeAttackRecord instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord instance + */ + TimeAttackRecord.create = function create(properties) { + return new TimeAttackRecord(properties); + }; + + /** + * Encodes the specified TimeAttackRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord} message TimeAttackRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.course); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.time); + if (message.tunePower != null && Object.hasOwnProperty.call(message, "tunePower")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tunePower); + if (message.tuneHandling != null && Object.hasOwnProperty.call(message, "tuneHandling")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.tuneHandling); + if (message.wholeRank != null && Object.hasOwnProperty.call(message, "wholeRank")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.wholeRank); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.wholeParticipants); + if (message.modelRank != null && Object.hasOwnProperty.call(message, "modelRank")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.modelRank); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.modelParticipants); + return writer; + }; + + /** + * Encodes the specified TimeAttackRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord} message TimeAttackRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.course = reader.uint32(); + break; + } + case 2: { + message.time = reader.uint32(); + break; + } + case 3: { + message.tunePower = reader.uint32(); + break; + } + case 4: { + message.tuneHandling = reader.uint32(); + break; + } + case 5: { + message.wholeRank = reader.uint32(); + break; + } + case 6: { + message.wholeParticipants = reader.uint32(); + break; + } + case 7: { + message.modelRank = reader.uint32(); + break; + } + case 8: { + message.modelParticipants = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + if (!message.hasOwnProperty("wholeParticipants")) + throw $util.ProtocolError("missing required 'wholeParticipants'", { instance: message }); + if (!message.hasOwnProperty("modelParticipants")) + throw $util.ProtocolError("missing required 'modelParticipants'", { instance: message }); + return message; + }; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeAttackRecord message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeAttackRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + if (message.time != null && message.hasOwnProperty("time")) + if (!$util.isInteger(message.time)) + return "time: integer expected"; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + if (!$util.isInteger(message.wholeRank)) + return "wholeRank: integer expected"; + if (!$util.isInteger(message.wholeParticipants)) + return "wholeParticipants: integer expected"; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + if (!$util.isInteger(message.modelRank)) + return "modelRank: integer expected"; + if (!$util.isInteger(message.modelParticipants)) + return "modelParticipants: integer expected"; + return null; + }; + + /** + * Creates a TimeAttackRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord + */ + TimeAttackRecord.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord(); + if (object.course != null) + message.course = object.course >>> 0; + if (object.time != null) + message.time = object.time >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.wholeRank != null) + message.wholeRank = object.wholeRank >>> 0; + if (object.wholeParticipants != null) + message.wholeParticipants = object.wholeParticipants >>> 0; + if (object.modelRank != null) + message.modelRank = object.modelRank >>> 0; + if (object.modelParticipants != null) + message.modelParticipants = object.modelParticipants >>> 0; + return message; + }; + + /** + * Creates a plain object from a TimeAttackRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} message TimeAttackRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeAttackRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.course = 0; + object.time = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.wholeRank = 0; + object.wholeParticipants = 0; + object.modelRank = 0; + object.modelParticipants = 0; + } + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + if (message.time != null && message.hasOwnProperty("time")) + object.time = message.time; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + object.wholeRank = message.wholeRank; + if (message.wholeParticipants != null && message.hasOwnProperty("wholeParticipants")) + object.wholeParticipants = message.wholeParticipants; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + object.modelRank = message.modelRank; + if (message.modelParticipants != null && message.hasOwnProperty("modelParticipants")) + object.modelParticipants = message.modelParticipants; + return object; + }; + + /** + * Converts this TimeAttackRecord to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + * @returns {Object.} JSON object + */ + TimeAttackRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeAttackRecord + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeAttackRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord"; + }; + + return TimeAttackRecord; + })(); + + LoadGameHistoryResponse.GhostBattleRecord = (function() { + + /** + * Properties of a GhostBattleRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @interface IGhostBattleRecord + * @property {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} carSetting GhostBattleRecord carSetting + * @property {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} opponent GhostBattleRecord opponent + * @property {Array.|null} [mobs] GhostBattleRecord mobs + * @property {number} area GhostBattleRecord area + * @property {number} playedAt GhostBattleRecord playedAt + * @property {string} playedShopName GhostBattleRecord playedShopName + */ + + /** + * Constructs a new GhostBattleRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @classdesc Represents a GhostBattleRecord. + * @implements IGhostBattleRecord + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord=} [properties] Properties to set + */ + function GhostBattleRecord(properties) { + this.mobs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleRecord carSetting. + * @member {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} carSetting + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.carSetting = null; + + /** + * GhostBattleRecord opponent. + * @member {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} opponent + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.opponent = null; + + /** + * GhostBattleRecord mobs. + * @member {Array.} mobs + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.mobs = $util.emptyArray; + + /** + * GhostBattleRecord area. + * @member {number} area + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.area = 0; + + /** + * GhostBattleRecord playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.playedAt = 0; + + /** + * GhostBattleRecord playedShopName. + * @member {string} playedShopName + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.playedShopName = ""; + + /** + * Creates a new GhostBattleRecord instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord instance + */ + GhostBattleRecord.create = function create(properties) { + return new GhostBattleRecord(properties); + }; + + /** + * Encodes the specified GhostBattleRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord} message GhostBattleRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.encode(message.carSetting, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.encode(message.opponent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.mobs != null && message.mobs.length) + for (let i = 0; i < message.mobs.length; ++i) + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.encode(message.mobs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.area); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.playedAt); + writer.uint32(/* id 6, wireType 2 =*/50).string(message.playedShopName); + return writer; + }; + + /** + * Encodes the specified GhostBattleRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord} message GhostBattleRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carSetting = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.decode(reader, reader.uint32()); + break; + } + case 2: { + message.opponent = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.mobs && message.mobs.length)) + message.mobs = []; + message.mobs.push($root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.decode(reader, reader.uint32())); + break; + } + case 4: { + message.area = reader.uint32(); + break; + } + case 5: { + message.playedAt = reader.uint32(); + break; + } + case 6: { + message.playedShopName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carSetting")) + throw $util.ProtocolError("missing required 'carSetting'", { instance: message }); + if (!message.hasOwnProperty("opponent")) + throw $util.ProtocolError("missing required 'opponent'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + if (!message.hasOwnProperty("playedShopName")) + throw $util.ProtocolError("missing required 'playedShopName'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleRecord message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify(message.carSetting); + if (error) + return "carSetting." + error; + } + { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify(message.opponent); + if (error) + return "opponent." + error; + } + if (message.mobs != null && message.hasOwnProperty("mobs")) { + if (!Array.isArray(message.mobs)) + return "mobs: array expected"; + for (let i = 0; i < message.mobs.length; ++i) { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify(message.mobs[i]); + if (error) + return "mobs." + error; + } + } + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (!$util.isString(message.playedShopName)) + return "playedShopName: string expected"; + return null; + }; + + /** + * Creates a GhostBattleRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord + */ + GhostBattleRecord.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord(); + if (object.carSetting != null) { + if (typeof object.carSetting !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.carSetting: object expected"); + message.carSetting = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.fromObject(object.carSetting); + } + if (object.opponent != null) { + if (typeof object.opponent !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.opponent: object expected"); + message.opponent = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.fromObject(object.opponent); + } + if (object.mobs) { + if (!Array.isArray(object.mobs)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.mobs: array expected"); + message.mobs = []; + for (let i = 0; i < object.mobs.length; ++i) { + if (typeof object.mobs[i] !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.mobs: object expected"); + message.mobs[i] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.fromObject(object.mobs[i]); + } + } + if (object.area != null) + message.area = object.area >>> 0; + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.playedShopName != null) + message.playedShopName = String(object.playedShopName); + return message; + }; + + /** + * Creates a plain object from a GhostBattleRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} message GhostBattleRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.mobs = []; + if (options.defaults) { + object.carSetting = null; + object.opponent = null; + object.area = 0; + object.playedAt = 0; + object.playedShopName = ""; + } + if (message.carSetting != null && message.hasOwnProperty("carSetting")) + object.carSetting = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.toObject(message.carSetting, options); + if (message.opponent != null && message.hasOwnProperty("opponent")) + object.opponent = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.toObject(message.opponent, options); + if (message.mobs && message.mobs.length) { + object.mobs = []; + for (let j = 0; j < message.mobs.length; ++j) + object.mobs[j] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.toObject(message.mobs[j], options); + } + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.playedShopName != null && message.hasOwnProperty("playedShopName")) + object.playedShopName = message.playedShopName; + return object; + }; + + /** + * Converts this GhostBattleRecord to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + * @returns {Object.} JSON object + */ + GhostBattleRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleRecord + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord"; + }; + + GhostBattleRecord.GhostCarSetting = (function() { + + /** + * Properties of a GhostCarSetting. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @interface IGhostCarSetting + * @property {number} tunePower GhostCarSetting tunePower + * @property {number} tuneHandling GhostCarSetting tuneHandling + */ + + /** + * Constructs a new GhostCarSetting. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @classdesc Represents a GhostCarSetting. + * @implements IGhostCarSetting + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting=} [properties] Properties to set + */ + function GhostCarSetting(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCarSetting tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @instance + */ + GhostCarSetting.prototype.tunePower = 0; + + /** + * GhostCarSetting tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @instance + */ + GhostCarSetting.prototype.tuneHandling = 0; + + /** + * Creates a new GhostCarSetting instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting instance + */ + GhostCarSetting.create = function create(properties) { + return new GhostCarSetting(properties); + }; + + /** + * Encodes the specified GhostCarSetting message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} message GhostCarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCarSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + return writer; + }; + + /** + * Encodes the specified GhostCarSetting message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} message GhostCarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCarSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCarSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCarSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCarSetting message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCarSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + return null; + }; + + /** + * Creates a GhostCarSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting + */ + GhostCarSetting.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + return message; + }; + + /** + * Creates a plain object from a GhostCarSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} message GhostCarSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCarSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + return object; + }; + + /** + * Converts this GhostCarSetting to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @instance + * @returns {Object.} JSON object + */ + GhostCarSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCarSetting + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCarSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting"; + }; + + return GhostCarSetting; + })(); + + GhostBattleRecord.GhostBattleRecordCar = (function() { + + /** + * Properties of a GhostBattleRecordCar. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @interface IGhostBattleRecordCar + * @property {wm.protobuf.ICar} car GhostBattleRecordCar car + * @property {number} result GhostBattleRecordCar result + */ + + /** + * Constructs a new GhostBattleRecordCar. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @classdesc Represents a GhostBattleRecordCar. + * @implements IGhostBattleRecordCar + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar=} [properties] Properties to set + */ + function GhostBattleRecordCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleRecordCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @instance + */ + GhostBattleRecordCar.prototype.car = null; + + /** + * GhostBattleRecordCar result. + * @member {number} result + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @instance + */ + GhostBattleRecordCar.prototype.result = 0; + + /** + * Creates a new GhostBattleRecordCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar instance + */ + GhostBattleRecordCar.create = function create(properties) { + return new GhostBattleRecordCar(properties); + }; + + /** + * Encodes the specified GhostBattleRecordCar message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} message GhostBattleRecordCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecordCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.result); + return writer; + }; + + /** + * Encodes the specified GhostBattleRecordCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} message GhostBattleRecordCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecordCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecordCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.result = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecordCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleRecordCar message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleRecordCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.result)) + return "result: integer expected"; + return null; + }; + + /** + * Creates a GhostBattleRecordCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar + */ + GhostBattleRecordCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.result != null) + message.result = object.result | 0; + return message; + }; + + /** + * Creates a plain object from a GhostBattleRecordCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} message GhostBattleRecordCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleRecordCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.result = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + return object; + }; + + /** + * Converts this GhostBattleRecordCar to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @instance + * @returns {Object.} JSON object + */ + GhostBattleRecordCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleRecordCar + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleRecordCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar"; + }; + + return GhostBattleRecordCar; + })(); + + return GhostBattleRecord; + })(); + + return LoadGameHistoryResponse; + })(); + + protobuf.UpdateCarRequest = (function() { + + /** + * Properties of an UpdateCarRequest. + * @memberof wm.protobuf + * @interface IUpdateCarRequest + * @property {number} carId UpdateCarRequest carId + * @property {wm.protobuf.ICar|null} [car] UpdateCarRequest car + * @property {Array.|null} [earnedItems] UpdateCarRequest earnedItems + * @property {wm.protobuf.ICarSetting|null} [setting] UpdateCarRequest setting + * @property {boolean|null} [toBeDeleted] UpdateCarRequest toBeDeleted + * @property {boolean|null} [auraMotifAutoChange] UpdateCarRequest auraMotifAutoChange + * @property {number|null} [rgStamp] UpdateCarRequest rgStamp + * @property {number} timestamp UpdateCarRequest timestamp + */ + + /** + * Constructs a new UpdateCarRequest. + * @memberof wm.protobuf + * @classdesc Represents an UpdateCarRequest. + * @implements IUpdateCarRequest + * @constructor + * @param {wm.protobuf.IUpdateCarRequest=} [properties] Properties to set + */ + function UpdateCarRequest(properties) { + this.earnedItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCarRequest carId. + * @member {number} carId + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.carId = 0; + + /** + * UpdateCarRequest car. + * @member {wm.protobuf.ICar|null|undefined} car + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.car = null; + + /** + * UpdateCarRequest earnedItems. + * @member {Array.} earnedItems + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.earnedItems = $util.emptyArray; + + /** + * UpdateCarRequest setting. + * @member {wm.protobuf.ICarSetting|null|undefined} setting + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.setting = null; + + /** + * UpdateCarRequest toBeDeleted. + * @member {boolean} toBeDeleted + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.toBeDeleted = false; + + /** + * UpdateCarRequest auraMotifAutoChange. + * @member {boolean} auraMotifAutoChange + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.auraMotifAutoChange = false; + + /** + * UpdateCarRequest rgStamp. + * @member {number} rgStamp + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.rgStamp = 0; + + /** + * UpdateCarRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.timestamp = 0; + + /** + * Creates a new UpdateCarRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.IUpdateCarRequest=} [properties] Properties to set + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest instance + */ + UpdateCarRequest.create = function create(properties) { + return new UpdateCarRequest(properties); + }; + + /** + * Encodes the specified UpdateCarRequest message. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.IUpdateCarRequest} message UpdateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.car != null && Object.hasOwnProperty.call(message, "car")) + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.earnedItems != null && message.earnedItems.length) + for (let i = 0; i < message.earnedItems.length; ++i) + $root.wm.protobuf.CarItem.encode(message.earnedItems[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.setting != null && Object.hasOwnProperty.call(message, "setting")) + $root.wm.protobuf.CarSetting.encode(message.setting, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.toBeDeleted != null && Object.hasOwnProperty.call(message, "toBeDeleted")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.toBeDeleted); + if (message.auraMotifAutoChange != null && Object.hasOwnProperty.call(message, "auraMotifAutoChange")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.auraMotifAutoChange); + if (message.rgStamp != null && Object.hasOwnProperty.call(message, "rgStamp")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.rgStamp); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified UpdateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.IUpdateCarRequest} message UpdateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateCarRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.earnedItems && message.earnedItems.length)) + message.earnedItems = []; + message.earnedItems.push($root.wm.protobuf.CarItem.decode(reader, reader.uint32())); + break; + } + case 5: { + message.setting = $root.wm.protobuf.CarSetting.decode(reader, reader.uint32()); + break; + } + case 9: { + message.toBeDeleted = reader.bool(); + break; + } + case 10: { + message.auraMotifAutoChange = reader.bool(); + break; + } + case 12: { + message.rgStamp = reader.uint32(); + break; + } + case 13: { + message.timestamp = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCarRequest message. + * @function verify + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCarRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.car != null && message.hasOwnProperty("car")) { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.earnedItems != null && message.hasOwnProperty("earnedItems")) { + if (!Array.isArray(message.earnedItems)) + return "earnedItems: array expected"; + for (let i = 0; i < message.earnedItems.length; ++i) { + let error = $root.wm.protobuf.CarItem.verify(message.earnedItems[i]); + if (error) + return "earnedItems." + error; + } + } + if (message.setting != null && message.hasOwnProperty("setting")) { + let error = $root.wm.protobuf.CarSetting.verify(message.setting); + if (error) + return "setting." + error; + } + if (message.toBeDeleted != null && message.hasOwnProperty("toBeDeleted")) + if (typeof message.toBeDeleted !== "boolean") + return "toBeDeleted: boolean expected"; + if (message.auraMotifAutoChange != null && message.hasOwnProperty("auraMotifAutoChange")) + if (typeof message.auraMotifAutoChange !== "boolean") + return "auraMotifAutoChange: boolean expected"; + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + if (!$util.isInteger(message.rgStamp)) + return "rgStamp: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + return null; + }; + + /** + * Creates an UpdateCarRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest + */ + UpdateCarRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateCarRequest) + return object; + let message = new $root.wm.protobuf.UpdateCarRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.UpdateCarRequest.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.earnedItems) { + if (!Array.isArray(object.earnedItems)) + throw TypeError(".wm.protobuf.UpdateCarRequest.earnedItems: array expected"); + message.earnedItems = []; + for (let i = 0; i < object.earnedItems.length; ++i) { + if (typeof object.earnedItems[i] !== "object") + throw TypeError(".wm.protobuf.UpdateCarRequest.earnedItems: object expected"); + message.earnedItems[i] = $root.wm.protobuf.CarItem.fromObject(object.earnedItems[i]); + } + } + if (object.setting != null) { + if (typeof object.setting !== "object") + throw TypeError(".wm.protobuf.UpdateCarRequest.setting: object expected"); + message.setting = $root.wm.protobuf.CarSetting.fromObject(object.setting); + } + if (object.toBeDeleted != null) + message.toBeDeleted = Boolean(object.toBeDeleted); + if (object.auraMotifAutoChange != null) + message.auraMotifAutoChange = Boolean(object.auraMotifAutoChange); + if (object.rgStamp != null) + message.rgStamp = object.rgStamp >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + return message; + }; + + /** + * Creates a plain object from an UpdateCarRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.UpdateCarRequest} message UpdateCarRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCarRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.earnedItems = []; + if (options.defaults) { + object.carId = 0; + object.car = null; + object.setting = null; + object.toBeDeleted = false; + object.auraMotifAutoChange = false; + object.rgStamp = 0; + object.timestamp = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.earnedItems && message.earnedItems.length) { + object.earnedItems = []; + for (let j = 0; j < message.earnedItems.length; ++j) + object.earnedItems[j] = $root.wm.protobuf.CarItem.toObject(message.earnedItems[j], options); + } + if (message.setting != null && message.hasOwnProperty("setting")) + object.setting = $root.wm.protobuf.CarSetting.toObject(message.setting, options); + if (message.toBeDeleted != null && message.hasOwnProperty("toBeDeleted")) + object.toBeDeleted = message.toBeDeleted; + if (message.auraMotifAutoChange != null && message.hasOwnProperty("auraMotifAutoChange")) + object.auraMotifAutoChange = message.auraMotifAutoChange; + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + object.rgStamp = message.rgStamp; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this UpdateCarRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateCarRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCarRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCarRequest + * @function getTypeUrl + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCarRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateCarRequest"; + }; + + return UpdateCarRequest; + })(); + + protobuf.UpdateCarResponse = (function() { + + /** + * Properties of an UpdateCarResponse. + * @memberof wm.protobuf + * @interface IUpdateCarResponse + * @property {wm.protobuf.ErrorCode} error UpdateCarResponse error + */ + + /** + * Constructs a new UpdateCarResponse. + * @memberof wm.protobuf + * @classdesc Represents an UpdateCarResponse. + * @implements IUpdateCarResponse + * @constructor + * @param {wm.protobuf.IUpdateCarResponse=} [properties] Properties to set + */ + function UpdateCarResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCarResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.UpdateCarResponse + * @instance + */ + UpdateCarResponse.prototype.error = 0; + + /** + * Creates a new UpdateCarResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.IUpdateCarResponse=} [properties] Properties to set + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse instance + */ + UpdateCarResponse.create = function create(properties) { + return new UpdateCarResponse(properties); + }; + + /** + * Encodes the specified UpdateCarResponse message. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.IUpdateCarResponse} message UpdateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified UpdateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.IUpdateCarResponse} message UpdateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateCarResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCarResponse message. + * @function verify + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCarResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates an UpdateCarResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse + */ + UpdateCarResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateCarResponse) + return object; + let message = new $root.wm.protobuf.UpdateCarResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from an UpdateCarResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.UpdateCarResponse} message UpdateCarResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCarResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this UpdateCarResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateCarResponse + * @instance + * @returns {Object.} JSON object + */ + UpdateCarResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCarResponse + * @function getTypeUrl + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCarResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateCarResponse"; + }; + + return UpdateCarResponse; + })(); + + protobuf.SaveGameResultRequest = (function() { + + /** + * Properties of a SaveGameResultRequest. + * @memberof wm.protobuf + * @interface ISaveGameResultRequest + * @property {number} carId SaveGameResultRequest carId + * @property {wm.protobuf.GameMode} gameMode SaveGameResultRequest gameMode + * @property {number} playedAt SaveGameResultRequest playedAt + * @property {number} playCount SaveGameResultRequest playCount + * @property {boolean} retired SaveGameResultRequest retired + * @property {boolean} timeup SaveGameResultRequest timeup + * @property {wm.protobuf.ICar|null} [car] SaveGameResultRequest car + * @property {wm.protobuf.ICarSetting|null} [setting] SaveGameResultRequest setting + * @property {number|null} [odometer] SaveGameResultRequest odometer + * @property {boolean|null} [earnedCustomColor] SaveGameResultRequest earnedCustomColor + * @property {Array.|null} [confirmedTutorials] SaveGameResultRequest confirmedTutorials + * @property {Array.|null} [earnedItems] SaveGameResultRequest earnedItems + * @property {Array.|null} [earnedUserItems] SaveGameResultRequest earnedUserItems + * @property {Array.|null} [preservedTitles] SaveGameResultRequest preservedTitles + * @property {Array.|null} [neighborCars] SaveGameResultRequest neighborCars + * @property {wm.protobuf.SaveGameResultRequest.IStoryResult|null} [stResult] SaveGameResultRequest stResult + * @property {wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null} [taResult] SaveGameResultRequest taResult + * @property {wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null} [vsResult] SaveGameResultRequest vsResult + * @property {wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null} [rgResult] SaveGameResultRequest rgResult + */ + + /** + * Constructs a new SaveGameResultRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveGameResultRequest. + * @implements ISaveGameResultRequest + * @constructor + * @param {wm.protobuf.ISaveGameResultRequest=} [properties] Properties to set + */ + function SaveGameResultRequest(properties) { + this.confirmedTutorials = []; + this.earnedItems = []; + this.earnedUserItems = []; + this.preservedTitles = []; + this.neighborCars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveGameResultRequest carId. + * @member {number} carId + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.carId = 0; + + /** + * SaveGameResultRequest gameMode. + * @member {wm.protobuf.GameMode} gameMode + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.gameMode = 1; + + /** + * SaveGameResultRequest playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.playedAt = 0; + + /** + * SaveGameResultRequest playCount. + * @member {number} playCount + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.playCount = 0; + + /** + * SaveGameResultRequest retired. + * @member {boolean} retired + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.retired = false; + + /** + * SaveGameResultRequest timeup. + * @member {boolean} timeup + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.timeup = false; + + /** + * SaveGameResultRequest car. + * @member {wm.protobuf.ICar|null|undefined} car + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.car = null; + + /** + * SaveGameResultRequest setting. + * @member {wm.protobuf.ICarSetting|null|undefined} setting + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.setting = null; + + /** + * SaveGameResultRequest odometer. + * @member {number} odometer + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.odometer = 0; + + /** + * SaveGameResultRequest earnedCustomColor. + * @member {boolean} earnedCustomColor + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.earnedCustomColor = false; + + /** + * SaveGameResultRequest confirmedTutorials. + * @member {Array.} confirmedTutorials + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.confirmedTutorials = $util.emptyArray; + + /** + * SaveGameResultRequest earnedItems. + * @member {Array.} earnedItems + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.earnedItems = $util.emptyArray; + + /** + * SaveGameResultRequest earnedUserItems. + * @member {Array.} earnedUserItems + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.earnedUserItems = $util.emptyArray; + + /** + * SaveGameResultRequest preservedTitles. + * @member {Array.} preservedTitles + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.preservedTitles = $util.emptyArray; + + /** + * SaveGameResultRequest neighborCars. + * @member {Array.} neighborCars + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.neighborCars = $util.emptyArray; + + /** + * SaveGameResultRequest stResult. + * @member {wm.protobuf.SaveGameResultRequest.IStoryResult|null|undefined} stResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.stResult = null; + + /** + * SaveGameResultRequest taResult. + * @member {wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null|undefined} taResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.taResult = null; + + /** + * SaveGameResultRequest vsResult. + * @member {wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null|undefined} vsResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.vsResult = null; + + /** + * SaveGameResultRequest rgResult. + * @member {wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null|undefined} rgResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.rgResult = null; + + /** + * Creates a new SaveGameResultRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.ISaveGameResultRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest instance + */ + SaveGameResultRequest.create = function create(properties) { + return new SaveGameResultRequest(properties); + }; + + /** + * Encodes the specified SaveGameResultRequest message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.ISaveGameResultRequest} message SaveGameResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gameMode); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.playedAt); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.playCount); + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.retired); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.timeup); + if (message.car != null && Object.hasOwnProperty.call(message, "car")) + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.setting != null && Object.hasOwnProperty.call(message, "setting")) + $root.wm.protobuf.CarSetting.encode(message.setting, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.odometer != null && Object.hasOwnProperty.call(message, "odometer")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.odometer); + if (message.earnedCustomColor != null && Object.hasOwnProperty.call(message, "earnedCustomColor")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.earnedCustomColor); + if (message.confirmedTutorials != null && message.confirmedTutorials.length) + for (let i = 0; i < message.confirmedTutorials.length; ++i) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.confirmedTutorials[i]); + if (message.earnedItems != null && message.earnedItems.length) + for (let i = 0; i < message.earnedItems.length; ++i) + $root.wm.protobuf.CarItem.encode(message.earnedItems[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.earnedUserItems != null && message.earnedUserItems.length) + for (let i = 0; i < message.earnedUserItems.length; ++i) + $root.wm.protobuf.UserItem.encode(message.earnedUserItems[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.preservedTitles != null && message.preservedTitles.length) + for (let i = 0; i < message.preservedTitles.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.preservedTitles[i]); + if (message.neighborCars != null && message.neighborCars.length) + for (let i = 0; i < message.neighborCars.length; ++i) + writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.neighborCars[i]); + if (message.stResult != null && Object.hasOwnProperty.call(message, "stResult")) + $root.wm.protobuf.SaveGameResultRequest.StoryResult.encode(message.stResult, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.taResult != null && Object.hasOwnProperty.call(message, "taResult")) + $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.encode(message.taResult, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.vsResult != null && Object.hasOwnProperty.call(message, "vsResult")) + $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.encode(message.vsResult, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.rgResult != null && Object.hasOwnProperty.call(message, "rgResult")) + $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.encode(message.rgResult, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveGameResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.ISaveGameResultRequest} message SaveGameResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.gameMode = reader.int32(); + break; + } + case 3: { + message.playedAt = reader.uint32(); + break; + } + case 4: { + message.playCount = reader.uint32(); + break; + } + case 5: { + message.retired = reader.bool(); + break; + } + case 6: { + message.timeup = reader.bool(); + break; + } + case 7: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 8: { + message.setting = $root.wm.protobuf.CarSetting.decode(reader, reader.uint32()); + break; + } + case 9: { + message.odometer = reader.uint32(); + break; + } + case 11: { + message.earnedCustomColor = reader.bool(); + break; + } + case 12: { + if (!(message.confirmedTutorials && message.confirmedTutorials.length)) + message.confirmedTutorials = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.confirmedTutorials.push(reader.int32()); + } else + message.confirmedTutorials.push(reader.int32()); + break; + } + case 13: { + if (!(message.earnedItems && message.earnedItems.length)) + message.earnedItems = []; + message.earnedItems.push($root.wm.protobuf.CarItem.decode(reader, reader.uint32())); + break; + } + case 14: { + if (!(message.earnedUserItems && message.earnedUserItems.length)) + message.earnedUserItems = []; + message.earnedUserItems.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + case 15: { + if (!(message.preservedTitles && message.preservedTitles.length)) + message.preservedTitles = []; + message.preservedTitles.push(reader.string()); + break; + } + case 21: { + if (!(message.neighborCars && message.neighborCars.length)) + message.neighborCars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.neighborCars.push(reader.uint32()); + } else + message.neighborCars.push(reader.uint32()); + break; + } + case 22: { + message.stResult = $root.wm.protobuf.SaveGameResultRequest.StoryResult.decode(reader, reader.uint32()); + break; + } + case 23: { + message.taResult = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.decode(reader, reader.uint32()); + break; + } + case 24: { + message.vsResult = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.decode(reader, reader.uint32()); + break; + } + case 25: { + message.rgResult = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("gameMode")) + throw $util.ProtocolError("missing required 'gameMode'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + if (!message.hasOwnProperty("playCount")) + throw $util.ProtocolError("missing required 'playCount'", { instance: message }); + if (!message.hasOwnProperty("retired")) + throw $util.ProtocolError("missing required 'retired'", { instance: message }); + if (!message.hasOwnProperty("timeup")) + throw $util.ProtocolError("missing required 'timeup'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveGameResultRequest message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveGameResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + switch (message.gameMode) { + default: + return "gameMode: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (!$util.isInteger(message.playCount)) + return "playCount: integer expected"; + if (typeof message.retired !== "boolean") + return "retired: boolean expected"; + if (typeof message.timeup !== "boolean") + return "timeup: boolean expected"; + if (message.car != null && message.hasOwnProperty("car")) { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.setting != null && message.hasOwnProperty("setting")) { + let error = $root.wm.protobuf.CarSetting.verify(message.setting); + if (error) + return "setting." + error; + } + if (message.odometer != null && message.hasOwnProperty("odometer")) + if (!$util.isInteger(message.odometer)) + return "odometer: integer expected"; + if (message.earnedCustomColor != null && message.hasOwnProperty("earnedCustomColor")) + if (typeof message.earnedCustomColor !== "boolean") + return "earnedCustomColor: boolean expected"; + if (message.confirmedTutorials != null && message.hasOwnProperty("confirmedTutorials")) { + if (!Array.isArray(message.confirmedTutorials)) + return "confirmedTutorials: array expected"; + for (let i = 0; i < message.confirmedTutorials.length; ++i) + switch (message.confirmedTutorials[i]) { + default: + return "confirmedTutorials: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + break; + } + } + if (message.earnedItems != null && message.hasOwnProperty("earnedItems")) { + if (!Array.isArray(message.earnedItems)) + return "earnedItems: array expected"; + for (let i = 0; i < message.earnedItems.length; ++i) { + let error = $root.wm.protobuf.CarItem.verify(message.earnedItems[i]); + if (error) + return "earnedItems." + error; + } + } + if (message.earnedUserItems != null && message.hasOwnProperty("earnedUserItems")) { + if (!Array.isArray(message.earnedUserItems)) + return "earnedUserItems: array expected"; + for (let i = 0; i < message.earnedUserItems.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.earnedUserItems[i]); + if (error) + return "earnedUserItems." + error; + } + } + if (message.preservedTitles != null && message.hasOwnProperty("preservedTitles")) { + if (!Array.isArray(message.preservedTitles)) + return "preservedTitles: array expected"; + for (let i = 0; i < message.preservedTitles.length; ++i) + if (!$util.isString(message.preservedTitles[i])) + return "preservedTitles: string[] expected"; + } + if (message.neighborCars != null && message.hasOwnProperty("neighborCars")) { + if (!Array.isArray(message.neighborCars)) + return "neighborCars: array expected"; + for (let i = 0; i < message.neighborCars.length; ++i) + if (!$util.isInteger(message.neighborCars[i])) + return "neighborCars: integer[] expected"; + } + if (message.stResult != null && message.hasOwnProperty("stResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.StoryResult.verify(message.stResult); + if (error) + return "stResult." + error; + } + if (message.taResult != null && message.hasOwnProperty("taResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify(message.taResult); + if (error) + return "taResult." + error; + } + if (message.vsResult != null && message.hasOwnProperty("vsResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify(message.vsResult); + if (error) + return "vsResult." + error; + } + if (message.rgResult != null && message.hasOwnProperty("rgResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify(message.rgResult); + if (error) + return "rgResult." + error; + } + return null; + }; + + /** + * Creates a SaveGameResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest + */ + SaveGameResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + switch (object.gameMode) { + case "MODE_STORY": + case 1: + message.gameMode = 1; + break; + case "MODE_TIME_ATTACK": + case 2: + message.gameMode = 2; + break; + case "MODE_VS_BATTLE": + case 3: + message.gameMode = 3; + break; + case "MODE_GHOST_BATTLE": + case 4: + message.gameMode = 4; + break; + case "MODE_EVENT": + case 5: + message.gameMode = 5; + break; + } + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.playCount != null) + message.playCount = object.playCount >>> 0; + if (object.retired != null) + message.retired = Boolean(object.retired); + if (object.timeup != null) + message.timeup = Boolean(object.timeup); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.setting != null) { + if (typeof object.setting !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.setting: object expected"); + message.setting = $root.wm.protobuf.CarSetting.fromObject(object.setting); + } + if (object.odometer != null) + message.odometer = object.odometer >>> 0; + if (object.earnedCustomColor != null) + message.earnedCustomColor = Boolean(object.earnedCustomColor); + if (object.confirmedTutorials) { + if (!Array.isArray(object.confirmedTutorials)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.confirmedTutorials: array expected"); + message.confirmedTutorials = []; + for (let i = 0; i < object.confirmedTutorials.length; ++i) + switch (object.confirmedTutorials[i]) { + default: + case "TUTORIAL_ID_STORY": + case 0: + message.confirmedTutorials[i] = 0; + break; + case "TUTORIAL_ID_TIME_ATTACK": + case 1: + message.confirmedTutorials[i] = 1; + break; + case "TUTORIAL_ID_GHOST": + case 2: + message.confirmedTutorials[i] = 2; + break; + case "TUTORIAL_ID_GHOST_CHALLENGE": + case 3: + message.confirmedTutorials[i] = 3; + break; + case "TUTORIAL_ID_GHOST_LEVEL": + case 4: + message.confirmedTutorials[i] = 4; + break; + case "TUTORIAL_ID_UNUSED_5": + case 5: + message.confirmedTutorials[i] = 5; + break; + case "TUTORIAL_ID_GHOST_SEARCH": + case 6: + message.confirmedTutorials[i] = 6; + break; + case "TUTORIAL_ID_GHOST_COMPETITION": + case 7: + message.confirmedTutorials[i] = 7; + break; + case "TUTORIAL_ID_HP600_CARD": + case 8: + message.confirmedTutorials[i] = 8; + break; + case "TUTORIAL_ID_UNUSED_9": + case 9: + message.confirmedTutorials[i] = 9; + break; + case "TUTORIAL_ID_COMPETITION_QUALIFIED": + case 10: + message.confirmedTutorials[i] = 10; + break; + case "TUTORIAL_ID_COMPETITION_TERMINAL": + case 11: + message.confirmedTutorials[i] = 11; + break; + case "TUTORIAL_ID_COMPETITION_NOTICE": + case 12: + message.confirmedTutorials[i] = 12; + break; + case "TUTORIAL_ID_COMPETITION_FINISHED": + case 13: + message.confirmedTutorials[i] = 13; + break; + case "TUTORIAL_ID_UNUSED_14": + case 14: + message.confirmedTutorials[i] = 14; + break; + case "TUTORIAL_ID_UNUSED_15": + case 15: + message.confirmedTutorials[i] = 15; + break; + case "TUTORIAL_ID_UNUSED_16": + case 16: + message.confirmedTutorials[i] = 16; + break; + case "TUTORIAL_ID_UNUSED_17": + case 17: + message.confirmedTutorials[i] = 17; + break; + case "TUTORIAL_ID_UNUSED_18": + case 18: + message.confirmedTutorials[i] = 18; + break; + case "TUTORIAL_ID_UNUSED_19": + case 19: + message.confirmedTutorials[i] = 19; + break; + case "TUTORIAL_ID_GHOST_STAMP": + case 20: + message.confirmedTutorials[i] = 20; + break; + case "TUTORIAL_ID_GHOST_STAMP_DECLINED": + case 21: + message.confirmedTutorials[i] = 21; + break; + case "TUTORIAL_ID_GHOST_STAMP_FRIENDS": + case 22: + message.confirmedTutorials[i] = 22; + break; + case "TUTORIAL_ID_TERMINAL_SCRATCH": + case 23: + message.confirmedTutorials[i] = 23; + break; + case "TUTORIAL_ID_TURN_SCRATCH_SHEET": + case 24: + message.confirmedTutorials[i] = 24; + break; + case "TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN": + case 25: + message.confirmedTutorials[i] = 25; + break; + case "TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE": + case 26: + message.confirmedTutorials[i] = 26; + break; + case "TUTORIAL_ID_VS_CONTINUE_TICKET": + case 27: + message.confirmedTutorials[i] = 27; + break; + case "TUTORIAL_ID_UNUSED_28": + case 28: + message.confirmedTutorials[i] = 28; + break; + case "TUTORIAL_ID_UNUSED_29": + case 29: + message.confirmedTutorials[i] = 29; + break; + case "TUTORIAL_ID_UNUSED_30": + case 30: + message.confirmedTutorials[i] = 30; + break; + case "TUTORIAL_ID_DRESS_UP": + case 31: + message.confirmedTutorials[i] = 31; + break; + case "TUTORIAL_ID_MULTI_GHOST": + case 32: + message.confirmedTutorials[i] = 32; + break; + case "TUTORIAL_ID_STORY_NEW_FEATURE": + case 33: + message.confirmedTutorials[i] = 33; + break; + case "TUTORIAL_ID_GHOST_NEW_FEATURE": + case 34: + message.confirmedTutorials[i] = 34; + break; + case "TUTORIAL_ID_GHOST_REGION_MAP": + case 35: + message.confirmedTutorials[i] = 35; + break; + } + } + if (object.earnedItems) { + if (!Array.isArray(object.earnedItems)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedItems: array expected"); + message.earnedItems = []; + for (let i = 0; i < object.earnedItems.length; ++i) { + if (typeof object.earnedItems[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedItems: object expected"); + message.earnedItems[i] = $root.wm.protobuf.CarItem.fromObject(object.earnedItems[i]); + } + } + if (object.earnedUserItems) { + if (!Array.isArray(object.earnedUserItems)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedUserItems: array expected"); + message.earnedUserItems = []; + for (let i = 0; i < object.earnedUserItems.length; ++i) { + if (typeof object.earnedUserItems[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedUserItems: object expected"); + message.earnedUserItems[i] = $root.wm.protobuf.UserItem.fromObject(object.earnedUserItems[i]); + } + } + if (object.preservedTitles) { + if (!Array.isArray(object.preservedTitles)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.preservedTitles: array expected"); + message.preservedTitles = []; + for (let i = 0; i < object.preservedTitles.length; ++i) + message.preservedTitles[i] = String(object.preservedTitles[i]); + } + if (object.neighborCars) { + if (!Array.isArray(object.neighborCars)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.neighborCars: array expected"); + message.neighborCars = []; + for (let i = 0; i < object.neighborCars.length; ++i) + message.neighborCars[i] = object.neighborCars[i] >>> 0; + } + if (object.stResult != null) { + if (typeof object.stResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.stResult: object expected"); + message.stResult = $root.wm.protobuf.SaveGameResultRequest.StoryResult.fromObject(object.stResult); + } + if (object.taResult != null) { + if (typeof object.taResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.taResult: object expected"); + message.taResult = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.fromObject(object.taResult); + } + if (object.vsResult != null) { + if (typeof object.vsResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.vsResult: object expected"); + message.vsResult = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.fromObject(object.vsResult); + } + if (object.rgResult != null) { + if (typeof object.rgResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.rgResult: object expected"); + message.rgResult = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.fromObject(object.rgResult); + } + return message; + }; + + /** + * Creates a plain object from a SaveGameResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.SaveGameResultRequest} message SaveGameResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveGameResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.confirmedTutorials = []; + object.earnedItems = []; + object.earnedUserItems = []; + object.preservedTitles = []; + object.neighborCars = []; + } + if (options.defaults) { + object.carId = 0; + object.gameMode = options.enums === String ? "MODE_STORY" : 1; + object.playedAt = 0; + object.playCount = 0; + object.retired = false; + object.timeup = false; + object.car = null; + object.setting = null; + object.odometer = 0; + object.earnedCustomColor = false; + object.stResult = null; + object.taResult = null; + object.vsResult = null; + object.rgResult = null; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.gameMode != null && message.hasOwnProperty("gameMode")) + object.gameMode = options.enums === String ? $root.wm.protobuf.GameMode[message.gameMode] : message.gameMode; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.playCount != null && message.hasOwnProperty("playCount")) + object.playCount = message.playCount; + if (message.retired != null && message.hasOwnProperty("retired")) + object.retired = message.retired; + if (message.timeup != null && message.hasOwnProperty("timeup")) + object.timeup = message.timeup; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.setting != null && message.hasOwnProperty("setting")) + object.setting = $root.wm.protobuf.CarSetting.toObject(message.setting, options); + if (message.odometer != null && message.hasOwnProperty("odometer")) + object.odometer = message.odometer; + if (message.earnedCustomColor != null && message.hasOwnProperty("earnedCustomColor")) + object.earnedCustomColor = message.earnedCustomColor; + if (message.confirmedTutorials && message.confirmedTutorials.length) { + object.confirmedTutorials = []; + for (let j = 0; j < message.confirmedTutorials.length; ++j) + object.confirmedTutorials[j] = options.enums === String ? $root.wm.protobuf.TutorialType[message.confirmedTutorials[j]] : message.confirmedTutorials[j]; + } + if (message.earnedItems && message.earnedItems.length) { + object.earnedItems = []; + for (let j = 0; j < message.earnedItems.length; ++j) + object.earnedItems[j] = $root.wm.protobuf.CarItem.toObject(message.earnedItems[j], options); + } + if (message.earnedUserItems && message.earnedUserItems.length) { + object.earnedUserItems = []; + for (let j = 0; j < message.earnedUserItems.length; ++j) + object.earnedUserItems[j] = $root.wm.protobuf.UserItem.toObject(message.earnedUserItems[j], options); + } + if (message.preservedTitles && message.preservedTitles.length) { + object.preservedTitles = []; + for (let j = 0; j < message.preservedTitles.length; ++j) + object.preservedTitles[j] = message.preservedTitles[j]; + } + if (message.neighborCars && message.neighborCars.length) { + object.neighborCars = []; + for (let j = 0; j < message.neighborCars.length; ++j) + object.neighborCars[j] = message.neighborCars[j]; + } + if (message.stResult != null && message.hasOwnProperty("stResult")) + object.stResult = $root.wm.protobuf.SaveGameResultRequest.StoryResult.toObject(message.stResult, options); + if (message.taResult != null && message.hasOwnProperty("taResult")) + object.taResult = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.toObject(message.taResult, options); + if (message.vsResult != null && message.hasOwnProperty("vsResult")) + object.vsResult = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.toObject(message.vsResult, options); + if (message.rgResult != null && message.hasOwnProperty("rgResult")) + object.rgResult = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.toObject(message.rgResult, options); + return object; + }; + + /** + * Converts this SaveGameResultRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + * @returns {Object.} JSON object + */ + SaveGameResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveGameResultRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveGameResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest"; + }; + + SaveGameResultRequest.StoryResult = (function() { + + /** + * Properties of a StoryResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface IStoryResult + * @property {number} stPlayCount StoryResult stPlayCount + * @property {number} stPlayedStory StoryResult stPlayedStory + * @property {number|null} [tuningPoint] StoryResult tuningPoint + * @property {number|null} [stClearBits] StoryResult stClearBits + * @property {number|null} [stClearDivCount] StoryResult stClearDivCount + * @property {number|null} [stClearCount] StoryResult stClearCount + * @property {number|Long|null} [stLoseBits] StoryResult stLoseBits + * @property {number|null} [stConsecutiveWins] StoryResult stConsecutiveWins + * @property {boolean|null} [stCompleted_100Episodes] StoryResult stCompleted_100Episodes + * @property {boolean|null} [isInsuranceUsed] StoryResult isInsuranceUsed + */ + + /** + * Constructs a new StoryResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a StoryResult. + * @implements IStoryResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult=} [properties] Properties to set + */ + function StoryResult(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoryResult stPlayCount. + * @member {number} stPlayCount + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stPlayCount = 0; + + /** + * StoryResult stPlayedStory. + * @member {number} stPlayedStory + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stPlayedStory = 0; + + /** + * StoryResult tuningPoint. + * @member {number} tuningPoint + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.tuningPoint = 0; + + /** + * StoryResult stClearBits. + * @member {number} stClearBits + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stClearBits = 0; + + /** + * StoryResult stClearDivCount. + * @member {number} stClearDivCount + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stClearDivCount = 0; + + /** + * StoryResult stClearCount. + * @member {number} stClearCount + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stClearCount = 0; + + /** + * StoryResult stLoseBits. + * @member {number|Long} stLoseBits + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stLoseBits = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * StoryResult stConsecutiveWins. + * @member {number} stConsecutiveWins + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stConsecutiveWins = 0; + + /** + * StoryResult stCompleted_100Episodes. + * @member {boolean} stCompleted_100Episodes + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stCompleted_100Episodes = false; + + /** + * StoryResult isInsuranceUsed. + * @member {boolean} isInsuranceUsed + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.isInsuranceUsed = false; + + /** + * Creates a new StoryResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult instance + */ + StoryResult.create = function create(properties) { + return new StoryResult(properties); + }; + + /** + * Encodes the specified StoryResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult} message StoryResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.stPlayCount); + if (message.tuningPoint != null && Object.hasOwnProperty.call(message, "tuningPoint")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuningPoint); + if (message.stClearBits != null && Object.hasOwnProperty.call(message, "stClearBits")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stClearBits); + if (message.stClearDivCount != null && Object.hasOwnProperty.call(message, "stClearDivCount")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stClearDivCount); + if (message.stClearCount != null && Object.hasOwnProperty.call(message, "stClearCount")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.stClearCount); + if (message.stLoseBits != null && Object.hasOwnProperty.call(message, "stLoseBits")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.stLoseBits); + if (message.stConsecutiveWins != null && Object.hasOwnProperty.call(message, "stConsecutiveWins")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stConsecutiveWins); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.stPlayedStory); + if (message.stCompleted_100Episodes != null && Object.hasOwnProperty.call(message, "stCompleted_100Episodes")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.stCompleted_100Episodes); + if (message.isInsuranceUsed != null && Object.hasOwnProperty.call(message, "isInsuranceUsed")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.isInsuranceUsed); + return writer; + }; + + /** + * Encodes the specified StoryResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult} message StoryResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoryResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.StoryResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.stPlayCount = reader.uint32(); + break; + } + case 9: { + message.stPlayedStory = reader.uint32(); + break; + } + case 2: { + message.tuningPoint = reader.uint32(); + break; + } + case 3: { + message.stClearBits = reader.uint32(); + break; + } + case 4: { + message.stClearDivCount = reader.uint32(); + break; + } + case 5: { + message.stClearCount = reader.uint32(); + break; + } + case 6: { + message.stLoseBits = reader.uint64(); + break; + } + case 8: { + message.stConsecutiveWins = reader.uint32(); + break; + } + case 10: { + message.stCompleted_100Episodes = reader.bool(); + break; + } + case 11: { + message.isInsuranceUsed = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("stPlayCount")) + throw $util.ProtocolError("missing required 'stPlayCount'", { instance: message }); + if (!message.hasOwnProperty("stPlayedStory")) + throw $util.ProtocolError("missing required 'stPlayedStory'", { instance: message }); + return message; + }; + + /** + * Decodes a StoryResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoryResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoryResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.stPlayCount)) + return "stPlayCount: integer expected"; + if (!$util.isInteger(message.stPlayedStory)) + return "stPlayedStory: integer expected"; + if (message.tuningPoint != null && message.hasOwnProperty("tuningPoint")) + if (!$util.isInteger(message.tuningPoint)) + return "tuningPoint: integer expected"; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + if (!$util.isInteger(message.stClearBits)) + return "stClearBits: integer expected"; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + if (!$util.isInteger(message.stClearDivCount)) + return "stClearDivCount: integer expected"; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + if (!$util.isInteger(message.stClearCount)) + return "stClearCount: integer expected"; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (!$util.isInteger(message.stLoseBits) && !(message.stLoseBits && $util.isInteger(message.stLoseBits.low) && $util.isInteger(message.stLoseBits.high))) + return "stLoseBits: integer|Long expected"; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + if (!$util.isInteger(message.stConsecutiveWins)) + return "stConsecutiveWins: integer expected"; + if (message.stCompleted_100Episodes != null && message.hasOwnProperty("stCompleted_100Episodes")) + if (typeof message.stCompleted_100Episodes !== "boolean") + return "stCompleted_100Episodes: boolean expected"; + if (message.isInsuranceUsed != null && message.hasOwnProperty("isInsuranceUsed")) + if (typeof message.isInsuranceUsed !== "boolean") + return "isInsuranceUsed: boolean expected"; + return null; + }; + + /** + * Creates a StoryResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult + */ + StoryResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.StoryResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.StoryResult(); + if (object.stPlayCount != null) + message.stPlayCount = object.stPlayCount >>> 0; + if (object.stPlayedStory != null) + message.stPlayedStory = object.stPlayedStory >>> 0; + if (object.tuningPoint != null) + message.tuningPoint = object.tuningPoint >>> 0; + if (object.stClearBits != null) + message.stClearBits = object.stClearBits >>> 0; + if (object.stClearDivCount != null) + message.stClearDivCount = object.stClearDivCount >>> 0; + if (object.stClearCount != null) + message.stClearCount = object.stClearCount >>> 0; + if (object.stLoseBits != null) + if ($util.Long) + (message.stLoseBits = $util.Long.fromValue(object.stLoseBits)).unsigned = true; + else if (typeof object.stLoseBits === "string") + message.stLoseBits = parseInt(object.stLoseBits, 10); + else if (typeof object.stLoseBits === "number") + message.stLoseBits = object.stLoseBits; + else if (typeof object.stLoseBits === "object") + message.stLoseBits = new $util.LongBits(object.stLoseBits.low >>> 0, object.stLoseBits.high >>> 0).toNumber(true); + if (object.stConsecutiveWins != null) + message.stConsecutiveWins = object.stConsecutiveWins >>> 0; + if (object.stCompleted_100Episodes != null) + message.stCompleted_100Episodes = Boolean(object.stCompleted_100Episodes); + if (object.isInsuranceUsed != null) + message.isInsuranceUsed = Boolean(object.isInsuranceUsed); + return message; + }; + + /** + * Creates a plain object from a StoryResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.StoryResult} message StoryResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoryResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.stPlayCount = 0; + object.tuningPoint = 0; + object.stClearBits = 0; + object.stClearDivCount = 0; + object.stClearCount = 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.stLoseBits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.stLoseBits = options.longs === String ? "0" : 0; + object.stConsecutiveWins = 0; + object.stPlayedStory = 0; + object.stCompleted_100Episodes = false; + object.isInsuranceUsed = false; + } + if (message.stPlayCount != null && message.hasOwnProperty("stPlayCount")) + object.stPlayCount = message.stPlayCount; + if (message.tuningPoint != null && message.hasOwnProperty("tuningPoint")) + object.tuningPoint = message.tuningPoint; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + object.stClearBits = message.stClearBits; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + object.stClearDivCount = message.stClearDivCount; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + object.stClearCount = message.stClearCount; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (typeof message.stLoseBits === "number") + object.stLoseBits = options.longs === String ? String(message.stLoseBits) : message.stLoseBits; + else + object.stLoseBits = options.longs === String ? $util.Long.prototype.toString.call(message.stLoseBits) : options.longs === Number ? new $util.LongBits(message.stLoseBits.low >>> 0, message.stLoseBits.high >>> 0).toNumber(true) : message.stLoseBits; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + object.stConsecutiveWins = message.stConsecutiveWins; + if (message.stPlayedStory != null && message.hasOwnProperty("stPlayedStory")) + object.stPlayedStory = message.stPlayedStory; + if (message.stCompleted_100Episodes != null && message.hasOwnProperty("stCompleted_100Episodes")) + object.stCompleted_100Episodes = message.stCompleted_100Episodes; + if (message.isInsuranceUsed != null && message.hasOwnProperty("isInsuranceUsed")) + object.isInsuranceUsed = message.isInsuranceUsed; + return object; + }; + + /** + * Converts this StoryResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + * @returns {Object.} JSON object + */ + StoryResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoryResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.StoryResult"; + }; + + return StoryResult; + })(); + + SaveGameResultRequest.TimeAttackResult = (function() { + + /** + * Properties of a TimeAttackResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface ITimeAttackResult + * @property {number} time TimeAttackResult time + * @property {number} course TimeAttackResult course + * @property {boolean} isMorning TimeAttackResult isMorning + * @property {number} section_1Time TimeAttackResult section_1Time + * @property {number} section_2Time TimeAttackResult section_2Time + * @property {number} section_3Time TimeAttackResult section_3Time + * @property {number} section_4Time TimeAttackResult section_4Time + * @property {number|null} [section_5Time] TimeAttackResult section_5Time + * @property {number|null} [section_6Time] TimeAttackResult section_6Time + * @property {number|null} [section_7Time] TimeAttackResult section_7Time + * @property {number|null} [wholeRank] TimeAttackResult wholeRank + * @property {number|null} [modelRank] TimeAttackResult modelRank + */ + + /** + * Constructs a new TimeAttackResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a TimeAttackResult. + * @implements ITimeAttackResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult=} [properties] Properties to set + */ + function TimeAttackResult(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeAttackResult time. + * @member {number} time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.time = 0; + + /** + * TimeAttackResult course. + * @member {number} course + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.course = 0; + + /** + * TimeAttackResult isMorning. + * @member {boolean} isMorning + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.isMorning = false; + + /** + * TimeAttackResult section_1Time. + * @member {number} section_1Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_1Time = 0; + + /** + * TimeAttackResult section_2Time. + * @member {number} section_2Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_2Time = 0; + + /** + * TimeAttackResult section_3Time. + * @member {number} section_3Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_3Time = 0; + + /** + * TimeAttackResult section_4Time. + * @member {number} section_4Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_4Time = 0; + + /** + * TimeAttackResult section_5Time. + * @member {number} section_5Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_5Time = 0; + + /** + * TimeAttackResult section_6Time. + * @member {number} section_6Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_6Time = 0; + + /** + * TimeAttackResult section_7Time. + * @member {number} section_7Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_7Time = 0; + + /** + * TimeAttackResult wholeRank. + * @member {number} wholeRank + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.wholeRank = 0; + + /** + * TimeAttackResult modelRank. + * @member {number} modelRank + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.modelRank = 0; + + /** + * Creates a new TimeAttackResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult instance + */ + TimeAttackResult.create = function create(properties) { + return new TimeAttackResult(properties); + }; + + /** + * Encodes the specified TimeAttackResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult} message TimeAttackResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.time); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.course); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.section_1Time); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.section_2Time); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.section_3Time); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.section_4Time); + if (message.section_5Time != null && Object.hasOwnProperty.call(message, "section_5Time")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.section_5Time); + if (message.section_6Time != null && Object.hasOwnProperty.call(message, "section_6Time")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.section_6Time); + if (message.section_7Time != null && Object.hasOwnProperty.call(message, "section_7Time")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.section_7Time); + if (message.wholeRank != null && Object.hasOwnProperty.call(message, "wholeRank")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.wholeRank); + if (message.modelRank != null && Object.hasOwnProperty.call(message, "modelRank")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.modelRank); + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isMorning); + return writer; + }; + + /** + * Encodes the specified TimeAttackResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult} message TimeAttackResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.time = reader.uint32(); + break; + } + case 2: { + message.course = reader.uint32(); + break; + } + case 12: { + message.isMorning = reader.bool(); + break; + } + case 3: { + message.section_1Time = reader.uint32(); + break; + } + case 4: { + message.section_2Time = reader.uint32(); + break; + } + case 5: { + message.section_3Time = reader.uint32(); + break; + } + case 6: { + message.section_4Time = reader.uint32(); + break; + } + case 7: { + message.section_5Time = reader.uint32(); + break; + } + case 8: { + message.section_6Time = reader.uint32(); + break; + } + case 9: { + message.section_7Time = reader.uint32(); + break; + } + case 10: { + message.wholeRank = reader.uint32(); + break; + } + case 11: { + message.modelRank = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("time")) + throw $util.ProtocolError("missing required 'time'", { instance: message }); + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + if (!message.hasOwnProperty("isMorning")) + throw $util.ProtocolError("missing required 'isMorning'", { instance: message }); + if (!message.hasOwnProperty("section_1Time")) + throw $util.ProtocolError("missing required 'section_1Time'", { instance: message }); + if (!message.hasOwnProperty("section_2Time")) + throw $util.ProtocolError("missing required 'section_2Time'", { instance: message }); + if (!message.hasOwnProperty("section_3Time")) + throw $util.ProtocolError("missing required 'section_3Time'", { instance: message }); + if (!message.hasOwnProperty("section_4Time")) + throw $util.ProtocolError("missing required 'section_4Time'", { instance: message }); + return message; + }; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeAttackResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeAttackResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.time)) + return "time: integer expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + if (typeof message.isMorning !== "boolean") + return "isMorning: boolean expected"; + if (!$util.isInteger(message.section_1Time)) + return "section_1Time: integer expected"; + if (!$util.isInteger(message.section_2Time)) + return "section_2Time: integer expected"; + if (!$util.isInteger(message.section_3Time)) + return "section_3Time: integer expected"; + if (!$util.isInteger(message.section_4Time)) + return "section_4Time: integer expected"; + if (message.section_5Time != null && message.hasOwnProperty("section_5Time")) + if (!$util.isInteger(message.section_5Time)) + return "section_5Time: integer expected"; + if (message.section_6Time != null && message.hasOwnProperty("section_6Time")) + if (!$util.isInteger(message.section_6Time)) + return "section_6Time: integer expected"; + if (message.section_7Time != null && message.hasOwnProperty("section_7Time")) + if (!$util.isInteger(message.section_7Time)) + return "section_7Time: integer expected"; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + if (!$util.isInteger(message.wholeRank)) + return "wholeRank: integer expected"; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + if (!$util.isInteger(message.modelRank)) + return "modelRank: integer expected"; + return null; + }; + + /** + * Creates a TimeAttackResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult + */ + TimeAttackResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult(); + if (object.time != null) + message.time = object.time >>> 0; + if (object.course != null) + message.course = object.course >>> 0; + if (object.isMorning != null) + message.isMorning = Boolean(object.isMorning); + if (object.section_1Time != null) + message.section_1Time = object.section_1Time >>> 0; + if (object.section_2Time != null) + message.section_2Time = object.section_2Time >>> 0; + if (object.section_3Time != null) + message.section_3Time = object.section_3Time >>> 0; + if (object.section_4Time != null) + message.section_4Time = object.section_4Time >>> 0; + if (object.section_5Time != null) + message.section_5Time = object.section_5Time >>> 0; + if (object.section_6Time != null) + message.section_6Time = object.section_6Time >>> 0; + if (object.section_7Time != null) + message.section_7Time = object.section_7Time >>> 0; + if (object.wholeRank != null) + message.wholeRank = object.wholeRank >>> 0; + if (object.modelRank != null) + message.modelRank = object.modelRank >>> 0; + return message; + }; + + /** + * Creates a plain object from a TimeAttackResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.TimeAttackResult} message TimeAttackResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeAttackResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.time = 0; + object.course = 0; + object.section_1Time = 0; + object.section_2Time = 0; + object.section_3Time = 0; + object.section_4Time = 0; + object.section_5Time = 0; + object.section_6Time = 0; + object.section_7Time = 0; + object.wholeRank = 0; + object.modelRank = 0; + object.isMorning = false; + } + if (message.time != null && message.hasOwnProperty("time")) + object.time = message.time; + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + if (message.section_1Time != null && message.hasOwnProperty("section_1Time")) + object.section_1Time = message.section_1Time; + if (message.section_2Time != null && message.hasOwnProperty("section_2Time")) + object.section_2Time = message.section_2Time; + if (message.section_3Time != null && message.hasOwnProperty("section_3Time")) + object.section_3Time = message.section_3Time; + if (message.section_4Time != null && message.hasOwnProperty("section_4Time")) + object.section_4Time = message.section_4Time; + if (message.section_5Time != null && message.hasOwnProperty("section_5Time")) + object.section_5Time = message.section_5Time; + if (message.section_6Time != null && message.hasOwnProperty("section_6Time")) + object.section_6Time = message.section_6Time; + if (message.section_7Time != null && message.hasOwnProperty("section_7Time")) + object.section_7Time = message.section_7Time; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + object.wholeRank = message.wholeRank; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + object.modelRank = message.modelRank; + if (message.isMorning != null && message.hasOwnProperty("isMorning")) + object.isMorning = message.isMorning; + return object; + }; + + /** + * Converts this TimeAttackResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + * @returns {Object.} JSON object + */ + TimeAttackResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeAttackResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeAttackResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.TimeAttackResult"; + }; + + return TimeAttackResult; + })(); + + SaveGameResultRequest.VersusBattleResult = (function() { + + /** + * Properties of a VersusBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface IVersusBattleResult + * @property {number} result VersusBattleResult result + * @property {boolean} survived VersusBattleResult survived + * @property {Array.|null} [opponentCarId] VersusBattleResult opponentCarId + * @property {number} numOfPlayers VersusBattleResult numOfPlayers + * @property {number} area VersusBattleResult area + * @property {boolean} isMorning VersusBattleResult isMorning + * @property {number} vsPlayCount VersusBattleResult vsPlayCount + * @property {number|null} [vsBurstCount] VersusBattleResult vsBurstCount + * @property {number|null} [vsStarCount] VersusBattleResult vsStarCount + * @property {number|null} [vsCoolOrWild] VersusBattleResult vsCoolOrWild + * @property {number|null} [vsSmoothOrRough] VersusBattleResult vsSmoothOrRough + * @property {number|null} [vsTripleStarMedals] VersusBattleResult vsTripleStarMedals + * @property {number|null} [vsDoubleStarMedals] VersusBattleResult vsDoubleStarMedals + * @property {number|null} [vsSingleStarMedals] VersusBattleResult vsSingleStarMedals + * @property {number|null} [vsPlainMedals] VersusBattleResult vsPlainMedals + */ + + /** + * Constructs a new VersusBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a VersusBattleResult. + * @implements IVersusBattleResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult=} [properties] Properties to set + */ + function VersusBattleResult(properties) { + this.opponentCarId = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersusBattleResult result. + * @member {number} result + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.result = 0; + + /** + * VersusBattleResult survived. + * @member {boolean} survived + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.survived = false; + + /** + * VersusBattleResult opponentCarId. + * @member {Array.} opponentCarId + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.opponentCarId = $util.emptyArray; + + /** + * VersusBattleResult numOfPlayers. + * @member {number} numOfPlayers + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.numOfPlayers = 0; + + /** + * VersusBattleResult area. + * @member {number} area + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.area = 0; + + /** + * VersusBattleResult isMorning. + * @member {boolean} isMorning + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.isMorning = false; + + /** + * VersusBattleResult vsPlayCount. + * @member {number} vsPlayCount + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsPlayCount = 0; + + /** + * VersusBattleResult vsBurstCount. + * @member {number} vsBurstCount + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsBurstCount = 0; + + /** + * VersusBattleResult vsStarCount. + * @member {number} vsStarCount + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsStarCount = 0; + + /** + * VersusBattleResult vsCoolOrWild. + * @member {number} vsCoolOrWild + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsCoolOrWild = 0; + + /** + * VersusBattleResult vsSmoothOrRough. + * @member {number} vsSmoothOrRough + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsSmoothOrRough = 0; + + /** + * VersusBattleResult vsTripleStarMedals. + * @member {number} vsTripleStarMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsTripleStarMedals = 0; + + /** + * VersusBattleResult vsDoubleStarMedals. + * @member {number} vsDoubleStarMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsDoubleStarMedals = 0; + + /** + * VersusBattleResult vsSingleStarMedals. + * @member {number} vsSingleStarMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsSingleStarMedals = 0; + + /** + * VersusBattleResult vsPlainMedals. + * @member {number} vsPlainMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsPlainMedals = 0; + + /** + * Creates a new VersusBattleResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult instance + */ + VersusBattleResult.create = function create(properties) { + return new VersusBattleResult(properties); + }; + + /** + * Encodes the specified VersusBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult} message VersusBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.result); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.survived); + if (message.opponentCarId != null && message.opponentCarId.length) + for (let i = 0; i < message.opponentCarId.length; ++i) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.opponentCarId[i]); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.numOfPlayers); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.vsPlayCount); + if (message.vsBurstCount != null && Object.hasOwnProperty.call(message, "vsBurstCount")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.vsBurstCount); + if (message.vsStarCount != null && Object.hasOwnProperty.call(message, "vsStarCount")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.vsStarCount); + if (message.vsCoolOrWild != null && Object.hasOwnProperty.call(message, "vsCoolOrWild")) + writer.uint32(/* id 9, wireType 0 =*/72).sint32(message.vsCoolOrWild); + if (message.vsSmoothOrRough != null && Object.hasOwnProperty.call(message, "vsSmoothOrRough")) + writer.uint32(/* id 10, wireType 0 =*/80).sint32(message.vsSmoothOrRough); + if (message.vsTripleStarMedals != null && Object.hasOwnProperty.call(message, "vsTripleStarMedals")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.vsTripleStarMedals); + if (message.vsDoubleStarMedals != null && Object.hasOwnProperty.call(message, "vsDoubleStarMedals")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.vsDoubleStarMedals); + if (message.vsSingleStarMedals != null && Object.hasOwnProperty.call(message, "vsSingleStarMedals")) + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.vsSingleStarMedals); + if (message.vsPlainMedals != null && Object.hasOwnProperty.call(message, "vsPlainMedals")) + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.vsPlainMedals); + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.area); + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.isMorning); + return writer; + }; + + /** + * Encodes the specified VersusBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult} message VersusBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.uint32(); + break; + } + case 2: { + message.survived = reader.bool(); + break; + } + case 3: { + if (!(message.opponentCarId && message.opponentCarId.length)) + message.opponentCarId = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.opponentCarId.push(reader.uint32()); + } else + message.opponentCarId.push(reader.uint32()); + break; + } + case 5: { + message.numOfPlayers = reader.uint32(); + break; + } + case 17: { + message.area = reader.uint32(); + break; + } + case 18: { + message.isMorning = reader.bool(); + break; + } + case 6: { + message.vsPlayCount = reader.uint32(); + break; + } + case 7: { + message.vsBurstCount = reader.uint32(); + break; + } + case 8: { + message.vsStarCount = reader.uint32(); + break; + } + case 9: { + message.vsCoolOrWild = reader.sint32(); + break; + } + case 10: { + message.vsSmoothOrRough = reader.sint32(); + break; + } + case 11: { + message.vsTripleStarMedals = reader.uint32(); + break; + } + case 12: { + message.vsDoubleStarMedals = reader.uint32(); + break; + } + case 13: { + message.vsSingleStarMedals = reader.uint32(); + break; + } + case 14: { + message.vsPlainMedals = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("survived")) + throw $util.ProtocolError("missing required 'survived'", { instance: message }); + if (!message.hasOwnProperty("numOfPlayers")) + throw $util.ProtocolError("missing required 'numOfPlayers'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("isMorning")) + throw $util.ProtocolError("missing required 'isMorning'", { instance: message }); + if (!message.hasOwnProperty("vsPlayCount")) + throw $util.ProtocolError("missing required 'vsPlayCount'", { instance: message }); + return message; + }; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersusBattleResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersusBattleResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (typeof message.survived !== "boolean") + return "survived: boolean expected"; + if (message.opponentCarId != null && message.hasOwnProperty("opponentCarId")) { + if (!Array.isArray(message.opponentCarId)) + return "opponentCarId: array expected"; + for (let i = 0; i < message.opponentCarId.length; ++i) + if (!$util.isInteger(message.opponentCarId[i])) + return "opponentCarId: integer[] expected"; + } + if (!$util.isInteger(message.numOfPlayers)) + return "numOfPlayers: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (typeof message.isMorning !== "boolean") + return "isMorning: boolean expected"; + if (!$util.isInteger(message.vsPlayCount)) + return "vsPlayCount: integer expected"; + if (message.vsBurstCount != null && message.hasOwnProperty("vsBurstCount")) + if (!$util.isInteger(message.vsBurstCount)) + return "vsBurstCount: integer expected"; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + if (!$util.isInteger(message.vsStarCount)) + return "vsStarCount: integer expected"; + if (message.vsCoolOrWild != null && message.hasOwnProperty("vsCoolOrWild")) + if (!$util.isInteger(message.vsCoolOrWild)) + return "vsCoolOrWild: integer expected"; + if (message.vsSmoothOrRough != null && message.hasOwnProperty("vsSmoothOrRough")) + if (!$util.isInteger(message.vsSmoothOrRough)) + return "vsSmoothOrRough: integer expected"; + if (message.vsTripleStarMedals != null && message.hasOwnProperty("vsTripleStarMedals")) + if (!$util.isInteger(message.vsTripleStarMedals)) + return "vsTripleStarMedals: integer expected"; + if (message.vsDoubleStarMedals != null && message.hasOwnProperty("vsDoubleStarMedals")) + if (!$util.isInteger(message.vsDoubleStarMedals)) + return "vsDoubleStarMedals: integer expected"; + if (message.vsSingleStarMedals != null && message.hasOwnProperty("vsSingleStarMedals")) + if (!$util.isInteger(message.vsSingleStarMedals)) + return "vsSingleStarMedals: integer expected"; + if (message.vsPlainMedals != null && message.hasOwnProperty("vsPlainMedals")) + if (!$util.isInteger(message.vsPlainMedals)) + return "vsPlainMedals: integer expected"; + return null; + }; + + /** + * Creates a VersusBattleResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult + */ + VersusBattleResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult(); + if (object.result != null) + message.result = object.result >>> 0; + if (object.survived != null) + message.survived = Boolean(object.survived); + if (object.opponentCarId) { + if (!Array.isArray(object.opponentCarId)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.VersusBattleResult.opponentCarId: array expected"); + message.opponentCarId = []; + for (let i = 0; i < object.opponentCarId.length; ++i) + message.opponentCarId[i] = object.opponentCarId[i] >>> 0; + } + if (object.numOfPlayers != null) + message.numOfPlayers = object.numOfPlayers >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.isMorning != null) + message.isMorning = Boolean(object.isMorning); + if (object.vsPlayCount != null) + message.vsPlayCount = object.vsPlayCount >>> 0; + if (object.vsBurstCount != null) + message.vsBurstCount = object.vsBurstCount >>> 0; + if (object.vsStarCount != null) + message.vsStarCount = object.vsStarCount >>> 0; + if (object.vsCoolOrWild != null) + message.vsCoolOrWild = object.vsCoolOrWild | 0; + if (object.vsSmoothOrRough != null) + message.vsSmoothOrRough = object.vsSmoothOrRough | 0; + if (object.vsTripleStarMedals != null) + message.vsTripleStarMedals = object.vsTripleStarMedals >>> 0; + if (object.vsDoubleStarMedals != null) + message.vsDoubleStarMedals = object.vsDoubleStarMedals >>> 0; + if (object.vsSingleStarMedals != null) + message.vsSingleStarMedals = object.vsSingleStarMedals >>> 0; + if (object.vsPlainMedals != null) + message.vsPlainMedals = object.vsPlainMedals >>> 0; + return message; + }; + + /** + * Creates a plain object from a VersusBattleResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.VersusBattleResult} message VersusBattleResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersusBattleResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.opponentCarId = []; + if (options.defaults) { + object.result = 0; + object.survived = false; + object.numOfPlayers = 0; + object.vsPlayCount = 0; + object.vsBurstCount = 0; + object.vsStarCount = 0; + object.vsCoolOrWild = 0; + object.vsSmoothOrRough = 0; + object.vsTripleStarMedals = 0; + object.vsDoubleStarMedals = 0; + object.vsSingleStarMedals = 0; + object.vsPlainMedals = 0; + object.area = 0; + object.isMorning = false; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.survived != null && message.hasOwnProperty("survived")) + object.survived = message.survived; + if (message.opponentCarId && message.opponentCarId.length) { + object.opponentCarId = []; + for (let j = 0; j < message.opponentCarId.length; ++j) + object.opponentCarId[j] = message.opponentCarId[j]; + } + if (message.numOfPlayers != null && message.hasOwnProperty("numOfPlayers")) + object.numOfPlayers = message.numOfPlayers; + if (message.vsPlayCount != null && message.hasOwnProperty("vsPlayCount")) + object.vsPlayCount = message.vsPlayCount; + if (message.vsBurstCount != null && message.hasOwnProperty("vsBurstCount")) + object.vsBurstCount = message.vsBurstCount; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + object.vsStarCount = message.vsStarCount; + if (message.vsCoolOrWild != null && message.hasOwnProperty("vsCoolOrWild")) + object.vsCoolOrWild = message.vsCoolOrWild; + if (message.vsSmoothOrRough != null && message.hasOwnProperty("vsSmoothOrRough")) + object.vsSmoothOrRough = message.vsSmoothOrRough; + if (message.vsTripleStarMedals != null && message.hasOwnProperty("vsTripleStarMedals")) + object.vsTripleStarMedals = message.vsTripleStarMedals; + if (message.vsDoubleStarMedals != null && message.hasOwnProperty("vsDoubleStarMedals")) + object.vsDoubleStarMedals = message.vsDoubleStarMedals; + if (message.vsSingleStarMedals != null && message.hasOwnProperty("vsSingleStarMedals")) + object.vsSingleStarMedals = message.vsSingleStarMedals; + if (message.vsPlainMedals != null && message.hasOwnProperty("vsPlainMedals")) + object.vsPlainMedals = message.vsPlainMedals; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.isMorning != null && message.hasOwnProperty("isMorning")) + object.isMorning = message.isMorning; + return object; + }; + + /** + * Converts this VersusBattleResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + * @returns {Object.} JSON object + */ + VersusBattleResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VersusBattleResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VersusBattleResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.VersusBattleResult"; + }; + + return VersusBattleResult; + })(); + + SaveGameResultRequest.GhostBattleResult = (function() { + + /** + * Properties of a GhostBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface IGhostBattleResult + * @property {Array.|null} [opponents] GhostBattleResult opponents + * @property {number} path GhostBattleResult path + * @property {boolean} isMorning GhostBattleResult isMorning + * @property {wm.protobuf.GhostSelectionMethod} selectionMethod GhostBattleResult selectionMethod + * @property {number|null} [stampSheetCount] GhostBattleResult stampSheetCount + * @property {Array.|null} [stampSheet] GhostBattleResult stampSheet + * @property {number|null} [rgStamp] GhostBattleResult rgStamp + * @property {Array.|null} [confirmedTransferredStampTargetCarIds] GhostBattleResult confirmedTransferredStampTargetCarIds + * @property {number} rgPlayCount GhostBattleResult rgPlayCount + * @property {number|null} [dressupLevel] GhostBattleResult dressupLevel + * @property {number|null} [dressupPoint] GhostBattleResult dressupPoint + * @property {Array.|null} [rgRegionMapScore] GhostBattleResult rgRegionMapScore + * @property {number|null} [competitionId] GhostBattleResult competitionId + * @property {number|null} [periodId] GhostBattleResult periodId + * @property {number|null} [brakingPoint] GhostBattleResult brakingPoint + * @property {boolean|null} [acquireCrown] GhostBattleResult acquireCrown + * @property {boolean|null} [acquireAllCrowns] GhostBattleResult acquireAllCrowns + */ + + /** + * Constructs a new GhostBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a GhostBattleResult. + * @implements IGhostBattleResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult=} [properties] Properties to set + */ + function GhostBattleResult(properties) { + this.opponents = []; + this.stampSheet = []; + this.confirmedTransferredStampTargetCarIds = []; + this.rgRegionMapScore = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleResult opponents. + * @member {Array.} opponents + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.opponents = $util.emptyArray; + + /** + * GhostBattleResult path. + * @member {number} path + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.path = 0; + + /** + * GhostBattleResult isMorning. + * @member {boolean} isMorning + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.isMorning = false; + + /** + * GhostBattleResult selectionMethod. + * @member {wm.protobuf.GhostSelectionMethod} selectionMethod + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.selectionMethod = 1; + + /** + * GhostBattleResult stampSheetCount. + * @member {number} stampSheetCount + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.stampSheetCount = 0; + + /** + * GhostBattleResult stampSheet. + * @member {Array.} stampSheet + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.stampSheet = $util.emptyArray; + + /** + * GhostBattleResult rgStamp. + * @member {number} rgStamp + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.rgStamp = 0; + + /** + * GhostBattleResult confirmedTransferredStampTargetCarIds. + * @member {Array.} confirmedTransferredStampTargetCarIds + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.confirmedTransferredStampTargetCarIds = $util.emptyArray; + + /** + * GhostBattleResult rgPlayCount. + * @member {number} rgPlayCount + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.rgPlayCount = 0; + + /** + * GhostBattleResult dressupLevel. + * @member {number} dressupLevel + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.dressupLevel = 0; + + /** + * GhostBattleResult dressupPoint. + * @member {number} dressupPoint + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.dressupPoint = 0; + + /** + * GhostBattleResult rgRegionMapScore. + * @member {Array.} rgRegionMapScore + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.rgRegionMapScore = $util.emptyArray; + + /** + * GhostBattleResult competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.competitionId = 0; + + /** + * GhostBattleResult periodId. + * @member {number} periodId + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.periodId = 0; + + /** + * GhostBattleResult brakingPoint. + * @member {number} brakingPoint + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.brakingPoint = 0; + + /** + * GhostBattleResult acquireCrown. + * @member {boolean} acquireCrown + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.acquireCrown = false; + + /** + * GhostBattleResult acquireAllCrowns. + * @member {boolean} acquireAllCrowns + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.acquireAllCrowns = false; + + /** + * Creates a new GhostBattleResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult instance + */ + GhostBattleResult.create = function create(properties) { + return new GhostBattleResult(properties); + }; + + /** + * Encodes the specified GhostBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult} message GhostBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.opponents != null && message.opponents.length) + for (let i = 0; i < message.opponents.length; ++i) + $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.encode(message.opponents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.path); + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.selectionMethod); + if (message.stampSheetCount != null && Object.hasOwnProperty.call(message, "stampSheetCount")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.stampSheetCount); + if (message.stampSheet != null && message.stampSheet.length) + for (let i = 0; i < message.stampSheet.length; ++i) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.stampSheet[i]); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.rgPlayCount); + if (message.dressupLevel != null && Object.hasOwnProperty.call(message, "dressupLevel")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.dressupLevel); + if (message.dressupPoint != null && Object.hasOwnProperty.call(message, "dressupPoint")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.dressupPoint); + if (message.rgRegionMapScore != null && message.rgRegionMapScore.length) + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.rgRegionMapScore[i]); + if (message.competitionId != null && Object.hasOwnProperty.call(message, "competitionId")) + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.competitionId); + if (message.periodId != null && Object.hasOwnProperty.call(message, "periodId")) + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.periodId); + if (message.brakingPoint != null && Object.hasOwnProperty.call(message, "brakingPoint")) + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.brakingPoint); + if (message.acquireCrown != null && Object.hasOwnProperty.call(message, "acquireCrown")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.acquireCrown); + if (message.acquireAllCrowns != null && Object.hasOwnProperty.call(message, "acquireAllCrowns")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.acquireAllCrowns); + if (message.rgStamp != null && Object.hasOwnProperty.call(message, "rgStamp")) + writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.rgStamp); + if (message.confirmedTransferredStampTargetCarIds != null && message.confirmedTransferredStampTargetCarIds.length) + for (let i = 0; i < message.confirmedTransferredStampTargetCarIds.length; ++i) + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.confirmedTransferredStampTargetCarIds[i]); + writer.uint32(/* id 25, wireType 0 =*/200).bool(message.isMorning); + return writer; + }; + + /** + * Encodes the specified GhostBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult} message GhostBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.opponents && message.opponents.length)) + message.opponents = []; + message.opponents.push($root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.decode(reader, reader.uint32())); + break; + } + case 3: { + message.path = reader.uint32(); + break; + } + case 25: { + message.isMorning = reader.bool(); + break; + } + case 4: { + message.selectionMethod = reader.int32(); + break; + } + case 5: { + message.stampSheetCount = reader.uint32(); + break; + } + case 6: { + if (!(message.stampSheet && message.stampSheet.length)) + message.stampSheet = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampSheet.push(reader.uint32()); + } else + message.stampSheet.push(reader.uint32()); + break; + } + case 23: { + message.rgStamp = reader.uint32(); + break; + } + case 24: { + if (!(message.confirmedTransferredStampTargetCarIds && message.confirmedTransferredStampTargetCarIds.length)) + message.confirmedTransferredStampTargetCarIds = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.confirmedTransferredStampTargetCarIds.push(reader.uint32()); + } else + message.confirmedTransferredStampTargetCarIds.push(reader.uint32()); + break; + } + case 8: { + message.rgPlayCount = reader.uint32(); + break; + } + case 10: { + message.dressupLevel = reader.uint32(); + break; + } + case 11: { + message.dressupPoint = reader.uint32(); + break; + } + case 14: { + if (!(message.rgRegionMapScore && message.rgRegionMapScore.length)) + message.rgRegionMapScore = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegionMapScore.push(reader.uint32()); + } else + message.rgRegionMapScore.push(reader.uint32()); + break; + } + case 16: { + message.competitionId = reader.uint32(); + break; + } + case 17: { + message.periodId = reader.uint32(); + break; + } + case 18: { + message.brakingPoint = reader.uint32(); + break; + } + case 20: { + message.acquireCrown = reader.bool(); + break; + } + case 21: { + message.acquireAllCrowns = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("isMorning")) + throw $util.ProtocolError("missing required 'isMorning'", { instance: message }); + if (!message.hasOwnProperty("selectionMethod")) + throw $util.ProtocolError("missing required 'selectionMethod'", { instance: message }); + if (!message.hasOwnProperty("rgPlayCount")) + throw $util.ProtocolError("missing required 'rgPlayCount'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.opponents != null && message.hasOwnProperty("opponents")) { + if (!Array.isArray(message.opponents)) + return "opponents: array expected"; + for (let i = 0; i < message.opponents.length; ++i) { + let error = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify(message.opponents[i]); + if (error) + return "opponents." + error; + } + } + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (typeof message.isMorning !== "boolean") + return "isMorning: boolean expected"; + switch (message.selectionMethod) { + default: + return "selectionMethod: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + if (!$util.isInteger(message.stampSheetCount)) + return "stampSheetCount: integer expected"; + if (message.stampSheet != null && message.hasOwnProperty("stampSheet")) { + if (!Array.isArray(message.stampSheet)) + return "stampSheet: array expected"; + for (let i = 0; i < message.stampSheet.length; ++i) + if (!$util.isInteger(message.stampSheet[i])) + return "stampSheet: integer[] expected"; + } + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + if (!$util.isInteger(message.rgStamp)) + return "rgStamp: integer expected"; + if (message.confirmedTransferredStampTargetCarIds != null && message.hasOwnProperty("confirmedTransferredStampTargetCarIds")) { + if (!Array.isArray(message.confirmedTransferredStampTargetCarIds)) + return "confirmedTransferredStampTargetCarIds: array expected"; + for (let i = 0; i < message.confirmedTransferredStampTargetCarIds.length; ++i) + if (!$util.isInteger(message.confirmedTransferredStampTargetCarIds[i])) + return "confirmedTransferredStampTargetCarIds: integer[] expected"; + } + if (!$util.isInteger(message.rgPlayCount)) + return "rgPlayCount: integer expected"; + if (message.dressupLevel != null && message.hasOwnProperty("dressupLevel")) + if (!$util.isInteger(message.dressupLevel)) + return "dressupLevel: integer expected"; + if (message.dressupPoint != null && message.hasOwnProperty("dressupPoint")) + if (!$util.isInteger(message.dressupPoint)) + return "dressupPoint: integer expected"; + if (message.rgRegionMapScore != null && message.hasOwnProperty("rgRegionMapScore")) { + if (!Array.isArray(message.rgRegionMapScore)) + return "rgRegionMapScore: array expected"; + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + if (!$util.isInteger(message.rgRegionMapScore[i])) + return "rgRegionMapScore: integer[] expected"; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + if (message.periodId != null && message.hasOwnProperty("periodId")) + if (!$util.isInteger(message.periodId)) + return "periodId: integer expected"; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + if (!$util.isInteger(message.brakingPoint)) + return "brakingPoint: integer expected"; + if (message.acquireCrown != null && message.hasOwnProperty("acquireCrown")) + if (typeof message.acquireCrown !== "boolean") + return "acquireCrown: boolean expected"; + if (message.acquireAllCrowns != null && message.hasOwnProperty("acquireAllCrowns")) + if (typeof message.acquireAllCrowns !== "boolean") + return "acquireAllCrowns: boolean expected"; + return null; + }; + + /** + * Creates a GhostBattleResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult + */ + GhostBattleResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult(); + if (object.opponents) { + if (!Array.isArray(object.opponents)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.opponents: array expected"); + message.opponents = []; + for (let i = 0; i < object.opponents.length; ++i) { + if (typeof object.opponents[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.opponents: object expected"); + message.opponents[i] = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.fromObject(object.opponents[i]); + } + } + if (object.path != null) + message.path = object.path >>> 0; + if (object.isMorning != null) + message.isMorning = Boolean(object.isMorning); + switch (object.selectionMethod) { + case "GHOST_SEARCH_BY_REGION": + case 1: + message.selectionMethod = 1; + break; + case "GHOST_SELECT_BY_LEVEL": + case 2: + message.selectionMethod = 2; + break; + case "GHOST_SELECT_CROWN_MATCH": + case 3: + message.selectionMethod = 3; + break; + case "GHOST_SELECT_STAMP_MATCH": + case 4: + message.selectionMethod = 4; + break; + case "GHOST_SELECT_FROM_HISTORY": + case 5: + message.selectionMethod = 5; + break; + case "GHOST_SEARCH_BY_SHOP": + case 6: + message.selectionMethod = 6; + break; + case "GHOST_SEARCH_BY_NAME": + case 7: + message.selectionMethod = 7; + break; + case "GHOST_ACCEPT_CHALLENGER": + case 8: + message.selectionMethod = 8; + break; + case "GHOST_APPOINTMENT": + case 9: + message.selectionMethod = 9; + break; + case "GHOST_DEFAULT_OPPONENT": + case 10: + message.selectionMethod = 10; + break; + case "GHOST_COMPETITION": + case 11: + message.selectionMethod = 11; + break; + case "GHOST_SELECT_FROM_BOOKMARKS": + case 12: + message.selectionMethod = 12; + break; + } + if (object.stampSheetCount != null) + message.stampSheetCount = object.stampSheetCount >>> 0; + if (object.stampSheet) { + if (!Array.isArray(object.stampSheet)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.stampSheet: array expected"); + message.stampSheet = []; + for (let i = 0; i < object.stampSheet.length; ++i) + message.stampSheet[i] = object.stampSheet[i] >>> 0; + } + if (object.rgStamp != null) + message.rgStamp = object.rgStamp >>> 0; + if (object.confirmedTransferredStampTargetCarIds) { + if (!Array.isArray(object.confirmedTransferredStampTargetCarIds)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.confirmedTransferredStampTargetCarIds: array expected"); + message.confirmedTransferredStampTargetCarIds = []; + for (let i = 0; i < object.confirmedTransferredStampTargetCarIds.length; ++i) + message.confirmedTransferredStampTargetCarIds[i] = object.confirmedTransferredStampTargetCarIds[i] >>> 0; + } + if (object.rgPlayCount != null) + message.rgPlayCount = object.rgPlayCount >>> 0; + if (object.dressupLevel != null) + message.dressupLevel = object.dressupLevel >>> 0; + if (object.dressupPoint != null) + message.dressupPoint = object.dressupPoint >>> 0; + if (object.rgRegionMapScore) { + if (!Array.isArray(object.rgRegionMapScore)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.rgRegionMapScore: array expected"); + message.rgRegionMapScore = []; + for (let i = 0; i < object.rgRegionMapScore.length; ++i) + message.rgRegionMapScore[i] = object.rgRegionMapScore[i] >>> 0; + } + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + if (object.periodId != null) + message.periodId = object.periodId >>> 0; + if (object.brakingPoint != null) + message.brakingPoint = object.brakingPoint >>> 0; + if (object.acquireCrown != null) + message.acquireCrown = Boolean(object.acquireCrown); + if (object.acquireAllCrowns != null) + message.acquireAllCrowns = Boolean(object.acquireAllCrowns); + return message; + }; + + /** + * Creates a plain object from a GhostBattleResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult} message GhostBattleResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.opponents = []; + object.stampSheet = []; + object.rgRegionMapScore = []; + object.confirmedTransferredStampTargetCarIds = []; + } + if (options.defaults) { + object.path = 0; + object.selectionMethod = options.enums === String ? "GHOST_SEARCH_BY_REGION" : 1; + object.stampSheetCount = 0; + object.rgPlayCount = 0; + object.dressupLevel = 0; + object.dressupPoint = 0; + object.competitionId = 0; + object.periodId = 0; + object.brakingPoint = 0; + object.acquireCrown = false; + object.acquireAllCrowns = false; + object.rgStamp = 0; + object.isMorning = false; + } + if (message.opponents && message.opponents.length) { + object.opponents = []; + for (let j = 0; j < message.opponents.length; ++j) + object.opponents[j] = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.toObject(message.opponents[j], options); + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.selectionMethod != null && message.hasOwnProperty("selectionMethod")) + object.selectionMethod = options.enums === String ? $root.wm.protobuf.GhostSelectionMethod[message.selectionMethod] : message.selectionMethod; + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + object.stampSheetCount = message.stampSheetCount; + if (message.stampSheet && message.stampSheet.length) { + object.stampSheet = []; + for (let j = 0; j < message.stampSheet.length; ++j) + object.stampSheet[j] = message.stampSheet[j]; + } + if (message.rgPlayCount != null && message.hasOwnProperty("rgPlayCount")) + object.rgPlayCount = message.rgPlayCount; + if (message.dressupLevel != null && message.hasOwnProperty("dressupLevel")) + object.dressupLevel = message.dressupLevel; + if (message.dressupPoint != null && message.hasOwnProperty("dressupPoint")) + object.dressupPoint = message.dressupPoint; + if (message.rgRegionMapScore && message.rgRegionMapScore.length) { + object.rgRegionMapScore = []; + for (let j = 0; j < message.rgRegionMapScore.length; ++j) + object.rgRegionMapScore[j] = message.rgRegionMapScore[j]; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + if (message.periodId != null && message.hasOwnProperty("periodId")) + object.periodId = message.periodId; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + object.brakingPoint = message.brakingPoint; + if (message.acquireCrown != null && message.hasOwnProperty("acquireCrown")) + object.acquireCrown = message.acquireCrown; + if (message.acquireAllCrowns != null && message.hasOwnProperty("acquireAllCrowns")) + object.acquireAllCrowns = message.acquireAllCrowns; + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + object.rgStamp = message.rgStamp; + if (message.confirmedTransferredStampTargetCarIds && message.confirmedTransferredStampTargetCarIds.length) { + object.confirmedTransferredStampTargetCarIds = []; + for (let j = 0; j < message.confirmedTransferredStampTargetCarIds.length; ++j) + object.confirmedTransferredStampTargetCarIds[j] = message.confirmedTransferredStampTargetCarIds[j]; + } + if (message.isMorning != null && message.hasOwnProperty("isMorning")) + object.isMorning = message.isMorning; + return object; + }; + + /** + * Converts this GhostBattleResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + * @returns {Object.} JSON object + */ + GhostBattleResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.GhostBattleResult"; + }; + + GhostBattleResult.GhostBattleOpponent = (function() { + + /** + * Properties of a GhostBattleOpponent. + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @interface IGhostBattleOpponent + * @property {number} result GhostBattleOpponent result + * @property {number} carId GhostBattleOpponent carId + * @property {number} tunePower GhostBattleOpponent tunePower + * @property {number} tuneHandling GhostBattleOpponent tuneHandling + * @property {boolean|null} [receiveStamp] GhostBattleOpponent receiveStamp + */ + + /** + * Constructs a new GhostBattleOpponent. + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @classdesc Represents a GhostBattleOpponent. + * @implements IGhostBattleOpponent + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent=} [properties] Properties to set + */ + function GhostBattleOpponent(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleOpponent result. + * @member {number} result + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.result = 0; + + /** + * GhostBattleOpponent carId. + * @member {number} carId + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.carId = 0; + + /** + * GhostBattleOpponent tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.tunePower = 0; + + /** + * GhostBattleOpponent tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.tuneHandling = 0; + + /** + * GhostBattleOpponent receiveStamp. + * @member {boolean} receiveStamp + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.receiveStamp = false; + + /** + * Creates a new GhostBattleOpponent instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent instance + */ + GhostBattleOpponent.create = function create(properties) { + return new GhostBattleOpponent(properties); + }; + + /** + * Encodes the specified GhostBattleOpponent message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent} message GhostBattleOpponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleOpponent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).sint32(message.result); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.carId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tunePower); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.tuneHandling); + if (message.receiveStamp != null && Object.hasOwnProperty.call(message, "receiveStamp")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.receiveStamp); + return writer; + }; + + /** + * Encodes the specified GhostBattleOpponent message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent} message GhostBattleOpponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleOpponent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleOpponent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.sint32(); + break; + } + case 2: { + message.carId = reader.uint32(); + break; + } + case 3: { + message.tunePower = reader.uint32(); + break; + } + case 4: { + message.tuneHandling = reader.uint32(); + break; + } + case 5: { + message.receiveStamp = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleOpponent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleOpponent message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleOpponent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.receiveStamp != null && message.hasOwnProperty("receiveStamp")) + if (typeof message.receiveStamp !== "boolean") + return "receiveStamp: boolean expected"; + return null; + }; + + /** + * Creates a GhostBattleOpponent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent + */ + GhostBattleOpponent.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent(); + if (object.result != null) + message.result = object.result | 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.receiveStamp != null) + message.receiveStamp = Boolean(object.receiveStamp); + return message; + }; + + /** + * Creates a plain object from a GhostBattleOpponent message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} message GhostBattleOpponent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleOpponent.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.result = 0; + object.carId = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.receiveStamp = false; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.receiveStamp != null && message.hasOwnProperty("receiveStamp")) + object.receiveStamp = message.receiveStamp; + return object; + }; + + /** + * Converts this GhostBattleOpponent to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + * @returns {Object.} JSON object + */ + GhostBattleOpponent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleOpponent + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleOpponent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent"; + }; + + return GhostBattleOpponent; + })(); + + return GhostBattleResult; + })(); + + return SaveGameResultRequest; + })(); + + protobuf.SaveGameResultResponse = (function() { + + /** + * Properties of a SaveGameResultResponse. + * @memberof wm.protobuf + * @interface ISaveGameResultResponse + * @property {wm.protobuf.ErrorCode} error SaveGameResultResponse error + * @property {number|Long|null} [ghostSessionId] SaveGameResultResponse ghostSessionId + * @property {Array.|null} [availableTickets] SaveGameResultResponse availableTickets + */ + + /** + * Constructs a new SaveGameResultResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveGameResultResponse. + * @implements ISaveGameResultResponse + * @constructor + * @param {wm.protobuf.ISaveGameResultResponse=} [properties] Properties to set + */ + function SaveGameResultResponse(properties) { + this.availableTickets = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveGameResultResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + */ + SaveGameResultResponse.prototype.error = 0; + + /** + * SaveGameResultResponse ghostSessionId. + * @member {number|Long} ghostSessionId + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + */ + SaveGameResultResponse.prototype.ghostSessionId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * SaveGameResultResponse availableTickets. + * @member {Array.} availableTickets + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + */ + SaveGameResultResponse.prototype.availableTickets = $util.emptyArray; + + /** + * Creates a new SaveGameResultResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.ISaveGameResultResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse instance + */ + SaveGameResultResponse.create = function create(properties) { + return new SaveGameResultResponse(properties); + }; + + /** + * Encodes the specified SaveGameResultResponse message. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.ISaveGameResultResponse} message SaveGameResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.ghostSessionId != null && Object.hasOwnProperty.call(message, "ghostSessionId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.ghostSessionId); + if (message.availableTickets != null && message.availableTickets.length) + for (let i = 0; i < message.availableTickets.length; ++i) + $root.wm.protobuf.UserItem.encode(message.availableTickets[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveGameResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.ISaveGameResultResponse} message SaveGameResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.ghostSessionId = reader.uint64(); + break; + } + case 3: { + if (!(message.availableTickets && message.availableTickets.length)) + message.availableTickets = []; + message.availableTickets.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveGameResultResponse message. + * @function verify + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveGameResultResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.ghostSessionId != null && message.hasOwnProperty("ghostSessionId")) + if (!$util.isInteger(message.ghostSessionId) && !(message.ghostSessionId && $util.isInteger(message.ghostSessionId.low) && $util.isInteger(message.ghostSessionId.high))) + return "ghostSessionId: integer|Long expected"; + if (message.availableTickets != null && message.hasOwnProperty("availableTickets")) { + if (!Array.isArray(message.availableTickets)) + return "availableTickets: array expected"; + for (let i = 0; i < message.availableTickets.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.availableTickets[i]); + if (error) + return "availableTickets." + error; + } + } + return null; + }; + + /** + * Creates a SaveGameResultResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse + */ + SaveGameResultResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultResponse) + return object; + let message = new $root.wm.protobuf.SaveGameResultResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.ghostSessionId != null) + if ($util.Long) + (message.ghostSessionId = $util.Long.fromValue(object.ghostSessionId)).unsigned = true; + else if (typeof object.ghostSessionId === "string") + message.ghostSessionId = parseInt(object.ghostSessionId, 10); + else if (typeof object.ghostSessionId === "number") + message.ghostSessionId = object.ghostSessionId; + else if (typeof object.ghostSessionId === "object") + message.ghostSessionId = new $util.LongBits(object.ghostSessionId.low >>> 0, object.ghostSessionId.high >>> 0).toNumber(true); + if (object.availableTickets) { + if (!Array.isArray(object.availableTickets)) + throw TypeError(".wm.protobuf.SaveGameResultResponse.availableTickets: array expected"); + message.availableTickets = []; + for (let i = 0; i < object.availableTickets.length; ++i) { + if (typeof object.availableTickets[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultResponse.availableTickets: object expected"); + message.availableTickets[i] = $root.wm.protobuf.UserItem.fromObject(object.availableTickets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SaveGameResultResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.SaveGameResultResponse} message SaveGameResultResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveGameResultResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.availableTickets = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.ghostSessionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ghostSessionId = options.longs === String ? "0" : 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.ghostSessionId != null && message.hasOwnProperty("ghostSessionId")) + if (typeof message.ghostSessionId === "number") + object.ghostSessionId = options.longs === String ? String(message.ghostSessionId) : message.ghostSessionId; + else + object.ghostSessionId = options.longs === String ? $util.Long.prototype.toString.call(message.ghostSessionId) : options.longs === Number ? new $util.LongBits(message.ghostSessionId.low >>> 0, message.ghostSessionId.high >>> 0).toNumber(true) : message.ghostSessionId; + if (message.availableTickets && message.availableTickets.length) { + object.availableTickets = []; + for (let j = 0; j < message.availableTickets.length; ++j) + object.availableTickets[j] = $root.wm.protobuf.UserItem.toObject(message.availableTickets[j], options); + } + return object; + }; + + /** + * Converts this SaveGameResultResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + * @returns {Object.} JSON object + */ + SaveGameResultResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveGameResultResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveGameResultResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultResponse"; + }; + + return SaveGameResultResponse; + })(); + + protobuf.SaveChargeRequest = (function() { + + /** + * Properties of a SaveChargeRequest. + * @memberof wm.protobuf + * @interface ISaveChargeRequest + * @property {Array.|null} [chargeLogs] SaveChargeRequest chargeLogs + */ + + /** + * Constructs a new SaveChargeRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveChargeRequest. + * @implements ISaveChargeRequest + * @constructor + * @param {wm.protobuf.ISaveChargeRequest=} [properties] Properties to set + */ + function SaveChargeRequest(properties) { + this.chargeLogs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveChargeRequest chargeLogs. + * @member {Array.} chargeLogs + * @memberof wm.protobuf.SaveChargeRequest + * @instance + */ + SaveChargeRequest.prototype.chargeLogs = $util.emptyArray; + + /** + * Creates a new SaveChargeRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.ISaveChargeRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest instance + */ + SaveChargeRequest.create = function create(properties) { + return new SaveChargeRequest(properties); + }; + + /** + * Encodes the specified SaveChargeRequest message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.ISaveChargeRequest} message SaveChargeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chargeLogs != null && message.chargeLogs.length) + for (let i = 0; i < message.chargeLogs.length; ++i) + $root.wm.protobuf.SaveChargeRequest.ChargeLog.encode(message.chargeLogs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveChargeRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.ISaveChargeRequest} message SaveChargeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveChargeRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.chargeLogs && message.chargeLogs.length)) + message.chargeLogs = []; + message.chargeLogs.push($root.wm.protobuf.SaveChargeRequest.ChargeLog.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveChargeRequest message. + * @function verify + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveChargeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chargeLogs != null && message.hasOwnProperty("chargeLogs")) { + if (!Array.isArray(message.chargeLogs)) + return "chargeLogs: array expected"; + for (let i = 0; i < message.chargeLogs.length; ++i) { + let error = $root.wm.protobuf.SaveChargeRequest.ChargeLog.verify(message.chargeLogs[i]); + if (error) + return "chargeLogs." + error; + } + } + return null; + }; + + /** + * Creates a SaveChargeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest + */ + SaveChargeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveChargeRequest) + return object; + let message = new $root.wm.protobuf.SaveChargeRequest(); + if (object.chargeLogs) { + if (!Array.isArray(object.chargeLogs)) + throw TypeError(".wm.protobuf.SaveChargeRequest.chargeLogs: array expected"); + message.chargeLogs = []; + for (let i = 0; i < object.chargeLogs.length; ++i) { + if (typeof object.chargeLogs[i] !== "object") + throw TypeError(".wm.protobuf.SaveChargeRequest.chargeLogs: object expected"); + message.chargeLogs[i] = $root.wm.protobuf.SaveChargeRequest.ChargeLog.fromObject(object.chargeLogs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SaveChargeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.SaveChargeRequest} message SaveChargeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveChargeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.chargeLogs = []; + if (message.chargeLogs && message.chargeLogs.length) { + object.chargeLogs = []; + for (let j = 0; j < message.chargeLogs.length; ++j) + object.chargeLogs[j] = $root.wm.protobuf.SaveChargeRequest.ChargeLog.toObject(message.chargeLogs[j], options); + } + return object; + }; + + /** + * Converts this SaveChargeRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveChargeRequest + * @instance + * @returns {Object.} JSON object + */ + SaveChargeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveChargeRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveChargeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveChargeRequest"; + }; + + SaveChargeRequest.ChargeLog = (function() { + + /** + * Properties of a ChargeLog. + * @memberof wm.protobuf.SaveChargeRequest + * @interface IChargeLog + * @property {number} datetime ChargeLog datetime + * @property {string} pcbSerial ChargeLog pcbSerial + * @property {string} placeId ChargeLog placeId + * @property {number|null} [userId] ChargeLog userId + */ + + /** + * Constructs a new ChargeLog. + * @memberof wm.protobuf.SaveChargeRequest + * @classdesc Represents a ChargeLog. + * @implements IChargeLog + * @constructor + * @param {wm.protobuf.SaveChargeRequest.IChargeLog=} [properties] Properties to set + */ + function ChargeLog(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChargeLog datetime. + * @member {number} datetime + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.datetime = 0; + + /** + * ChargeLog pcbSerial. + * @member {string} pcbSerial + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.pcbSerial = ""; + + /** + * ChargeLog placeId. + * @member {string} placeId + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.placeId = ""; + + /** + * ChargeLog userId. + * @member {number} userId + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.userId = 0; + + /** + * Creates a new ChargeLog instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.IChargeLog=} [properties] Properties to set + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog instance + */ + ChargeLog.create = function create(properties) { + return new ChargeLog(properties); + }; + + /** + * Encodes the specified ChargeLog message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.IChargeLog} message ChargeLog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChargeLog.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.datetime); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pcbSerial); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.placeId); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified ChargeLog message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.IChargeLog} message ChargeLog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChargeLog.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChargeLog message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChargeLog.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveChargeRequest.ChargeLog(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datetime = reader.uint32(); + break; + } + case 2: { + message.pcbSerial = reader.string(); + break; + } + case 3: { + message.placeId = reader.string(); + break; + } + case 4: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("datetime")) + throw $util.ProtocolError("missing required 'datetime'", { instance: message }); + if (!message.hasOwnProperty("pcbSerial")) + throw $util.ProtocolError("missing required 'pcbSerial'", { instance: message }); + if (!message.hasOwnProperty("placeId")) + throw $util.ProtocolError("missing required 'placeId'", { instance: message }); + return message; + }; + + /** + * Decodes a ChargeLog message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChargeLog.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChargeLog message. + * @function verify + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChargeLog.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.datetime)) + return "datetime: integer expected"; + if (!$util.isString(message.pcbSerial)) + return "pcbSerial: string expected"; + if (!$util.isString(message.placeId)) + return "placeId: string expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a ChargeLog message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog + */ + ChargeLog.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveChargeRequest.ChargeLog) + return object; + let message = new $root.wm.protobuf.SaveChargeRequest.ChargeLog(); + if (object.datetime != null) + message.datetime = object.datetime >>> 0; + if (object.pcbSerial != null) + message.pcbSerial = String(object.pcbSerial); + if (object.placeId != null) + message.placeId = String(object.placeId); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a ChargeLog message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.ChargeLog} message ChargeLog + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChargeLog.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.datetime = 0; + object.pcbSerial = ""; + object.placeId = ""; + object.userId = 0; + } + if (message.datetime != null && message.hasOwnProperty("datetime")) + object.datetime = message.datetime; + if (message.pcbSerial != null && message.hasOwnProperty("pcbSerial")) + object.pcbSerial = message.pcbSerial; + if (message.placeId != null && message.hasOwnProperty("placeId")) + object.placeId = message.placeId; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this ChargeLog to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + * @returns {Object.} JSON object + */ + ChargeLog.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChargeLog + * @function getTypeUrl + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChargeLog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveChargeRequest.ChargeLog"; + }; + + return ChargeLog; + })(); + + return SaveChargeRequest; + })(); + + protobuf.SaveChargeResponse = (function() { + + /** + * Properties of a SaveChargeResponse. + * @memberof wm.protobuf + * @interface ISaveChargeResponse + * @property {wm.protobuf.ErrorCode} error SaveChargeResponse error + */ + + /** + * Constructs a new SaveChargeResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveChargeResponse. + * @implements ISaveChargeResponse + * @constructor + * @param {wm.protobuf.ISaveChargeResponse=} [properties] Properties to set + */ + function SaveChargeResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveChargeResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveChargeResponse + * @instance + */ + SaveChargeResponse.prototype.error = 0; + + /** + * Creates a new SaveChargeResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.ISaveChargeResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse instance + */ + SaveChargeResponse.create = function create(properties) { + return new SaveChargeResponse(properties); + }; + + /** + * Encodes the specified SaveChargeResponse message. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.ISaveChargeResponse} message SaveChargeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveChargeResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.ISaveChargeResponse} message SaveChargeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveChargeResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveChargeResponse message. + * @function verify + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveChargeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveChargeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse + */ + SaveChargeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveChargeResponse) + return object; + let message = new $root.wm.protobuf.SaveChargeResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveChargeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.SaveChargeResponse} message SaveChargeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveChargeResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveChargeResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveChargeResponse + * @instance + * @returns {Object.} JSON object + */ + SaveChargeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveChargeResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveChargeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveChargeResponse"; + }; + + return SaveChargeResponse; + })(); + + protobuf.LoadGhostBattleInfoRequest = (function() { + + /** + * Properties of a LoadGhostBattleInfoRequest. + * @memberof wm.protobuf + * @interface ILoadGhostBattleInfoRequest + * @property {number} carId LoadGhostBattleInfoRequest carId + */ + + /** + * Constructs a new LoadGhostBattleInfoRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostBattleInfoRequest. + * @implements ILoadGhostBattleInfoRequest + * @constructor + * @param {wm.protobuf.ILoadGhostBattleInfoRequest=} [properties] Properties to set + */ + function LoadGhostBattleInfoRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostBattleInfoRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @instance + */ + LoadGhostBattleInfoRequest.prototype.carId = 0; + + /** + * Creates a new LoadGhostBattleInfoRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest instance + */ + LoadGhostBattleInfoRequest.create = function create(properties) { + return new LoadGhostBattleInfoRequest(properties); + }; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoRequest} message LoadGhostBattleInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + return writer; + }; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoRequest} message LoadGhostBattleInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostBattleInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostBattleInfoRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostBattleInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + return null; + }; + + /** + * Creates a LoadGhostBattleInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest + */ + LoadGhostBattleInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostBattleInfoRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostBattleInfoRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGhostBattleInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.LoadGhostBattleInfoRequest} message LoadGhostBattleInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostBattleInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + return object; + }; + + /** + * Converts this LoadGhostBattleInfoRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostBattleInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostBattleInfoRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostBattleInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostBattleInfoRequest"; + }; + + return LoadGhostBattleInfoRequest; + })(); + + protobuf.LoadGhostBattleInfoResponse = (function() { + + /** + * Properties of a LoadGhostBattleInfoResponse. + * @memberof wm.protobuf + * @interface ILoadGhostBattleInfoResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostBattleInfoResponse error + * @property {Array.|null} [friendCars] LoadGhostBattleInfoResponse friendCars + * @property {Array.|null} [challengers] LoadGhostBattleInfoResponse challengers + * @property {Array.|null} [stampTargetCars] LoadGhostBattleInfoResponse stampTargetCars + * @property {Array.|null} [previousVersionStampTargetCars] LoadGhostBattleInfoResponse previousVersionStampTargetCars + * @property {Array.|null} [bookmarkedCars] LoadGhostBattleInfoResponse bookmarkedCars + * @property {Array.|null} [history] LoadGhostBattleInfoResponse history + * @property {Array.|null} [weakenedCars] LoadGhostBattleInfoResponse weakenedCars + * @property {number} stampSheetCount LoadGhostBattleInfoResponse stampSheetCount + * @property {Array.|null} [stampSheet] LoadGhostBattleInfoResponse stampSheet + * @property {Array.|null} [stampReturnStats] LoadGhostBattleInfoResponse stampReturnStats + */ + + /** + * Constructs a new LoadGhostBattleInfoResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostBattleInfoResponse. + * @implements ILoadGhostBattleInfoResponse + * @constructor + * @param {wm.protobuf.ILoadGhostBattleInfoResponse=} [properties] Properties to set + */ + function LoadGhostBattleInfoResponse(properties) { + this.friendCars = []; + this.challengers = []; + this.stampTargetCars = []; + this.previousVersionStampTargetCars = []; + this.bookmarkedCars = []; + this.history = []; + this.weakenedCars = []; + this.stampSheet = []; + this.stampReturnStats = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostBattleInfoResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.error = 0; + + /** + * LoadGhostBattleInfoResponse friendCars. + * @member {Array.} friendCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.friendCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse challengers. + * @member {Array.} challengers + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.challengers = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse stampTargetCars. + * @member {Array.} stampTargetCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampTargetCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse previousVersionStampTargetCars. + * @member {Array.} previousVersionStampTargetCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.previousVersionStampTargetCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse bookmarkedCars. + * @member {Array.} bookmarkedCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.bookmarkedCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse history. + * @member {Array.} history + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.history = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse weakenedCars. + * @member {Array.} weakenedCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.weakenedCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse stampSheetCount. + * @member {number} stampSheetCount + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampSheetCount = 0; + + /** + * LoadGhostBattleInfoResponse stampSheet. + * @member {Array.} stampSheet + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampSheet = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse stampReturnStats. + * @member {Array.} stampReturnStats + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampReturnStats = $util.emptyArray; + + /** + * Creates a new LoadGhostBattleInfoResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse instance + */ + LoadGhostBattleInfoResponse.create = function create(properties) { + return new LoadGhostBattleInfoResponse(properties); + }; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoResponse} message LoadGhostBattleInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.friendCars != null && message.friendCars.length) + for (let i = 0; i < message.friendCars.length; ++i) + $root.wm.protobuf.FriendCar.encode(message.friendCars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.challengers != null && message.challengers.length) + for (let i = 0; i < message.challengers.length; ++i) + $root.wm.protobuf.ChallengerCar.encode(message.challengers[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.stampTargetCars != null && message.stampTargetCars.length) + for (let i = 0; i < message.stampTargetCars.length; ++i) + $root.wm.protobuf.StampTargetCar.encode(message.stampTargetCars[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.history != null && message.history.length) + for (let i = 0; i < message.history.length; ++i) + $root.wm.protobuf.Car.encode(message.history[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.stampSheetCount); + if (message.stampSheet != null && message.stampSheet.length) + for (let i = 0; i < message.stampSheet.length; ++i) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stampSheet[i]); + if (message.stampReturnStats != null && message.stampReturnStats.length) + for (let i = 0; i < message.stampReturnStats.length; ++i) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.stampReturnStats[i]); + if (message.weakenedCars != null && message.weakenedCars.length) + for (let i = 0; i < message.weakenedCars.length; ++i) + $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.encode(message.weakenedCars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.bookmarkedCars != null && message.bookmarkedCars.length) + for (let i = 0; i < message.bookmarkedCars.length; ++i) + $root.wm.protobuf.BookmarkedCar.encode(message.bookmarkedCars[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.previousVersionStampTargetCars != null && message.previousVersionStampTargetCars.length) + for (let i = 0; i < message.previousVersionStampTargetCars.length; ++i) + $root.wm.protobuf.PreviousVersionStampTargetCar.encode(message.previousVersionStampTargetCars[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoResponse} message LoadGhostBattleInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostBattleInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.friendCars && message.friendCars.length)) + message.friendCars = []; + message.friendCars.push($root.wm.protobuf.FriendCar.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.challengers && message.challengers.length)) + message.challengers = []; + message.challengers.push($root.wm.protobuf.ChallengerCar.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.stampTargetCars && message.stampTargetCars.length)) + message.stampTargetCars = []; + message.stampTargetCars.push($root.wm.protobuf.StampTargetCar.decode(reader, reader.uint32())); + break; + } + case 12: { + if (!(message.previousVersionStampTargetCars && message.previousVersionStampTargetCars.length)) + message.previousVersionStampTargetCars = []; + message.previousVersionStampTargetCars.push($root.wm.protobuf.PreviousVersionStampTargetCar.decode(reader, reader.uint32())); + break; + } + case 11: { + if (!(message.bookmarkedCars && message.bookmarkedCars.length)) + message.bookmarkedCars = []; + message.bookmarkedCars.push($root.wm.protobuf.BookmarkedCar.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.history && message.history.length)) + message.history = []; + message.history.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.weakenedCars && message.weakenedCars.length)) + message.weakenedCars = []; + message.weakenedCars.push($root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.decode(reader, reader.uint32())); + break; + } + case 7: { + message.stampSheetCount = reader.uint32(); + break; + } + case 8: { + if (!(message.stampSheet && message.stampSheet.length)) + message.stampSheet = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampSheet.push(reader.uint32()); + } else + message.stampSheet.push(reader.uint32()); + break; + } + case 9: { + if (!(message.stampReturnStats && message.stampReturnStats.length)) + message.stampReturnStats = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampReturnStats.push(reader.uint32()); + } else + message.stampReturnStats.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("stampSheetCount")) + throw $util.ProtocolError("missing required 'stampSheetCount'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostBattleInfoResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostBattleInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.friendCars != null && message.hasOwnProperty("friendCars")) { + if (!Array.isArray(message.friendCars)) + return "friendCars: array expected"; + for (let i = 0; i < message.friendCars.length; ++i) { + let error = $root.wm.protobuf.FriendCar.verify(message.friendCars[i]); + if (error) + return "friendCars." + error; + } + } + if (message.challengers != null && message.hasOwnProperty("challengers")) { + if (!Array.isArray(message.challengers)) + return "challengers: array expected"; + for (let i = 0; i < message.challengers.length; ++i) { + let error = $root.wm.protobuf.ChallengerCar.verify(message.challengers[i]); + if (error) + return "challengers." + error; + } + } + if (message.stampTargetCars != null && message.hasOwnProperty("stampTargetCars")) { + if (!Array.isArray(message.stampTargetCars)) + return "stampTargetCars: array expected"; + for (let i = 0; i < message.stampTargetCars.length; ++i) { + let error = $root.wm.protobuf.StampTargetCar.verify(message.stampTargetCars[i]); + if (error) + return "stampTargetCars." + error; + } + } + if (message.previousVersionStampTargetCars != null && message.hasOwnProperty("previousVersionStampTargetCars")) { + if (!Array.isArray(message.previousVersionStampTargetCars)) + return "previousVersionStampTargetCars: array expected"; + for (let i = 0; i < message.previousVersionStampTargetCars.length; ++i) { + let error = $root.wm.protobuf.PreviousVersionStampTargetCar.verify(message.previousVersionStampTargetCars[i]); + if (error) + return "previousVersionStampTargetCars." + error; + } + } + if (message.bookmarkedCars != null && message.hasOwnProperty("bookmarkedCars")) { + if (!Array.isArray(message.bookmarkedCars)) + return "bookmarkedCars: array expected"; + for (let i = 0; i < message.bookmarkedCars.length; ++i) { + let error = $root.wm.protobuf.BookmarkedCar.verify(message.bookmarkedCars[i]); + if (error) + return "bookmarkedCars." + error; + } + } + if (message.history != null && message.hasOwnProperty("history")) { + if (!Array.isArray(message.history)) + return "history: array expected"; + for (let i = 0; i < message.history.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.history[i]); + if (error) + return "history." + error; + } + } + if (message.weakenedCars != null && message.hasOwnProperty("weakenedCars")) { + if (!Array.isArray(message.weakenedCars)) + return "weakenedCars: array expected"; + for (let i = 0; i < message.weakenedCars.length; ++i) { + let error = $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify(message.weakenedCars[i]); + if (error) + return "weakenedCars." + error; + } + } + if (!$util.isInteger(message.stampSheetCount)) + return "stampSheetCount: integer expected"; + if (message.stampSheet != null && message.hasOwnProperty("stampSheet")) { + if (!Array.isArray(message.stampSheet)) + return "stampSheet: array expected"; + for (let i = 0; i < message.stampSheet.length; ++i) + if (!$util.isInteger(message.stampSheet[i])) + return "stampSheet: integer[] expected"; + } + if (message.stampReturnStats != null && message.hasOwnProperty("stampReturnStats")) { + if (!Array.isArray(message.stampReturnStats)) + return "stampReturnStats: array expected"; + for (let i = 0; i < message.stampReturnStats.length; ++i) + if (!$util.isInteger(message.stampReturnStats[i])) + return "stampReturnStats: integer[] expected"; + } + return null; + }; + + /** + * Creates a LoadGhostBattleInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse + */ + LoadGhostBattleInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostBattleInfoResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostBattleInfoResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.friendCars) { + if (!Array.isArray(object.friendCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.friendCars: array expected"); + message.friendCars = []; + for (let i = 0; i < object.friendCars.length; ++i) { + if (typeof object.friendCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.friendCars: object expected"); + message.friendCars[i] = $root.wm.protobuf.FriendCar.fromObject(object.friendCars[i]); + } + } + if (object.challengers) { + if (!Array.isArray(object.challengers)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.challengers: array expected"); + message.challengers = []; + for (let i = 0; i < object.challengers.length; ++i) { + if (typeof object.challengers[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.challengers: object expected"); + message.challengers[i] = $root.wm.protobuf.ChallengerCar.fromObject(object.challengers[i]); + } + } + if (object.stampTargetCars) { + if (!Array.isArray(object.stampTargetCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampTargetCars: array expected"); + message.stampTargetCars = []; + for (let i = 0; i < object.stampTargetCars.length; ++i) { + if (typeof object.stampTargetCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampTargetCars: object expected"); + message.stampTargetCars[i] = $root.wm.protobuf.StampTargetCar.fromObject(object.stampTargetCars[i]); + } + } + if (object.previousVersionStampTargetCars) { + if (!Array.isArray(object.previousVersionStampTargetCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.previousVersionStampTargetCars: array expected"); + message.previousVersionStampTargetCars = []; + for (let i = 0; i < object.previousVersionStampTargetCars.length; ++i) { + if (typeof object.previousVersionStampTargetCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.previousVersionStampTargetCars: object expected"); + message.previousVersionStampTargetCars[i] = $root.wm.protobuf.PreviousVersionStampTargetCar.fromObject(object.previousVersionStampTargetCars[i]); + } + } + if (object.bookmarkedCars) { + if (!Array.isArray(object.bookmarkedCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.bookmarkedCars: array expected"); + message.bookmarkedCars = []; + for (let i = 0; i < object.bookmarkedCars.length; ++i) { + if (typeof object.bookmarkedCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.bookmarkedCars: object expected"); + message.bookmarkedCars[i] = $root.wm.protobuf.BookmarkedCar.fromObject(object.bookmarkedCars[i]); + } + } + if (object.history) { + if (!Array.isArray(object.history)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.history: array expected"); + message.history = []; + for (let i = 0; i < object.history.length; ++i) { + if (typeof object.history[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.history: object expected"); + message.history[i] = $root.wm.protobuf.Car.fromObject(object.history[i]); + } + } + if (object.weakenedCars) { + if (!Array.isArray(object.weakenedCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.weakenedCars: array expected"); + message.weakenedCars = []; + for (let i = 0; i < object.weakenedCars.length; ++i) { + if (typeof object.weakenedCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.weakenedCars: object expected"); + message.weakenedCars[i] = $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.fromObject(object.weakenedCars[i]); + } + } + if (object.stampSheetCount != null) + message.stampSheetCount = object.stampSheetCount >>> 0; + if (object.stampSheet) { + if (!Array.isArray(object.stampSheet)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampSheet: array expected"); + message.stampSheet = []; + for (let i = 0; i < object.stampSheet.length; ++i) + message.stampSheet[i] = object.stampSheet[i] >>> 0; + } + if (object.stampReturnStats) { + if (!Array.isArray(object.stampReturnStats)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampReturnStats: array expected"); + message.stampReturnStats = []; + for (let i = 0; i < object.stampReturnStats.length; ++i) + message.stampReturnStats[i] = object.stampReturnStats[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostBattleInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse} message LoadGhostBattleInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostBattleInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.friendCars = []; + object.challengers = []; + object.stampTargetCars = []; + object.history = []; + object.stampSheet = []; + object.stampReturnStats = []; + object.weakenedCars = []; + object.bookmarkedCars = []; + object.previousVersionStampTargetCars = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.stampSheetCount = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.friendCars && message.friendCars.length) { + object.friendCars = []; + for (let j = 0; j < message.friendCars.length; ++j) + object.friendCars[j] = $root.wm.protobuf.FriendCar.toObject(message.friendCars[j], options); + } + if (message.challengers && message.challengers.length) { + object.challengers = []; + for (let j = 0; j < message.challengers.length; ++j) + object.challengers[j] = $root.wm.protobuf.ChallengerCar.toObject(message.challengers[j], options); + } + if (message.stampTargetCars && message.stampTargetCars.length) { + object.stampTargetCars = []; + for (let j = 0; j < message.stampTargetCars.length; ++j) + object.stampTargetCars[j] = $root.wm.protobuf.StampTargetCar.toObject(message.stampTargetCars[j], options); + } + if (message.history && message.history.length) { + object.history = []; + for (let j = 0; j < message.history.length; ++j) + object.history[j] = $root.wm.protobuf.Car.toObject(message.history[j], options); + } + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + object.stampSheetCount = message.stampSheetCount; + if (message.stampSheet && message.stampSheet.length) { + object.stampSheet = []; + for (let j = 0; j < message.stampSheet.length; ++j) + object.stampSheet[j] = message.stampSheet[j]; + } + if (message.stampReturnStats && message.stampReturnStats.length) { + object.stampReturnStats = []; + for (let j = 0; j < message.stampReturnStats.length; ++j) + object.stampReturnStats[j] = message.stampReturnStats[j]; + } + if (message.weakenedCars && message.weakenedCars.length) { + object.weakenedCars = []; + for (let j = 0; j < message.weakenedCars.length; ++j) + object.weakenedCars[j] = $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.toObject(message.weakenedCars[j], options); + } + if (message.bookmarkedCars && message.bookmarkedCars.length) { + object.bookmarkedCars = []; + for (let j = 0; j < message.bookmarkedCars.length; ++j) + object.bookmarkedCars[j] = $root.wm.protobuf.BookmarkedCar.toObject(message.bookmarkedCars[j], options); + } + if (message.previousVersionStampTargetCars && message.previousVersionStampTargetCars.length) { + object.previousVersionStampTargetCars = []; + for (let j = 0; j < message.previousVersionStampTargetCars.length; ++j) + object.previousVersionStampTargetCars[j] = $root.wm.protobuf.PreviousVersionStampTargetCar.toObject(message.previousVersionStampTargetCars[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostBattleInfoResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostBattleInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostBattleInfoResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostBattleInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostBattleInfoResponse"; + }; + + LoadGhostBattleInfoResponse.WeakenedCar = (function() { + + /** + * Properties of a WeakenedCar. + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @interface IWeakenedCar + * @property {number} carId WeakenedCar carId + * @property {number} consecutiveLosses WeakenedCar consecutiveLosses + */ + + /** + * Constructs a new WeakenedCar. + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @classdesc Represents a WeakenedCar. + * @implements IWeakenedCar + * @constructor + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar=} [properties] Properties to set + */ + function WeakenedCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WeakenedCar carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @instance + */ + WeakenedCar.prototype.carId = 0; + + /** + * WeakenedCar consecutiveLosses. + * @member {number} consecutiveLosses + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @instance + */ + WeakenedCar.prototype.consecutiveLosses = 0; + + /** + * Creates a new WeakenedCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar instance + */ + WeakenedCar.create = function create(properties) { + return new WeakenedCar(properties); + }; + + /** + * Encodes the specified WeakenedCar message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar} message WeakenedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeakenedCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.consecutiveLosses); + return writer; + }; + + /** + * Encodes the specified WeakenedCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar} message WeakenedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeakenedCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeakenedCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.consecutiveLosses = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("consecutiveLosses")) + throw $util.ProtocolError("missing required 'consecutiveLosses'", { instance: message }); + return message; + }; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeakenedCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WeakenedCar message. + * @function verify + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeakenedCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.consecutiveLosses)) + return "consecutiveLosses: integer expected"; + return null; + }; + + /** + * Creates a WeakenedCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar + */ + WeakenedCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar) + return object; + let message = new $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.consecutiveLosses != null) + message.consecutiveLosses = object.consecutiveLosses >>> 0; + return message; + }; + + /** + * Creates a plain object from a WeakenedCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} message WeakenedCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeakenedCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.consecutiveLosses = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.consecutiveLosses != null && message.hasOwnProperty("consecutiveLosses")) + object.consecutiveLosses = message.consecutiveLosses; + return object; + }; + + /** + * Converts this WeakenedCar to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @instance + * @returns {Object.} JSON object + */ + WeakenedCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WeakenedCar + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WeakenedCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar"; + }; + + return WeakenedCar; + })(); + + return LoadGhostBattleInfoResponse; + })(); + + protobuf.LoadStampTargetRequest = (function() { + + /** + * Properties of a LoadStampTargetRequest. + * @memberof wm.protobuf + * @interface ILoadStampTargetRequest + * @property {number} carId LoadStampTargetRequest carId + * @property {boolean} needToPromote LoadStampTargetRequest needToPromote + */ + + /** + * Constructs a new LoadStampTargetRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadStampTargetRequest. + * @implements ILoadStampTargetRequest + * @constructor + * @param {wm.protobuf.ILoadStampTargetRequest=} [properties] Properties to set + */ + function LoadStampTargetRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadStampTargetRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadStampTargetRequest + * @instance + */ + LoadStampTargetRequest.prototype.carId = 0; + + /** + * LoadStampTargetRequest needToPromote. + * @member {boolean} needToPromote + * @memberof wm.protobuf.LoadStampTargetRequest + * @instance + */ + LoadStampTargetRequest.prototype.needToPromote = false; + + /** + * Creates a new LoadStampTargetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.ILoadStampTargetRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest instance + */ + LoadStampTargetRequest.create = function create(properties) { + return new LoadStampTargetRequest(properties); + }; + + /** + * Encodes the specified LoadStampTargetRequest message. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.ILoadStampTargetRequest} message LoadStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.needToPromote); + return writer; + }; + + /** + * Encodes the specified LoadStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.ILoadStampTargetRequest} message LoadStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadStampTargetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.needToPromote = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("needToPromote")) + throw $util.ProtocolError("missing required 'needToPromote'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadStampTargetRequest message. + * @function verify + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadStampTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (typeof message.needToPromote !== "boolean") + return "needToPromote: boolean expected"; + return null; + }; + + /** + * Creates a LoadStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest + */ + LoadStampTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadStampTargetRequest) + return object; + let message = new $root.wm.protobuf.LoadStampTargetRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.needToPromote != null) + message.needToPromote = Boolean(object.needToPromote); + return message; + }; + + /** + * Creates a plain object from a LoadStampTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.LoadStampTargetRequest} message LoadStampTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadStampTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.needToPromote = false; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.needToPromote != null && message.hasOwnProperty("needToPromote")) + object.needToPromote = message.needToPromote; + return object; + }; + + /** + * Converts this LoadStampTargetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadStampTargetRequest + * @instance + * @returns {Object.} JSON object + */ + LoadStampTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadStampTargetRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadStampTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadStampTargetRequest"; + }; + + return LoadStampTargetRequest; + })(); + + protobuf.LoadStampTargetResponse = (function() { + + /** + * Properties of a LoadStampTargetResponse. + * @memberof wm.protobuf + * @interface ILoadStampTargetResponse + * @property {wm.protobuf.ErrorCode} error LoadStampTargetResponse error + * @property {Array.|null} [cars] LoadStampTargetResponse cars + * @property {Array.|null} [challengers] LoadStampTargetResponse challengers + */ + + /** + * Constructs a new LoadStampTargetResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadStampTargetResponse. + * @implements ILoadStampTargetResponse + * @constructor + * @param {wm.protobuf.ILoadStampTargetResponse=} [properties] Properties to set + */ + function LoadStampTargetResponse(properties) { + this.cars = []; + this.challengers = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadStampTargetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + */ + LoadStampTargetResponse.prototype.error = 0; + + /** + * LoadStampTargetResponse cars. + * @member {Array.} cars + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + */ + LoadStampTargetResponse.prototype.cars = $util.emptyArray; + + /** + * LoadStampTargetResponse challengers. + * @member {Array.} challengers + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + */ + LoadStampTargetResponse.prototype.challengers = $util.emptyArray; + + /** + * Creates a new LoadStampTargetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.ILoadStampTargetResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse instance + */ + LoadStampTargetResponse.create = function create(properties) { + return new LoadStampTargetResponse(properties); + }; + + /** + * Encodes the specified LoadStampTargetResponse message. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.ILoadStampTargetResponse} message LoadStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.StampTargetCar.encode(message.cars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.challengers != null && message.challengers.length) + for (let i = 0; i < message.challengers.length; ++i) + $root.wm.protobuf.ChallengerCar.encode(message.challengers[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.ILoadStampTargetResponse} message LoadStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadStampTargetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.StampTargetCar.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.challengers && message.challengers.length)) + message.challengers = []; + message.challengers.push($root.wm.protobuf.ChallengerCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadStampTargetResponse message. + * @function verify + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadStampTargetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.StampTargetCar.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + if (message.challengers != null && message.hasOwnProperty("challengers")) { + if (!Array.isArray(message.challengers)) + return "challengers: array expected"; + for (let i = 0; i < message.challengers.length; ++i) { + let error = $root.wm.protobuf.ChallengerCar.verify(message.challengers[i]); + if (error) + return "challengers." + error; + } + } + return null; + }; + + /** + * Creates a LoadStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse + */ + LoadStampTargetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadStampTargetResponse) + return object; + let message = new $root.wm.protobuf.LoadStampTargetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.LoadStampTargetResponse.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.LoadStampTargetResponse.cars: object expected"); + message.cars[i] = $root.wm.protobuf.StampTargetCar.fromObject(object.cars[i]); + } + } + if (object.challengers) { + if (!Array.isArray(object.challengers)) + throw TypeError(".wm.protobuf.LoadStampTargetResponse.challengers: array expected"); + message.challengers = []; + for (let i = 0; i < object.challengers.length; ++i) { + if (typeof object.challengers[i] !== "object") + throw TypeError(".wm.protobuf.LoadStampTargetResponse.challengers: object expected"); + message.challengers[i] = $root.wm.protobuf.ChallengerCar.fromObject(object.challengers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadStampTargetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.LoadStampTargetResponse} message LoadStampTargetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadStampTargetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.cars = []; + object.challengers = []; + } + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.StampTargetCar.toObject(message.cars[j], options); + } + if (message.challengers && message.challengers.length) { + object.challengers = []; + for (let j = 0; j < message.challengers.length; ++j) + object.challengers[j] = $root.wm.protobuf.ChallengerCar.toObject(message.challengers[j], options); + } + return object; + }; + + /** + * Converts this LoadStampTargetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + * @returns {Object.} JSON object + */ + LoadStampTargetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadStampTargetResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadStampTargetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadStampTargetResponse"; + }; + + return LoadStampTargetResponse; + })(); + + protobuf.LockStampTargetRequest = (function() { + + /** + * Properties of a LockStampTargetRequest. + * @memberof wm.protobuf + * @interface ILockStampTargetRequest + * @property {number} carId LockStampTargetRequest carId + * @property {Array.|null} [targetCars] LockStampTargetRequest targetCars + */ + + /** + * Constructs a new LockStampTargetRequest. + * @memberof wm.protobuf + * @classdesc Represents a LockStampTargetRequest. + * @implements ILockStampTargetRequest + * @constructor + * @param {wm.protobuf.ILockStampTargetRequest=} [properties] Properties to set + */ + function LockStampTargetRequest(properties) { + this.targetCars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LockStampTargetRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LockStampTargetRequest + * @instance + */ + LockStampTargetRequest.prototype.carId = 0; + + /** + * LockStampTargetRequest targetCars. + * @member {Array.} targetCars + * @memberof wm.protobuf.LockStampTargetRequest + * @instance + */ + LockStampTargetRequest.prototype.targetCars = $util.emptyArray; + + /** + * Creates a new LockStampTargetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.ILockStampTargetRequest=} [properties] Properties to set + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest instance + */ + LockStampTargetRequest.create = function create(properties) { + return new LockStampTargetRequest(properties); + }; + + /** + * Encodes the specified LockStampTargetRequest message. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.ILockStampTargetRequest} message LockStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.targetCars != null && message.targetCars.length) + for (let i = 0; i < message.targetCars.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetCars[i]); + return writer; + }; + + /** + * Encodes the specified LockStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.ILockStampTargetRequest} message LockStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LockStampTargetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + if (!(message.targetCars && message.targetCars.length)) + message.targetCars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targetCars.push(reader.uint32()); + } else + message.targetCars.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LockStampTargetRequest message. + * @function verify + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LockStampTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.targetCars != null && message.hasOwnProperty("targetCars")) { + if (!Array.isArray(message.targetCars)) + return "targetCars: array expected"; + for (let i = 0; i < message.targetCars.length; ++i) + if (!$util.isInteger(message.targetCars[i])) + return "targetCars: integer[] expected"; + } + return null; + }; + + /** + * Creates a LockStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest + */ + LockStampTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LockStampTargetRequest) + return object; + let message = new $root.wm.protobuf.LockStampTargetRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.targetCars) { + if (!Array.isArray(object.targetCars)) + throw TypeError(".wm.protobuf.LockStampTargetRequest.targetCars: array expected"); + message.targetCars = []; + for (let i = 0; i < object.targetCars.length; ++i) + message.targetCars[i] = object.targetCars[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LockStampTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.LockStampTargetRequest} message LockStampTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LockStampTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.targetCars = []; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.targetCars && message.targetCars.length) { + object.targetCars = []; + for (let j = 0; j < message.targetCars.length; ++j) + object.targetCars[j] = message.targetCars[j]; + } + return object; + }; + + /** + * Converts this LockStampTargetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LockStampTargetRequest + * @instance + * @returns {Object.} JSON object + */ + LockStampTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LockStampTargetRequest + * @function getTypeUrl + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LockStampTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LockStampTargetRequest"; + }; + + return LockStampTargetRequest; + })(); + + protobuf.LockStampTargetResponse = (function() { + + /** + * Properties of a LockStampTargetResponse. + * @memberof wm.protobuf + * @interface ILockStampTargetResponse + * @property {wm.protobuf.ErrorCode} error LockStampTargetResponse error + */ + + /** + * Constructs a new LockStampTargetResponse. + * @memberof wm.protobuf + * @classdesc Represents a LockStampTargetResponse. + * @implements ILockStampTargetResponse + * @constructor + * @param {wm.protobuf.ILockStampTargetResponse=} [properties] Properties to set + */ + function LockStampTargetResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LockStampTargetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LockStampTargetResponse + * @instance + */ + LockStampTargetResponse.prototype.error = 0; + + /** + * Creates a new LockStampTargetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.ILockStampTargetResponse=} [properties] Properties to set + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse instance + */ + LockStampTargetResponse.create = function create(properties) { + return new LockStampTargetResponse(properties); + }; + + /** + * Encodes the specified LockStampTargetResponse message. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.ILockStampTargetResponse} message LockStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified LockStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.ILockStampTargetResponse} message LockStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LockStampTargetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LockStampTargetResponse message. + * @function verify + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LockStampTargetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a LockStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse + */ + LockStampTargetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LockStampTargetResponse) + return object; + let message = new $root.wm.protobuf.LockStampTargetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a LockStampTargetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.LockStampTargetResponse} message LockStampTargetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LockStampTargetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this LockStampTargetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LockStampTargetResponse + * @instance + * @returns {Object.} JSON object + */ + LockStampTargetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LockStampTargetResponse + * @function getTypeUrl + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LockStampTargetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LockStampTargetResponse"; + }; + + return LockStampTargetResponse; + })(); + + protobuf.LoadGhostCompetitionInfoRequest = (function() { + + /** + * Properties of a LoadGhostCompetitionInfoRequest. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionInfoRequest + * @property {number} carId LoadGhostCompetitionInfoRequest carId + * @property {number} competitionId LoadGhostCompetitionInfoRequest competitionId + */ + + /** + * Constructs a new LoadGhostCompetitionInfoRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionInfoRequest. + * @implements ILoadGhostCompetitionInfoRequest + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest=} [properties] Properties to set + */ + function LoadGhostCompetitionInfoRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionInfoRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @instance + */ + LoadGhostCompetitionInfoRequest.prototype.carId = 0; + + /** + * LoadGhostCompetitionInfoRequest competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @instance + */ + LoadGhostCompetitionInfoRequest.prototype.competitionId = 0; + + /** + * Creates a new LoadGhostCompetitionInfoRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest instance + */ + LoadGhostCompetitionInfoRequest.create = function create(properties) { + return new LoadGhostCompetitionInfoRequest(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest} message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.competitionId); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest} message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.competitionId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionInfoRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + return null; + }; + + /** + * Creates a LoadGhostCompetitionInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest + */ + LoadGhostCompetitionInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionInfoRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionInfoRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.LoadGhostCompetitionInfoRequest} message LoadGhostCompetitionInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.competitionId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + return object; + }; + + /** + * Converts this LoadGhostCompetitionInfoRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionInfoRequest"; + }; + + return LoadGhostCompetitionInfoRequest; + })(); + + protobuf.LoadGhostCompetitionInfoResponse = (function() { + + /** + * Properties of a LoadGhostCompetitionInfoResponse. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionInfoResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostCompetitionInfoResponse error + * @property {number|null} [periodId] LoadGhostCompetitionInfoResponse periodId + * @property {boolean} closed LoadGhostCompetitionInfoResponse closed + * @property {number|null} [brakingPoint] LoadGhostCompetitionInfoResponse brakingPoint + * @property {boolean|null} [qualified] LoadGhostCompetitionInfoResponse qualified + * @property {Array.|null} [topResults] LoadGhostCompetitionInfoResponse topResults + * @property {number|null} [result] LoadGhostCompetitionInfoResponse result + * @property {number|null} [rank] LoadGhostCompetitionInfoResponse rank + * @property {Array.|null} [parameters1] LoadGhostCompetitionInfoResponse parameters1 + * @property {boolean|null} [parameters2] LoadGhostCompetitionInfoResponse parameters2 + */ + + /** + * Constructs a new LoadGhostCompetitionInfoResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionInfoResponse. + * @implements ILoadGhostCompetitionInfoResponse + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse=} [properties] Properties to set + */ + function LoadGhostCompetitionInfoResponse(properties) { + this.topResults = []; + this.parameters1 = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionInfoResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.error = 0; + + /** + * LoadGhostCompetitionInfoResponse periodId. + * @member {number} periodId + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.periodId = 0; + + /** + * LoadGhostCompetitionInfoResponse closed. + * @member {boolean} closed + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.closed = false; + + /** + * LoadGhostCompetitionInfoResponse brakingPoint. + * @member {number} brakingPoint + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.brakingPoint = 0; + + /** + * LoadGhostCompetitionInfoResponse qualified. + * @member {boolean} qualified + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.qualified = false; + + /** + * LoadGhostCompetitionInfoResponse topResults. + * @member {Array.} topResults + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.topResults = $util.emptyArray; + + /** + * LoadGhostCompetitionInfoResponse result. + * @member {number} result + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.result = 0; + + /** + * LoadGhostCompetitionInfoResponse rank. + * @member {number} rank + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.rank = 0; + + /** + * LoadGhostCompetitionInfoResponse parameters1. + * @member {Array.} parameters1 + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.parameters1 = $util.emptyArray; + + /** + * LoadGhostCompetitionInfoResponse parameters2. + * @member {boolean} parameters2 + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.parameters2 = false; + + /** + * Creates a new LoadGhostCompetitionInfoResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse instance + */ + LoadGhostCompetitionInfoResponse.create = function create(properties) { + return new LoadGhostCompetitionInfoResponse(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse} message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.periodId != null && Object.hasOwnProperty.call(message, "periodId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.periodId); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.closed); + if (message.brakingPoint != null && Object.hasOwnProperty.call(message, "brakingPoint")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.brakingPoint); + if (message.qualified != null && Object.hasOwnProperty.call(message, "qualified")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.qualified); + if (message.topResults != null && message.topResults.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (let i = 0; i < message.topResults.length; ++i) + writer.sint32(message.topResults[i]); + writer.ldelim(); + } + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 7, wireType 0 =*/56).sint32(message.result); + if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.rank); + if (message.parameters1 != null && message.parameters1.length) + for (let i = 0; i < message.parameters1.length; ++i) + writer.uint32(/* id 9, wireType 5 =*/77).float(message.parameters1[i]); + if (message.parameters2 != null && Object.hasOwnProperty.call(message, "parameters2")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.parameters2); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse} message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.periodId = reader.uint32(); + break; + } + case 3: { + message.closed = reader.bool(); + break; + } + case 4: { + message.brakingPoint = reader.uint32(); + break; + } + case 5: { + message.qualified = reader.bool(); + break; + } + case 6: { + if (!(message.topResults && message.topResults.length)) + message.topResults = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.topResults.push(reader.sint32()); + } else + message.topResults.push(reader.sint32()); + break; + } + case 7: { + message.result = reader.sint32(); + break; + } + case 8: { + message.rank = reader.uint32(); + break; + } + case 9: { + if (!(message.parameters1 && message.parameters1.length)) + message.parameters1 = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.parameters1.push(reader.float()); + } else + message.parameters1.push(reader.float()); + break; + } + case 10: { + message.parameters2 = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("closed")) + throw $util.ProtocolError("missing required 'closed'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionInfoResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.periodId != null && message.hasOwnProperty("periodId")) + if (!$util.isInteger(message.periodId)) + return "periodId: integer expected"; + if (typeof message.closed !== "boolean") + return "closed: boolean expected"; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + if (!$util.isInteger(message.brakingPoint)) + return "brakingPoint: integer expected"; + if (message.qualified != null && message.hasOwnProperty("qualified")) + if (typeof message.qualified !== "boolean") + return "qualified: boolean expected"; + if (message.topResults != null && message.hasOwnProperty("topResults")) { + if (!Array.isArray(message.topResults)) + return "topResults: array expected"; + for (let i = 0; i < message.topResults.length; ++i) + if (!$util.isInteger(message.topResults[i])) + return "topResults: integer[] expected"; + } + if (message.result != null && message.hasOwnProperty("result")) + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (message.rank != null && message.hasOwnProperty("rank")) + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (message.parameters1 != null && message.hasOwnProperty("parameters1")) { + if (!Array.isArray(message.parameters1)) + return "parameters1: array expected"; + for (let i = 0; i < message.parameters1.length; ++i) + if (typeof message.parameters1[i] !== "number") + return "parameters1: number[] expected"; + } + if (message.parameters2 != null && message.hasOwnProperty("parameters2")) + if (typeof message.parameters2 !== "boolean") + return "parameters2: boolean expected"; + return null; + }; + + /** + * Creates a LoadGhostCompetitionInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse + */ + LoadGhostCompetitionInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionInfoResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionInfoResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.periodId != null) + message.periodId = object.periodId >>> 0; + if (object.closed != null) + message.closed = Boolean(object.closed); + if (object.brakingPoint != null) + message.brakingPoint = object.brakingPoint >>> 0; + if (object.qualified != null) + message.qualified = Boolean(object.qualified); + if (object.topResults) { + if (!Array.isArray(object.topResults)) + throw TypeError(".wm.protobuf.LoadGhostCompetitionInfoResponse.topResults: array expected"); + message.topResults = []; + for (let i = 0; i < object.topResults.length; ++i) + message.topResults[i] = object.topResults[i] | 0; + } + if (object.result != null) + message.result = object.result | 0; + if (object.rank != null) + message.rank = object.rank >>> 0; + if (object.parameters1) { + if (!Array.isArray(object.parameters1)) + throw TypeError(".wm.protobuf.LoadGhostCompetitionInfoResponse.parameters1: array expected"); + message.parameters1 = []; + for (let i = 0; i < object.parameters1.length; ++i) + message.parameters1[i] = Number(object.parameters1[i]); + } + if (object.parameters2 != null) + message.parameters2 = Boolean(object.parameters2); + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.LoadGhostCompetitionInfoResponse} message LoadGhostCompetitionInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.topResults = []; + object.parameters1 = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.periodId = 0; + object.closed = false; + object.brakingPoint = 0; + object.qualified = false; + object.result = 0; + object.rank = 0; + object.parameters2 = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.periodId != null && message.hasOwnProperty("periodId")) + object.periodId = message.periodId; + if (message.closed != null && message.hasOwnProperty("closed")) + object.closed = message.closed; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + object.brakingPoint = message.brakingPoint; + if (message.qualified != null && message.hasOwnProperty("qualified")) + object.qualified = message.qualified; + if (message.topResults && message.topResults.length) { + object.topResults = []; + for (let j = 0; j < message.topResults.length; ++j) + object.topResults[j] = message.topResults[j]; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.parameters1 && message.parameters1.length) { + object.parameters1 = []; + for (let j = 0; j < message.parameters1.length; ++j) + object.parameters1[j] = options.json && !isFinite(message.parameters1[j]) ? String(message.parameters1[j]) : message.parameters1[j]; + } + if (message.parameters2 != null && message.hasOwnProperty("parameters2")) + object.parameters2 = message.parameters2; + return object; + }; + + /** + * Converts this LoadGhostCompetitionInfoResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionInfoResponse"; + }; + + return LoadGhostCompetitionInfoResponse; + })(); + + protobuf.LoadTimeAttackRecordRequest = (function() { + + /** + * Properties of a LoadTimeAttackRecordRequest. + * @memberof wm.protobuf + * @interface ILoadTimeAttackRecordRequest + * @property {number|null} [carId] LoadTimeAttackRecordRequest carId + * @property {number} model LoadTimeAttackRecordRequest model + * @property {number} course LoadTimeAttackRecordRequest course + */ + + /** + * Constructs a new LoadTimeAttackRecordRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadTimeAttackRecordRequest. + * @implements ILoadTimeAttackRecordRequest + * @constructor + * @param {wm.protobuf.ILoadTimeAttackRecordRequest=} [properties] Properties to set + */ + function LoadTimeAttackRecordRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTimeAttackRecordRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + */ + LoadTimeAttackRecordRequest.prototype.carId = 0; + + /** + * LoadTimeAttackRecordRequest model. + * @member {number} model + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + */ + LoadTimeAttackRecordRequest.prototype.model = 0; + + /** + * LoadTimeAttackRecordRequest course. + * @member {number} course + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + */ + LoadTimeAttackRecordRequest.prototype.course = 0; + + /** + * Creates a new LoadTimeAttackRecordRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest instance + */ + LoadTimeAttackRecordRequest.create = function create(properties) { + return new LoadTimeAttackRecordRequest(properties); + }; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordRequest} message LoadTimeAttackRecordRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.model); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.course); + return writer; + }; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordRequest} message LoadTimeAttackRecordRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTimeAttackRecordRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.model = reader.uint32(); + break; + } + case 3: { + message.course = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("model")) + throw $util.ProtocolError("missing required 'model'", { instance: message }); + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTimeAttackRecordRequest message. + * @function verify + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTimeAttackRecordRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.model)) + return "model: integer expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + return null; + }; + + /** + * Creates a LoadTimeAttackRecordRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest + */ + LoadTimeAttackRecordRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTimeAttackRecordRequest) + return object; + let message = new $root.wm.protobuf.LoadTimeAttackRecordRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.model != null) + message.model = object.model >>> 0; + if (object.course != null) + message.course = object.course >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadTimeAttackRecordRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.LoadTimeAttackRecordRequest} message LoadTimeAttackRecordRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTimeAttackRecordRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.model = 0; + object.course = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + return object; + }; + + /** + * Converts this LoadTimeAttackRecordRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + * @returns {Object.} JSON object + */ + LoadTimeAttackRecordRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTimeAttackRecordRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTimeAttackRecordRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTimeAttackRecordRequest"; + }; + + return LoadTimeAttackRecordRequest; + })(); + + protobuf.LoadTimeAttackRecordResponse = (function() { + + /** + * Properties of a LoadTimeAttackRecordResponse. + * @memberof wm.protobuf + * @interface ILoadTimeAttackRecordResponse + * @property {wm.protobuf.ErrorCode} error LoadTimeAttackRecordResponse error + * @property {Array.|null} [wholeRanking] LoadTimeAttackRecordResponse wholeRanking + * @property {Array.|null} [modelRanking] LoadTimeAttackRecordResponse modelRanking + * @property {number|null} [personalBestTime] LoadTimeAttackRecordResponse personalBestTime + * @property {number|null} [pbSection_1Time] LoadTimeAttackRecordResponse pbSection_1Time + * @property {number|null} [pbSection_2Time] LoadTimeAttackRecordResponse pbSection_2Time + * @property {number|null} [pbSection_3Time] LoadTimeAttackRecordResponse pbSection_3Time + * @property {number|null} [pbSection_4Time] LoadTimeAttackRecordResponse pbSection_4Time + * @property {number|null} [pbSection_5Time] LoadTimeAttackRecordResponse pbSection_5Time + * @property {number|null} [pbSection_6Time] LoadTimeAttackRecordResponse pbSection_6Time + * @property {number|null} [pbSection_7Time] LoadTimeAttackRecordResponse pbSection_7Time + */ + + /** + * Constructs a new LoadTimeAttackRecordResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadTimeAttackRecordResponse. + * @implements ILoadTimeAttackRecordResponse + * @constructor + * @param {wm.protobuf.ILoadTimeAttackRecordResponse=} [properties] Properties to set + */ + function LoadTimeAttackRecordResponse(properties) { + this.wholeRanking = []; + this.modelRanking = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTimeAttackRecordResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.error = 0; + + /** + * LoadTimeAttackRecordResponse wholeRanking. + * @member {Array.} wholeRanking + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.wholeRanking = $util.emptyArray; + + /** + * LoadTimeAttackRecordResponse modelRanking. + * @member {Array.} modelRanking + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.modelRanking = $util.emptyArray; + + /** + * LoadTimeAttackRecordResponse personalBestTime. + * @member {number} personalBestTime + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.personalBestTime = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_1Time. + * @member {number} pbSection_1Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_1Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_2Time. + * @member {number} pbSection_2Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_2Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_3Time. + * @member {number} pbSection_3Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_3Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_4Time. + * @member {number} pbSection_4Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_4Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_5Time. + * @member {number} pbSection_5Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_5Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_6Time. + * @member {number} pbSection_6Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_6Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_7Time. + * @member {number} pbSection_7Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_7Time = 0; + + /** + * Creates a new LoadTimeAttackRecordResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse instance + */ + LoadTimeAttackRecordResponse.create = function create(properties) { + return new LoadTimeAttackRecordResponse(properties); + }; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordResponse} message LoadTimeAttackRecordResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.wholeRanking != null && message.wholeRanking.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (let i = 0; i < message.wholeRanking.length; ++i) + writer.uint32(message.wholeRanking[i]); + writer.ldelim(); + } + if (message.modelRanking != null && message.modelRanking.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (let i = 0; i < message.modelRanking.length; ++i) + writer.uint32(message.modelRanking[i]); + writer.ldelim(); + } + if (message.personalBestTime != null && Object.hasOwnProperty.call(message, "personalBestTime")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.personalBestTime); + if (message.pbSection_1Time != null && Object.hasOwnProperty.call(message, "pbSection_1Time")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.pbSection_1Time); + if (message.pbSection_2Time != null && Object.hasOwnProperty.call(message, "pbSection_2Time")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.pbSection_2Time); + if (message.pbSection_3Time != null && Object.hasOwnProperty.call(message, "pbSection_3Time")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.pbSection_3Time); + if (message.pbSection_4Time != null && Object.hasOwnProperty.call(message, "pbSection_4Time")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.pbSection_4Time); + if (message.pbSection_5Time != null && Object.hasOwnProperty.call(message, "pbSection_5Time")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.pbSection_5Time); + if (message.pbSection_6Time != null && Object.hasOwnProperty.call(message, "pbSection_6Time")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.pbSection_6Time); + if (message.pbSection_7Time != null && Object.hasOwnProperty.call(message, "pbSection_7Time")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.pbSection_7Time); + return writer; + }; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordResponse} message LoadTimeAttackRecordResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTimeAttackRecordResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.wholeRanking && message.wholeRanking.length)) + message.wholeRanking = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.wholeRanking.push(reader.uint32()); + } else + message.wholeRanking.push(reader.uint32()); + break; + } + case 3: { + if (!(message.modelRanking && message.modelRanking.length)) + message.modelRanking = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.modelRanking.push(reader.uint32()); + } else + message.modelRanking.push(reader.uint32()); + break; + } + case 4: { + message.personalBestTime = reader.uint32(); + break; + } + case 5: { + message.pbSection_1Time = reader.uint32(); + break; + } + case 6: { + message.pbSection_2Time = reader.uint32(); + break; + } + case 7: { + message.pbSection_3Time = reader.uint32(); + break; + } + case 8: { + message.pbSection_4Time = reader.uint32(); + break; + } + case 9: { + message.pbSection_5Time = reader.uint32(); + break; + } + case 10: { + message.pbSection_6Time = reader.uint32(); + break; + } + case 11: { + message.pbSection_7Time = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTimeAttackRecordResponse message. + * @function verify + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTimeAttackRecordResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.wholeRanking != null && message.hasOwnProperty("wholeRanking")) { + if (!Array.isArray(message.wholeRanking)) + return "wholeRanking: array expected"; + for (let i = 0; i < message.wholeRanking.length; ++i) + if (!$util.isInteger(message.wholeRanking[i])) + return "wholeRanking: integer[] expected"; + } + if (message.modelRanking != null && message.hasOwnProperty("modelRanking")) { + if (!Array.isArray(message.modelRanking)) + return "modelRanking: array expected"; + for (let i = 0; i < message.modelRanking.length; ++i) + if (!$util.isInteger(message.modelRanking[i])) + return "modelRanking: integer[] expected"; + } + if (message.personalBestTime != null && message.hasOwnProperty("personalBestTime")) + if (!$util.isInteger(message.personalBestTime)) + return "personalBestTime: integer expected"; + if (message.pbSection_1Time != null && message.hasOwnProperty("pbSection_1Time")) + if (!$util.isInteger(message.pbSection_1Time)) + return "pbSection_1Time: integer expected"; + if (message.pbSection_2Time != null && message.hasOwnProperty("pbSection_2Time")) + if (!$util.isInteger(message.pbSection_2Time)) + return "pbSection_2Time: integer expected"; + if (message.pbSection_3Time != null && message.hasOwnProperty("pbSection_3Time")) + if (!$util.isInteger(message.pbSection_3Time)) + return "pbSection_3Time: integer expected"; + if (message.pbSection_4Time != null && message.hasOwnProperty("pbSection_4Time")) + if (!$util.isInteger(message.pbSection_4Time)) + return "pbSection_4Time: integer expected"; + if (message.pbSection_5Time != null && message.hasOwnProperty("pbSection_5Time")) + if (!$util.isInteger(message.pbSection_5Time)) + return "pbSection_5Time: integer expected"; + if (message.pbSection_6Time != null && message.hasOwnProperty("pbSection_6Time")) + if (!$util.isInteger(message.pbSection_6Time)) + return "pbSection_6Time: integer expected"; + if (message.pbSection_7Time != null && message.hasOwnProperty("pbSection_7Time")) + if (!$util.isInteger(message.pbSection_7Time)) + return "pbSection_7Time: integer expected"; + return null; + }; + + /** + * Creates a LoadTimeAttackRecordResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse + */ + LoadTimeAttackRecordResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTimeAttackRecordResponse) + return object; + let message = new $root.wm.protobuf.LoadTimeAttackRecordResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.wholeRanking) { + if (!Array.isArray(object.wholeRanking)) + throw TypeError(".wm.protobuf.LoadTimeAttackRecordResponse.wholeRanking: array expected"); + message.wholeRanking = []; + for (let i = 0; i < object.wholeRanking.length; ++i) + message.wholeRanking[i] = object.wholeRanking[i] >>> 0; + } + if (object.modelRanking) { + if (!Array.isArray(object.modelRanking)) + throw TypeError(".wm.protobuf.LoadTimeAttackRecordResponse.modelRanking: array expected"); + message.modelRanking = []; + for (let i = 0; i < object.modelRanking.length; ++i) + message.modelRanking[i] = object.modelRanking[i] >>> 0; + } + if (object.personalBestTime != null) + message.personalBestTime = object.personalBestTime >>> 0; + if (object.pbSection_1Time != null) + message.pbSection_1Time = object.pbSection_1Time >>> 0; + if (object.pbSection_2Time != null) + message.pbSection_2Time = object.pbSection_2Time >>> 0; + if (object.pbSection_3Time != null) + message.pbSection_3Time = object.pbSection_3Time >>> 0; + if (object.pbSection_4Time != null) + message.pbSection_4Time = object.pbSection_4Time >>> 0; + if (object.pbSection_5Time != null) + message.pbSection_5Time = object.pbSection_5Time >>> 0; + if (object.pbSection_6Time != null) + message.pbSection_6Time = object.pbSection_6Time >>> 0; + if (object.pbSection_7Time != null) + message.pbSection_7Time = object.pbSection_7Time >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadTimeAttackRecordResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.LoadTimeAttackRecordResponse} message LoadTimeAttackRecordResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTimeAttackRecordResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.wholeRanking = []; + object.modelRanking = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.personalBestTime = 0; + object.pbSection_1Time = 0; + object.pbSection_2Time = 0; + object.pbSection_3Time = 0; + object.pbSection_4Time = 0; + object.pbSection_5Time = 0; + object.pbSection_6Time = 0; + object.pbSection_7Time = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.wholeRanking && message.wholeRanking.length) { + object.wholeRanking = []; + for (let j = 0; j < message.wholeRanking.length; ++j) + object.wholeRanking[j] = message.wholeRanking[j]; + } + if (message.modelRanking && message.modelRanking.length) { + object.modelRanking = []; + for (let j = 0; j < message.modelRanking.length; ++j) + object.modelRanking[j] = message.modelRanking[j]; + } + if (message.personalBestTime != null && message.hasOwnProperty("personalBestTime")) + object.personalBestTime = message.personalBestTime; + if (message.pbSection_1Time != null && message.hasOwnProperty("pbSection_1Time")) + object.pbSection_1Time = message.pbSection_1Time; + if (message.pbSection_2Time != null && message.hasOwnProperty("pbSection_2Time")) + object.pbSection_2Time = message.pbSection_2Time; + if (message.pbSection_3Time != null && message.hasOwnProperty("pbSection_3Time")) + object.pbSection_3Time = message.pbSection_3Time; + if (message.pbSection_4Time != null && message.hasOwnProperty("pbSection_4Time")) + object.pbSection_4Time = message.pbSection_4Time; + if (message.pbSection_5Time != null && message.hasOwnProperty("pbSection_5Time")) + object.pbSection_5Time = message.pbSection_5Time; + if (message.pbSection_6Time != null && message.hasOwnProperty("pbSection_6Time")) + object.pbSection_6Time = message.pbSection_6Time; + if (message.pbSection_7Time != null && message.hasOwnProperty("pbSection_7Time")) + object.pbSection_7Time = message.pbSection_7Time; + return object; + }; + + /** + * Converts this LoadTimeAttackRecordResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + * @returns {Object.} JSON object + */ + LoadTimeAttackRecordResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTimeAttackRecordResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTimeAttackRecordResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTimeAttackRecordResponse"; + }; + + return LoadTimeAttackRecordResponse; + })(); + + protobuf.SaveTerminalResultRequest = (function() { + + /** + * Properties of a SaveTerminalResultRequest. + * @memberof wm.protobuf + * @interface ISaveTerminalResultRequest + * @property {number} userId SaveTerminalResultRequest userId + * @property {number} timestamp SaveTerminalResultRequest timestamp + * @property {Array.|null} [carOrder] SaveTerminalResultRequest carOrder + * @property {Array.|null} [confirmedTutorials] SaveTerminalResultRequest confirmedTutorials + * @property {boolean|null} [garageMenuEntered] SaveTerminalResultRequest garageMenuEntered + */ + + /** + * Constructs a new SaveTerminalResultRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveTerminalResultRequest. + * @implements ISaveTerminalResultRequest + * @constructor + * @param {wm.protobuf.ISaveTerminalResultRequest=} [properties] Properties to set + */ + function SaveTerminalResultRequest(properties) { + this.carOrder = []; + this.confirmedTutorials = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveTerminalResultRequest userId. + * @member {number} userId + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.userId = 0; + + /** + * SaveTerminalResultRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.timestamp = 0; + + /** + * SaveTerminalResultRequest carOrder. + * @member {Array.} carOrder + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.carOrder = $util.emptyArray; + + /** + * SaveTerminalResultRequest confirmedTutorials. + * @member {Array.} confirmedTutorials + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.confirmedTutorials = $util.emptyArray; + + /** + * SaveTerminalResultRequest garageMenuEntered. + * @member {boolean} garageMenuEntered + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.garageMenuEntered = false; + + /** + * Creates a new SaveTerminalResultRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.ISaveTerminalResultRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest instance + */ + SaveTerminalResultRequest.create = function create(properties) { + return new SaveTerminalResultRequest(properties); + }; + + /** + * Encodes the specified SaveTerminalResultRequest message. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.ISaveTerminalResultRequest} message SaveTerminalResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.timestamp); + if (message.carOrder != null && message.carOrder.length) + for (let i = 0; i < message.carOrder.length; ++i) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.carOrder[i]); + if (message.confirmedTutorials != null && message.confirmedTutorials.length) + for (let i = 0; i < message.confirmedTutorials.length; ++i) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.confirmedTutorials[i]); + if (message.garageMenuEntered != null && Object.hasOwnProperty.call(message, "garageMenuEntered")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.garageMenuEntered); + return writer; + }; + + /** + * Encodes the specified SaveTerminalResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.ISaveTerminalResultRequest} message SaveTerminalResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveTerminalResultRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.timestamp = reader.uint32(); + break; + } + case 3: { + if (!(message.carOrder && message.carOrder.length)) + message.carOrder = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.carOrder.push(reader.uint32()); + } else + message.carOrder.push(reader.uint32()); + break; + } + case 5: { + if (!(message.confirmedTutorials && message.confirmedTutorials.length)) + message.confirmedTutorials = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.confirmedTutorials.push(reader.int32()); + } else + message.confirmedTutorials.push(reader.int32()); + break; + } + case 8: { + message.garageMenuEntered = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveTerminalResultRequest message. + * @function verify + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveTerminalResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (message.carOrder != null && message.hasOwnProperty("carOrder")) { + if (!Array.isArray(message.carOrder)) + return "carOrder: array expected"; + for (let i = 0; i < message.carOrder.length; ++i) + if (!$util.isInteger(message.carOrder[i])) + return "carOrder: integer[] expected"; + } + if (message.confirmedTutorials != null && message.hasOwnProperty("confirmedTutorials")) { + if (!Array.isArray(message.confirmedTutorials)) + return "confirmedTutorials: array expected"; + for (let i = 0; i < message.confirmedTutorials.length; ++i) + switch (message.confirmedTutorials[i]) { + default: + return "confirmedTutorials: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + break; + } + } + if (message.garageMenuEntered != null && message.hasOwnProperty("garageMenuEntered")) + if (typeof message.garageMenuEntered !== "boolean") + return "garageMenuEntered: boolean expected"; + return null; + }; + + /** + * Creates a SaveTerminalResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest + */ + SaveTerminalResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveTerminalResultRequest) + return object; + let message = new $root.wm.protobuf.SaveTerminalResultRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.carOrder) { + if (!Array.isArray(object.carOrder)) + throw TypeError(".wm.protobuf.SaveTerminalResultRequest.carOrder: array expected"); + message.carOrder = []; + for (let i = 0; i < object.carOrder.length; ++i) + message.carOrder[i] = object.carOrder[i] >>> 0; + } + if (object.confirmedTutorials) { + if (!Array.isArray(object.confirmedTutorials)) + throw TypeError(".wm.protobuf.SaveTerminalResultRequest.confirmedTutorials: array expected"); + message.confirmedTutorials = []; + for (let i = 0; i < object.confirmedTutorials.length; ++i) + switch (object.confirmedTutorials[i]) { + default: + case "TUTORIAL_ID_STORY": + case 0: + message.confirmedTutorials[i] = 0; + break; + case "TUTORIAL_ID_TIME_ATTACK": + case 1: + message.confirmedTutorials[i] = 1; + break; + case "TUTORIAL_ID_GHOST": + case 2: + message.confirmedTutorials[i] = 2; + break; + case "TUTORIAL_ID_GHOST_CHALLENGE": + case 3: + message.confirmedTutorials[i] = 3; + break; + case "TUTORIAL_ID_GHOST_LEVEL": + case 4: + message.confirmedTutorials[i] = 4; + break; + case "TUTORIAL_ID_UNUSED_5": + case 5: + message.confirmedTutorials[i] = 5; + break; + case "TUTORIAL_ID_GHOST_SEARCH": + case 6: + message.confirmedTutorials[i] = 6; + break; + case "TUTORIAL_ID_GHOST_COMPETITION": + case 7: + message.confirmedTutorials[i] = 7; + break; + case "TUTORIAL_ID_HP600_CARD": + case 8: + message.confirmedTutorials[i] = 8; + break; + case "TUTORIAL_ID_UNUSED_9": + case 9: + message.confirmedTutorials[i] = 9; + break; + case "TUTORIAL_ID_COMPETITION_QUALIFIED": + case 10: + message.confirmedTutorials[i] = 10; + break; + case "TUTORIAL_ID_COMPETITION_TERMINAL": + case 11: + message.confirmedTutorials[i] = 11; + break; + case "TUTORIAL_ID_COMPETITION_NOTICE": + case 12: + message.confirmedTutorials[i] = 12; + break; + case "TUTORIAL_ID_COMPETITION_FINISHED": + case 13: + message.confirmedTutorials[i] = 13; + break; + case "TUTORIAL_ID_UNUSED_14": + case 14: + message.confirmedTutorials[i] = 14; + break; + case "TUTORIAL_ID_UNUSED_15": + case 15: + message.confirmedTutorials[i] = 15; + break; + case "TUTORIAL_ID_UNUSED_16": + case 16: + message.confirmedTutorials[i] = 16; + break; + case "TUTORIAL_ID_UNUSED_17": + case 17: + message.confirmedTutorials[i] = 17; + break; + case "TUTORIAL_ID_UNUSED_18": + case 18: + message.confirmedTutorials[i] = 18; + break; + case "TUTORIAL_ID_UNUSED_19": + case 19: + message.confirmedTutorials[i] = 19; + break; + case "TUTORIAL_ID_GHOST_STAMP": + case 20: + message.confirmedTutorials[i] = 20; + break; + case "TUTORIAL_ID_GHOST_STAMP_DECLINED": + case 21: + message.confirmedTutorials[i] = 21; + break; + case "TUTORIAL_ID_GHOST_STAMP_FRIENDS": + case 22: + message.confirmedTutorials[i] = 22; + break; + case "TUTORIAL_ID_TERMINAL_SCRATCH": + case 23: + message.confirmedTutorials[i] = 23; + break; + case "TUTORIAL_ID_TURN_SCRATCH_SHEET": + case 24: + message.confirmedTutorials[i] = 24; + break; + case "TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN": + case 25: + message.confirmedTutorials[i] = 25; + break; + case "TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE": + case 26: + message.confirmedTutorials[i] = 26; + break; + case "TUTORIAL_ID_VS_CONTINUE_TICKET": + case 27: + message.confirmedTutorials[i] = 27; + break; + case "TUTORIAL_ID_UNUSED_28": + case 28: + message.confirmedTutorials[i] = 28; + break; + case "TUTORIAL_ID_UNUSED_29": + case 29: + message.confirmedTutorials[i] = 29; + break; + case "TUTORIAL_ID_UNUSED_30": + case 30: + message.confirmedTutorials[i] = 30; + break; + case "TUTORIAL_ID_DRESS_UP": + case 31: + message.confirmedTutorials[i] = 31; + break; + case "TUTORIAL_ID_MULTI_GHOST": + case 32: + message.confirmedTutorials[i] = 32; + break; + case "TUTORIAL_ID_STORY_NEW_FEATURE": + case 33: + message.confirmedTutorials[i] = 33; + break; + case "TUTORIAL_ID_GHOST_NEW_FEATURE": + case 34: + message.confirmedTutorials[i] = 34; + break; + case "TUTORIAL_ID_GHOST_REGION_MAP": + case 35: + message.confirmedTutorials[i] = 35; + break; + } + } + if (object.garageMenuEntered != null) + message.garageMenuEntered = Boolean(object.garageMenuEntered); + return message; + }; + + /** + * Creates a plain object from a SaveTerminalResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.SaveTerminalResultRequest} message SaveTerminalResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveTerminalResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.carOrder = []; + object.confirmedTutorials = []; + } + if (options.defaults) { + object.userId = 0; + object.timestamp = 0; + object.garageMenuEntered = false; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + if (message.carOrder && message.carOrder.length) { + object.carOrder = []; + for (let j = 0; j < message.carOrder.length; ++j) + object.carOrder[j] = message.carOrder[j]; + } + if (message.confirmedTutorials && message.confirmedTutorials.length) { + object.confirmedTutorials = []; + for (let j = 0; j < message.confirmedTutorials.length; ++j) + object.confirmedTutorials[j] = options.enums === String ? $root.wm.protobuf.TutorialType[message.confirmedTutorials[j]] : message.confirmedTutorials[j]; + } + if (message.garageMenuEntered != null && message.hasOwnProperty("garageMenuEntered")) + object.garageMenuEntered = message.garageMenuEntered; + return object; + }; + + /** + * Converts this SaveTerminalResultRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + * @returns {Object.} JSON object + */ + SaveTerminalResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveTerminalResultRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveTerminalResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveTerminalResultRequest"; + }; + + return SaveTerminalResultRequest; + })(); + + protobuf.SaveTerminalResultResponse = (function() { + + /** + * Properties of a SaveTerminalResultResponse. + * @memberof wm.protobuf + * @interface ISaveTerminalResultResponse + * @property {wm.protobuf.ErrorCode} error SaveTerminalResultResponse error + */ + + /** + * Constructs a new SaveTerminalResultResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveTerminalResultResponse. + * @implements ISaveTerminalResultResponse + * @constructor + * @param {wm.protobuf.ISaveTerminalResultResponse=} [properties] Properties to set + */ + function SaveTerminalResultResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveTerminalResultResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveTerminalResultResponse + * @instance + */ + SaveTerminalResultResponse.prototype.error = 0; + + /** + * Creates a new SaveTerminalResultResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.ISaveTerminalResultResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse instance + */ + SaveTerminalResultResponse.create = function create(properties) { + return new SaveTerminalResultResponse(properties); + }; + + /** + * Encodes the specified SaveTerminalResultResponse message. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.ISaveTerminalResultResponse} message SaveTerminalResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveTerminalResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.ISaveTerminalResultResponse} message SaveTerminalResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveTerminalResultResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveTerminalResultResponse message. + * @function verify + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveTerminalResultResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveTerminalResultResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse + */ + SaveTerminalResultResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveTerminalResultResponse) + return object; + let message = new $root.wm.protobuf.SaveTerminalResultResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveTerminalResultResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.SaveTerminalResultResponse} message SaveTerminalResultResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveTerminalResultResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveTerminalResultResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveTerminalResultResponse + * @instance + * @returns {Object.} JSON object + */ + SaveTerminalResultResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveTerminalResultResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveTerminalResultResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveTerminalResultResponse"; + }; + + return SaveTerminalResultResponse; + })(); + + protobuf.PingRequest = (function() { + + /** + * Properties of a PingRequest. + * @memberof wm.protobuf + * @interface IPingRequest + * @property {number|null} [ping] PingRequest ping + */ + + /** + * Constructs a new PingRequest. + * @memberof wm.protobuf + * @classdesc Represents a PingRequest. + * @implements IPingRequest + * @constructor + * @param {wm.protobuf.IPingRequest=} [properties] Properties to set + */ + function PingRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PingRequest ping. + * @member {number} ping + * @memberof wm.protobuf.PingRequest + * @instance + */ + PingRequest.prototype.ping = 0; + + /** + * Creates a new PingRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.IPingRequest=} [properties] Properties to set + * @returns {wm.protobuf.PingRequest} PingRequest instance + */ + PingRequest.create = function create(properties) { + return new PingRequest(properties); + }; + + /** + * Encodes the specified PingRequest message. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.IPingRequest} message PingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ping != null && Object.hasOwnProperty.call(message, "ping")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.ping); + return writer; + }; + + /** + * Encodes the specified PingRequest message, length delimited. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.IPingRequest} message PingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PingRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PingRequest} PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PingRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ping = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PingRequest} PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PingRequest message. + * @function verify + * @memberof wm.protobuf.PingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ping != null && message.hasOwnProperty("ping")) + if (!$util.isInteger(message.ping)) + return "ping: integer expected"; + return null; + }; + + /** + * Creates a PingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PingRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PingRequest} PingRequest + */ + PingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PingRequest) + return object; + let message = new $root.wm.protobuf.PingRequest(); + if (object.ping != null) + message.ping = object.ping >>> 0; + return message; + }; + + /** + * Creates a plain object from a PingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.PingRequest} message PingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.ping = 0; + if (message.ping != null && message.hasOwnProperty("ping")) + object.ping = message.ping; + return object; + }; + + /** + * Converts this PingRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.PingRequest + * @instance + * @returns {Object.} JSON object + */ + PingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PingRequest + * @function getTypeUrl + * @memberof wm.protobuf.PingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PingRequest"; + }; + + return PingRequest; + })(); + + protobuf.PingResponse = (function() { + + /** + * Properties of a PingResponse. + * @memberof wm.protobuf + * @interface IPingResponse + * @property {wm.protobuf.ErrorCode} error PingResponse error + * @property {number} pong PingResponse pong + */ + + /** + * Constructs a new PingResponse. + * @memberof wm.protobuf + * @classdesc Represents a PingResponse. + * @implements IPingResponse + * @constructor + * @param {wm.protobuf.IPingResponse=} [properties] Properties to set + */ + function PingResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PingResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.PingResponse + * @instance + */ + PingResponse.prototype.error = 0; + + /** + * PingResponse pong. + * @member {number} pong + * @memberof wm.protobuf.PingResponse + * @instance + */ + PingResponse.prototype.pong = 0; + + /** + * Creates a new PingResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.IPingResponse=} [properties] Properties to set + * @returns {wm.protobuf.PingResponse} PingResponse instance + */ + PingResponse.create = function create(properties) { + return new PingResponse(properties); + }; + + /** + * Encodes the specified PingResponse message. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.IPingResponse} message PingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.pong); + return writer; + }; + + /** + * Encodes the specified PingResponse message, length delimited. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.IPingResponse} message PingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PingResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PingResponse} PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PingResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.pong = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("pong")) + throw $util.ProtocolError("missing required 'pong'", { instance: message }); + return message; + }; + + /** + * Decodes a PingResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PingResponse} PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PingResponse message. + * @function verify + * @memberof wm.protobuf.PingResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PingResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.pong)) + return "pong: integer expected"; + return null; + }; + + /** + * Creates a PingResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PingResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PingResponse} PingResponse + */ + PingResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PingResponse) + return object; + let message = new $root.wm.protobuf.PingResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.pong != null) + message.pong = object.pong >>> 0; + return message; + }; + + /** + * Creates a plain object from a PingResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.PingResponse} message PingResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PingResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.pong = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.pong != null && message.hasOwnProperty("pong")) + object.pong = message.pong; + return object; + }; + + /** + * Converts this PingResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.PingResponse + * @instance + * @returns {Object.} JSON object + */ + PingResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PingResponse + * @function getTypeUrl + * @memberof wm.protobuf.PingResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PingResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PingResponse"; + }; + + return PingResponse; + })(); + + protobuf.LoadTerminalInformationRequest = (function() { + + /** + * Properties of a LoadTerminalInformationRequest. + * @memberof wm.protobuf + * @interface ILoadTerminalInformationRequest + * @property {number} userId LoadTerminalInformationRequest userId + */ + + /** + * Constructs a new LoadTerminalInformationRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadTerminalInformationRequest. + * @implements ILoadTerminalInformationRequest + * @constructor + * @param {wm.protobuf.ILoadTerminalInformationRequest=} [properties] Properties to set + */ + function LoadTerminalInformationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTerminalInformationRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @instance + */ + LoadTerminalInformationRequest.prototype.userId = 0; + + /** + * Creates a new LoadTerminalInformationRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.ILoadTerminalInformationRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest instance + */ + LoadTerminalInformationRequest.create = function create(properties) { + return new LoadTerminalInformationRequest(properties); + }; + + /** + * Encodes the specified LoadTerminalInformationRequest message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.ILoadTerminalInformationRequest} message LoadTerminalInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadTerminalInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.ILoadTerminalInformationRequest} message LoadTerminalInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTerminalInformationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTerminalInformationRequest message. + * @function verify + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTerminalInformationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadTerminalInformationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest + */ + LoadTerminalInformationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTerminalInformationRequest) + return object; + let message = new $root.wm.protobuf.LoadTerminalInformationRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadTerminalInformationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.LoadTerminalInformationRequest} message LoadTerminalInformationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTerminalInformationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadTerminalInformationRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @instance + * @returns {Object.} JSON object + */ + LoadTerminalInformationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTerminalInformationRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTerminalInformationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTerminalInformationRequest"; + }; + + return LoadTerminalInformationRequest; + })(); + + protobuf.LoadTerminalInformationResponse = (function() { + + /** + * Properties of a LoadTerminalInformationResponse. + * @memberof wm.protobuf + * @interface ILoadTerminalInformationResponse + * @property {wm.protobuf.ErrorCode} error LoadTerminalInformationResponse error + * @property {boolean} prizeReceivable LoadTerminalInformationResponse prizeReceivable + * @property {Array.|null} [noticeEntries] LoadTerminalInformationResponse noticeEntries + * @property {Array.|null} [noticeMessage] LoadTerminalInformationResponse noticeMessage + * @property {Array.|null} [noticeWindow] LoadTerminalInformationResponse noticeWindow + * @property {Array.|null} [noticeWindowMessage] LoadTerminalInformationResponse noticeWindowMessage + * @property {wm.protobuf.ITransferNotice} transferNotice LoadTerminalInformationResponse transferNotice + * @property {boolean} announceFeature LoadTerminalInformationResponse announceFeature + * @property {boolean} freeScratched LoadTerminalInformationResponse freeScratched + * @property {Array.|null} [restrictedModels] LoadTerminalInformationResponse restrictedModels + */ + + /** + * Constructs a new LoadTerminalInformationResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadTerminalInformationResponse. + * @implements ILoadTerminalInformationResponse + * @constructor + * @param {wm.protobuf.ILoadTerminalInformationResponse=} [properties] Properties to set + */ + function LoadTerminalInformationResponse(properties) { + this.noticeEntries = []; + this.noticeMessage = []; + this.noticeWindow = []; + this.noticeWindowMessage = []; + this.restrictedModels = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTerminalInformationResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.error = 0; + + /** + * LoadTerminalInformationResponse prizeReceivable. + * @member {boolean} prizeReceivable + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.prizeReceivable = false; + + /** + * LoadTerminalInformationResponse noticeEntries. + * @member {Array.} noticeEntries + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeEntries = $util.emptyArray; + + /** + * LoadTerminalInformationResponse noticeMessage. + * @member {Array.} noticeMessage + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeMessage = $util.emptyArray; + + /** + * LoadTerminalInformationResponse noticeWindow. + * @member {Array.} noticeWindow + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeWindow = $util.emptyArray; + + /** + * LoadTerminalInformationResponse noticeWindowMessage. + * @member {Array.} noticeWindowMessage + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeWindowMessage = $util.emptyArray; + + /** + * LoadTerminalInformationResponse transferNotice. + * @member {wm.protobuf.ITransferNotice} transferNotice + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.transferNotice = null; + + /** + * LoadTerminalInformationResponse announceFeature. + * @member {boolean} announceFeature + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.announceFeature = false; + + /** + * LoadTerminalInformationResponse freeScratched. + * @member {boolean} freeScratched + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.freeScratched = false; + + /** + * LoadTerminalInformationResponse restrictedModels. + * @member {Array.} restrictedModels + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.restrictedModels = $util.emptyArray; + + /** + * Creates a new LoadTerminalInformationResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.ILoadTerminalInformationResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse instance + */ + LoadTerminalInformationResponse.create = function create(properties) { + return new LoadTerminalInformationResponse(properties); + }; + + /** + * Encodes the specified LoadTerminalInformationResponse message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.ILoadTerminalInformationResponse} message LoadTerminalInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.restrictedModels != null && message.restrictedModels.length) + for (let i = 0; i < message.restrictedModels.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.restrictedModels[i]); + if (message.noticeEntries != null && message.noticeEntries.length) + for (let i = 0; i < message.noticeEntries.length; ++i) + $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.encode(message.noticeEntries[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.noticeMessage != null && message.noticeMessage.length) + for (let i = 0; i < message.noticeMessage.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.noticeMessage[i]); + if (message.noticeWindow != null && message.noticeWindow.length) + for (let i = 0; i < message.noticeWindow.length; ++i) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.noticeWindow[i]); + if (message.noticeWindowMessage != null && message.noticeWindowMessage.length) + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.noticeWindowMessage[i]); + $root.wm.protobuf.TransferNotice.encode(message.transferNotice, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.announceFeature); + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.prizeReceivable); + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.freeScratched); + return writer; + }; + + /** + * Encodes the specified LoadTerminalInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.ILoadTerminalInformationResponse} message LoadTerminalInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTerminalInformationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 17: { + message.prizeReceivable = reader.bool(); + break; + } + case 10: { + if (!(message.noticeEntries && message.noticeEntries.length)) + message.noticeEntries = []; + message.noticeEntries.push($root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.decode(reader, reader.uint32())); + break; + } + case 11: { + if (!(message.noticeMessage && message.noticeMessage.length)) + message.noticeMessage = []; + message.noticeMessage.push(reader.string()); + break; + } + case 12: { + if (!(message.noticeWindow && message.noticeWindow.length)) + message.noticeWindow = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.noticeWindow.push(reader.int32()); + } else + message.noticeWindow.push(reader.int32()); + break; + } + case 13: { + if (!(message.noticeWindowMessage && message.noticeWindowMessage.length)) + message.noticeWindowMessage = []; + message.noticeWindowMessage.push(reader.string()); + break; + } + case 14: { + message.transferNotice = $root.wm.protobuf.TransferNotice.decode(reader, reader.uint32()); + break; + } + case 16: { + message.announceFeature = reader.bool(); + break; + } + case 18: { + message.freeScratched = reader.bool(); + break; + } + case 2: { + if (!(message.restrictedModels && message.restrictedModels.length)) + message.restrictedModels = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedModels.push(reader.uint32()); + } else + message.restrictedModels.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("prizeReceivable")) + throw $util.ProtocolError("missing required 'prizeReceivable'", { instance: message }); + if (!message.hasOwnProperty("transferNotice")) + throw $util.ProtocolError("missing required 'transferNotice'", { instance: message }); + if (!message.hasOwnProperty("announceFeature")) + throw $util.ProtocolError("missing required 'announceFeature'", { instance: message }); + if (!message.hasOwnProperty("freeScratched")) + throw $util.ProtocolError("missing required 'freeScratched'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTerminalInformationResponse message. + * @function verify + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTerminalInformationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (typeof message.prizeReceivable !== "boolean") + return "prizeReceivable: boolean expected"; + if (message.noticeEntries != null && message.hasOwnProperty("noticeEntries")) { + if (!Array.isArray(message.noticeEntries)) + return "noticeEntries: array expected"; + for (let i = 0; i < message.noticeEntries.length; ++i) { + let error = $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify(message.noticeEntries[i]); + if (error) + return "noticeEntries." + error; + } + } + if (message.noticeMessage != null && message.hasOwnProperty("noticeMessage")) { + if (!Array.isArray(message.noticeMessage)) + return "noticeMessage: array expected"; + for (let i = 0; i < message.noticeMessage.length; ++i) + if (!$util.isString(message.noticeMessage[i])) + return "noticeMessage: string[] expected"; + } + if (message.noticeWindow != null && message.hasOwnProperty("noticeWindow")) { + if (!Array.isArray(message.noticeWindow)) + return "noticeWindow: array expected"; + for (let i = 0; i < message.noticeWindow.length; ++i) + switch (message.noticeWindow[i]) { + default: + return "noticeWindow: enum value[] expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + } + if (message.noticeWindowMessage != null && message.hasOwnProperty("noticeWindowMessage")) { + if (!Array.isArray(message.noticeWindowMessage)) + return "noticeWindowMessage: array expected"; + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + if (!$util.isString(message.noticeWindowMessage[i])) + return "noticeWindowMessage: string[] expected"; + } + { + let error = $root.wm.protobuf.TransferNotice.verify(message.transferNotice); + if (error) + return "transferNotice." + error; + } + if (typeof message.announceFeature !== "boolean") + return "announceFeature: boolean expected"; + if (typeof message.freeScratched !== "boolean") + return "freeScratched: boolean expected"; + if (message.restrictedModels != null && message.hasOwnProperty("restrictedModels")) { + if (!Array.isArray(message.restrictedModels)) + return "restrictedModels: array expected"; + for (let i = 0; i < message.restrictedModels.length; ++i) + if (!$util.isInteger(message.restrictedModels[i])) + return "restrictedModels: integer[] expected"; + } + return null; + }; + + /** + * Creates a LoadTerminalInformationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse + */ + LoadTerminalInformationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTerminalInformationResponse) + return object; + let message = new $root.wm.protobuf.LoadTerminalInformationResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.prizeReceivable != null) + message.prizeReceivable = Boolean(object.prizeReceivable); + if (object.noticeEntries) { + if (!Array.isArray(object.noticeEntries)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeEntries: array expected"); + message.noticeEntries = []; + for (let i = 0; i < object.noticeEntries.length; ++i) { + if (typeof object.noticeEntries[i] !== "object") + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeEntries: object expected"); + message.noticeEntries[i] = $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.fromObject(object.noticeEntries[i]); + } + } + if (object.noticeMessage) { + if (!Array.isArray(object.noticeMessage)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeMessage: array expected"); + message.noticeMessage = []; + for (let i = 0; i < object.noticeMessage.length; ++i) + message.noticeMessage[i] = String(object.noticeMessage[i]); + } + if (object.noticeWindow) { + if (!Array.isArray(object.noticeWindow)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeWindow: array expected"); + message.noticeWindow = []; + for (let i = 0; i < object.noticeWindow.length; ++i) + switch (object.noticeWindow[i]) { + default: + case "NOTICE_UNUSED_1": + case 1: + message.noticeWindow[i] = 1; + break; + case "NOTICE_UNUSED_2": + case 2: + message.noticeWindow[i] = 2; + break; + case "NOTICE_UNUSED_3": + case 3: + message.noticeWindow[i] = 3; + break; + case "NOTICE_UNUSED_4": + case 4: + message.noticeWindow[i] = 4; + break; + case "NOTICE_UNUSED_5": + case 5: + message.noticeWindow[i] = 5; + break; + case "NOTICE_UNUSED_6": + case 6: + message.noticeWindow[i] = 6; + break; + case "NOTICE_UNUSED_7": + case 7: + message.noticeWindow[i] = 7; + break; + case "NOTICE_UNUSED_8": + case 8: + message.noticeWindow[i] = 8; + break; + case "NOTICE_UNUSED_9": + case 9: + message.noticeWindow[i] = 9; + break; + case "NOTICE_UNUSED_10": + case 10: + message.noticeWindow[i] = 10; + break; + case "NOTICE_UNUSED_11": + case 11: + message.noticeWindow[i] = 11; + break; + case "NOTICE_UNUSED_12": + case 12: + message.noticeWindow[i] = 12; + break; + } + } + if (object.noticeWindowMessage) { + if (!Array.isArray(object.noticeWindowMessage)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeWindowMessage: array expected"); + message.noticeWindowMessage = []; + for (let i = 0; i < object.noticeWindowMessage.length; ++i) + message.noticeWindowMessage[i] = String(object.noticeWindowMessage[i]); + } + if (object.transferNotice != null) { + if (typeof object.transferNotice !== "object") + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.transferNotice: object expected"); + message.transferNotice = $root.wm.protobuf.TransferNotice.fromObject(object.transferNotice); + } + if (object.announceFeature != null) + message.announceFeature = Boolean(object.announceFeature); + if (object.freeScratched != null) + message.freeScratched = Boolean(object.freeScratched); + if (object.restrictedModels) { + if (!Array.isArray(object.restrictedModels)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.restrictedModels: array expected"); + message.restrictedModels = []; + for (let i = 0; i < object.restrictedModels.length; ++i) + message.restrictedModels[i] = object.restrictedModels[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LoadTerminalInformationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse} message LoadTerminalInformationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTerminalInformationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.restrictedModels = []; + object.noticeEntries = []; + object.noticeMessage = []; + object.noticeWindow = []; + object.noticeWindowMessage = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.transferNotice = null; + object.announceFeature = false; + object.prizeReceivable = false; + object.freeScratched = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.restrictedModels && message.restrictedModels.length) { + object.restrictedModels = []; + for (let j = 0; j < message.restrictedModels.length; ++j) + object.restrictedModels[j] = message.restrictedModels[j]; + } + if (message.noticeEntries && message.noticeEntries.length) { + object.noticeEntries = []; + for (let j = 0; j < message.noticeEntries.length; ++j) + object.noticeEntries[j] = $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.toObject(message.noticeEntries[j], options); + } + if (message.noticeMessage && message.noticeMessage.length) { + object.noticeMessage = []; + for (let j = 0; j < message.noticeMessage.length; ++j) + object.noticeMessage[j] = message.noticeMessage[j]; + } + if (message.noticeWindow && message.noticeWindow.length) { + object.noticeWindow = []; + for (let j = 0; j < message.noticeWindow.length; ++j) + object.noticeWindow[j] = options.enums === String ? $root.wm.protobuf.NoticeEntry[message.noticeWindow[j]] : message.noticeWindow[j]; + } + if (message.noticeWindowMessage && message.noticeWindowMessage.length) { + object.noticeWindowMessage = []; + for (let j = 0; j < message.noticeWindowMessage.length; ++j) + object.noticeWindowMessage[j] = message.noticeWindowMessage[j]; + } + if (message.transferNotice != null && message.hasOwnProperty("transferNotice")) + object.transferNotice = $root.wm.protobuf.TransferNotice.toObject(message.transferNotice, options); + if (message.announceFeature != null && message.hasOwnProperty("announceFeature")) + object.announceFeature = message.announceFeature; + if (message.prizeReceivable != null && message.hasOwnProperty("prizeReceivable")) + object.prizeReceivable = message.prizeReceivable; + if (message.freeScratched != null && message.hasOwnProperty("freeScratched")) + object.freeScratched = message.freeScratched; + return object; + }; + + /** + * Converts this LoadTerminalInformationResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + * @returns {Object.} JSON object + */ + LoadTerminalInformationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTerminalInformationResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTerminalInformationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTerminalInformationResponse"; + }; + + LoadTerminalInformationResponse.TerminalNotice = (function() { + + /** + * Properties of a TerminalNotice. + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @interface ITerminalNotice + * @property {wm.protobuf.NoticeEntry} noticeType TerminalNotice noticeType + * @property {string|null} [field_1] TerminalNotice field_1 + * @property {number|null} [field_2] TerminalNotice field_2 + * @property {number|null} [field_3] TerminalNotice field_3 + */ + + /** + * Constructs a new TerminalNotice. + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @classdesc Represents a TerminalNotice. + * @implements ITerminalNotice + * @constructor + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice=} [properties] Properties to set + */ + function TerminalNotice(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerminalNotice noticeType. + * @member {wm.protobuf.NoticeEntry} noticeType + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.noticeType = 1; + + /** + * TerminalNotice field_1. + * @member {string} field_1 + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.field_1 = ""; + + /** + * TerminalNotice field_2. + * @member {number} field_2 + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.field_2 = 0; + + /** + * TerminalNotice field_3. + * @member {number} field_3 + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.field_3 = 0; + + /** + * Creates a new TerminalNotice instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice=} [properties] Properties to set + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice instance + */ + TerminalNotice.create = function create(properties) { + return new TerminalNotice(properties); + }; + + /** + * Encodes the specified TerminalNotice message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice} message TerminalNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalNotice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.noticeType); + if (message.field_1 != null && Object.hasOwnProperty.call(message, "field_1")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.field_1); + if (message.field_2 != null && Object.hasOwnProperty.call(message, "field_2")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.field_2); + if (message.field_3 != null && Object.hasOwnProperty.call(message, "field_3")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.field_3); + return writer; + }; + + /** + * Encodes the specified TerminalNotice message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice} message TerminalNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalNotice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalNotice.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.noticeType = reader.int32(); + break; + } + case 2: { + message.field_1 = reader.string(); + break; + } + case 3: { + message.field_2 = reader.uint32(); + break; + } + case 4: { + message.field_3 = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("noticeType")) + throw $util.ProtocolError("missing required 'noticeType'", { instance: message }); + return message; + }; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalNotice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerminalNotice message. + * @function verify + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerminalNotice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.noticeType) { + default: + return "noticeType: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + if (message.field_1 != null && message.hasOwnProperty("field_1")) + if (!$util.isString(message.field_1)) + return "field_1: string expected"; + if (message.field_2 != null && message.hasOwnProperty("field_2")) + if (!$util.isInteger(message.field_2)) + return "field_2: integer expected"; + if (message.field_3 != null && message.hasOwnProperty("field_3")) + if (!$util.isInteger(message.field_3)) + return "field_3: integer expected"; + return null; + }; + + /** + * Creates a TerminalNotice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice + */ + TerminalNotice.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice) + return object; + let message = new $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice(); + switch (object.noticeType) { + case "NOTICE_UNUSED_1": + case 1: + message.noticeType = 1; + break; + case "NOTICE_UNUSED_2": + case 2: + message.noticeType = 2; + break; + case "NOTICE_UNUSED_3": + case 3: + message.noticeType = 3; + break; + case "NOTICE_UNUSED_4": + case 4: + message.noticeType = 4; + break; + case "NOTICE_UNUSED_5": + case 5: + message.noticeType = 5; + break; + case "NOTICE_UNUSED_6": + case 6: + message.noticeType = 6; + break; + case "NOTICE_UNUSED_7": + case 7: + message.noticeType = 7; + break; + case "NOTICE_UNUSED_8": + case 8: + message.noticeType = 8; + break; + case "NOTICE_UNUSED_9": + case 9: + message.noticeType = 9; + break; + case "NOTICE_UNUSED_10": + case 10: + message.noticeType = 10; + break; + case "NOTICE_UNUSED_11": + case 11: + message.noticeType = 11; + break; + case "NOTICE_UNUSED_12": + case 12: + message.noticeType = 12; + break; + } + if (object.field_1 != null) + message.field_1 = String(object.field_1); + if (object.field_2 != null) + message.field_2 = object.field_2 >>> 0; + if (object.field_3 != null) + message.field_3 = object.field_3 >>> 0; + return message; + }; + + /** + * Creates a plain object from a TerminalNotice message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} message TerminalNotice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerminalNotice.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.noticeType = options.enums === String ? "NOTICE_UNUSED_1" : 1; + object.field_1 = ""; + object.field_2 = 0; + object.field_3 = 0; + } + if (message.noticeType != null && message.hasOwnProperty("noticeType")) + object.noticeType = options.enums === String ? $root.wm.protobuf.NoticeEntry[message.noticeType] : message.noticeType; + if (message.field_1 != null && message.hasOwnProperty("field_1")) + object.field_1 = message.field_1; + if (message.field_2 != null && message.hasOwnProperty("field_2")) + object.field_2 = message.field_2; + if (message.field_3 != null && message.hasOwnProperty("field_3")) + object.field_3 = message.field_3; + return object; + }; + + /** + * Converts this TerminalNotice to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + * @returns {Object.} JSON object + */ + TerminalNotice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerminalNotice + * @function getTypeUrl + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerminalNotice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTerminalInformationResponse.TerminalNotice"; + }; + + return TerminalNotice; + })(); + + return LoadTerminalInformationResponse; + })(); + + protobuf.CreateUserRequest = (function() { + + /** + * Properties of a CreateUserRequest. + * @memberof wm.protobuf + * @interface ICreateUserRequest + * @property {number|null} [banapassportAmId] CreateUserRequest banapassportAmId + * @property {string|null} [cardChipId] CreateUserRequest cardChipId + * @property {string|null} [accessCode] CreateUserRequest accessCode + * @property {number|null} [cardTypeCode] CreateUserRequest cardTypeCode + * @property {number|null} [cardRegionCode] CreateUserRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] CreateUserRequest device + * @property {number} timestamp CreateUserRequest timestamp + */ + + /** + * Constructs a new CreateUserRequest. + * @memberof wm.protobuf + * @classdesc Represents a CreateUserRequest. + * @implements ICreateUserRequest + * @constructor + * @param {wm.protobuf.ICreateUserRequest=} [properties] Properties to set + */ + function CreateUserRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserRequest banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.banapassportAmId = 0; + + /** + * CreateUserRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.cardChipId = ""; + + /** + * CreateUserRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.accessCode = ""; + + /** + * CreateUserRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.cardTypeCode = 0; + + /** + * CreateUserRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.cardRegionCode = 0; + + /** + * CreateUserRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.device = 0; + + /** + * CreateUserRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.timestamp = 0; + + /** + * Creates a new CreateUserRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.ICreateUserRequest=} [properties] Properties to set + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest instance + */ + CreateUserRequest.create = function create(properties) { + return new CreateUserRequest(properties); + }; + + /** + * Encodes the specified CreateUserRequest message. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.ICreateUserRequest} message CreateUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.banapassportAmId); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.device); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified CreateUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.ICreateUserRequest} message CreateUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateUserRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.banapassportAmId = reader.uint32(); + break; + } + case 2: { + message.cardChipId = reader.string(); + break; + } + case 3: { + message.accessCode = reader.string(); + break; + } + case 4: { + message.cardTypeCode = reader.uint32(); + break; + } + case 5: { + message.cardRegionCode = reader.uint32(); + break; + } + case 6: { + message.device = reader.int32(); + break; + } + case 7: { + message.timestamp = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserRequest message. + * @function verify + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + return null; + }; + + /** + * Creates a CreateUserRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest + */ + CreateUserRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateUserRequest) + return object; + let message = new $root.wm.protobuf.CreateUserRequest(); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateUserRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.CreateUserRequest} message CreateUserRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.banapassportAmId = 0; + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.timestamp = 0; + } + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this CreateUserRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateUserRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUserRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserRequest + * @function getTypeUrl + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateUserRequest"; + }; + + return CreateUserRequest; + })(); + + protobuf.CreateUserResponse = (function() { + + /** + * Properties of a CreateUserResponse. + * @memberof wm.protobuf + * @interface ICreateUserResponse + * @property {wm.protobuf.ErrorCode} error CreateUserResponse error + * @property {string|null} [accessCode] CreateUserResponse accessCode + * @property {number|null} [banapassportAmId] CreateUserResponse banapassportAmId + * @property {number|null} [mbid] CreateUserResponse mbid + * @property {number} userId CreateUserResponse userId + */ + + /** + * Constructs a new CreateUserResponse. + * @memberof wm.protobuf + * @classdesc Represents a CreateUserResponse. + * @implements ICreateUserResponse + * @constructor + * @param {wm.protobuf.ICreateUserResponse=} [properties] Properties to set + */ + function CreateUserResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.error = 0; + + /** + * CreateUserResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.accessCode = ""; + + /** + * CreateUserResponse banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.banapassportAmId = 0; + + /** + * CreateUserResponse mbid. + * @member {number} mbid + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.mbid = 0; + + /** + * CreateUserResponse userId. + * @member {number} userId + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.userId = 0; + + /** + * Creates a new CreateUserResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.ICreateUserResponse=} [properties] Properties to set + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse instance + */ + CreateUserResponse.create = function create(properties) { + return new CreateUserResponse(properties); + }; + + /** + * Encodes the specified CreateUserResponse message. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.ICreateUserResponse} message CreateUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.banapassportAmId); + if (message.mbid != null && Object.hasOwnProperty.call(message, "mbid")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mbid); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified CreateUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.ICreateUserResponse} message CreateUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateUserResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + case 3: { + message.banapassportAmId = reader.uint32(); + break; + } + case 4: { + message.mbid = reader.uint32(); + break; + } + case 5: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserResponse message. + * @function verify + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.mbid != null && message.hasOwnProperty("mbid")) + if (!$util.isInteger(message.mbid)) + return "mbid: integer expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a CreateUserResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse + */ + CreateUserResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateUserResponse) + return object; + let message = new $root.wm.protobuf.CreateUserResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.mbid != null) + message.mbid = object.mbid >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateUserResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.CreateUserResponse} message CreateUserResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.accessCode = ""; + object.banapassportAmId = 0; + object.mbid = 0; + object.userId = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.mbid != null && message.hasOwnProperty("mbid")) + object.mbid = message.mbid; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this CreateUserResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateUserResponse + * @instance + * @returns {Object.} JSON object + */ + CreateUserResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserResponse + * @function getTypeUrl + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateUserResponse"; + }; + + return CreateUserResponse; + })(); + + protobuf.AskAccessCodeRequest = (function() { + + /** + * Properties of an AskAccessCodeRequest. + * @memberof wm.protobuf + * @interface IAskAccessCodeRequest + * @property {string} cardChipId AskAccessCodeRequest cardChipId + */ + + /** + * Constructs a new AskAccessCodeRequest. + * @memberof wm.protobuf + * @classdesc Represents an AskAccessCodeRequest. + * @implements IAskAccessCodeRequest + * @constructor + * @param {wm.protobuf.IAskAccessCodeRequest=} [properties] Properties to set + */ + function AskAccessCodeRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AskAccessCodeRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.AskAccessCodeRequest + * @instance + */ + AskAccessCodeRequest.prototype.cardChipId = ""; + + /** + * Creates a new AskAccessCodeRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.IAskAccessCodeRequest=} [properties] Properties to set + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest instance + */ + AskAccessCodeRequest.create = function create(properties) { + return new AskAccessCodeRequest(properties); + }; + + /** + * Encodes the specified AskAccessCodeRequest message. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.IAskAccessCodeRequest} message AskAccessCodeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cardChipId); + return writer; + }; + + /** + * Encodes the specified AskAccessCodeRequest message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.IAskAccessCodeRequest} message AskAccessCodeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.AskAccessCodeRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cardChipId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("cardChipId")) + throw $util.ProtocolError("missing required 'cardChipId'", { instance: message }); + return message; + }; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AskAccessCodeRequest message. + * @function verify + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AskAccessCodeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + return null; + }; + + /** + * Creates an AskAccessCodeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest + */ + AskAccessCodeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.AskAccessCodeRequest) + return object; + let message = new $root.wm.protobuf.AskAccessCodeRequest(); + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + return message; + }; + + /** + * Creates a plain object from an AskAccessCodeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.AskAccessCodeRequest} message AskAccessCodeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AskAccessCodeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.cardChipId = ""; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + return object; + }; + + /** + * Converts this AskAccessCodeRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.AskAccessCodeRequest + * @instance + * @returns {Object.} JSON object + */ + AskAccessCodeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AskAccessCodeRequest + * @function getTypeUrl + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AskAccessCodeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.AskAccessCodeRequest"; + }; + + return AskAccessCodeRequest; + })(); + + protobuf.AskAccessCodeResponse = (function() { + + /** + * Properties of an AskAccessCodeResponse. + * @memberof wm.protobuf + * @interface IAskAccessCodeResponse + * @property {wm.protobuf.ErrorCode} error AskAccessCodeResponse error + * @property {string} accessCode AskAccessCodeResponse accessCode + */ + + /** + * Constructs a new AskAccessCodeResponse. + * @memberof wm.protobuf + * @classdesc Represents an AskAccessCodeResponse. + * @implements IAskAccessCodeResponse + * @constructor + * @param {wm.protobuf.IAskAccessCodeResponse=} [properties] Properties to set + */ + function AskAccessCodeResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AskAccessCodeResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.AskAccessCodeResponse + * @instance + */ + AskAccessCodeResponse.prototype.error = 0; + + /** + * AskAccessCodeResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.AskAccessCodeResponse + * @instance + */ + AskAccessCodeResponse.prototype.accessCode = ""; + + /** + * Creates a new AskAccessCodeResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.IAskAccessCodeResponse=} [properties] Properties to set + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse instance + */ + AskAccessCodeResponse.create = function create(properties) { + return new AskAccessCodeResponse(properties); + }; + + /** + * Encodes the specified AskAccessCodeResponse message. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.IAskAccessCodeResponse} message AskAccessCodeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + return writer; + }; + + /** + * Encodes the specified AskAccessCodeResponse message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.IAskAccessCodeResponse} message AskAccessCodeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.AskAccessCodeResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("accessCode")) + throw $util.ProtocolError("missing required 'accessCode'", { instance: message }); + return message; + }; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AskAccessCodeResponse message. + * @function verify + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AskAccessCodeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + return null; + }; + + /** + * Creates an AskAccessCodeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse + */ + AskAccessCodeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.AskAccessCodeResponse) + return object; + let message = new $root.wm.protobuf.AskAccessCodeResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + return message; + }; + + /** + * Creates a plain object from an AskAccessCodeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.AskAccessCodeResponse} message AskAccessCodeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AskAccessCodeResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.accessCode = ""; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + return object; + }; + + /** + * Converts this AskAccessCodeResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.AskAccessCodeResponse + * @instance + * @returns {Object.} JSON object + */ + AskAccessCodeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AskAccessCodeResponse + * @function getTypeUrl + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AskAccessCodeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.AskAccessCodeResponse"; + }; + + return AskAccessCodeResponse; + })(); + + protobuf.RegisterOpponentGhostRequest = (function() { + + /** + * Properties of a RegisterOpponentGhostRequest. + * @memberof wm.protobuf + * @interface IRegisterOpponentGhostRequest + * @property {number} carId RegisterOpponentGhostRequest carId + * @property {number} specialGhostId RegisterOpponentGhostRequest specialGhostId + */ + + /** + * Constructs a new RegisterOpponentGhostRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterOpponentGhostRequest. + * @implements IRegisterOpponentGhostRequest + * @constructor + * @param {wm.protobuf.IRegisterOpponentGhostRequest=} [properties] Properties to set + */ + function RegisterOpponentGhostRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterOpponentGhostRequest carId. + * @member {number} carId + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @instance + */ + RegisterOpponentGhostRequest.prototype.carId = 0; + + /** + * RegisterOpponentGhostRequest specialGhostId. + * @member {number} specialGhostId + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @instance + */ + RegisterOpponentGhostRequest.prototype.specialGhostId = 0; + + /** + * Creates a new RegisterOpponentGhostRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.IRegisterOpponentGhostRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest instance + */ + RegisterOpponentGhostRequest.create = function create(properties) { + return new RegisterOpponentGhostRequest(properties); + }; + + /** + * Encodes the specified RegisterOpponentGhostRequest message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.IRegisterOpponentGhostRequest} message RegisterOpponentGhostRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.specialGhostId); + return writer; + }; + + /** + * Encodes the specified RegisterOpponentGhostRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.IRegisterOpponentGhostRequest} message RegisterOpponentGhostRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterOpponentGhostRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.specialGhostId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("specialGhostId")) + throw $util.ProtocolError("missing required 'specialGhostId'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterOpponentGhostRequest message. + * @function verify + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterOpponentGhostRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.specialGhostId)) + return "specialGhostId: integer expected"; + return null; + }; + + /** + * Creates a RegisterOpponentGhostRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest + */ + RegisterOpponentGhostRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterOpponentGhostRequest) + return object; + let message = new $root.wm.protobuf.RegisterOpponentGhostRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.specialGhostId != null) + message.specialGhostId = object.specialGhostId >>> 0; + return message; + }; + + /** + * Creates a plain object from a RegisterOpponentGhostRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.RegisterOpponentGhostRequest} message RegisterOpponentGhostRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterOpponentGhostRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.specialGhostId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.specialGhostId != null && message.hasOwnProperty("specialGhostId")) + object.specialGhostId = message.specialGhostId; + return object; + }; + + /** + * Converts this RegisterOpponentGhostRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterOpponentGhostRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterOpponentGhostRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterOpponentGhostRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterOpponentGhostRequest"; + }; + + return RegisterOpponentGhostRequest; + })(); + + protobuf.RegisterOpponentGhostResponse = (function() { + + /** + * Properties of a RegisterOpponentGhostResponse. + * @memberof wm.protobuf + * @interface IRegisterOpponentGhostResponse + * @property {wm.protobuf.ErrorCode} error RegisterOpponentGhostResponse error + */ + + /** + * Constructs a new RegisterOpponentGhostResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterOpponentGhostResponse. + * @implements IRegisterOpponentGhostResponse + * @constructor + * @param {wm.protobuf.IRegisterOpponentGhostResponse=} [properties] Properties to set + */ + function RegisterOpponentGhostResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterOpponentGhostResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @instance + */ + RegisterOpponentGhostResponse.prototype.error = 0; + + /** + * Creates a new RegisterOpponentGhostResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.IRegisterOpponentGhostResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse instance + */ + RegisterOpponentGhostResponse.create = function create(properties) { + return new RegisterOpponentGhostResponse(properties); + }; + + /** + * Encodes the specified RegisterOpponentGhostResponse message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.IRegisterOpponentGhostResponse} message RegisterOpponentGhostResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified RegisterOpponentGhostResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.IRegisterOpponentGhostResponse} message RegisterOpponentGhostResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterOpponentGhostResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterOpponentGhostResponse message. + * @function verify + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterOpponentGhostResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a RegisterOpponentGhostResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse + */ + RegisterOpponentGhostResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterOpponentGhostResponse) + return object; + let message = new $root.wm.protobuf.RegisterOpponentGhostResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a RegisterOpponentGhostResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.RegisterOpponentGhostResponse} message RegisterOpponentGhostResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterOpponentGhostResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this RegisterOpponentGhostResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterOpponentGhostResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterOpponentGhostResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterOpponentGhostResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterOpponentGhostResponse"; + }; + + return RegisterOpponentGhostResponse; + })(); + + protobuf.GrantCarRightRequest = (function() { + + /** + * Properties of a GrantCarRightRequest. + * @memberof wm.protobuf + * @interface IGrantCarRightRequest + * @property {number} userId GrantCarRightRequest userId + * @property {number} targetUserId GrantCarRightRequest targetUserId + * @property {number} timestamp GrantCarRightRequest timestamp + */ + + /** + * Constructs a new GrantCarRightRequest. + * @memberof wm.protobuf + * @classdesc Represents a GrantCarRightRequest. + * @implements IGrantCarRightRequest + * @constructor + * @param {wm.protobuf.IGrantCarRightRequest=} [properties] Properties to set + */ + function GrantCarRightRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GrantCarRightRequest userId. + * @member {number} userId + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + */ + GrantCarRightRequest.prototype.userId = 0; + + /** + * GrantCarRightRequest targetUserId. + * @member {number} targetUserId + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + */ + GrantCarRightRequest.prototype.targetUserId = 0; + + /** + * GrantCarRightRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + */ + GrantCarRightRequest.prototype.timestamp = 0; + + /** + * Creates a new GrantCarRightRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.IGrantCarRightRequest=} [properties] Properties to set + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest instance + */ + GrantCarRightRequest.create = function create(properties) { + return new GrantCarRightRequest(properties); + }; + + /** + * Encodes the specified GrantCarRightRequest message. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.IGrantCarRightRequest} message GrantCarRightRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetUserId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified GrantCarRightRequest message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.IGrantCarRightRequest} message GrantCarRightRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GrantCarRightRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.targetUserId = reader.uint32(); + break; + } + case 3: { + message.timestamp = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("targetUserId")) + throw $util.ProtocolError("missing required 'targetUserId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GrantCarRightRequest message. + * @function verify + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GrantCarRightRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.targetUserId)) + return "targetUserId: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + return null; + }; + + /** + * Creates a GrantCarRightRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest + */ + GrantCarRightRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GrantCarRightRequest) + return object; + let message = new $root.wm.protobuf.GrantCarRightRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.targetUserId != null) + message.targetUserId = object.targetUserId >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + return message; + }; + + /** + * Creates a plain object from a GrantCarRightRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.GrantCarRightRequest} message GrantCarRightRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GrantCarRightRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.targetUserId = 0; + object.timestamp = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.targetUserId != null && message.hasOwnProperty("targetUserId")) + object.targetUserId = message.targetUserId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this GrantCarRightRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + * @returns {Object.} JSON object + */ + GrantCarRightRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GrantCarRightRequest + * @function getTypeUrl + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GrantCarRightRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GrantCarRightRequest"; + }; + + return GrantCarRightRequest; + })(); + + protobuf.GrantCarRightResponse = (function() { + + /** + * Properties of a GrantCarRightResponse. + * @memberof wm.protobuf + * @interface IGrantCarRightResponse + * @property {wm.protobuf.ErrorCode} error GrantCarRightResponse error + */ + + /** + * Constructs a new GrantCarRightResponse. + * @memberof wm.protobuf + * @classdesc Represents a GrantCarRightResponse. + * @implements IGrantCarRightResponse + * @constructor + * @param {wm.protobuf.IGrantCarRightResponse=} [properties] Properties to set + */ + function GrantCarRightResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GrantCarRightResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.GrantCarRightResponse + * @instance + */ + GrantCarRightResponse.prototype.error = 0; + + /** + * Creates a new GrantCarRightResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.IGrantCarRightResponse=} [properties] Properties to set + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse instance + */ + GrantCarRightResponse.create = function create(properties) { + return new GrantCarRightResponse(properties); + }; + + /** + * Encodes the specified GrantCarRightResponse message. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.IGrantCarRightResponse} message GrantCarRightResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified GrantCarRightResponse message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.IGrantCarRightResponse} message GrantCarRightResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GrantCarRightResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GrantCarRightResponse message. + * @function verify + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GrantCarRightResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a GrantCarRightResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse + */ + GrantCarRightResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GrantCarRightResponse) + return object; + let message = new $root.wm.protobuf.GrantCarRightResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a GrantCarRightResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.GrantCarRightResponse} message GrantCarRightResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GrantCarRightResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this GrantCarRightResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.GrantCarRightResponse + * @instance + * @returns {Object.} JSON object + */ + GrantCarRightResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GrantCarRightResponse + * @function getTypeUrl + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GrantCarRightResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GrantCarRightResponse"; + }; + + return GrantCarRightResponse; + })(); + + protobuf.LoadGhostCompetitionRankingRequest = (function() { + + /** + * Properties of a LoadGhostCompetitionRankingRequest. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionRankingRequest + * @property {number} carId LoadGhostCompetitionRankingRequest carId + * @property {number} competitionId LoadGhostCompetitionRankingRequest competitionId + */ + + /** + * Constructs a new LoadGhostCompetitionRankingRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionRankingRequest. + * @implements ILoadGhostCompetitionRankingRequest + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest=} [properties] Properties to set + */ + function LoadGhostCompetitionRankingRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionRankingRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @instance + */ + LoadGhostCompetitionRankingRequest.prototype.carId = 0; + + /** + * LoadGhostCompetitionRankingRequest competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @instance + */ + LoadGhostCompetitionRankingRequest.prototype.competitionId = 0; + + /** + * Creates a new LoadGhostCompetitionRankingRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest instance + */ + LoadGhostCompetitionRankingRequest.create = function create(properties) { + return new LoadGhostCompetitionRankingRequest(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest} message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.competitionId); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest} message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionRankingRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.competitionId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionRankingRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionRankingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + return null; + }; + + /** + * Creates a LoadGhostCompetitionRankingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest + */ + LoadGhostCompetitionRankingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionRankingRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionRankingRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingRequest} message LoadGhostCompetitionRankingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionRankingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.competitionId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + return object; + }; + + /** + * Converts this LoadGhostCompetitionRankingRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionRankingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionRankingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionRankingRequest"; + }; + + return LoadGhostCompetitionRankingRequest; + })(); + + protobuf.LoadGhostCompetitionRankingResponse = (function() { + + /** + * Properties of a LoadGhostCompetitionRankingResponse. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionRankingResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostCompetitionRankingResponse error + * @property {number|null} [periodId] LoadGhostCompetitionRankingResponse periodId + * @property {number} numOfParticipants LoadGhostCompetitionRankingResponse numOfParticipants + * @property {wm.protobuf.IGhostCompetitionSchedule|null} [competitionSchedule] LoadGhostCompetitionRankingResponse competitionSchedule + * @property {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null} [ownRecord] LoadGhostCompetitionRankingResponse ownRecord + * @property {Array.|null} [topRecords] LoadGhostCompetitionRankingResponse topRecords + */ + + /** + * Constructs a new LoadGhostCompetitionRankingResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionRankingResponse. + * @implements ILoadGhostCompetitionRankingResponse + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse=} [properties] Properties to set + */ + function LoadGhostCompetitionRankingResponse(properties) { + this.topRecords = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionRankingResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.error = 0; + + /** + * LoadGhostCompetitionRankingResponse periodId. + * @member {number} periodId + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.periodId = 0; + + /** + * LoadGhostCompetitionRankingResponse numOfParticipants. + * @member {number} numOfParticipants + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.numOfParticipants = 0; + + /** + * LoadGhostCompetitionRankingResponse competitionSchedule. + * @member {wm.protobuf.IGhostCompetitionSchedule|null|undefined} competitionSchedule + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.competitionSchedule = null; + + /** + * LoadGhostCompetitionRankingResponse ownRecord. + * @member {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null|undefined} ownRecord + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.ownRecord = null; + + /** + * LoadGhostCompetitionRankingResponse topRecords. + * @member {Array.} topRecords + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.topRecords = $util.emptyArray; + + /** + * Creates a new LoadGhostCompetitionRankingResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse instance + */ + LoadGhostCompetitionRankingResponse.create = function create(properties) { + return new LoadGhostCompetitionRankingResponse(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse} message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.periodId != null && Object.hasOwnProperty.call(message, "periodId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.periodId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.numOfParticipants); + if (message.competitionSchedule != null && Object.hasOwnProperty.call(message, "competitionSchedule")) + $root.wm.protobuf.GhostCompetitionSchedule.encode(message.competitionSchedule, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.ownRecord != null && Object.hasOwnProperty.call(message, "ownRecord")) + $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.encode(message.ownRecord, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.topRecords != null && message.topRecords.length) + for (let i = 0; i < message.topRecords.length; ++i) + $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.encode(message.topRecords[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse} message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.periodId = reader.uint32(); + break; + } + case 3: { + message.numOfParticipants = reader.uint32(); + break; + } + case 4: { + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.decode(reader, reader.uint32()); + break; + } + case 5: { + message.ownRecord = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.topRecords && message.topRecords.length)) + message.topRecords = []; + message.topRecords.push($root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("numOfParticipants")) + throw $util.ProtocolError("missing required 'numOfParticipants'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionRankingResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionRankingResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.periodId != null && message.hasOwnProperty("periodId")) + if (!$util.isInteger(message.periodId)) + return "periodId: integer expected"; + if (!$util.isInteger(message.numOfParticipants)) + return "numOfParticipants: integer expected"; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) { + let error = $root.wm.protobuf.GhostCompetitionSchedule.verify(message.competitionSchedule); + if (error) + return "competitionSchedule." + error; + } + if (message.ownRecord != null && message.hasOwnProperty("ownRecord")) { + let error = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify(message.ownRecord); + if (error) + return "ownRecord." + error; + } + if (message.topRecords != null && message.hasOwnProperty("topRecords")) { + if (!Array.isArray(message.topRecords)) + return "topRecords: array expected"; + for (let i = 0; i < message.topRecords.length; ++i) { + let error = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify(message.topRecords[i]); + if (error) + return "topRecords." + error; + } + } + return null; + }; + + /** + * Creates a LoadGhostCompetitionRankingResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse + */ + LoadGhostCompetitionRankingResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionRankingResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.periodId != null) + message.periodId = object.periodId >>> 0; + if (object.numOfParticipants != null) + message.numOfParticipants = object.numOfParticipants >>> 0; + if (object.competitionSchedule != null) { + if (typeof object.competitionSchedule !== "object") + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.competitionSchedule: object expected"); + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.fromObject(object.competitionSchedule); + } + if (object.ownRecord != null) { + if (typeof object.ownRecord !== "object") + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.ownRecord: object expected"); + message.ownRecord = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.fromObject(object.ownRecord); + } + if (object.topRecords) { + if (!Array.isArray(object.topRecords)) + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.topRecords: array expected"); + message.topRecords = []; + for (let i = 0; i < object.topRecords.length; ++i) { + if (typeof object.topRecords[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.topRecords: object expected"); + message.topRecords[i] = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.fromObject(object.topRecords[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse} message LoadGhostCompetitionRankingResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionRankingResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.topRecords = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.periodId = 0; + object.numOfParticipants = 0; + object.competitionSchedule = null; + object.ownRecord = null; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.periodId != null && message.hasOwnProperty("periodId")) + object.periodId = message.periodId; + if (message.numOfParticipants != null && message.hasOwnProperty("numOfParticipants")) + object.numOfParticipants = message.numOfParticipants; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) + object.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.toObject(message.competitionSchedule, options); + if (message.ownRecord != null && message.hasOwnProperty("ownRecord")) + object.ownRecord = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.toObject(message.ownRecord, options); + if (message.topRecords && message.topRecords.length) { + object.topRecords = []; + for (let j = 0; j < message.topRecords.length; ++j) + object.topRecords[j] = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.toObject(message.topRecords[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostCompetitionRankingResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionRankingResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionRankingResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionRankingResponse"; + }; + + LoadGhostCompetitionRankingResponse.Entry = (function() { + + /** + * Properties of an Entry. + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @interface IEntry + * @property {number} rank Entry rank + * @property {number} result Entry result + * @property {number} carId Entry carId + * @property {string} name Entry name + * @property {number} regionId Entry regionId + * @property {number} model Entry model + * @property {number} visualModel Entry visualModel + * @property {number} defaultColor Entry defaultColor + * @property {string} title Entry title + * @property {number} level Entry level + * @property {string|null} [windowStickerString] Entry windowStickerString + * @property {string} playedShopName Entry playedShopName + * @property {number} playedAt Entry playedAt + */ + + /** + * Constructs a new Entry. + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @classdesc Represents an Entry. + * @implements IEntry + * @constructor + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry=} [properties] Properties to set + */ + function Entry(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entry rank. + * @member {number} rank + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.rank = 0; + + /** + * Entry result. + * @member {number} result + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.result = 0; + + /** + * Entry carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.carId = 0; + + /** + * Entry name. + * @member {string} name + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.name = ""; + + /** + * Entry regionId. + * @member {number} regionId + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.regionId = 0; + + /** + * Entry model. + * @member {number} model + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.model = 0; + + /** + * Entry visualModel. + * @member {number} visualModel + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.visualModel = 0; + + /** + * Entry defaultColor. + * @member {number} defaultColor + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.defaultColor = 0; + + /** + * Entry title. + * @member {string} title + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.title = ""; + + /** + * Entry level. + * @member {number} level + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.level = 0; + + /** + * Entry windowStickerString. + * @member {string} windowStickerString + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.windowStickerString = ""; + + /** + * Entry playedShopName. + * @member {string} playedShopName + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.playedShopName = ""; + + /** + * Entry playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.playedAt = 0; + + /** + * Creates a new Entry instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry instance + */ + Entry.create = function create(properties) { + return new Entry(properties); + }; + + /** + * Encodes the specified Entry message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rank); + writer.uint32(/* id 2, wireType 0 =*/16).sint32(message.result); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.carId); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.regionId); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.model); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.visualModel); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.defaultColor); + writer.uint32(/* id 10, wireType 2 =*/82).string(message.title); + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.level); + if (message.windowStickerString != null && Object.hasOwnProperty.call(message, "windowStickerString")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.windowStickerString); + writer.uint32(/* id 13, wireType 2 =*/106).string(message.playedShopName); + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.playedAt); + return writer; + }; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rank = reader.uint32(); + break; + } + case 2: { + message.result = reader.sint32(); + break; + } + case 3: { + message.carId = reader.uint32(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + case 5: { + message.regionId = reader.uint32(); + break; + } + case 6: { + message.model = reader.uint32(); + break; + } + case 7: { + message.visualModel = reader.uint32(); + break; + } + case 8: { + message.defaultColor = reader.uint32(); + break; + } + case 10: { + message.title = reader.string(); + break; + } + case 11: { + message.level = reader.uint32(); + break; + } + case 12: { + message.windowStickerString = reader.string(); + break; + } + case 13: { + message.playedShopName = reader.string(); + break; + } + case 14: { + message.playedAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("rank")) + throw $util.ProtocolError("missing required 'rank'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("name")) + throw $util.ProtocolError("missing required 'name'", { instance: message }); + if (!message.hasOwnProperty("regionId")) + throw $util.ProtocolError("missing required 'regionId'", { instance: message }); + if (!message.hasOwnProperty("model")) + throw $util.ProtocolError("missing required 'model'", { instance: message }); + if (!message.hasOwnProperty("visualModel")) + throw $util.ProtocolError("missing required 'visualModel'", { instance: message }); + if (!message.hasOwnProperty("defaultColor")) + throw $util.ProtocolError("missing required 'defaultColor'", { instance: message }); + if (!message.hasOwnProperty("title")) + throw $util.ProtocolError("missing required 'title'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + if (!message.hasOwnProperty("playedShopName")) + throw $util.ProtocolError("missing required 'playedShopName'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + return message; + }; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entry message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isString(message.name)) + return "name: string expected"; + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (!$util.isInteger(message.model)) + return "model: integer expected"; + if (!$util.isInteger(message.visualModel)) + return "visualModel: integer expected"; + if (!$util.isInteger(message.defaultColor)) + return "defaultColor: integer expected"; + if (!$util.isString(message.title)) + return "title: string expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + if (!$util.isString(message.windowStickerString)) + return "windowStickerString: string expected"; + if (!$util.isString(message.playedShopName)) + return "playedShopName: string expected"; + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + return null; + }; + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry + */ + Entry.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry(); + if (object.rank != null) + message.rank = object.rank >>> 0; + if (object.result != null) + message.result = object.result | 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.model != null) + message.model = object.model >>> 0; + if (object.visualModel != null) + message.visualModel = object.visualModel >>> 0; + if (object.defaultColor != null) + message.defaultColor = object.defaultColor >>> 0; + if (object.title != null) + message.title = String(object.title); + if (object.level != null) + message.level = object.level >>> 0; + if (object.windowStickerString != null) + message.windowStickerString = String(object.windowStickerString); + if (object.playedShopName != null) + message.playedShopName = String(object.playedShopName); + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + return message; + }; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} message Entry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.rank = 0; + object.result = 0; + object.carId = 0; + object.name = ""; + object.regionId = 0; + object.model = 0; + object.visualModel = 0; + object.defaultColor = 0; + object.title = ""; + object.level = 0; + object.windowStickerString = ""; + object.playedShopName = ""; + object.playedAt = 0; + } + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.visualModel != null && message.hasOwnProperty("visualModel")) + object.visualModel = message.visualModel; + if (message.defaultColor != null && message.hasOwnProperty("defaultColor")) + object.defaultColor = message.defaultColor; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + object.windowStickerString = message.windowStickerString; + if (message.playedShopName != null && message.hasOwnProperty("playedShopName")) + object.playedShopName = message.playedShopName; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + return object; + }; + + /** + * Converts this Entry to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + * @returns {Object.} JSON object + */ + Entry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entry + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionRankingResponse.Entry"; + }; + + return Entry; + })(); + + return LoadGhostCompetitionRankingResponse; + })(); + + protobuf.LoadUnreceivedUserItemsRequest = (function() { + + /** + * Properties of a LoadUnreceivedUserItemsRequest. + * @memberof wm.protobuf + * @interface ILoadUnreceivedUserItemsRequest + * @property {number} userId LoadUnreceivedUserItemsRequest userId + */ + + /** + * Constructs a new LoadUnreceivedUserItemsRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadUnreceivedUserItemsRequest. + * @implements ILoadUnreceivedUserItemsRequest + * @constructor + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest=} [properties] Properties to set + */ + function LoadUnreceivedUserItemsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUnreceivedUserItemsRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @instance + */ + LoadUnreceivedUserItemsRequest.prototype.userId = 0; + + /** + * Creates a new LoadUnreceivedUserItemsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest instance + */ + LoadUnreceivedUserItemsRequest.create = function create(properties) { + return new LoadUnreceivedUserItemsRequest(properties); + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest} message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest} message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUnreceivedUserItemsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUnreceivedUserItemsRequest message. + * @function verify + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUnreceivedUserItemsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadUnreceivedUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest + */ + LoadUnreceivedUserItemsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUnreceivedUserItemsRequest) + return object; + let message = new $root.wm.protobuf.LoadUnreceivedUserItemsRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.LoadUnreceivedUserItemsRequest} message LoadUnreceivedUserItemsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUnreceivedUserItemsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadUnreceivedUserItemsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @instance + * @returns {Object.} JSON object + */ + LoadUnreceivedUserItemsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUnreceivedUserItemsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUnreceivedUserItemsRequest"; + }; + + return LoadUnreceivedUserItemsRequest; + })(); + + protobuf.LoadUnreceivedUserItemsResponse = (function() { + + /** + * Properties of a LoadUnreceivedUserItemsResponse. + * @memberof wm.protobuf + * @interface ILoadUnreceivedUserItemsResponse + * @property {wm.protobuf.ErrorCode} error LoadUnreceivedUserItemsResponse error + * @property {Array.|null} [ownedUserItems] LoadUnreceivedUserItemsResponse ownedUserItems + */ + + /** + * Constructs a new LoadUnreceivedUserItemsResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadUnreceivedUserItemsResponse. + * @implements ILoadUnreceivedUserItemsResponse + * @constructor + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse=} [properties] Properties to set + */ + function LoadUnreceivedUserItemsResponse(properties) { + this.ownedUserItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUnreceivedUserItemsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @instance + */ + LoadUnreceivedUserItemsResponse.prototype.error = 0; + + /** + * LoadUnreceivedUserItemsResponse ownedUserItems. + * @member {Array.} ownedUserItems + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @instance + */ + LoadUnreceivedUserItemsResponse.prototype.ownedUserItems = $util.emptyArray; + + /** + * Creates a new LoadUnreceivedUserItemsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse instance + */ + LoadUnreceivedUserItemsResponse.create = function create(properties) { + return new LoadUnreceivedUserItemsResponse(properties); + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse} message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.ownedUserItems != null && message.ownedUserItems.length) + for (let i = 0; i < message.ownedUserItems.length; ++i) + $root.wm.protobuf.UserItem.encode(message.ownedUserItems[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse} message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUnreceivedUserItemsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 7: { + if (!(message.ownedUserItems && message.ownedUserItems.length)) + message.ownedUserItems = []; + message.ownedUserItems.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUnreceivedUserItemsResponse message. + * @function verify + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUnreceivedUserItemsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.ownedUserItems != null && message.hasOwnProperty("ownedUserItems")) { + if (!Array.isArray(message.ownedUserItems)) + return "ownedUserItems: array expected"; + for (let i = 0; i < message.ownedUserItems.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.ownedUserItems[i]); + if (error) + return "ownedUserItems." + error; + } + } + return null; + }; + + /** + * Creates a LoadUnreceivedUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse + */ + LoadUnreceivedUserItemsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUnreceivedUserItemsResponse) + return object; + let message = new $root.wm.protobuf.LoadUnreceivedUserItemsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.ownedUserItems) { + if (!Array.isArray(object.ownedUserItems)) + throw TypeError(".wm.protobuf.LoadUnreceivedUserItemsResponse.ownedUserItems: array expected"); + message.ownedUserItems = []; + for (let i = 0; i < object.ownedUserItems.length; ++i) { + if (typeof object.ownedUserItems[i] !== "object") + throw TypeError(".wm.protobuf.LoadUnreceivedUserItemsResponse.ownedUserItems: object expected"); + message.ownedUserItems[i] = $root.wm.protobuf.UserItem.fromObject(object.ownedUserItems[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.LoadUnreceivedUserItemsResponse} message LoadUnreceivedUserItemsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUnreceivedUserItemsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.ownedUserItems = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.ownedUserItems && message.ownedUserItems.length) { + object.ownedUserItems = []; + for (let j = 0; j < message.ownedUserItems.length; ++j) + object.ownedUserItems[j] = $root.wm.protobuf.UserItem.toObject(message.ownedUserItems[j], options); + } + return object; + }; + + /** + * Converts this LoadUnreceivedUserItemsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @instance + * @returns {Object.} JSON object + */ + LoadUnreceivedUserItemsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUnreceivedUserItemsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUnreceivedUserItemsResponse"; + }; + + return LoadUnreceivedUserItemsResponse; + })(); + + protobuf.LoadBookmarksRequest = (function() { + + /** + * Properties of a LoadBookmarksRequest. + * @memberof wm.protobuf + * @interface ILoadBookmarksRequest + * @property {number} userId LoadBookmarksRequest userId + */ + + /** + * Constructs a new LoadBookmarksRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadBookmarksRequest. + * @implements ILoadBookmarksRequest + * @constructor + * @param {wm.protobuf.ILoadBookmarksRequest=} [properties] Properties to set + */ + function LoadBookmarksRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBookmarksRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadBookmarksRequest + * @instance + */ + LoadBookmarksRequest.prototype.userId = 0; + + /** + * Creates a new LoadBookmarksRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.ILoadBookmarksRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest instance + */ + LoadBookmarksRequest.create = function create(properties) { + return new LoadBookmarksRequest(properties); + }; + + /** + * Encodes the specified LoadBookmarksRequest message. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.ILoadBookmarksRequest} message LoadBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.ILoadBookmarksRequest} message LoadBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadBookmarksRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBookmarksRequest message. + * @function verify + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBookmarksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest + */ + LoadBookmarksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadBookmarksRequest) + return object; + let message = new $root.wm.protobuf.LoadBookmarksRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadBookmarksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.LoadBookmarksRequest} message LoadBookmarksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBookmarksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadBookmarksRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadBookmarksRequest + * @instance + * @returns {Object.} JSON object + */ + LoadBookmarksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBookmarksRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBookmarksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadBookmarksRequest"; + }; + + return LoadBookmarksRequest; + })(); + + protobuf.LoadBookmarksResponse = (function() { + + /** + * Properties of a LoadBookmarksResponse. + * @memberof wm.protobuf + * @interface ILoadBookmarksResponse + * @property {wm.protobuf.ErrorCode} error LoadBookmarksResponse error + * @property {Array.|null} [cars] LoadBookmarksResponse cars + */ + + /** + * Constructs a new LoadBookmarksResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadBookmarksResponse. + * @implements ILoadBookmarksResponse + * @constructor + * @param {wm.protobuf.ILoadBookmarksResponse=} [properties] Properties to set + */ + function LoadBookmarksResponse(properties) { + this.cars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBookmarksResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadBookmarksResponse + * @instance + */ + LoadBookmarksResponse.prototype.error = 0; + + /** + * LoadBookmarksResponse cars. + * @member {Array.} cars + * @memberof wm.protobuf.LoadBookmarksResponse + * @instance + */ + LoadBookmarksResponse.prototype.cars = $util.emptyArray; + + /** + * Creates a new LoadBookmarksResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.ILoadBookmarksResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse instance + */ + LoadBookmarksResponse.create = function create(properties) { + return new LoadBookmarksResponse(properties); + }; + + /** + * Encodes the specified LoadBookmarksResponse message. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.ILoadBookmarksResponse} message LoadBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.Car.encode(message.cars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.ILoadBookmarksResponse} message LoadBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadBookmarksResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBookmarksResponse message. + * @function verify + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBookmarksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + return null; + }; + + /** + * Creates a LoadBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse + */ + LoadBookmarksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadBookmarksResponse) + return object; + let message = new $root.wm.protobuf.LoadBookmarksResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.LoadBookmarksResponse.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.LoadBookmarksResponse.cars: object expected"); + message.cars[i] = $root.wm.protobuf.Car.fromObject(object.cars[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadBookmarksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.LoadBookmarksResponse} message LoadBookmarksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBookmarksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cars = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.Car.toObject(message.cars[j], options); + } + return object; + }; + + /** + * Converts this LoadBookmarksResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadBookmarksResponse + * @instance + * @returns {Object.} JSON object + */ + LoadBookmarksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBookmarksResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBookmarksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadBookmarksResponse"; + }; + + return LoadBookmarksResponse; + })(); + + protobuf.SaveBookmarksRequest = (function() { + + /** + * Properties of a SaveBookmarksRequest. + * @memberof wm.protobuf + * @interface ISaveBookmarksRequest + * @property {number} userId SaveBookmarksRequest userId + * @property {Array.|null} [cars] SaveBookmarksRequest cars + */ + + /** + * Constructs a new SaveBookmarksRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveBookmarksRequest. + * @implements ISaveBookmarksRequest + * @constructor + * @param {wm.protobuf.ISaveBookmarksRequest=} [properties] Properties to set + */ + function SaveBookmarksRequest(properties) { + this.cars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveBookmarksRequest userId. + * @member {number} userId + * @memberof wm.protobuf.SaveBookmarksRequest + * @instance + */ + SaveBookmarksRequest.prototype.userId = 0; + + /** + * SaveBookmarksRequest cars. + * @member {Array.} cars + * @memberof wm.protobuf.SaveBookmarksRequest + * @instance + */ + SaveBookmarksRequest.prototype.cars = $util.emptyArray; + + /** + * Creates a new SaveBookmarksRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.ISaveBookmarksRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest instance + */ + SaveBookmarksRequest.create = function create(properties) { + return new SaveBookmarksRequest(properties); + }; + + /** + * Encodes the specified SaveBookmarksRequest message. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.ISaveBookmarksRequest} message SaveBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.cars[i]); + return writer; + }; + + /** + * Encodes the specified SaveBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.ISaveBookmarksRequest} message SaveBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveBookmarksRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.cars.push(reader.uint32()); + } else + message.cars.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveBookmarksRequest message. + * @function verify + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveBookmarksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) + if (!$util.isInteger(message.cars[i])) + return "cars: integer[] expected"; + } + return null; + }; + + /** + * Creates a SaveBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest + */ + SaveBookmarksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveBookmarksRequest) + return object; + let message = new $root.wm.protobuf.SaveBookmarksRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.SaveBookmarksRequest.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) + message.cars[i] = object.cars[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a SaveBookmarksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.SaveBookmarksRequest} message SaveBookmarksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveBookmarksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cars = []; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = message.cars[j]; + } + return object; + }; + + /** + * Converts this SaveBookmarksRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveBookmarksRequest + * @instance + * @returns {Object.} JSON object + */ + SaveBookmarksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveBookmarksRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveBookmarksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveBookmarksRequest"; + }; + + return SaveBookmarksRequest; + })(); + + protobuf.SaveBookmarksResponse = (function() { + + /** + * Properties of a SaveBookmarksResponse. + * @memberof wm.protobuf + * @interface ISaveBookmarksResponse + * @property {wm.protobuf.ErrorCode} error SaveBookmarksResponse error + */ + + /** + * Constructs a new SaveBookmarksResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveBookmarksResponse. + * @implements ISaveBookmarksResponse + * @constructor + * @param {wm.protobuf.ISaveBookmarksResponse=} [properties] Properties to set + */ + function SaveBookmarksResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveBookmarksResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveBookmarksResponse + * @instance + */ + SaveBookmarksResponse.prototype.error = 0; + + /** + * Creates a new SaveBookmarksResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.ISaveBookmarksResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse instance + */ + SaveBookmarksResponse.create = function create(properties) { + return new SaveBookmarksResponse(properties); + }; + + /** + * Encodes the specified SaveBookmarksResponse message. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.ISaveBookmarksResponse} message SaveBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.ISaveBookmarksResponse} message SaveBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveBookmarksResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveBookmarksResponse message. + * @function verify + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveBookmarksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse + */ + SaveBookmarksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveBookmarksResponse) + return object; + let message = new $root.wm.protobuf.SaveBookmarksResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveBookmarksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.SaveBookmarksResponse} message SaveBookmarksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveBookmarksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveBookmarksResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveBookmarksResponse + * @instance + * @returns {Object.} JSON object + */ + SaveBookmarksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveBookmarksResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveBookmarksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveBookmarksResponse"; + }; + + return SaveBookmarksResponse; + })(); + + protobuf.StartTransferRequest = (function() { + + /** + * Properties of a StartTransferRequest. + * @memberof wm.protobuf + * @interface IStartTransferRequest + * @property {number} banapassportAmId StartTransferRequest banapassportAmId + */ + + /** + * Constructs a new StartTransferRequest. + * @memberof wm.protobuf + * @classdesc Represents a StartTransferRequest. + * @implements IStartTransferRequest + * @constructor + * @param {wm.protobuf.IStartTransferRequest=} [properties] Properties to set + */ + function StartTransferRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StartTransferRequest banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.StartTransferRequest + * @instance + */ + StartTransferRequest.prototype.banapassportAmId = 0; + + /** + * Creates a new StartTransferRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.IStartTransferRequest=} [properties] Properties to set + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest instance + */ + StartTransferRequest.create = function create(properties) { + return new StartTransferRequest(properties); + }; + + /** + * Encodes the specified StartTransferRequest message. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.IStartTransferRequest} message StartTransferRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.banapassportAmId); + return writer; + }; + + /** + * Encodes the specified StartTransferRequest message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.IStartTransferRequest} message StartTransferRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.StartTransferRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.banapassportAmId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("banapassportAmId")) + throw $util.ProtocolError("missing required 'banapassportAmId'", { instance: message }); + return message; + }; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartTransferRequest message. + * @function verify + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartTransferRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + return null; + }; + + /** + * Creates a StartTransferRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest + */ + StartTransferRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.StartTransferRequest) + return object; + let message = new $root.wm.protobuf.StartTransferRequest(); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + return message; + }; + + /** + * Creates a plain object from a StartTransferRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.StartTransferRequest} message StartTransferRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartTransferRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.banapassportAmId = 0; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + return object; + }; + + /** + * Converts this StartTransferRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.StartTransferRequest + * @instance + * @returns {Object.} JSON object + */ + StartTransferRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StartTransferRequest + * @function getTypeUrl + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartTransferRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.StartTransferRequest"; + }; + + return StartTransferRequest; + })(); + + protobuf.StartTransferResponse = (function() { + + /** + * Properties of a StartTransferResponse. + * @memberof wm.protobuf + * @interface IStartTransferResponse + * @property {wm.protobuf.ErrorCode} error StartTransferResponse error + * @property {number} userId StartTransferResponse userId + * @property {number|null} [pollingInterval] StartTransferResponse pollingInterval + */ + + /** + * Constructs a new StartTransferResponse. + * @memberof wm.protobuf + * @classdesc Represents a StartTransferResponse. + * @implements IStartTransferResponse + * @constructor + * @param {wm.protobuf.IStartTransferResponse=} [properties] Properties to set + */ + function StartTransferResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StartTransferResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.StartTransferResponse + * @instance + */ + StartTransferResponse.prototype.error = 0; + + /** + * StartTransferResponse userId. + * @member {number} userId + * @memberof wm.protobuf.StartTransferResponse + * @instance + */ + StartTransferResponse.prototype.userId = 0; + + /** + * StartTransferResponse pollingInterval. + * @member {number} pollingInterval + * @memberof wm.protobuf.StartTransferResponse + * @instance + */ + StartTransferResponse.prototype.pollingInterval = 0; + + /** + * Creates a new StartTransferResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.IStartTransferResponse=} [properties] Properties to set + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse instance + */ + StartTransferResponse.create = function create(properties) { + return new StartTransferResponse(properties); + }; + + /** + * Encodes the specified StartTransferResponse message. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.IStartTransferResponse} message StartTransferResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.userId); + if (message.pollingInterval != null && Object.hasOwnProperty.call(message, "pollingInterval")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.pollingInterval); + return writer; + }; + + /** + * Encodes the specified StartTransferResponse message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.IStartTransferResponse} message StartTransferResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.StartTransferResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.userId = reader.uint32(); + break; + } + case 3: { + message.pollingInterval = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartTransferResponse message. + * @function verify + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartTransferResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.pollingInterval != null && message.hasOwnProperty("pollingInterval")) + if (!$util.isInteger(message.pollingInterval)) + return "pollingInterval: integer expected"; + return null; + }; + + /** + * Creates a StartTransferResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse + */ + StartTransferResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.StartTransferResponse) + return object; + let message = new $root.wm.protobuf.StartTransferResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.pollingInterval != null) + message.pollingInterval = object.pollingInterval >>> 0; + return message; + }; + + /** + * Creates a plain object from a StartTransferResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.StartTransferResponse} message StartTransferResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartTransferResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.userId = 0; + object.pollingInterval = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.pollingInterval != null && message.hasOwnProperty("pollingInterval")) + object.pollingInterval = message.pollingInterval; + return object; + }; + + /** + * Converts this StartTransferResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.StartTransferResponse + * @instance + * @returns {Object.} JSON object + */ + StartTransferResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StartTransferResponse + * @function getTypeUrl + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartTransferResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.StartTransferResponse"; + }; + + return StartTransferResponse; + })(); + + protobuf.SaveScreenshotRequest = (function() { + + /** + * Properties of a SaveScreenshotRequest. + * @memberof wm.protobuf + * @interface ISaveScreenshotRequest + * @property {number} carId SaveScreenshotRequest carId + * @property {number} timestamp SaveScreenshotRequest timestamp + * @property {number|null} [playedAt] SaveScreenshotRequest playedAt + * @property {boolean|null} [transparent] SaveScreenshotRequest transparent + * @property {wm.protobuf.ScreenshotType} imageType SaveScreenshotRequest imageType + * @property {Uint8Array|null} [image] SaveScreenshotRequest image + * @property {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null} [ghostMetadata] SaveScreenshotRequest ghostMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null} [versusMetadata] SaveScreenshotRequest versusMetadata + * @property {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null} [terminalMetadata] SaveScreenshotRequest terminalMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null} [acquiringVsStarMetadata] SaveScreenshotRequest acquiringVsStarMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null} [acquiringAuraMotifMetadata] SaveScreenshotRequest acquiringAuraMotifMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null} [ghostRegionMapMetadata] SaveScreenshotRequest ghostRegionMapMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null} [acquiringCrownMetadata] SaveScreenshotRequest acquiringCrownMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null} [competitionResultMetadata] SaveScreenshotRequest competitionResultMetadata + * @property {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null} [timeAttackResultMetadata] SaveScreenshotRequest timeAttackResultMetadata + * @property {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null} [levelUpMetadata] SaveScreenshotRequest levelUpMetadata + */ + + /** + * Constructs a new SaveScreenshotRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveScreenshotRequest. + * @implements ISaveScreenshotRequest + * @constructor + * @param {wm.protobuf.ISaveScreenshotRequest=} [properties] Properties to set + */ + function SaveScreenshotRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScreenshotRequest carId. + * @member {number} carId + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.carId = 0; + + /** + * SaveScreenshotRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.timestamp = 0; + + /** + * SaveScreenshotRequest playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.playedAt = 0; + + /** + * SaveScreenshotRequest transparent. + * @member {boolean} transparent + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.transparent = false; + + /** + * SaveScreenshotRequest imageType. + * @member {wm.protobuf.ScreenshotType} imageType + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.imageType = 1; + + /** + * SaveScreenshotRequest image. + * @member {Uint8Array} image + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.image = $util.newBuffer([]); + + /** + * SaveScreenshotRequest ghostMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null|undefined} ghostMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.ghostMetadata = null; + + /** + * SaveScreenshotRequest versusMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null|undefined} versusMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.versusMetadata = null; + + /** + * SaveScreenshotRequest terminalMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null|undefined} terminalMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.terminalMetadata = null; + + /** + * SaveScreenshotRequest acquiringVsStarMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null|undefined} acquiringVsStarMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.acquiringVsStarMetadata = null; + + /** + * SaveScreenshotRequest acquiringAuraMotifMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null|undefined} acquiringAuraMotifMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.acquiringAuraMotifMetadata = null; + + /** + * SaveScreenshotRequest ghostRegionMapMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null|undefined} ghostRegionMapMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.ghostRegionMapMetadata = null; + + /** + * SaveScreenshotRequest acquiringCrownMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null|undefined} acquiringCrownMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.acquiringCrownMetadata = null; + + /** + * SaveScreenshotRequest competitionResultMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null|undefined} competitionResultMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.competitionResultMetadata = null; + + /** + * SaveScreenshotRequest timeAttackResultMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null|undefined} timeAttackResultMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.timeAttackResultMetadata = null; + + /** + * SaveScreenshotRequest levelUpMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null|undefined} levelUpMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.levelUpMetadata = null; + + /** + * Creates a new SaveScreenshotRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.ISaveScreenshotRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest instance + */ + SaveScreenshotRequest.create = function create(properties) { + return new SaveScreenshotRequest(properties); + }; + + /** + * Encodes the specified SaveScreenshotRequest message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.ISaveScreenshotRequest} message SaveScreenshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.timestamp); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.imageType); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.image); + if (message.ghostMetadata != null && Object.hasOwnProperty.call(message, "ghostMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.encode(message.ghostMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.versusMetadata != null && Object.hasOwnProperty.call(message, "versusMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.encode(message.versusMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.terminalMetadata != null && Object.hasOwnProperty.call(message, "terminalMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.encode(message.terminalMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.transparent != null && Object.hasOwnProperty.call(message, "transparent")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.transparent); + if (message.playedAt != null && Object.hasOwnProperty.call(message, "playedAt")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.playedAt); + if (message.acquiringVsStarMetadata != null && Object.hasOwnProperty.call(message, "acquiringVsStarMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.encode(message.acquiringVsStarMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.acquiringAuraMotifMetadata != null && Object.hasOwnProperty.call(message, "acquiringAuraMotifMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.encode(message.acquiringAuraMotifMetadata, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.ghostRegionMapMetadata != null && Object.hasOwnProperty.call(message, "ghostRegionMapMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.encode(message.ghostRegionMapMetadata, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.acquiringCrownMetadata != null && Object.hasOwnProperty.call(message, "acquiringCrownMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.encode(message.acquiringCrownMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.competitionResultMetadata != null && Object.hasOwnProperty.call(message, "competitionResultMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.encode(message.competitionResultMetadata, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.timeAttackResultMetadata != null && Object.hasOwnProperty.call(message, "timeAttackResultMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.encode(message.timeAttackResultMetadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.levelUpMetadata != null && Object.hasOwnProperty.call(message, "levelUpMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.encode(message.levelUpMetadata, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveScreenshotRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.ISaveScreenshotRequest} message SaveScreenshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.timestamp = reader.uint32(); + break; + } + case 9: { + message.playedAt = reader.uint32(); + break; + } + case 8: { + message.transparent = reader.bool(); + break; + } + case 3: { + message.imageType = reader.int32(); + break; + } + case 4: { + message.image = reader.bytes(); + break; + } + case 5: { + message.ghostMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.decode(reader, reader.uint32()); + break; + } + case 6: { + message.versusMetadata = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.decode(reader, reader.uint32()); + break; + } + case 7: { + message.terminalMetadata = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.decode(reader, reader.uint32()); + break; + } + case 10: { + message.acquiringVsStarMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.decode(reader, reader.uint32()); + break; + } + case 11: { + message.acquiringAuraMotifMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.decode(reader, reader.uint32()); + break; + } + case 12: { + message.ghostRegionMapMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.decode(reader, reader.uint32()); + break; + } + case 13: { + message.acquiringCrownMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.decode(reader, reader.uint32()); + break; + } + case 14: { + message.competitionResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.decode(reader, reader.uint32()); + break; + } + case 15: { + message.timeAttackResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.decode(reader, reader.uint32()); + break; + } + case 16: { + message.levelUpMetadata = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + if (!message.hasOwnProperty("imageType")) + throw $util.ProtocolError("missing required 'imageType'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScreenshotRequest message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScreenshotRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (message.transparent != null && message.hasOwnProperty("transparent")) + if (typeof message.transparent !== "boolean") + return "transparent: boolean expected"; + switch (message.imageType) { + default: + return "imageType: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + if (message.image != null && message.hasOwnProperty("image")) + if (!(message.image && typeof message.image.length === "number" || $util.isString(message.image))) + return "image: buffer expected"; + if (message.ghostMetadata != null && message.hasOwnProperty("ghostMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify(message.ghostMetadata); + if (error) + return "ghostMetadata." + error; + } + if (message.versusMetadata != null && message.hasOwnProperty("versusMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify(message.versusMetadata); + if (error) + return "versusMetadata." + error; + } + if (message.terminalMetadata != null && message.hasOwnProperty("terminalMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify(message.terminalMetadata); + if (error) + return "terminalMetadata." + error; + } + if (message.acquiringVsStarMetadata != null && message.hasOwnProperty("acquiringVsStarMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify(message.acquiringVsStarMetadata); + if (error) + return "acquiringVsStarMetadata." + error; + } + if (message.acquiringAuraMotifMetadata != null && message.hasOwnProperty("acquiringAuraMotifMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify(message.acquiringAuraMotifMetadata); + if (error) + return "acquiringAuraMotifMetadata." + error; + } + if (message.ghostRegionMapMetadata != null && message.hasOwnProperty("ghostRegionMapMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify(message.ghostRegionMapMetadata); + if (error) + return "ghostRegionMapMetadata." + error; + } + if (message.acquiringCrownMetadata != null && message.hasOwnProperty("acquiringCrownMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify(message.acquiringCrownMetadata); + if (error) + return "acquiringCrownMetadata." + error; + } + if (message.competitionResultMetadata != null && message.hasOwnProperty("competitionResultMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify(message.competitionResultMetadata); + if (error) + return "competitionResultMetadata." + error; + } + if (message.timeAttackResultMetadata != null && message.hasOwnProperty("timeAttackResultMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify(message.timeAttackResultMetadata); + if (error) + return "timeAttackResultMetadata." + error; + } + if (message.levelUpMetadata != null && message.hasOwnProperty("levelUpMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify(message.levelUpMetadata); + if (error) + return "levelUpMetadata." + error; + } + return null; + }; + + /** + * Creates a SaveScreenshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest + */ + SaveScreenshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.transparent != null) + message.transparent = Boolean(object.transparent); + switch (object.imageType) { + case "SS_GHOST_BATTLE": + case 1: + message.imageType = 1; + break; + case "SS_VERSUS_BATTLE": + case 2: + message.imageType = 2; + break; + case "SS_TERMINAL": + case 3: + message.imageType = 3; + break; + case "SS_ACQUIRING_VERSUS_STAR": + case 4: + message.imageType = 4; + break; + case "SS_ACQUIRING_AURA_MOTIF": + case 5: + message.imageType = 5; + break; + case "SS_GHOST_REGION_MAP": + case 6: + message.imageType = 6; + break; + case "SS_ACQUIRING_CROWN": + case 7: + message.imageType = 7; + break; + case "SS_GHOST_COMPETITION_RESULT": + case 8: + message.imageType = 8; + break; + case "SS_TIME_ATTACK_RESULT": + case 9: + message.imageType = 9; + break; + case "SS_LEVEL_UP": + case 10: + message.imageType = 10; + break; + } + if (object.image != null) + if (typeof object.image === "string") + $util.base64.decode(object.image, message.image = $util.newBuffer($util.base64.length(object.image)), 0); + else if (object.image.length >= 0) + message.image = object.image; + if (object.ghostMetadata != null) { + if (typeof object.ghostMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.ghostMetadata: object expected"); + message.ghostMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.fromObject(object.ghostMetadata); + } + if (object.versusMetadata != null) { + if (typeof object.versusMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.versusMetadata: object expected"); + message.versusMetadata = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.fromObject(object.versusMetadata); + } + if (object.terminalMetadata != null) { + if (typeof object.terminalMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.terminalMetadata: object expected"); + message.terminalMetadata = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.fromObject(object.terminalMetadata); + } + if (object.acquiringVsStarMetadata != null) { + if (typeof object.acquiringVsStarMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.acquiringVsStarMetadata: object expected"); + message.acquiringVsStarMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.fromObject(object.acquiringVsStarMetadata); + } + if (object.acquiringAuraMotifMetadata != null) { + if (typeof object.acquiringAuraMotifMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.acquiringAuraMotifMetadata: object expected"); + message.acquiringAuraMotifMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.fromObject(object.acquiringAuraMotifMetadata); + } + if (object.ghostRegionMapMetadata != null) { + if (typeof object.ghostRegionMapMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.ghostRegionMapMetadata: object expected"); + message.ghostRegionMapMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.fromObject(object.ghostRegionMapMetadata); + } + if (object.acquiringCrownMetadata != null) { + if (typeof object.acquiringCrownMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.acquiringCrownMetadata: object expected"); + message.acquiringCrownMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.fromObject(object.acquiringCrownMetadata); + } + if (object.competitionResultMetadata != null) { + if (typeof object.competitionResultMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.competitionResultMetadata: object expected"); + message.competitionResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.fromObject(object.competitionResultMetadata); + } + if (object.timeAttackResultMetadata != null) { + if (typeof object.timeAttackResultMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.timeAttackResultMetadata: object expected"); + message.timeAttackResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.fromObject(object.timeAttackResultMetadata); + } + if (object.levelUpMetadata != null) { + if (typeof object.levelUpMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.levelUpMetadata: object expected"); + message.levelUpMetadata = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.fromObject(object.levelUpMetadata); + } + return message; + }; + + /** + * Creates a plain object from a SaveScreenshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.SaveScreenshotRequest} message SaveScreenshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScreenshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.timestamp = 0; + object.imageType = options.enums === String ? "SS_GHOST_BATTLE" : 1; + if (options.bytes === String) + object.image = ""; + else { + object.image = []; + if (options.bytes !== Array) + object.image = $util.newBuffer(object.image); + } + object.ghostMetadata = null; + object.versusMetadata = null; + object.terminalMetadata = null; + object.transparent = false; + object.playedAt = 0; + object.acquiringVsStarMetadata = null; + object.acquiringAuraMotifMetadata = null; + object.ghostRegionMapMetadata = null; + object.acquiringCrownMetadata = null; + object.competitionResultMetadata = null; + object.timeAttackResultMetadata = null; + object.levelUpMetadata = null; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + if (message.imageType != null && message.hasOwnProperty("imageType")) + object.imageType = options.enums === String ? $root.wm.protobuf.ScreenshotType[message.imageType] : message.imageType; + if (message.image != null && message.hasOwnProperty("image")) + object.image = options.bytes === String ? $util.base64.encode(message.image, 0, message.image.length) : options.bytes === Array ? Array.prototype.slice.call(message.image) : message.image; + if (message.ghostMetadata != null && message.hasOwnProperty("ghostMetadata")) + object.ghostMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.toObject(message.ghostMetadata, options); + if (message.versusMetadata != null && message.hasOwnProperty("versusMetadata")) + object.versusMetadata = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.toObject(message.versusMetadata, options); + if (message.terminalMetadata != null && message.hasOwnProperty("terminalMetadata")) + object.terminalMetadata = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.toObject(message.terminalMetadata, options); + if (message.transparent != null && message.hasOwnProperty("transparent")) + object.transparent = message.transparent; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.acquiringVsStarMetadata != null && message.hasOwnProperty("acquiringVsStarMetadata")) + object.acquiringVsStarMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.toObject(message.acquiringVsStarMetadata, options); + if (message.acquiringAuraMotifMetadata != null && message.hasOwnProperty("acquiringAuraMotifMetadata")) + object.acquiringAuraMotifMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.toObject(message.acquiringAuraMotifMetadata, options); + if (message.ghostRegionMapMetadata != null && message.hasOwnProperty("ghostRegionMapMetadata")) + object.ghostRegionMapMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.toObject(message.ghostRegionMapMetadata, options); + if (message.acquiringCrownMetadata != null && message.hasOwnProperty("acquiringCrownMetadata")) + object.acquiringCrownMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.toObject(message.acquiringCrownMetadata, options); + if (message.competitionResultMetadata != null && message.hasOwnProperty("competitionResultMetadata")) + object.competitionResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.toObject(message.competitionResultMetadata, options); + if (message.timeAttackResultMetadata != null && message.hasOwnProperty("timeAttackResultMetadata")) + object.timeAttackResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.toObject(message.timeAttackResultMetadata, options); + if (message.levelUpMetadata != null && message.hasOwnProperty("levelUpMetadata")) + object.levelUpMetadata = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.toObject(message.levelUpMetadata, options); + return object; + }; + + /** + * Converts this SaveScreenshotRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + * @returns {Object.} JSON object + */ + SaveScreenshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScreenshotRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScreenshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest"; + }; + + SaveScreenshotRequest.GhostBattleMetadata = (function() { + + /** + * Properties of a GhostBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IGhostBattleMetadata + * @property {number} tunePower GhostBattleMetadata tunePower + * @property {number} tuneHandling GhostBattleMetadata tuneHandling + * @property {number} area GhostBattleMetadata area + * @property {number} stampReturnCount GhostBattleMetadata stampReturnCount + * @property {Array.|null} [opponents] GhostBattleMetadata opponents + */ + + /** + * Constructs a new GhostBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a GhostBattleMetadata. + * @implements IGhostBattleMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata=} [properties] Properties to set + */ + function GhostBattleMetadata(properties) { + this.opponents = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.tunePower = 0; + + /** + * GhostBattleMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.tuneHandling = 0; + + /** + * GhostBattleMetadata area. + * @member {number} area + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.area = 0; + + /** + * GhostBattleMetadata stampReturnCount. + * @member {number} stampReturnCount + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.stampReturnCount = 0; + + /** + * GhostBattleMetadata opponents. + * @member {Array.} opponents + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.opponents = $util.emptyArray; + + /** + * Creates a new GhostBattleMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata instance + */ + GhostBattleMetadata.create = function create(properties) { + return new GhostBattleMetadata(properties); + }; + + /** + * Encodes the specified GhostBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata} message GhostBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stampReturnCount); + if (message.opponents != null && message.opponents.length) + for (let i = 0; i < message.opponents.length; ++i) + $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.encode(message.opponents[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata} message GhostBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + case 4: { + message.stampReturnCount = reader.uint32(); + break; + } + case 6: { + if (!(message.opponents && message.opponents.length)) + message.opponents = []; + message.opponents.push($root.wm.protobuf.SaveScreenshotRequest.OpponentCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("stampReturnCount")) + throw $util.ProtocolError("missing required 'stampReturnCount'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.stampReturnCount)) + return "stampReturnCount: integer expected"; + if (message.opponents != null && message.hasOwnProperty("opponents")) { + if (!Array.isArray(message.opponents)) + return "opponents: array expected"; + for (let i = 0; i < message.opponents.length; ++i) { + let error = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.verify(message.opponents[i]); + if (error) + return "opponents." + error; + } + } + return null; + }; + + /** + * Creates a GhostBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata + */ + GhostBattleMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.stampReturnCount != null) + message.stampReturnCount = object.stampReturnCount >>> 0; + if (object.opponents) { + if (!Array.isArray(object.opponents)) + throw TypeError(".wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.opponents: array expected"); + message.opponents = []; + for (let i = 0; i < object.opponents.length; ++i) { + if (typeof object.opponents[i] !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.opponents: object expected"); + message.opponents[i] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.fromObject(object.opponents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GhostBattleMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} message GhostBattleMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.opponents = []; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.area = 0; + object.stampReturnCount = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.stampReturnCount != null && message.hasOwnProperty("stampReturnCount")) + object.stampReturnCount = message.stampReturnCount; + if (message.opponents && message.opponents.length) { + object.opponents = []; + for (let j = 0; j < message.opponents.length; ++j) + object.opponents[j] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.toObject(message.opponents[j], options); + } + return object; + }; + + /** + * Converts this GhostBattleMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + * @returns {Object.} JSON object + */ + GhostBattleMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata"; + }; + + return GhostBattleMetadata; + })(); + + SaveScreenshotRequest.VersusBattleMetadata = (function() { + + /** + * Properties of a VersusBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IVersusBattleMetadata + * @property {number} tunePower VersusBattleMetadata tunePower + * @property {number} tuneHandling VersusBattleMetadata tuneHandling + * @property {number} area VersusBattleMetadata area + * @property {Array.|null} [opponents] VersusBattleMetadata opponents + */ + + /** + * Constructs a new VersusBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a VersusBattleMetadata. + * @implements IVersusBattleMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata=} [properties] Properties to set + */ + function VersusBattleMetadata(properties) { + this.opponents = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersusBattleMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.tunePower = 0; + + /** + * VersusBattleMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.tuneHandling = 0; + + /** + * VersusBattleMetadata area. + * @member {number} area + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.area = 0; + + /** + * VersusBattleMetadata opponents. + * @member {Array.} opponents + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.opponents = $util.emptyArray; + + /** + * Creates a new VersusBattleMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata instance + */ + VersusBattleMetadata.create = function create(properties) { + return new VersusBattleMetadata(properties); + }; + + /** + * Encodes the specified VersusBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata} message VersusBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + if (message.opponents != null && message.opponents.length) + for (let i = 0; i < message.opponents.length; ++i) + $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.encode(message.opponents[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VersusBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata} message VersusBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + case 4: { + if (!(message.opponents && message.opponents.length)) + message.opponents = []; + message.opponents.push($root.wm.protobuf.SaveScreenshotRequest.OpponentCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersusBattleMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersusBattleMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (message.opponents != null && message.hasOwnProperty("opponents")) { + if (!Array.isArray(message.opponents)) + return "opponents: array expected"; + for (let i = 0; i < message.opponents.length; ++i) { + let error = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.verify(message.opponents[i]); + if (error) + return "opponents." + error; + } + } + return null; + }; + + /** + * Creates a VersusBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata + */ + VersusBattleMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.opponents) { + if (!Array.isArray(object.opponents)) + throw TypeError(".wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.opponents: array expected"); + message.opponents = []; + for (let i = 0; i < object.opponents.length; ++i) { + if (typeof object.opponents[i] !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.opponents: object expected"); + message.opponents[i] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.fromObject(object.opponents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a VersusBattleMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} message VersusBattleMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersusBattleMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.opponents = []; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.area = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.opponents && message.opponents.length) { + object.opponents = []; + for (let j = 0; j < message.opponents.length; ++j) + object.opponents[j] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.toObject(message.opponents[j], options); + } + return object; + }; + + /** + * Converts this VersusBattleMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + * @returns {Object.} JSON object + */ + VersusBattleMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VersusBattleMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VersusBattleMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata"; + }; + + return VersusBattleMetadata; + })(); + + SaveScreenshotRequest.TerminalMetadata = (function() { + + /** + * Properties of a TerminalMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface ITerminalMetadata + * @property {number} tunePower TerminalMetadata tunePower + * @property {number} tuneHandling TerminalMetadata tuneHandling + * @property {string} name TerminalMetadata name + * @property {string} title TerminalMetadata title + * @property {number} level TerminalMetadata level + */ + + /** + * Constructs a new TerminalMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a TerminalMetadata. + * @implements ITerminalMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata=} [properties] Properties to set + */ + function TerminalMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerminalMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.tunePower = 0; + + /** + * TerminalMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.tuneHandling = 0; + + /** + * TerminalMetadata name. + * @member {string} name + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.name = ""; + + /** + * TerminalMetadata title. + * @member {string} title + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.title = ""; + + /** + * TerminalMetadata level. + * @member {number} level + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.level = 0; + + /** + * Creates a new TerminalMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata instance + */ + TerminalMetadata.create = function create(properties) { + return new TerminalMetadata(properties); + }; + + /** + * Encodes the specified TerminalMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata} message TerminalMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.title); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.level); + return writer; + }; + + /** + * Encodes the specified TerminalMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata} message TerminalMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + case 4: { + message.title = reader.string(); + break; + } + case 5: { + message.level = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("name")) + throw $util.ProtocolError("missing required 'name'", { instance: message }); + if (!message.hasOwnProperty("title")) + throw $util.ProtocolError("missing required 'title'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + return message; + }; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerminalMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerminalMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isString(message.name)) + return "name: string expected"; + if (!$util.isString(message.title)) + return "title: string expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + return null; + }; + + /** + * Creates a TerminalMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata + */ + TerminalMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.title != null) + message.title = String(object.title); + if (object.level != null) + message.level = object.level >>> 0; + return message; + }; + + /** + * Creates a plain object from a TerminalMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} message TerminalMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerminalMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.name = ""; + object.title = ""; + object.level = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + return object; + }; + + /** + * Converts this TerminalMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + * @returns {Object.} JSON object + */ + TerminalMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerminalMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerminalMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.TerminalMetadata"; + }; + + return TerminalMetadata; + })(); + + SaveScreenshotRequest.AcquiringVersusStarMetadata = (function() { + + /** + * Properties of an AcquiringVersusStarMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IAcquiringVersusStarMetadata + * @property {number} tunePower AcquiringVersusStarMetadata tunePower + * @property {number} tuneHandling AcquiringVersusStarMetadata tuneHandling + * @property {number} vsStarCount AcquiringVersusStarMetadata vsStarCount + */ + + /** + * Constructs a new AcquiringVersusStarMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an AcquiringVersusStarMetadata. + * @implements IAcquiringVersusStarMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata=} [properties] Properties to set + */ + function AcquiringVersusStarMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcquiringVersusStarMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + */ + AcquiringVersusStarMetadata.prototype.tunePower = 0; + + /** + * AcquiringVersusStarMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + */ + AcquiringVersusStarMetadata.prototype.tuneHandling = 0; + + /** + * AcquiringVersusStarMetadata vsStarCount. + * @member {number} vsStarCount + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + */ + AcquiringVersusStarMetadata.prototype.vsStarCount = 0; + + /** + * Creates a new AcquiringVersusStarMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata instance + */ + AcquiringVersusStarMetadata.create = function create(properties) { + return new AcquiringVersusStarMetadata(properties); + }; + + /** + * Encodes the specified AcquiringVersusStarMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata} message AcquiringVersusStarMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringVersusStarMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.vsStarCount); + return writer; + }; + + /** + * Encodes the specified AcquiringVersusStarMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata} message AcquiringVersusStarMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringVersusStarMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringVersusStarMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.vsStarCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("vsStarCount")) + throw $util.ProtocolError("missing required 'vsStarCount'", { instance: message }); + return message; + }; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringVersusStarMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcquiringVersusStarMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcquiringVersusStarMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.vsStarCount)) + return "vsStarCount: integer expected"; + return null; + }; + + /** + * Creates an AcquiringVersusStarMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata + */ + AcquiringVersusStarMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.vsStarCount != null) + message.vsStarCount = object.vsStarCount >>> 0; + return message; + }; + + /** + * Creates a plain object from an AcquiringVersusStarMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} message AcquiringVersusStarMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcquiringVersusStarMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.vsStarCount = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + object.vsStarCount = message.vsStarCount; + return object; + }; + + /** + * Converts this AcquiringVersusStarMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + * @returns {Object.} JSON object + */ + AcquiringVersusStarMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcquiringVersusStarMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcquiringVersusStarMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata"; + }; + + return AcquiringVersusStarMetadata; + })(); + + SaveScreenshotRequest.AcquiringAuraMotifMetadata = (function() { + + /** + * Properties of an AcquiringAuraMotifMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IAcquiringAuraMotifMetadata + * @property {number} tunePower AcquiringAuraMotifMetadata tunePower + * @property {number} tuneHandling AcquiringAuraMotifMetadata tuneHandling + * @property {number} auraMotif AcquiringAuraMotifMetadata auraMotif + */ + + /** + * Constructs a new AcquiringAuraMotifMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an AcquiringAuraMotifMetadata. + * @implements IAcquiringAuraMotifMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata=} [properties] Properties to set + */ + function AcquiringAuraMotifMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcquiringAuraMotifMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + */ + AcquiringAuraMotifMetadata.prototype.tunePower = 0; + + /** + * AcquiringAuraMotifMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + */ + AcquiringAuraMotifMetadata.prototype.tuneHandling = 0; + + /** + * AcquiringAuraMotifMetadata auraMotif. + * @member {number} auraMotif + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + */ + AcquiringAuraMotifMetadata.prototype.auraMotif = 0; + + /** + * Creates a new AcquiringAuraMotifMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata instance + */ + AcquiringAuraMotifMetadata.create = function create(properties) { + return new AcquiringAuraMotifMetadata(properties); + }; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata} message AcquiringAuraMotifMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringAuraMotifMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.auraMotif); + return writer; + }; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata} message AcquiringAuraMotifMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringAuraMotifMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringAuraMotifMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.auraMotif = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("auraMotif")) + throw $util.ProtocolError("missing required 'auraMotif'", { instance: message }); + return message; + }; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringAuraMotifMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcquiringAuraMotifMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcquiringAuraMotifMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.auraMotif)) + return "auraMotif: integer expected"; + return null; + }; + + /** + * Creates an AcquiringAuraMotifMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata + */ + AcquiringAuraMotifMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.auraMotif != null) + message.auraMotif = object.auraMotif >>> 0; + return message; + }; + + /** + * Creates a plain object from an AcquiringAuraMotifMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} message AcquiringAuraMotifMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcquiringAuraMotifMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.auraMotif = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.auraMotif != null && message.hasOwnProperty("auraMotif")) + object.auraMotif = message.auraMotif; + return object; + }; + + /** + * Converts this AcquiringAuraMotifMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + * @returns {Object.} JSON object + */ + AcquiringAuraMotifMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcquiringAuraMotifMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcquiringAuraMotifMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata"; + }; + + return AcquiringAuraMotifMetadata; + })(); + + SaveScreenshotRequest.GhostRegionMapMetadata = (function() { + + /** + * Properties of a GhostRegionMapMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IGhostRegionMapMetadata + * @property {number} tunePower GhostRegionMapMetadata tunePower + * @property {number} tuneHandling GhostRegionMapMetadata tuneHandling + * @property {number} rgScore GhostRegionMapMetadata rgScore + * @property {Array.|null} [rgRegionMapScore] GhostRegionMapMetadata rgRegionMapScore + */ + + /** + * Constructs a new GhostRegionMapMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a GhostRegionMapMetadata. + * @implements IGhostRegionMapMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata=} [properties] Properties to set + */ + function GhostRegionMapMetadata(properties) { + this.rgRegionMapScore = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostRegionMapMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.tunePower = 0; + + /** + * GhostRegionMapMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.tuneHandling = 0; + + /** + * GhostRegionMapMetadata rgScore. + * @member {number} rgScore + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.rgScore = 0; + + /** + * GhostRegionMapMetadata rgRegionMapScore. + * @member {Array.} rgRegionMapScore + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.rgRegionMapScore = $util.emptyArray; + + /** + * Creates a new GhostRegionMapMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata instance + */ + GhostRegionMapMetadata.create = function create(properties) { + return new GhostRegionMapMetadata(properties); + }; + + /** + * Encodes the specified GhostRegionMapMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata} message GhostRegionMapMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostRegionMapMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rgScore); + if (message.rgRegionMapScore != null && message.rgRegionMapScore.length) + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.rgRegionMapScore[i]); + return writer; + }; + + /** + * Encodes the specified GhostRegionMapMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata} message GhostRegionMapMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostRegionMapMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostRegionMapMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.rgScore = reader.uint32(); + break; + } + case 4: { + if (!(message.rgRegionMapScore && message.rgRegionMapScore.length)) + message.rgRegionMapScore = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegionMapScore.push(reader.uint32()); + } else + message.rgRegionMapScore.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("rgScore")) + throw $util.ProtocolError("missing required 'rgScore'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostRegionMapMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostRegionMapMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostRegionMapMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.rgScore)) + return "rgScore: integer expected"; + if (message.rgRegionMapScore != null && message.hasOwnProperty("rgRegionMapScore")) { + if (!Array.isArray(message.rgRegionMapScore)) + return "rgRegionMapScore: array expected"; + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + if (!$util.isInteger(message.rgRegionMapScore[i])) + return "rgRegionMapScore: integer[] expected"; + } + return null; + }; + + /** + * Creates a GhostRegionMapMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata + */ + GhostRegionMapMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.rgScore != null) + message.rgScore = object.rgScore >>> 0; + if (object.rgRegionMapScore) { + if (!Array.isArray(object.rgRegionMapScore)) + throw TypeError(".wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.rgRegionMapScore: array expected"); + message.rgRegionMapScore = []; + for (let i = 0; i < object.rgRegionMapScore.length; ++i) + message.rgRegionMapScore[i] = object.rgRegionMapScore[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a GhostRegionMapMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} message GhostRegionMapMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostRegionMapMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.rgRegionMapScore = []; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.rgScore = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.rgScore != null && message.hasOwnProperty("rgScore")) + object.rgScore = message.rgScore; + if (message.rgRegionMapScore && message.rgRegionMapScore.length) { + object.rgRegionMapScore = []; + for (let j = 0; j < message.rgRegionMapScore.length; ++j) + object.rgRegionMapScore[j] = message.rgRegionMapScore[j]; + } + return object; + }; + + /** + * Converts this GhostRegionMapMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + * @returns {Object.} JSON object + */ + GhostRegionMapMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostRegionMapMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostRegionMapMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata"; + }; + + return GhostRegionMapMetadata; + })(); + + SaveScreenshotRequest.AcquiringCrownMetadata = (function() { + + /** + * Properties of an AcquiringCrownMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IAcquiringCrownMetadata + * @property {number} tunePower AcquiringCrownMetadata tunePower + * @property {number} tuneHandling AcquiringCrownMetadata tuneHandling + * @property {number} area AcquiringCrownMetadata area + */ + + /** + * Constructs a new AcquiringCrownMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an AcquiringCrownMetadata. + * @implements IAcquiringCrownMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata=} [properties] Properties to set + */ + function AcquiringCrownMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcquiringCrownMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + */ + AcquiringCrownMetadata.prototype.tunePower = 0; + + /** + * AcquiringCrownMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + */ + AcquiringCrownMetadata.prototype.tuneHandling = 0; + + /** + * AcquiringCrownMetadata area. + * @member {number} area + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + */ + AcquiringCrownMetadata.prototype.area = 0; + + /** + * Creates a new AcquiringCrownMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata instance + */ + AcquiringCrownMetadata.create = function create(properties) { + return new AcquiringCrownMetadata(properties); + }; + + /** + * Encodes the specified AcquiringCrownMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata} message AcquiringCrownMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringCrownMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + return writer; + }; + + /** + * Encodes the specified AcquiringCrownMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata} message AcquiringCrownMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringCrownMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringCrownMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringCrownMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcquiringCrownMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcquiringCrownMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + return null; + }; + + /** + * Creates an AcquiringCrownMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata + */ + AcquiringCrownMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + return message; + }; + + /** + * Creates a plain object from an AcquiringCrownMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} message AcquiringCrownMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcquiringCrownMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.area = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + return object; + }; + + /** + * Converts this AcquiringCrownMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + * @returns {Object.} JSON object + */ + AcquiringCrownMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcquiringCrownMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcquiringCrownMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata"; + }; + + return AcquiringCrownMetadata; + })(); + + SaveScreenshotRequest.GhostCompetitionResultMetadata = (function() { + + /** + * Properties of a GhostCompetitionResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IGhostCompetitionResultMetadata + * @property {number} tunePower GhostCompetitionResultMetadata tunePower + * @property {number} tuneHandling GhostCompetitionResultMetadata tuneHandling + * @property {number|null} [rank] GhostCompetitionResultMetadata rank + * @property {number} result GhostCompetitionResultMetadata result + */ + + /** + * Constructs a new GhostCompetitionResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a GhostCompetitionResultMetadata. + * @implements IGhostCompetitionResultMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata=} [properties] Properties to set + */ + function GhostCompetitionResultMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionResultMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.tunePower = 0; + + /** + * GhostCompetitionResultMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.tuneHandling = 0; + + /** + * GhostCompetitionResultMetadata rank. + * @member {number} rank + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.rank = 0; + + /** + * GhostCompetitionResultMetadata result. + * @member {number} result + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.result = 0; + + /** + * Creates a new GhostCompetitionResultMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata instance + */ + GhostCompetitionResultMetadata.create = function create(properties) { + return new GhostCompetitionResultMetadata(properties); + }; + + /** + * Encodes the specified GhostCompetitionResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata} message GhostCompetitionResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionResultMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rank); + writer.uint32(/* id 4, wireType 0 =*/32).sint32(message.result); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata} message GhostCompetitionResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionResultMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionResultMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.rank = reader.uint32(); + break; + } + case 4: { + message.result = reader.sint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionResultMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionResultMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionResultMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.rank != null && message.hasOwnProperty("rank")) + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + return null; + }; + + /** + * Creates a GhostCompetitionResultMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata + */ + GhostCompetitionResultMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.rank != null) + message.rank = object.rank >>> 0; + if (object.result != null) + message.result = object.result | 0; + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionResultMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} message GhostCompetitionResultMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionResultMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.rank = 0; + object.result = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + return object; + }; + + /** + * Converts this GhostCompetitionResultMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionResultMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionResultMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionResultMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata"; + }; + + return GhostCompetitionResultMetadata; + })(); + + SaveScreenshotRequest.TimeAttackResultMetadata = (function() { + + /** + * Properties of a TimeAttackResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface ITimeAttackResultMetadata + * @property {number} tunePower TimeAttackResultMetadata tunePower + * @property {number} tuneHandling TimeAttackResultMetadata tuneHandling + * @property {number} course TimeAttackResultMetadata course + * @property {number|null} [wholeRank] TimeAttackResultMetadata wholeRank + * @property {number|null} [modelRank] TimeAttackResultMetadata modelRank + */ + + /** + * Constructs a new TimeAttackResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a TimeAttackResultMetadata. + * @implements ITimeAttackResultMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata=} [properties] Properties to set + */ + function TimeAttackResultMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeAttackResultMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.tunePower = 0; + + /** + * TimeAttackResultMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.tuneHandling = 0; + + /** + * TimeAttackResultMetadata course. + * @member {number} course + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.course = 0; + + /** + * TimeAttackResultMetadata wholeRank. + * @member {number} wholeRank + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.wholeRank = 0; + + /** + * TimeAttackResultMetadata modelRank. + * @member {number} modelRank + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.modelRank = 0; + + /** + * Creates a new TimeAttackResultMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata instance + */ + TimeAttackResultMetadata.create = function create(properties) { + return new TimeAttackResultMetadata(properties); + }; + + /** + * Encodes the specified TimeAttackResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata} message TimeAttackResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResultMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.course); + if (message.wholeRank != null && Object.hasOwnProperty.call(message, "wholeRank")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.wholeRank); + if (message.modelRank != null && Object.hasOwnProperty.call(message, "modelRank")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.modelRank); + return writer; + }; + + /** + * Encodes the specified TimeAttackResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata} message TimeAttackResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResultMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResultMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.course = reader.uint32(); + break; + } + case 4: { + message.wholeRank = reader.uint32(); + break; + } + case 5: { + message.modelRank = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + return message; + }; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResultMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeAttackResultMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeAttackResultMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + if (!$util.isInteger(message.wholeRank)) + return "wholeRank: integer expected"; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + if (!$util.isInteger(message.modelRank)) + return "modelRank: integer expected"; + return null; + }; + + /** + * Creates a TimeAttackResultMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata + */ + TimeAttackResultMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.course != null) + message.course = object.course >>> 0; + if (object.wholeRank != null) + message.wholeRank = object.wholeRank >>> 0; + if (object.modelRank != null) + message.modelRank = object.modelRank >>> 0; + return message; + }; + + /** + * Creates a plain object from a TimeAttackResultMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} message TimeAttackResultMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeAttackResultMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.course = 0; + object.wholeRank = 0; + object.modelRank = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + object.wholeRank = message.wholeRank; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + object.modelRank = message.modelRank; + return object; + }; + + /** + * Converts this TimeAttackResultMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + * @returns {Object.} JSON object + */ + TimeAttackResultMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeAttackResultMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeAttackResultMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata"; + }; + + return TimeAttackResultMetadata; + })(); + + SaveScreenshotRequest.LevelUpMetadata = (function() { + + /** + * Properties of a LevelUpMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface ILevelUpMetadata + * @property {number} tunePower LevelUpMetadata tunePower + * @property {number} tuneHandling LevelUpMetadata tuneHandling + * @property {number} level LevelUpMetadata level + */ + + /** + * Constructs a new LevelUpMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a LevelUpMetadata. + * @implements ILevelUpMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata=} [properties] Properties to set + */ + function LevelUpMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LevelUpMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + */ + LevelUpMetadata.prototype.tunePower = 0; + + /** + * LevelUpMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + */ + LevelUpMetadata.prototype.tuneHandling = 0; + + /** + * LevelUpMetadata level. + * @member {number} level + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + */ + LevelUpMetadata.prototype.level = 0; + + /** + * Creates a new LevelUpMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata instance + */ + LevelUpMetadata.create = function create(properties) { + return new LevelUpMetadata(properties); + }; + + /** + * Encodes the specified LevelUpMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata} message LevelUpMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LevelUpMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.level); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tunePower); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuneHandling); + return writer; + }; + + /** + * Encodes the specified LevelUpMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata} message LevelUpMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LevelUpMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LevelUpMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.tunePower = reader.uint32(); + break; + } + case 3: { + message.tuneHandling = reader.uint32(); + break; + } + case 1: { + message.level = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + return message; + }; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LevelUpMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LevelUpMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LevelUpMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + return null; + }; + + /** + * Creates a LevelUpMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata + */ + LevelUpMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.level != null) + message.level = object.level >>> 0; + return message; + }; + + /** + * Creates a plain object from a LevelUpMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} message LevelUpMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LevelUpMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.level = 0; + object.tunePower = 0; + object.tuneHandling = 0; + } + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + return object; + }; + + /** + * Converts this LevelUpMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + * @returns {Object.} JSON object + */ + LevelUpMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LevelUpMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LevelUpMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.LevelUpMetadata"; + }; + + return LevelUpMetadata; + })(); + + SaveScreenshotRequest.OpponentCar = (function() { + + /** + * Properties of an OpponentCar. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IOpponentCar + * @property {number|null} [carId] OpponentCar carId + * @property {number} tunePower OpponentCar tunePower + * @property {number} tuneHandling OpponentCar tuneHandling + */ + + /** + * Constructs a new OpponentCar. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an OpponentCar. + * @implements IOpponentCar + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar=} [properties] Properties to set + */ + function OpponentCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OpponentCar carId. + * @member {number} carId + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + */ + OpponentCar.prototype.carId = 0; + + /** + * OpponentCar tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + */ + OpponentCar.prototype.tunePower = 0; + + /** + * OpponentCar tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + */ + OpponentCar.prototype.tuneHandling = 0; + + /** + * Creates a new OpponentCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar instance + */ + OpponentCar.create = function create(properties) { + return new OpponentCar(properties); + }; + + /** + * Encodes the specified OpponentCar message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar} message OpponentCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpponentCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tunePower); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuneHandling); + return writer; + }; + + /** + * Encodes the specified OpponentCar message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar} message OpponentCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpponentCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OpponentCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpponentCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.OpponentCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.tunePower = reader.uint32(); + break; + } + case 3: { + message.tuneHandling = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes an OpponentCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpponentCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpponentCar message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpponentCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + return null; + }; + + /** + * Creates an OpponentCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar + */ + OpponentCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.OpponentCar) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.OpponentCar(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + return message; + }; + + /** + * Creates a plain object from an OpponentCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.OpponentCar} message OpponentCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpponentCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.tunePower = 0; + object.tuneHandling = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + return object; + }; + + /** + * Converts this OpponentCar to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + * @returns {Object.} JSON object + */ + OpponentCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpponentCar + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpponentCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.OpponentCar"; + }; + + return OpponentCar; + })(); + + return SaveScreenshotRequest; + })(); + + protobuf.SaveScreenshotResponse = (function() { + + /** + * Properties of a SaveScreenshotResponse. + * @memberof wm.protobuf + * @interface ISaveScreenshotResponse + * @property {wm.protobuf.ErrorCode} error SaveScreenshotResponse error + */ + + /** + * Constructs a new SaveScreenshotResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveScreenshotResponse. + * @implements ISaveScreenshotResponse + * @constructor + * @param {wm.protobuf.ISaveScreenshotResponse=} [properties] Properties to set + */ + function SaveScreenshotResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScreenshotResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveScreenshotResponse + * @instance + */ + SaveScreenshotResponse.prototype.error = 0; + + /** + * Creates a new SaveScreenshotResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.ISaveScreenshotResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse instance + */ + SaveScreenshotResponse.create = function create(properties) { + return new SaveScreenshotResponse(properties); + }; + + /** + * Encodes the specified SaveScreenshotResponse message. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.ISaveScreenshotResponse} message SaveScreenshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveScreenshotResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.ISaveScreenshotResponse} message SaveScreenshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScreenshotResponse message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScreenshotResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveScreenshotResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse + */ + SaveScreenshotResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotResponse) + return object; + let message = new $root.wm.protobuf.SaveScreenshotResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveScreenshotResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.SaveScreenshotResponse} message SaveScreenshotResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScreenshotResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveScreenshotResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotResponse + * @instance + * @returns {Object.} JSON object + */ + SaveScreenshotResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScreenshotResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScreenshotResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotResponse"; + }; + + return SaveScreenshotResponse; + })(); + + protobuf.SubmitClientLogRequest = (function() { + + /** + * Properties of a SubmitClientLogRequest. + * @memberof wm.protobuf + * @interface ISubmitClientLogRequest + * @property {Uint8Array} data SubmitClientLogRequest data + * @property {number} modifiedAt SubmitClientLogRequest modifiedAt + * @property {wm.protobuf.ClientLogType} logType SubmitClientLogRequest logType + */ + + /** + * Constructs a new SubmitClientLogRequest. + * @memberof wm.protobuf + * @classdesc Represents a SubmitClientLogRequest. + * @implements ISubmitClientLogRequest + * @constructor + * @param {wm.protobuf.ISubmitClientLogRequest=} [properties] Properties to set + */ + function SubmitClientLogRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubmitClientLogRequest data. + * @member {Uint8Array} data + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + */ + SubmitClientLogRequest.prototype.data = $util.newBuffer([]); + + /** + * SubmitClientLogRequest modifiedAt. + * @member {number} modifiedAt + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + */ + SubmitClientLogRequest.prototype.modifiedAt = 0; + + /** + * SubmitClientLogRequest logType. + * @member {wm.protobuf.ClientLogType} logType + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + */ + SubmitClientLogRequest.prototype.logType = 0; + + /** + * Creates a new SubmitClientLogRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.ISubmitClientLogRequest=} [properties] Properties to set + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest instance + */ + SubmitClientLogRequest.create = function create(properties) { + return new SubmitClientLogRequest(properties); + }; + + /** + * Encodes the specified SubmitClientLogRequest message. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.ISubmitClientLogRequest} message SubmitClientLogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.modifiedAt); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.logType); + return writer; + }; + + /** + * Encodes the specified SubmitClientLogRequest message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.ISubmitClientLogRequest} message SubmitClientLogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SubmitClientLogRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.data = reader.bytes(); + break; + } + case 2: { + message.modifiedAt = reader.uint32(); + break; + } + case 3: { + message.logType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("data")) + throw $util.ProtocolError("missing required 'data'", { instance: message }); + if (!message.hasOwnProperty("modifiedAt")) + throw $util.ProtocolError("missing required 'modifiedAt'", { instance: message }); + if (!message.hasOwnProperty("logType")) + throw $util.ProtocolError("missing required 'logType'", { instance: message }); + return message; + }; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubmitClientLogRequest message. + * @function verify + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubmitClientLogRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (!$util.isInteger(message.modifiedAt)) + return "modifiedAt: integer expected"; + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a SubmitClientLogRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest + */ + SubmitClientLogRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SubmitClientLogRequest) + return object; + let message = new $root.wm.protobuf.SubmitClientLogRequest(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + if (object.modifiedAt != null) + message.modifiedAt = object.modifiedAt >>> 0; + switch (object.logType) { + case "LOG_LOAD_REPORT": + case 0: + message.logType = 0; + break; + case "LOG_ERROR": + case 1: + message.logType = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a SubmitClientLogRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.SubmitClientLogRequest} message SubmitClientLogRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubmitClientLogRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.modifiedAt = 0; + object.logType = options.enums === String ? "LOG_LOAD_REPORT" : 0; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.modifiedAt != null && message.hasOwnProperty("modifiedAt")) + object.modifiedAt = message.modifiedAt; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = options.enums === String ? $root.wm.protobuf.ClientLogType[message.logType] : message.logType; + return object; + }; + + /** + * Converts this SubmitClientLogRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + * @returns {Object.} JSON object + */ + SubmitClientLogRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SubmitClientLogRequest + * @function getTypeUrl + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubmitClientLogRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SubmitClientLogRequest"; + }; + + return SubmitClientLogRequest; + })(); + + protobuf.SubmitClientLogResponse = (function() { + + /** + * Properties of a SubmitClientLogResponse. + * @memberof wm.protobuf + * @interface ISubmitClientLogResponse + * @property {wm.protobuf.ErrorCode} error SubmitClientLogResponse error + */ + + /** + * Constructs a new SubmitClientLogResponse. + * @memberof wm.protobuf + * @classdesc Represents a SubmitClientLogResponse. + * @implements ISubmitClientLogResponse + * @constructor + * @param {wm.protobuf.ISubmitClientLogResponse=} [properties] Properties to set + */ + function SubmitClientLogResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubmitClientLogResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SubmitClientLogResponse + * @instance + */ + SubmitClientLogResponse.prototype.error = 0; + + /** + * Creates a new SubmitClientLogResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.ISubmitClientLogResponse=} [properties] Properties to set + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse instance + */ + SubmitClientLogResponse.create = function create(properties) { + return new SubmitClientLogResponse(properties); + }; + + /** + * Encodes the specified SubmitClientLogResponse message. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.ISubmitClientLogResponse} message SubmitClientLogResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SubmitClientLogResponse message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.ISubmitClientLogResponse} message SubmitClientLogResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SubmitClientLogResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubmitClientLogResponse message. + * @function verify + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubmitClientLogResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SubmitClientLogResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse + */ + SubmitClientLogResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SubmitClientLogResponse) + return object; + let message = new $root.wm.protobuf.SubmitClientLogResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SubmitClientLogResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.SubmitClientLogResponse} message SubmitClientLogResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubmitClientLogResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SubmitClientLogResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SubmitClientLogResponse + * @instance + * @returns {Object.} JSON object + */ + SubmitClientLogResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SubmitClientLogResponse + * @function getTypeUrl + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubmitClientLogResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SubmitClientLogResponse"; + }; + + return SubmitClientLogResponse; + })(); + + protobuf.LoadScratchInformationRequest = (function() { + + /** + * Properties of a LoadScratchInformationRequest. + * @memberof wm.protobuf + * @interface ILoadScratchInformationRequest + * @property {number} userId LoadScratchInformationRequest userId + */ + + /** + * Constructs a new LoadScratchInformationRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadScratchInformationRequest. + * @implements ILoadScratchInformationRequest + * @constructor + * @param {wm.protobuf.ILoadScratchInformationRequest=} [properties] Properties to set + */ + function LoadScratchInformationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadScratchInformationRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadScratchInformationRequest + * @instance + */ + LoadScratchInformationRequest.prototype.userId = 0; + + /** + * Creates a new LoadScratchInformationRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.ILoadScratchInformationRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest instance + */ + LoadScratchInformationRequest.create = function create(properties) { + return new LoadScratchInformationRequest(properties); + }; + + /** + * Encodes the specified LoadScratchInformationRequest message. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.ILoadScratchInformationRequest} message LoadScratchInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadScratchInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.ILoadScratchInformationRequest} message LoadScratchInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadScratchInformationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadScratchInformationRequest message. + * @function verify + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadScratchInformationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadScratchInformationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest + */ + LoadScratchInformationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadScratchInformationRequest) + return object; + let message = new $root.wm.protobuf.LoadScratchInformationRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadScratchInformationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.LoadScratchInformationRequest} message LoadScratchInformationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadScratchInformationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadScratchInformationRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadScratchInformationRequest + * @instance + * @returns {Object.} JSON object + */ + LoadScratchInformationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadScratchInformationRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadScratchInformationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadScratchInformationRequest"; + }; + + return LoadScratchInformationRequest; + })(); + + protobuf.LoadScratchInformationResponse = (function() { + + /** + * Properties of a LoadScratchInformationResponse. + * @memberof wm.protobuf + * @interface ILoadScratchInformationResponse + * @property {wm.protobuf.ErrorCode} error LoadScratchInformationResponse error + * @property {Array.|null} [scratchSheets] LoadScratchInformationResponse scratchSheets + * @property {number} currentSheet LoadScratchInformationResponse currentSheet + * @property {number} numOfScratched LoadScratchInformationResponse numOfScratched + * @property {Array.|null} [ownedUserItems] LoadScratchInformationResponse ownedUserItems + */ + + /** + * Constructs a new LoadScratchInformationResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadScratchInformationResponse. + * @implements ILoadScratchInformationResponse + * @constructor + * @param {wm.protobuf.ILoadScratchInformationResponse=} [properties] Properties to set + */ + function LoadScratchInformationResponse(properties) { + this.scratchSheets = []; + this.ownedUserItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadScratchInformationResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.error = 0; + + /** + * LoadScratchInformationResponse scratchSheets. + * @member {Array.} scratchSheets + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.scratchSheets = $util.emptyArray; + + /** + * LoadScratchInformationResponse currentSheet. + * @member {number} currentSheet + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.currentSheet = 0; + + /** + * LoadScratchInformationResponse numOfScratched. + * @member {number} numOfScratched + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.numOfScratched = 0; + + /** + * LoadScratchInformationResponse ownedUserItems. + * @member {Array.} ownedUserItems + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.ownedUserItems = $util.emptyArray; + + /** + * Creates a new LoadScratchInformationResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.ILoadScratchInformationResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse instance + */ + LoadScratchInformationResponse.create = function create(properties) { + return new LoadScratchInformationResponse(properties); + }; + + /** + * Encodes the specified LoadScratchInformationResponse message. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.ILoadScratchInformationResponse} message LoadScratchInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.scratchSheets != null && message.scratchSheets.length) + for (let i = 0; i < message.scratchSheets.length; ++i) + $root.wm.protobuf.ScratchSheet.encode(message.scratchSheets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.currentSheet); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.numOfScratched); + if (message.ownedUserItems != null && message.ownedUserItems.length) + for (let i = 0; i < message.ownedUserItems.length; ++i) + $root.wm.protobuf.UserItem.encode(message.ownedUserItems[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadScratchInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.ILoadScratchInformationResponse} message LoadScratchInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadScratchInformationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.scratchSheets && message.scratchSheets.length)) + message.scratchSheets = []; + message.scratchSheets.push($root.wm.protobuf.ScratchSheet.decode(reader, reader.uint32())); + break; + } + case 3: { + message.currentSheet = reader.uint32(); + break; + } + case 4: { + message.numOfScratched = reader.uint32(); + break; + } + case 5: { + if (!(message.ownedUserItems && message.ownedUserItems.length)) + message.ownedUserItems = []; + message.ownedUserItems.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("currentSheet")) + throw $util.ProtocolError("missing required 'currentSheet'", { instance: message }); + if (!message.hasOwnProperty("numOfScratched")) + throw $util.ProtocolError("missing required 'numOfScratched'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadScratchInformationResponse message. + * @function verify + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadScratchInformationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.scratchSheets != null && message.hasOwnProperty("scratchSheets")) { + if (!Array.isArray(message.scratchSheets)) + return "scratchSheets: array expected"; + for (let i = 0; i < message.scratchSheets.length; ++i) { + let error = $root.wm.protobuf.ScratchSheet.verify(message.scratchSheets[i]); + if (error) + return "scratchSheets." + error; + } + } + if (!$util.isInteger(message.currentSheet)) + return "currentSheet: integer expected"; + if (!$util.isInteger(message.numOfScratched)) + return "numOfScratched: integer expected"; + if (message.ownedUserItems != null && message.hasOwnProperty("ownedUserItems")) { + if (!Array.isArray(message.ownedUserItems)) + return "ownedUserItems: array expected"; + for (let i = 0; i < message.ownedUserItems.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.ownedUserItems[i]); + if (error) + return "ownedUserItems." + error; + } + } + return null; + }; + + /** + * Creates a LoadScratchInformationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse + */ + LoadScratchInformationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadScratchInformationResponse) + return object; + let message = new $root.wm.protobuf.LoadScratchInformationResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.scratchSheets) { + if (!Array.isArray(object.scratchSheets)) + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.scratchSheets: array expected"); + message.scratchSheets = []; + for (let i = 0; i < object.scratchSheets.length; ++i) { + if (typeof object.scratchSheets[i] !== "object") + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.scratchSheets: object expected"); + message.scratchSheets[i] = $root.wm.protobuf.ScratchSheet.fromObject(object.scratchSheets[i]); + } + } + if (object.currentSheet != null) + message.currentSheet = object.currentSheet >>> 0; + if (object.numOfScratched != null) + message.numOfScratched = object.numOfScratched >>> 0; + if (object.ownedUserItems) { + if (!Array.isArray(object.ownedUserItems)) + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.ownedUserItems: array expected"); + message.ownedUserItems = []; + for (let i = 0; i < object.ownedUserItems.length; ++i) { + if (typeof object.ownedUserItems[i] !== "object") + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.ownedUserItems: object expected"); + message.ownedUserItems[i] = $root.wm.protobuf.UserItem.fromObject(object.ownedUserItems[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadScratchInformationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.LoadScratchInformationResponse} message LoadScratchInformationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadScratchInformationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.scratchSheets = []; + object.ownedUserItems = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.currentSheet = 0; + object.numOfScratched = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.scratchSheets && message.scratchSheets.length) { + object.scratchSheets = []; + for (let j = 0; j < message.scratchSheets.length; ++j) + object.scratchSheets[j] = $root.wm.protobuf.ScratchSheet.toObject(message.scratchSheets[j], options); + } + if (message.currentSheet != null && message.hasOwnProperty("currentSheet")) + object.currentSheet = message.currentSheet; + if (message.numOfScratched != null && message.hasOwnProperty("numOfScratched")) + object.numOfScratched = message.numOfScratched; + if (message.ownedUserItems && message.ownedUserItems.length) { + object.ownedUserItems = []; + for (let j = 0; j < message.ownedUserItems.length; ++j) + object.ownedUserItems[j] = $root.wm.protobuf.UserItem.toObject(message.ownedUserItems[j], options); + } + return object; + }; + + /** + * Converts this LoadScratchInformationResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + * @returns {Object.} JSON object + */ + LoadScratchInformationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadScratchInformationResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadScratchInformationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadScratchInformationResponse"; + }; + + return LoadScratchInformationResponse; + })(); + + protobuf.SaveScratchSheetRequest = (function() { + + /** + * Properties of a SaveScratchSheetRequest. + * @memberof wm.protobuf + * @interface ISaveScratchSheetRequest + * @property {number} timestamp SaveScratchSheetRequest timestamp + * @property {number} targetSheet SaveScratchSheetRequest targetSheet + * @property {number} targetSquare SaveScratchSheetRequest targetSquare + * @property {number} userId SaveScratchSheetRequest userId + */ + + /** + * Constructs a new SaveScratchSheetRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveScratchSheetRequest. + * @implements ISaveScratchSheetRequest + * @constructor + * @param {wm.protobuf.ISaveScratchSheetRequest=} [properties] Properties to set + */ + function SaveScratchSheetRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScratchSheetRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.timestamp = 0; + + /** + * SaveScratchSheetRequest targetSheet. + * @member {number} targetSheet + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.targetSheet = 0; + + /** + * SaveScratchSheetRequest targetSquare. + * @member {number} targetSquare + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.targetSquare = 0; + + /** + * SaveScratchSheetRequest userId. + * @member {number} userId + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.userId = 0; + + /** + * Creates a new SaveScratchSheetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.ISaveScratchSheetRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest instance + */ + SaveScratchSheetRequest.create = function create(properties) { + return new SaveScratchSheetRequest(properties); + }; + + /** + * Encodes the specified SaveScratchSheetRequest message. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.ISaveScratchSheetRequest} message SaveScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.targetSheet); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetSquare); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.userId); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified SaveScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.ISaveScratchSheetRequest} message SaveScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScratchSheetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + message.timestamp = reader.uint32(); + break; + } + case 1: { + message.targetSheet = reader.uint32(); + break; + } + case 2: { + message.targetSquare = reader.uint32(); + break; + } + case 3: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + if (!message.hasOwnProperty("targetSheet")) + throw $util.ProtocolError("missing required 'targetSheet'", { instance: message }); + if (!message.hasOwnProperty("targetSquare")) + throw $util.ProtocolError("missing required 'targetSquare'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScratchSheetRequest message. + * @function verify + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScratchSheetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (!$util.isInteger(message.targetSheet)) + return "targetSheet: integer expected"; + if (!$util.isInteger(message.targetSquare)) + return "targetSquare: integer expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a SaveScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest + */ + SaveScratchSheetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScratchSheetRequest) + return object; + let message = new $root.wm.protobuf.SaveScratchSheetRequest(); + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.targetSheet != null) + message.targetSheet = object.targetSheet >>> 0; + if (object.targetSquare != null) + message.targetSquare = object.targetSquare >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a SaveScratchSheetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.SaveScratchSheetRequest} message SaveScratchSheetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScratchSheetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.targetSheet = 0; + object.targetSquare = 0; + object.userId = 0; + object.timestamp = 0; + } + if (message.targetSheet != null && message.hasOwnProperty("targetSheet")) + object.targetSheet = message.targetSheet; + if (message.targetSquare != null && message.hasOwnProperty("targetSquare")) + object.targetSquare = message.targetSquare; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this SaveScratchSheetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + * @returns {Object.} JSON object + */ + SaveScratchSheetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScratchSheetRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScratchSheetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScratchSheetRequest"; + }; + + return SaveScratchSheetRequest; + })(); + + protobuf.SaveScratchSheetResponse = (function() { + + /** + * Properties of a SaveScratchSheetResponse. + * @memberof wm.protobuf + * @interface ISaveScratchSheetResponse + * @property {wm.protobuf.ErrorCode} error SaveScratchSheetResponse error + * @property {Array.|null} [scratchSheets] SaveScratchSheetResponse scratchSheets + * @property {number} currentSheet SaveScratchSheetResponse currentSheet + * @property {number} numOfScratched SaveScratchSheetResponse numOfScratched + * @property {wm.protobuf.IUserItem|null} [earnedItem] SaveScratchSheetResponse earnedItem + */ + + /** + * Constructs a new SaveScratchSheetResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveScratchSheetResponse. + * @implements ISaveScratchSheetResponse + * @constructor + * @param {wm.protobuf.ISaveScratchSheetResponse=} [properties] Properties to set + */ + function SaveScratchSheetResponse(properties) { + this.scratchSheets = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScratchSheetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.error = 0; + + /** + * SaveScratchSheetResponse scratchSheets. + * @member {Array.} scratchSheets + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.scratchSheets = $util.emptyArray; + + /** + * SaveScratchSheetResponse currentSheet. + * @member {number} currentSheet + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.currentSheet = 0; + + /** + * SaveScratchSheetResponse numOfScratched. + * @member {number} numOfScratched + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.numOfScratched = 0; + + /** + * SaveScratchSheetResponse earnedItem. + * @member {wm.protobuf.IUserItem|null|undefined} earnedItem + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.earnedItem = null; + + /** + * Creates a new SaveScratchSheetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.ISaveScratchSheetResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse instance + */ + SaveScratchSheetResponse.create = function create(properties) { + return new SaveScratchSheetResponse(properties); + }; + + /** + * Encodes the specified SaveScratchSheetResponse message. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.ISaveScratchSheetResponse} message SaveScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.scratchSheets != null && message.scratchSheets.length) + for (let i = 0; i < message.scratchSheets.length; ++i) + $root.wm.protobuf.ScratchSheet.encode(message.scratchSheets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.currentSheet); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.numOfScratched); + if (message.earnedItem != null && Object.hasOwnProperty.call(message, "earnedItem")) + $root.wm.protobuf.UserItem.encode(message.earnedItem, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.ISaveScratchSheetResponse} message SaveScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScratchSheetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.scratchSheets && message.scratchSheets.length)) + message.scratchSheets = []; + message.scratchSheets.push($root.wm.protobuf.ScratchSheet.decode(reader, reader.uint32())); + break; + } + case 3: { + message.currentSheet = reader.uint32(); + break; + } + case 4: { + message.numOfScratched = reader.uint32(); + break; + } + case 5: { + message.earnedItem = $root.wm.protobuf.UserItem.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("currentSheet")) + throw $util.ProtocolError("missing required 'currentSheet'", { instance: message }); + if (!message.hasOwnProperty("numOfScratched")) + throw $util.ProtocolError("missing required 'numOfScratched'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScratchSheetResponse message. + * @function verify + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScratchSheetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.scratchSheets != null && message.hasOwnProperty("scratchSheets")) { + if (!Array.isArray(message.scratchSheets)) + return "scratchSheets: array expected"; + for (let i = 0; i < message.scratchSheets.length; ++i) { + let error = $root.wm.protobuf.ScratchSheet.verify(message.scratchSheets[i]); + if (error) + return "scratchSheets." + error; + } + } + if (!$util.isInteger(message.currentSheet)) + return "currentSheet: integer expected"; + if (!$util.isInteger(message.numOfScratched)) + return "numOfScratched: integer expected"; + if (message.earnedItem != null && message.hasOwnProperty("earnedItem")) { + let error = $root.wm.protobuf.UserItem.verify(message.earnedItem); + if (error) + return "earnedItem." + error; + } + return null; + }; + + /** + * Creates a SaveScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse + */ + SaveScratchSheetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScratchSheetResponse) + return object; + let message = new $root.wm.protobuf.SaveScratchSheetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.scratchSheets) { + if (!Array.isArray(object.scratchSheets)) + throw TypeError(".wm.protobuf.SaveScratchSheetResponse.scratchSheets: array expected"); + message.scratchSheets = []; + for (let i = 0; i < object.scratchSheets.length; ++i) { + if (typeof object.scratchSheets[i] !== "object") + throw TypeError(".wm.protobuf.SaveScratchSheetResponse.scratchSheets: object expected"); + message.scratchSheets[i] = $root.wm.protobuf.ScratchSheet.fromObject(object.scratchSheets[i]); + } + } + if (object.currentSheet != null) + message.currentSheet = object.currentSheet >>> 0; + if (object.numOfScratched != null) + message.numOfScratched = object.numOfScratched >>> 0; + if (object.earnedItem != null) { + if (typeof object.earnedItem !== "object") + throw TypeError(".wm.protobuf.SaveScratchSheetResponse.earnedItem: object expected"); + message.earnedItem = $root.wm.protobuf.UserItem.fromObject(object.earnedItem); + } + return message; + }; + + /** + * Creates a plain object from a SaveScratchSheetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.SaveScratchSheetResponse} message SaveScratchSheetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScratchSheetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.scratchSheets = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.currentSheet = 0; + object.numOfScratched = 0; + object.earnedItem = null; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.scratchSheets && message.scratchSheets.length) { + object.scratchSheets = []; + for (let j = 0; j < message.scratchSheets.length; ++j) + object.scratchSheets[j] = $root.wm.protobuf.ScratchSheet.toObject(message.scratchSheets[j], options); + } + if (message.currentSheet != null && message.hasOwnProperty("currentSheet")) + object.currentSheet = message.currentSheet; + if (message.numOfScratched != null && message.hasOwnProperty("numOfScratched")) + object.numOfScratched = message.numOfScratched; + if (message.earnedItem != null && message.hasOwnProperty("earnedItem")) + object.earnedItem = $root.wm.protobuf.UserItem.toObject(message.earnedItem, options); + return object; + }; + + /** + * Converts this SaveScratchSheetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + * @returns {Object.} JSON object + */ + SaveScratchSheetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScratchSheetResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScratchSheetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScratchSheetResponse"; + }; + + return SaveScratchSheetResponse; + })(); + + protobuf.TurnScratchSheetRequest = (function() { + + /** + * Properties of a TurnScratchSheetRequest. + * @memberof wm.protobuf + * @interface ITurnScratchSheetRequest + * @property {number} userId TurnScratchSheetRequest userId + * @property {number} targetSheet TurnScratchSheetRequest targetSheet + */ + + /** + * Constructs a new TurnScratchSheetRequest. + * @memberof wm.protobuf + * @classdesc Represents a TurnScratchSheetRequest. + * @implements ITurnScratchSheetRequest + * @constructor + * @param {wm.protobuf.ITurnScratchSheetRequest=} [properties] Properties to set + */ + function TurnScratchSheetRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TurnScratchSheetRequest userId. + * @member {number} userId + * @memberof wm.protobuf.TurnScratchSheetRequest + * @instance + */ + TurnScratchSheetRequest.prototype.userId = 0; + + /** + * TurnScratchSheetRequest targetSheet. + * @member {number} targetSheet + * @memberof wm.protobuf.TurnScratchSheetRequest + * @instance + */ + TurnScratchSheetRequest.prototype.targetSheet = 0; + + /** + * Creates a new TurnScratchSheetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.ITurnScratchSheetRequest=} [properties] Properties to set + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest instance + */ + TurnScratchSheetRequest.create = function create(properties) { + return new TurnScratchSheetRequest(properties); + }; + + /** + * Encodes the specified TurnScratchSheetRequest message. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.ITurnScratchSheetRequest} message TurnScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetSheet); + return writer; + }; + + /** + * Encodes the specified TurnScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.ITurnScratchSheetRequest} message TurnScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TurnScratchSheetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.targetSheet = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("targetSheet")) + throw $util.ProtocolError("missing required 'targetSheet'", { instance: message }); + return message; + }; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TurnScratchSheetRequest message. + * @function verify + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TurnScratchSheetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.targetSheet)) + return "targetSheet: integer expected"; + return null; + }; + + /** + * Creates a TurnScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest + */ + TurnScratchSheetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TurnScratchSheetRequest) + return object; + let message = new $root.wm.protobuf.TurnScratchSheetRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.targetSheet != null) + message.targetSheet = object.targetSheet >>> 0; + return message; + }; + + /** + * Creates a plain object from a TurnScratchSheetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.TurnScratchSheetRequest} message TurnScratchSheetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TurnScratchSheetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.targetSheet = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.targetSheet != null && message.hasOwnProperty("targetSheet")) + object.targetSheet = message.targetSheet; + return object; + }; + + /** + * Converts this TurnScratchSheetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.TurnScratchSheetRequest + * @instance + * @returns {Object.} JSON object + */ + TurnScratchSheetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TurnScratchSheetRequest + * @function getTypeUrl + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TurnScratchSheetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TurnScratchSheetRequest"; + }; + + return TurnScratchSheetRequest; + })(); + + protobuf.TurnScratchSheetResponse = (function() { + + /** + * Properties of a TurnScratchSheetResponse. + * @memberof wm.protobuf + * @interface ITurnScratchSheetResponse + * @property {wm.protobuf.ErrorCode} error TurnScratchSheetResponse error + */ + + /** + * Constructs a new TurnScratchSheetResponse. + * @memberof wm.protobuf + * @classdesc Represents a TurnScratchSheetResponse. + * @implements ITurnScratchSheetResponse + * @constructor + * @param {wm.protobuf.ITurnScratchSheetResponse=} [properties] Properties to set + */ + function TurnScratchSheetResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TurnScratchSheetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.TurnScratchSheetResponse + * @instance + */ + TurnScratchSheetResponse.prototype.error = 0; + + /** + * Creates a new TurnScratchSheetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.ITurnScratchSheetResponse=} [properties] Properties to set + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse instance + */ + TurnScratchSheetResponse.create = function create(properties) { + return new TurnScratchSheetResponse(properties); + }; + + /** + * Encodes the specified TurnScratchSheetResponse message. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.ITurnScratchSheetResponse} message TurnScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified TurnScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.ITurnScratchSheetResponse} message TurnScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TurnScratchSheetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TurnScratchSheetResponse message. + * @function verify + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TurnScratchSheetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a TurnScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse + */ + TurnScratchSheetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TurnScratchSheetResponse) + return object; + let message = new $root.wm.protobuf.TurnScratchSheetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a TurnScratchSheetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.TurnScratchSheetResponse} message TurnScratchSheetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TurnScratchSheetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this TurnScratchSheetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.TurnScratchSheetResponse + * @instance + * @returns {Object.} JSON object + */ + TurnScratchSheetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TurnScratchSheetResponse + * @function getTypeUrl + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TurnScratchSheetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TurnScratchSheetResponse"; + }; + + return TurnScratchSheetResponse; + })(); + + protobuf.CheckItemReceivableCarsRequest = (function() { + + /** + * Properties of a CheckItemReceivableCarsRequest. + * @memberof wm.protobuf + * @interface ICheckItemReceivableCarsRequest + * @property {number} userId CheckItemReceivableCarsRequest userId + * @property {Array.|null} [itemsToBeEarned] CheckItemReceivableCarsRequest itemsToBeEarned + */ + + /** + * Constructs a new CheckItemReceivableCarsRequest. + * @memberof wm.protobuf + * @classdesc Represents a CheckItemReceivableCarsRequest. + * @implements ICheckItemReceivableCarsRequest + * @constructor + * @param {wm.protobuf.ICheckItemReceivableCarsRequest=} [properties] Properties to set + */ + function CheckItemReceivableCarsRequest(properties) { + this.itemsToBeEarned = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckItemReceivableCarsRequest userId. + * @member {number} userId + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @instance + */ + CheckItemReceivableCarsRequest.prototype.userId = 0; + + /** + * CheckItemReceivableCarsRequest itemsToBeEarned. + * @member {Array.} itemsToBeEarned + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @instance + */ + CheckItemReceivableCarsRequest.prototype.itemsToBeEarned = $util.emptyArray; + + /** + * Creates a new CheckItemReceivableCarsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsRequest=} [properties] Properties to set + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest instance + */ + CheckItemReceivableCarsRequest.create = function create(properties) { + return new CheckItemReceivableCarsRequest(properties); + }; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsRequest} message CheckItemReceivableCarsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.itemsToBeEarned != null && message.itemsToBeEarned.length) + for (let i = 0; i < message.itemsToBeEarned.length; ++i) + $root.wm.protobuf.UserItem.encode(message.itemsToBeEarned[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsRequest} message CheckItemReceivableCarsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CheckItemReceivableCarsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + if (!(message.itemsToBeEarned && message.itemsToBeEarned.length)) + message.itemsToBeEarned = []; + message.itemsToBeEarned.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckItemReceivableCarsRequest message. + * @function verify + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckItemReceivableCarsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.itemsToBeEarned != null && message.hasOwnProperty("itemsToBeEarned")) { + if (!Array.isArray(message.itemsToBeEarned)) + return "itemsToBeEarned: array expected"; + for (let i = 0; i < message.itemsToBeEarned.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.itemsToBeEarned[i]); + if (error) + return "itemsToBeEarned." + error; + } + } + return null; + }; + + /** + * Creates a CheckItemReceivableCarsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest + */ + CheckItemReceivableCarsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CheckItemReceivableCarsRequest) + return object; + let message = new $root.wm.protobuf.CheckItemReceivableCarsRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.itemsToBeEarned) { + if (!Array.isArray(object.itemsToBeEarned)) + throw TypeError(".wm.protobuf.CheckItemReceivableCarsRequest.itemsToBeEarned: array expected"); + message.itemsToBeEarned = []; + for (let i = 0; i < object.itemsToBeEarned.length; ++i) { + if (typeof object.itemsToBeEarned[i] !== "object") + throw TypeError(".wm.protobuf.CheckItemReceivableCarsRequest.itemsToBeEarned: object expected"); + message.itemsToBeEarned[i] = $root.wm.protobuf.UserItem.fromObject(object.itemsToBeEarned[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CheckItemReceivableCarsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.CheckItemReceivableCarsRequest} message CheckItemReceivableCarsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckItemReceivableCarsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.itemsToBeEarned = []; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.itemsToBeEarned && message.itemsToBeEarned.length) { + object.itemsToBeEarned = []; + for (let j = 0; j < message.itemsToBeEarned.length; ++j) + object.itemsToBeEarned[j] = $root.wm.protobuf.UserItem.toObject(message.itemsToBeEarned[j], options); + } + return object; + }; + + /** + * Converts this CheckItemReceivableCarsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @instance + * @returns {Object.} JSON object + */ + CheckItemReceivableCarsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckItemReceivableCarsRequest + * @function getTypeUrl + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckItemReceivableCarsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CheckItemReceivableCarsRequest"; + }; + + return CheckItemReceivableCarsRequest; + })(); + + protobuf.CheckItemReceivableCarsResponse = (function() { + + /** + * Properties of a CheckItemReceivableCarsResponse. + * @memberof wm.protobuf + * @interface ICheckItemReceivableCarsResponse + * @property {wm.protobuf.ErrorCode} error CheckItemReceivableCarsResponse error + * @property {Array.|null} [carIds] CheckItemReceivableCarsResponse carIds + */ + + /** + * Constructs a new CheckItemReceivableCarsResponse. + * @memberof wm.protobuf + * @classdesc Represents a CheckItemReceivableCarsResponse. + * @implements ICheckItemReceivableCarsResponse + * @constructor + * @param {wm.protobuf.ICheckItemReceivableCarsResponse=} [properties] Properties to set + */ + function CheckItemReceivableCarsResponse(properties) { + this.carIds = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckItemReceivableCarsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @instance + */ + CheckItemReceivableCarsResponse.prototype.error = 0; + + /** + * CheckItemReceivableCarsResponse carIds. + * @member {Array.} carIds + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @instance + */ + CheckItemReceivableCarsResponse.prototype.carIds = $util.emptyArray; + + /** + * Creates a new CheckItemReceivableCarsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsResponse=} [properties] Properties to set + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse instance + */ + CheckItemReceivableCarsResponse.create = function create(properties) { + return new CheckItemReceivableCarsResponse(properties); + }; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsResponse} message CheckItemReceivableCarsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.carIds != null && message.carIds.length) + for (let i = 0; i < message.carIds.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.carIds[i]); + return writer; + }; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsResponse} message CheckItemReceivableCarsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CheckItemReceivableCarsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.carIds && message.carIds.length)) + message.carIds = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.carIds.push(reader.uint32()); + } else + message.carIds.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckItemReceivableCarsResponse message. + * @function verify + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckItemReceivableCarsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.carIds != null && message.hasOwnProperty("carIds")) { + if (!Array.isArray(message.carIds)) + return "carIds: array expected"; + for (let i = 0; i < message.carIds.length; ++i) + if (!$util.isInteger(message.carIds[i])) + return "carIds: integer[] expected"; + } + return null; + }; + + /** + * Creates a CheckItemReceivableCarsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse + */ + CheckItemReceivableCarsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CheckItemReceivableCarsResponse) + return object; + let message = new $root.wm.protobuf.CheckItemReceivableCarsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.carIds) { + if (!Array.isArray(object.carIds)) + throw TypeError(".wm.protobuf.CheckItemReceivableCarsResponse.carIds: array expected"); + message.carIds = []; + for (let i = 0; i < object.carIds.length; ++i) + message.carIds[i] = object.carIds[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a CheckItemReceivableCarsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.CheckItemReceivableCarsResponse} message CheckItemReceivableCarsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckItemReceivableCarsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.carIds = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.carIds && message.carIds.length) { + object.carIds = []; + for (let j = 0; j < message.carIds.length; ++j) + object.carIds[j] = message.carIds[j]; + } + return object; + }; + + /** + * Converts this CheckItemReceivableCarsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @instance + * @returns {Object.} JSON object + */ + CheckItemReceivableCarsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckItemReceivableCarsResponse + * @function getTypeUrl + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckItemReceivableCarsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CheckItemReceivableCarsResponse"; + }; + + return CheckItemReceivableCarsResponse; + })(); + + protobuf.ReceiveUserItemsRequest = (function() { + + /** + * Properties of a ReceiveUserItemsRequest. + * @memberof wm.protobuf + * @interface IReceiveUserItemsRequest + * @property {number} carId ReceiveUserItemsRequest carId + * @property {Array.|null} [targetItemIds] ReceiveUserItemsRequest targetItemIds + */ + + /** + * Constructs a new ReceiveUserItemsRequest. + * @memberof wm.protobuf + * @classdesc Represents a ReceiveUserItemsRequest. + * @implements IReceiveUserItemsRequest + * @constructor + * @param {wm.protobuf.IReceiveUserItemsRequest=} [properties] Properties to set + */ + function ReceiveUserItemsRequest(properties) { + this.targetItemIds = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReceiveUserItemsRequest carId. + * @member {number} carId + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @instance + */ + ReceiveUserItemsRequest.prototype.carId = 0; + + /** + * ReceiveUserItemsRequest targetItemIds. + * @member {Array.} targetItemIds + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @instance + */ + ReceiveUserItemsRequest.prototype.targetItemIds = $util.emptyArray; + + /** + * Creates a new ReceiveUserItemsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.IReceiveUserItemsRequest=} [properties] Properties to set + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest instance + */ + ReceiveUserItemsRequest.create = function create(properties) { + return new ReceiveUserItemsRequest(properties); + }; + + /** + * Encodes the specified ReceiveUserItemsRequest message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.IReceiveUserItemsRequest} message ReceiveUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.targetItemIds != null && message.targetItemIds.length) + for (let i = 0; i < message.targetItemIds.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetItemIds[i]); + return writer; + }; + + /** + * Encodes the specified ReceiveUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.IReceiveUserItemsRequest} message ReceiveUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ReceiveUserItemsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + if (!(message.targetItemIds && message.targetItemIds.length)) + message.targetItemIds = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targetItemIds.push(reader.uint32()); + } else + message.targetItemIds.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReceiveUserItemsRequest message. + * @function verify + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReceiveUserItemsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.targetItemIds != null && message.hasOwnProperty("targetItemIds")) { + if (!Array.isArray(message.targetItemIds)) + return "targetItemIds: array expected"; + for (let i = 0; i < message.targetItemIds.length; ++i) + if (!$util.isInteger(message.targetItemIds[i])) + return "targetItemIds: integer[] expected"; + } + return null; + }; + + /** + * Creates a ReceiveUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest + */ + ReceiveUserItemsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ReceiveUserItemsRequest) + return object; + let message = new $root.wm.protobuf.ReceiveUserItemsRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.targetItemIds) { + if (!Array.isArray(object.targetItemIds)) + throw TypeError(".wm.protobuf.ReceiveUserItemsRequest.targetItemIds: array expected"); + message.targetItemIds = []; + for (let i = 0; i < object.targetItemIds.length; ++i) + message.targetItemIds[i] = object.targetItemIds[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a ReceiveUserItemsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.ReceiveUserItemsRequest} message ReceiveUserItemsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReceiveUserItemsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.targetItemIds = []; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.targetItemIds && message.targetItemIds.length) { + object.targetItemIds = []; + for (let j = 0; j < message.targetItemIds.length; ++j) + object.targetItemIds[j] = message.targetItemIds[j]; + } + return object; + }; + + /** + * Converts this ReceiveUserItemsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @instance + * @returns {Object.} JSON object + */ + ReceiveUserItemsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReceiveUserItemsRequest + * @function getTypeUrl + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReceiveUserItemsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ReceiveUserItemsRequest"; + }; + + return ReceiveUserItemsRequest; + })(); + + protobuf.ReceiveUserItemsResponse = (function() { + + /** + * Properties of a ReceiveUserItemsResponse. + * @memberof wm.protobuf + * @interface IReceiveUserItemsResponse + * @property {wm.protobuf.ErrorCode} error ReceiveUserItemsResponse error + */ + + /** + * Constructs a new ReceiveUserItemsResponse. + * @memberof wm.protobuf + * @classdesc Represents a ReceiveUserItemsResponse. + * @implements IReceiveUserItemsResponse + * @constructor + * @param {wm.protobuf.IReceiveUserItemsResponse=} [properties] Properties to set + */ + function ReceiveUserItemsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReceiveUserItemsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @instance + */ + ReceiveUserItemsResponse.prototype.error = 0; + + /** + * Creates a new ReceiveUserItemsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.IReceiveUserItemsResponse=} [properties] Properties to set + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse instance + */ + ReceiveUserItemsResponse.create = function create(properties) { + return new ReceiveUserItemsResponse(properties); + }; + + /** + * Encodes the specified ReceiveUserItemsResponse message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.IReceiveUserItemsResponse} message ReceiveUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified ReceiveUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.IReceiveUserItemsResponse} message ReceiveUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ReceiveUserItemsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReceiveUserItemsResponse message. + * @function verify + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReceiveUserItemsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a ReceiveUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse + */ + ReceiveUserItemsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ReceiveUserItemsResponse) + return object; + let message = new $root.wm.protobuf.ReceiveUserItemsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a ReceiveUserItemsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.ReceiveUserItemsResponse} message ReceiveUserItemsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReceiveUserItemsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this ReceiveUserItemsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @instance + * @returns {Object.} JSON object + */ + ReceiveUserItemsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReceiveUserItemsResponse + * @function getTypeUrl + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReceiveUserItemsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ReceiveUserItemsResponse"; + }; + + return ReceiveUserItemsResponse; + })(); + + protobuf.UpdateEventModeSerialRequest = (function() { + + /** + * Properties of an UpdateEventModeSerialRequest. + * @memberof wm.protobuf + * @interface IUpdateEventModeSerialRequest + * @property {string|null} [eventModeSerial] UpdateEventModeSerialRequest eventModeSerial + */ + + /** + * Constructs a new UpdateEventModeSerialRequest. + * @memberof wm.protobuf + * @classdesc Represents an UpdateEventModeSerialRequest. + * @implements IUpdateEventModeSerialRequest + * @constructor + * @param {wm.protobuf.IUpdateEventModeSerialRequest=} [properties] Properties to set + */ + function UpdateEventModeSerialRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEventModeSerialRequest eventModeSerial. + * @member {string} eventModeSerial + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @instance + */ + UpdateEventModeSerialRequest.prototype.eventModeSerial = ""; + + /** + * Creates a new UpdateEventModeSerialRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.IUpdateEventModeSerialRequest=} [properties] Properties to set + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest instance + */ + UpdateEventModeSerialRequest.create = function create(properties) { + return new UpdateEventModeSerialRequest(properties); + }; + + /** + * Encodes the specified UpdateEventModeSerialRequest message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.IUpdateEventModeSerialRequest} message UpdateEventModeSerialRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventModeSerial != null && Object.hasOwnProperty.call(message, "eventModeSerial")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventModeSerial); + return writer; + }; + + /** + * Encodes the specified UpdateEventModeSerialRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.IUpdateEventModeSerialRequest} message UpdateEventModeSerialRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateEventModeSerialRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.eventModeSerial = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEventModeSerialRequest message. + * @function verify + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEventModeSerialRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + if (!$util.isString(message.eventModeSerial)) + return "eventModeSerial: string expected"; + return null; + }; + + /** + * Creates an UpdateEventModeSerialRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest + */ + UpdateEventModeSerialRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateEventModeSerialRequest) + return object; + let message = new $root.wm.protobuf.UpdateEventModeSerialRequest(); + if (object.eventModeSerial != null) + message.eventModeSerial = String(object.eventModeSerial); + return message; + }; + + /** + * Creates a plain object from an UpdateEventModeSerialRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.UpdateEventModeSerialRequest} message UpdateEventModeSerialRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEventModeSerialRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.eventModeSerial = ""; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + object.eventModeSerial = message.eventModeSerial; + return object; + }; + + /** + * Converts this UpdateEventModeSerialRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEventModeSerialRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEventModeSerialRequest + * @function getTypeUrl + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEventModeSerialRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateEventModeSerialRequest"; + }; + + return UpdateEventModeSerialRequest; + })(); + + protobuf.UpdateEventModeSerialResponse = (function() { + + /** + * Properties of an UpdateEventModeSerialResponse. + * @memberof wm.protobuf + * @interface IUpdateEventModeSerialResponse + * @property {wm.protobuf.ErrorCode} error UpdateEventModeSerialResponse error + * @property {wm.protobuf.EventModeSerialErrorCode} serialError UpdateEventModeSerialResponse serialError + * @property {string|null} [eventModeSerial] UpdateEventModeSerialResponse eventModeSerial + * @property {number|null} [startAt] UpdateEventModeSerialResponse startAt + * @property {number|null} [endAt] UpdateEventModeSerialResponse endAt + */ + + /** + * Constructs a new UpdateEventModeSerialResponse. + * @memberof wm.protobuf + * @classdesc Represents an UpdateEventModeSerialResponse. + * @implements IUpdateEventModeSerialResponse + * @constructor + * @param {wm.protobuf.IUpdateEventModeSerialResponse=} [properties] Properties to set + */ + function UpdateEventModeSerialResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEventModeSerialResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.error = 0; + + /** + * UpdateEventModeSerialResponse serialError. + * @member {wm.protobuf.EventModeSerialErrorCode} serialError + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.serialError = 0; + + /** + * UpdateEventModeSerialResponse eventModeSerial. + * @member {string} eventModeSerial + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.eventModeSerial = ""; + + /** + * UpdateEventModeSerialResponse startAt. + * @member {number} startAt + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.startAt = 0; + + /** + * UpdateEventModeSerialResponse endAt. + * @member {number} endAt + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.endAt = 0; + + /** + * Creates a new UpdateEventModeSerialResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.IUpdateEventModeSerialResponse=} [properties] Properties to set + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse instance + */ + UpdateEventModeSerialResponse.create = function create(properties) { + return new UpdateEventModeSerialResponse(properties); + }; + + /** + * Encodes the specified UpdateEventModeSerialResponse message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.IUpdateEventModeSerialResponse} message UpdateEventModeSerialResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.eventModeSerial != null && Object.hasOwnProperty.call(message, "eventModeSerial")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.eventModeSerial); + if (message.endAt != null && Object.hasOwnProperty.call(message, "endAt")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.endAt); + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.serialError); + if (message.startAt != null && Object.hasOwnProperty.call(message, "startAt")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.startAt); + return writer; + }; + + /** + * Encodes the specified UpdateEventModeSerialResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.IUpdateEventModeSerialResponse} message UpdateEventModeSerialResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateEventModeSerialResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 4: { + message.serialError = reader.int32(); + break; + } + case 2: { + message.eventModeSerial = reader.string(); + break; + } + case 5: { + message.startAt = reader.uint32(); + break; + } + case 3: { + message.endAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("serialError")) + throw $util.ProtocolError("missing required 'serialError'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEventModeSerialResponse message. + * @function verify + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEventModeSerialResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + switch (message.serialError) { + default: + return "serialError: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + if (!$util.isString(message.eventModeSerial)) + return "eventModeSerial: string expected"; + if (message.startAt != null && message.hasOwnProperty("startAt")) + if (!$util.isInteger(message.startAt)) + return "startAt: integer expected"; + if (message.endAt != null && message.hasOwnProperty("endAt")) + if (!$util.isInteger(message.endAt)) + return "endAt: integer expected"; + return null; + }; + + /** + * Creates an UpdateEventModeSerialResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse + */ + UpdateEventModeSerialResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateEventModeSerialResponse) + return object; + let message = new $root.wm.protobuf.UpdateEventModeSerialResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + switch (object.serialError) { + case "SERIAL_SUCCESS": + case 0: + message.serialError = 0; + break; + case "SERIAL_ATTEMPT_TO_CHANGE": + case 1: + message.serialError = 1; + break; + case "SERIAL_NO_INPUT": + case 2: + message.serialError = 2; + break; + case "SERIAL_INVALID": + case 3: + message.serialError = 3; + break; + case "SERIAL_EXPIRED": + case 4: + message.serialError = 4; + break; + case "SERIAL_OTHER_PLACE": + case 5: + message.serialError = 5; + break; + } + if (object.eventModeSerial != null) + message.eventModeSerial = String(object.eventModeSerial); + if (object.startAt != null) + message.startAt = object.startAt >>> 0; + if (object.endAt != null) + message.endAt = object.endAt >>> 0; + return message; + }; + + /** + * Creates a plain object from an UpdateEventModeSerialResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.UpdateEventModeSerialResponse} message UpdateEventModeSerialResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEventModeSerialResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.eventModeSerial = ""; + object.endAt = 0; + object.serialError = options.enums === String ? "SERIAL_SUCCESS" : 0; + object.startAt = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + object.eventModeSerial = message.eventModeSerial; + if (message.endAt != null && message.hasOwnProperty("endAt")) + object.endAt = message.endAt; + if (message.serialError != null && message.hasOwnProperty("serialError")) + object.serialError = options.enums === String ? $root.wm.protobuf.EventModeSerialErrorCode[message.serialError] : message.serialError; + if (message.startAt != null && message.hasOwnProperty("startAt")) + object.startAt = message.startAt; + return object; + }; + + /** + * Converts this UpdateEventModeSerialResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + * @returns {Object.} JSON object + */ + UpdateEventModeSerialResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEventModeSerialResponse + * @function getTypeUrl + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEventModeSerialResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateEventModeSerialResponse"; + }; + + return UpdateEventModeSerialResponse; + })(); + + protobuf.ParticipateInInviteFriendCampaignRequest = (function() { + + /** + * Properties of a ParticipateInInviteFriendCampaignRequest. + * @memberof wm.protobuf + * @interface IParticipateInInviteFriendCampaignRequest + * @property {number} invitingUserId ParticipateInInviteFriendCampaignRequest invitingUserId + * @property {number} invitedUserId ParticipateInInviteFriendCampaignRequest invitedUserId + * @property {number} sourceCarId ParticipateInInviteFriendCampaignRequest sourceCarId + * @property {boolean} transmission ParticipateInInviteFriendCampaignRequest transmission + */ + + /** + * Constructs a new ParticipateInInviteFriendCampaignRequest. + * @memberof wm.protobuf + * @classdesc Represents a ParticipateInInviteFriendCampaignRequest. + * @implements IParticipateInInviteFriendCampaignRequest + * @constructor + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest=} [properties] Properties to set + */ + function ParticipateInInviteFriendCampaignRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParticipateInInviteFriendCampaignRequest invitingUserId. + * @member {number} invitingUserId + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.invitingUserId = 0; + + /** + * ParticipateInInviteFriendCampaignRequest invitedUserId. + * @member {number} invitedUserId + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.invitedUserId = 0; + + /** + * ParticipateInInviteFriendCampaignRequest sourceCarId. + * @member {number} sourceCarId + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.sourceCarId = 0; + + /** + * ParticipateInInviteFriendCampaignRequest transmission. + * @member {boolean} transmission + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.transmission = false; + + /** + * Creates a new ParticipateInInviteFriendCampaignRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest=} [properties] Properties to set + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest instance + */ + ParticipateInInviteFriendCampaignRequest.create = function create(properties) { + return new ParticipateInInviteFriendCampaignRequest(properties); + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest} message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.invitingUserId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.invitedUserId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.sourceCarId); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.transmission); + return writer; + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest} message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.invitingUserId = reader.uint32(); + break; + } + case 2: { + message.invitedUserId = reader.uint32(); + break; + } + case 3: { + message.sourceCarId = reader.uint32(); + break; + } + case 4: { + message.transmission = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("invitingUserId")) + throw $util.ProtocolError("missing required 'invitingUserId'", { instance: message }); + if (!message.hasOwnProperty("invitedUserId")) + throw $util.ProtocolError("missing required 'invitedUserId'", { instance: message }); + if (!message.hasOwnProperty("sourceCarId")) + throw $util.ProtocolError("missing required 'sourceCarId'", { instance: message }); + if (!message.hasOwnProperty("transmission")) + throw $util.ProtocolError("missing required 'transmission'", { instance: message }); + return message; + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParticipateInInviteFriendCampaignRequest message. + * @function verify + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParticipateInInviteFriendCampaignRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.invitingUserId)) + return "invitingUserId: integer expected"; + if (!$util.isInteger(message.invitedUserId)) + return "invitedUserId: integer expected"; + if (!$util.isInteger(message.sourceCarId)) + return "sourceCarId: integer expected"; + if (typeof message.transmission !== "boolean") + return "transmission: boolean expected"; + return null; + }; + + /** + * Creates a ParticipateInInviteFriendCampaignRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest + */ + ParticipateInInviteFriendCampaignRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ParticipateInInviteFriendCampaignRequest) + return object; + let message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignRequest(); + if (object.invitingUserId != null) + message.invitingUserId = object.invitingUserId >>> 0; + if (object.invitedUserId != null) + message.invitedUserId = object.invitedUserId >>> 0; + if (object.sourceCarId != null) + message.sourceCarId = object.sourceCarId >>> 0; + if (object.transmission != null) + message.transmission = Boolean(object.transmission); + return message; + }; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.ParticipateInInviteFriendCampaignRequest} message ParticipateInInviteFriendCampaignRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParticipateInInviteFriendCampaignRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.invitingUserId = 0; + object.invitedUserId = 0; + object.sourceCarId = 0; + object.transmission = false; + } + if (message.invitingUserId != null && message.hasOwnProperty("invitingUserId")) + object.invitingUserId = message.invitingUserId; + if (message.invitedUserId != null && message.hasOwnProperty("invitedUserId")) + object.invitedUserId = message.invitedUserId; + if (message.sourceCarId != null && message.hasOwnProperty("sourceCarId")) + object.sourceCarId = message.sourceCarId; + if (message.transmission != null && message.hasOwnProperty("transmission")) + object.transmission = message.transmission; + return object; + }; + + /** + * Converts this ParticipateInInviteFriendCampaignRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + * @returns {Object.} JSON object + */ + ParticipateInInviteFriendCampaignRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignRequest + * @function getTypeUrl + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParticipateInInviteFriendCampaignRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ParticipateInInviteFriendCampaignRequest"; + }; + + return ParticipateInInviteFriendCampaignRequest; + })(); + + protobuf.ParticipateInInviteFriendCampaignResponse = (function() { + + /** + * Properties of a ParticipateInInviteFriendCampaignResponse. + * @memberof wm.protobuf + * @interface IParticipateInInviteFriendCampaignResponse + * @property {wm.protobuf.ErrorCode} error ParticipateInInviteFriendCampaignResponse error + */ + + /** + * Constructs a new ParticipateInInviteFriendCampaignResponse. + * @memberof wm.protobuf + * @classdesc Represents a ParticipateInInviteFriendCampaignResponse. + * @implements IParticipateInInviteFriendCampaignResponse + * @constructor + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse=} [properties] Properties to set + */ + function ParticipateInInviteFriendCampaignResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParticipateInInviteFriendCampaignResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @instance + */ + ParticipateInInviteFriendCampaignResponse.prototype.error = 0; + + /** + * Creates a new ParticipateInInviteFriendCampaignResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse=} [properties] Properties to set + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse instance + */ + ParticipateInInviteFriendCampaignResponse.create = function create(properties) { + return new ParticipateInInviteFriendCampaignResponse(properties); + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse} message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse} message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParticipateInInviteFriendCampaignResponse message. + * @function verify + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParticipateInInviteFriendCampaignResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a ParticipateInInviteFriendCampaignResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse + */ + ParticipateInInviteFriendCampaignResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ParticipateInInviteFriendCampaignResponse) + return object; + let message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.ParticipateInInviteFriendCampaignResponse} message ParticipateInInviteFriendCampaignResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParticipateInInviteFriendCampaignResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this ParticipateInInviteFriendCampaignResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @instance + * @returns {Object.} JSON object + */ + ParticipateInInviteFriendCampaignResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignResponse + * @function getTypeUrl + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParticipateInInviteFriendCampaignResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ParticipateInInviteFriendCampaignResponse"; + }; + + return ParticipateInInviteFriendCampaignResponse; + })(); + + protobuf.ConsumeUserItemRequest = (function() { + + /** + * Properties of a ConsumeUserItemRequest. + * @memberof wm.protobuf + * @interface IConsumeUserItemRequest + * @property {number} userId ConsumeUserItemRequest userId + * @property {number} carId ConsumeUserItemRequest carId + * @property {number} userItemId ConsumeUserItemRequest userItemId + */ + + /** + * Constructs a new ConsumeUserItemRequest. + * @memberof wm.protobuf + * @classdesc Represents a ConsumeUserItemRequest. + * @implements IConsumeUserItemRequest + * @constructor + * @param {wm.protobuf.IConsumeUserItemRequest=} [properties] Properties to set + */ + function ConsumeUserItemRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsumeUserItemRequest userId. + * @member {number} userId + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + */ + ConsumeUserItemRequest.prototype.userId = 0; + + /** + * ConsumeUserItemRequest carId. + * @member {number} carId + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + */ + ConsumeUserItemRequest.prototype.carId = 0; + + /** + * ConsumeUserItemRequest userItemId. + * @member {number} userItemId + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + */ + ConsumeUserItemRequest.prototype.userItemId = 0; + + /** + * Creates a new ConsumeUserItemRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.IConsumeUserItemRequest=} [properties] Properties to set + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest instance + */ + ConsumeUserItemRequest.create = function create(properties) { + return new ConsumeUserItemRequest(properties); + }; + + /** + * Encodes the specified ConsumeUserItemRequest message. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.IConsumeUserItemRequest} message ConsumeUserItemRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.carId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.userItemId); + return writer; + }; + + /** + * Encodes the specified ConsumeUserItemRequest message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.IConsumeUserItemRequest} message ConsumeUserItemRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ConsumeUserItemRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.carId = reader.uint32(); + break; + } + case 3: { + message.userItemId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("userItemId")) + throw $util.ProtocolError("missing required 'userItemId'", { instance: message }); + return message; + }; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsumeUserItemRequest message. + * @function verify + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsumeUserItemRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.userItemId)) + return "userItemId: integer expected"; + return null; + }; + + /** + * Creates a ConsumeUserItemRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest + */ + ConsumeUserItemRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ConsumeUserItemRequest) + return object; + let message = new $root.wm.protobuf.ConsumeUserItemRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.userItemId != null) + message.userItemId = object.userItemId >>> 0; + return message; + }; + + /** + * Creates a plain object from a ConsumeUserItemRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.ConsumeUserItemRequest} message ConsumeUserItemRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsumeUserItemRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.carId = 0; + object.userItemId = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + object.userItemId = message.userItemId; + return object; + }; + + /** + * Converts this ConsumeUserItemRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + * @returns {Object.} JSON object + */ + ConsumeUserItemRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConsumeUserItemRequest + * @function getTypeUrl + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConsumeUserItemRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ConsumeUserItemRequest"; + }; + + return ConsumeUserItemRequest; + })(); + + protobuf.ConsumeUserItemResponse = (function() { + + /** + * Properties of a ConsumeUserItemResponse. + * @memberof wm.protobuf + * @interface IConsumeUserItemResponse + * @property {wm.protobuf.ErrorCode} error ConsumeUserItemResponse error + */ + + /** + * Constructs a new ConsumeUserItemResponse. + * @memberof wm.protobuf + * @classdesc Represents a ConsumeUserItemResponse. + * @implements IConsumeUserItemResponse + * @constructor + * @param {wm.protobuf.IConsumeUserItemResponse=} [properties] Properties to set + */ + function ConsumeUserItemResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsumeUserItemResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.ConsumeUserItemResponse + * @instance + */ + ConsumeUserItemResponse.prototype.error = 0; + + /** + * Creates a new ConsumeUserItemResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.IConsumeUserItemResponse=} [properties] Properties to set + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse instance + */ + ConsumeUserItemResponse.create = function create(properties) { + return new ConsumeUserItemResponse(properties); + }; + + /** + * Encodes the specified ConsumeUserItemResponse message. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.IConsumeUserItemResponse} message ConsumeUserItemResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified ConsumeUserItemResponse message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.IConsumeUserItemResponse} message ConsumeUserItemResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ConsumeUserItemResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsumeUserItemResponse message. + * @function verify + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsumeUserItemResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a ConsumeUserItemResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse + */ + ConsumeUserItemResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ConsumeUserItemResponse) + return object; + let message = new $root.wm.protobuf.ConsumeUserItemResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a ConsumeUserItemResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.ConsumeUserItemResponse} message ConsumeUserItemResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsumeUserItemResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this ConsumeUserItemResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.ConsumeUserItemResponse + * @instance + * @returns {Object.} JSON object + */ + ConsumeUserItemResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConsumeUserItemResponse + * @function getTypeUrl + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConsumeUserItemResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ConsumeUserItemResponse"; + }; + + return ConsumeUserItemResponse; + })(); + + protobuf.SearchCarsByLevelRequest = (function() { + + /** + * Properties of a SearchCarsByLevelRequest. + * @memberof wm.protobuf + * @interface ISearchCarsByLevelRequest + * @property {number} carId SearchCarsByLevelRequest carId + * @property {number} ghostLevel SearchCarsByLevelRequest ghostLevel + * @property {number} area SearchCarsByLevelRequest area + * @property {number|null} [regionId] SearchCarsByLevelRequest regionId + */ + + /** + * Constructs a new SearchCarsByLevelRequest. + * @memberof wm.protobuf + * @classdesc Represents a SearchCarsByLevelRequest. + * @implements ISearchCarsByLevelRequest + * @constructor + * @param {wm.protobuf.ISearchCarsByLevelRequest=} [properties] Properties to set + */ + function SearchCarsByLevelRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchCarsByLevelRequest carId. + * @member {number} carId + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.carId = 0; + + /** + * SearchCarsByLevelRequest ghostLevel. + * @member {number} ghostLevel + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.ghostLevel = 0; + + /** + * SearchCarsByLevelRequest area. + * @member {number} area + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.area = 0; + + /** + * SearchCarsByLevelRequest regionId. + * @member {number} regionId + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.regionId = 0; + + /** + * Creates a new SearchCarsByLevelRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.ISearchCarsByLevelRequest=} [properties] Properties to set + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest instance + */ + SearchCarsByLevelRequest.create = function create(properties) { + return new SearchCarsByLevelRequest(properties); + }; + + /** + * Encodes the specified SearchCarsByLevelRequest message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.ISearchCarsByLevelRequest} message SearchCarsByLevelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ghostLevel); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + if (message.regionId != null && Object.hasOwnProperty.call(message, "regionId")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.regionId); + return writer; + }; + + /** + * Encodes the specified SearchCarsByLevelRequest message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.ISearchCarsByLevelRequest} message SearchCarsByLevelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SearchCarsByLevelRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.ghostLevel = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + case 4: { + message.regionId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("ghostLevel")) + throw $util.ProtocolError("missing required 'ghostLevel'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchCarsByLevelRequest message. + * @function verify + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchCarsByLevelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.ghostLevel)) + return "ghostLevel: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (message.regionId != null && message.hasOwnProperty("regionId")) + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + return null; + }; + + /** + * Creates a SearchCarsByLevelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest + */ + SearchCarsByLevelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SearchCarsByLevelRequest) + return object; + let message = new $root.wm.protobuf.SearchCarsByLevelRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.ghostLevel != null) + message.ghostLevel = object.ghostLevel >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + return message; + }; + + /** + * Creates a plain object from a SearchCarsByLevelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.SearchCarsByLevelRequest} message SearchCarsByLevelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchCarsByLevelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.ghostLevel = 0; + object.area = 0; + object.regionId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.ghostLevel != null && message.hasOwnProperty("ghostLevel")) + object.ghostLevel = message.ghostLevel; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + return object; + }; + + /** + * Converts this SearchCarsByLevelRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + * @returns {Object.} JSON object + */ + SearchCarsByLevelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchCarsByLevelRequest + * @function getTypeUrl + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchCarsByLevelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SearchCarsByLevelRequest"; + }; + + return SearchCarsByLevelRequest; + })(); + + protobuf.SearchCarsByLevelResponse = (function() { + + /** + * Properties of a SearchCarsByLevelResponse. + * @memberof wm.protobuf + * @interface ISearchCarsByLevelResponse + * @property {wm.protobuf.ErrorCode} error SearchCarsByLevelResponse error + * @property {number} ramp SearchCarsByLevelResponse ramp + * @property {number} path SearchCarsByLevelResponse path + * @property {Array.|null} [ghosts] SearchCarsByLevelResponse ghosts + * @property {wm.protobuf.PathSelectionMethod} selectionMethod SearchCarsByLevelResponse selectionMethod + * @property {Array.|null} [rates] SearchCarsByLevelResponse rates + */ + + /** + * Constructs a new SearchCarsByLevelResponse. + * @memberof wm.protobuf + * @classdesc Represents a SearchCarsByLevelResponse. + * @implements ISearchCarsByLevelResponse + * @constructor + * @param {wm.protobuf.ISearchCarsByLevelResponse=} [properties] Properties to set + */ + function SearchCarsByLevelResponse(properties) { + this.ghosts = []; + this.rates = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchCarsByLevelResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.error = 0; + + /** + * SearchCarsByLevelResponse ramp. + * @member {number} ramp + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.ramp = 0; + + /** + * SearchCarsByLevelResponse path. + * @member {number} path + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.path = 0; + + /** + * SearchCarsByLevelResponse ghosts. + * @member {Array.} ghosts + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.ghosts = $util.emptyArray; + + /** + * SearchCarsByLevelResponse selectionMethod. + * @member {wm.protobuf.PathSelectionMethod} selectionMethod + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.selectionMethod = 1; + + /** + * SearchCarsByLevelResponse rates. + * @member {Array.} rates + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.rates = $util.emptyArray; + + /** + * Creates a new SearchCarsByLevelResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.ISearchCarsByLevelResponse=} [properties] Properties to set + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse instance + */ + SearchCarsByLevelResponse.create = function create(properties) { + return new SearchCarsByLevelResponse(properties); + }; + + /** + * Encodes the specified SearchCarsByLevelResponse message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.ISearchCarsByLevelResponse} message SearchCarsByLevelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ramp); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.path); + if (message.ghosts != null && message.ghosts.length) + for (let i = 0; i < message.ghosts.length; ++i) + $root.wm.protobuf.GhostCar.encode(message.ghosts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.selectionMethod); + if (message.rates != null && message.rates.length) + for (let i = 0; i < message.rates.length; ++i) + $root.wm.protobuf.SearchCarsByLevelResponse.Rate.encode(message.rates[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchCarsByLevelResponse message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.ISearchCarsByLevelResponse} message SearchCarsByLevelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SearchCarsByLevelResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.ramp = reader.uint32(); + break; + } + case 3: { + message.path = reader.uint32(); + break; + } + case 4: { + if (!(message.ghosts && message.ghosts.length)) + message.ghosts = []; + message.ghosts.push($root.wm.protobuf.GhostCar.decode(reader, reader.uint32())); + break; + } + case 5: { + message.selectionMethod = reader.int32(); + break; + } + case 6: { + if (!(message.rates && message.rates.length)) + message.rates = []; + message.rates.push($root.wm.protobuf.SearchCarsByLevelResponse.Rate.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("ramp")) + throw $util.ProtocolError("missing required 'ramp'", { instance: message }); + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("selectionMethod")) + throw $util.ProtocolError("missing required 'selectionMethod'", { instance: message }); + return message; + }; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchCarsByLevelResponse message. + * @function verify + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchCarsByLevelResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.ghosts != null && message.hasOwnProperty("ghosts")) { + if (!Array.isArray(message.ghosts)) + return "ghosts: array expected"; + for (let i = 0; i < message.ghosts.length; ++i) { + let error = $root.wm.protobuf.GhostCar.verify(message.ghosts[i]); + if (error) + return "ghosts." + error; + } + } + switch (message.selectionMethod) { + default: + return "selectionMethod: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.rates != null && message.hasOwnProperty("rates")) { + if (!Array.isArray(message.rates)) + return "rates: array expected"; + for (let i = 0; i < message.rates.length; ++i) { + let error = $root.wm.protobuf.SearchCarsByLevelResponse.Rate.verify(message.rates[i]); + if (error) + return "rates." + error; + } + } + return null; + }; + + /** + * Creates a SearchCarsByLevelResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse + */ + SearchCarsByLevelResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SearchCarsByLevelResponse) + return object; + let message = new $root.wm.protobuf.SearchCarsByLevelResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.ghosts) { + if (!Array.isArray(object.ghosts)) + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.ghosts: array expected"); + message.ghosts = []; + for (let i = 0; i < object.ghosts.length; ++i) { + if (typeof object.ghosts[i] !== "object") + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.ghosts: object expected"); + message.ghosts[i] = $root.wm.protobuf.GhostCar.fromObject(object.ghosts[i]); + } + } + switch (object.selectionMethod) { + case "PATH_NEW": + case 1: + message.selectionMethod = 1; + break; + case "PATH_PLAIN": + case 2: + message.selectionMethod = 2; + break; + case "PATH_FRIEND": + case 3: + message.selectionMethod = 3; + break; + case "PATH_NORMAL": + case 4: + message.selectionMethod = 4; + break; + case "PATH_CHALLENGER": + case 5: + message.selectionMethod = 5; + break; + } + if (object.rates) { + if (!Array.isArray(object.rates)) + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.rates: array expected"); + message.rates = []; + for (let i = 0; i < object.rates.length; ++i) { + if (typeof object.rates[i] !== "object") + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.rates: object expected"); + message.rates[i] = $root.wm.protobuf.SearchCarsByLevelResponse.Rate.fromObject(object.rates[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SearchCarsByLevelResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse} message SearchCarsByLevelResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchCarsByLevelResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.ghosts = []; + object.rates = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.ramp = 0; + object.path = 0; + object.selectionMethod = options.enums === String ? "PATH_NEW" : 1; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.ghosts && message.ghosts.length) { + object.ghosts = []; + for (let j = 0; j < message.ghosts.length; ++j) + object.ghosts[j] = $root.wm.protobuf.GhostCar.toObject(message.ghosts[j], options); + } + if (message.selectionMethod != null && message.hasOwnProperty("selectionMethod")) + object.selectionMethod = options.enums === String ? $root.wm.protobuf.PathSelectionMethod[message.selectionMethod] : message.selectionMethod; + if (message.rates && message.rates.length) { + object.rates = []; + for (let j = 0; j < message.rates.length; ++j) + object.rates[j] = $root.wm.protobuf.SearchCarsByLevelResponse.Rate.toObject(message.rates[j], options); + } + return object; + }; + + /** + * Converts this SearchCarsByLevelResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + * @returns {Object.} JSON object + */ + SearchCarsByLevelResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchCarsByLevelResponse + * @function getTypeUrl + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchCarsByLevelResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SearchCarsByLevelResponse"; + }; + + SearchCarsByLevelResponse.Rate = (function() { + + /** + * Properties of a Rate. + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @interface IRate + * @property {number} carId Rate carId + * @property {wm.protobuf.GhostRateType} type Rate type + * @property {number|null} [rate] Rate rate + */ + + /** + * Constructs a new Rate. + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @classdesc Represents a Rate. + * @implements IRate + * @constructor + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate=} [properties] Properties to set + */ + function Rate(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Rate carId. + * @member {number} carId + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + */ + Rate.prototype.carId = 0; + + /** + * Rate type. + * @member {wm.protobuf.GhostRateType} type + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + */ + Rate.prototype.type = 1; + + /** + * Rate rate. + * @member {number} rate + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + */ + Rate.prototype.rate = 0; + + /** + * Creates a new Rate instance using the specified properties. + * @function create + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate=} [properties] Properties to set + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate instance + */ + Rate.create = function create(properties) { + return new Rate(properties); + }; + + /** + * Encodes the specified Rate message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate} message Rate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.rate != null && Object.hasOwnProperty.call(message, "rate")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rate); + return writer; + }; + + /** + * Encodes the specified Rate message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate} message Rate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Rate message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SearchCarsByLevelResponse.Rate(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.rate = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("type")) + throw $util.ProtocolError("missing required 'type'", { instance: message }); + return message; + }; + + /** + * Decodes a Rate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Rate message. + * @function verify + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.rate != null && message.hasOwnProperty("rate")) + if (!$util.isInteger(message.rate)) + return "rate: integer expected"; + return null; + }; + + /** + * Creates a Rate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate + */ + Rate.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SearchCarsByLevelResponse.Rate) + return object; + let message = new $root.wm.protobuf.SearchCarsByLevelResponse.Rate(); + if (object.carId != null) + message.carId = object.carId >>> 0; + switch (object.type) { + case "GHOST_RATE_UNKNOWN": + case 1: + message.type = 1; + break; + case "GHOST_RATE_INVALID": + case 2: + message.type = 2; + break; + case "GHOST_RATE_VALID": + case 3: + message.type = 3; + break; + } + if (object.rate != null) + message.rate = object.rate >>> 0; + return message; + }; + + /** + * Creates a plain object from a Rate message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.Rate} message Rate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rate.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.type = options.enums === String ? "GHOST_RATE_UNKNOWN" : 1; + object.rate = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.wm.protobuf.GhostRateType[message.type] : message.type; + if (message.rate != null && message.hasOwnProperty("rate")) + object.rate = message.rate; + return object; + }; + + /** + * Converts this Rate to JSON. + * @function toJSON + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + * @returns {Object.} JSON object + */ + Rate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Rate + * @function getTypeUrl + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Rate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SearchCarsByLevelResponse.Rate"; + }; + + return Rate; + })(); + + return SearchCarsByLevelResponse; + })(); + + protobuf.LoadPathsAndTuningsRequest = (function() { + + /** + * Properties of a LoadPathsAndTuningsRequest. + * @memberof wm.protobuf + * @interface ILoadPathsAndTuningsRequest + * @property {number} carId LoadPathsAndTuningsRequest carId + * @property {Array.|null} [selectedCars] LoadPathsAndTuningsRequest selectedCars + * @property {boolean|null} [returnImmediately] LoadPathsAndTuningsRequest returnImmediately + * @property {number|null} [stampTargetArea] LoadPathsAndTuningsRequest stampTargetArea + */ + + /** + * Constructs a new LoadPathsAndTuningsRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadPathsAndTuningsRequest. + * @implements ILoadPathsAndTuningsRequest + * @constructor + * @param {wm.protobuf.ILoadPathsAndTuningsRequest=} [properties] Properties to set + */ + function LoadPathsAndTuningsRequest(properties) { + this.selectedCars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadPathsAndTuningsRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.carId = 0; + + /** + * LoadPathsAndTuningsRequest selectedCars. + * @member {Array.} selectedCars + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.selectedCars = $util.emptyArray; + + /** + * LoadPathsAndTuningsRequest returnImmediately. + * @member {boolean} returnImmediately + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.returnImmediately = false; + + /** + * LoadPathsAndTuningsRequest stampTargetArea. + * @member {number} stampTargetArea + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.stampTargetArea = 0; + + /** + * Creates a new LoadPathsAndTuningsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest instance + */ + LoadPathsAndTuningsRequest.create = function create(properties) { + return new LoadPathsAndTuningsRequest(properties); + }; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsRequest} message LoadPathsAndTuningsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.selectedCars != null && message.selectedCars.length) + for (let i = 0; i < message.selectedCars.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.selectedCars[i]); + if (message.returnImmediately != null && Object.hasOwnProperty.call(message, "returnImmediately")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.returnImmediately); + if (message.stampTargetArea != null && Object.hasOwnProperty.call(message, "stampTargetArea")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stampTargetArea); + return writer; + }; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsRequest} message LoadPathsAndTuningsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadPathsAndTuningsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + if (!(message.selectedCars && message.selectedCars.length)) + message.selectedCars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.selectedCars.push(reader.uint32()); + } else + message.selectedCars.push(reader.uint32()); + break; + } + case 3: { + message.returnImmediately = reader.bool(); + break; + } + case 4: { + message.stampTargetArea = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadPathsAndTuningsRequest message. + * @function verify + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadPathsAndTuningsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.selectedCars != null && message.hasOwnProperty("selectedCars")) { + if (!Array.isArray(message.selectedCars)) + return "selectedCars: array expected"; + for (let i = 0; i < message.selectedCars.length; ++i) + if (!$util.isInteger(message.selectedCars[i])) + return "selectedCars: integer[] expected"; + } + if (message.returnImmediately != null && message.hasOwnProperty("returnImmediately")) + if (typeof message.returnImmediately !== "boolean") + return "returnImmediately: boolean expected"; + if (message.stampTargetArea != null && message.hasOwnProperty("stampTargetArea")) + if (!$util.isInteger(message.stampTargetArea)) + return "stampTargetArea: integer expected"; + return null; + }; + + /** + * Creates a LoadPathsAndTuningsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest + */ + LoadPathsAndTuningsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadPathsAndTuningsRequest) + return object; + let message = new $root.wm.protobuf.LoadPathsAndTuningsRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.selectedCars) { + if (!Array.isArray(object.selectedCars)) + throw TypeError(".wm.protobuf.LoadPathsAndTuningsRequest.selectedCars: array expected"); + message.selectedCars = []; + for (let i = 0; i < object.selectedCars.length; ++i) + message.selectedCars[i] = object.selectedCars[i] >>> 0; + } + if (object.returnImmediately != null) + message.returnImmediately = Boolean(object.returnImmediately); + if (object.stampTargetArea != null) + message.stampTargetArea = object.stampTargetArea >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadPathsAndTuningsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.LoadPathsAndTuningsRequest} message LoadPathsAndTuningsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadPathsAndTuningsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.selectedCars = []; + if (options.defaults) { + object.carId = 0; + object.returnImmediately = false; + object.stampTargetArea = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.selectedCars && message.selectedCars.length) { + object.selectedCars = []; + for (let j = 0; j < message.selectedCars.length; ++j) + object.selectedCars[j] = message.selectedCars[j]; + } + if (message.returnImmediately != null && message.hasOwnProperty("returnImmediately")) + object.returnImmediately = message.returnImmediately; + if (message.stampTargetArea != null && message.hasOwnProperty("stampTargetArea")) + object.stampTargetArea = message.stampTargetArea; + return object; + }; + + /** + * Converts this LoadPathsAndTuningsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + * @returns {Object.} JSON object + */ + LoadPathsAndTuningsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadPathsAndTuningsRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadPathsAndTuningsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadPathsAndTuningsRequest"; + }; + + return LoadPathsAndTuningsRequest; + })(); + + protobuf.LoadPathsAndTuningsResponse = (function() { + + /** + * Properties of a LoadPathsAndTuningsResponse. + * @memberof wm.protobuf + * @interface ILoadPathsAndTuningsResponse + * @property {wm.protobuf.ErrorCode} error LoadPathsAndTuningsResponse error + * @property {Array.|null} [data] LoadPathsAndTuningsResponse data + */ + + /** + * Constructs a new LoadPathsAndTuningsResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadPathsAndTuningsResponse. + * @implements ILoadPathsAndTuningsResponse + * @constructor + * @param {wm.protobuf.ILoadPathsAndTuningsResponse=} [properties] Properties to set + */ + function LoadPathsAndTuningsResponse(properties) { + this.data = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadPathsAndTuningsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @instance + */ + LoadPathsAndTuningsResponse.prototype.error = 0; + + /** + * LoadPathsAndTuningsResponse data. + * @member {Array.} data + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @instance + */ + LoadPathsAndTuningsResponse.prototype.data = $util.emptyArray; + + /** + * Creates a new LoadPathsAndTuningsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse instance + */ + LoadPathsAndTuningsResponse.create = function create(properties) { + return new LoadPathsAndTuningsResponse(properties); + }; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsResponse} message LoadPathsAndTuningsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.data != null && message.data.length) + for (let i = 0; i < message.data.length; ++i) + $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.encode(message.data[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsResponse} message LoadPathsAndTuningsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadPathsAndTuningsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.data && message.data.length)) + message.data = []; + message.data.push($root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadPathsAndTuningsResponse message. + * @function verify + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadPathsAndTuningsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.data != null && message.hasOwnProperty("data")) { + if (!Array.isArray(message.data)) + return "data: array expected"; + for (let i = 0; i < message.data.length; ++i) { + let error = $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify(message.data[i]); + if (error) + return "data." + error; + } + } + return null; + }; + + /** + * Creates a LoadPathsAndTuningsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse + */ + LoadPathsAndTuningsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadPathsAndTuningsResponse) + return object; + let message = new $root.wm.protobuf.LoadPathsAndTuningsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.data) { + if (!Array.isArray(object.data)) + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.data: array expected"); + message.data = []; + for (let i = 0; i < object.data.length; ++i) { + if (typeof object.data[i] !== "object") + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.data: object expected"); + message.data[i] = $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.fromObject(object.data[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadPathsAndTuningsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse} message LoadPathsAndTuningsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadPathsAndTuningsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.data = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.data && message.data.length) { + object.data = []; + for (let j = 0; j < message.data.length; ++j) + object.data[j] = $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.toObject(message.data[j], options); + } + return object; + }; + + /** + * Converts this LoadPathsAndTuningsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @instance + * @returns {Object.} JSON object + */ + LoadPathsAndTuningsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadPathsAndTuningsResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadPathsAndTuningsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadPathsAndTuningsResponse"; + }; + + LoadPathsAndTuningsResponse.CarTuningsByPath = (function() { + + /** + * Properties of a CarTuningsByPath. + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @interface ICarTuningsByPath + * @property {number} area CarTuningsByPath area + * @property {number} ramp CarTuningsByPath ramp + * @property {number} path CarTuningsByPath path + * @property {Array.|null} [carTunings] CarTuningsByPath carTunings + * @property {wm.protobuf.PathSelectionMethod} selectionMethod CarTuningsByPath selectionMethod + */ + + /** + * Constructs a new CarTuningsByPath. + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @classdesc Represents a CarTuningsByPath. + * @implements ICarTuningsByPath + * @constructor + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath=} [properties] Properties to set + */ + function CarTuningsByPath(properties) { + this.carTunings = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarTuningsByPath area. + * @member {number} area + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.area = 0; + + /** + * CarTuningsByPath ramp. + * @member {number} ramp + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.ramp = 0; + + /** + * CarTuningsByPath path. + * @member {number} path + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.path = 0; + + /** + * CarTuningsByPath carTunings. + * @member {Array.} carTunings + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.carTunings = $util.emptyArray; + + /** + * CarTuningsByPath selectionMethod. + * @member {wm.protobuf.PathSelectionMethod} selectionMethod + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.selectionMethod = 1; + + /** + * Creates a new CarTuningsByPath instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath=} [properties] Properties to set + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath instance + */ + CarTuningsByPath.create = function create(properties) { + return new CarTuningsByPath(properties); + }; + + /** + * Encodes the specified CarTuningsByPath message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath} message CarTuningsByPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuningsByPath.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.area); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ramp); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.path); + if (message.carTunings != null && message.carTunings.length) + for (let i = 0; i < message.carTunings.length; ++i) + $root.wm.protobuf.CarTuning.encode(message.carTunings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.selectionMethod); + return writer; + }; + + /** + * Encodes the specified CarTuningsByPath message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath} message CarTuningsByPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuningsByPath.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuningsByPath.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.area = reader.uint32(); + break; + } + case 2: { + message.ramp = reader.uint32(); + break; + } + case 3: { + message.path = reader.uint32(); + break; + } + case 4: { + if (!(message.carTunings && message.carTunings.length)) + message.carTunings = []; + message.carTunings.push($root.wm.protobuf.CarTuning.decode(reader, reader.uint32())); + break; + } + case 5: { + message.selectionMethod = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("ramp")) + throw $util.ProtocolError("missing required 'ramp'", { instance: message }); + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("selectionMethod")) + throw $util.ProtocolError("missing required 'selectionMethod'", { instance: message }); + return message; + }; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuningsByPath.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarTuningsByPath message. + * @function verify + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarTuningsByPath.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.carTunings != null && message.hasOwnProperty("carTunings")) { + if (!Array.isArray(message.carTunings)) + return "carTunings: array expected"; + for (let i = 0; i < message.carTunings.length; ++i) { + let error = $root.wm.protobuf.CarTuning.verify(message.carTunings[i]); + if (error) + return "carTunings." + error; + } + } + switch (message.selectionMethod) { + default: + return "selectionMethod: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a CarTuningsByPath message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath + */ + CarTuningsByPath.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath) + return object; + let message = new $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath(); + if (object.area != null) + message.area = object.area >>> 0; + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.carTunings) { + if (!Array.isArray(object.carTunings)) + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.carTunings: array expected"); + message.carTunings = []; + for (let i = 0; i < object.carTunings.length; ++i) { + if (typeof object.carTunings[i] !== "object") + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.carTunings: object expected"); + message.carTunings[i] = $root.wm.protobuf.CarTuning.fromObject(object.carTunings[i]); + } + } + switch (object.selectionMethod) { + case "PATH_NEW": + case 1: + message.selectionMethod = 1; + break; + case "PATH_PLAIN": + case 2: + message.selectionMethod = 2; + break; + case "PATH_FRIEND": + case 3: + message.selectionMethod = 3; + break; + case "PATH_NORMAL": + case 4: + message.selectionMethod = 4; + break; + case "PATH_CHALLENGER": + case 5: + message.selectionMethod = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a CarTuningsByPath message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} message CarTuningsByPath + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarTuningsByPath.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.carTunings = []; + if (options.defaults) { + object.area = 0; + object.ramp = 0; + object.path = 0; + object.selectionMethod = options.enums === String ? "PATH_NEW" : 1; + } + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.carTunings && message.carTunings.length) { + object.carTunings = []; + for (let j = 0; j < message.carTunings.length; ++j) + object.carTunings[j] = $root.wm.protobuf.CarTuning.toObject(message.carTunings[j], options); + } + if (message.selectionMethod != null && message.hasOwnProperty("selectionMethod")) + object.selectionMethod = options.enums === String ? $root.wm.protobuf.PathSelectionMethod[message.selectionMethod] : message.selectionMethod; + return object; + }; + + /** + * Converts this CarTuningsByPath to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + * @returns {Object.} JSON object + */ + CarTuningsByPath.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarTuningsByPath + * @function getTypeUrl + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarTuningsByPath.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath"; + }; + + return CarTuningsByPath; + })(); + + return LoadPathsAndTuningsResponse; + })(); + + protobuf.LoadGhostDriveDataRequest = (function() { + + /** + * Properties of a LoadGhostDriveDataRequest. + * @memberof wm.protobuf + * @interface ILoadGhostDriveDataRequest + * @property {number} path LoadGhostDriveDataRequest path + * @property {Array.|null} [carTunings] LoadGhostDriveDataRequest carTunings + */ + + /** + * Constructs a new LoadGhostDriveDataRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostDriveDataRequest. + * @implements ILoadGhostDriveDataRequest + * @constructor + * @param {wm.protobuf.ILoadGhostDriveDataRequest=} [properties] Properties to set + */ + function LoadGhostDriveDataRequest(properties) { + this.carTunings = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostDriveDataRequest path. + * @member {number} path + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @instance + */ + LoadGhostDriveDataRequest.prototype.path = 0; + + /** + * LoadGhostDriveDataRequest carTunings. + * @member {Array.} carTunings + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @instance + */ + LoadGhostDriveDataRequest.prototype.carTunings = $util.emptyArray; + + /** + * Creates a new LoadGhostDriveDataRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.ILoadGhostDriveDataRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest instance + */ + LoadGhostDriveDataRequest.create = function create(properties) { + return new LoadGhostDriveDataRequest(properties); + }; + + /** + * Encodes the specified LoadGhostDriveDataRequest message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.ILoadGhostDriveDataRequest} message LoadGhostDriveDataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.path); + if (message.carTunings != null && message.carTunings.length) + for (let i = 0; i < message.carTunings.length; ++i) + $root.wm.protobuf.CarTuning.encode(message.carTunings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostDriveDataRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.ILoadGhostDriveDataRequest} message LoadGhostDriveDataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostDriveDataRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.path = reader.uint32(); + break; + } + case 2: { + if (!(message.carTunings && message.carTunings.length)) + message.carTunings = []; + message.carTunings.push($root.wm.protobuf.CarTuning.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostDriveDataRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostDriveDataRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.carTunings != null && message.hasOwnProperty("carTunings")) { + if (!Array.isArray(message.carTunings)) + return "carTunings: array expected"; + for (let i = 0; i < message.carTunings.length; ++i) { + let error = $root.wm.protobuf.CarTuning.verify(message.carTunings[i]); + if (error) + return "carTunings." + error; + } + } + return null; + }; + + /** + * Creates a LoadGhostDriveDataRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest + */ + LoadGhostDriveDataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostDriveDataRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostDriveDataRequest(); + if (object.path != null) + message.path = object.path >>> 0; + if (object.carTunings) { + if (!Array.isArray(object.carTunings)) + throw TypeError(".wm.protobuf.LoadGhostDriveDataRequest.carTunings: array expected"); + message.carTunings = []; + for (let i = 0; i < object.carTunings.length; ++i) { + if (typeof object.carTunings[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataRequest.carTunings: object expected"); + message.carTunings[i] = $root.wm.protobuf.CarTuning.fromObject(object.carTunings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostDriveDataRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.LoadGhostDriveDataRequest} message LoadGhostDriveDataRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostDriveDataRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.carTunings = []; + if (options.defaults) + object.path = 0; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.carTunings && message.carTunings.length) { + object.carTunings = []; + for (let j = 0; j < message.carTunings.length; ++j) + object.carTunings[j] = $root.wm.protobuf.CarTuning.toObject(message.carTunings[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostDriveDataRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostDriveDataRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostDriveDataRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostDriveDataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostDriveDataRequest"; + }; + + return LoadGhostDriveDataRequest; + })(); + + protobuf.LoadGhostDriveDataResponse = (function() { + + /** + * Properties of a LoadGhostDriveDataResponse. + * @memberof wm.protobuf + * @interface ILoadGhostDriveDataResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostDriveDataResponse error + * @property {Array.|null} [data] LoadGhostDriveDataResponse data + */ + + /** + * Constructs a new LoadGhostDriveDataResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostDriveDataResponse. + * @implements ILoadGhostDriveDataResponse + * @constructor + * @param {wm.protobuf.ILoadGhostDriveDataResponse=} [properties] Properties to set + */ + function LoadGhostDriveDataResponse(properties) { + this.data = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostDriveDataResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @instance + */ + LoadGhostDriveDataResponse.prototype.error = 0; + + /** + * LoadGhostDriveDataResponse data. + * @member {Array.} data + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @instance + */ + LoadGhostDriveDataResponse.prototype.data = $util.emptyArray; + + /** + * Creates a new LoadGhostDriveDataResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.ILoadGhostDriveDataResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse instance + */ + LoadGhostDriveDataResponse.create = function create(properties) { + return new LoadGhostDriveDataResponse(properties); + }; + + /** + * Encodes the specified LoadGhostDriveDataResponse message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.ILoadGhostDriveDataResponse} message LoadGhostDriveDataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.data != null && message.data.length) + for (let i = 0; i < message.data.length; ++i) + $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.encode(message.data[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostDriveDataResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.ILoadGhostDriveDataResponse} message LoadGhostDriveDataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostDriveDataResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.data && message.data.length)) + message.data = []; + message.data.push($root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostDriveDataResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostDriveDataResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.data != null && message.hasOwnProperty("data")) { + if (!Array.isArray(message.data)) + return "data: array expected"; + for (let i = 0; i < message.data.length; ++i) { + let error = $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify(message.data[i]); + if (error) + return "data." + error; + } + } + return null; + }; + + /** + * Creates a LoadGhostDriveDataResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse + */ + LoadGhostDriveDataResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostDriveDataResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostDriveDataResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.data) { + if (!Array.isArray(object.data)) + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.data: array expected"); + message.data = []; + for (let i = 0; i < object.data.length; ++i) { + if (typeof object.data[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.data: object expected"); + message.data[i] = $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.fromObject(object.data[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostDriveDataResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse} message LoadGhostDriveDataResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostDriveDataResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.data = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.data && message.data.length) { + object.data = []; + for (let j = 0; j < message.data.length; ++j) + object.data[j] = $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.toObject(message.data[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostDriveDataResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostDriveDataResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostDriveDataResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostDriveDataResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostDriveDataResponse"; + }; + + LoadGhostDriveDataResponse.GhostDriveData = (function() { + + /** + * Properties of a GhostDriveData. + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @interface IGhostDriveData + * @property {number} carId GhostDriveData carId + * @property {wm.protobuf.GhostType} type GhostDriveData type + * @property {wm.protobuf.IBinaryData|null} [driveData] GhostDriveData driveData + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByUser] GhostDriveData trendBinaryByUser + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByCar] GhostDriveData trendBinaryByCar + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByArea] GhostDriveData trendBinaryByArea + */ + + /** + * Constructs a new GhostDriveData. + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @classdesc Represents a GhostDriveData. + * @implements IGhostDriveData + * @constructor + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData=} [properties] Properties to set + */ + function GhostDriveData(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostDriveData carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.carId = 0; + + /** + * GhostDriveData type. + * @member {wm.protobuf.GhostType} type + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.type = 1; + + /** + * GhostDriveData driveData. + * @member {wm.protobuf.IBinaryData|null|undefined} driveData + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.driveData = null; + + /** + * GhostDriveData trendBinaryByUser. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByUser + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.trendBinaryByUser = null; + + /** + * GhostDriveData trendBinaryByCar. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByCar + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.trendBinaryByCar = null; + + /** + * GhostDriveData trendBinaryByArea. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByArea + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.trendBinaryByArea = null; + + /** + * Creates a new GhostDriveData instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData instance + */ + GhostDriveData.create = function create(properties) { + return new GhostDriveData(properties); + }; + + /** + * Encodes the specified GhostDriveData message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData} message GhostDriveData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostDriveData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.driveData != null && Object.hasOwnProperty.call(message, "driveData")) + $root.wm.protobuf.BinaryData.encode(message.driveData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.trendBinaryByUser != null && Object.hasOwnProperty.call(message, "trendBinaryByUser")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByUser, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.trendBinaryByCar != null && Object.hasOwnProperty.call(message, "trendBinaryByCar")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByCar, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.trendBinaryByArea != null && Object.hasOwnProperty.call(message, "trendBinaryByArea")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByArea, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostDriveData message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData} message GhostDriveData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostDriveData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostDriveData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.driveData = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 4: { + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 5: { + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 6: { + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("type")) + throw $util.ProtocolError("missing required 'type'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostDriveData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostDriveData message. + * @function verify + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostDriveData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.driveData != null && message.hasOwnProperty("driveData")) { + let error = $root.wm.protobuf.BinaryData.verify(message.driveData); + if (error) + return "driveData." + error; + } + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByUser); + if (error) + return "trendBinaryByUser." + error; + } + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByCar); + if (error) + return "trendBinaryByCar." + error; + } + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByArea); + if (error) + return "trendBinaryByArea." + error; + } + return null; + }; + + /** + * Creates a GhostDriveData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData + */ + GhostDriveData.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData) + return object; + let message = new $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData(); + if (object.carId != null) + message.carId = object.carId >>> 0; + switch (object.type) { + case "GHOST_NORMAL": + case 1: + message.type = 1; + break; + case "GHOST_PINCH_RUNNER": + case 2: + message.type = 2; + break; + case "GHOST_DEFAULT": + case 3: + message.type = 3; + break; + } + if (object.driveData != null) { + if (typeof object.driveData !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.driveData: object expected"); + message.driveData = $root.wm.protobuf.BinaryData.fromObject(object.driveData); + } + if (object.trendBinaryByUser != null) { + if (typeof object.trendBinaryByUser !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.trendBinaryByUser: object expected"); + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByUser); + } + if (object.trendBinaryByCar != null) { + if (typeof object.trendBinaryByCar !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.trendBinaryByCar: object expected"); + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByCar); + } + if (object.trendBinaryByArea != null) { + if (typeof object.trendBinaryByArea !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.trendBinaryByArea: object expected"); + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByArea); + } + return message; + }; + + /** + * Creates a plain object from a GhostDriveData message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} message GhostDriveData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostDriveData.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.type = options.enums === String ? "GHOST_NORMAL" : 1; + object.driveData = null; + object.trendBinaryByUser = null; + object.trendBinaryByCar = null; + object.trendBinaryByArea = null; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.wm.protobuf.GhostType[message.type] : message.type; + if (message.driveData != null && message.hasOwnProperty("driveData")) + object.driveData = $root.wm.protobuf.BinaryData.toObject(message.driveData, options); + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) + object.trendBinaryByUser = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByUser, options); + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) + object.trendBinaryByCar = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByCar, options); + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) + object.trendBinaryByArea = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByArea, options); + return object; + }; + + /** + * Converts this GhostDriveData to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + * @returns {Object.} JSON object + */ + GhostDriveData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostDriveData + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostDriveData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData"; + }; + + return GhostDriveData; + })(); + + return LoadGhostDriveDataResponse; + })(); + + protobuf.Car = (function() { + + /** + * Properties of a Car. + * @memberof wm.protobuf + * @interface ICar + * @property {number|null} [carId] Car carId + * @property {number|null} [userId] Car userId + * @property {number|null} [regionId] Car regionId + * @property {string|null} [name] Car name + * @property {number|null} [manufacturer] Car manufacturer + * @property {number|null} [model] Car model + * @property {number|null} [visualModel] Car visualModel + * @property {number|null} [defaultColor] Car defaultColor + * @property {number} customColor Car customColor + * @property {number} wheel Car wheel + * @property {number} wheelColor Car wheelColor + * @property {number} aero Car aero + * @property {number} bonnet Car bonnet + * @property {number} wing Car wing + * @property {wm.protobuf.IGTWing|null} [gtWing] Car gtWing + * @property {number} mirror Car mirror + * @property {number} neon Car neon + * @property {number} trunk Car trunk + * @property {number} plate Car plate + * @property {number} plateColor Car plateColor + * @property {number} plateNumber Car plateNumber + * @property {number} tunePower Car tunePower + * @property {number} tuneHandling Car tuneHandling + * @property {string} title Car title + * @property {number} level Car level + * @property {boolean|null} [windowSticker] Car windowSticker + * @property {string|null} [windowStickerString] Car windowStickerString + * @property {number|null} [windowStickerFont] Car windowStickerFont + * @property {number|null} [windowDecoration] Car windowDecoration + * @property {number|null} [rivalMarker] Car rivalMarker + * @property {number|null} [lastPlayedAt] Car lastPlayedAt + * @property {wm.protobuf.IPlace|null} [lastPlayedPlace] Car lastPlayedPlace + * @property {number|null} [aura] Car aura + * @property {number|null} [auraMotif] Car auraMotif + * @property {number|null} [ghostLevel] Car ghostLevel + * @property {string|null} [country] Car country + * @property {string|null} [searchCode] Car searchCode + */ + + /** + * Constructs a new Car. + * @memberof wm.protobuf + * @classdesc Represents a Car. + * @implements ICar + * @constructor + * @param {wm.protobuf.ICar=} [properties] Properties to set + */ + function Car(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Car carId. + * @member {number} carId + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.carId = 0; + + /** + * Car userId. + * @member {number} userId + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.userId = 0; + + /** + * Car regionId. + * @member {number} regionId + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.regionId = 0; + + /** + * Car name. + * @member {string} name + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.name = ""; + + /** + * Car manufacturer. + * @member {number} manufacturer + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.manufacturer = 0; + + /** + * Car model. + * @member {number} model + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.model = 0; + + /** + * Car visualModel. + * @member {number} visualModel + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.visualModel = 0; + + /** + * Car defaultColor. + * @member {number} defaultColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.defaultColor = 0; + + /** + * Car customColor. + * @member {number} customColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.customColor = 0; + + /** + * Car wheel. + * @member {number} wheel + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.wheel = 0; + + /** + * Car wheelColor. + * @member {number} wheelColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.wheelColor = 0; + + /** + * Car aero. + * @member {number} aero + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.aero = 0; + + /** + * Car bonnet. + * @member {number} bonnet + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.bonnet = 0; + + /** + * Car wing. + * @member {number} wing + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.wing = 0; + + /** + * Car gtWing. + * @member {wm.protobuf.IGTWing|null|undefined} gtWing + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.gtWing = null; + + /** + * Car mirror. + * @member {number} mirror + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.mirror = 0; + + /** + * Car neon. + * @member {number} neon + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.neon = 0; + + /** + * Car trunk. + * @member {number} trunk + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.trunk = 0; + + /** + * Car plate. + * @member {number} plate + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.plate = 0; + + /** + * Car plateColor. + * @member {number} plateColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.plateColor = 0; + + /** + * Car plateNumber. + * @member {number} plateNumber + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.plateNumber = 0; + + /** + * Car tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.tunePower = 0; + + /** + * Car tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.tuneHandling = 0; + + /** + * Car title. + * @member {string} title + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.title = ""; + + /** + * Car level. + * @member {number} level + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.level = 0; + + /** + * Car windowSticker. + * @member {boolean} windowSticker + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowSticker = false; + + /** + * Car windowStickerString. + * @member {string} windowStickerString + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowStickerString = ""; + + /** + * Car windowStickerFont. + * @member {number} windowStickerFont + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowStickerFont = 0; + + /** + * Car windowDecoration. + * @member {number} windowDecoration + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowDecoration = 0; + + /** + * Car rivalMarker. + * @member {number} rivalMarker + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.rivalMarker = 0; + + /** + * Car lastPlayedAt. + * @member {number} lastPlayedAt + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.lastPlayedAt = 0; + + /** + * Car lastPlayedPlace. + * @member {wm.protobuf.IPlace|null|undefined} lastPlayedPlace + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.lastPlayedPlace = null; + + /** + * Car aura. + * @member {number} aura + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.aura = 0; + + /** + * Car auraMotif. + * @member {number} auraMotif + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.auraMotif = 0; + + /** + * Car ghostLevel. + * @member {number} ghostLevel + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.ghostLevel = 0; + + /** + * Car country. + * @member {string} country + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.country = ""; + + /** + * Car searchCode. + * @member {string} searchCode + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.searchCode = ""; + + /** + * Creates a new Car instance using the specified properties. + * @function create + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.ICar=} [properties] Properties to set + * @returns {wm.protobuf.Car} Car instance + */ + Car.create = function create(properties) { + return new Car(properties); + }; + + /** + * Encodes the specified Car message. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.ICar} message Car message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Car.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.userId); + if (message.regionId != null && Object.hasOwnProperty.call(message, "regionId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.regionId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + if (message.manufacturer != null && Object.hasOwnProperty.call(message, "manufacturer")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.manufacturer); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.model); + if (message.visualModel != null && Object.hasOwnProperty.call(message, "visualModel")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.visualModel); + if (message.defaultColor != null && Object.hasOwnProperty.call(message, "defaultColor")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.defaultColor); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.customColor); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.wheel); + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.wheelColor); + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.aero); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.bonnet); + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.wing); + if (message.gtWing != null && Object.hasOwnProperty.call(message, "gtWing")) + $root.wm.protobuf.GTWing.encode(message.gtWing, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.mirror); + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.neon); + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.trunk); + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.plate); + writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.plateColor); + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.plateNumber); + writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.tunePower); + writer.uint32(/* id 32, wireType 0 =*/256).uint32(message.tuneHandling); + writer.uint32(/* id 33, wireType 2 =*/266).string(message.title); + writer.uint32(/* id 34, wireType 0 =*/272).uint32(message.level); + if (message.windowSticker != null && Object.hasOwnProperty.call(message, "windowSticker")) + writer.uint32(/* id 35, wireType 0 =*/280).bool(message.windowSticker); + if (message.windowStickerString != null && Object.hasOwnProperty.call(message, "windowStickerString")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.windowStickerString); + if (message.windowStickerFont != null && Object.hasOwnProperty.call(message, "windowStickerFont")) + writer.uint32(/* id 38, wireType 0 =*/304).uint32(message.windowStickerFont); + if (message.windowDecoration != null && Object.hasOwnProperty.call(message, "windowDecoration")) + writer.uint32(/* id 39, wireType 0 =*/312).uint32(message.windowDecoration); + if (message.rivalMarker != null && Object.hasOwnProperty.call(message, "rivalMarker")) + writer.uint32(/* id 41, wireType 0 =*/328).uint32(message.rivalMarker); + if (message.lastPlayedAt != null && Object.hasOwnProperty.call(message, "lastPlayedAt")) + writer.uint32(/* id 45, wireType 0 =*/360).uint32(message.lastPlayedAt); + if (message.lastPlayedPlace != null && Object.hasOwnProperty.call(message, "lastPlayedPlace")) + $root.wm.protobuf.Place.encode(message.lastPlayedPlace, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + if (message.aura != null && Object.hasOwnProperty.call(message, "aura")) + writer.uint32(/* id 47, wireType 0 =*/376).uint32(message.aura); + if (message.auraMotif != null && Object.hasOwnProperty.call(message, "auraMotif")) + writer.uint32(/* id 48, wireType 0 =*/384).uint32(message.auraMotif); + if (message.ghostLevel != null && Object.hasOwnProperty.call(message, "ghostLevel")) + writer.uint32(/* id 49, wireType 0 =*/392).uint32(message.ghostLevel); + if (message.country != null && Object.hasOwnProperty.call(message, "country")) + writer.uint32(/* id 50, wireType 2 =*/402).string(message.country); + if (message.searchCode != null && Object.hasOwnProperty.call(message, "searchCode")) + writer.uint32(/* id 51, wireType 2 =*/410).string(message.searchCode); + return writer; + }; + + /** + * Encodes the specified Car message, length delimited. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.ICar} message Car message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Car.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Car message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Car + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Car} Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Car.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Car(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.userId = reader.uint32(); + break; + } + case 3: { + message.regionId = reader.uint32(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + case 5: { + message.manufacturer = reader.uint32(); + break; + } + case 6: { + message.model = reader.uint32(); + break; + } + case 7: { + message.visualModel = reader.uint32(); + break; + } + case 8: { + message.defaultColor = reader.uint32(); + break; + } + case 9: { + message.customColor = reader.uint32(); + break; + } + case 10: { + message.wheel = reader.uint32(); + break; + } + case 11: { + message.wheelColor = reader.uint32(); + break; + } + case 12: { + message.aero = reader.uint32(); + break; + } + case 13: { + message.bonnet = reader.uint32(); + break; + } + case 14: { + message.wing = reader.uint32(); + break; + } + case 15: { + message.gtWing = $root.wm.protobuf.GTWing.decode(reader, reader.uint32()); + break; + } + case 16: { + message.mirror = reader.uint32(); + break; + } + case 24: { + message.neon = reader.uint32(); + break; + } + case 25: { + message.trunk = reader.uint32(); + break; + } + case 26: { + message.plate = reader.uint32(); + break; + } + case 27: { + message.plateColor = reader.uint32(); + break; + } + case 28: { + message.plateNumber = reader.uint32(); + break; + } + case 31: { + message.tunePower = reader.uint32(); + break; + } + case 32: { + message.tuneHandling = reader.uint32(); + break; + } + case 33: { + message.title = reader.string(); + break; + } + case 34: { + message.level = reader.uint32(); + break; + } + case 35: { + message.windowSticker = reader.bool(); + break; + } + case 37: { + message.windowStickerString = reader.string(); + break; + } + case 38: { + message.windowStickerFont = reader.uint32(); + break; + } + case 39: { + message.windowDecoration = reader.uint32(); + break; + } + case 41: { + message.rivalMarker = reader.uint32(); + break; + } + case 45: { + message.lastPlayedAt = reader.uint32(); + break; + } + case 46: { + message.lastPlayedPlace = $root.wm.protobuf.Place.decode(reader, reader.uint32()); + break; + } + case 47: { + message.aura = reader.uint32(); + break; + } + case 48: { + message.auraMotif = reader.uint32(); + break; + } + case 49: { + message.ghostLevel = reader.uint32(); + break; + } + case 50: { + message.country = reader.string(); + break; + } + case 51: { + message.searchCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("customColor")) + throw $util.ProtocolError("missing required 'customColor'", { instance: message }); + if (!message.hasOwnProperty("wheel")) + throw $util.ProtocolError("missing required 'wheel'", { instance: message }); + if (!message.hasOwnProperty("wheelColor")) + throw $util.ProtocolError("missing required 'wheelColor'", { instance: message }); + if (!message.hasOwnProperty("aero")) + throw $util.ProtocolError("missing required 'aero'", { instance: message }); + if (!message.hasOwnProperty("bonnet")) + throw $util.ProtocolError("missing required 'bonnet'", { instance: message }); + if (!message.hasOwnProperty("wing")) + throw $util.ProtocolError("missing required 'wing'", { instance: message }); + if (!message.hasOwnProperty("mirror")) + throw $util.ProtocolError("missing required 'mirror'", { instance: message }); + if (!message.hasOwnProperty("neon")) + throw $util.ProtocolError("missing required 'neon'", { instance: message }); + if (!message.hasOwnProperty("trunk")) + throw $util.ProtocolError("missing required 'trunk'", { instance: message }); + if (!message.hasOwnProperty("plate")) + throw $util.ProtocolError("missing required 'plate'", { instance: message }); + if (!message.hasOwnProperty("plateColor")) + throw $util.ProtocolError("missing required 'plateColor'", { instance: message }); + if (!message.hasOwnProperty("plateNumber")) + throw $util.ProtocolError("missing required 'plateNumber'", { instance: message }); + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("title")) + throw $util.ProtocolError("missing required 'title'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + return message; + }; + + /** + * Decodes a Car message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Car + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Car} Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Car.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Car message. + * @function verify + * @memberof wm.protobuf.Car + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Car.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.regionId != null && message.hasOwnProperty("regionId")) + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + if (!$util.isInteger(message.manufacturer)) + return "manufacturer: integer expected"; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isInteger(message.model)) + return "model: integer expected"; + if (message.visualModel != null && message.hasOwnProperty("visualModel")) + if (!$util.isInteger(message.visualModel)) + return "visualModel: integer expected"; + if (message.defaultColor != null && message.hasOwnProperty("defaultColor")) + if (!$util.isInteger(message.defaultColor)) + return "defaultColor: integer expected"; + if (!$util.isInteger(message.customColor)) + return "customColor: integer expected"; + if (!$util.isInteger(message.wheel)) + return "wheel: integer expected"; + if (!$util.isInteger(message.wheelColor)) + return "wheelColor: integer expected"; + if (!$util.isInteger(message.aero)) + return "aero: integer expected"; + if (!$util.isInteger(message.bonnet)) + return "bonnet: integer expected"; + if (!$util.isInteger(message.wing)) + return "wing: integer expected"; + if (message.gtWing != null && message.hasOwnProperty("gtWing")) { + let error = $root.wm.protobuf.GTWing.verify(message.gtWing); + if (error) + return "gtWing." + error; + } + if (!$util.isInteger(message.mirror)) + return "mirror: integer expected"; + if (!$util.isInteger(message.neon)) + return "neon: integer expected"; + if (!$util.isInteger(message.trunk)) + return "trunk: integer expected"; + if (!$util.isInteger(message.plate)) + return "plate: integer expected"; + if (!$util.isInteger(message.plateColor)) + return "plateColor: integer expected"; + if (!$util.isInteger(message.plateNumber)) + return "plateNumber: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isString(message.title)) + return "title: string expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + if (message.windowSticker != null && message.hasOwnProperty("windowSticker")) + if (typeof message.windowSticker !== "boolean") + return "windowSticker: boolean expected"; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + if (!$util.isString(message.windowStickerString)) + return "windowStickerString: string expected"; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + if (!$util.isInteger(message.windowStickerFont)) + return "windowStickerFont: integer expected"; + if (message.windowDecoration != null && message.hasOwnProperty("windowDecoration")) + if (!$util.isInteger(message.windowDecoration)) + return "windowDecoration: integer expected"; + if (message.rivalMarker != null && message.hasOwnProperty("rivalMarker")) + if (!$util.isInteger(message.rivalMarker)) + return "rivalMarker: integer expected"; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + if (!$util.isInteger(message.lastPlayedAt)) + return "lastPlayedAt: integer expected"; + if (message.lastPlayedPlace != null && message.hasOwnProperty("lastPlayedPlace")) { + let error = $root.wm.protobuf.Place.verify(message.lastPlayedPlace); + if (error) + return "lastPlayedPlace." + error; + } + if (message.aura != null && message.hasOwnProperty("aura")) + if (!$util.isInteger(message.aura)) + return "aura: integer expected"; + if (message.auraMotif != null && message.hasOwnProperty("auraMotif")) + if (!$util.isInteger(message.auraMotif)) + return "auraMotif: integer expected"; + if (message.ghostLevel != null && message.hasOwnProperty("ghostLevel")) + if (!$util.isInteger(message.ghostLevel)) + return "ghostLevel: integer expected"; + if (message.country != null && message.hasOwnProperty("country")) + if (!$util.isString(message.country)) + return "country: string expected"; + if (message.searchCode != null && message.hasOwnProperty("searchCode")) + if (!$util.isString(message.searchCode)) + return "searchCode: string expected"; + return null; + }; + + /** + * Creates a Car message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Car + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Car} Car + */ + Car.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Car) + return object; + let message = new $root.wm.protobuf.Car(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.manufacturer != null) + message.manufacturer = object.manufacturer >>> 0; + if (object.model != null) + message.model = object.model >>> 0; + if (object.visualModel != null) + message.visualModel = object.visualModel >>> 0; + if (object.defaultColor != null) + message.defaultColor = object.defaultColor >>> 0; + if (object.customColor != null) + message.customColor = object.customColor >>> 0; + if (object.wheel != null) + message.wheel = object.wheel >>> 0; + if (object.wheelColor != null) + message.wheelColor = object.wheelColor >>> 0; + if (object.aero != null) + message.aero = object.aero >>> 0; + if (object.bonnet != null) + message.bonnet = object.bonnet >>> 0; + if (object.wing != null) + message.wing = object.wing >>> 0; + if (object.gtWing != null) { + if (typeof object.gtWing !== "object") + throw TypeError(".wm.protobuf.Car.gtWing: object expected"); + message.gtWing = $root.wm.protobuf.GTWing.fromObject(object.gtWing); + } + if (object.mirror != null) + message.mirror = object.mirror >>> 0; + if (object.neon != null) + message.neon = object.neon >>> 0; + if (object.trunk != null) + message.trunk = object.trunk >>> 0; + if (object.plate != null) + message.plate = object.plate >>> 0; + if (object.plateColor != null) + message.plateColor = object.plateColor >>> 0; + if (object.plateNumber != null) + message.plateNumber = object.plateNumber >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.title != null) + message.title = String(object.title); + if (object.level != null) + message.level = object.level >>> 0; + if (object.windowSticker != null) + message.windowSticker = Boolean(object.windowSticker); + if (object.windowStickerString != null) + message.windowStickerString = String(object.windowStickerString); + if (object.windowStickerFont != null) + message.windowStickerFont = object.windowStickerFont >>> 0; + if (object.windowDecoration != null) + message.windowDecoration = object.windowDecoration >>> 0; + if (object.rivalMarker != null) + message.rivalMarker = object.rivalMarker >>> 0; + if (object.lastPlayedAt != null) + message.lastPlayedAt = object.lastPlayedAt >>> 0; + if (object.lastPlayedPlace != null) { + if (typeof object.lastPlayedPlace !== "object") + throw TypeError(".wm.protobuf.Car.lastPlayedPlace: object expected"); + message.lastPlayedPlace = $root.wm.protobuf.Place.fromObject(object.lastPlayedPlace); + } + if (object.aura != null) + message.aura = object.aura >>> 0; + if (object.auraMotif != null) + message.auraMotif = object.auraMotif >>> 0; + if (object.ghostLevel != null) + message.ghostLevel = object.ghostLevel >>> 0; + if (object.country != null) + message.country = String(object.country); + if (object.searchCode != null) + message.searchCode = String(object.searchCode); + return message; + }; + + /** + * Creates a plain object from a Car message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.Car} message Car + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Car.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.userId = 0; + object.regionId = 0; + object.name = ""; + object.manufacturer = 0; + object.model = 0; + object.visualModel = 0; + object.defaultColor = 0; + object.customColor = 0; + object.wheel = 0; + object.wheelColor = 0; + object.aero = 0; + object.bonnet = 0; + object.wing = 0; + object.gtWing = null; + object.mirror = 0; + object.neon = 0; + object.trunk = 0; + object.plate = 0; + object.plateColor = 0; + object.plateNumber = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.title = ""; + object.level = 0; + object.windowSticker = false; + object.windowStickerString = ""; + object.windowStickerFont = 0; + object.windowDecoration = 0; + object.rivalMarker = 0; + object.lastPlayedAt = 0; + object.lastPlayedPlace = null; + object.aura = 0; + object.auraMotif = 0; + object.ghostLevel = 0; + object.country = ""; + object.searchCode = ""; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + object.manufacturer = message.manufacturer; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.visualModel != null && message.hasOwnProperty("visualModel")) + object.visualModel = message.visualModel; + if (message.defaultColor != null && message.hasOwnProperty("defaultColor")) + object.defaultColor = message.defaultColor; + if (message.customColor != null && message.hasOwnProperty("customColor")) + object.customColor = message.customColor; + if (message.wheel != null && message.hasOwnProperty("wheel")) + object.wheel = message.wheel; + if (message.wheelColor != null && message.hasOwnProperty("wheelColor")) + object.wheelColor = message.wheelColor; + if (message.aero != null && message.hasOwnProperty("aero")) + object.aero = message.aero; + if (message.bonnet != null && message.hasOwnProperty("bonnet")) + object.bonnet = message.bonnet; + if (message.wing != null && message.hasOwnProperty("wing")) + object.wing = message.wing; + if (message.gtWing != null && message.hasOwnProperty("gtWing")) + object.gtWing = $root.wm.protobuf.GTWing.toObject(message.gtWing, options); + if (message.mirror != null && message.hasOwnProperty("mirror")) + object.mirror = message.mirror; + if (message.neon != null && message.hasOwnProperty("neon")) + object.neon = message.neon; + if (message.trunk != null && message.hasOwnProperty("trunk")) + object.trunk = message.trunk; + if (message.plate != null && message.hasOwnProperty("plate")) + object.plate = message.plate; + if (message.plateColor != null && message.hasOwnProperty("plateColor")) + object.plateColor = message.plateColor; + if (message.plateNumber != null && message.hasOwnProperty("plateNumber")) + object.plateNumber = message.plateNumber; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + if (message.windowSticker != null && message.hasOwnProperty("windowSticker")) + object.windowSticker = message.windowSticker; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + object.windowStickerString = message.windowStickerString; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + object.windowStickerFont = message.windowStickerFont; + if (message.windowDecoration != null && message.hasOwnProperty("windowDecoration")) + object.windowDecoration = message.windowDecoration; + if (message.rivalMarker != null && message.hasOwnProperty("rivalMarker")) + object.rivalMarker = message.rivalMarker; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + object.lastPlayedAt = message.lastPlayedAt; + if (message.lastPlayedPlace != null && message.hasOwnProperty("lastPlayedPlace")) + object.lastPlayedPlace = $root.wm.protobuf.Place.toObject(message.lastPlayedPlace, options); + if (message.aura != null && message.hasOwnProperty("aura")) + object.aura = message.aura; + if (message.auraMotif != null && message.hasOwnProperty("auraMotif")) + object.auraMotif = message.auraMotif; + if (message.ghostLevel != null && message.hasOwnProperty("ghostLevel")) + object.ghostLevel = message.ghostLevel; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + if (message.searchCode != null && message.hasOwnProperty("searchCode")) + object.searchCode = message.searchCode; + return object; + }; + + /** + * Converts this Car to JSON. + * @function toJSON + * @memberof wm.protobuf.Car + * @instance + * @returns {Object.} JSON object + */ + Car.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Car + * @function getTypeUrl + * @memberof wm.protobuf.Car + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Car.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Car"; + }; + + return Car; + })(); + + protobuf.CarSetting = (function() { + + /** + * Properties of a CarSetting. + * @memberof wm.protobuf + * @interface ICarSetting + * @property {number|null} [carId] CarSetting carId + * @property {boolean} view CarSetting view + * @property {boolean} transmission CarSetting transmission + * @property {boolean} retire CarSetting retire + * @property {number} meter CarSetting meter + * @property {boolean} navigationMap CarSetting navigationMap + * @property {number} volume CarSetting volume + * @property {number} bgm CarSetting bgm + * @property {number} nameplate CarSetting nameplate + * @property {number} nameplateColor CarSetting nameplateColor + * @property {number} terminalBackground CarSetting terminalBackground + */ + + /** + * Constructs a new CarSetting. + * @memberof wm.protobuf + * @classdesc Represents a CarSetting. + * @implements ICarSetting + * @constructor + * @param {wm.protobuf.ICarSetting=} [properties] Properties to set + */ + function CarSetting(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarSetting carId. + * @member {number} carId + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.carId = 0; + + /** + * CarSetting view. + * @member {boolean} view + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.view = false; + + /** + * CarSetting transmission. + * @member {boolean} transmission + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.transmission = false; + + /** + * CarSetting retire. + * @member {boolean} retire + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.retire = false; + + /** + * CarSetting meter. + * @member {number} meter + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.meter = 0; + + /** + * CarSetting navigationMap. + * @member {boolean} navigationMap + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.navigationMap = false; + + /** + * CarSetting volume. + * @member {number} volume + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.volume = 0; + + /** + * CarSetting bgm. + * @member {number} bgm + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.bgm = 0; + + /** + * CarSetting nameplate. + * @member {number} nameplate + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.nameplate = 0; + + /** + * CarSetting nameplateColor. + * @member {number} nameplateColor + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.nameplateColor = 0; + + /** + * CarSetting terminalBackground. + * @member {number} terminalBackground + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.terminalBackground = 0; + + /** + * Creates a new CarSetting instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.ICarSetting=} [properties] Properties to set + * @returns {wm.protobuf.CarSetting} CarSetting instance + */ + CarSetting.create = function create(properties) { + return new CarSetting(properties); + }; + + /** + * Encodes the specified CarSetting message. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.ICarSetting} message CarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.view); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.transmission); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.retire); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.meter); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.navigationMap); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.volume); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.bgm); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.nameplate); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.nameplateColor); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.terminalBackground); + return writer; + }; + + /** + * Encodes the specified CarSetting message, length delimited. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.ICarSetting} message CarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarSetting message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarSetting} CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarSetting(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.view = reader.bool(); + break; + } + case 3: { + message.transmission = reader.bool(); + break; + } + case 4: { + message.retire = reader.bool(); + break; + } + case 5: { + message.meter = reader.uint32(); + break; + } + case 6: { + message.navigationMap = reader.bool(); + break; + } + case 7: { + message.volume = reader.uint32(); + break; + } + case 8: { + message.bgm = reader.uint32(); + break; + } + case 9: { + message.nameplate = reader.uint32(); + break; + } + case 10: { + message.nameplateColor = reader.uint32(); + break; + } + case 13: { + message.terminalBackground = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("view")) + throw $util.ProtocolError("missing required 'view'", { instance: message }); + if (!message.hasOwnProperty("transmission")) + throw $util.ProtocolError("missing required 'transmission'", { instance: message }); + if (!message.hasOwnProperty("retire")) + throw $util.ProtocolError("missing required 'retire'", { instance: message }); + if (!message.hasOwnProperty("meter")) + throw $util.ProtocolError("missing required 'meter'", { instance: message }); + if (!message.hasOwnProperty("navigationMap")) + throw $util.ProtocolError("missing required 'navigationMap'", { instance: message }); + if (!message.hasOwnProperty("volume")) + throw $util.ProtocolError("missing required 'volume'", { instance: message }); + if (!message.hasOwnProperty("bgm")) + throw $util.ProtocolError("missing required 'bgm'", { instance: message }); + if (!message.hasOwnProperty("nameplate")) + throw $util.ProtocolError("missing required 'nameplate'", { instance: message }); + if (!message.hasOwnProperty("nameplateColor")) + throw $util.ProtocolError("missing required 'nameplateColor'", { instance: message }); + if (!message.hasOwnProperty("terminalBackground")) + throw $util.ProtocolError("missing required 'terminalBackground'", { instance: message }); + return message; + }; + + /** + * Decodes a CarSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarSetting} CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarSetting message. + * @function verify + * @memberof wm.protobuf.CarSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (typeof message.view !== "boolean") + return "view: boolean expected"; + if (typeof message.transmission !== "boolean") + return "transmission: boolean expected"; + if (typeof message.retire !== "boolean") + return "retire: boolean expected"; + if (!$util.isInteger(message.meter)) + return "meter: integer expected"; + if (typeof message.navigationMap !== "boolean") + return "navigationMap: boolean expected"; + if (!$util.isInteger(message.volume)) + return "volume: integer expected"; + if (!$util.isInteger(message.bgm)) + return "bgm: integer expected"; + if (!$util.isInteger(message.nameplate)) + return "nameplate: integer expected"; + if (!$util.isInteger(message.nameplateColor)) + return "nameplateColor: integer expected"; + if (!$util.isInteger(message.terminalBackground)) + return "terminalBackground: integer expected"; + return null; + }; + + /** + * Creates a CarSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarSetting + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarSetting} CarSetting + */ + CarSetting.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarSetting) + return object; + let message = new $root.wm.protobuf.CarSetting(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.view != null) + message.view = Boolean(object.view); + if (object.transmission != null) + message.transmission = Boolean(object.transmission); + if (object.retire != null) + message.retire = Boolean(object.retire); + if (object.meter != null) + message.meter = object.meter >>> 0; + if (object.navigationMap != null) + message.navigationMap = Boolean(object.navigationMap); + if (object.volume != null) + message.volume = object.volume >>> 0; + if (object.bgm != null) + message.bgm = object.bgm >>> 0; + if (object.nameplate != null) + message.nameplate = object.nameplate >>> 0; + if (object.nameplateColor != null) + message.nameplateColor = object.nameplateColor >>> 0; + if (object.terminalBackground != null) + message.terminalBackground = object.terminalBackground >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.CarSetting} message CarSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.view = false; + object.transmission = false; + object.retire = false; + object.meter = 0; + object.navigationMap = false; + object.volume = 0; + object.bgm = 0; + object.nameplate = 0; + object.nameplateColor = 0; + object.terminalBackground = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.view != null && message.hasOwnProperty("view")) + object.view = message.view; + if (message.transmission != null && message.hasOwnProperty("transmission")) + object.transmission = message.transmission; + if (message.retire != null && message.hasOwnProperty("retire")) + object.retire = message.retire; + if (message.meter != null && message.hasOwnProperty("meter")) + object.meter = message.meter; + if (message.navigationMap != null && message.hasOwnProperty("navigationMap")) + object.navigationMap = message.navigationMap; + if (message.volume != null && message.hasOwnProperty("volume")) + object.volume = message.volume; + if (message.bgm != null && message.hasOwnProperty("bgm")) + object.bgm = message.bgm; + if (message.nameplate != null && message.hasOwnProperty("nameplate")) + object.nameplate = message.nameplate; + if (message.nameplateColor != null && message.hasOwnProperty("nameplateColor")) + object.nameplateColor = message.nameplateColor; + if (message.terminalBackground != null && message.hasOwnProperty("terminalBackground")) + object.terminalBackground = message.terminalBackground; + return object; + }; + + /** + * Converts this CarSetting to JSON. + * @function toJSON + * @memberof wm.protobuf.CarSetting + * @instance + * @returns {Object.} JSON object + */ + CarSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarSetting + * @function getTypeUrl + * @memberof wm.protobuf.CarSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarSetting"; + }; + + return CarSetting; + })(); + + protobuf.GTWing = (function() { + + /** + * Properties of a GTWing. + * @memberof wm.protobuf + * @interface IGTWing + * @property {number} pillar GTWing pillar + * @property {number} pillarMaterial GTWing pillarMaterial + * @property {number} mainWing GTWing mainWing + * @property {number} mainWingColor GTWing mainWingColor + * @property {number} wingTip GTWing wingTip + * @property {number} material GTWing material + */ + + /** + * Constructs a new GTWing. + * @memberof wm.protobuf + * @classdesc Represents a GTWing. + * @implements IGTWing + * @constructor + * @param {wm.protobuf.IGTWing=} [properties] Properties to set + */ + function GTWing(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GTWing pillar. + * @member {number} pillar + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.pillar = 0; + + /** + * GTWing pillarMaterial. + * @member {number} pillarMaterial + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.pillarMaterial = 0; + + /** + * GTWing mainWing. + * @member {number} mainWing + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.mainWing = 0; + + /** + * GTWing mainWingColor. + * @member {number} mainWingColor + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.mainWingColor = 0; + + /** + * GTWing wingTip. + * @member {number} wingTip + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.wingTip = 0; + + /** + * GTWing material. + * @member {number} material + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.material = 0; + + /** + * Creates a new GTWing instance using the specified properties. + * @function create + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.IGTWing=} [properties] Properties to set + * @returns {wm.protobuf.GTWing} GTWing instance + */ + GTWing.create = function create(properties) { + return new GTWing(properties); + }; + + /** + * Encodes the specified GTWing message. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.IGTWing} message GTWing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GTWing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.pillar); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.pillarMaterial); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.mainWing); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mainWingColor); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.wingTip); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.material); + return writer; + }; + + /** + * Encodes the specified GTWing message, length delimited. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.IGTWing} message GTWing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GTWing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GTWing message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GTWing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GTWing} GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GTWing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GTWing(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pillar = reader.uint32(); + break; + } + case 2: { + message.pillarMaterial = reader.uint32(); + break; + } + case 3: { + message.mainWing = reader.uint32(); + break; + } + case 4: { + message.mainWingColor = reader.uint32(); + break; + } + case 5: { + message.wingTip = reader.uint32(); + break; + } + case 6: { + message.material = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("pillar")) + throw $util.ProtocolError("missing required 'pillar'", { instance: message }); + if (!message.hasOwnProperty("pillarMaterial")) + throw $util.ProtocolError("missing required 'pillarMaterial'", { instance: message }); + if (!message.hasOwnProperty("mainWing")) + throw $util.ProtocolError("missing required 'mainWing'", { instance: message }); + if (!message.hasOwnProperty("mainWingColor")) + throw $util.ProtocolError("missing required 'mainWingColor'", { instance: message }); + if (!message.hasOwnProperty("wingTip")) + throw $util.ProtocolError("missing required 'wingTip'", { instance: message }); + if (!message.hasOwnProperty("material")) + throw $util.ProtocolError("missing required 'material'", { instance: message }); + return message; + }; + + /** + * Decodes a GTWing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GTWing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GTWing} GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GTWing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GTWing message. + * @function verify + * @memberof wm.protobuf.GTWing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GTWing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.pillar)) + return "pillar: integer expected"; + if (!$util.isInteger(message.pillarMaterial)) + return "pillarMaterial: integer expected"; + if (!$util.isInteger(message.mainWing)) + return "mainWing: integer expected"; + if (!$util.isInteger(message.mainWingColor)) + return "mainWingColor: integer expected"; + if (!$util.isInteger(message.wingTip)) + return "wingTip: integer expected"; + if (!$util.isInteger(message.material)) + return "material: integer expected"; + return null; + }; + + /** + * Creates a GTWing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GTWing + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GTWing} GTWing + */ + GTWing.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GTWing) + return object; + let message = new $root.wm.protobuf.GTWing(); + if (object.pillar != null) + message.pillar = object.pillar >>> 0; + if (object.pillarMaterial != null) + message.pillarMaterial = object.pillarMaterial >>> 0; + if (object.mainWing != null) + message.mainWing = object.mainWing >>> 0; + if (object.mainWingColor != null) + message.mainWingColor = object.mainWingColor >>> 0; + if (object.wingTip != null) + message.wingTip = object.wingTip >>> 0; + if (object.material != null) + message.material = object.material >>> 0; + return message; + }; + + /** + * Creates a plain object from a GTWing message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.GTWing} message GTWing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GTWing.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.pillar = 0; + object.pillarMaterial = 0; + object.mainWing = 0; + object.mainWingColor = 0; + object.wingTip = 0; + object.material = 0; + } + if (message.pillar != null && message.hasOwnProperty("pillar")) + object.pillar = message.pillar; + if (message.pillarMaterial != null && message.hasOwnProperty("pillarMaterial")) + object.pillarMaterial = message.pillarMaterial; + if (message.mainWing != null && message.hasOwnProperty("mainWing")) + object.mainWing = message.mainWing; + if (message.mainWingColor != null && message.hasOwnProperty("mainWingColor")) + object.mainWingColor = message.mainWingColor; + if (message.wingTip != null && message.hasOwnProperty("wingTip")) + object.wingTip = message.wingTip; + if (message.material != null && message.hasOwnProperty("material")) + object.material = message.material; + return object; + }; + + /** + * Converts this GTWing to JSON. + * @function toJSON + * @memberof wm.protobuf.GTWing + * @instance + * @returns {Object.} JSON object + */ + GTWing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GTWing + * @function getTypeUrl + * @memberof wm.protobuf.GTWing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GTWing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GTWing"; + }; + + return GTWing; + })(); + + protobuf.CarItem = (function() { + + /** + * Properties of a CarItem. + * @memberof wm.protobuf + * @interface ICarItem + * @property {wm.protobuf.ItemCategory} category CarItem category + * @property {number} itemId CarItem itemId + * @property {number|null} [amount] CarItem amount + */ + + /** + * Constructs a new CarItem. + * @memberof wm.protobuf + * @classdesc Represents a CarItem. + * @implements ICarItem + * @constructor + * @param {wm.protobuf.ICarItem=} [properties] Properties to set + */ + function CarItem(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarItem category. + * @member {wm.protobuf.ItemCategory} category + * @memberof wm.protobuf.CarItem + * @instance + */ + CarItem.prototype.category = 1; + + /** + * CarItem itemId. + * @member {number} itemId + * @memberof wm.protobuf.CarItem + * @instance + */ + CarItem.prototype.itemId = 0; + + /** + * CarItem amount. + * @member {number} amount + * @memberof wm.protobuf.CarItem + * @instance + */ + CarItem.prototype.amount = 0; + + /** + * Creates a new CarItem instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.ICarItem=} [properties] Properties to set + * @returns {wm.protobuf.CarItem} CarItem instance + */ + CarItem.create = function create(properties) { + return new CarItem(properties); + }; + + /** + * Encodes the specified CarItem message. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.ICarItem} message CarItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.itemId); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.amount); + return writer; + }; + + /** + * Encodes the specified CarItem message, length delimited. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.ICarItem} message CarItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarItem message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarItem} CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarItem(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.itemId = reader.uint32(); + break; + } + case 3: { + message.amount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("category")) + throw $util.ProtocolError("missing required 'category'", { instance: message }); + if (!message.hasOwnProperty("itemId")) + throw $util.ProtocolError("missing required 'itemId'", { instance: message }); + return message; + }; + + /** + * Decodes a CarItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarItem} CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarItem message. + * @function verify + * @memberof wm.protobuf.CarItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.category) { + default: + return "category: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + case 10: + case 12: + case 14: + case 15: + case 16: + case 17: + case 19: + case 22: + case 24: + case 25: + case 26: + case 27: + case 28: + case 201: + case 202: + case 203: + case 300: + case 301: + break; + } + if (!$util.isInteger(message.itemId)) + return "itemId: integer expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isInteger(message.amount)) + return "amount: integer expected"; + return null; + }; + + /** + * Creates a CarItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarItem + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarItem} CarItem + */ + CarItem.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarItem) + return object; + let message = new $root.wm.protobuf.CarItem(); + switch (object.category) { + case "CAT_CUSTOM_COLOR": + case 1: + message.category = 1; + break; + case "CAT_WHEEL": + case 2: + message.category = 2; + break; + case "CAT_AERO": + case 3: + message.category = 3; + break; + case "CAT_BONNET": + case 4: + message.category = 4; + break; + case "CAT_WING": + case 5: + message.category = 5; + break; + case "CAT_MIRROR": + case 6: + message.category = 6; + break; + case "CAT_NEON": + case 8: + message.category = 8; + break; + case "CAT_TRUNK": + case 9: + message.category = 9; + break; + case "CAT_NUMBER_PLATE": + case 10: + message.category = 10; + break; + case "CAT_GT_WING": + case 12: + message.category = 12; + break; + case "CAT_AURA_MOTIF": + case 14: + message.category = 14; + break; + case "CAT_METER": + case 15: + message.category = 15; + break; + case "CAT_BGM": + case 16: + message.category = 16; + break; + case "CAT_NAME_PLATE": + case 17: + message.category = 17; + break; + case "CAT_NUMBER": + case 19: + message.category = 19; + break; + case "CAT_BGM_TRACK": + case 22: + message.category = 22; + break; + case "CAT_WINDOW_STICKER_FONT": + case 24: + message.category = 24; + break; + case "CAT_WINDOW_DECORATION": + case 25: + message.category = 25; + break; + case "CAT_RIVAL_MARKER": + case 26: + message.category = 26; + break; + case "CAT_STAMP": + case 27: + message.category = 27; + break; + case "CAT_TERMINAL_BACKGROUND": + case 28: + message.category = 28; + break; + case "CAT_CAR_TICKET": + case 201: + message.category = 201; + break; + case "CAT_CONSUMPTION_ITEM": + case 202: + message.category = 202; + break; + case "CAT_CAR_TICKET_FREE": + case 203: + message.category = 203; + break; + case "CAT_AERO_FULLSET": + case 300: + message.category = 300; + break; + case "CAT_AERO_LIMITED": + case 301: + message.category = 301; + break; + } + if (object.itemId != null) + message.itemId = object.itemId >>> 0; + if (object.amount != null) + message.amount = object.amount >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarItem message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.CarItem} message CarItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.category = options.enums === String ? "CAT_CUSTOM_COLOR" : 1; + object.itemId = 0; + object.amount = 0; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.wm.protobuf.ItemCategory[message.category] : message.category; + if (message.itemId != null && message.hasOwnProperty("itemId")) + object.itemId = message.itemId; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this CarItem to JSON. + * @function toJSON + * @memberof wm.protobuf.CarItem + * @instance + * @returns {Object.} JSON object + */ + CarItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarItem + * @function getTypeUrl + * @memberof wm.protobuf.CarItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarItem"; + }; + + return CarItem; + })(); + + protobuf.CopiedCar = (function() { + + /** + * Properties of a CopiedCar. + * @memberof wm.protobuf + * @interface ICopiedCar + * @property {wm.protobuf.ICar} car CopiedCar car + * @property {number} remainingPlayCounts CopiedCar remainingPlayCounts + */ + + /** + * Constructs a new CopiedCar. + * @memberof wm.protobuf + * @classdesc Represents a CopiedCar. + * @implements ICopiedCar + * @constructor + * @param {wm.protobuf.ICopiedCar=} [properties] Properties to set + */ + function CopiedCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CopiedCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.CopiedCar + * @instance + */ + CopiedCar.prototype.car = null; + + /** + * CopiedCar remainingPlayCounts. + * @member {number} remainingPlayCounts + * @memberof wm.protobuf.CopiedCar + * @instance + */ + CopiedCar.prototype.remainingPlayCounts = 0; + + /** + * Creates a new CopiedCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.ICopiedCar=} [properties] Properties to set + * @returns {wm.protobuf.CopiedCar} CopiedCar instance + */ + CopiedCar.create = function create(properties) { + return new CopiedCar(properties); + }; + + /** + * Encodes the specified CopiedCar message. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.ICopiedCar} message CopiedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopiedCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.remainingPlayCounts); + return writer; + }; + + /** + * Encodes the specified CopiedCar message, length delimited. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.ICopiedCar} message CopiedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopiedCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CopiedCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CopiedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CopiedCar} CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopiedCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CopiedCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.remainingPlayCounts = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("remainingPlayCounts")) + throw $util.ProtocolError("missing required 'remainingPlayCounts'", { instance: message }); + return message; + }; + + /** + * Decodes a CopiedCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CopiedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CopiedCar} CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopiedCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CopiedCar message. + * @function verify + * @memberof wm.protobuf.CopiedCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CopiedCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.remainingPlayCounts)) + return "remainingPlayCounts: integer expected"; + return null; + }; + + /** + * Creates a CopiedCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CopiedCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CopiedCar} CopiedCar + */ + CopiedCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CopiedCar) + return object; + let message = new $root.wm.protobuf.CopiedCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.CopiedCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.remainingPlayCounts != null) + message.remainingPlayCounts = object.remainingPlayCounts >>> 0; + return message; + }; + + /** + * Creates a plain object from a CopiedCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.CopiedCar} message CopiedCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CopiedCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.remainingPlayCounts = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.remainingPlayCounts != null && message.hasOwnProperty("remainingPlayCounts")) + object.remainingPlayCounts = message.remainingPlayCounts; + return object; + }; + + /** + * Converts this CopiedCar to JSON. + * @function toJSON + * @memberof wm.protobuf.CopiedCar + * @instance + * @returns {Object.} JSON object + */ + CopiedCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CopiedCar + * @function getTypeUrl + * @memberof wm.protobuf.CopiedCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CopiedCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CopiedCar"; + }; + + return CopiedCar; + })(); + + protobuf.FriendCar = (function() { + + /** + * Properties of a FriendCar. + * @memberof wm.protobuf + * @interface IFriendCar + * @property {wm.protobuf.ICar} car FriendCar car + * @property {number|null} [friendshipLevel] FriendCar friendshipLevel + * @property {boolean} nonhuman FriendCar nonhuman + */ + + /** + * Constructs a new FriendCar. + * @memberof wm.protobuf + * @classdesc Represents a FriendCar. + * @implements IFriendCar + * @constructor + * @param {wm.protobuf.IFriendCar=} [properties] Properties to set + */ + function FriendCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FriendCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.FriendCar + * @instance + */ + FriendCar.prototype.car = null; + + /** + * FriendCar friendshipLevel. + * @member {number} friendshipLevel + * @memberof wm.protobuf.FriendCar + * @instance + */ + FriendCar.prototype.friendshipLevel = 0; + + /** + * FriendCar nonhuman. + * @member {boolean} nonhuman + * @memberof wm.protobuf.FriendCar + * @instance + */ + FriendCar.prototype.nonhuman = false; + + /** + * Creates a new FriendCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.IFriendCar=} [properties] Properties to set + * @returns {wm.protobuf.FriendCar} FriendCar instance + */ + FriendCar.create = function create(properties) { + return new FriendCar(properties); + }; + + /** + * Encodes the specified FriendCar message. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.IFriendCar} message FriendCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FriendCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.friendshipLevel != null && Object.hasOwnProperty.call(message, "friendshipLevel")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.friendshipLevel); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.nonhuman); + return writer; + }; + + /** + * Encodes the specified FriendCar message, length delimited. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.IFriendCar} message FriendCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FriendCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FriendCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.FriendCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.FriendCar} FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FriendCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.FriendCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.friendshipLevel = reader.uint32(); + break; + } + case 3: { + message.nonhuman = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("nonhuman")) + throw $util.ProtocolError("missing required 'nonhuman'", { instance: message }); + return message; + }; + + /** + * Decodes a FriendCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.FriendCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.FriendCar} FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FriendCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FriendCar message. + * @function verify + * @memberof wm.protobuf.FriendCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FriendCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.friendshipLevel != null && message.hasOwnProperty("friendshipLevel")) + if (!$util.isInteger(message.friendshipLevel)) + return "friendshipLevel: integer expected"; + if (typeof message.nonhuman !== "boolean") + return "nonhuman: boolean expected"; + return null; + }; + + /** + * Creates a FriendCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.FriendCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.FriendCar} FriendCar + */ + FriendCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.FriendCar) + return object; + let message = new $root.wm.protobuf.FriendCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.FriendCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.friendshipLevel != null) + message.friendshipLevel = object.friendshipLevel >>> 0; + if (object.nonhuman != null) + message.nonhuman = Boolean(object.nonhuman); + return message; + }; + + /** + * Creates a plain object from a FriendCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.FriendCar} message FriendCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FriendCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.friendshipLevel = 0; + object.nonhuman = false; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.friendshipLevel != null && message.hasOwnProperty("friendshipLevel")) + object.friendshipLevel = message.friendshipLevel; + if (message.nonhuman != null && message.hasOwnProperty("nonhuman")) + object.nonhuman = message.nonhuman; + return object; + }; + + /** + * Converts this FriendCar to JSON. + * @function toJSON + * @memberof wm.protobuf.FriendCar + * @instance + * @returns {Object.} JSON object + */ + FriendCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FriendCar + * @function getTypeUrl + * @memberof wm.protobuf.FriendCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FriendCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.FriendCar"; + }; + + return FriendCar; + })(); + + protobuf.ChallengerCar = (function() { + + /** + * Properties of a ChallengerCar. + * @memberof wm.protobuf + * @interface IChallengerCar + * @property {wm.protobuf.ICar} car ChallengerCar car + * @property {number} stamp ChallengerCar stamp + * @property {number} result ChallengerCar result + * @property {number} area ChallengerCar area + */ + + /** + * Constructs a new ChallengerCar. + * @memberof wm.protobuf + * @classdesc Represents a ChallengerCar. + * @implements IChallengerCar + * @constructor + * @param {wm.protobuf.IChallengerCar=} [properties] Properties to set + */ + function ChallengerCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChallengerCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.car = null; + + /** + * ChallengerCar stamp. + * @member {number} stamp + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.stamp = 0; + + /** + * ChallengerCar result. + * @member {number} result + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.result = 0; + + /** + * ChallengerCar area. + * @member {number} area + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.area = 0; + + /** + * Creates a new ChallengerCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.IChallengerCar=} [properties] Properties to set + * @returns {wm.protobuf.ChallengerCar} ChallengerCar instance + */ + ChallengerCar.create = function create(properties) { + return new ChallengerCar(properties); + }; + + /** + * Encodes the specified ChallengerCar message. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.IChallengerCar} message ChallengerCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChallengerCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stamp); + writer.uint32(/* id 4, wireType 0 =*/32).sint32(message.result); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.area); + return writer; + }; + + /** + * Encodes the specified ChallengerCar message, length delimited. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.IChallengerCar} message ChallengerCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChallengerCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ChallengerCar} ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChallengerCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ChallengerCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 3: { + message.stamp = reader.uint32(); + break; + } + case 4: { + message.result = reader.sint32(); + break; + } + case 5: { + message.area = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("stamp")) + throw $util.ProtocolError("missing required 'stamp'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ChallengerCar} ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChallengerCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChallengerCar message. + * @function verify + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChallengerCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.stamp)) + return "stamp: integer expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + return null; + }; + + /** + * Creates a ChallengerCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ChallengerCar} ChallengerCar + */ + ChallengerCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ChallengerCar) + return object; + let message = new $root.wm.protobuf.ChallengerCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.ChallengerCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.stamp != null) + message.stamp = object.stamp >>> 0; + if (object.result != null) + message.result = object.result | 0; + if (object.area != null) + message.area = object.area >>> 0; + return message; + }; + + /** + * Creates a plain object from a ChallengerCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.ChallengerCar} message ChallengerCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChallengerCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.stamp = 0; + object.result = 0; + object.area = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.stamp != null && message.hasOwnProperty("stamp")) + object.stamp = message.stamp; + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + return object; + }; + + /** + * Converts this ChallengerCar to JSON. + * @function toJSON + * @memberof wm.protobuf.ChallengerCar + * @instance + * @returns {Object.} JSON object + */ + ChallengerCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChallengerCar + * @function getTypeUrl + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChallengerCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ChallengerCar"; + }; + + return ChallengerCar; + })(); + + protobuf.StampTargetCar = (function() { + + /** + * Properties of a StampTargetCar. + * @memberof wm.protobuf + * @interface IStampTargetCar + * @property {wm.protobuf.ICar} car StampTargetCar car + * @property {number} returnCount StampTargetCar returnCount + * @property {boolean} locked StampTargetCar locked + * @property {boolean} recommended StampTargetCar recommended + */ + + /** + * Constructs a new StampTargetCar. + * @memberof wm.protobuf + * @classdesc Represents a StampTargetCar. + * @implements IStampTargetCar + * @constructor + * @param {wm.protobuf.IStampTargetCar=} [properties] Properties to set + */ + function StampTargetCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StampTargetCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.car = null; + + /** + * StampTargetCar returnCount. + * @member {number} returnCount + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.returnCount = 0; + + /** + * StampTargetCar locked. + * @member {boolean} locked + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.locked = false; + + /** + * StampTargetCar recommended. + * @member {boolean} recommended + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.recommended = false; + + /** + * Creates a new StampTargetCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.IStampTargetCar=} [properties] Properties to set + * @returns {wm.protobuf.StampTargetCar} StampTargetCar instance + */ + StampTargetCar.create = function create(properties) { + return new StampTargetCar(properties); + }; + + /** + * Encodes the specified StampTargetCar message. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.IStampTargetCar} message StampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StampTargetCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.returnCount); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.locked); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.recommended); + return writer; + }; + + /** + * Encodes the specified StampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.IStampTargetCar} message StampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StampTargetCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.StampTargetCar} StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StampTargetCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.StampTargetCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.returnCount = reader.uint32(); + break; + } + case 3: { + message.locked = reader.bool(); + break; + } + case 4: { + message.recommended = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("returnCount")) + throw $util.ProtocolError("missing required 'returnCount'", { instance: message }); + if (!message.hasOwnProperty("locked")) + throw $util.ProtocolError("missing required 'locked'", { instance: message }); + if (!message.hasOwnProperty("recommended")) + throw $util.ProtocolError("missing required 'recommended'", { instance: message }); + return message; + }; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.StampTargetCar} StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StampTargetCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StampTargetCar message. + * @function verify + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StampTargetCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.returnCount)) + return "returnCount: integer expected"; + if (typeof message.locked !== "boolean") + return "locked: boolean expected"; + if (typeof message.recommended !== "boolean") + return "recommended: boolean expected"; + return null; + }; + + /** + * Creates a StampTargetCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.StampTargetCar} StampTargetCar + */ + StampTargetCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.StampTargetCar) + return object; + let message = new $root.wm.protobuf.StampTargetCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.StampTargetCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.returnCount != null) + message.returnCount = object.returnCount >>> 0; + if (object.locked != null) + message.locked = Boolean(object.locked); + if (object.recommended != null) + message.recommended = Boolean(object.recommended); + return message; + }; + + /** + * Creates a plain object from a StampTargetCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.StampTargetCar} message StampTargetCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StampTargetCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.returnCount = 0; + object.locked = false; + object.recommended = false; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.returnCount != null && message.hasOwnProperty("returnCount")) + object.returnCount = message.returnCount; + if (message.locked != null && message.hasOwnProperty("locked")) + object.locked = message.locked; + if (message.recommended != null && message.hasOwnProperty("recommended")) + object.recommended = message.recommended; + return object; + }; + + /** + * Converts this StampTargetCar to JSON. + * @function toJSON + * @memberof wm.protobuf.StampTargetCar + * @instance + * @returns {Object.} JSON object + */ + StampTargetCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StampTargetCar + * @function getTypeUrl + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StampTargetCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.StampTargetCar"; + }; + + return StampTargetCar; + })(); + + protobuf.BookmarkedCar = (function() { + + /** + * Properties of a BookmarkedCar. + * @memberof wm.protobuf + * @interface IBookmarkedCar + * @property {wm.protobuf.ICar} car BookmarkedCar car + * @property {number} returnCount BookmarkedCar returnCount + */ + + /** + * Constructs a new BookmarkedCar. + * @memberof wm.protobuf + * @classdesc Represents a BookmarkedCar. + * @implements IBookmarkedCar + * @constructor + * @param {wm.protobuf.IBookmarkedCar=} [properties] Properties to set + */ + function BookmarkedCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BookmarkedCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.BookmarkedCar + * @instance + */ + BookmarkedCar.prototype.car = null; + + /** + * BookmarkedCar returnCount. + * @member {number} returnCount + * @memberof wm.protobuf.BookmarkedCar + * @instance + */ + BookmarkedCar.prototype.returnCount = 0; + + /** + * Creates a new BookmarkedCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.IBookmarkedCar=} [properties] Properties to set + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar instance + */ + BookmarkedCar.create = function create(properties) { + return new BookmarkedCar(properties); + }; + + /** + * Encodes the specified BookmarkedCar message. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.IBookmarkedCar} message BookmarkedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BookmarkedCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.returnCount); + return writer; + }; + + /** + * Encodes the specified BookmarkedCar message, length delimited. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.IBookmarkedCar} message BookmarkedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BookmarkedCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BookmarkedCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.BookmarkedCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.returnCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("returnCount")) + throw $util.ProtocolError("missing required 'returnCount'", { instance: message }); + return message; + }; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BookmarkedCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BookmarkedCar message. + * @function verify + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BookmarkedCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.returnCount)) + return "returnCount: integer expected"; + return null; + }; + + /** + * Creates a BookmarkedCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar + */ + BookmarkedCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.BookmarkedCar) + return object; + let message = new $root.wm.protobuf.BookmarkedCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.BookmarkedCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.returnCount != null) + message.returnCount = object.returnCount >>> 0; + return message; + }; + + /** + * Creates a plain object from a BookmarkedCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.BookmarkedCar} message BookmarkedCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BookmarkedCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.returnCount = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.returnCount != null && message.hasOwnProperty("returnCount")) + object.returnCount = message.returnCount; + return object; + }; + + /** + * Converts this BookmarkedCar to JSON. + * @function toJSON + * @memberof wm.protobuf.BookmarkedCar + * @instance + * @returns {Object.} JSON object + */ + BookmarkedCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BookmarkedCar + * @function getTypeUrl + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BookmarkedCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.BookmarkedCar"; + }; + + return BookmarkedCar; + })(); + + protobuf.PreviousVersionStampTargetCar = (function() { + + /** + * Properties of a PreviousVersionStampTargetCar. + * @memberof wm.protobuf + * @interface IPreviousVersionStampTargetCar + * @property {wm.protobuf.ICar} car PreviousVersionStampTargetCar car + * @property {number} returnCount PreviousVersionStampTargetCar returnCount + * @property {number|null} [currentCarId] PreviousVersionStampTargetCar currentCarId + */ + + /** + * Constructs a new PreviousVersionStampTargetCar. + * @memberof wm.protobuf + * @classdesc Represents a PreviousVersionStampTargetCar. + * @implements IPreviousVersionStampTargetCar + * @constructor + * @param {wm.protobuf.IPreviousVersionStampTargetCar=} [properties] Properties to set + */ + function PreviousVersionStampTargetCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PreviousVersionStampTargetCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + */ + PreviousVersionStampTargetCar.prototype.car = null; + + /** + * PreviousVersionStampTargetCar returnCount. + * @member {number} returnCount + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + */ + PreviousVersionStampTargetCar.prototype.returnCount = 0; + + /** + * PreviousVersionStampTargetCar currentCarId. + * @member {number} currentCarId + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + */ + PreviousVersionStampTargetCar.prototype.currentCarId = 0; + + /** + * Creates a new PreviousVersionStampTargetCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.IPreviousVersionStampTargetCar=} [properties] Properties to set + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar instance + */ + PreviousVersionStampTargetCar.create = function create(properties) { + return new PreviousVersionStampTargetCar(properties); + }; + + /** + * Encodes the specified PreviousVersionStampTargetCar message. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.IPreviousVersionStampTargetCar} message PreviousVersionStampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviousVersionStampTargetCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.currentCarId != null && Object.hasOwnProperty.call(message, "currentCarId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.currentCarId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.returnCount); + return writer; + }; + + /** + * Encodes the specified PreviousVersionStampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.IPreviousVersionStampTargetCar} message PreviousVersionStampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviousVersionStampTargetCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviousVersionStampTargetCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PreviousVersionStampTargetCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 3: { + message.returnCount = reader.uint32(); + break; + } + case 2: { + message.currentCarId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("returnCount")) + throw $util.ProtocolError("missing required 'returnCount'", { instance: message }); + return message; + }; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviousVersionStampTargetCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PreviousVersionStampTargetCar message. + * @function verify + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreviousVersionStampTargetCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.returnCount)) + return "returnCount: integer expected"; + if (message.currentCarId != null && message.hasOwnProperty("currentCarId")) + if (!$util.isInteger(message.currentCarId)) + return "currentCarId: integer expected"; + return null; + }; + + /** + * Creates a PreviousVersionStampTargetCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar + */ + PreviousVersionStampTargetCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PreviousVersionStampTargetCar) + return object; + let message = new $root.wm.protobuf.PreviousVersionStampTargetCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.PreviousVersionStampTargetCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.returnCount != null) + message.returnCount = object.returnCount >>> 0; + if (object.currentCarId != null) + message.currentCarId = object.currentCarId >>> 0; + return message; + }; + + /** + * Creates a plain object from a PreviousVersionStampTargetCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.PreviousVersionStampTargetCar} message PreviousVersionStampTargetCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreviousVersionStampTargetCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.currentCarId = 0; + object.returnCount = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.currentCarId != null && message.hasOwnProperty("currentCarId")) + object.currentCarId = message.currentCarId; + if (message.returnCount != null && message.hasOwnProperty("returnCount")) + object.returnCount = message.returnCount; + return object; + }; + + /** + * Converts this PreviousVersionStampTargetCar to JSON. + * @function toJSON + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + * @returns {Object.} JSON object + */ + PreviousVersionStampTargetCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PreviousVersionStampTargetCar + * @function getTypeUrl + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PreviousVersionStampTargetCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PreviousVersionStampTargetCar"; + }; + + return PreviousVersionStampTargetCar; + })(); + + protobuf.GhostCar = (function() { + + /** + * Properties of a GhostCar. + * @memberof wm.protobuf + * @interface IGhostCar + * @property {wm.protobuf.ICar} car GhostCar car + * @property {number|null} [area] GhostCar area + * @property {number|null} [ramp] GhostCar ramp + * @property {number|null} [path] GhostCar path + * @property {boolean|null} [nonhuman] GhostCar nonhuman + * @property {wm.protobuf.GhostType|null} [type] GhostCar type + * @property {number|Long|null} [trailId] GhostCar trailId + */ + + /** + * Constructs a new GhostCar. + * @memberof wm.protobuf + * @classdesc Represents a GhostCar. + * @implements IGhostCar + * @constructor + * @param {wm.protobuf.IGhostCar=} [properties] Properties to set + */ + function GhostCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.car = null; + + /** + * GhostCar area. + * @member {number} area + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.area = 0; + + /** + * GhostCar ramp. + * @member {number} ramp + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.ramp = 0; + + /** + * GhostCar path. + * @member {number} path + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.path = 0; + + /** + * GhostCar nonhuman. + * @member {boolean} nonhuman + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.nonhuman = false; + + /** + * GhostCar type. + * @member {wm.protobuf.GhostType} type + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.type = 1; + + /** + * GhostCar trailId. + * @member {number|Long} trailId + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.trailId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new GhostCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.IGhostCar=} [properties] Properties to set + * @returns {wm.protobuf.GhostCar} GhostCar instance + */ + GhostCar.create = function create(properties) { + return new GhostCar(properties); + }; + + /** + * Encodes the specified GhostCar message. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.IGhostCar} message GhostCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.area != null && Object.hasOwnProperty.call(message, "area")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.area); + if (message.ramp != null && Object.hasOwnProperty.call(message, "ramp")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.ramp); + if (message.nonhuman != null && Object.hasOwnProperty.call(message, "nonhuman")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.nonhuman); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.type); + if (message.trailId != null && Object.hasOwnProperty.call(message, "trailId")) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.trailId); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.path); + return writer; + }; + + /** + * Encodes the specified GhostCar message, length delimited. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.IGhostCar} message GhostCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCar} GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.area = reader.uint32(); + break; + } + case 3: { + message.ramp = reader.uint32(); + break; + } + case 8: { + message.path = reader.uint32(); + break; + } + case 4: { + message.nonhuman = reader.bool(); + break; + } + case 6: { + message.type = reader.int32(); + break; + } + case 7: { + message.trailId = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCar} GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCar message. + * @function verify + * @memberof wm.protobuf.GhostCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.area != null && message.hasOwnProperty("area")) + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (message.ramp != null && message.hasOwnProperty("ramp")) + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.nonhuman != null && message.hasOwnProperty("nonhuman")) + if (typeof message.nonhuman !== "boolean") + return "nonhuman: boolean expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.trailId != null && message.hasOwnProperty("trailId")) + if (!$util.isInteger(message.trailId) && !(message.trailId && $util.isInteger(message.trailId.low) && $util.isInteger(message.trailId.high))) + return "trailId: integer|Long expected"; + return null; + }; + + /** + * Creates a GhostCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCar} GhostCar + */ + GhostCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCar) + return object; + let message = new $root.wm.protobuf.GhostCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.GhostCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.area != null) + message.area = object.area >>> 0; + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.nonhuman != null) + message.nonhuman = Boolean(object.nonhuman); + switch (object.type) { + case "GHOST_NORMAL": + case 1: + message.type = 1; + break; + case "GHOST_PINCH_RUNNER": + case 2: + message.type = 2; + break; + case "GHOST_DEFAULT": + case 3: + message.type = 3; + break; + } + if (object.trailId != null) + if ($util.Long) + (message.trailId = $util.Long.fromValue(object.trailId)).unsigned = true; + else if (typeof object.trailId === "string") + message.trailId = parseInt(object.trailId, 10); + else if (typeof object.trailId === "number") + message.trailId = object.trailId; + else if (typeof object.trailId === "object") + message.trailId = new $util.LongBits(object.trailId.low >>> 0, object.trailId.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a GhostCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.GhostCar} message GhostCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.area = 0; + object.ramp = 0; + object.nonhuman = false; + object.type = options.enums === String ? "GHOST_NORMAL" : 1; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.trailId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trailId = options.longs === String ? "0" : 0; + object.path = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.nonhuman != null && message.hasOwnProperty("nonhuman")) + object.nonhuman = message.nonhuman; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.wm.protobuf.GhostType[message.type] : message.type; + if (message.trailId != null && message.hasOwnProperty("trailId")) + if (typeof message.trailId === "number") + object.trailId = options.longs === String ? String(message.trailId) : message.trailId; + else + object.trailId = options.longs === String ? $util.Long.prototype.toString.call(message.trailId) : options.longs === Number ? new $util.LongBits(message.trailId.low >>> 0, message.trailId.high >>> 0).toNumber(true) : message.trailId; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this GhostCar to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCar + * @instance + * @returns {Object.} JSON object + */ + GhostCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCar + * @function getTypeUrl + * @memberof wm.protobuf.GhostCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCar"; + }; + + return GhostCar; + })(); + + protobuf.Place = (function() { + + /** + * Properties of a Place. + * @memberof wm.protobuf + * @interface IPlace + * @property {string} placeId Place placeId + * @property {string} shopName Place shopName + * @property {number} regionId Place regionId + * @property {string} country Place country + */ + + /** + * Constructs a new Place. + * @memberof wm.protobuf + * @classdesc Represents a Place. + * @implements IPlace + * @constructor + * @param {wm.protobuf.IPlace=} [properties] Properties to set + */ + function Place(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Place placeId. + * @member {string} placeId + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.placeId = ""; + + /** + * Place shopName. + * @member {string} shopName + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.shopName = ""; + + /** + * Place regionId. + * @member {number} regionId + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.regionId = 0; + + /** + * Place country. + * @member {string} country + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.country = ""; + + /** + * Creates a new Place instance using the specified properties. + * @function create + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.IPlace=} [properties] Properties to set + * @returns {wm.protobuf.Place} Place instance + */ + Place.create = function create(properties) { + return new Place(properties); + }; + + /** + * Encodes the specified Place message. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.IPlace} message Place message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Place.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.placeId); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shopName); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.regionId); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.country); + return writer; + }; + + /** + * Encodes the specified Place message, length delimited. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.IPlace} message Place message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Place.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Place message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Place + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Place} Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Place.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Place(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.placeId = reader.string(); + break; + } + case 2: { + message.shopName = reader.string(); + break; + } + case 3: { + message.regionId = reader.uint32(); + break; + } + case 4: { + message.country = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("placeId")) + throw $util.ProtocolError("missing required 'placeId'", { instance: message }); + if (!message.hasOwnProperty("shopName")) + throw $util.ProtocolError("missing required 'shopName'", { instance: message }); + if (!message.hasOwnProperty("regionId")) + throw $util.ProtocolError("missing required 'regionId'", { instance: message }); + if (!message.hasOwnProperty("country")) + throw $util.ProtocolError("missing required 'country'", { instance: message }); + return message; + }; + + /** + * Decodes a Place message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Place + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Place} Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Place.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Place message. + * @function verify + * @memberof wm.protobuf.Place + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Place.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.placeId)) + return "placeId: string expected"; + if (!$util.isString(message.shopName)) + return "shopName: string expected"; + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (!$util.isString(message.country)) + return "country: string expected"; + return null; + }; + + /** + * Creates a Place message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Place + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Place} Place + */ + Place.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Place) + return object; + let message = new $root.wm.protobuf.Place(); + if (object.placeId != null) + message.placeId = String(object.placeId); + if (object.shopName != null) + message.shopName = String(object.shopName); + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.country != null) + message.country = String(object.country); + return message; + }; + + /** + * Creates a plain object from a Place message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.Place} message Place + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Place.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.placeId = ""; + object.shopName = ""; + object.regionId = 0; + object.country = ""; + } + if (message.placeId != null && message.hasOwnProperty("placeId")) + object.placeId = message.placeId; + if (message.shopName != null && message.hasOwnProperty("shopName")) + object.shopName = message.shopName; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + return object; + }; + + /** + * Converts this Place to JSON. + * @function toJSON + * @memberof wm.protobuf.Place + * @instance + * @returns {Object.} JSON object + */ + Place.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Place + * @function getTypeUrl + * @memberof wm.protobuf.Place + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Place.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Place"; + }; + + return Place; + })(); + + protobuf.SystemSetting = (function() { + + /** + * Properties of a SystemSetting. + * @memberof wm.protobuf + * @interface ISystemSetting + * @property {number} mCoinChute SystemSetting mCoinChute + * @property {number} mBuyCardCost SystemSetting mBuyCardCost + * @property {number} mGameCost SystemSetting mGameCost + * @property {number} mContinueCost SystemSetting mContinueCost + * @property {number} mFullCourseCost SystemSetting mFullCourseCost + * @property {boolean} mFreePlay SystemSetting mFreePlay + * @property {number|null} [mPcbId] SystemSetting mPcbId + * @property {boolean} mIcCardRw SystemSetting mIcCardRw + * @property {boolean} mIcCardVender SystemSetting mIcCardVender + * @property {boolean|null} [mMgCardRw] SystemSetting mMgCardRw + * @property {boolean|null} [mForceFeedback] SystemSetting mForceFeedback + * @property {boolean} mWinsAndRemains SystemSetting mWinsAndRemains + * @property {number} mEventMode SystemSetting mEventMode + * @property {boolean} mEventModeDist SystemSetting mEventModeDist + * @property {number} mCloseType SystemSetting mCloseType + * @property {number} mCloseSun SystemSetting mCloseSun + * @property {number} mCloseMon SystemSetting mCloseMon + * @property {number} mCloseTue SystemSetting mCloseTue + * @property {number} mCloseWed SystemSetting mCloseWed + * @property {number} mCloseThu SystemSetting mCloseThu + * @property {number} mCloseFri SystemSetting mCloseFri + * @property {number} mCloseSat SystemSetting mCloseSat + * @property {number} mCloseDay SystemSetting mCloseDay + * @property {boolean|null} [mTouchPanel] SystemSetting mTouchPanel + * @property {number} mGameVol SystemSetting mGameVol + * @property {number} mAttractVol SystemSetting mAttractVol + * @property {number|null} [mCalibHandleCenter] SystemSetting mCalibHandleCenter + * @property {number|null} [mCalibAccelCenter] SystemSetting mCalibAccelCenter + * @property {number|null} [mCalibBrakeCenter] SystemSetting mCalibBrakeCenter + * @property {number|null} [mCalibTouchLeft] SystemSetting mCalibTouchLeft + * @property {number|null} [mCalibTouchRight] SystemSetting mCalibTouchRight + * @property {number|null} [mCalibTouchTop] SystemSetting mCalibTouchTop + * @property {number|null} [mCalibTouchBottom] SystemSetting mCalibTouchBottom + */ + + /** + * Constructs a new SystemSetting. + * @memberof wm.protobuf + * @classdesc Represents a SystemSetting. + * @implements ISystemSetting + * @constructor + * @param {wm.protobuf.ISystemSetting=} [properties] Properties to set + */ + function SystemSetting(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SystemSetting mCoinChute. + * @member {number} mCoinChute + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCoinChute = 0; + + /** + * SystemSetting mBuyCardCost. + * @member {number} mBuyCardCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mBuyCardCost = 0; + + /** + * SystemSetting mGameCost. + * @member {number} mGameCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mGameCost = 0; + + /** + * SystemSetting mContinueCost. + * @member {number} mContinueCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mContinueCost = 0; + + /** + * SystemSetting mFullCourseCost. + * @member {number} mFullCourseCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mFullCourseCost = 0; + + /** + * SystemSetting mFreePlay. + * @member {boolean} mFreePlay + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mFreePlay = false; + + /** + * SystemSetting mPcbId. + * @member {number} mPcbId + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mPcbId = 0; + + /** + * SystemSetting mIcCardRw. + * @member {boolean} mIcCardRw + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mIcCardRw = false; + + /** + * SystemSetting mIcCardVender. + * @member {boolean} mIcCardVender + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mIcCardVender = false; + + /** + * SystemSetting mMgCardRw. + * @member {boolean} mMgCardRw + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mMgCardRw = false; + + /** + * SystemSetting mForceFeedback. + * @member {boolean} mForceFeedback + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mForceFeedback = false; + + /** + * SystemSetting mWinsAndRemains. + * @member {boolean} mWinsAndRemains + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mWinsAndRemains = false; + + /** + * SystemSetting mEventMode. + * @member {number} mEventMode + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mEventMode = 0; + + /** + * SystemSetting mEventModeDist. + * @member {boolean} mEventModeDist + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mEventModeDist = false; + + /** + * SystemSetting mCloseType. + * @member {number} mCloseType + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseType = 0; + + /** + * SystemSetting mCloseSun. + * @member {number} mCloseSun + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseSun = 0; + + /** + * SystemSetting mCloseMon. + * @member {number} mCloseMon + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseMon = 0; + + /** + * SystemSetting mCloseTue. + * @member {number} mCloseTue + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseTue = 0; + + /** + * SystemSetting mCloseWed. + * @member {number} mCloseWed + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseWed = 0; + + /** + * SystemSetting mCloseThu. + * @member {number} mCloseThu + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseThu = 0; + + /** + * SystemSetting mCloseFri. + * @member {number} mCloseFri + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseFri = 0; + + /** + * SystemSetting mCloseSat. + * @member {number} mCloseSat + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseSat = 0; + + /** + * SystemSetting mCloseDay. + * @member {number} mCloseDay + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseDay = 0; + + /** + * SystemSetting mTouchPanel. + * @member {boolean} mTouchPanel + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mTouchPanel = false; + + /** + * SystemSetting mGameVol. + * @member {number} mGameVol + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mGameVol = 0; + + /** + * SystemSetting mAttractVol. + * @member {number} mAttractVol + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mAttractVol = 0; + + /** + * SystemSetting mCalibHandleCenter. + * @member {number} mCalibHandleCenter + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibHandleCenter = 0; + + /** + * SystemSetting mCalibAccelCenter. + * @member {number} mCalibAccelCenter + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibAccelCenter = 0; + + /** + * SystemSetting mCalibBrakeCenter. + * @member {number} mCalibBrakeCenter + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibBrakeCenter = 0; + + /** + * SystemSetting mCalibTouchLeft. + * @member {number} mCalibTouchLeft + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchLeft = 0; + + /** + * SystemSetting mCalibTouchRight. + * @member {number} mCalibTouchRight + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchRight = 0; + + /** + * SystemSetting mCalibTouchTop. + * @member {number} mCalibTouchTop + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchTop = 0; + + /** + * SystemSetting mCalibTouchBottom. + * @member {number} mCalibTouchBottom + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchBottom = 0; + + /** + * Creates a new SystemSetting instance using the specified properties. + * @function create + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.ISystemSetting=} [properties] Properties to set + * @returns {wm.protobuf.SystemSetting} SystemSetting instance + */ + SystemSetting.create = function create(properties) { + return new SystemSetting(properties); + }; + + /** + * Encodes the specified SystemSetting message. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.ISystemSetting} message SystemSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.mCoinChute); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.mBuyCardCost); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.mGameCost); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mContinueCost); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.mFullCourseCost); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.mFreePlay); + if (message.mPcbId != null && Object.hasOwnProperty.call(message, "mPcbId")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.mPcbId); + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.mIcCardRw); + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.mIcCardVender); + if (message.mMgCardRw != null && Object.hasOwnProperty.call(message, "mMgCardRw")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.mMgCardRw); + if (message.mForceFeedback != null && Object.hasOwnProperty.call(message, "mForceFeedback")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.mForceFeedback); + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.mWinsAndRemains); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.mEventMode); + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.mEventModeDist); + writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.mCloseType); + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.mCloseSun); + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.mCloseMon); + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.mCloseTue); + writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.mCloseWed); + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.mCloseThu); + writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.mCloseFri); + writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.mCloseSat); + writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.mCloseDay); + if (message.mTouchPanel != null && Object.hasOwnProperty.call(message, "mTouchPanel")) + writer.uint32(/* id 24, wireType 0 =*/192).bool(message.mTouchPanel); + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.mGameVol); + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.mAttractVol); + if (message.mCalibHandleCenter != null && Object.hasOwnProperty.call(message, "mCalibHandleCenter")) + writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.mCalibHandleCenter); + if (message.mCalibAccelCenter != null && Object.hasOwnProperty.call(message, "mCalibAccelCenter")) + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.mCalibAccelCenter); + if (message.mCalibBrakeCenter != null && Object.hasOwnProperty.call(message, "mCalibBrakeCenter")) + writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.mCalibBrakeCenter); + if (message.mCalibTouchLeft != null && Object.hasOwnProperty.call(message, "mCalibTouchLeft")) + writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.mCalibTouchLeft); + if (message.mCalibTouchRight != null && Object.hasOwnProperty.call(message, "mCalibTouchRight")) + writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.mCalibTouchRight); + if (message.mCalibTouchTop != null && Object.hasOwnProperty.call(message, "mCalibTouchTop")) + writer.uint32(/* id 32, wireType 0 =*/256).uint32(message.mCalibTouchTop); + if (message.mCalibTouchBottom != null && Object.hasOwnProperty.call(message, "mCalibTouchBottom")) + writer.uint32(/* id 33, wireType 0 =*/264).uint32(message.mCalibTouchBottom); + return writer; + }; + + /** + * Encodes the specified SystemSetting message, length delimited. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.ISystemSetting} message SystemSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SystemSetting message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SystemSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SystemSetting} SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SystemSetting(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mCoinChute = reader.uint32(); + break; + } + case 2: { + message.mBuyCardCost = reader.uint32(); + break; + } + case 3: { + message.mGameCost = reader.uint32(); + break; + } + case 4: { + message.mContinueCost = reader.uint32(); + break; + } + case 5: { + message.mFullCourseCost = reader.uint32(); + break; + } + case 6: { + message.mFreePlay = reader.bool(); + break; + } + case 7: { + message.mPcbId = reader.uint32(); + break; + } + case 8: { + message.mIcCardRw = reader.bool(); + break; + } + case 9: { + message.mIcCardVender = reader.bool(); + break; + } + case 10: { + message.mMgCardRw = reader.bool(); + break; + } + case 11: { + message.mForceFeedback = reader.bool(); + break; + } + case 12: { + message.mWinsAndRemains = reader.bool(); + break; + } + case 13: { + message.mEventMode = reader.uint32(); + break; + } + case 14: { + message.mEventModeDist = reader.bool(); + break; + } + case 15: { + message.mCloseType = reader.uint32(); + break; + } + case 16: { + message.mCloseSun = reader.uint32(); + break; + } + case 17: { + message.mCloseMon = reader.uint32(); + break; + } + case 18: { + message.mCloseTue = reader.uint32(); + break; + } + case 19: { + message.mCloseWed = reader.uint32(); + break; + } + case 20: { + message.mCloseThu = reader.uint32(); + break; + } + case 21: { + message.mCloseFri = reader.uint32(); + break; + } + case 22: { + message.mCloseSat = reader.uint32(); + break; + } + case 23: { + message.mCloseDay = reader.uint32(); + break; + } + case 24: { + message.mTouchPanel = reader.bool(); + break; + } + case 25: { + message.mGameVol = reader.uint32(); + break; + } + case 26: { + message.mAttractVol = reader.uint32(); + break; + } + case 27: { + message.mCalibHandleCenter = reader.uint32(); + break; + } + case 28: { + message.mCalibAccelCenter = reader.uint32(); + break; + } + case 29: { + message.mCalibBrakeCenter = reader.uint32(); + break; + } + case 30: { + message.mCalibTouchLeft = reader.uint32(); + break; + } + case 31: { + message.mCalibTouchRight = reader.uint32(); + break; + } + case 32: { + message.mCalibTouchTop = reader.uint32(); + break; + } + case 33: { + message.mCalibTouchBottom = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("mCoinChute")) + throw $util.ProtocolError("missing required 'mCoinChute'", { instance: message }); + if (!message.hasOwnProperty("mBuyCardCost")) + throw $util.ProtocolError("missing required 'mBuyCardCost'", { instance: message }); + if (!message.hasOwnProperty("mGameCost")) + throw $util.ProtocolError("missing required 'mGameCost'", { instance: message }); + if (!message.hasOwnProperty("mContinueCost")) + throw $util.ProtocolError("missing required 'mContinueCost'", { instance: message }); + if (!message.hasOwnProperty("mFullCourseCost")) + throw $util.ProtocolError("missing required 'mFullCourseCost'", { instance: message }); + if (!message.hasOwnProperty("mFreePlay")) + throw $util.ProtocolError("missing required 'mFreePlay'", { instance: message }); + if (!message.hasOwnProperty("mIcCardRw")) + throw $util.ProtocolError("missing required 'mIcCardRw'", { instance: message }); + if (!message.hasOwnProperty("mIcCardVender")) + throw $util.ProtocolError("missing required 'mIcCardVender'", { instance: message }); + if (!message.hasOwnProperty("mWinsAndRemains")) + throw $util.ProtocolError("missing required 'mWinsAndRemains'", { instance: message }); + if (!message.hasOwnProperty("mEventMode")) + throw $util.ProtocolError("missing required 'mEventMode'", { instance: message }); + if (!message.hasOwnProperty("mEventModeDist")) + throw $util.ProtocolError("missing required 'mEventModeDist'", { instance: message }); + if (!message.hasOwnProperty("mCloseType")) + throw $util.ProtocolError("missing required 'mCloseType'", { instance: message }); + if (!message.hasOwnProperty("mCloseSun")) + throw $util.ProtocolError("missing required 'mCloseSun'", { instance: message }); + if (!message.hasOwnProperty("mCloseMon")) + throw $util.ProtocolError("missing required 'mCloseMon'", { instance: message }); + if (!message.hasOwnProperty("mCloseTue")) + throw $util.ProtocolError("missing required 'mCloseTue'", { instance: message }); + if (!message.hasOwnProperty("mCloseWed")) + throw $util.ProtocolError("missing required 'mCloseWed'", { instance: message }); + if (!message.hasOwnProperty("mCloseThu")) + throw $util.ProtocolError("missing required 'mCloseThu'", { instance: message }); + if (!message.hasOwnProperty("mCloseFri")) + throw $util.ProtocolError("missing required 'mCloseFri'", { instance: message }); + if (!message.hasOwnProperty("mCloseSat")) + throw $util.ProtocolError("missing required 'mCloseSat'", { instance: message }); + if (!message.hasOwnProperty("mCloseDay")) + throw $util.ProtocolError("missing required 'mCloseDay'", { instance: message }); + if (!message.hasOwnProperty("mGameVol")) + throw $util.ProtocolError("missing required 'mGameVol'", { instance: message }); + if (!message.hasOwnProperty("mAttractVol")) + throw $util.ProtocolError("missing required 'mAttractVol'", { instance: message }); + return message; + }; + + /** + * Decodes a SystemSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SystemSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SystemSetting} SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SystemSetting message. + * @function verify + * @memberof wm.protobuf.SystemSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SystemSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.mCoinChute)) + return "mCoinChute: integer expected"; + if (!$util.isInteger(message.mBuyCardCost)) + return "mBuyCardCost: integer expected"; + if (!$util.isInteger(message.mGameCost)) + return "mGameCost: integer expected"; + if (!$util.isInteger(message.mContinueCost)) + return "mContinueCost: integer expected"; + if (!$util.isInteger(message.mFullCourseCost)) + return "mFullCourseCost: integer expected"; + if (typeof message.mFreePlay !== "boolean") + return "mFreePlay: boolean expected"; + if (message.mPcbId != null && message.hasOwnProperty("mPcbId")) + if (!$util.isInteger(message.mPcbId)) + return "mPcbId: integer expected"; + if (typeof message.mIcCardRw !== "boolean") + return "mIcCardRw: boolean expected"; + if (typeof message.mIcCardVender !== "boolean") + return "mIcCardVender: boolean expected"; + if (message.mMgCardRw != null && message.hasOwnProperty("mMgCardRw")) + if (typeof message.mMgCardRw !== "boolean") + return "mMgCardRw: boolean expected"; + if (message.mForceFeedback != null && message.hasOwnProperty("mForceFeedback")) + if (typeof message.mForceFeedback !== "boolean") + return "mForceFeedback: boolean expected"; + if (typeof message.mWinsAndRemains !== "boolean") + return "mWinsAndRemains: boolean expected"; + if (!$util.isInteger(message.mEventMode)) + return "mEventMode: integer expected"; + if (typeof message.mEventModeDist !== "boolean") + return "mEventModeDist: boolean expected"; + if (!$util.isInteger(message.mCloseType)) + return "mCloseType: integer expected"; + if (!$util.isInteger(message.mCloseSun)) + return "mCloseSun: integer expected"; + if (!$util.isInteger(message.mCloseMon)) + return "mCloseMon: integer expected"; + if (!$util.isInteger(message.mCloseTue)) + return "mCloseTue: integer expected"; + if (!$util.isInteger(message.mCloseWed)) + return "mCloseWed: integer expected"; + if (!$util.isInteger(message.mCloseThu)) + return "mCloseThu: integer expected"; + if (!$util.isInteger(message.mCloseFri)) + return "mCloseFri: integer expected"; + if (!$util.isInteger(message.mCloseSat)) + return "mCloseSat: integer expected"; + if (!$util.isInteger(message.mCloseDay)) + return "mCloseDay: integer expected"; + if (message.mTouchPanel != null && message.hasOwnProperty("mTouchPanel")) + if (typeof message.mTouchPanel !== "boolean") + return "mTouchPanel: boolean expected"; + if (!$util.isInteger(message.mGameVol)) + return "mGameVol: integer expected"; + if (!$util.isInteger(message.mAttractVol)) + return "mAttractVol: integer expected"; + if (message.mCalibHandleCenter != null && message.hasOwnProperty("mCalibHandleCenter")) + if (!$util.isInteger(message.mCalibHandleCenter)) + return "mCalibHandleCenter: integer expected"; + if (message.mCalibAccelCenter != null && message.hasOwnProperty("mCalibAccelCenter")) + if (!$util.isInteger(message.mCalibAccelCenter)) + return "mCalibAccelCenter: integer expected"; + if (message.mCalibBrakeCenter != null && message.hasOwnProperty("mCalibBrakeCenter")) + if (!$util.isInteger(message.mCalibBrakeCenter)) + return "mCalibBrakeCenter: integer expected"; + if (message.mCalibTouchLeft != null && message.hasOwnProperty("mCalibTouchLeft")) + if (!$util.isInteger(message.mCalibTouchLeft)) + return "mCalibTouchLeft: integer expected"; + if (message.mCalibTouchRight != null && message.hasOwnProperty("mCalibTouchRight")) + if (!$util.isInteger(message.mCalibTouchRight)) + return "mCalibTouchRight: integer expected"; + if (message.mCalibTouchTop != null && message.hasOwnProperty("mCalibTouchTop")) + if (!$util.isInteger(message.mCalibTouchTop)) + return "mCalibTouchTop: integer expected"; + if (message.mCalibTouchBottom != null && message.hasOwnProperty("mCalibTouchBottom")) + if (!$util.isInteger(message.mCalibTouchBottom)) + return "mCalibTouchBottom: integer expected"; + return null; + }; + + /** + * Creates a SystemSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SystemSetting + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SystemSetting} SystemSetting + */ + SystemSetting.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SystemSetting) + return object; + let message = new $root.wm.protobuf.SystemSetting(); + if (object.mCoinChute != null) + message.mCoinChute = object.mCoinChute >>> 0; + if (object.mBuyCardCost != null) + message.mBuyCardCost = object.mBuyCardCost >>> 0; + if (object.mGameCost != null) + message.mGameCost = object.mGameCost >>> 0; + if (object.mContinueCost != null) + message.mContinueCost = object.mContinueCost >>> 0; + if (object.mFullCourseCost != null) + message.mFullCourseCost = object.mFullCourseCost >>> 0; + if (object.mFreePlay != null) + message.mFreePlay = Boolean(object.mFreePlay); + if (object.mPcbId != null) + message.mPcbId = object.mPcbId >>> 0; + if (object.mIcCardRw != null) + message.mIcCardRw = Boolean(object.mIcCardRw); + if (object.mIcCardVender != null) + message.mIcCardVender = Boolean(object.mIcCardVender); + if (object.mMgCardRw != null) + message.mMgCardRw = Boolean(object.mMgCardRw); + if (object.mForceFeedback != null) + message.mForceFeedback = Boolean(object.mForceFeedback); + if (object.mWinsAndRemains != null) + message.mWinsAndRemains = Boolean(object.mWinsAndRemains); + if (object.mEventMode != null) + message.mEventMode = object.mEventMode >>> 0; + if (object.mEventModeDist != null) + message.mEventModeDist = Boolean(object.mEventModeDist); + if (object.mCloseType != null) + message.mCloseType = object.mCloseType >>> 0; + if (object.mCloseSun != null) + message.mCloseSun = object.mCloseSun >>> 0; + if (object.mCloseMon != null) + message.mCloseMon = object.mCloseMon >>> 0; + if (object.mCloseTue != null) + message.mCloseTue = object.mCloseTue >>> 0; + if (object.mCloseWed != null) + message.mCloseWed = object.mCloseWed >>> 0; + if (object.mCloseThu != null) + message.mCloseThu = object.mCloseThu >>> 0; + if (object.mCloseFri != null) + message.mCloseFri = object.mCloseFri >>> 0; + if (object.mCloseSat != null) + message.mCloseSat = object.mCloseSat >>> 0; + if (object.mCloseDay != null) + message.mCloseDay = object.mCloseDay >>> 0; + if (object.mTouchPanel != null) + message.mTouchPanel = Boolean(object.mTouchPanel); + if (object.mGameVol != null) + message.mGameVol = object.mGameVol >>> 0; + if (object.mAttractVol != null) + message.mAttractVol = object.mAttractVol >>> 0; + if (object.mCalibHandleCenter != null) + message.mCalibHandleCenter = object.mCalibHandleCenter >>> 0; + if (object.mCalibAccelCenter != null) + message.mCalibAccelCenter = object.mCalibAccelCenter >>> 0; + if (object.mCalibBrakeCenter != null) + message.mCalibBrakeCenter = object.mCalibBrakeCenter >>> 0; + if (object.mCalibTouchLeft != null) + message.mCalibTouchLeft = object.mCalibTouchLeft >>> 0; + if (object.mCalibTouchRight != null) + message.mCalibTouchRight = object.mCalibTouchRight >>> 0; + if (object.mCalibTouchTop != null) + message.mCalibTouchTop = object.mCalibTouchTop >>> 0; + if (object.mCalibTouchBottom != null) + message.mCalibTouchBottom = object.mCalibTouchBottom >>> 0; + return message; + }; + + /** + * Creates a plain object from a SystemSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.SystemSetting} message SystemSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SystemSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.mCoinChute = 0; + object.mBuyCardCost = 0; + object.mGameCost = 0; + object.mContinueCost = 0; + object.mFullCourseCost = 0; + object.mFreePlay = false; + object.mPcbId = 0; + object.mIcCardRw = false; + object.mIcCardVender = false; + object.mMgCardRw = false; + object.mForceFeedback = false; + object.mWinsAndRemains = false; + object.mEventMode = 0; + object.mEventModeDist = false; + object.mCloseType = 0; + object.mCloseSun = 0; + object.mCloseMon = 0; + object.mCloseTue = 0; + object.mCloseWed = 0; + object.mCloseThu = 0; + object.mCloseFri = 0; + object.mCloseSat = 0; + object.mCloseDay = 0; + object.mTouchPanel = false; + object.mGameVol = 0; + object.mAttractVol = 0; + object.mCalibHandleCenter = 0; + object.mCalibAccelCenter = 0; + object.mCalibBrakeCenter = 0; + object.mCalibTouchLeft = 0; + object.mCalibTouchRight = 0; + object.mCalibTouchTop = 0; + object.mCalibTouchBottom = 0; + } + if (message.mCoinChute != null && message.hasOwnProperty("mCoinChute")) + object.mCoinChute = message.mCoinChute; + if (message.mBuyCardCost != null && message.hasOwnProperty("mBuyCardCost")) + object.mBuyCardCost = message.mBuyCardCost; + if (message.mGameCost != null && message.hasOwnProperty("mGameCost")) + object.mGameCost = message.mGameCost; + if (message.mContinueCost != null && message.hasOwnProperty("mContinueCost")) + object.mContinueCost = message.mContinueCost; + if (message.mFullCourseCost != null && message.hasOwnProperty("mFullCourseCost")) + object.mFullCourseCost = message.mFullCourseCost; + if (message.mFreePlay != null && message.hasOwnProperty("mFreePlay")) + object.mFreePlay = message.mFreePlay; + if (message.mPcbId != null && message.hasOwnProperty("mPcbId")) + object.mPcbId = message.mPcbId; + if (message.mIcCardRw != null && message.hasOwnProperty("mIcCardRw")) + object.mIcCardRw = message.mIcCardRw; + if (message.mIcCardVender != null && message.hasOwnProperty("mIcCardVender")) + object.mIcCardVender = message.mIcCardVender; + if (message.mMgCardRw != null && message.hasOwnProperty("mMgCardRw")) + object.mMgCardRw = message.mMgCardRw; + if (message.mForceFeedback != null && message.hasOwnProperty("mForceFeedback")) + object.mForceFeedback = message.mForceFeedback; + if (message.mWinsAndRemains != null && message.hasOwnProperty("mWinsAndRemains")) + object.mWinsAndRemains = message.mWinsAndRemains; + if (message.mEventMode != null && message.hasOwnProperty("mEventMode")) + object.mEventMode = message.mEventMode; + if (message.mEventModeDist != null && message.hasOwnProperty("mEventModeDist")) + object.mEventModeDist = message.mEventModeDist; + if (message.mCloseType != null && message.hasOwnProperty("mCloseType")) + object.mCloseType = message.mCloseType; + if (message.mCloseSun != null && message.hasOwnProperty("mCloseSun")) + object.mCloseSun = message.mCloseSun; + if (message.mCloseMon != null && message.hasOwnProperty("mCloseMon")) + object.mCloseMon = message.mCloseMon; + if (message.mCloseTue != null && message.hasOwnProperty("mCloseTue")) + object.mCloseTue = message.mCloseTue; + if (message.mCloseWed != null && message.hasOwnProperty("mCloseWed")) + object.mCloseWed = message.mCloseWed; + if (message.mCloseThu != null && message.hasOwnProperty("mCloseThu")) + object.mCloseThu = message.mCloseThu; + if (message.mCloseFri != null && message.hasOwnProperty("mCloseFri")) + object.mCloseFri = message.mCloseFri; + if (message.mCloseSat != null && message.hasOwnProperty("mCloseSat")) + object.mCloseSat = message.mCloseSat; + if (message.mCloseDay != null && message.hasOwnProperty("mCloseDay")) + object.mCloseDay = message.mCloseDay; + if (message.mTouchPanel != null && message.hasOwnProperty("mTouchPanel")) + object.mTouchPanel = message.mTouchPanel; + if (message.mGameVol != null && message.hasOwnProperty("mGameVol")) + object.mGameVol = message.mGameVol; + if (message.mAttractVol != null && message.hasOwnProperty("mAttractVol")) + object.mAttractVol = message.mAttractVol; + if (message.mCalibHandleCenter != null && message.hasOwnProperty("mCalibHandleCenter")) + object.mCalibHandleCenter = message.mCalibHandleCenter; + if (message.mCalibAccelCenter != null && message.hasOwnProperty("mCalibAccelCenter")) + object.mCalibAccelCenter = message.mCalibAccelCenter; + if (message.mCalibBrakeCenter != null && message.hasOwnProperty("mCalibBrakeCenter")) + object.mCalibBrakeCenter = message.mCalibBrakeCenter; + if (message.mCalibTouchLeft != null && message.hasOwnProperty("mCalibTouchLeft")) + object.mCalibTouchLeft = message.mCalibTouchLeft; + if (message.mCalibTouchRight != null && message.hasOwnProperty("mCalibTouchRight")) + object.mCalibTouchRight = message.mCalibTouchRight; + if (message.mCalibTouchTop != null && message.hasOwnProperty("mCalibTouchTop")) + object.mCalibTouchTop = message.mCalibTouchTop; + if (message.mCalibTouchBottom != null && message.hasOwnProperty("mCalibTouchBottom")) + object.mCalibTouchBottom = message.mCalibTouchBottom; + return object; + }; + + /** + * Converts this SystemSetting to JSON. + * @function toJSON + * @memberof wm.protobuf.SystemSetting + * @instance + * @returns {Object.} JSON object + */ + SystemSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SystemSetting + * @function getTypeUrl + * @memberof wm.protobuf.SystemSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SystemSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SystemSetting"; + }; + + return SystemSetting; + })(); + + protobuf.GhostCompetitionSchedule = (function() { + + /** + * Properties of a GhostCompetitionSchedule. + * @memberof wm.protobuf + * @interface IGhostCompetitionSchedule + * @property {number} competitionId GhostCompetitionSchedule competitionId + * @property {number} qualifyingPeriodStartAt GhostCompetitionSchedule qualifyingPeriodStartAt + * @property {number} qualifyingPeriodCloseAt GhostCompetitionSchedule qualifyingPeriodCloseAt + * @property {number} competitionStartAt GhostCompetitionSchedule competitionStartAt + * @property {number} competitionCloseAt GhostCompetitionSchedule competitionCloseAt + * @property {number} competitionEndAt GhostCompetitionSchedule competitionEndAt + * @property {number} lengthOfPeriod GhostCompetitionSchedule lengthOfPeriod + * @property {number} lengthOfInterval GhostCompetitionSchedule lengthOfInterval + * @property {number} area GhostCompetitionSchedule area + * @property {number} minigamePatternId GhostCompetitionSchedule minigamePatternId + */ + + /** + * Constructs a new GhostCompetitionSchedule. + * @memberof wm.protobuf + * @classdesc Represents a GhostCompetitionSchedule. + * @implements IGhostCompetitionSchedule + * @constructor + * @param {wm.protobuf.IGhostCompetitionSchedule=} [properties] Properties to set + */ + function GhostCompetitionSchedule(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionSchedule competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionId = 0; + + /** + * GhostCompetitionSchedule qualifyingPeriodStartAt. + * @member {number} qualifyingPeriodStartAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.qualifyingPeriodStartAt = 0; + + /** + * GhostCompetitionSchedule qualifyingPeriodCloseAt. + * @member {number} qualifyingPeriodCloseAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.qualifyingPeriodCloseAt = 0; + + /** + * GhostCompetitionSchedule competitionStartAt. + * @member {number} competitionStartAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionStartAt = 0; + + /** + * GhostCompetitionSchedule competitionCloseAt. + * @member {number} competitionCloseAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionCloseAt = 0; + + /** + * GhostCompetitionSchedule competitionEndAt. + * @member {number} competitionEndAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionEndAt = 0; + + /** + * GhostCompetitionSchedule lengthOfPeriod. + * @member {number} lengthOfPeriod + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.lengthOfPeriod = 0; + + /** + * GhostCompetitionSchedule lengthOfInterval. + * @member {number} lengthOfInterval + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.lengthOfInterval = 0; + + /** + * GhostCompetitionSchedule area. + * @member {number} area + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.area = 0; + + /** + * GhostCompetitionSchedule minigamePatternId. + * @member {number} minigamePatternId + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.minigamePatternId = 0; + + /** + * Creates a new GhostCompetitionSchedule instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.IGhostCompetitionSchedule=} [properties] Properties to set + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule instance + */ + GhostCompetitionSchedule.create = function create(properties) { + return new GhostCompetitionSchedule(properties); + }; + + /** + * Encodes the specified GhostCompetitionSchedule message. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.IGhostCompetitionSchedule} message GhostCompetitionSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.competitionId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.qualifyingPeriodStartAt); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.qualifyingPeriodCloseAt); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.competitionStartAt); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.competitionCloseAt); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.competitionEndAt); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.lengthOfPeriod); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.lengthOfInterval); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.area); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.minigamePatternId); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionSchedule message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.IGhostCompetitionSchedule} message GhostCompetitionSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionSchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCompetitionSchedule(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.competitionId = reader.uint32(); + break; + } + case 2: { + message.qualifyingPeriodStartAt = reader.uint32(); + break; + } + case 3: { + message.qualifyingPeriodCloseAt = reader.uint32(); + break; + } + case 4: { + message.competitionStartAt = reader.uint32(); + break; + } + case 5: { + message.competitionCloseAt = reader.uint32(); + break; + } + case 6: { + message.competitionEndAt = reader.uint32(); + break; + } + case 7: { + message.lengthOfPeriod = reader.uint32(); + break; + } + case 8: { + message.lengthOfInterval = reader.uint32(); + break; + } + case 9: { + message.area = reader.uint32(); + break; + } + case 10: { + message.minigamePatternId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + if (!message.hasOwnProperty("qualifyingPeriodStartAt")) + throw $util.ProtocolError("missing required 'qualifyingPeriodStartAt'", { instance: message }); + if (!message.hasOwnProperty("qualifyingPeriodCloseAt")) + throw $util.ProtocolError("missing required 'qualifyingPeriodCloseAt'", { instance: message }); + if (!message.hasOwnProperty("competitionStartAt")) + throw $util.ProtocolError("missing required 'competitionStartAt'", { instance: message }); + if (!message.hasOwnProperty("competitionCloseAt")) + throw $util.ProtocolError("missing required 'competitionCloseAt'", { instance: message }); + if (!message.hasOwnProperty("competitionEndAt")) + throw $util.ProtocolError("missing required 'competitionEndAt'", { instance: message }); + if (!message.hasOwnProperty("lengthOfPeriod")) + throw $util.ProtocolError("missing required 'lengthOfPeriod'", { instance: message }); + if (!message.hasOwnProperty("lengthOfInterval")) + throw $util.ProtocolError("missing required 'lengthOfInterval'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("minigamePatternId")) + throw $util.ProtocolError("missing required 'minigamePatternId'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionSchedule message. + * @function verify + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + if (!$util.isInteger(message.qualifyingPeriodStartAt)) + return "qualifyingPeriodStartAt: integer expected"; + if (!$util.isInteger(message.qualifyingPeriodCloseAt)) + return "qualifyingPeriodCloseAt: integer expected"; + if (!$util.isInteger(message.competitionStartAt)) + return "competitionStartAt: integer expected"; + if (!$util.isInteger(message.competitionCloseAt)) + return "competitionCloseAt: integer expected"; + if (!$util.isInteger(message.competitionEndAt)) + return "competitionEndAt: integer expected"; + if (!$util.isInteger(message.lengthOfPeriod)) + return "lengthOfPeriod: integer expected"; + if (!$util.isInteger(message.lengthOfInterval)) + return "lengthOfInterval: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.minigamePatternId)) + return "minigamePatternId: integer expected"; + return null; + }; + + /** + * Creates a GhostCompetitionSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule + */ + GhostCompetitionSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCompetitionSchedule) + return object; + let message = new $root.wm.protobuf.GhostCompetitionSchedule(); + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + if (object.qualifyingPeriodStartAt != null) + message.qualifyingPeriodStartAt = object.qualifyingPeriodStartAt >>> 0; + if (object.qualifyingPeriodCloseAt != null) + message.qualifyingPeriodCloseAt = object.qualifyingPeriodCloseAt >>> 0; + if (object.competitionStartAt != null) + message.competitionStartAt = object.competitionStartAt >>> 0; + if (object.competitionCloseAt != null) + message.competitionCloseAt = object.competitionCloseAt >>> 0; + if (object.competitionEndAt != null) + message.competitionEndAt = object.competitionEndAt >>> 0; + if (object.lengthOfPeriod != null) + message.lengthOfPeriod = object.lengthOfPeriod >>> 0; + if (object.lengthOfInterval != null) + message.lengthOfInterval = object.lengthOfInterval >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.minigamePatternId != null) + message.minigamePatternId = object.minigamePatternId >>> 0; + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.GhostCompetitionSchedule} message GhostCompetitionSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.competitionId = 0; + object.qualifyingPeriodStartAt = 0; + object.qualifyingPeriodCloseAt = 0; + object.competitionStartAt = 0; + object.competitionCloseAt = 0; + object.competitionEndAt = 0; + object.lengthOfPeriod = 0; + object.lengthOfInterval = 0; + object.area = 0; + object.minigamePatternId = 0; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + if (message.qualifyingPeriodStartAt != null && message.hasOwnProperty("qualifyingPeriodStartAt")) + object.qualifyingPeriodStartAt = message.qualifyingPeriodStartAt; + if (message.qualifyingPeriodCloseAt != null && message.hasOwnProperty("qualifyingPeriodCloseAt")) + object.qualifyingPeriodCloseAt = message.qualifyingPeriodCloseAt; + if (message.competitionStartAt != null && message.hasOwnProperty("competitionStartAt")) + object.competitionStartAt = message.competitionStartAt; + if (message.competitionCloseAt != null && message.hasOwnProperty("competitionCloseAt")) + object.competitionCloseAt = message.competitionCloseAt; + if (message.competitionEndAt != null && message.hasOwnProperty("competitionEndAt")) + object.competitionEndAt = message.competitionEndAt; + if (message.lengthOfPeriod != null && message.hasOwnProperty("lengthOfPeriod")) + object.lengthOfPeriod = message.lengthOfPeriod; + if (message.lengthOfInterval != null && message.hasOwnProperty("lengthOfInterval")) + object.lengthOfInterval = message.lengthOfInterval; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.minigamePatternId != null && message.hasOwnProperty("minigamePatternId")) + object.minigamePatternId = message.minigamePatternId; + return object; + }; + + /** + * Converts this GhostCompetitionSchedule to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionSchedule + * @function getTypeUrl + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCompetitionSchedule"; + }; + + return GhostCompetitionSchedule; + })(); + + protobuf.GhostCompetitionParameter = (function() { + + /** + * Properties of a GhostCompetitionParameter. + * @memberof wm.protobuf + * @interface IGhostCompetitionParameter + * @property {Array.|null} [parameters1] GhostCompetitionParameter parameters1 + * @property {boolean} parameters2 GhostCompetitionParameter parameters2 + */ + + /** + * Constructs a new GhostCompetitionParameter. + * @memberof wm.protobuf + * @classdesc Represents a GhostCompetitionParameter. + * @implements IGhostCompetitionParameter + * @constructor + * @param {wm.protobuf.IGhostCompetitionParameter=} [properties] Properties to set + */ + function GhostCompetitionParameter(properties) { + this.parameters1 = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionParameter parameters1. + * @member {Array.} parameters1 + * @memberof wm.protobuf.GhostCompetitionParameter + * @instance + */ + GhostCompetitionParameter.prototype.parameters1 = $util.emptyArray; + + /** + * GhostCompetitionParameter parameters2. + * @member {boolean} parameters2 + * @memberof wm.protobuf.GhostCompetitionParameter + * @instance + */ + GhostCompetitionParameter.prototype.parameters2 = false; + + /** + * Creates a new GhostCompetitionParameter instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.IGhostCompetitionParameter=} [properties] Properties to set + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter instance + */ + GhostCompetitionParameter.create = function create(properties) { + return new GhostCompetitionParameter(properties); + }; + + /** + * Encodes the specified GhostCompetitionParameter message. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.IGhostCompetitionParameter} message GhostCompetitionParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionParameter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameters1 != null && message.parameters1.length) + for (let i = 0; i < message.parameters1.length; ++i) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.parameters1[i]); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.parameters2); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionParameter message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.IGhostCompetitionParameter} message GhostCompetitionParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionParameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionParameter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCompetitionParameter(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.parameters1 && message.parameters1.length)) + message.parameters1 = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.parameters1.push(reader.float()); + } else + message.parameters1.push(reader.float()); + break; + } + case 2: { + message.parameters2 = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("parameters2")) + throw $util.ProtocolError("missing required 'parameters2'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionParameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionParameter message. + * @function verify + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionParameter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameters1 != null && message.hasOwnProperty("parameters1")) { + if (!Array.isArray(message.parameters1)) + return "parameters1: array expected"; + for (let i = 0; i < message.parameters1.length; ++i) + if (typeof message.parameters1[i] !== "number") + return "parameters1: number[] expected"; + } + if (typeof message.parameters2 !== "boolean") + return "parameters2: boolean expected"; + return null; + }; + + /** + * Creates a GhostCompetitionParameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter + */ + GhostCompetitionParameter.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCompetitionParameter) + return object; + let message = new $root.wm.protobuf.GhostCompetitionParameter(); + if (object.parameters1) { + if (!Array.isArray(object.parameters1)) + throw TypeError(".wm.protobuf.GhostCompetitionParameter.parameters1: array expected"); + message.parameters1 = []; + for (let i = 0; i < object.parameters1.length; ++i) + message.parameters1[i] = Number(object.parameters1[i]); + } + if (object.parameters2 != null) + message.parameters2 = Boolean(object.parameters2); + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionParameter message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.GhostCompetitionParameter} message GhostCompetitionParameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionParameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.parameters1 = []; + if (options.defaults) + object.parameters2 = false; + if (message.parameters1 && message.parameters1.length) { + object.parameters1 = []; + for (let j = 0; j < message.parameters1.length; ++j) + object.parameters1[j] = options.json && !isFinite(message.parameters1[j]) ? String(message.parameters1[j]) : message.parameters1[j]; + } + if (message.parameters2 != null && message.hasOwnProperty("parameters2")) + object.parameters2 = message.parameters2; + return object; + }; + + /** + * Converts this GhostCompetitionParameter to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCompetitionParameter + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionParameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionParameter + * @function getTypeUrl + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCompetitionParameter"; + }; + + return GhostCompetitionParameter; + })(); + + protobuf.TransferNotice = (function() { + + /** + * Properties of a TransferNotice. + * @memberof wm.protobuf + * @interface ITransferNotice + * @property {boolean} needToSeeTransferred TransferNotice needToSeeTransferred + * @property {number|null} [totalMaxiGold] TransferNotice totalMaxiGold + * @property {number|null} [numOfPorscheCars] TransferNotice numOfPorscheCars + * @property {Array.|null} [porscheModels] TransferNotice porscheModels + * @property {boolean|null} [hasR35] TransferNotice hasR35 + */ + + /** + * Constructs a new TransferNotice. + * @memberof wm.protobuf + * @classdesc Represents a TransferNotice. + * @implements ITransferNotice + * @constructor + * @param {wm.protobuf.ITransferNotice=} [properties] Properties to set + */ + function TransferNotice(properties) { + this.porscheModels = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransferNotice needToSeeTransferred. + * @member {boolean} needToSeeTransferred + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.needToSeeTransferred = false; + + /** + * TransferNotice totalMaxiGold. + * @member {number} totalMaxiGold + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.totalMaxiGold = 0; + + /** + * TransferNotice numOfPorscheCars. + * @member {number} numOfPorscheCars + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.numOfPorscheCars = 0; + + /** + * TransferNotice porscheModels. + * @member {Array.} porscheModels + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.porscheModels = $util.emptyArray; + + /** + * TransferNotice hasR35. + * @member {boolean} hasR35 + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.hasR35 = false; + + /** + * Creates a new TransferNotice instance using the specified properties. + * @function create + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.ITransferNotice=} [properties] Properties to set + * @returns {wm.protobuf.TransferNotice} TransferNotice instance + */ + TransferNotice.create = function create(properties) { + return new TransferNotice(properties); + }; + + /** + * Encodes the specified TransferNotice message. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.ITransferNotice} message TransferNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferNotice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.needToSeeTransferred); + if (message.totalMaxiGold != null && Object.hasOwnProperty.call(message, "totalMaxiGold")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.totalMaxiGold); + if (message.numOfPorscheCars != null && Object.hasOwnProperty.call(message, "numOfPorscheCars")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.numOfPorscheCars); + if (message.porscheModels != null && message.porscheModels.length) + for (let i = 0; i < message.porscheModels.length; ++i) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.porscheModels[i]); + if (message.hasR35 != null && Object.hasOwnProperty.call(message, "hasR35")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.hasR35); + return writer; + }; + + /** + * Encodes the specified TransferNotice message, length delimited. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.ITransferNotice} message TransferNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferNotice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransferNotice message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TransferNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TransferNotice} TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferNotice.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TransferNotice(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.needToSeeTransferred = reader.bool(); + break; + } + case 2: { + message.totalMaxiGold = reader.uint32(); + break; + } + case 3: { + message.numOfPorscheCars = reader.uint32(); + break; + } + case 4: { + if (!(message.porscheModels && message.porscheModels.length)) + message.porscheModels = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.porscheModels.push(reader.uint32()); + } else + message.porscheModels.push(reader.uint32()); + break; + } + case 5: { + message.hasR35 = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("needToSeeTransferred")) + throw $util.ProtocolError("missing required 'needToSeeTransferred'", { instance: message }); + return message; + }; + + /** + * Decodes a TransferNotice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TransferNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TransferNotice} TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferNotice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransferNotice message. + * @function verify + * @memberof wm.protobuf.TransferNotice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransferNotice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (typeof message.needToSeeTransferred !== "boolean") + return "needToSeeTransferred: boolean expected"; + if (message.totalMaxiGold != null && message.hasOwnProperty("totalMaxiGold")) + if (!$util.isInteger(message.totalMaxiGold)) + return "totalMaxiGold: integer expected"; + if (message.numOfPorscheCars != null && message.hasOwnProperty("numOfPorscheCars")) + if (!$util.isInteger(message.numOfPorscheCars)) + return "numOfPorscheCars: integer expected"; + if (message.porscheModels != null && message.hasOwnProperty("porscheModels")) { + if (!Array.isArray(message.porscheModels)) + return "porscheModels: array expected"; + for (let i = 0; i < message.porscheModels.length; ++i) + if (!$util.isInteger(message.porscheModels[i])) + return "porscheModels: integer[] expected"; + } + if (message.hasR35 != null && message.hasOwnProperty("hasR35")) + if (typeof message.hasR35 !== "boolean") + return "hasR35: boolean expected"; + return null; + }; + + /** + * Creates a TransferNotice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TransferNotice + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TransferNotice} TransferNotice + */ + TransferNotice.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TransferNotice) + return object; + let message = new $root.wm.protobuf.TransferNotice(); + if (object.needToSeeTransferred != null) + message.needToSeeTransferred = Boolean(object.needToSeeTransferred); + if (object.totalMaxiGold != null) + message.totalMaxiGold = object.totalMaxiGold >>> 0; + if (object.numOfPorscheCars != null) + message.numOfPorscheCars = object.numOfPorscheCars >>> 0; + if (object.porscheModels) { + if (!Array.isArray(object.porscheModels)) + throw TypeError(".wm.protobuf.TransferNotice.porscheModels: array expected"); + message.porscheModels = []; + for (let i = 0; i < object.porscheModels.length; ++i) + message.porscheModels[i] = object.porscheModels[i] >>> 0; + } + if (object.hasR35 != null) + message.hasR35 = Boolean(object.hasR35); + return message; + }; + + /** + * Creates a plain object from a TransferNotice message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.TransferNotice} message TransferNotice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransferNotice.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.porscheModels = []; + if (options.defaults) { + object.needToSeeTransferred = false; + object.totalMaxiGold = 0; + object.numOfPorscheCars = 0; + object.hasR35 = false; + } + if (message.needToSeeTransferred != null && message.hasOwnProperty("needToSeeTransferred")) + object.needToSeeTransferred = message.needToSeeTransferred; + if (message.totalMaxiGold != null && message.hasOwnProperty("totalMaxiGold")) + object.totalMaxiGold = message.totalMaxiGold; + if (message.numOfPorscheCars != null && message.hasOwnProperty("numOfPorscheCars")) + object.numOfPorscheCars = message.numOfPorscheCars; + if (message.porscheModels && message.porscheModels.length) { + object.porscheModels = []; + for (let j = 0; j < message.porscheModels.length; ++j) + object.porscheModels[j] = message.porscheModels[j]; + } + if (message.hasR35 != null && message.hasOwnProperty("hasR35")) + object.hasR35 = message.hasR35; + return object; + }; + + /** + * Converts this TransferNotice to JSON. + * @function toJSON + * @memberof wm.protobuf.TransferNotice + * @instance + * @returns {Object.} JSON object + */ + TransferNotice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransferNotice + * @function getTypeUrl + * @memberof wm.protobuf.TransferNotice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransferNotice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TransferNotice"; + }; + + return TransferNotice; + })(); + + protobuf.GameFeatureVersion = (function() { + + /** + * Properties of a GameFeatureVersion. + * @memberof wm.protobuf + * @interface IGameFeatureVersion + * @property {number} version GameFeatureVersion version + * @property {number} year GameFeatureVersion year + * @property {number} month GameFeatureVersion month + * @property {number} pluses GameFeatureVersion pluses + * @property {number} releaseAt GameFeatureVersion releaseAt + */ + + /** + * Constructs a new GameFeatureVersion. + * @memberof wm.protobuf + * @classdesc Represents a GameFeatureVersion. + * @implements IGameFeatureVersion + * @constructor + * @param {wm.protobuf.IGameFeatureVersion=} [properties] Properties to set + */ + function GameFeatureVersion(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GameFeatureVersion version. + * @member {number} version + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.version = 0; + + /** + * GameFeatureVersion year. + * @member {number} year + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.year = 0; + + /** + * GameFeatureVersion month. + * @member {number} month + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.month = 0; + + /** + * GameFeatureVersion pluses. + * @member {number} pluses + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.pluses = 0; + + /** + * GameFeatureVersion releaseAt. + * @member {number} releaseAt + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.releaseAt = 0; + + /** + * Creates a new GameFeatureVersion instance using the specified properties. + * @function create + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.IGameFeatureVersion=} [properties] Properties to set + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion instance + */ + GameFeatureVersion.create = function create(properties) { + return new GameFeatureVersion(properties); + }; + + /** + * Encodes the specified GameFeatureVersion message. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.IGameFeatureVersion} message GameFeatureVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GameFeatureVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.version); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.year); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.month); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.pluses); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.releaseAt); + return writer; + }; + + /** + * Encodes the specified GameFeatureVersion message, length delimited. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.IGameFeatureVersion} message GameFeatureVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GameFeatureVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GameFeatureVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GameFeatureVersion(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.uint32(); + break; + } + case 2: { + message.year = reader.uint32(); + break; + } + case 3: { + message.month = reader.uint32(); + break; + } + case 4: { + message.pluses = reader.uint32(); + break; + } + case 5: { + message.releaseAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("version")) + throw $util.ProtocolError("missing required 'version'", { instance: message }); + if (!message.hasOwnProperty("year")) + throw $util.ProtocolError("missing required 'year'", { instance: message }); + if (!message.hasOwnProperty("month")) + throw $util.ProtocolError("missing required 'month'", { instance: message }); + if (!message.hasOwnProperty("pluses")) + throw $util.ProtocolError("missing required 'pluses'", { instance: message }); + if (!message.hasOwnProperty("releaseAt")) + throw $util.ProtocolError("missing required 'releaseAt'", { instance: message }); + return message; + }; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GameFeatureVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GameFeatureVersion message. + * @function verify + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GameFeatureVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (!$util.isInteger(message.pluses)) + return "pluses: integer expected"; + if (!$util.isInteger(message.releaseAt)) + return "releaseAt: integer expected"; + return null; + }; + + /** + * Creates a GameFeatureVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion + */ + GameFeatureVersion.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GameFeatureVersion) + return object; + let message = new $root.wm.protobuf.GameFeatureVersion(); + if (object.version != null) + message.version = object.version >>> 0; + if (object.year != null) + message.year = object.year >>> 0; + if (object.month != null) + message.month = object.month >>> 0; + if (object.pluses != null) + message.pluses = object.pluses >>> 0; + if (object.releaseAt != null) + message.releaseAt = object.releaseAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a GameFeatureVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.GameFeatureVersion} message GameFeatureVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GameFeatureVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.version = 0; + object.year = 0; + object.month = 0; + object.pluses = 0; + object.releaseAt = 0; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.pluses != null && message.hasOwnProperty("pluses")) + object.pluses = message.pluses; + if (message.releaseAt != null && message.hasOwnProperty("releaseAt")) + object.releaseAt = message.releaseAt; + return object; + }; + + /** + * Converts this GameFeatureVersion to JSON. + * @function toJSON + * @memberof wm.protobuf.GameFeatureVersion + * @instance + * @returns {Object.} JSON object + */ + GameFeatureVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GameFeatureVersion + * @function getTypeUrl + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GameFeatureVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GameFeatureVersion"; + }; + + return GameFeatureVersion; + })(); + + protobuf.ScratchSheet = (function() { + + /** + * Properties of a ScratchSheet. + * @memberof wm.protobuf + * @interface IScratchSheet + * @property {Array.|null} [squares] ScratchSheet squares + */ + + /** + * Constructs a new ScratchSheet. + * @memberof wm.protobuf + * @classdesc Represents a ScratchSheet. + * @implements IScratchSheet + * @constructor + * @param {wm.protobuf.IScratchSheet=} [properties] Properties to set + */ + function ScratchSheet(properties) { + this.squares = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ScratchSheet squares. + * @member {Array.} squares + * @memberof wm.protobuf.ScratchSheet + * @instance + */ + ScratchSheet.prototype.squares = $util.emptyArray; + + /** + * Creates a new ScratchSheet instance using the specified properties. + * @function create + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.IScratchSheet=} [properties] Properties to set + * @returns {wm.protobuf.ScratchSheet} ScratchSheet instance + */ + ScratchSheet.create = function create(properties) { + return new ScratchSheet(properties); + }; + + /** + * Encodes the specified ScratchSheet message. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.IScratchSheet} message ScratchSheet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSheet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.squares != null && message.squares.length) + for (let i = 0; i < message.squares.length; ++i) + $root.wm.protobuf.ScratchSheet.ScratchSquare.encode(message.squares[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ScratchSheet message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.IScratchSheet} message ScratchSheet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSheet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ScratchSheet} ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSheet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ScratchSheet(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.squares && message.squares.length)) + message.squares = []; + message.squares.push($root.wm.protobuf.ScratchSheet.ScratchSquare.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ScratchSheet} ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSheet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScratchSheet message. + * @function verify + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScratchSheet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.squares != null && message.hasOwnProperty("squares")) { + if (!Array.isArray(message.squares)) + return "squares: array expected"; + for (let i = 0; i < message.squares.length; ++i) { + let error = $root.wm.protobuf.ScratchSheet.ScratchSquare.verify(message.squares[i]); + if (error) + return "squares." + error; + } + } + return null; + }; + + /** + * Creates a ScratchSheet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ScratchSheet} ScratchSheet + */ + ScratchSheet.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ScratchSheet) + return object; + let message = new $root.wm.protobuf.ScratchSheet(); + if (object.squares) { + if (!Array.isArray(object.squares)) + throw TypeError(".wm.protobuf.ScratchSheet.squares: array expected"); + message.squares = []; + for (let i = 0; i < object.squares.length; ++i) { + if (typeof object.squares[i] !== "object") + throw TypeError(".wm.protobuf.ScratchSheet.squares: object expected"); + message.squares[i] = $root.wm.protobuf.ScratchSheet.ScratchSquare.fromObject(object.squares[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ScratchSheet message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.ScratchSheet} message ScratchSheet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScratchSheet.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.squares = []; + if (message.squares && message.squares.length) { + object.squares = []; + for (let j = 0; j < message.squares.length; ++j) + object.squares[j] = $root.wm.protobuf.ScratchSheet.ScratchSquare.toObject(message.squares[j], options); + } + return object; + }; + + /** + * Converts this ScratchSheet to JSON. + * @function toJSON + * @memberof wm.protobuf.ScratchSheet + * @instance + * @returns {Object.} JSON object + */ + ScratchSheet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScratchSheet + * @function getTypeUrl + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScratchSheet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ScratchSheet"; + }; + + ScratchSheet.ScratchSquare = (function() { + + /** + * Properties of a ScratchSquare. + * @memberof wm.protobuf.ScratchSheet + * @interface IScratchSquare + * @property {wm.protobuf.ItemCategory} category ScratchSquare category + * @property {number} itemId ScratchSquare itemId + * @property {boolean} earned ScratchSquare earned + */ + + /** + * Constructs a new ScratchSquare. + * @memberof wm.protobuf.ScratchSheet + * @classdesc Represents a ScratchSquare. + * @implements IScratchSquare + * @constructor + * @param {wm.protobuf.ScratchSheet.IScratchSquare=} [properties] Properties to set + */ + function ScratchSquare(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ScratchSquare category. + * @member {wm.protobuf.ItemCategory} category + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + */ + ScratchSquare.prototype.category = 1; + + /** + * ScratchSquare itemId. + * @member {number} itemId + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + */ + ScratchSquare.prototype.itemId = 0; + + /** + * ScratchSquare earned. + * @member {boolean} earned + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + */ + ScratchSquare.prototype.earned = false; + + /** + * Creates a new ScratchSquare instance using the specified properties. + * @function create + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.IScratchSquare=} [properties] Properties to set + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare instance + */ + ScratchSquare.create = function create(properties) { + return new ScratchSquare(properties); + }; + + /** + * Encodes the specified ScratchSquare message. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.IScratchSquare} message ScratchSquare message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSquare.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.itemId); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.earned); + return writer; + }; + + /** + * Encodes the specified ScratchSquare message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.IScratchSquare} message ScratchSquare message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSquare.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSquare.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ScratchSheet.ScratchSquare(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.itemId = reader.uint32(); + break; + } + case 3: { + message.earned = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("category")) + throw $util.ProtocolError("missing required 'category'", { instance: message }); + if (!message.hasOwnProperty("itemId")) + throw $util.ProtocolError("missing required 'itemId'", { instance: message }); + if (!message.hasOwnProperty("earned")) + throw $util.ProtocolError("missing required 'earned'", { instance: message }); + return message; + }; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSquare.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScratchSquare message. + * @function verify + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScratchSquare.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.category) { + default: + return "category: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + case 10: + case 12: + case 14: + case 15: + case 16: + case 17: + case 19: + case 22: + case 24: + case 25: + case 26: + case 27: + case 28: + case 201: + case 202: + case 203: + case 300: + case 301: + break; + } + if (!$util.isInteger(message.itemId)) + return "itemId: integer expected"; + if (typeof message.earned !== "boolean") + return "earned: boolean expected"; + return null; + }; + + /** + * Creates a ScratchSquare message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare + */ + ScratchSquare.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ScratchSheet.ScratchSquare) + return object; + let message = new $root.wm.protobuf.ScratchSheet.ScratchSquare(); + switch (object.category) { + case "CAT_CUSTOM_COLOR": + case 1: + message.category = 1; + break; + case "CAT_WHEEL": + case 2: + message.category = 2; + break; + case "CAT_AERO": + case 3: + message.category = 3; + break; + case "CAT_BONNET": + case 4: + message.category = 4; + break; + case "CAT_WING": + case 5: + message.category = 5; + break; + case "CAT_MIRROR": + case 6: + message.category = 6; + break; + case "CAT_NEON": + case 8: + message.category = 8; + break; + case "CAT_TRUNK": + case 9: + message.category = 9; + break; + case "CAT_NUMBER_PLATE": + case 10: + message.category = 10; + break; + case "CAT_GT_WING": + case 12: + message.category = 12; + break; + case "CAT_AURA_MOTIF": + case 14: + message.category = 14; + break; + case "CAT_METER": + case 15: + message.category = 15; + break; + case "CAT_BGM": + case 16: + message.category = 16; + break; + case "CAT_NAME_PLATE": + case 17: + message.category = 17; + break; + case "CAT_NUMBER": + case 19: + message.category = 19; + break; + case "CAT_BGM_TRACK": + case 22: + message.category = 22; + break; + case "CAT_WINDOW_STICKER_FONT": + case 24: + message.category = 24; + break; + case "CAT_WINDOW_DECORATION": + case 25: + message.category = 25; + break; + case "CAT_RIVAL_MARKER": + case 26: + message.category = 26; + break; + case "CAT_STAMP": + case 27: + message.category = 27; + break; + case "CAT_TERMINAL_BACKGROUND": + case 28: + message.category = 28; + break; + case "CAT_CAR_TICKET": + case 201: + message.category = 201; + break; + case "CAT_CONSUMPTION_ITEM": + case 202: + message.category = 202; + break; + case "CAT_CAR_TICKET_FREE": + case 203: + message.category = 203; + break; + case "CAT_AERO_FULLSET": + case 300: + message.category = 300; + break; + case "CAT_AERO_LIMITED": + case 301: + message.category = 301; + break; + } + if (object.itemId != null) + message.itemId = object.itemId >>> 0; + if (object.earned != null) + message.earned = Boolean(object.earned); + return message; + }; + + /** + * Creates a plain object from a ScratchSquare message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.ScratchSquare} message ScratchSquare + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScratchSquare.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.category = options.enums === String ? "CAT_CUSTOM_COLOR" : 1; + object.itemId = 0; + object.earned = false; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.wm.protobuf.ItemCategory[message.category] : message.category; + if (message.itemId != null && message.hasOwnProperty("itemId")) + object.itemId = message.itemId; + if (message.earned != null && message.hasOwnProperty("earned")) + object.earned = message.earned; + return object; + }; + + /** + * Converts this ScratchSquare to JSON. + * @function toJSON + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + * @returns {Object.} JSON object + */ + ScratchSquare.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScratchSquare + * @function getTypeUrl + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScratchSquare.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ScratchSheet.ScratchSquare"; + }; + + return ScratchSquare; + })(); + + return ScratchSheet; + })(); + + protobuf.UserItem = (function() { + + /** + * Properties of a UserItem. + * @memberof wm.protobuf + * @interface IUserItem + * @property {wm.protobuf.ItemCategory} category UserItem category + * @property {number} itemId UserItem itemId + * @property {number|null} [userItemId] UserItem userItemId + * @property {number|null} [earnedAt] UserItem earnedAt + * @property {number|null} [expireAt] UserItem expireAt + */ + + /** + * Constructs a new UserItem. + * @memberof wm.protobuf + * @classdesc Represents a UserItem. + * @implements IUserItem + * @constructor + * @param {wm.protobuf.IUserItem=} [properties] Properties to set + */ + function UserItem(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserItem category. + * @member {wm.protobuf.ItemCategory} category + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.category = 1; + + /** + * UserItem itemId. + * @member {number} itemId + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.itemId = 0; + + /** + * UserItem userItemId. + * @member {number} userItemId + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.userItemId = 0; + + /** + * UserItem earnedAt. + * @member {number} earnedAt + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.earnedAt = 0; + + /** + * UserItem expireAt. + * @member {number} expireAt + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.expireAt = 0; + + /** + * Creates a new UserItem instance using the specified properties. + * @function create + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.IUserItem=} [properties] Properties to set + * @returns {wm.protobuf.UserItem} UserItem instance + */ + UserItem.create = function create(properties) { + return new UserItem(properties); + }; + + /** + * Encodes the specified UserItem message. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.IUserItem} message UserItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.itemId); + if (message.userItemId != null && Object.hasOwnProperty.call(message, "userItemId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.userItemId); + if (message.earnedAt != null && Object.hasOwnProperty.call(message, "earnedAt")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.earnedAt); + if (message.expireAt != null && Object.hasOwnProperty.call(message, "expireAt")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.expireAt); + return writer; + }; + + /** + * Encodes the specified UserItem message, length delimited. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.IUserItem} message UserItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserItem message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UserItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UserItem} UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UserItem(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.itemId = reader.uint32(); + break; + } + case 3: { + message.userItemId = reader.uint32(); + break; + } + case 4: { + message.earnedAt = reader.uint32(); + break; + } + case 5: { + message.expireAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("category")) + throw $util.ProtocolError("missing required 'category'", { instance: message }); + if (!message.hasOwnProperty("itemId")) + throw $util.ProtocolError("missing required 'itemId'", { instance: message }); + return message; + }; + + /** + * Decodes a UserItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UserItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UserItem} UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserItem message. + * @function verify + * @memberof wm.protobuf.UserItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.category) { + default: + return "category: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + case 10: + case 12: + case 14: + case 15: + case 16: + case 17: + case 19: + case 22: + case 24: + case 25: + case 26: + case 27: + case 28: + case 201: + case 202: + case 203: + case 300: + case 301: + break; + } + if (!$util.isInteger(message.itemId)) + return "itemId: integer expected"; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + if (!$util.isInteger(message.userItemId)) + return "userItemId: integer expected"; + if (message.earnedAt != null && message.hasOwnProperty("earnedAt")) + if (!$util.isInteger(message.earnedAt)) + return "earnedAt: integer expected"; + if (message.expireAt != null && message.hasOwnProperty("expireAt")) + if (!$util.isInteger(message.expireAt)) + return "expireAt: integer expected"; + return null; + }; + + /** + * Creates a UserItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UserItem + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UserItem} UserItem + */ + UserItem.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UserItem) + return object; + let message = new $root.wm.protobuf.UserItem(); + switch (object.category) { + case "CAT_CUSTOM_COLOR": + case 1: + message.category = 1; + break; + case "CAT_WHEEL": + case 2: + message.category = 2; + break; + case "CAT_AERO": + case 3: + message.category = 3; + break; + case "CAT_BONNET": + case 4: + message.category = 4; + break; + case "CAT_WING": + case 5: + message.category = 5; + break; + case "CAT_MIRROR": + case 6: + message.category = 6; + break; + case "CAT_NEON": + case 8: + message.category = 8; + break; + case "CAT_TRUNK": + case 9: + message.category = 9; + break; + case "CAT_NUMBER_PLATE": + case 10: + message.category = 10; + break; + case "CAT_GT_WING": + case 12: + message.category = 12; + break; + case "CAT_AURA_MOTIF": + case 14: + message.category = 14; + break; + case "CAT_METER": + case 15: + message.category = 15; + break; + case "CAT_BGM": + case 16: + message.category = 16; + break; + case "CAT_NAME_PLATE": + case 17: + message.category = 17; + break; + case "CAT_NUMBER": + case 19: + message.category = 19; + break; + case "CAT_BGM_TRACK": + case 22: + message.category = 22; + break; + case "CAT_WINDOW_STICKER_FONT": + case 24: + message.category = 24; + break; + case "CAT_WINDOW_DECORATION": + case 25: + message.category = 25; + break; + case "CAT_RIVAL_MARKER": + case 26: + message.category = 26; + break; + case "CAT_STAMP": + case 27: + message.category = 27; + break; + case "CAT_TERMINAL_BACKGROUND": + case 28: + message.category = 28; + break; + case "CAT_CAR_TICKET": + case 201: + message.category = 201; + break; + case "CAT_CONSUMPTION_ITEM": + case 202: + message.category = 202; + break; + case "CAT_CAR_TICKET_FREE": + case 203: + message.category = 203; + break; + case "CAT_AERO_FULLSET": + case 300: + message.category = 300; + break; + case "CAT_AERO_LIMITED": + case 301: + message.category = 301; + break; + } + if (object.itemId != null) + message.itemId = object.itemId >>> 0; + if (object.userItemId != null) + message.userItemId = object.userItemId >>> 0; + if (object.earnedAt != null) + message.earnedAt = object.earnedAt >>> 0; + if (object.expireAt != null) + message.expireAt = object.expireAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a UserItem message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.UserItem} message UserItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.category = options.enums === String ? "CAT_CUSTOM_COLOR" : 1; + object.itemId = 0; + object.userItemId = 0; + object.earnedAt = 0; + object.expireAt = 0; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.wm.protobuf.ItemCategory[message.category] : message.category; + if (message.itemId != null && message.hasOwnProperty("itemId")) + object.itemId = message.itemId; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + object.userItemId = message.userItemId; + if (message.earnedAt != null && message.hasOwnProperty("earnedAt")) + object.earnedAt = message.earnedAt; + if (message.expireAt != null && message.hasOwnProperty("expireAt")) + object.expireAt = message.expireAt; + return object; + }; + + /** + * Converts this UserItem to JSON. + * @function toJSON + * @memberof wm.protobuf.UserItem + * @instance + * @returns {Object.} JSON object + */ + UserItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserItem + * @function getTypeUrl + * @memberof wm.protobuf.UserItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UserItem"; + }; + + return UserItem; + })(); + + protobuf.InviteFriendCampaignSchedule = (function() { + + /** + * Properties of an InviteFriendCampaignSchedule. + * @memberof wm.protobuf + * @interface IInviteFriendCampaignSchedule + * @property {number} campaignId InviteFriendCampaignSchedule campaignId + * @property {number} startAt InviteFriendCampaignSchedule startAt + * @property {number} endAt InviteFriendCampaignSchedule endAt + * @property {number} couponUnreceivableAt InviteFriendCampaignSchedule couponUnreceivableAt + */ + + /** + * Constructs a new InviteFriendCampaignSchedule. + * @memberof wm.protobuf + * @classdesc Represents an InviteFriendCampaignSchedule. + * @implements IInviteFriendCampaignSchedule + * @constructor + * @param {wm.protobuf.IInviteFriendCampaignSchedule=} [properties] Properties to set + */ + function InviteFriendCampaignSchedule(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InviteFriendCampaignSchedule campaignId. + * @member {number} campaignId + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.campaignId = 0; + + /** + * InviteFriendCampaignSchedule startAt. + * @member {number} startAt + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.startAt = 0; + + /** + * InviteFriendCampaignSchedule endAt. + * @member {number} endAt + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.endAt = 0; + + /** + * InviteFriendCampaignSchedule couponUnreceivableAt. + * @member {number} couponUnreceivableAt + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.couponUnreceivableAt = 0; + + /** + * Creates a new InviteFriendCampaignSchedule instance using the specified properties. + * @function create + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.IInviteFriendCampaignSchedule=} [properties] Properties to set + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule instance + */ + InviteFriendCampaignSchedule.create = function create(properties) { + return new InviteFriendCampaignSchedule(properties); + }; + + /** + * Encodes the specified InviteFriendCampaignSchedule message. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.IInviteFriendCampaignSchedule} message InviteFriendCampaignSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InviteFriendCampaignSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.campaignId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.startAt); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.endAt); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.couponUnreceivableAt); + return writer; + }; + + /** + * Encodes the specified InviteFriendCampaignSchedule message, length delimited. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.IInviteFriendCampaignSchedule} message InviteFriendCampaignSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InviteFriendCampaignSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InviteFriendCampaignSchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.InviteFriendCampaignSchedule(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.campaignId = reader.uint32(); + break; + } + case 2: { + message.startAt = reader.uint32(); + break; + } + case 3: { + message.endAt = reader.uint32(); + break; + } + case 4: { + message.couponUnreceivableAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("campaignId")) + throw $util.ProtocolError("missing required 'campaignId'", { instance: message }); + if (!message.hasOwnProperty("startAt")) + throw $util.ProtocolError("missing required 'startAt'", { instance: message }); + if (!message.hasOwnProperty("endAt")) + throw $util.ProtocolError("missing required 'endAt'", { instance: message }); + if (!message.hasOwnProperty("couponUnreceivableAt")) + throw $util.ProtocolError("missing required 'couponUnreceivableAt'", { instance: message }); + return message; + }; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InviteFriendCampaignSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InviteFriendCampaignSchedule message. + * @function verify + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InviteFriendCampaignSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.campaignId)) + return "campaignId: integer expected"; + if (!$util.isInteger(message.startAt)) + return "startAt: integer expected"; + if (!$util.isInteger(message.endAt)) + return "endAt: integer expected"; + if (!$util.isInteger(message.couponUnreceivableAt)) + return "couponUnreceivableAt: integer expected"; + return null; + }; + + /** + * Creates an InviteFriendCampaignSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule + */ + InviteFriendCampaignSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.InviteFriendCampaignSchedule) + return object; + let message = new $root.wm.protobuf.InviteFriendCampaignSchedule(); + if (object.campaignId != null) + message.campaignId = object.campaignId >>> 0; + if (object.startAt != null) + message.startAt = object.startAt >>> 0; + if (object.endAt != null) + message.endAt = object.endAt >>> 0; + if (object.couponUnreceivableAt != null) + message.couponUnreceivableAt = object.couponUnreceivableAt >>> 0; + return message; + }; + + /** + * Creates a plain object from an InviteFriendCampaignSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.InviteFriendCampaignSchedule} message InviteFriendCampaignSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InviteFriendCampaignSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.campaignId = 0; + object.startAt = 0; + object.endAt = 0; + object.couponUnreceivableAt = 0; + } + if (message.campaignId != null && message.hasOwnProperty("campaignId")) + object.campaignId = message.campaignId; + if (message.startAt != null && message.hasOwnProperty("startAt")) + object.startAt = message.startAt; + if (message.endAt != null && message.hasOwnProperty("endAt")) + object.endAt = message.endAt; + if (message.couponUnreceivableAt != null && message.hasOwnProperty("couponUnreceivableAt")) + object.couponUnreceivableAt = message.couponUnreceivableAt; + return object; + }; + + /** + * Converts this InviteFriendCampaignSchedule to JSON. + * @function toJSON + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + * @returns {Object.} JSON object + */ + InviteFriendCampaignSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InviteFriendCampaignSchedule + * @function getTypeUrl + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InviteFriendCampaignSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.InviteFriendCampaignSchedule"; + }; + + return InviteFriendCampaignSchedule; + })(); + + protobuf.CarTuning = (function() { + + /** + * Properties of a CarTuning. + * @memberof wm.protobuf + * @interface ICarTuning + * @property {number} carId CarTuning carId + * @property {number} tunePower CarTuning tunePower + * @property {number} tuneHandling CarTuning tuneHandling + * @property {number|null} [lastPlayedAt] CarTuning lastPlayedAt + */ + + /** + * Constructs a new CarTuning. + * @memberof wm.protobuf + * @classdesc Represents a CarTuning. + * @implements ICarTuning + * @constructor + * @param {wm.protobuf.ICarTuning=} [properties] Properties to set + */ + function CarTuning(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarTuning carId. + * @member {number} carId + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.carId = 0; + + /** + * CarTuning tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.tunePower = 0; + + /** + * CarTuning tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.tuneHandling = 0; + + /** + * CarTuning lastPlayedAt. + * @member {number} lastPlayedAt + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.lastPlayedAt = 0; + + /** + * Creates a new CarTuning instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.ICarTuning=} [properties] Properties to set + * @returns {wm.protobuf.CarTuning} CarTuning instance + */ + CarTuning.create = function create(properties) { + return new CarTuning(properties); + }; + + /** + * Encodes the specified CarTuning message. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.ICarTuning} message CarTuning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tunePower); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuneHandling); + if (message.lastPlayedAt != null && Object.hasOwnProperty.call(message, "lastPlayedAt")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.lastPlayedAt); + return writer; + }; + + /** + * Encodes the specified CarTuning message, length delimited. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.ICarTuning} message CarTuning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarTuning message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarTuning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarTuning} CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarTuning(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.tunePower = reader.uint32(); + break; + } + case 3: { + message.tuneHandling = reader.uint32(); + break; + } + case 4: { + message.lastPlayedAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes a CarTuning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarTuning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarTuning} CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarTuning message. + * @function verify + * @memberof wm.protobuf.CarTuning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarTuning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + if (!$util.isInteger(message.lastPlayedAt)) + return "lastPlayedAt: integer expected"; + return null; + }; + + /** + * Creates a CarTuning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarTuning + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarTuning} CarTuning + */ + CarTuning.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarTuning) + return object; + let message = new $root.wm.protobuf.CarTuning(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.lastPlayedAt != null) + message.lastPlayedAt = object.lastPlayedAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarTuning message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.CarTuning} message CarTuning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarTuning.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.lastPlayedAt = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + object.lastPlayedAt = message.lastPlayedAt; + return object; + }; + + /** + * Converts this CarTuning to JSON. + * @function toJSON + * @memberof wm.protobuf.CarTuning + * @instance + * @returns {Object.} JSON object + */ + CarTuning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarTuning + * @function getTypeUrl + * @memberof wm.protobuf.CarTuning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarTuning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarTuning"; + }; + + return CarTuning; + })(); + + protobuf.BinaryData = (function() { + + /** + * Properties of a BinaryData. + * @memberof wm.protobuf + * @interface IBinaryData + * @property {Uint8Array} data BinaryData data + * @property {number} mergeSerial BinaryData mergeSerial + */ + + /** + * Constructs a new BinaryData. + * @memberof wm.protobuf + * @classdesc Represents a BinaryData. + * @implements IBinaryData + * @constructor + * @param {wm.protobuf.IBinaryData=} [properties] Properties to set + */ + function BinaryData(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BinaryData data. + * @member {Uint8Array} data + * @memberof wm.protobuf.BinaryData + * @instance + */ + BinaryData.prototype.data = $util.newBuffer([]); + + /** + * BinaryData mergeSerial. + * @member {number} mergeSerial + * @memberof wm.protobuf.BinaryData + * @instance + */ + BinaryData.prototype.mergeSerial = 0; + + /** + * Creates a new BinaryData instance using the specified properties. + * @function create + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.IBinaryData=} [properties] Properties to set + * @returns {wm.protobuf.BinaryData} BinaryData instance + */ + BinaryData.create = function create(properties) { + return new BinaryData(properties); + }; + + /** + * Encodes the specified BinaryData message. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.IBinaryData} message BinaryData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + writer.uint32(/* id 2, wireType 0 =*/16).sint32(message.mergeSerial); + return writer; + }; + + /** + * Encodes the specified BinaryData message, length delimited. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.IBinaryData} message BinaryData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BinaryData message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.BinaryData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.BinaryData} BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.BinaryData(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.data = reader.bytes(); + break; + } + case 2: { + message.mergeSerial = reader.sint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("data")) + throw $util.ProtocolError("missing required 'data'", { instance: message }); + if (!message.hasOwnProperty("mergeSerial")) + throw $util.ProtocolError("missing required 'mergeSerial'", { instance: message }); + return message; + }; + + /** + * Decodes a BinaryData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.BinaryData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.BinaryData} BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BinaryData message. + * @function verify + * @memberof wm.protobuf.BinaryData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BinaryData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (!$util.isInteger(message.mergeSerial)) + return "mergeSerial: integer expected"; + return null; + }; + + /** + * Creates a BinaryData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.BinaryData + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.BinaryData} BinaryData + */ + BinaryData.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.BinaryData) + return object; + let message = new $root.wm.protobuf.BinaryData(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + if (object.mergeSerial != null) + message.mergeSerial = object.mergeSerial | 0; + return message; + }; + + /** + * Creates a plain object from a BinaryData message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.BinaryData} message BinaryData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BinaryData.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.mergeSerial = 0; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.mergeSerial != null && message.hasOwnProperty("mergeSerial")) + object.mergeSerial = message.mergeSerial; + return object; + }; + + /** + * Converts this BinaryData to JSON. + * @function toJSON + * @memberof wm.protobuf.BinaryData + * @instance + * @returns {Object.} JSON object + */ + BinaryData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BinaryData + * @function getTypeUrl + * @memberof wm.protobuf.BinaryData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BinaryData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.BinaryData"; + }; + + return BinaryData; + })(); + + protobuf.GhostTrail = (function() { + + /** + * Properties of a GhostTrail. + * @memberof wm.protobuf + * @interface IGhostTrail + * @property {number} carId GhostTrail carId + * @property {number} area GhostTrail area + * @property {number} ramp GhostTrail ramp + * @property {number} path GhostTrail path + * @property {number} playedAt GhostTrail playedAt + * @property {wm.protobuf.IPlace|null} [playedPlace] GhostTrail playedPlace + * @property {Uint8Array} trail GhostTrail trail + */ + + /** + * Constructs a new GhostTrail. + * @memberof wm.protobuf + * @classdesc Represents a GhostTrail. + * @implements IGhostTrail + * @constructor + * @param {wm.protobuf.IGhostTrail=} [properties] Properties to set + */ + function GhostTrail(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostTrail carId. + * @member {number} carId + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.carId = 0; + + /** + * GhostTrail area. + * @member {number} area + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.area = 0; + + /** + * GhostTrail ramp. + * @member {number} ramp + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.ramp = 0; + + /** + * GhostTrail path. + * @member {number} path + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.path = 0; + + /** + * GhostTrail playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.playedAt = 0; + + /** + * GhostTrail playedPlace. + * @member {wm.protobuf.IPlace|null|undefined} playedPlace + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.playedPlace = null; + + /** + * GhostTrail trail. + * @member {Uint8Array} trail + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.trail = $util.newBuffer([]); + + /** + * Creates a new GhostTrail instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.IGhostTrail=} [properties] Properties to set + * @returns {wm.protobuf.GhostTrail} GhostTrail instance + */ + GhostTrail.create = function create(properties) { + return new GhostTrail(properties); + }; + + /** + * Encodes the specified GhostTrail message. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.IGhostTrail} message GhostTrail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostTrail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.area); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.ramp); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.playedAt); + if (message.playedPlace != null && Object.hasOwnProperty.call(message, "playedPlace")) + $root.wm.protobuf.Place.encode(message.playedPlace, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.trail); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.path); + return writer; + }; + + /** + * Encodes the specified GhostTrail message, length delimited. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.IGhostTrail} message GhostTrail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostTrail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostTrail message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostTrail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostTrail} GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostTrail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostTrail(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.area = reader.uint32(); + break; + } + case 3: { + message.ramp = reader.uint32(); + break; + } + case 7: { + message.path = reader.uint32(); + break; + } + case 4: { + message.playedAt = reader.uint32(); + break; + } + case 5: { + message.playedPlace = $root.wm.protobuf.Place.decode(reader, reader.uint32()); + break; + } + case 6: { + message.trail = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("ramp")) + throw $util.ProtocolError("missing required 'ramp'", { instance: message }); + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + if (!message.hasOwnProperty("trail")) + throw $util.ProtocolError("missing required 'trail'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostTrail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostTrail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostTrail} GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostTrail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostTrail message. + * @function verify + * @memberof wm.protobuf.GhostTrail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostTrail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (message.playedPlace != null && message.hasOwnProperty("playedPlace")) { + let error = $root.wm.protobuf.Place.verify(message.playedPlace); + if (error) + return "playedPlace." + error; + } + if (!(message.trail && typeof message.trail.length === "number" || $util.isString(message.trail))) + return "trail: buffer expected"; + return null; + }; + + /** + * Creates a GhostTrail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostTrail + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostTrail} GhostTrail + */ + GhostTrail.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostTrail) + return object; + let message = new $root.wm.protobuf.GhostTrail(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.playedPlace != null) { + if (typeof object.playedPlace !== "object") + throw TypeError(".wm.protobuf.GhostTrail.playedPlace: object expected"); + message.playedPlace = $root.wm.protobuf.Place.fromObject(object.playedPlace); + } + if (object.trail != null) + if (typeof object.trail === "string") + $util.base64.decode(object.trail, message.trail = $util.newBuffer($util.base64.length(object.trail)), 0); + else if (object.trail.length >= 0) + message.trail = object.trail; + return message; + }; + + /** + * Creates a plain object from a GhostTrail message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.GhostTrail} message GhostTrail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostTrail.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.area = 0; + object.ramp = 0; + object.playedAt = 0; + object.playedPlace = null; + if (options.bytes === String) + object.trail = ""; + else { + object.trail = []; + if (options.bytes !== Array) + object.trail = $util.newBuffer(object.trail); + } + object.path = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.playedPlace != null && message.hasOwnProperty("playedPlace")) + object.playedPlace = $root.wm.protobuf.Place.toObject(message.playedPlace, options); + if (message.trail != null && message.hasOwnProperty("trail")) + object.trail = options.bytes === String ? $util.base64.encode(message.trail, 0, message.trail.length) : options.bytes === Array ? Array.prototype.slice.call(message.trail) : message.trail; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this GhostTrail to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostTrail + * @instance + * @returns {Object.} JSON object + */ + GhostTrail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostTrail + * @function getTypeUrl + * @memberof wm.protobuf.GhostTrail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostTrail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostTrail"; + }; + + return GhostTrail; + })(); + + protobuf.PlaceList = (function() { + + /** + * Properties of a PlaceList. + * @memberof wm.protobuf + * @interface IPlaceList + * @property {Array.|null} [places] PlaceList places + */ + + /** + * Constructs a new PlaceList. + * @memberof wm.protobuf + * @classdesc Represents a PlaceList. + * @implements IPlaceList + * @constructor + * @param {wm.protobuf.IPlaceList=} [properties] Properties to set + */ + function PlaceList(properties) { + this.places = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlaceList places. + * @member {Array.} places + * @memberof wm.protobuf.PlaceList + * @instance + */ + PlaceList.prototype.places = $util.emptyArray; + + /** + * Creates a new PlaceList instance using the specified properties. + * @function create + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.IPlaceList=} [properties] Properties to set + * @returns {wm.protobuf.PlaceList} PlaceList instance + */ + PlaceList.create = function create(properties) { + return new PlaceList(properties); + }; + + /** + * Encodes the specified PlaceList message. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.IPlaceList} message PlaceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.places != null && message.places.length) + for (let i = 0; i < message.places.length; ++i) + $root.wm.protobuf.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PlaceList message, length delimited. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.IPlaceList} message PlaceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlaceList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PlaceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PlaceList} PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PlaceList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.places && message.places.length)) + message.places = []; + message.places.push($root.wm.protobuf.Place.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlaceList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PlaceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PlaceList} PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlaceList message. + * @function verify + * @memberof wm.protobuf.PlaceList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlaceList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.places != null && message.hasOwnProperty("places")) { + if (!Array.isArray(message.places)) + return "places: array expected"; + for (let i = 0; i < message.places.length; ++i) { + let error = $root.wm.protobuf.Place.verify(message.places[i]); + if (error) + return "places." + error; + } + } + return null; + }; + + /** + * Creates a PlaceList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PlaceList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PlaceList} PlaceList + */ + PlaceList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PlaceList) + return object; + let message = new $root.wm.protobuf.PlaceList(); + if (object.places) { + if (!Array.isArray(object.places)) + throw TypeError(".wm.protobuf.PlaceList.places: array expected"); + message.places = []; + for (let i = 0; i < object.places.length; ++i) { + if (typeof object.places[i] !== "object") + throw TypeError(".wm.protobuf.PlaceList.places: object expected"); + message.places[i] = $root.wm.protobuf.Place.fromObject(object.places[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PlaceList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.PlaceList} message PlaceList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlaceList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.places = []; + if (message.places && message.places.length) { + object.places = []; + for (let j = 0; j < message.places.length; ++j) + object.places[j] = $root.wm.protobuf.Place.toObject(message.places[j], options); + } + return object; + }; + + /** + * Converts this PlaceList to JSON. + * @function toJSON + * @memberof wm.protobuf.PlaceList + * @instance + * @returns {Object.} JSON object + */ + PlaceList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlaceList + * @function getTypeUrl + * @memberof wm.protobuf.PlaceList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaceList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PlaceList"; + }; + + return PlaceList; + })(); + + protobuf.GhostList = (function() { + + /** + * Properties of a GhostList. + * @memberof wm.protobuf + * @interface IGhostList + * @property {Array.|null} [ghosts] GhostList ghosts + */ + + /** + * Constructs a new GhostList. + * @memberof wm.protobuf + * @classdesc Represents a GhostList. + * @implements IGhostList + * @constructor + * @param {wm.protobuf.IGhostList=} [properties] Properties to set + */ + function GhostList(properties) { + this.ghosts = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostList ghosts. + * @member {Array.} ghosts + * @memberof wm.protobuf.GhostList + * @instance + */ + GhostList.prototype.ghosts = $util.emptyArray; + + /** + * Creates a new GhostList instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.IGhostList=} [properties] Properties to set + * @returns {wm.protobuf.GhostList} GhostList instance + */ + GhostList.create = function create(properties) { + return new GhostList(properties); + }; + + /** + * Encodes the specified GhostList message. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.IGhostList} message GhostList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ghosts != null && message.ghosts.length) + for (let i = 0; i < message.ghosts.length; ++i) + $root.wm.protobuf.GhostCar.encode(message.ghosts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostList message, length delimited. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.IGhostList} message GhostList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostList} GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.ghosts && message.ghosts.length)) + message.ghosts = []; + message.ghosts.push($root.wm.protobuf.GhostCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GhostList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostList} GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostList message. + * @function verify + * @memberof wm.protobuf.GhostList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ghosts != null && message.hasOwnProperty("ghosts")) { + if (!Array.isArray(message.ghosts)) + return "ghosts: array expected"; + for (let i = 0; i < message.ghosts.length; ++i) { + let error = $root.wm.protobuf.GhostCar.verify(message.ghosts[i]); + if (error) + return "ghosts." + error; + } + } + return null; + }; + + /** + * Creates a GhostList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostList} GhostList + */ + GhostList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostList) + return object; + let message = new $root.wm.protobuf.GhostList(); + if (object.ghosts) { + if (!Array.isArray(object.ghosts)) + throw TypeError(".wm.protobuf.GhostList.ghosts: array expected"); + message.ghosts = []; + for (let i = 0; i < object.ghosts.length; ++i) { + if (typeof object.ghosts[i] !== "object") + throw TypeError(".wm.protobuf.GhostList.ghosts: object expected"); + message.ghosts[i] = $root.wm.protobuf.GhostCar.fromObject(object.ghosts[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GhostList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.GhostList} message GhostList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.ghosts = []; + if (message.ghosts && message.ghosts.length) { + object.ghosts = []; + for (let j = 0; j < message.ghosts.length; ++j) + object.ghosts[j] = $root.wm.protobuf.GhostCar.toObject(message.ghosts[j], options); + } + return object; + }; + + /** + * Converts this GhostList to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostList + * @instance + * @returns {Object.} JSON object + */ + GhostList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostList + * @function getTypeUrl + * @memberof wm.protobuf.GhostList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostList"; + }; + + return GhostList; + })(); + + protobuf.CarSummary = (function() { + + /** + * Properties of a CarSummary. + * @memberof wm.protobuf + * @interface ICarSummary + * @property {number} hitCount CarSummary hitCount + * @property {Array.|null} [cars] CarSummary cars + */ + + /** + * Constructs a new CarSummary. + * @memberof wm.protobuf + * @classdesc Represents a CarSummary. + * @implements ICarSummary + * @constructor + * @param {wm.protobuf.ICarSummary=} [properties] Properties to set + */ + function CarSummary(properties) { + this.cars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarSummary hitCount. + * @member {number} hitCount + * @memberof wm.protobuf.CarSummary + * @instance + */ + CarSummary.prototype.hitCount = 0; + + /** + * CarSummary cars. + * @member {Array.} cars + * @memberof wm.protobuf.CarSummary + * @instance + */ + CarSummary.prototype.cars = $util.emptyArray; + + /** + * Creates a new CarSummary instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.ICarSummary=} [properties] Properties to set + * @returns {wm.protobuf.CarSummary} CarSummary instance + */ + CarSummary.create = function create(properties) { + return new CarSummary(properties); + }; + + /** + * Encodes the specified CarSummary message. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.ICarSummary} message CarSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.hitCount); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.Car.encode(message.cars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CarSummary message, length delimited. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.ICarSummary} message CarSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarSummary message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarSummary} CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarSummary(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hitCount = reader.uint32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("hitCount")) + throw $util.ProtocolError("missing required 'hitCount'", { instance: message }); + return message; + }; + + /** + * Decodes a CarSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarSummary} CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarSummary message. + * @function verify + * @memberof wm.protobuf.CarSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.hitCount)) + return "hitCount: integer expected"; + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + return null; + }; + + /** + * Creates a CarSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarSummary + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarSummary} CarSummary + */ + CarSummary.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarSummary) + return object; + let message = new $root.wm.protobuf.CarSummary(); + if (object.hitCount != null) + message.hitCount = object.hitCount >>> 0; + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.CarSummary.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.CarSummary.cars: object expected"); + message.cars[i] = $root.wm.protobuf.Car.fromObject(object.cars[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CarSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.CarSummary} message CarSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cars = []; + if (options.defaults) + object.hitCount = 0; + if (message.hitCount != null && message.hasOwnProperty("hitCount")) + object.hitCount = message.hitCount; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.Car.toObject(message.cars[j], options); + } + return object; + }; + + /** + * Converts this CarSummary to JSON. + * @function toJSON + * @memberof wm.protobuf.CarSummary + * @instance + * @returns {Object.} JSON object + */ + CarSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarSummary + * @function getTypeUrl + * @memberof wm.protobuf.CarSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarSummary"; + }; + + return CarSummary; + })(); + + protobuf.FileList = (function() { + + /** + * Properties of a FileList. + * @memberof wm.protobuf + * @interface IFileList + * @property {Array.|null} [files] FileList files + * @property {number|null} [interval] FileList interval + */ + + /** + * Constructs a new FileList. + * @memberof wm.protobuf + * @classdesc Represents a FileList. + * @implements IFileList + * @constructor + * @param {wm.protobuf.IFileList=} [properties] Properties to set + */ + function FileList(properties) { + this.files = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileList files. + * @member {Array.} files + * @memberof wm.protobuf.FileList + * @instance + */ + FileList.prototype.files = $util.emptyArray; + + /** + * FileList interval. + * @member {number} interval + * @memberof wm.protobuf.FileList + * @instance + */ + FileList.prototype.interval = 0; + + /** + * Creates a new FileList instance using the specified properties. + * @function create + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.IFileList=} [properties] Properties to set + * @returns {wm.protobuf.FileList} FileList instance + */ + FileList.create = function create(properties) { + return new FileList(properties); + }; + + /** + * Encodes the specified FileList message. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.IFileList} message FileList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.files != null && message.files.length) + for (let i = 0; i < message.files.length; ++i) + $root.wm.protobuf.FileList.FileInfo.encode(message.files[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.interval); + return writer; + }; + + /** + * Encodes the specified FileList message, length delimited. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.IFileList} message FileList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.FileList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.FileList} FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.FileList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.files && message.files.length)) + message.files = []; + message.files.push($root.wm.protobuf.FileList.FileInfo.decode(reader, reader.uint32())); + break; + } + case 2: { + message.interval = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.FileList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.FileList} FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileList message. + * @function verify + * @memberof wm.protobuf.FileList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.files != null && message.hasOwnProperty("files")) { + if (!Array.isArray(message.files)) + return "files: array expected"; + for (let i = 0; i < message.files.length; ++i) { + let error = $root.wm.protobuf.FileList.FileInfo.verify(message.files[i]); + if (error) + return "files." + error; + } + } + if (message.interval != null && message.hasOwnProperty("interval")) + if (!$util.isInteger(message.interval)) + return "interval: integer expected"; + return null; + }; + + /** + * Creates a FileList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.FileList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.FileList} FileList + */ + FileList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.FileList) + return object; + let message = new $root.wm.protobuf.FileList(); + if (object.files) { + if (!Array.isArray(object.files)) + throw TypeError(".wm.protobuf.FileList.files: array expected"); + message.files = []; + for (let i = 0; i < object.files.length; ++i) { + if (typeof object.files[i] !== "object") + throw TypeError(".wm.protobuf.FileList.files: object expected"); + message.files[i] = $root.wm.protobuf.FileList.FileInfo.fromObject(object.files[i]); + } + } + if (object.interval != null) + message.interval = object.interval >>> 0; + return message; + }; + + /** + * Creates a plain object from a FileList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.FileList} message FileList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.files = []; + if (options.defaults) + object.interval = 0; + if (message.files && message.files.length) { + object.files = []; + for (let j = 0; j < message.files.length; ++j) + object.files[j] = $root.wm.protobuf.FileList.FileInfo.toObject(message.files[j], options); + } + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = message.interval; + return object; + }; + + /** + * Converts this FileList to JSON. + * @function toJSON + * @memberof wm.protobuf.FileList + * @instance + * @returns {Object.} JSON object + */ + FileList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileList + * @function getTypeUrl + * @memberof wm.protobuf.FileList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.FileList"; + }; + + FileList.FileInfo = (function() { + + /** + * Properties of a FileInfo. + * @memberof wm.protobuf.FileList + * @interface IFileInfo + * @property {number} fileId FileInfo fileId + * @property {wm.protobuf.FileType} fileType FileInfo fileType + * @property {number} fileSize FileInfo fileSize + * @property {string} url FileInfo url + * @property {Uint8Array} sha1sum FileInfo sha1sum + * @property {number} notBefore FileInfo notBefore + * @property {number} notAfter FileInfo notAfter + */ + + /** + * Constructs a new FileInfo. + * @memberof wm.protobuf.FileList + * @classdesc Represents a FileInfo. + * @implements IFileInfo + * @constructor + * @param {wm.protobuf.FileList.IFileInfo=} [properties] Properties to set + */ + function FileInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileInfo fileId. + * @member {number} fileId + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.fileId = 0; + + /** + * FileInfo fileType. + * @member {wm.protobuf.FileType} fileType + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.fileType = 1; + + /** + * FileInfo fileSize. + * @member {number} fileSize + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.fileSize = 0; + + /** + * FileInfo url. + * @member {string} url + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.url = ""; + + /** + * FileInfo sha1sum. + * @member {Uint8Array} sha1sum + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.sha1sum = $util.newBuffer([]); + + /** + * FileInfo notBefore. + * @member {number} notBefore + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.notBefore = 0; + + /** + * FileInfo notAfter. + * @member {number} notAfter + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.notAfter = 0; + + /** + * Creates a new FileInfo instance using the specified properties. + * @function create + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.IFileInfo=} [properties] Properties to set + * @returns {wm.protobuf.FileList.FileInfo} FileInfo instance + */ + FileInfo.create = function create(properties) { + return new FileInfo(properties); + }; + + /** + * Encodes the specified FileInfo message. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.IFileInfo} message FileInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.fileId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.fileType); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.fileSize); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.url); + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.sha1sum); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.notBefore); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.notAfter); + return writer; + }; + + /** + * Encodes the specified FileInfo message, length delimited. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.IFileInfo} message FileInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileInfo message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.FileList.FileInfo} FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.FileList.FileInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fileId = reader.uint32(); + break; + } + case 2: { + message.fileType = reader.int32(); + break; + } + case 3: { + message.fileSize = reader.uint32(); + break; + } + case 4: { + message.url = reader.string(); + break; + } + case 5: { + message.sha1sum = reader.bytes(); + break; + } + case 6: { + message.notBefore = reader.uint32(); + break; + } + case 7: { + message.notAfter = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("fileId")) + throw $util.ProtocolError("missing required 'fileId'", { instance: message }); + if (!message.hasOwnProperty("fileType")) + throw $util.ProtocolError("missing required 'fileType'", { instance: message }); + if (!message.hasOwnProperty("fileSize")) + throw $util.ProtocolError("missing required 'fileSize'", { instance: message }); + if (!message.hasOwnProperty("url")) + throw $util.ProtocolError("missing required 'url'", { instance: message }); + if (!message.hasOwnProperty("sha1sum")) + throw $util.ProtocolError("missing required 'sha1sum'", { instance: message }); + if (!message.hasOwnProperty("notBefore")) + throw $util.ProtocolError("missing required 'notBefore'", { instance: message }); + if (!message.hasOwnProperty("notAfter")) + throw $util.ProtocolError("missing required 'notAfter'", { instance: message }); + return message; + }; + + /** + * Decodes a FileInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.FileList.FileInfo} FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileInfo message. + * @function verify + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.fileId)) + return "fileId: integer expected"; + switch (message.fileType) { + default: + return "fileType: enum value expected"; + case 1: + case 4: + case 6: + break; + } + if (!$util.isInteger(message.fileSize)) + return "fileSize: integer expected"; + if (!$util.isString(message.url)) + return "url: string expected"; + if (!(message.sha1sum && typeof message.sha1sum.length === "number" || $util.isString(message.sha1sum))) + return "sha1sum: buffer expected"; + if (!$util.isInteger(message.notBefore)) + return "notBefore: integer expected"; + if (!$util.isInteger(message.notAfter)) + return "notAfter: integer expected"; + return null; + }; + + /** + * Creates a FileInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.FileList.FileInfo} FileInfo + */ + FileInfo.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.FileList.FileInfo) + return object; + let message = new $root.wm.protobuf.FileList.FileInfo(); + if (object.fileId != null) + message.fileId = object.fileId >>> 0; + switch (object.fileType) { + case "FILE_PROMOTION_ANNOUNCEMENT": + case 1: + message.fileType = 1; + break; + case "FILE_FEATURE_ANNOUNCEMENT": + case 4: + message.fileType = 4; + break; + case "FILE_SPAPP_ANNOUNCEMENT": + case 6: + message.fileType = 6; + break; + } + if (object.fileSize != null) + message.fileSize = object.fileSize >>> 0; + if (object.url != null) + message.url = String(object.url); + if (object.sha1sum != null) + if (typeof object.sha1sum === "string") + $util.base64.decode(object.sha1sum, message.sha1sum = $util.newBuffer($util.base64.length(object.sha1sum)), 0); + else if (object.sha1sum.length >= 0) + message.sha1sum = object.sha1sum; + if (object.notBefore != null) + message.notBefore = object.notBefore >>> 0; + if (object.notAfter != null) + message.notAfter = object.notAfter >>> 0; + return message; + }; + + /** + * Creates a plain object from a FileInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.FileInfo} message FileInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.fileId = 0; + object.fileType = options.enums === String ? "FILE_PROMOTION_ANNOUNCEMENT" : 1; + object.fileSize = 0; + object.url = ""; + if (options.bytes === String) + object.sha1sum = ""; + else { + object.sha1sum = []; + if (options.bytes !== Array) + object.sha1sum = $util.newBuffer(object.sha1sum); + } + object.notBefore = 0; + object.notAfter = 0; + } + if (message.fileId != null && message.hasOwnProperty("fileId")) + object.fileId = message.fileId; + if (message.fileType != null && message.hasOwnProperty("fileType")) + object.fileType = options.enums === String ? $root.wm.protobuf.FileType[message.fileType] : message.fileType; + if (message.fileSize != null && message.hasOwnProperty("fileSize")) + object.fileSize = message.fileSize; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.sha1sum != null && message.hasOwnProperty("sha1sum")) + object.sha1sum = options.bytes === String ? $util.base64.encode(message.sha1sum, 0, message.sha1sum.length) : options.bytes === Array ? Array.prototype.slice.call(message.sha1sum) : message.sha1sum; + if (message.notBefore != null && message.hasOwnProperty("notBefore")) + object.notBefore = message.notBefore; + if (message.notAfter != null && message.hasOwnProperty("notAfter")) + object.notAfter = message.notAfter; + return object; + }; + + /** + * Converts this FileInfo to JSON. + * @function toJSON + * @memberof wm.protobuf.FileList.FileInfo + * @instance + * @returns {Object.} JSON object + */ + FileInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileInfo + * @function getTypeUrl + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.FileList.FileInfo"; + }; + + return FileInfo; + })(); + + return FileList; + })(); + + protobuf.GhostCompetitionTarget = (function() { + + /** + * Properties of a GhostCompetitionTarget. + * @memberof wm.protobuf + * @interface IGhostCompetitionTarget + * @property {number} competitionId GhostCompetitionTarget competitionId + * @property {number|null} [specialGhostId] GhostCompetitionTarget specialGhostId + * @property {wm.protobuf.IGhostCar} ghostCar GhostCompetitionTarget ghostCar + * @property {number|Long} trailId GhostCompetitionTarget trailId + * @property {number} updatedAt GhostCompetitionTarget updatedAt + * @property {wm.protobuf.IGhostCompetitionSchedule|null} [competitionSchedule] GhostCompetitionTarget competitionSchedule + */ + + /** + * Constructs a new GhostCompetitionTarget. + * @memberof wm.protobuf + * @classdesc Represents a GhostCompetitionTarget. + * @implements IGhostCompetitionTarget + * @constructor + * @param {wm.protobuf.IGhostCompetitionTarget=} [properties] Properties to set + */ + function GhostCompetitionTarget(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionTarget competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.competitionId = 0; + + /** + * GhostCompetitionTarget specialGhostId. + * @member {number} specialGhostId + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.specialGhostId = 0; + + /** + * GhostCompetitionTarget ghostCar. + * @member {wm.protobuf.IGhostCar} ghostCar + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.ghostCar = null; + + /** + * GhostCompetitionTarget trailId. + * @member {number|Long} trailId + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.trailId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GhostCompetitionTarget updatedAt. + * @member {number} updatedAt + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.updatedAt = 0; + + /** + * GhostCompetitionTarget competitionSchedule. + * @member {wm.protobuf.IGhostCompetitionSchedule|null|undefined} competitionSchedule + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.competitionSchedule = null; + + /** + * Creates a new GhostCompetitionTarget instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.IGhostCompetitionTarget=} [properties] Properties to set + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget instance + */ + GhostCompetitionTarget.create = function create(properties) { + return new GhostCompetitionTarget(properties); + }; + + /** + * Encodes the specified GhostCompetitionTarget message. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.IGhostCompetitionTarget} message GhostCompetitionTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionTarget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.competitionId); + if (message.specialGhostId != null && Object.hasOwnProperty.call(message, "specialGhostId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.specialGhostId); + $root.wm.protobuf.GhostCar.encode(message.ghostCar, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.trailId); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.updatedAt); + if (message.competitionSchedule != null && Object.hasOwnProperty.call(message, "competitionSchedule")) + $root.wm.protobuf.GhostCompetitionSchedule.encode(message.competitionSchedule, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionTarget message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.IGhostCompetitionTarget} message GhostCompetitionTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionTarget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionTarget.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCompetitionTarget(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.competitionId = reader.uint32(); + break; + } + case 2: { + message.specialGhostId = reader.uint32(); + break; + } + case 3: { + message.ghostCar = $root.wm.protobuf.GhostCar.decode(reader, reader.uint32()); + break; + } + case 4: { + message.trailId = reader.uint64(); + break; + } + case 5: { + message.updatedAt = reader.uint32(); + break; + } + case 6: { + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + if (!message.hasOwnProperty("ghostCar")) + throw $util.ProtocolError("missing required 'ghostCar'", { instance: message }); + if (!message.hasOwnProperty("trailId")) + throw $util.ProtocolError("missing required 'trailId'", { instance: message }); + if (!message.hasOwnProperty("updatedAt")) + throw $util.ProtocolError("missing required 'updatedAt'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionTarget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionTarget message. + * @function verify + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionTarget.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + if (message.specialGhostId != null && message.hasOwnProperty("specialGhostId")) + if (!$util.isInteger(message.specialGhostId)) + return "specialGhostId: integer expected"; + { + let error = $root.wm.protobuf.GhostCar.verify(message.ghostCar); + if (error) + return "ghostCar." + error; + } + if (!$util.isInteger(message.trailId) && !(message.trailId && $util.isInteger(message.trailId.low) && $util.isInteger(message.trailId.high))) + return "trailId: integer|Long expected"; + if (!$util.isInteger(message.updatedAt)) + return "updatedAt: integer expected"; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) { + let error = $root.wm.protobuf.GhostCompetitionSchedule.verify(message.competitionSchedule); + if (error) + return "competitionSchedule." + error; + } + return null; + }; + + /** + * Creates a GhostCompetitionTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget + */ + GhostCompetitionTarget.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCompetitionTarget) + return object; + let message = new $root.wm.protobuf.GhostCompetitionTarget(); + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + if (object.specialGhostId != null) + message.specialGhostId = object.specialGhostId >>> 0; + if (object.ghostCar != null) { + if (typeof object.ghostCar !== "object") + throw TypeError(".wm.protobuf.GhostCompetitionTarget.ghostCar: object expected"); + message.ghostCar = $root.wm.protobuf.GhostCar.fromObject(object.ghostCar); + } + if (object.trailId != null) + if ($util.Long) + (message.trailId = $util.Long.fromValue(object.trailId)).unsigned = true; + else if (typeof object.trailId === "string") + message.trailId = parseInt(object.trailId, 10); + else if (typeof object.trailId === "number") + message.trailId = object.trailId; + else if (typeof object.trailId === "object") + message.trailId = new $util.LongBits(object.trailId.low >>> 0, object.trailId.high >>> 0).toNumber(true); + if (object.updatedAt != null) + message.updatedAt = object.updatedAt >>> 0; + if (object.competitionSchedule != null) { + if (typeof object.competitionSchedule !== "object") + throw TypeError(".wm.protobuf.GhostCompetitionTarget.competitionSchedule: object expected"); + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.fromObject(object.competitionSchedule); + } + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.GhostCompetitionTarget} message GhostCompetitionTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionTarget.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.competitionId = 0; + object.specialGhostId = 0; + object.ghostCar = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.trailId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trailId = options.longs === String ? "0" : 0; + object.updatedAt = 0; + object.competitionSchedule = null; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + if (message.specialGhostId != null && message.hasOwnProperty("specialGhostId")) + object.specialGhostId = message.specialGhostId; + if (message.ghostCar != null && message.hasOwnProperty("ghostCar")) + object.ghostCar = $root.wm.protobuf.GhostCar.toObject(message.ghostCar, options); + if (message.trailId != null && message.hasOwnProperty("trailId")) + if (typeof message.trailId === "number") + object.trailId = options.longs === String ? String(message.trailId) : message.trailId; + else + object.trailId = options.longs === String ? $util.Long.prototype.toString.call(message.trailId) : options.longs === Number ? new $util.LongBits(message.trailId.low >>> 0, message.trailId.high >>> 0).toNumber(true) : message.trailId; + if (message.updatedAt != null && message.hasOwnProperty("updatedAt")) + object.updatedAt = message.updatedAt; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) + object.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.toObject(message.competitionSchedule, options); + return object; + }; + + /** + * Converts this GhostCompetitionTarget to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionTarget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionTarget + * @function getTypeUrl + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCompetitionTarget"; + }; + + return GhostCompetitionTarget; + })(); + + /** + * SystemConstant enum. + * @name wm.protobuf.SystemConstant + * @enum {number} + * @property {number} PROTOBUF_MESSAGE_REVISION=8053 PROTOBUF_MESSAGE_REVISION value + */ + protobuf.SystemConstant = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[8053] = "PROTOBUF_MESSAGE_REVISION"] = 8053; + return values; + })(); + + /** + * ErrorCode enum. + * @name wm.protobuf.ErrorCode + * @enum {number} + * @property {number} ERR_SUCCESS=0 ERR_SUCCESS value + * @property {number} ERR_REQUEST=1 ERR_REQUEST value + * @property {number} ERR_NOT_FOUND=2 ERR_NOT_FOUND value + * @property {number} ERR_ID_SERVER=3 ERR_ID_SERVER value + * @property {number} ERR_ID_BANNED=4 ERR_ID_BANNED value + * @property {number} ERR_USER_LOCKED=5 ERR_USER_LOCKED value + * @property {number} ERR_USER_VERSION=6 ERR_USER_VERSION value + * @property {number} ERR_NAME_CONFLICTED=7 ERR_NAME_CONFLICTED value + * @property {number} ERR_FORBIDDEN=9 ERR_FORBIDDEN value + * @property {number} ERR_USER_SUCCEEDED=11 ERR_USER_SUCCEEDED value + * @property {number} ERR_BEING_TRANSFERRED=12 ERR_BEING_TRANSFERRED value + * @property {number} ERR_SCRATCH_LOCKED=13 ERR_SCRATCH_LOCKED value + */ + protobuf.ErrorCode = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ERR_SUCCESS"] = 0; + values[valuesById[1] = "ERR_REQUEST"] = 1; + values[valuesById[2] = "ERR_NOT_FOUND"] = 2; + values[valuesById[3] = "ERR_ID_SERVER"] = 3; + values[valuesById[4] = "ERR_ID_BANNED"] = 4; + values[valuesById[5] = "ERR_USER_LOCKED"] = 5; + values[valuesById[6] = "ERR_USER_VERSION"] = 6; + values[valuesById[7] = "ERR_NAME_CONFLICTED"] = 7; + values[valuesById[9] = "ERR_FORBIDDEN"] = 9; + values[valuesById[11] = "ERR_USER_SUCCEEDED"] = 11; + values[valuesById[12] = "ERR_BEING_TRANSFERRED"] = 12; + values[valuesById[13] = "ERR_SCRATCH_LOCKED"] = 13; + return values; + })(); + + /** + * LineType enum. + * @name wm.protobuf.LineType + * @enum {number} + * @property {number} L_UNKNOWN=0 L_UNKNOWN value + * @property {number} L_MOBILE=1 L_MOBILE value + * @property {number} L_ISDN=2 L_ISDN value + * @property {number} L_BFLETS=3 L_BFLETS value + * @property {number} L_ADSL=4 L_ADSL value + * @property {number} L_WIRED=5 L_WIRED value + */ + protobuf.LineType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "L_UNKNOWN"] = 0; + values[valuesById[1] = "L_MOBILE"] = 1; + values[valuesById[2] = "L_ISDN"] = 2; + values[valuesById[3] = "L_BFLETS"] = 3; + values[valuesById[4] = "L_ADSL"] = 4; + values[valuesById[5] = "L_WIRED"] = 5; + return values; + })(); + + /** + * TerminalType enum. + * @name wm.protobuf.TerminalType + * @enum {number} + * @property {number} T_DRIVE=0 T_DRIVE value + * @property {number} T_TERMINAL=1 T_TERMINAL value + */ + protobuf.TerminalType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "T_DRIVE"] = 0; + values[valuesById[1] = "T_TERMINAL"] = 1; + return values; + })(); + + /** + * DeviceType enum. + * @name wm.protobuf.DeviceType + * @enum {number} + * @property {number} DEVICE_CARD=0 DEVICE_CARD value + * @property {number} DEVICE_PHONE=1 DEVICE_PHONE value + */ + protobuf.DeviceType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEVICE_CARD"] = 0; + values[valuesById[1] = "DEVICE_PHONE"] = 1; + return values; + })(); + + /** + * ItemCategory enum. + * @name wm.protobuf.ItemCategory + * @enum {number} + * @property {number} CAT_CUSTOM_COLOR=1 CAT_CUSTOM_COLOR value + * @property {number} CAT_WHEEL=2 CAT_WHEEL value + * @property {number} CAT_AERO=3 CAT_AERO value + * @property {number} CAT_BONNET=4 CAT_BONNET value + * @property {number} CAT_WING=5 CAT_WING value + * @property {number} CAT_MIRROR=6 CAT_MIRROR value + * @property {number} CAT_NEON=8 CAT_NEON value + * @property {number} CAT_TRUNK=9 CAT_TRUNK value + * @property {number} CAT_NUMBER_PLATE=10 CAT_NUMBER_PLATE value + * @property {number} CAT_GT_WING=12 CAT_GT_WING value + * @property {number} CAT_AURA_MOTIF=14 CAT_AURA_MOTIF value + * @property {number} CAT_METER=15 CAT_METER value + * @property {number} CAT_BGM=16 CAT_BGM value + * @property {number} CAT_NAME_PLATE=17 CAT_NAME_PLATE value + * @property {number} CAT_NUMBER=19 CAT_NUMBER value + * @property {number} CAT_BGM_TRACK=22 CAT_BGM_TRACK value + * @property {number} CAT_WINDOW_STICKER_FONT=24 CAT_WINDOW_STICKER_FONT value + * @property {number} CAT_WINDOW_DECORATION=25 CAT_WINDOW_DECORATION value + * @property {number} CAT_RIVAL_MARKER=26 CAT_RIVAL_MARKER value + * @property {number} CAT_STAMP=27 CAT_STAMP value + * @property {number} CAT_TERMINAL_BACKGROUND=28 CAT_TERMINAL_BACKGROUND value + * @property {number} CAT_CAR_TICKET=201 CAT_CAR_TICKET value + * @property {number} CAT_CONSUMPTION_ITEM=202 CAT_CONSUMPTION_ITEM value + * @property {number} CAT_CAR_TICKET_FREE=203 CAT_CAR_TICKET_FREE value + * @property {number} CAT_AERO_FULLSET=300 CAT_AERO_FULLSET value + * @property {number} CAT_AERO_LIMITED=301 CAT_AERO_LIMITED value + */ + protobuf.ItemCategory = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "CAT_CUSTOM_COLOR"] = 1; + values[valuesById[2] = "CAT_WHEEL"] = 2; + values[valuesById[3] = "CAT_AERO"] = 3; + values[valuesById[4] = "CAT_BONNET"] = 4; + values[valuesById[5] = "CAT_WING"] = 5; + values[valuesById[6] = "CAT_MIRROR"] = 6; + values[valuesById[8] = "CAT_NEON"] = 8; + values[valuesById[9] = "CAT_TRUNK"] = 9; + values[valuesById[10] = "CAT_NUMBER_PLATE"] = 10; + values[valuesById[12] = "CAT_GT_WING"] = 12; + values[valuesById[14] = "CAT_AURA_MOTIF"] = 14; + values[valuesById[15] = "CAT_METER"] = 15; + values[valuesById[16] = "CAT_BGM"] = 16; + values[valuesById[17] = "CAT_NAME_PLATE"] = 17; + values[valuesById[19] = "CAT_NUMBER"] = 19; + values[valuesById[22] = "CAT_BGM_TRACK"] = 22; + values[valuesById[24] = "CAT_WINDOW_STICKER_FONT"] = 24; + values[valuesById[25] = "CAT_WINDOW_DECORATION"] = 25; + values[valuesById[26] = "CAT_RIVAL_MARKER"] = 26; + values[valuesById[27] = "CAT_STAMP"] = 27; + values[valuesById[28] = "CAT_TERMINAL_BACKGROUND"] = 28; + values[valuesById[201] = "CAT_CAR_TICKET"] = 201; + values[valuesById[202] = "CAT_CONSUMPTION_ITEM"] = 202; + values[valuesById[203] = "CAT_CAR_TICKET_FREE"] = 203; + values[valuesById[300] = "CAT_AERO_FULLSET"] = 300; + values[valuesById[301] = "CAT_AERO_LIMITED"] = 301; + return values; + })(); + + /** + * TutorialType enum. + * @name wm.protobuf.TutorialType + * @enum {number} + * @property {number} TUTORIAL_ID_STORY=0 TUTORIAL_ID_STORY value + * @property {number} TUTORIAL_ID_TIME_ATTACK=1 TUTORIAL_ID_TIME_ATTACK value + * @property {number} TUTORIAL_ID_GHOST=2 TUTORIAL_ID_GHOST value + * @property {number} TUTORIAL_ID_GHOST_CHALLENGE=3 TUTORIAL_ID_GHOST_CHALLENGE value + * @property {number} TUTORIAL_ID_GHOST_LEVEL=4 TUTORIAL_ID_GHOST_LEVEL value + * @property {number} TUTORIAL_ID_UNUSED_5=5 TUTORIAL_ID_UNUSED_5 value + * @property {number} TUTORIAL_ID_GHOST_SEARCH=6 TUTORIAL_ID_GHOST_SEARCH value + * @property {number} TUTORIAL_ID_GHOST_COMPETITION=7 TUTORIAL_ID_GHOST_COMPETITION value + * @property {number} TUTORIAL_ID_HP600_CARD=8 TUTORIAL_ID_HP600_CARD value + * @property {number} TUTORIAL_ID_UNUSED_9=9 TUTORIAL_ID_UNUSED_9 value + * @property {number} TUTORIAL_ID_COMPETITION_QUALIFIED=10 TUTORIAL_ID_COMPETITION_QUALIFIED value + * @property {number} TUTORIAL_ID_COMPETITION_TERMINAL=11 TUTORIAL_ID_COMPETITION_TERMINAL value + * @property {number} TUTORIAL_ID_COMPETITION_NOTICE=12 TUTORIAL_ID_COMPETITION_NOTICE value + * @property {number} TUTORIAL_ID_COMPETITION_FINISHED=13 TUTORIAL_ID_COMPETITION_FINISHED value + * @property {number} TUTORIAL_ID_UNUSED_14=14 TUTORIAL_ID_UNUSED_14 value + * @property {number} TUTORIAL_ID_UNUSED_15=15 TUTORIAL_ID_UNUSED_15 value + * @property {number} TUTORIAL_ID_UNUSED_16=16 TUTORIAL_ID_UNUSED_16 value + * @property {number} TUTORIAL_ID_UNUSED_17=17 TUTORIAL_ID_UNUSED_17 value + * @property {number} TUTORIAL_ID_UNUSED_18=18 TUTORIAL_ID_UNUSED_18 value + * @property {number} TUTORIAL_ID_UNUSED_19=19 TUTORIAL_ID_UNUSED_19 value + * @property {number} TUTORIAL_ID_GHOST_STAMP=20 TUTORIAL_ID_GHOST_STAMP value + * @property {number} TUTORIAL_ID_GHOST_STAMP_DECLINED=21 TUTORIAL_ID_GHOST_STAMP_DECLINED value + * @property {number} TUTORIAL_ID_GHOST_STAMP_FRIENDS=22 TUTORIAL_ID_GHOST_STAMP_FRIENDS value + * @property {number} TUTORIAL_ID_TERMINAL_SCRATCH=23 TUTORIAL_ID_TERMINAL_SCRATCH value + * @property {number} TUTORIAL_ID_TURN_SCRATCH_SHEET=24 TUTORIAL_ID_TURN_SCRATCH_SHEET value + * @property {number} TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN=25 TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN value + * @property {number} TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE=26 TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE value + * @property {number} TUTORIAL_ID_VS_CONTINUE_TICKET=27 TUTORIAL_ID_VS_CONTINUE_TICKET value + * @property {number} TUTORIAL_ID_UNUSED_28=28 TUTORIAL_ID_UNUSED_28 value + * @property {number} TUTORIAL_ID_UNUSED_29=29 TUTORIAL_ID_UNUSED_29 value + * @property {number} TUTORIAL_ID_UNUSED_30=30 TUTORIAL_ID_UNUSED_30 value + * @property {number} TUTORIAL_ID_DRESS_UP=31 TUTORIAL_ID_DRESS_UP value + * @property {number} TUTORIAL_ID_MULTI_GHOST=32 TUTORIAL_ID_MULTI_GHOST value + * @property {number} TUTORIAL_ID_STORY_NEW_FEATURE=33 TUTORIAL_ID_STORY_NEW_FEATURE value + * @property {number} TUTORIAL_ID_GHOST_NEW_FEATURE=34 TUTORIAL_ID_GHOST_NEW_FEATURE value + * @property {number} TUTORIAL_ID_GHOST_REGION_MAP=35 TUTORIAL_ID_GHOST_REGION_MAP value + */ + protobuf.TutorialType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TUTORIAL_ID_STORY"] = 0; + values[valuesById[1] = "TUTORIAL_ID_TIME_ATTACK"] = 1; + values[valuesById[2] = "TUTORIAL_ID_GHOST"] = 2; + values[valuesById[3] = "TUTORIAL_ID_GHOST_CHALLENGE"] = 3; + values[valuesById[4] = "TUTORIAL_ID_GHOST_LEVEL"] = 4; + values[valuesById[5] = "TUTORIAL_ID_UNUSED_5"] = 5; + values[valuesById[6] = "TUTORIAL_ID_GHOST_SEARCH"] = 6; + values[valuesById[7] = "TUTORIAL_ID_GHOST_COMPETITION"] = 7; + values[valuesById[8] = "TUTORIAL_ID_HP600_CARD"] = 8; + values[valuesById[9] = "TUTORIAL_ID_UNUSED_9"] = 9; + values[valuesById[10] = "TUTORIAL_ID_COMPETITION_QUALIFIED"] = 10; + values[valuesById[11] = "TUTORIAL_ID_COMPETITION_TERMINAL"] = 11; + values[valuesById[12] = "TUTORIAL_ID_COMPETITION_NOTICE"] = 12; + values[valuesById[13] = "TUTORIAL_ID_COMPETITION_FINISHED"] = 13; + values[valuesById[14] = "TUTORIAL_ID_UNUSED_14"] = 14; + values[valuesById[15] = "TUTORIAL_ID_UNUSED_15"] = 15; + values[valuesById[16] = "TUTORIAL_ID_UNUSED_16"] = 16; + values[valuesById[17] = "TUTORIAL_ID_UNUSED_17"] = 17; + values[valuesById[18] = "TUTORIAL_ID_UNUSED_18"] = 18; + values[valuesById[19] = "TUTORIAL_ID_UNUSED_19"] = 19; + values[valuesById[20] = "TUTORIAL_ID_GHOST_STAMP"] = 20; + values[valuesById[21] = "TUTORIAL_ID_GHOST_STAMP_DECLINED"] = 21; + values[valuesById[22] = "TUTORIAL_ID_GHOST_STAMP_FRIENDS"] = 22; + values[valuesById[23] = "TUTORIAL_ID_TERMINAL_SCRATCH"] = 23; + values[valuesById[24] = "TUTORIAL_ID_TURN_SCRATCH_SHEET"] = 24; + values[valuesById[25] = "TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN"] = 25; + values[valuesById[26] = "TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE"] = 26; + values[valuesById[27] = "TUTORIAL_ID_VS_CONTINUE_TICKET"] = 27; + values[valuesById[28] = "TUTORIAL_ID_UNUSED_28"] = 28; + values[valuesById[29] = "TUTORIAL_ID_UNUSED_29"] = 29; + values[valuesById[30] = "TUTORIAL_ID_UNUSED_30"] = 30; + values[valuesById[31] = "TUTORIAL_ID_DRESS_UP"] = 31; + values[valuesById[32] = "TUTORIAL_ID_MULTI_GHOST"] = 32; + values[valuesById[33] = "TUTORIAL_ID_STORY_NEW_FEATURE"] = 33; + values[valuesById[34] = "TUTORIAL_ID_GHOST_NEW_FEATURE"] = 34; + values[valuesById[35] = "TUTORIAL_ID_GHOST_REGION_MAP"] = 35; + return values; + })(); + + /** + * GameMode enum. + * @name wm.protobuf.GameMode + * @enum {number} + * @property {number} MODE_STORY=1 MODE_STORY value + * @property {number} MODE_TIME_ATTACK=2 MODE_TIME_ATTACK value + * @property {number} MODE_VS_BATTLE=3 MODE_VS_BATTLE value + * @property {number} MODE_GHOST_BATTLE=4 MODE_GHOST_BATTLE value + * @property {number} MODE_EVENT=5 MODE_EVENT value + */ + protobuf.GameMode = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "MODE_STORY"] = 1; + values[valuesById[2] = "MODE_TIME_ATTACK"] = 2; + values[valuesById[3] = "MODE_VS_BATTLE"] = 3; + values[valuesById[4] = "MODE_GHOST_BATTLE"] = 4; + values[valuesById[5] = "MODE_EVENT"] = 5; + return values; + })(); + + /** + * GhostType enum. + * @name wm.protobuf.GhostType + * @enum {number} + * @property {number} GHOST_NORMAL=1 GHOST_NORMAL value + * @property {number} GHOST_PINCH_RUNNER=2 GHOST_PINCH_RUNNER value + * @property {number} GHOST_DEFAULT=3 GHOST_DEFAULT value + */ + protobuf.GhostType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "GHOST_NORMAL"] = 1; + values[valuesById[2] = "GHOST_PINCH_RUNNER"] = 2; + values[valuesById[3] = "GHOST_DEFAULT"] = 3; + return values; + })(); + + /** + * GhostSelectionMethod enum. + * @name wm.protobuf.GhostSelectionMethod + * @enum {number} + * @property {number} GHOST_SEARCH_BY_REGION=1 GHOST_SEARCH_BY_REGION value + * @property {number} GHOST_SELECT_BY_LEVEL=2 GHOST_SELECT_BY_LEVEL value + * @property {number} GHOST_SELECT_CROWN_MATCH=3 GHOST_SELECT_CROWN_MATCH value + * @property {number} GHOST_SELECT_STAMP_MATCH=4 GHOST_SELECT_STAMP_MATCH value + * @property {number} GHOST_SELECT_FROM_HISTORY=5 GHOST_SELECT_FROM_HISTORY value + * @property {number} GHOST_SEARCH_BY_SHOP=6 GHOST_SEARCH_BY_SHOP value + * @property {number} GHOST_SEARCH_BY_NAME=7 GHOST_SEARCH_BY_NAME value + * @property {number} GHOST_ACCEPT_CHALLENGER=8 GHOST_ACCEPT_CHALLENGER value + * @property {number} GHOST_APPOINTMENT=9 GHOST_APPOINTMENT value + * @property {number} GHOST_DEFAULT_OPPONENT=10 GHOST_DEFAULT_OPPONENT value + * @property {number} GHOST_COMPETITION=11 GHOST_COMPETITION value + * @property {number} GHOST_SELECT_FROM_BOOKMARKS=12 GHOST_SELECT_FROM_BOOKMARKS value + */ + protobuf.GhostSelectionMethod = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "GHOST_SEARCH_BY_REGION"] = 1; + values[valuesById[2] = "GHOST_SELECT_BY_LEVEL"] = 2; + values[valuesById[3] = "GHOST_SELECT_CROWN_MATCH"] = 3; + values[valuesById[4] = "GHOST_SELECT_STAMP_MATCH"] = 4; + values[valuesById[5] = "GHOST_SELECT_FROM_HISTORY"] = 5; + values[valuesById[6] = "GHOST_SEARCH_BY_SHOP"] = 6; + values[valuesById[7] = "GHOST_SEARCH_BY_NAME"] = 7; + values[valuesById[8] = "GHOST_ACCEPT_CHALLENGER"] = 8; + values[valuesById[9] = "GHOST_APPOINTMENT"] = 9; + values[valuesById[10] = "GHOST_DEFAULT_OPPONENT"] = 10; + values[valuesById[11] = "GHOST_COMPETITION"] = 11; + values[valuesById[12] = "GHOST_SELECT_FROM_BOOKMARKS"] = 12; + return values; + })(); + + /** + * GhostRateType enum. + * @name wm.protobuf.GhostRateType + * @enum {number} + * @property {number} GHOST_RATE_UNKNOWN=1 GHOST_RATE_UNKNOWN value + * @property {number} GHOST_RATE_INVALID=2 GHOST_RATE_INVALID value + * @property {number} GHOST_RATE_VALID=3 GHOST_RATE_VALID value + */ + protobuf.GhostRateType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "GHOST_RATE_UNKNOWN"] = 1; + values[valuesById[2] = "GHOST_RATE_INVALID"] = 2; + values[valuesById[3] = "GHOST_RATE_VALID"] = 3; + return values; + })(); + + /** + * PathSelectionMethod enum. + * @name wm.protobuf.PathSelectionMethod + * @enum {number} + * @property {number} PATH_NEW=1 PATH_NEW value + * @property {number} PATH_PLAIN=2 PATH_PLAIN value + * @property {number} PATH_FRIEND=3 PATH_FRIEND value + * @property {number} PATH_NORMAL=4 PATH_NORMAL value + * @property {number} PATH_CHALLENGER=5 PATH_CHALLENGER value + */ + protobuf.PathSelectionMethod = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "PATH_NEW"] = 1; + values[valuesById[2] = "PATH_PLAIN"] = 2; + values[valuesById[3] = "PATH_FRIEND"] = 3; + values[valuesById[4] = "PATH_NORMAL"] = 4; + values[valuesById[5] = "PATH_CHALLENGER"] = 5; + return values; + })(); + + /** + * NoticeEntry enum. + * @name wm.protobuf.NoticeEntry + * @enum {number} + * @property {number} NOTICE_UNUSED_1=1 NOTICE_UNUSED_1 value + * @property {number} NOTICE_UNUSED_2=2 NOTICE_UNUSED_2 value + * @property {number} NOTICE_UNUSED_3=3 NOTICE_UNUSED_3 value + * @property {number} NOTICE_UNUSED_4=4 NOTICE_UNUSED_4 value + * @property {number} NOTICE_UNUSED_5=5 NOTICE_UNUSED_5 value + * @property {number} NOTICE_UNUSED_6=6 NOTICE_UNUSED_6 value + * @property {number} NOTICE_UNUSED_7=7 NOTICE_UNUSED_7 value + * @property {number} NOTICE_UNUSED_8=8 NOTICE_UNUSED_8 value + * @property {number} NOTICE_UNUSED_9=9 NOTICE_UNUSED_9 value + * @property {number} NOTICE_UNUSED_10=10 NOTICE_UNUSED_10 value + * @property {number} NOTICE_UNUSED_11=11 NOTICE_UNUSED_11 value + * @property {number} NOTICE_UNUSED_12=12 NOTICE_UNUSED_12 value + */ + protobuf.NoticeEntry = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "NOTICE_UNUSED_1"] = 1; + values[valuesById[2] = "NOTICE_UNUSED_2"] = 2; + values[valuesById[3] = "NOTICE_UNUSED_3"] = 3; + values[valuesById[4] = "NOTICE_UNUSED_4"] = 4; + values[valuesById[5] = "NOTICE_UNUSED_5"] = 5; + values[valuesById[6] = "NOTICE_UNUSED_6"] = 6; + values[valuesById[7] = "NOTICE_UNUSED_7"] = 7; + values[valuesById[8] = "NOTICE_UNUSED_8"] = 8; + values[valuesById[9] = "NOTICE_UNUSED_9"] = 9; + values[valuesById[10] = "NOTICE_UNUSED_10"] = 10; + values[valuesById[11] = "NOTICE_UNUSED_11"] = 11; + values[valuesById[12] = "NOTICE_UNUSED_12"] = 12; + return values; + })(); + + /** + * FileType enum. + * @name wm.protobuf.FileType + * @enum {number} + * @property {number} FILE_PROMOTION_ANNOUNCEMENT=1 FILE_PROMOTION_ANNOUNCEMENT value + * @property {number} FILE_FEATURE_ANNOUNCEMENT=4 FILE_FEATURE_ANNOUNCEMENT value + * @property {number} FILE_SPAPP_ANNOUNCEMENT=6 FILE_SPAPP_ANNOUNCEMENT value + */ + protobuf.FileType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "FILE_PROMOTION_ANNOUNCEMENT"] = 1; + values[valuesById[4] = "FILE_FEATURE_ANNOUNCEMENT"] = 4; + values[valuesById[6] = "FILE_SPAPP_ANNOUNCEMENT"] = 6; + return values; + })(); + + /** + * GhostCompetitionParticipantState enum. + * @name wm.protobuf.GhostCompetitionParticipantState + * @enum {number} + * @property {number} COMPETITION_NOT_PARTICIPATED=1 COMPETITION_NOT_PARTICIPATED value + * @property {number} COMPETITION_QUALIFIED=2 COMPETITION_QUALIFIED value + * @property {number} COMPETITION_PARTICIPATED=3 COMPETITION_PARTICIPATED value + * @property {number} COMPETITION_WON=4 COMPETITION_WON value + */ + protobuf.GhostCompetitionParticipantState = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "COMPETITION_NOT_PARTICIPATED"] = 1; + values[valuesById[2] = "COMPETITION_QUALIFIED"] = 2; + values[valuesById[3] = "COMPETITION_PARTICIPATED"] = 3; + values[valuesById[4] = "COMPETITION_WON"] = 4; + return values; + })(); + + /** + * ScreenshotType enum. + * @name wm.protobuf.ScreenshotType + * @enum {number} + * @property {number} SS_GHOST_BATTLE=1 SS_GHOST_BATTLE value + * @property {number} SS_VERSUS_BATTLE=2 SS_VERSUS_BATTLE value + * @property {number} SS_TERMINAL=3 SS_TERMINAL value + * @property {number} SS_ACQUIRING_VERSUS_STAR=4 SS_ACQUIRING_VERSUS_STAR value + * @property {number} SS_ACQUIRING_AURA_MOTIF=5 SS_ACQUIRING_AURA_MOTIF value + * @property {number} SS_GHOST_REGION_MAP=6 SS_GHOST_REGION_MAP value + * @property {number} SS_ACQUIRING_CROWN=7 SS_ACQUIRING_CROWN value + * @property {number} SS_GHOST_COMPETITION_RESULT=8 SS_GHOST_COMPETITION_RESULT value + * @property {number} SS_TIME_ATTACK_RESULT=9 SS_TIME_ATTACK_RESULT value + * @property {number} SS_LEVEL_UP=10 SS_LEVEL_UP value + */ + protobuf.ScreenshotType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SS_GHOST_BATTLE"] = 1; + values[valuesById[2] = "SS_VERSUS_BATTLE"] = 2; + values[valuesById[3] = "SS_TERMINAL"] = 3; + values[valuesById[4] = "SS_ACQUIRING_VERSUS_STAR"] = 4; + values[valuesById[5] = "SS_ACQUIRING_AURA_MOTIF"] = 5; + values[valuesById[6] = "SS_GHOST_REGION_MAP"] = 6; + values[valuesById[7] = "SS_ACQUIRING_CROWN"] = 7; + values[valuesById[8] = "SS_GHOST_COMPETITION_RESULT"] = 8; + values[valuesById[9] = "SS_TIME_ATTACK_RESULT"] = 9; + values[valuesById[10] = "SS_LEVEL_UP"] = 10; + return values; + })(); + + /** + * TransferState enum. + * @name wm.protobuf.TransferState + * @enum {number} + * @property {number} NOT_REGISTERED=0 NOT_REGISTERED value + * @property {number} NEW_REGISTRATION=1 NEW_REGISTRATION value + * @property {number} TRANSFER_REQUIRED=2 TRANSFER_REQUIRED value + * @property {number} TRANSFERRING=3 TRANSFERRING value + * @property {number} TRANSFERRED=4 TRANSFERRED value + */ + protobuf.TransferState = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NOT_REGISTERED"] = 0; + values[valuesById[1] = "NEW_REGISTRATION"] = 1; + values[valuesById[2] = "TRANSFER_REQUIRED"] = 2; + values[valuesById[3] = "TRANSFERRING"] = 3; + values[valuesById[4] = "TRANSFERRED"] = 4; + return values; + })(); + + /** + * EventModeSerialErrorCode enum. + * @name wm.protobuf.EventModeSerialErrorCode + * @enum {number} + * @property {number} SERIAL_SUCCESS=0 SERIAL_SUCCESS value + * @property {number} SERIAL_ATTEMPT_TO_CHANGE=1 SERIAL_ATTEMPT_TO_CHANGE value + * @property {number} SERIAL_NO_INPUT=2 SERIAL_NO_INPUT value + * @property {number} SERIAL_INVALID=3 SERIAL_INVALID value + * @property {number} SERIAL_EXPIRED=4 SERIAL_EXPIRED value + * @property {number} SERIAL_OTHER_PLACE=5 SERIAL_OTHER_PLACE value + */ + protobuf.EventModeSerialErrorCode = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERIAL_SUCCESS"] = 0; + values[valuesById[1] = "SERIAL_ATTEMPT_TO_CHANGE"] = 1; + values[valuesById[2] = "SERIAL_NO_INPUT"] = 2; + values[valuesById[3] = "SERIAL_INVALID"] = 3; + values[valuesById[4] = "SERIAL_EXPIRED"] = 4; + values[valuesById[5] = "SERIAL_OTHER_PLACE"] = 5; + return values; + })(); + + /** + * ClientLogType enum. + * @name wm.protobuf.ClientLogType + * @enum {number} + * @property {number} LOG_LOAD_REPORT=0 LOG_LOAD_REPORT value + * @property {number} LOG_ERROR=1 LOG_ERROR value + */ + protobuf.ClientLogType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_LOAD_REPORT"] = 0; + values[valuesById[1] = "LOG_ERROR"] = 1; + return values; + })(); + + /** + * SmartphoneAppState enum. + * @name wm.protobuf.SmartphoneAppState + * @enum {number} + * @property {number} SPAPP_UNREGISTERED=0 SPAPP_UNREGISTERED value + * @property {number} SPAPP_KTID=1 SPAPP_KTID value + * @property {number} SPAPP_BNID=2 SPAPP_BNID value + */ + protobuf.SmartphoneAppState = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPAPP_UNREGISTERED"] = 0; + values[valuesById[1] = "SPAPP_KTID"] = 1; + values[valuesById[2] = "SPAPP_BNID"] = 2; + return values; + })(); + + return protobuf; + })(); + + return wm; +})(); + +export { $root as default }; diff --git a/src/wmmt/system.proto.d.ts b/src/wmmt/system.proto.d.ts new file mode 100644 index 0000000..65f809f --- /dev/null +++ b/src/wmmt/system.proto.d.ts @@ -0,0 +1,19142 @@ +import * as $protobuf from "protobufjs"; +/** Namespace sys. */ +export namespace sys { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a Log. */ + interface ILog { + + /** Log errors */ + errors?: (sys.protobuf.Log.IError[]|null); + } + + /** Represents a Log. */ + class Log implements ILog { + + /** + * Constructs a new Log. + * @param [properties] Properties to set + */ + constructor(properties?: sys.protobuf.ILog); + + /** Log errors. */ + public errors: sys.protobuf.Log.IError[]; + + /** + * Creates a new Log instance using the specified properties. + * @param [properties] Properties to set + * @returns Log instance + */ + public static create(properties?: sys.protobuf.ILog): sys.protobuf.Log; + + /** + * Encodes the specified Log message. Does not implicitly {@link sys.protobuf.Log.verify|verify} messages. + * @param message Log message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: sys.protobuf.ILog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Log message, length delimited. Does not implicitly {@link sys.protobuf.Log.verify|verify} messages. + * @param message Log message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: sys.protobuf.ILog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Log message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Log + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sys.protobuf.Log; + + /** + * Decodes a Log message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Log + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sys.protobuf.Log; + + /** + * Verifies a Log message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Log message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Log + */ + public static fromObject(object: { [k: string]: any }): sys.protobuf.Log; + + /** + * Creates a plain object from a Log message. Also converts values to other types if specified. + * @param message Log + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: sys.protobuf.Log, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Log to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Log + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Log { + + /** Properties of an Error. */ + interface IError { + + /** Error timestamp */ + timestamp: number; + + /** Error code */ + code: number; + } + + /** Represents an Error. */ + class Error implements IError { + + /** + * Constructs a new Error. + * @param [properties] Properties to set + */ + constructor(properties?: sys.protobuf.Log.IError); + + /** Error timestamp. */ + public timestamp: number; + + /** Error code. */ + public code: number; + + /** + * Creates a new Error instance using the specified properties. + * @param [properties] Properties to set + * @returns Error instance + */ + public static create(properties?: sys.protobuf.Log.IError): sys.protobuf.Log.Error; + + /** + * Encodes the specified Error message. Does not implicitly {@link sys.protobuf.Log.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: sys.protobuf.Log.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link sys.protobuf.Log.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: sys.protobuf.Log.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Error message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sys.protobuf.Log.Error; + + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sys.protobuf.Log.Error; + + /** + * Verifies an Error message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Error message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Error + */ + public static fromObject(object: { [k: string]: any }): sys.protobuf.Log.Error; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @param message Error + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: sys.protobuf.Log.Error, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Error to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Error + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a BanaCoinPaymentLog. */ + interface IBanaCoinPaymentLog { + + /** BanaCoinPaymentLog payments */ + payments?: (sys.protobuf.BanaCoinPaymentLog.IPayment[]|null); + } + + /** Represents a BanaCoinPaymentLog. */ + class BanaCoinPaymentLog implements IBanaCoinPaymentLog { + + /** + * Constructs a new BanaCoinPaymentLog. + * @param [properties] Properties to set + */ + constructor(properties?: sys.protobuf.IBanaCoinPaymentLog); + + /** BanaCoinPaymentLog payments. */ + public payments: sys.protobuf.BanaCoinPaymentLog.IPayment[]; + + /** + * Creates a new BanaCoinPaymentLog instance using the specified properties. + * @param [properties] Properties to set + * @returns BanaCoinPaymentLog instance + */ + public static create(properties?: sys.protobuf.IBanaCoinPaymentLog): sys.protobuf.BanaCoinPaymentLog; + + /** + * Encodes the specified BanaCoinPaymentLog message. Does not implicitly {@link sys.protobuf.BanaCoinPaymentLog.verify|verify} messages. + * @param message BanaCoinPaymentLog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: sys.protobuf.IBanaCoinPaymentLog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BanaCoinPaymentLog message, length delimited. Does not implicitly {@link sys.protobuf.BanaCoinPaymentLog.verify|verify} messages. + * @param message BanaCoinPaymentLog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: sys.protobuf.IBanaCoinPaymentLog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BanaCoinPaymentLog message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BanaCoinPaymentLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sys.protobuf.BanaCoinPaymentLog; + + /** + * Decodes a BanaCoinPaymentLog message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BanaCoinPaymentLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sys.protobuf.BanaCoinPaymentLog; + + /** + * Verifies a BanaCoinPaymentLog message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BanaCoinPaymentLog message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BanaCoinPaymentLog + */ + public static fromObject(object: { [k: string]: any }): sys.protobuf.BanaCoinPaymentLog; + + /** + * Creates a plain object from a BanaCoinPaymentLog message. Also converts values to other types if specified. + * @param message BanaCoinPaymentLog + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: sys.protobuf.BanaCoinPaymentLog, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BanaCoinPaymentLog to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BanaCoinPaymentLog + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BanaCoinPaymentLog { + + /** Properties of a Payment. */ + interface IPayment { + + /** Payment date */ + date: number; + + /** Payment contactNumber */ + contactNumber?: (string|null); + + /** Payment state */ + state: sys.protobuf.BanaCoinPaymentState; + + /** Payment cost */ + cost?: (number|null); + + /** Payment accessCode */ + accessCode: string; + + /** Payment personId */ + personId: string; + } + + /** Represents a Payment. */ + class Payment implements IPayment { + + /** + * Constructs a new Payment. + * @param [properties] Properties to set + */ + constructor(properties?: sys.protobuf.BanaCoinPaymentLog.IPayment); + + /** Payment date. */ + public date: number; + + /** Payment contactNumber. */ + public contactNumber: string; + + /** Payment state. */ + public state: sys.protobuf.BanaCoinPaymentState; + + /** Payment cost. */ + public cost: number; + + /** Payment accessCode. */ + public accessCode: string; + + /** Payment personId. */ + public personId: string; + + /** + * Creates a new Payment instance using the specified properties. + * @param [properties] Properties to set + * @returns Payment instance + */ + public static create(properties?: sys.protobuf.BanaCoinPaymentLog.IPayment): sys.protobuf.BanaCoinPaymentLog.Payment; + + /** + * Encodes the specified Payment message. Does not implicitly {@link sys.protobuf.BanaCoinPaymentLog.Payment.verify|verify} messages. + * @param message Payment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: sys.protobuf.BanaCoinPaymentLog.IPayment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Payment message, length delimited. Does not implicitly {@link sys.protobuf.BanaCoinPaymentLog.Payment.verify|verify} messages. + * @param message Payment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: sys.protobuf.BanaCoinPaymentLog.IPayment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Payment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Payment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sys.protobuf.BanaCoinPaymentLog.Payment; + + /** + * Decodes a Payment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Payment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sys.protobuf.BanaCoinPaymentLog.Payment; + + /** + * Verifies a Payment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Payment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Payment + */ + public static fromObject(object: { [k: string]: any }): sys.protobuf.BanaCoinPaymentLog.Payment; + + /** + * Creates a plain object from a Payment message. Also converts values to other types if specified. + * @param message Payment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: sys.protobuf.BanaCoinPaymentLog.Payment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Payment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Payment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation authorizationAt */ + authorizationAt?: (number|null); + + /** Operation featureVersion */ + featureVersion?: (wm.protobuf.IGameFeatureVersion|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: sys.protobuf.IOperation); + + /** Operation authorizationAt. */ + public authorizationAt: number; + + /** Operation featureVersion. */ + public featureVersion?: (wm.protobuf.IGameFeatureVersion|null); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: sys.protobuf.IOperation): sys.protobuf.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link sys.protobuf.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: sys.protobuf.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link sys.protobuf.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: sys.protobuf.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sys.protobuf.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sys.protobuf.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): sys.protobuf.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: sys.protobuf.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Status. */ + interface IStatus { + + /** Status state */ + state: sys.protobuf.State; + + /** Status name */ + name?: (string|null); + + /** Status address */ + address?: (number|null); + + /** Status value */ + value?: (number|null); + + /** Status value2 */ + value2?: (number|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: sys.protobuf.IStatus); + + /** Status state. */ + public state: sys.protobuf.State; + + /** Status name. */ + public name: string; + + /** Status address. */ + public address: number; + + /** Status value. */ + public value: number; + + /** Status value2. */ + public value2: number; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: sys.protobuf.IStatus): sys.protobuf.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link sys.protobuf.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: sys.protobuf.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link sys.protobuf.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: sys.protobuf.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sys.protobuf.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sys.protobuf.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): sys.protobuf.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: sys.protobuf.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Command. */ + interface ICommand { + + /** Command sequence */ + sequence?: (number|null); + + /** Command ntp */ + ntp?: (string|null); + + /** Command checkCable */ + checkCable?: (string|null); + + /** Command renewDhcp */ + renewDhcp?: (string|null); + + /** Command setDate */ + setDate?: (number|null); + + /** Command syncDate */ + syncDate?: (string|null); + + /** Command ping */ + ping?: (number[]|null); + + /** Command traceRoute */ + traceRoute?: (number|null); + + /** Command checkPacket */ + checkPacket?: (string|null); + + /** Command reboot */ + reboot?: (string|null); + + /** Command checkPkg */ + checkPkg?: (string|null); + } + + /** Represents a Command. */ + class Command implements ICommand { + + /** + * Constructs a new Command. + * @param [properties] Properties to set + */ + constructor(properties?: sys.protobuf.ICommand); + + /** Command sequence. */ + public sequence: number; + + /** Command ntp. */ + public ntp: string; + + /** Command checkCable. */ + public checkCable: string; + + /** Command renewDhcp. */ + public renewDhcp: string; + + /** Command setDate. */ + public setDate: number; + + /** Command syncDate. */ + public syncDate: string; + + /** Command ping. */ + public ping: number[]; + + /** Command traceRoute. */ + public traceRoute: number; + + /** Command checkPacket. */ + public checkPacket: string; + + /** Command reboot. */ + public reboot: string; + + /** Command checkPkg. */ + public checkPkg: string; + + /** + * Creates a new Command instance using the specified properties. + * @param [properties] Properties to set + * @returns Command instance + */ + public static create(properties?: sys.protobuf.ICommand): sys.protobuf.Command; + + /** + * Encodes the specified Command message. Does not implicitly {@link sys.protobuf.Command.verify|verify} messages. + * @param message Command message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: sys.protobuf.ICommand, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Command message, length delimited. Does not implicitly {@link sys.protobuf.Command.verify|verify} messages. + * @param message Command message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: sys.protobuf.ICommand, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Command message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Command + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sys.protobuf.Command; + + /** + * Decodes a Command message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Command + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sys.protobuf.Command; + + /** + * Verifies a Command message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Command message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Command + */ + public static fromObject(object: { [k: string]: any }): sys.protobuf.Command; + + /** + * Creates a plain object from a Command message. Also converts values to other types if specified. + * @param message Command + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: sys.protobuf.Command, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Command to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Command + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Reply. */ + interface IReply { + + /** Reply sequence */ + sequence?: (number|null); + + /** Reply ntp */ + ntp?: (sys.protobuf.IStatus|null); + + /** Reply checkCable */ + checkCable?: (sys.protobuf.IStatus|null); + + /** Reply renewDhcp */ + renewDhcp?: (sys.protobuf.IStatus|null); + + /** Reply setDate */ + setDate?: (sys.protobuf.IStatus|null); + + /** Reply syncDate */ + syncDate?: (sys.protobuf.IStatus|null); + + /** Reply ping */ + ping?: (sys.protobuf.IStatus[]|null); + + /** Reply traceRoute */ + traceRoute?: (sys.protobuf.IStatus|null); + + /** Reply checkPacket */ + checkPacket?: (sys.protobuf.IStatus|null); + + /** Reply reboot */ + reboot?: (sys.protobuf.IStatus|null); + + /** Reply checkPkg */ + checkPkg?: (sys.protobuf.IStatus|null); + } + + /** Represents a Reply. */ + class Reply implements IReply { + + /** + * Constructs a new Reply. + * @param [properties] Properties to set + */ + constructor(properties?: sys.protobuf.IReply); + + /** Reply sequence. */ + public sequence: number; + + /** Reply ntp. */ + public ntp?: (sys.protobuf.IStatus|null); + + /** Reply checkCable. */ + public checkCable?: (sys.protobuf.IStatus|null); + + /** Reply renewDhcp. */ + public renewDhcp?: (sys.protobuf.IStatus|null); + + /** Reply setDate. */ + public setDate?: (sys.protobuf.IStatus|null); + + /** Reply syncDate. */ + public syncDate?: (sys.protobuf.IStatus|null); + + /** Reply ping. */ + public ping: sys.protobuf.IStatus[]; + + /** Reply traceRoute. */ + public traceRoute?: (sys.protobuf.IStatus|null); + + /** Reply checkPacket. */ + public checkPacket?: (sys.protobuf.IStatus|null); + + /** Reply reboot. */ + public reboot?: (sys.protobuf.IStatus|null); + + /** Reply checkPkg. */ + public checkPkg?: (sys.protobuf.IStatus|null); + + /** + * Creates a new Reply instance using the specified properties. + * @param [properties] Properties to set + * @returns Reply instance + */ + public static create(properties?: sys.protobuf.IReply): sys.protobuf.Reply; + + /** + * Encodes the specified Reply message. Does not implicitly {@link sys.protobuf.Reply.verify|verify} messages. + * @param message Reply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: sys.protobuf.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Reply message, length delimited. Does not implicitly {@link sys.protobuf.Reply.verify|verify} messages. + * @param message Reply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: sys.protobuf.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Reply message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Reply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sys.protobuf.Reply; + + /** + * Decodes a Reply message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Reply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sys.protobuf.Reply; + + /** + * Verifies a Reply message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Reply message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Reply + */ + public static fromObject(object: { [k: string]: any }): sys.protobuf.Reply; + + /** + * Creates a plain object from a Reply message. Also converts values to other types if specified. + * @param message Reply + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: sys.protobuf.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Reply to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Reply + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** State enum. */ + enum State { + State_None = 0, + State_Checking = 1, + State_NG = 2, + State_OK = 3 + } + + /** BanaCoinPaymentState enum. */ + enum BanaCoinPaymentState { + BC_SUCCESS = 0, + BC_SHORTAGE = 1, + BC_BNID_MEMBER_ERROR = 2, + BC_UNKNOWN_ERROR = 3, + BC_BNID_SYSTEM_ERROR = 4, + BC_BNID_VERIFY_ERROR = 5, + BC_BNID_EXECUTE_ERROR = 6, + BC_BNID_SERVER_UNAVAILABLE = 99 + } + } +} + +/** Namespace wm. */ +export namespace wm { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a RegisterSystemInfoRequest. */ + interface IRegisterSystemInfoRequest { + + /** RegisterSystemInfoRequest pcbSerial */ + pcbSerial: string; + + /** RegisterSystemInfoRequest terminalType */ + terminalType: wm.protobuf.TerminalType; + + /** RegisterSystemInfoRequest romVersion */ + romVersion: number; + + /** RegisterSystemInfoRequest country */ + country: string; + + /** RegisterSystemInfoRequest lineType */ + lineType: wm.protobuf.LineType; + + /** RegisterSystemInfoRequest shopName */ + shopName: string; + + /** RegisterSystemInfoRequest shopNickname */ + shopNickname: string; + + /** RegisterSystemInfoRequest allnetPlaceId */ + allnetPlaceId?: (number|null); + + /** RegisterSystemInfoRequest allnetRegion0 */ + allnetRegion0?: (number|null); + + /** RegisterSystemInfoRequest muchaPlaceId */ + muchaPlaceId?: (string|null); + + /** RegisterSystemInfoRequest muchaPrefectureId */ + muchaPrefectureId?: (number|null); + + /** RegisterSystemInfoRequest regionName0 */ + regionName0: string; + + /** RegisterSystemInfoRequest regionName1 */ + regionName1: string; + + /** RegisterSystemInfoRequest regionName2 */ + regionName2: string; + + /** RegisterSystemInfoRequest regionName3 */ + regionName3: string; + + /** RegisterSystemInfoRequest timezoneOffset */ + timezoneOffset: number; + + /** RegisterSystemInfoRequest systemSetting */ + systemSetting: wm.protobuf.ISystemSetting; + + /** RegisterSystemInfoRequest errorLogs */ + errorLogs?: (wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry[]|null); + } + + /** Represents a RegisterSystemInfoRequest. */ + class RegisterSystemInfoRequest implements IRegisterSystemInfoRequest { + + /** + * Constructs a new RegisterSystemInfoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemInfoRequest); + + /** RegisterSystemInfoRequest pcbSerial. */ + public pcbSerial: string; + + /** RegisterSystemInfoRequest terminalType. */ + public terminalType: wm.protobuf.TerminalType; + + /** RegisterSystemInfoRequest romVersion. */ + public romVersion: number; + + /** RegisterSystemInfoRequest country. */ + public country: string; + + /** RegisterSystemInfoRequest lineType. */ + public lineType: wm.protobuf.LineType; + + /** RegisterSystemInfoRequest shopName. */ + public shopName: string; + + /** RegisterSystemInfoRequest shopNickname. */ + public shopNickname: string; + + /** RegisterSystemInfoRequest allnetPlaceId. */ + public allnetPlaceId: number; + + /** RegisterSystemInfoRequest allnetRegion0. */ + public allnetRegion0: number; + + /** RegisterSystemInfoRequest muchaPlaceId. */ + public muchaPlaceId: string; + + /** RegisterSystemInfoRequest muchaPrefectureId. */ + public muchaPrefectureId: number; + + /** RegisterSystemInfoRequest regionName0. */ + public regionName0: string; + + /** RegisterSystemInfoRequest regionName1. */ + public regionName1: string; + + /** RegisterSystemInfoRequest regionName2. */ + public regionName2: string; + + /** RegisterSystemInfoRequest regionName3. */ + public regionName3: string; + + /** RegisterSystemInfoRequest timezoneOffset. */ + public timezoneOffset: number; + + /** RegisterSystemInfoRequest systemSetting. */ + public systemSetting: wm.protobuf.ISystemSetting; + + /** RegisterSystemInfoRequest errorLogs. */ + public errorLogs: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry[]; + + /** + * Creates a new RegisterSystemInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemInfoRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemInfoRequest): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Encodes the specified RegisterSystemInfoRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @param message RegisterSystemInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @param message RegisterSystemInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Verifies a RegisterSystemInfoRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemInfoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemInfoRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Creates a plain object from a RegisterSystemInfoRequest message. Also converts values to other types if specified. + * @param message RegisterSystemInfoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemInfoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemInfoRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RegisterSystemInfoRequest { + + /** Properties of an ErrorLogEntry. */ + interface IErrorLogEntry { + + /** ErrorLogEntry datetime */ + datetime: number; + + /** ErrorLogEntry message */ + message: string; + } + + /** Represents an ErrorLogEntry. */ + class ErrorLogEntry implements IErrorLogEntry { + + /** + * Constructs a new ErrorLogEntry. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry); + + /** ErrorLogEntry datetime. */ + public datetime: number; + + /** ErrorLogEntry message. */ + public message: string; + + /** + * Creates a new ErrorLogEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorLogEntry instance + */ + public static create(properties?: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Encodes the specified ErrorLogEntry message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @param message ErrorLogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorLogEntry message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @param message ErrorLogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Verifies an ErrorLogEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ErrorLogEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorLogEntry + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Creates a plain object from an ErrorLogEntry message. Also converts values to other types if specified. + * @param message ErrorLogEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorLogEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorLogEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RegisterSystemInfoResponse. */ + interface IRegisterSystemInfoResponse { + + /** RegisterSystemInfoResponse error */ + error: wm.protobuf.ErrorCode; + + /** RegisterSystemInfoResponse regionId */ + regionId: number; + + /** RegisterSystemInfoResponse placeId */ + placeId: string; + + /** RegisterSystemInfoResponse allowedClientLogTypes */ + allowedClientLogTypes?: (wm.protobuf.ClientLogType[]|null); + + /** RegisterSystemInfoResponse featureVersion */ + featureVersion: wm.protobuf.IGameFeatureVersion; + + /** RegisterSystemInfoResponse latestCompetitionId */ + latestCompetitionId?: (number|null); + + /** RegisterSystemInfoResponse competitionSchedule */ + competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** RegisterSystemInfoResponse scratchNotes */ + scratchNotes?: (string|null); + + /** RegisterSystemInfoResponse inviteFriendCampaignSchedule */ + inviteFriendCampaignSchedule?: (wm.protobuf.IInviteFriendCampaignSchedule|null); + + /** RegisterSystemInfoResponse ghostSelectionMinRedoWait */ + ghostSelectionMinRedoWait: number; + + /** RegisterSystemInfoResponse ghostSelectionMaxRedoWait */ + ghostSelectionMaxRedoWait: number; + } + + /** Represents a RegisterSystemInfoResponse. */ + class RegisterSystemInfoResponse implements IRegisterSystemInfoResponse { + + /** + * Constructs a new RegisterSystemInfoResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemInfoResponse); + + /** RegisterSystemInfoResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** RegisterSystemInfoResponse regionId. */ + public regionId: number; + + /** RegisterSystemInfoResponse placeId. */ + public placeId: string; + + /** RegisterSystemInfoResponse allowedClientLogTypes. */ + public allowedClientLogTypes: wm.protobuf.ClientLogType[]; + + /** RegisterSystemInfoResponse featureVersion. */ + public featureVersion: wm.protobuf.IGameFeatureVersion; + + /** RegisterSystemInfoResponse latestCompetitionId. */ + public latestCompetitionId: number; + + /** RegisterSystemInfoResponse competitionSchedule. */ + public competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** RegisterSystemInfoResponse scratchNotes. */ + public scratchNotes: string; + + /** RegisterSystemInfoResponse inviteFriendCampaignSchedule. */ + public inviteFriendCampaignSchedule?: (wm.protobuf.IInviteFriendCampaignSchedule|null); + + /** RegisterSystemInfoResponse ghostSelectionMinRedoWait. */ + public ghostSelectionMinRedoWait: number; + + /** RegisterSystemInfoResponse ghostSelectionMaxRedoWait. */ + public ghostSelectionMaxRedoWait: number; + + /** + * Creates a new RegisterSystemInfoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemInfoResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemInfoResponse): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Encodes the specified RegisterSystemInfoResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @param message RegisterSystemInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @param message RegisterSystemInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Verifies a RegisterSystemInfoResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemInfoResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemInfoResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Creates a plain object from a RegisterSystemInfoResponse message. Also converts values to other types if specified. + * @param message RegisterSystemInfoResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemInfoResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemInfoResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterSystemStatsRequest. */ + interface IRegisterSystemStatsRequest { + + /** RegisterSystemStatsRequest pcbSerial */ + pcbSerial: string; + + /** RegisterSystemStatsRequest driveStats */ + driveStats?: (wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null); + + /** RegisterSystemStatsRequest terminalStats */ + terminalStats?: (wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null); + } + + /** Represents a RegisterSystemStatsRequest. */ + class RegisterSystemStatsRequest implements IRegisterSystemStatsRequest { + + /** + * Constructs a new RegisterSystemStatsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemStatsRequest); + + /** RegisterSystemStatsRequest pcbSerial. */ + public pcbSerial: string; + + /** RegisterSystemStatsRequest driveStats. */ + public driveStats?: (wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null); + + /** RegisterSystemStatsRequest terminalStats. */ + public terminalStats?: (wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null); + + /** + * Creates a new RegisterSystemStatsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemStatsRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemStatsRequest): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Encodes the specified RegisterSystemStatsRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @param message RegisterSystemStatsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemStatsRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @param message RegisterSystemStatsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Verifies a RegisterSystemStatsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemStatsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemStatsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Creates a plain object from a RegisterSystemStatsRequest message. Also converts values to other types if specified. + * @param message RegisterSystemStatsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemStatsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemStatsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RegisterSystemStatsRequest { + + /** Properties of a DriveStats. */ + interface IDriveStats { + + /** DriveStats operation */ + operation?: (number[]|null); + + /** DriveStats story */ + story?: (number[]|null); + + /** DriveStats versus */ + versus?: (number[]|null); + + /** DriveStats ghost */ + ghost?: (number[]|null); + + /** DriveStats timeAttack */ + timeAttack?: (number[]|null); + + /** DriveStats event */ + event?: (number[]|null); + } + + /** Represents a DriveStats. */ + class DriveStats implements IDriveStats { + + /** + * Constructs a new DriveStats. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.RegisterSystemStatsRequest.IDriveStats); + + /** DriveStats operation. */ + public operation: number[]; + + /** DriveStats story. */ + public story: number[]; + + /** DriveStats versus. */ + public versus: number[]; + + /** DriveStats ghost. */ + public ghost: number[]; + + /** DriveStats timeAttack. */ + public timeAttack: number[]; + + /** DriveStats event. */ + public event: number[]; + + /** + * Creates a new DriveStats instance using the specified properties. + * @param [properties] Properties to set + * @returns DriveStats instance + */ + public static create(properties?: wm.protobuf.RegisterSystemStatsRequest.IDriveStats): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Encodes the specified DriveStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @param message DriveStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.RegisterSystemStatsRequest.IDriveStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DriveStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @param message DriveStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.RegisterSystemStatsRequest.IDriveStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DriveStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Decodes a DriveStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Verifies a DriveStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DriveStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DriveStats + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Creates a plain object from a DriveStats message. Also converts values to other types if specified. + * @param message DriveStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsRequest.DriveStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DriveStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DriveStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TerminalStats. */ + interface ITerminalStats { + + /** TerminalStats operation */ + operation?: (number[]|null); + } + + /** Represents a TerminalStats. */ + class TerminalStats implements ITerminalStats { + + /** + * Constructs a new TerminalStats. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats); + + /** TerminalStats operation. */ + public operation: number[]; + + /** + * Creates a new TerminalStats instance using the specified properties. + * @param [properties] Properties to set + * @returns TerminalStats instance + */ + public static create(properties?: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Encodes the specified TerminalStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @param message TerminalStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerminalStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @param message TerminalStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerminalStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Decodes a TerminalStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Verifies a TerminalStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerminalStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerminalStats + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Creates a plain object from a TerminalStats message. Also converts values to other types if specified. + * @param message TerminalStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsRequest.TerminalStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerminalStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerminalStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RegisterSystemStatsResponse. */ + interface IRegisterSystemStatsResponse { + + /** RegisterSystemStatsResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a RegisterSystemStatsResponse. */ + class RegisterSystemStatsResponse implements IRegisterSystemStatsResponse { + + /** + * Constructs a new RegisterSystemStatsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemStatsResponse); + + /** RegisterSystemStatsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new RegisterSystemStatsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemStatsResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemStatsResponse): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Encodes the specified RegisterSystemStatsResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @param message RegisterSystemStatsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemStatsResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @param message RegisterSystemStatsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Verifies a RegisterSystemStatsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemStatsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemStatsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Creates a plain object from a RegisterSystemStatsResponse message. Also converts values to other types if specified. + * @param message RegisterSystemStatsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemStatsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemStatsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterGhostTrailRequest. */ + interface IRegisterGhostTrailRequest { + + /** RegisterGhostTrailRequest ghostSessionId */ + ghostSessionId: (number|Long); + + /** RegisterGhostTrailRequest ghost */ + ghost: wm.protobuf.IGhostCar; + + /** RegisterGhostTrailRequest trail */ + trail: Uint8Array; + + /** RegisterGhostTrailRequest time */ + time?: (number|null); + + /** RegisterGhostTrailRequest driveData */ + driveData?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByArea */ + trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByCar */ + trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByUser */ + trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + } + + /** Represents a RegisterGhostTrailRequest. */ + class RegisterGhostTrailRequest implements IRegisterGhostTrailRequest { + + /** + * Constructs a new RegisterGhostTrailRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterGhostTrailRequest); + + /** RegisterGhostTrailRequest ghostSessionId. */ + public ghostSessionId: (number|Long); + + /** RegisterGhostTrailRequest ghost. */ + public ghost: wm.protobuf.IGhostCar; + + /** RegisterGhostTrailRequest trail. */ + public trail: Uint8Array; + + /** RegisterGhostTrailRequest time. */ + public time: number; + + /** RegisterGhostTrailRequest driveData. */ + public driveData?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByArea. */ + public trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByCar. */ + public trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByUser. */ + public trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + + /** + * Creates a new RegisterGhostTrailRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterGhostTrailRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterGhostTrailRequest): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Encodes the specified RegisterGhostTrailRequest message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @param message RegisterGhostTrailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterGhostTrailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterGhostTrailRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @param message RegisterGhostTrailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterGhostTrailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Verifies a RegisterGhostTrailRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterGhostTrailRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterGhostTrailRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Creates a plain object from a RegisterGhostTrailRequest message. Also converts values to other types if specified. + * @param message RegisterGhostTrailRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterGhostTrailRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterGhostTrailRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterGhostTrailRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterGhostTrailResponse. */ + interface IRegisterGhostTrailResponse { + + /** RegisterGhostTrailResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a RegisterGhostTrailResponse. */ + class RegisterGhostTrailResponse implements IRegisterGhostTrailResponse { + + /** + * Constructs a new RegisterGhostTrailResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterGhostTrailResponse); + + /** RegisterGhostTrailResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new RegisterGhostTrailResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterGhostTrailResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterGhostTrailResponse): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Encodes the specified RegisterGhostTrailResponse message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @param message RegisterGhostTrailResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterGhostTrailResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterGhostTrailResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @param message RegisterGhostTrailResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterGhostTrailResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Verifies a RegisterGhostTrailResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterGhostTrailResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterGhostTrailResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Creates a plain object from a RegisterGhostTrailResponse message. Also converts values to other types if specified. + * @param message RegisterGhostTrailResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterGhostTrailResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterGhostTrailResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterGhostTrailResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadUserRequest. */ + interface ILoadUserRequest { + + /** LoadUserRequest cardChipId */ + cardChipId?: (string|null); + + /** LoadUserRequest accessCode */ + accessCode?: (string|null); + + /** LoadUserRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** LoadUserRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** LoadUserRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** LoadUserRequest userId */ + userId?: (number|null); + + /** LoadUserRequest romVersion */ + romVersion: number; + + /** LoadUserRequest maxCars */ + maxCars: number; + + /** LoadUserRequest createUser */ + createUser?: (boolean|null); + } + + /** Represents a LoadUserRequest. */ + class LoadUserRequest implements ILoadUserRequest { + + /** + * Constructs a new LoadUserRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUserRequest); + + /** LoadUserRequest cardChipId. */ + public cardChipId: string; + + /** LoadUserRequest accessCode. */ + public accessCode: string; + + /** LoadUserRequest cardTypeCode. */ + public cardTypeCode: number; + + /** LoadUserRequest cardRegionCode. */ + public cardRegionCode: number; + + /** LoadUserRequest device. */ + public device: wm.protobuf.DeviceType; + + /** LoadUserRequest userId. */ + public userId: number; + + /** LoadUserRequest romVersion. */ + public romVersion: number; + + /** LoadUserRequest maxCars. */ + public maxCars: number; + + /** LoadUserRequest createUser. */ + public createUser: boolean; + + /** + * Creates a new LoadUserRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUserRequest instance + */ + public static create(properties?: wm.protobuf.ILoadUserRequest): wm.protobuf.LoadUserRequest; + + /** + * Encodes the specified LoadUserRequest message. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @param message LoadUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @param message LoadUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUserRequest; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUserRequest; + + /** + * Verifies a LoadUserRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUserRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUserRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUserRequest; + + /** + * Creates a plain object from a LoadUserRequest message. Also converts values to other types if specified. + * @param message LoadUserRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUserRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUserRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUserRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadUserResponse. */ + interface ILoadUserResponse { + + /** LoadUserResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadUserResponse unlockAt */ + unlockAt?: (number|null); + + /** LoadUserResponse accessCode */ + accessCode?: (string|null); + + /** LoadUserResponse banapassportAmId */ + banapassportAmId?: (number|null); + + /** LoadUserResponse mbid */ + mbid?: (number|null); + + /** LoadUserResponse userId */ + userId?: (number|null); + + /** LoadUserResponse numOfOwnedCars */ + numOfOwnedCars: number; + + /** LoadUserResponse cars */ + cars?: (wm.protobuf.ICar[]|null); + + /** LoadUserResponse carStates */ + carStates?: (wm.protobuf.LoadUserResponse.ICarState[]|null); + + /** LoadUserResponse unusedCarTickets */ + unusedCarTickets?: (wm.protobuf.IUserItem[]|null); + + /** LoadUserResponse tutorials */ + tutorials?: (boolean[]|null); + + /** LoadUserResponse competitionUserState */ + competitionUserState?: (wm.protobuf.GhostCompetitionParticipantState|null); + + /** LoadUserResponse windowStickerString */ + windowStickerString?: (string|null); + + /** LoadUserResponse windowStickerFont */ + windowStickerFont?: (number|null); + + /** LoadUserResponse spappState */ + spappState: wm.protobuf.SmartphoneAppState; + + /** LoadUserResponse transferState */ + transferState: wm.protobuf.TransferState; + + /** LoadUserResponse totalVsStarCount */ + totalVsStarCount?: (number|null); + + /** LoadUserResponse totalVsMedalPoint */ + totalVsMedalPoint?: (number|null); + + /** LoadUserResponse copiedCar */ + copiedCar?: (wm.protobuf.ICopiedCar|null); + + /** LoadUserResponse wasCreatedToday */ + wasCreatedToday?: (boolean|null); + + /** LoadUserResponse participatedInInviteFriendCampaign */ + participatedInInviteFriendCampaign?: (boolean|null); + } + + /** Represents a LoadUserResponse. */ + class LoadUserResponse implements ILoadUserResponse { + + /** + * Constructs a new LoadUserResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUserResponse); + + /** LoadUserResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadUserResponse unlockAt. */ + public unlockAt: number; + + /** LoadUserResponse accessCode. */ + public accessCode: string; + + /** LoadUserResponse banapassportAmId. */ + public banapassportAmId: number; + + /** LoadUserResponse mbid. */ + public mbid: number; + + /** LoadUserResponse userId. */ + public userId: number; + + /** LoadUserResponse numOfOwnedCars. */ + public numOfOwnedCars: number; + + /** LoadUserResponse cars. */ + public cars: wm.protobuf.ICar[]; + + /** LoadUserResponse carStates. */ + public carStates: wm.protobuf.LoadUserResponse.ICarState[]; + + /** LoadUserResponse unusedCarTickets. */ + public unusedCarTickets: wm.protobuf.IUserItem[]; + + /** LoadUserResponse tutorials. */ + public tutorials: boolean[]; + + /** LoadUserResponse competitionUserState. */ + public competitionUserState: wm.protobuf.GhostCompetitionParticipantState; + + /** LoadUserResponse windowStickerString. */ + public windowStickerString: string; + + /** LoadUserResponse windowStickerFont. */ + public windowStickerFont: number; + + /** LoadUserResponse spappState. */ + public spappState: wm.protobuf.SmartphoneAppState; + + /** LoadUserResponse transferState. */ + public transferState: wm.protobuf.TransferState; + + /** LoadUserResponse totalVsStarCount. */ + public totalVsStarCount: number; + + /** LoadUserResponse totalVsMedalPoint. */ + public totalVsMedalPoint: number; + + /** LoadUserResponse copiedCar. */ + public copiedCar?: (wm.protobuf.ICopiedCar|null); + + /** LoadUserResponse wasCreatedToday. */ + public wasCreatedToday: boolean; + + /** LoadUserResponse participatedInInviteFriendCampaign. */ + public participatedInInviteFriendCampaign: boolean; + + /** + * Creates a new LoadUserResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUserResponse instance + */ + public static create(properties?: wm.protobuf.ILoadUserResponse): wm.protobuf.LoadUserResponse; + + /** + * Encodes the specified LoadUserResponse message. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @param message LoadUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @param message LoadUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUserResponse; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUserResponse; + + /** + * Verifies a LoadUserResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUserResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUserResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUserResponse; + + /** + * Creates a plain object from a LoadUserResponse message. Also converts values to other types if specified. + * @param message LoadUserResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUserResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUserResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUserResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadUserResponse { + + /** Properties of a CarState. */ + interface ICarState { + + /** CarState hasOpponentGhost */ + hasOpponentGhost: boolean; + + /** CarState competitionState */ + competitionState?: (wm.protobuf.GhostCompetitionParticipantState|null); + + /** CarState toBeDeleted */ + toBeDeleted: boolean; + + /** CarState eventJoined */ + eventJoined: boolean; + + /** CarState transferred */ + transferred: boolean; + + /** CarState driveLastPlayedAt */ + driveLastPlayedAt?: (number|null); + } + + /** Represents a CarState. */ + class CarState implements ICarState { + + /** + * Constructs a new CarState. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadUserResponse.ICarState); + + /** CarState hasOpponentGhost. */ + public hasOpponentGhost: boolean; + + /** CarState competitionState. */ + public competitionState: wm.protobuf.GhostCompetitionParticipantState; + + /** CarState toBeDeleted. */ + public toBeDeleted: boolean; + + /** CarState eventJoined. */ + public eventJoined: boolean; + + /** CarState transferred. */ + public transferred: boolean; + + /** CarState driveLastPlayedAt. */ + public driveLastPlayedAt: number; + + /** + * Creates a new CarState instance using the specified properties. + * @param [properties] Properties to set + * @returns CarState instance + */ + public static create(properties?: wm.protobuf.LoadUserResponse.ICarState): wm.protobuf.LoadUserResponse.CarState; + + /** + * Encodes the specified CarState message. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @param message CarState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadUserResponse.ICarState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarState message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @param message CarState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadUserResponse.ICarState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUserResponse.CarState; + + /** + * Decodes a CarState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUserResponse.CarState; + + /** + * Verifies a CarState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarState + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUserResponse.CarState; + + /** + * Creates a plain object from a CarState message. Also converts values to other types if specified. + * @param message CarState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUserResponse.CarState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an UpdateUserSessionRequest. */ + interface IUpdateUserSessionRequest { + + /** UpdateUserSessionRequest userId */ + userId?: (number|null); + + /** UpdateUserSessionRequest cardChipId */ + cardChipId?: (string|null); + + /** UpdateUserSessionRequest accessCode */ + accessCode?: (string|null); + + /** UpdateUserSessionRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** UpdateUserSessionRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** UpdateUserSessionRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** UpdateUserSessionRequest unlockAt */ + unlockAt: number; + + /** UpdateUserSessionRequest acceptVs */ + acceptVs?: (boolean|null); + } + + /** Represents an UpdateUserSessionRequest. */ + class UpdateUserSessionRequest implements IUpdateUserSessionRequest { + + /** + * Constructs a new UpdateUserSessionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateUserSessionRequest); + + /** UpdateUserSessionRequest userId. */ + public userId: number; + + /** UpdateUserSessionRequest cardChipId. */ + public cardChipId: string; + + /** UpdateUserSessionRequest accessCode. */ + public accessCode: string; + + /** UpdateUserSessionRequest cardTypeCode. */ + public cardTypeCode: number; + + /** UpdateUserSessionRequest cardRegionCode. */ + public cardRegionCode: number; + + /** UpdateUserSessionRequest device. */ + public device: wm.protobuf.DeviceType; + + /** UpdateUserSessionRequest unlockAt. */ + public unlockAt: number; + + /** UpdateUserSessionRequest acceptVs. */ + public acceptVs: boolean; + + /** + * Creates a new UpdateUserSessionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserSessionRequest instance + */ + public static create(properties?: wm.protobuf.IUpdateUserSessionRequest): wm.protobuf.UpdateUserSessionRequest; + + /** + * Encodes the specified UpdateUserSessionRequest message. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @param message UpdateUserSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateUserSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserSessionRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @param message UpdateUserSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateUserSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateUserSessionRequest; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateUserSessionRequest; + + /** + * Verifies an UpdateUserSessionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateUserSessionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserSessionRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateUserSessionRequest; + + /** + * Creates a plain object from an UpdateUserSessionRequest message. Also converts values to other types if specified. + * @param message UpdateUserSessionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateUserSessionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserSessionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserSessionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateUserSessionResponse. */ + interface IUpdateUserSessionResponse { + + /** UpdateUserSessionResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents an UpdateUserSessionResponse. */ + class UpdateUserSessionResponse implements IUpdateUserSessionResponse { + + /** + * Constructs a new UpdateUserSessionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateUserSessionResponse); + + /** UpdateUserSessionResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new UpdateUserSessionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserSessionResponse instance + */ + public static create(properties?: wm.protobuf.IUpdateUserSessionResponse): wm.protobuf.UpdateUserSessionResponse; + + /** + * Encodes the specified UpdateUserSessionResponse message. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @param message UpdateUserSessionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateUserSessionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserSessionResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @param message UpdateUserSessionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateUserSessionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateUserSessionResponse; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateUserSessionResponse; + + /** + * Verifies an UpdateUserSessionResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateUserSessionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserSessionResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateUserSessionResponse; + + /** + * Creates a plain object from an UpdateUserSessionResponse message. Also converts values to other types if specified. + * @param message UpdateUserSessionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateUserSessionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserSessionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserSessionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadDriveInformationRequest. */ + interface ILoadDriveInformationRequest { + + /** LoadDriveInformationRequest userId */ + userId?: (number|null); + } + + /** Represents a LoadDriveInformationRequest. */ + class LoadDriveInformationRequest implements ILoadDriveInformationRequest { + + /** + * Constructs a new LoadDriveInformationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadDriveInformationRequest); + + /** LoadDriveInformationRequest userId. */ + public userId: number; + + /** + * Creates a new LoadDriveInformationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadDriveInformationRequest instance + */ + public static create(properties?: wm.protobuf.ILoadDriveInformationRequest): wm.protobuf.LoadDriveInformationRequest; + + /** + * Encodes the specified LoadDriveInformationRequest message. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @param message LoadDriveInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadDriveInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadDriveInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @param message LoadDriveInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadDriveInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadDriveInformationRequest; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadDriveInformationRequest; + + /** + * Verifies a LoadDriveInformationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadDriveInformationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadDriveInformationRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadDriveInformationRequest; + + /** + * Creates a plain object from a LoadDriveInformationRequest message. Also converts values to other types if specified. + * @param message LoadDriveInformationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadDriveInformationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadDriveInformationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadDriveInformationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadDriveInformationResponse. */ + interface ILoadDriveInformationResponse { + + /** LoadDriveInformationResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadDriveInformationResponse noticeWindow */ + noticeWindow?: (wm.protobuf.NoticeEntry[]|null); + + /** LoadDriveInformationResponse noticeWindowMessage */ + noticeWindowMessage?: (string[]|null); + + /** LoadDriveInformationResponse transferNotice */ + transferNotice?: (wm.protobuf.ITransferNotice|null); + + /** LoadDriveInformationResponse restrictedModels */ + restrictedModels?: (number[]|null); + + /** LoadDriveInformationResponse announceFeature */ + announceFeature?: (boolean|null); + + /** LoadDriveInformationResponse announceMobile */ + announceMobile?: (boolean|null); + + /** LoadDriveInformationResponse availableTickets */ + availableTickets?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a LoadDriveInformationResponse. */ + class LoadDriveInformationResponse implements ILoadDriveInformationResponse { + + /** + * Constructs a new LoadDriveInformationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadDriveInformationResponse); + + /** LoadDriveInformationResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadDriveInformationResponse noticeWindow. */ + public noticeWindow: wm.protobuf.NoticeEntry[]; + + /** LoadDriveInformationResponse noticeWindowMessage. */ + public noticeWindowMessage: string[]; + + /** LoadDriveInformationResponse transferNotice. */ + public transferNotice?: (wm.protobuf.ITransferNotice|null); + + /** LoadDriveInformationResponse restrictedModels. */ + public restrictedModels: number[]; + + /** LoadDriveInformationResponse announceFeature. */ + public announceFeature: boolean; + + /** LoadDriveInformationResponse announceMobile. */ + public announceMobile: boolean; + + /** LoadDriveInformationResponse availableTickets. */ + public availableTickets: wm.protobuf.IUserItem[]; + + /** + * Creates a new LoadDriveInformationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadDriveInformationResponse instance + */ + public static create(properties?: wm.protobuf.ILoadDriveInformationResponse): wm.protobuf.LoadDriveInformationResponse; + + /** + * Encodes the specified LoadDriveInformationResponse message. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @param message LoadDriveInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadDriveInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadDriveInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @param message LoadDriveInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadDriveInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadDriveInformationResponse; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadDriveInformationResponse; + + /** + * Verifies a LoadDriveInformationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadDriveInformationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadDriveInformationResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadDriveInformationResponse; + + /** + * Creates a plain object from a LoadDriveInformationResponse message. Also converts values to other types if specified. + * @param message LoadDriveInformationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadDriveInformationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadDriveInformationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadDriveInformationResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadCarRequest. */ + interface ILoadCarRequest { + + /** LoadCarRequest carId */ + carId: number; + + /** LoadCarRequest eventMode */ + eventMode?: (boolean|null); + + /** LoadCarRequest eventModeSerial */ + eventModeSerial?: (string|null); + } + + /** Represents a LoadCarRequest. */ + class LoadCarRequest implements ILoadCarRequest { + + /** + * Constructs a new LoadCarRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadCarRequest); + + /** LoadCarRequest carId. */ + public carId: number; + + /** LoadCarRequest eventMode. */ + public eventMode: boolean; + + /** LoadCarRequest eventModeSerial. */ + public eventModeSerial: string; + + /** + * Creates a new LoadCarRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadCarRequest instance + */ + public static create(properties?: wm.protobuf.ILoadCarRequest): wm.protobuf.LoadCarRequest; + + /** + * Encodes the specified LoadCarRequest message. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @param message LoadCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @param message LoadCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadCarRequest; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadCarRequest; + + /** + * Verifies a LoadCarRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadCarRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadCarRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadCarRequest; + + /** + * Creates a plain object from a LoadCarRequest message. Also converts values to other types if specified. + * @param message LoadCarRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadCarRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadCarRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadCarRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadCarResponse. */ + interface ILoadCarResponse { + + /** LoadCarResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadCarResponse car */ + car: wm.protobuf.ICar; + + /** LoadCarResponse tuningPoint */ + tuningPoint: number; + + /** LoadCarResponse odometer */ + odometer: number; + + /** LoadCarResponse playCount */ + playCount: number; + + /** LoadCarResponse earnedCustomColor */ + earnedCustomColor: boolean; + + /** LoadCarResponse setting */ + setting: wm.protobuf.ICarSetting; + + /** LoadCarResponse vsPlayCount */ + vsPlayCount: number; + + /** LoadCarResponse vsBurstCount */ + vsBurstCount: number; + + /** LoadCarResponse vsStarCount */ + vsStarCount: number; + + /** LoadCarResponse vsStarCountMax */ + vsStarCountMax: number; + + /** LoadCarResponse vsCoolOrWild */ + vsCoolOrWild: number; + + /** LoadCarResponse vsSmoothOrRough */ + vsSmoothOrRough: number; + + /** LoadCarResponse vsTripleStarMedals */ + vsTripleStarMedals: number; + + /** LoadCarResponse vsDoubleStarMedals */ + vsDoubleStarMedals: number; + + /** LoadCarResponse vsSingleStarMedals */ + vsSingleStarMedals: number; + + /** LoadCarResponse vsPlainMedals */ + vsPlainMedals: number; + + /** LoadCarResponse rgPlayCount */ + rgPlayCount: number; + + /** LoadCarResponse rgWinCount */ + rgWinCount: number; + + /** LoadCarResponse rgTrophy */ + rgTrophy: number; + + /** LoadCarResponse rgPreviousVersionPlayCount */ + rgPreviousVersionPlayCount: number; + + /** LoadCarResponse rgScore */ + rgScore: number; + + /** LoadCarResponse rgRegionMapScore */ + rgRegionMapScore?: (number[]|null); + + /** LoadCarResponse rgRegions */ + rgRegions?: (number[]|null); + + /** LoadCarResponse rgStamp */ + rgStamp: number; + + /** LoadCarResponse rgAcquireAllCrowns */ + rgAcquireAllCrowns: boolean; + + /** LoadCarResponse dressupLevel */ + dressupLevel: number; + + /** LoadCarResponse dressupPoint */ + dressupPoint: number; + + /** LoadCarResponse stPlayCount */ + stPlayCount: number; + + /** LoadCarResponse stClearBits */ + stClearBits: number; + + /** LoadCarResponse stClearDivCount */ + stClearDivCount: number; + + /** LoadCarResponse stClearCount */ + stClearCount: number; + + /** LoadCarResponse stLoseBits */ + stLoseBits: (number|Long); + + /** LoadCarResponse stConsecutiveWins */ + stConsecutiveWins: number; + + /** LoadCarResponse stConsecutiveWinsMax */ + stConsecutiveWinsMax: number; + + /** LoadCarResponse stCompleted_100Episodes */ + stCompleted_100Episodes: boolean; + + /** LoadCarResponse challenger */ + challenger?: (wm.protobuf.IChallengerCar|null); + + /** LoadCarResponse challengerReturnCount */ + challengerReturnCount?: (number|null); + + /** LoadCarResponse numOfChallengers */ + numOfChallengers?: (number|null); + + /** LoadCarResponse opponentGhost */ + opponentGhost?: (wm.protobuf.IGhostCar|null); + + /** LoadCarResponse opponentTrailId */ + opponentTrailId?: (number|Long|null); + + /** LoadCarResponse opponentCompetitionId */ + opponentCompetitionId?: (number|null); + + /** LoadCarResponse competitionParameter */ + competitionParameter?: (wm.protobuf.IGhostCompetitionParameter|null); + + /** LoadCarResponse specialTitles */ + specialTitles?: (string[]|null); + + /** LoadCarResponse earnedTitles */ + earnedTitles?: (string[]|null); + + /** LoadCarResponse ownedItems */ + ownedItems?: (wm.protobuf.ICarItem[]|null); + + /** LoadCarResponse auraMotifAutoChange */ + auraMotifAutoChange: boolean; + + /** LoadCarResponse screenshotCount */ + screenshotCount: number; + + /** LoadCarResponse announceEventModePrize */ + announceEventModePrize?: (boolean|null); + + /** LoadCarResponse transferred */ + transferred: boolean; + + /** LoadCarResponse driveLastPlayedAt */ + driveLastPlayedAt?: (number|null); + + /** LoadCarResponse insurance */ + insurance?: (wm.protobuf.LoadCarResponse.IStoryInsurance|null); + } + + /** Represents a LoadCarResponse. */ + class LoadCarResponse implements ILoadCarResponse { + + /** + * Constructs a new LoadCarResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadCarResponse); + + /** LoadCarResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadCarResponse car. */ + public car: wm.protobuf.ICar; + + /** LoadCarResponse tuningPoint. */ + public tuningPoint: number; + + /** LoadCarResponse odometer. */ + public odometer: number; + + /** LoadCarResponse playCount. */ + public playCount: number; + + /** LoadCarResponse earnedCustomColor. */ + public earnedCustomColor: boolean; + + /** LoadCarResponse setting. */ + public setting: wm.protobuf.ICarSetting; + + /** LoadCarResponse vsPlayCount. */ + public vsPlayCount: number; + + /** LoadCarResponse vsBurstCount. */ + public vsBurstCount: number; + + /** LoadCarResponse vsStarCount. */ + public vsStarCount: number; + + /** LoadCarResponse vsStarCountMax. */ + public vsStarCountMax: number; + + /** LoadCarResponse vsCoolOrWild. */ + public vsCoolOrWild: number; + + /** LoadCarResponse vsSmoothOrRough. */ + public vsSmoothOrRough: number; + + /** LoadCarResponse vsTripleStarMedals. */ + public vsTripleStarMedals: number; + + /** LoadCarResponse vsDoubleStarMedals. */ + public vsDoubleStarMedals: number; + + /** LoadCarResponse vsSingleStarMedals. */ + public vsSingleStarMedals: number; + + /** LoadCarResponse vsPlainMedals. */ + public vsPlainMedals: number; + + /** LoadCarResponse rgPlayCount. */ + public rgPlayCount: number; + + /** LoadCarResponse rgWinCount. */ + public rgWinCount: number; + + /** LoadCarResponse rgTrophy. */ + public rgTrophy: number; + + /** LoadCarResponse rgPreviousVersionPlayCount. */ + public rgPreviousVersionPlayCount: number; + + /** LoadCarResponse rgScore. */ + public rgScore: number; + + /** LoadCarResponse rgRegionMapScore. */ + public rgRegionMapScore: number[]; + + /** LoadCarResponse rgRegions. */ + public rgRegions: number[]; + + /** LoadCarResponse rgStamp. */ + public rgStamp: number; + + /** LoadCarResponse rgAcquireAllCrowns. */ + public rgAcquireAllCrowns: boolean; + + /** LoadCarResponse dressupLevel. */ + public dressupLevel: number; + + /** LoadCarResponse dressupPoint. */ + public dressupPoint: number; + + /** LoadCarResponse stPlayCount. */ + public stPlayCount: number; + + /** LoadCarResponse stClearBits. */ + public stClearBits: number; + + /** LoadCarResponse stClearDivCount. */ + public stClearDivCount: number; + + /** LoadCarResponse stClearCount. */ + public stClearCount: number; + + /** LoadCarResponse stLoseBits. */ + public stLoseBits: (number|Long); + + /** LoadCarResponse stConsecutiveWins. */ + public stConsecutiveWins: number; + + /** LoadCarResponse stConsecutiveWinsMax. */ + public stConsecutiveWinsMax: number; + + /** LoadCarResponse stCompleted_100Episodes. */ + public stCompleted_100Episodes: boolean; + + /** LoadCarResponse challenger. */ + public challenger?: (wm.protobuf.IChallengerCar|null); + + /** LoadCarResponse challengerReturnCount. */ + public challengerReturnCount: number; + + /** LoadCarResponse numOfChallengers. */ + public numOfChallengers: number; + + /** LoadCarResponse opponentGhost. */ + public opponentGhost?: (wm.protobuf.IGhostCar|null); + + /** LoadCarResponse opponentTrailId. */ + public opponentTrailId: (number|Long); + + /** LoadCarResponse opponentCompetitionId. */ + public opponentCompetitionId: number; + + /** LoadCarResponse competitionParameter. */ + public competitionParameter?: (wm.protobuf.IGhostCompetitionParameter|null); + + /** LoadCarResponse specialTitles. */ + public specialTitles: string[]; + + /** LoadCarResponse earnedTitles. */ + public earnedTitles: string[]; + + /** LoadCarResponse ownedItems. */ + public ownedItems: wm.protobuf.ICarItem[]; + + /** LoadCarResponse auraMotifAutoChange. */ + public auraMotifAutoChange: boolean; + + /** LoadCarResponse screenshotCount. */ + public screenshotCount: number; + + /** LoadCarResponse announceEventModePrize. */ + public announceEventModePrize: boolean; + + /** LoadCarResponse transferred. */ + public transferred: boolean; + + /** LoadCarResponse driveLastPlayedAt. */ + public driveLastPlayedAt: number; + + /** LoadCarResponse insurance. */ + public insurance?: (wm.protobuf.LoadCarResponse.IStoryInsurance|null); + + /** + * Creates a new LoadCarResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadCarResponse instance + */ + public static create(properties?: wm.protobuf.ILoadCarResponse): wm.protobuf.LoadCarResponse; + + /** + * Encodes the specified LoadCarResponse message. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @param message LoadCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @param message LoadCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadCarResponse; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadCarResponse; + + /** + * Verifies a LoadCarResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadCarResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadCarResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadCarResponse; + + /** + * Creates a plain object from a LoadCarResponse message. Also converts values to other types if specified. + * @param message LoadCarResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadCarResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadCarResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadCarResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadCarResponse { + + /** Properties of a StoryInsurance. */ + interface IStoryInsurance { + + /** StoryInsurance numOfRemains */ + numOfRemains: number; + } + + /** Represents a StoryInsurance. */ + class StoryInsurance implements IStoryInsurance { + + /** + * Constructs a new StoryInsurance. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadCarResponse.IStoryInsurance); + + /** StoryInsurance numOfRemains. */ + public numOfRemains: number; + + /** + * Creates a new StoryInsurance instance using the specified properties. + * @param [properties] Properties to set + * @returns StoryInsurance instance + */ + public static create(properties?: wm.protobuf.LoadCarResponse.IStoryInsurance): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Encodes the specified StoryInsurance message. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @param message StoryInsurance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadCarResponse.IStoryInsurance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoryInsurance message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @param message StoryInsurance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadCarResponse.IStoryInsurance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Verifies a StoryInsurance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StoryInsurance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoryInsurance + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Creates a plain object from a StoryInsurance message. Also converts values to other types if specified. + * @param message StoryInsurance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadCarResponse.StoryInsurance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoryInsurance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoryInsurance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateCarRequest. */ + interface ICreateCarRequest { + + /** CreateCarRequest userId */ + userId?: (number|null); + + /** CreateCarRequest banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateCarRequest cardChipId */ + cardChipId?: (string|null); + + /** CreateCarRequest accessCode */ + accessCode?: (string|null); + + /** CreateCarRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** CreateCarRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** CreateCarRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** CreateCarRequest car */ + car: wm.protobuf.ICar; + + /** CreateCarRequest transmission */ + transmission: boolean; + + /** CreateCarRequest timestamp */ + timestamp: number; + + /** CreateCarRequest userItemId */ + userItemId?: (number|null); + + /** CreateCarRequest deletedCarId */ + deletedCarId?: (number|null); + } + + /** Represents a CreateCarRequest. */ + class CreateCarRequest implements ICreateCarRequest { + + /** + * Constructs a new CreateCarRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateCarRequest); + + /** CreateCarRequest userId. */ + public userId: number; + + /** CreateCarRequest banapassportAmId. */ + public banapassportAmId: number; + + /** CreateCarRequest cardChipId. */ + public cardChipId: string; + + /** CreateCarRequest accessCode. */ + public accessCode: string; + + /** CreateCarRequest cardTypeCode. */ + public cardTypeCode: number; + + /** CreateCarRequest cardRegionCode. */ + public cardRegionCode: number; + + /** CreateCarRequest device. */ + public device: wm.protobuf.DeviceType; + + /** CreateCarRequest car. */ + public car: wm.protobuf.ICar; + + /** CreateCarRequest transmission. */ + public transmission: boolean; + + /** CreateCarRequest timestamp. */ + public timestamp: number; + + /** CreateCarRequest userItemId. */ + public userItemId: number; + + /** CreateCarRequest deletedCarId. */ + public deletedCarId: number; + + /** + * Creates a new CreateCarRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCarRequest instance + */ + public static create(properties?: wm.protobuf.ICreateCarRequest): wm.protobuf.CreateCarRequest; + + /** + * Encodes the specified CreateCarRequest message. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @param message CreateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @param message CreateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateCarRequest; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateCarRequest; + + /** + * Verifies a CreateCarRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCarRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCarRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateCarRequest; + + /** + * Creates a plain object from a CreateCarRequest message. Also converts values to other types if specified. + * @param message CreateCarRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateCarRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCarRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCarRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateCarResponse. */ + interface ICreateCarResponse { + + /** CreateCarResponse error */ + error: wm.protobuf.ErrorCode; + + /** CreateCarResponse accessCode */ + accessCode?: (string|null); + + /** CreateCarResponse banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateCarResponse mbid */ + mbid?: (number|null); + + /** CreateCarResponse userId */ + userId: number; + + /** CreateCarResponse carId */ + carId: number; + + /** CreateCarResponse stClearBits */ + stClearBits?: (number|null); + + /** CreateCarResponse stClearDivCount */ + stClearDivCount?: (number|null); + + /** CreateCarResponse stClearCount */ + stClearCount?: (number|null); + + /** CreateCarResponse stLoseBits */ + stLoseBits?: (number|Long|null); + + /** CreateCarResponse stConsecutiveWins */ + stConsecutiveWins?: (number|null); + + /** CreateCarResponse stConsecutiveWinsMax */ + stConsecutiveWinsMax?: (number|null); + + /** CreateCarResponse fullTunedCarCouponUnreceivableAt */ + fullTunedCarCouponUnreceivableAt?: (number|null); + } + + /** Represents a CreateCarResponse. */ + class CreateCarResponse implements ICreateCarResponse { + + /** + * Constructs a new CreateCarResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateCarResponse); + + /** CreateCarResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** CreateCarResponse accessCode. */ + public accessCode: string; + + /** CreateCarResponse banapassportAmId. */ + public banapassportAmId: number; + + /** CreateCarResponse mbid. */ + public mbid: number; + + /** CreateCarResponse userId. */ + public userId: number; + + /** CreateCarResponse carId. */ + public carId: number; + + /** CreateCarResponse stClearBits. */ + public stClearBits: number; + + /** CreateCarResponse stClearDivCount. */ + public stClearDivCount: number; + + /** CreateCarResponse stClearCount. */ + public stClearCount: number; + + /** CreateCarResponse stLoseBits. */ + public stLoseBits: (number|Long); + + /** CreateCarResponse stConsecutiveWins. */ + public stConsecutiveWins: number; + + /** CreateCarResponse stConsecutiveWinsMax. */ + public stConsecutiveWinsMax: number; + + /** CreateCarResponse fullTunedCarCouponUnreceivableAt. */ + public fullTunedCarCouponUnreceivableAt: number; + + /** + * Creates a new CreateCarResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCarResponse instance + */ + public static create(properties?: wm.protobuf.ICreateCarResponse): wm.protobuf.CreateCarResponse; + + /** + * Encodes the specified CreateCarResponse message. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @param message CreateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @param message CreateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateCarResponse; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateCarResponse; + + /** + * Verifies a CreateCarResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCarResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCarResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateCarResponse; + + /** + * Creates a plain object from a CreateCarResponse message. Also converts values to other types if specified. + * @param message CreateCarResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateCarResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCarResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCarResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGameHistoryRequest. */ + interface ILoadGameHistoryRequest { + + /** LoadGameHistoryRequest carId */ + carId: number; + } + + /** Represents a LoadGameHistoryRequest. */ + class LoadGameHistoryRequest implements ILoadGameHistoryRequest { + + /** + * Constructs a new LoadGameHistoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGameHistoryRequest); + + /** LoadGameHistoryRequest carId. */ + public carId: number; + + /** + * Creates a new LoadGameHistoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGameHistoryRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGameHistoryRequest): wm.protobuf.LoadGameHistoryRequest; + + /** + * Encodes the specified LoadGameHistoryRequest message. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @param message LoadGameHistoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGameHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGameHistoryRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @param message LoadGameHistoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGameHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryRequest; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryRequest; + + /** + * Verifies a LoadGameHistoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGameHistoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGameHistoryRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryRequest; + + /** + * Creates a plain object from a LoadGameHistoryRequest message. Also converts values to other types if specified. + * @param message LoadGameHistoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGameHistoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGameHistoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGameHistoryResponse. */ + interface ILoadGameHistoryResponse { + + /** LoadGameHistoryResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGameHistoryResponse taRecords */ + taRecords?: (wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord[]|null); + + /** LoadGameHistoryResponse taRankingUpdatedAt */ + taRankingUpdatedAt: number; + + /** LoadGameHistoryResponse ghostHistory */ + ghostHistory?: (wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord[]|null); + + /** LoadGameHistoryResponse ghostBattleCount */ + ghostBattleCount: number; + + /** LoadGameHistoryResponse ghostBattleWinCount */ + ghostBattleWinCount: number; + + /** LoadGameHistoryResponse stampSheetCount */ + stampSheetCount: number; + + /** LoadGameHistoryResponse stampSheet */ + stampSheet?: (number[]|null); + } + + /** Represents a LoadGameHistoryResponse. */ + class LoadGameHistoryResponse implements ILoadGameHistoryResponse { + + /** + * Constructs a new LoadGameHistoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGameHistoryResponse); + + /** LoadGameHistoryResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGameHistoryResponse taRecords. */ + public taRecords: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord[]; + + /** LoadGameHistoryResponse taRankingUpdatedAt. */ + public taRankingUpdatedAt: number; + + /** LoadGameHistoryResponse ghostHistory. */ + public ghostHistory: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord[]; + + /** LoadGameHistoryResponse ghostBattleCount. */ + public ghostBattleCount: number; + + /** LoadGameHistoryResponse ghostBattleWinCount. */ + public ghostBattleWinCount: number; + + /** LoadGameHistoryResponse stampSheetCount. */ + public stampSheetCount: number; + + /** LoadGameHistoryResponse stampSheet. */ + public stampSheet: number[]; + + /** + * Creates a new LoadGameHistoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGameHistoryResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGameHistoryResponse): wm.protobuf.LoadGameHistoryResponse; + + /** + * Encodes the specified LoadGameHistoryResponse message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @param message LoadGameHistoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGameHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGameHistoryResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @param message LoadGameHistoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGameHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse; + + /** + * Verifies a LoadGameHistoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGameHistoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGameHistoryResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse; + + /** + * Creates a plain object from a LoadGameHistoryResponse message. Also converts values to other types if specified. + * @param message LoadGameHistoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGameHistoryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGameHistoryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGameHistoryResponse { + + /** Properties of a TimeAttackRecord. */ + interface ITimeAttackRecord { + + /** TimeAttackRecord course */ + course: number; + + /** TimeAttackRecord time */ + time?: (number|null); + + /** TimeAttackRecord tunePower */ + tunePower?: (number|null); + + /** TimeAttackRecord tuneHandling */ + tuneHandling?: (number|null); + + /** TimeAttackRecord wholeRank */ + wholeRank?: (number|null); + + /** TimeAttackRecord wholeParticipants */ + wholeParticipants: number; + + /** TimeAttackRecord modelRank */ + modelRank?: (number|null); + + /** TimeAttackRecord modelParticipants */ + modelParticipants: number; + } + + /** Represents a TimeAttackRecord. */ + class TimeAttackRecord implements ITimeAttackRecord { + + /** + * Constructs a new TimeAttackRecord. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord); + + /** TimeAttackRecord course. */ + public course: number; + + /** TimeAttackRecord time. */ + public time: number; + + /** TimeAttackRecord tunePower. */ + public tunePower: number; + + /** TimeAttackRecord tuneHandling. */ + public tuneHandling: number; + + /** TimeAttackRecord wholeRank. */ + public wholeRank: number; + + /** TimeAttackRecord wholeParticipants. */ + public wholeParticipants: number; + + /** TimeAttackRecord modelRank. */ + public modelRank: number; + + /** TimeAttackRecord modelParticipants. */ + public modelParticipants: number; + + /** + * Creates a new TimeAttackRecord instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeAttackRecord instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Encodes the specified TimeAttackRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @param message TimeAttackRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeAttackRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @param message TimeAttackRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Verifies a TimeAttackRecord message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeAttackRecord message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeAttackRecord + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Creates a plain object from a TimeAttackRecord message. Also converts values to other types if specified. + * @param message TimeAttackRecord + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeAttackRecord to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeAttackRecord + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostBattleRecord. */ + interface IGhostBattleRecord { + + /** GhostBattleRecord carSetting */ + carSetting: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting; + + /** GhostBattleRecord opponent */ + opponent: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar; + + /** GhostBattleRecord mobs */ + mobs?: (wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar[]|null); + + /** GhostBattleRecord area */ + area: number; + + /** GhostBattleRecord playedAt */ + playedAt: number; + + /** GhostBattleRecord playedShopName */ + playedShopName: string; + } + + /** Represents a GhostBattleRecord. */ + class GhostBattleRecord implements IGhostBattleRecord { + + /** + * Constructs a new GhostBattleRecord. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord); + + /** GhostBattleRecord carSetting. */ + public carSetting: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting; + + /** GhostBattleRecord opponent. */ + public opponent: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar; + + /** GhostBattleRecord mobs. */ + public mobs: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar[]; + + /** GhostBattleRecord area. */ + public area: number; + + /** GhostBattleRecord playedAt. */ + public playedAt: number; + + /** GhostBattleRecord playedShopName. */ + public playedShopName: string; + + /** + * Creates a new GhostBattleRecord instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleRecord instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Encodes the specified GhostBattleRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @param message GhostBattleRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @param message GhostBattleRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Verifies a GhostBattleRecord message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleRecord message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleRecord + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Creates a plain object from a GhostBattleRecord message. Also converts values to other types if specified. + * @param message GhostBattleRecord + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleRecord to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleRecord + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GhostBattleRecord { + + /** Properties of a GhostCarSetting. */ + interface IGhostCarSetting { + + /** GhostCarSetting tunePower */ + tunePower: number; + + /** GhostCarSetting tuneHandling */ + tuneHandling: number; + } + + /** Represents a GhostCarSetting. */ + class GhostCarSetting implements IGhostCarSetting { + + /** + * Constructs a new GhostCarSetting. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting); + + /** GhostCarSetting tunePower. */ + public tunePower: number; + + /** GhostCarSetting tuneHandling. */ + public tuneHandling: number; + + /** + * Creates a new GhostCarSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCarSetting instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Encodes the specified GhostCarSetting message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @param message GhostCarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCarSetting message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @param message GhostCarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Verifies a GhostCarSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCarSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCarSetting + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Creates a plain object from a GhostCarSetting message. Also converts values to other types if specified. + * @param message GhostCarSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCarSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCarSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostBattleRecordCar. */ + interface IGhostBattleRecordCar { + + /** GhostBattleRecordCar car */ + car: wm.protobuf.ICar; + + /** GhostBattleRecordCar result */ + result: number; + } + + /** Represents a GhostBattleRecordCar. */ + class GhostBattleRecordCar implements IGhostBattleRecordCar { + + /** + * Constructs a new GhostBattleRecordCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar); + + /** GhostBattleRecordCar car. */ + public car: wm.protobuf.ICar; + + /** GhostBattleRecordCar result. */ + public result: number; + + /** + * Creates a new GhostBattleRecordCar instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleRecordCar instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Encodes the specified GhostBattleRecordCar message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @param message GhostBattleRecordCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleRecordCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @param message GhostBattleRecordCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Verifies a GhostBattleRecordCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleRecordCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleRecordCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Creates a plain object from a GhostBattleRecordCar message. Also converts values to other types if specified. + * @param message GhostBattleRecordCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleRecordCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleRecordCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of an UpdateCarRequest. */ + interface IUpdateCarRequest { + + /** UpdateCarRequest carId */ + carId: number; + + /** UpdateCarRequest car */ + car?: (wm.protobuf.ICar|null); + + /** UpdateCarRequest earnedItems */ + earnedItems?: (wm.protobuf.ICarItem[]|null); + + /** UpdateCarRequest setting */ + setting?: (wm.protobuf.ICarSetting|null); + + /** UpdateCarRequest toBeDeleted */ + toBeDeleted?: (boolean|null); + + /** UpdateCarRequest auraMotifAutoChange */ + auraMotifAutoChange?: (boolean|null); + + /** UpdateCarRequest rgStamp */ + rgStamp?: (number|null); + + /** UpdateCarRequest timestamp */ + timestamp: number; + } + + /** Represents an UpdateCarRequest. */ + class UpdateCarRequest implements IUpdateCarRequest { + + /** + * Constructs a new UpdateCarRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateCarRequest); + + /** UpdateCarRequest carId. */ + public carId: number; + + /** UpdateCarRequest car. */ + public car?: (wm.protobuf.ICar|null); + + /** UpdateCarRequest earnedItems. */ + public earnedItems: wm.protobuf.ICarItem[]; + + /** UpdateCarRequest setting. */ + public setting?: (wm.protobuf.ICarSetting|null); + + /** UpdateCarRequest toBeDeleted. */ + public toBeDeleted: boolean; + + /** UpdateCarRequest auraMotifAutoChange. */ + public auraMotifAutoChange: boolean; + + /** UpdateCarRequest rgStamp. */ + public rgStamp: number; + + /** UpdateCarRequest timestamp. */ + public timestamp: number; + + /** + * Creates a new UpdateCarRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCarRequest instance + */ + public static create(properties?: wm.protobuf.IUpdateCarRequest): wm.protobuf.UpdateCarRequest; + + /** + * Encodes the specified UpdateCarRequest message. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @param message UpdateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @param message UpdateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateCarRequest; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateCarRequest; + + /** + * Verifies an UpdateCarRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateCarRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCarRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateCarRequest; + + /** + * Creates a plain object from an UpdateCarRequest message. Also converts values to other types if specified. + * @param message UpdateCarRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateCarRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCarRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCarRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateCarResponse. */ + interface IUpdateCarResponse { + + /** UpdateCarResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents an UpdateCarResponse. */ + class UpdateCarResponse implements IUpdateCarResponse { + + /** + * Constructs a new UpdateCarResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateCarResponse); + + /** UpdateCarResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new UpdateCarResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCarResponse instance + */ + public static create(properties?: wm.protobuf.IUpdateCarResponse): wm.protobuf.UpdateCarResponse; + + /** + * Encodes the specified UpdateCarResponse message. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @param message UpdateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @param message UpdateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateCarResponse; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateCarResponse; + + /** + * Verifies an UpdateCarResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateCarResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCarResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateCarResponse; + + /** + * Creates a plain object from an UpdateCarResponse message. Also converts values to other types if specified. + * @param message UpdateCarResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateCarResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCarResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCarResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveGameResultRequest. */ + interface ISaveGameResultRequest { + + /** SaveGameResultRequest carId */ + carId: number; + + /** SaveGameResultRequest gameMode */ + gameMode: wm.protobuf.GameMode; + + /** SaveGameResultRequest playedAt */ + playedAt: number; + + /** SaveGameResultRequest playCount */ + playCount: number; + + /** SaveGameResultRequest retired */ + retired: boolean; + + /** SaveGameResultRequest timeup */ + timeup: boolean; + + /** SaveGameResultRequest car */ + car?: (wm.protobuf.ICar|null); + + /** SaveGameResultRequest setting */ + setting?: (wm.protobuf.ICarSetting|null); + + /** SaveGameResultRequest odometer */ + odometer?: (number|null); + + /** SaveGameResultRequest earnedCustomColor */ + earnedCustomColor?: (boolean|null); + + /** SaveGameResultRequest confirmedTutorials */ + confirmedTutorials?: (wm.protobuf.TutorialType[]|null); + + /** SaveGameResultRequest earnedItems */ + earnedItems?: (wm.protobuf.ICarItem[]|null); + + /** SaveGameResultRequest earnedUserItems */ + earnedUserItems?: (wm.protobuf.IUserItem[]|null); + + /** SaveGameResultRequest preservedTitles */ + preservedTitles?: (string[]|null); + + /** SaveGameResultRequest neighborCars */ + neighborCars?: (number[]|null); + + /** SaveGameResultRequest stResult */ + stResult?: (wm.protobuf.SaveGameResultRequest.IStoryResult|null); + + /** SaveGameResultRequest taResult */ + taResult?: (wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null); + + /** SaveGameResultRequest vsResult */ + vsResult?: (wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null); + + /** SaveGameResultRequest rgResult */ + rgResult?: (wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null); + } + + /** Represents a SaveGameResultRequest. */ + class SaveGameResultRequest implements ISaveGameResultRequest { + + /** + * Constructs a new SaveGameResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveGameResultRequest); + + /** SaveGameResultRequest carId. */ + public carId: number; + + /** SaveGameResultRequest gameMode. */ + public gameMode: wm.protobuf.GameMode; + + /** SaveGameResultRequest playedAt. */ + public playedAt: number; + + /** SaveGameResultRequest playCount. */ + public playCount: number; + + /** SaveGameResultRequest retired. */ + public retired: boolean; + + /** SaveGameResultRequest timeup. */ + public timeup: boolean; + + /** SaveGameResultRequest car. */ + public car?: (wm.protobuf.ICar|null); + + /** SaveGameResultRequest setting. */ + public setting?: (wm.protobuf.ICarSetting|null); + + /** SaveGameResultRequest odometer. */ + public odometer: number; + + /** SaveGameResultRequest earnedCustomColor. */ + public earnedCustomColor: boolean; + + /** SaveGameResultRequest confirmedTutorials. */ + public confirmedTutorials: wm.protobuf.TutorialType[]; + + /** SaveGameResultRequest earnedItems. */ + public earnedItems: wm.protobuf.ICarItem[]; + + /** SaveGameResultRequest earnedUserItems. */ + public earnedUserItems: wm.protobuf.IUserItem[]; + + /** SaveGameResultRequest preservedTitles. */ + public preservedTitles: string[]; + + /** SaveGameResultRequest neighborCars. */ + public neighborCars: number[]; + + /** SaveGameResultRequest stResult. */ + public stResult?: (wm.protobuf.SaveGameResultRequest.IStoryResult|null); + + /** SaveGameResultRequest taResult. */ + public taResult?: (wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null); + + /** SaveGameResultRequest vsResult. */ + public vsResult?: (wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null); + + /** SaveGameResultRequest rgResult. */ + public rgResult?: (wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null); + + /** + * Creates a new SaveGameResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveGameResultRequest instance + */ + public static create(properties?: wm.protobuf.ISaveGameResultRequest): wm.protobuf.SaveGameResultRequest; + + /** + * Encodes the specified SaveGameResultRequest message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @param message SaveGameResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveGameResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveGameResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @param message SaveGameResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveGameResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest; + + /** + * Verifies a SaveGameResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveGameResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveGameResultRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest; + + /** + * Creates a plain object from a SaveGameResultRequest message. Also converts values to other types if specified. + * @param message SaveGameResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveGameResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveGameResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SaveGameResultRequest { + + /** Properties of a StoryResult. */ + interface IStoryResult { + + /** StoryResult stPlayCount */ + stPlayCount: number; + + /** StoryResult stPlayedStory */ + stPlayedStory: number; + + /** StoryResult tuningPoint */ + tuningPoint?: (number|null); + + /** StoryResult stClearBits */ + stClearBits?: (number|null); + + /** StoryResult stClearDivCount */ + stClearDivCount?: (number|null); + + /** StoryResult stClearCount */ + stClearCount?: (number|null); + + /** StoryResult stLoseBits */ + stLoseBits?: (number|Long|null); + + /** StoryResult stConsecutiveWins */ + stConsecutiveWins?: (number|null); + + /** StoryResult stCompleted_100Episodes */ + stCompleted_100Episodes?: (boolean|null); + + /** StoryResult isInsuranceUsed */ + isInsuranceUsed?: (boolean|null); + } + + /** Represents a StoryResult. */ + class StoryResult implements IStoryResult { + + /** + * Constructs a new StoryResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.IStoryResult); + + /** StoryResult stPlayCount. */ + public stPlayCount: number; + + /** StoryResult stPlayedStory. */ + public stPlayedStory: number; + + /** StoryResult tuningPoint. */ + public tuningPoint: number; + + /** StoryResult stClearBits. */ + public stClearBits: number; + + /** StoryResult stClearDivCount. */ + public stClearDivCount: number; + + /** StoryResult stClearCount. */ + public stClearCount: number; + + /** StoryResult stLoseBits. */ + public stLoseBits: (number|Long); + + /** StoryResult stConsecutiveWins. */ + public stConsecutiveWins: number; + + /** StoryResult stCompleted_100Episodes. */ + public stCompleted_100Episodes: boolean; + + /** StoryResult isInsuranceUsed. */ + public isInsuranceUsed: boolean; + + /** + * Creates a new StoryResult instance using the specified properties. + * @param [properties] Properties to set + * @returns StoryResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.IStoryResult): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Encodes the specified StoryResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @param message StoryResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.IStoryResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoryResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @param message StoryResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.IStoryResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoryResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Decodes a StoryResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Verifies a StoryResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StoryResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoryResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Creates a plain object from a StoryResult message. Also converts values to other types if specified. + * @param message StoryResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.StoryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoryResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoryResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeAttackResult. */ + interface ITimeAttackResult { + + /** TimeAttackResult time */ + time: number; + + /** TimeAttackResult course */ + course: number; + + /** TimeAttackResult isMorning */ + isMorning: boolean; + + /** TimeAttackResult section_1Time */ + section_1Time: number; + + /** TimeAttackResult section_2Time */ + section_2Time: number; + + /** TimeAttackResult section_3Time */ + section_3Time: number; + + /** TimeAttackResult section_4Time */ + section_4Time: number; + + /** TimeAttackResult section_5Time */ + section_5Time?: (number|null); + + /** TimeAttackResult section_6Time */ + section_6Time?: (number|null); + + /** TimeAttackResult section_7Time */ + section_7Time?: (number|null); + + /** TimeAttackResult wholeRank */ + wholeRank?: (number|null); + + /** TimeAttackResult modelRank */ + modelRank?: (number|null); + } + + /** Represents a TimeAttackResult. */ + class TimeAttackResult implements ITimeAttackResult { + + /** + * Constructs a new TimeAttackResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.ITimeAttackResult); + + /** TimeAttackResult time. */ + public time: number; + + /** TimeAttackResult course. */ + public course: number; + + /** TimeAttackResult isMorning. */ + public isMorning: boolean; + + /** TimeAttackResult section_1Time. */ + public section_1Time: number; + + /** TimeAttackResult section_2Time. */ + public section_2Time: number; + + /** TimeAttackResult section_3Time. */ + public section_3Time: number; + + /** TimeAttackResult section_4Time. */ + public section_4Time: number; + + /** TimeAttackResult section_5Time. */ + public section_5Time: number; + + /** TimeAttackResult section_6Time. */ + public section_6Time: number; + + /** TimeAttackResult section_7Time. */ + public section_7Time: number; + + /** TimeAttackResult wholeRank. */ + public wholeRank: number; + + /** TimeAttackResult modelRank. */ + public modelRank: number; + + /** + * Creates a new TimeAttackResult instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeAttackResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.ITimeAttackResult): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Encodes the specified TimeAttackResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @param message TimeAttackResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.ITimeAttackResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeAttackResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @param message TimeAttackResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.ITimeAttackResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Verifies a TimeAttackResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeAttackResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeAttackResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Creates a plain object from a TimeAttackResult message. Also converts values to other types if specified. + * @param message TimeAttackResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.TimeAttackResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeAttackResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeAttackResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VersusBattleResult. */ + interface IVersusBattleResult { + + /** VersusBattleResult result */ + result: number; + + /** VersusBattleResult survived */ + survived: boolean; + + /** VersusBattleResult opponentCarId */ + opponentCarId?: (number[]|null); + + /** VersusBattleResult numOfPlayers */ + numOfPlayers: number; + + /** VersusBattleResult area */ + area: number; + + /** VersusBattleResult isMorning */ + isMorning: boolean; + + /** VersusBattleResult vsPlayCount */ + vsPlayCount: number; + + /** VersusBattleResult vsBurstCount */ + vsBurstCount?: (number|null); + + /** VersusBattleResult vsStarCount */ + vsStarCount?: (number|null); + + /** VersusBattleResult vsCoolOrWild */ + vsCoolOrWild?: (number|null); + + /** VersusBattleResult vsSmoothOrRough */ + vsSmoothOrRough?: (number|null); + + /** VersusBattleResult vsTripleStarMedals */ + vsTripleStarMedals?: (number|null); + + /** VersusBattleResult vsDoubleStarMedals */ + vsDoubleStarMedals?: (number|null); + + /** VersusBattleResult vsSingleStarMedals */ + vsSingleStarMedals?: (number|null); + + /** VersusBattleResult vsPlainMedals */ + vsPlainMedals?: (number|null); + } + + /** Represents a VersusBattleResult. */ + class VersusBattleResult implements IVersusBattleResult { + + /** + * Constructs a new VersusBattleResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.IVersusBattleResult); + + /** VersusBattleResult result. */ + public result: number; + + /** VersusBattleResult survived. */ + public survived: boolean; + + /** VersusBattleResult opponentCarId. */ + public opponentCarId: number[]; + + /** VersusBattleResult numOfPlayers. */ + public numOfPlayers: number; + + /** VersusBattleResult area. */ + public area: number; + + /** VersusBattleResult isMorning. */ + public isMorning: boolean; + + /** VersusBattleResult vsPlayCount. */ + public vsPlayCount: number; + + /** VersusBattleResult vsBurstCount. */ + public vsBurstCount: number; + + /** VersusBattleResult vsStarCount. */ + public vsStarCount: number; + + /** VersusBattleResult vsCoolOrWild. */ + public vsCoolOrWild: number; + + /** VersusBattleResult vsSmoothOrRough. */ + public vsSmoothOrRough: number; + + /** VersusBattleResult vsTripleStarMedals. */ + public vsTripleStarMedals: number; + + /** VersusBattleResult vsDoubleStarMedals. */ + public vsDoubleStarMedals: number; + + /** VersusBattleResult vsSingleStarMedals. */ + public vsSingleStarMedals: number; + + /** VersusBattleResult vsPlainMedals. */ + public vsPlainMedals: number; + + /** + * Creates a new VersusBattleResult instance using the specified properties. + * @param [properties] Properties to set + * @returns VersusBattleResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.IVersusBattleResult): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Encodes the specified VersusBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @param message VersusBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.IVersusBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VersusBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @param message VersusBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.IVersusBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Verifies a VersusBattleResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VersusBattleResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersusBattleResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Creates a plain object from a VersusBattleResult message. Also converts values to other types if specified. + * @param message VersusBattleResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.VersusBattleResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VersusBattleResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VersusBattleResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostBattleResult. */ + interface IGhostBattleResult { + + /** GhostBattleResult opponents */ + opponents?: (wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent[]|null); + + /** GhostBattleResult path */ + path: number; + + /** GhostBattleResult isMorning */ + isMorning: boolean; + + /** GhostBattleResult selectionMethod */ + selectionMethod: wm.protobuf.GhostSelectionMethod; + + /** GhostBattleResult stampSheetCount */ + stampSheetCount?: (number|null); + + /** GhostBattleResult stampSheet */ + stampSheet?: (number[]|null); + + /** GhostBattleResult rgStamp */ + rgStamp?: (number|null); + + /** GhostBattleResult confirmedTransferredStampTargetCarIds */ + confirmedTransferredStampTargetCarIds?: (number[]|null); + + /** GhostBattleResult rgPlayCount */ + rgPlayCount: number; + + /** GhostBattleResult dressupLevel */ + dressupLevel?: (number|null); + + /** GhostBattleResult dressupPoint */ + dressupPoint?: (number|null); + + /** GhostBattleResult rgRegionMapScore */ + rgRegionMapScore?: (number[]|null); + + /** GhostBattleResult competitionId */ + competitionId?: (number|null); + + /** GhostBattleResult periodId */ + periodId?: (number|null); + + /** GhostBattleResult brakingPoint */ + brakingPoint?: (number|null); + + /** GhostBattleResult acquireCrown */ + acquireCrown?: (boolean|null); + + /** GhostBattleResult acquireAllCrowns */ + acquireAllCrowns?: (boolean|null); + } + + /** Represents a GhostBattleResult. */ + class GhostBattleResult implements IGhostBattleResult { + + /** + * Constructs a new GhostBattleResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.IGhostBattleResult); + + /** GhostBattleResult opponents. */ + public opponents: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent[]; + + /** GhostBattleResult path. */ + public path: number; + + /** GhostBattleResult isMorning. */ + public isMorning: boolean; + + /** GhostBattleResult selectionMethod. */ + public selectionMethod: wm.protobuf.GhostSelectionMethod; + + /** GhostBattleResult stampSheetCount. */ + public stampSheetCount: number; + + /** GhostBattleResult stampSheet. */ + public stampSheet: number[]; + + /** GhostBattleResult rgStamp. */ + public rgStamp: number; + + /** GhostBattleResult confirmedTransferredStampTargetCarIds. */ + public confirmedTransferredStampTargetCarIds: number[]; + + /** GhostBattleResult rgPlayCount. */ + public rgPlayCount: number; + + /** GhostBattleResult dressupLevel. */ + public dressupLevel: number; + + /** GhostBattleResult dressupPoint. */ + public dressupPoint: number; + + /** GhostBattleResult rgRegionMapScore. */ + public rgRegionMapScore: number[]; + + /** GhostBattleResult competitionId. */ + public competitionId: number; + + /** GhostBattleResult periodId. */ + public periodId: number; + + /** GhostBattleResult brakingPoint. */ + public brakingPoint: number; + + /** GhostBattleResult acquireCrown. */ + public acquireCrown: boolean; + + /** GhostBattleResult acquireAllCrowns. */ + public acquireAllCrowns: boolean; + + /** + * Creates a new GhostBattleResult instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.IGhostBattleResult): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Encodes the specified GhostBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @param message GhostBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.IGhostBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @param message GhostBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.IGhostBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Verifies a GhostBattleResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Creates a plain object from a GhostBattleResult message. Also converts values to other types if specified. + * @param message GhostBattleResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GhostBattleResult { + + /** Properties of a GhostBattleOpponent. */ + interface IGhostBattleOpponent { + + /** GhostBattleOpponent result */ + result: number; + + /** GhostBattleOpponent carId */ + carId: number; + + /** GhostBattleOpponent tunePower */ + tunePower: number; + + /** GhostBattleOpponent tuneHandling */ + tuneHandling: number; + + /** GhostBattleOpponent receiveStamp */ + receiveStamp?: (boolean|null); + } + + /** Represents a GhostBattleOpponent. */ + class GhostBattleOpponent implements IGhostBattleOpponent { + + /** + * Constructs a new GhostBattleOpponent. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent); + + /** GhostBattleOpponent result. */ + public result: number; + + /** GhostBattleOpponent carId. */ + public carId: number; + + /** GhostBattleOpponent tunePower. */ + public tunePower: number; + + /** GhostBattleOpponent tuneHandling. */ + public tuneHandling: number; + + /** GhostBattleOpponent receiveStamp. */ + public receiveStamp: boolean; + + /** + * Creates a new GhostBattleOpponent instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleOpponent instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Encodes the specified GhostBattleOpponent message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @param message GhostBattleOpponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleOpponent message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @param message GhostBattleOpponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Verifies a GhostBattleOpponent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleOpponent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleOpponent + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Creates a plain object from a GhostBattleOpponent message. Also converts values to other types if specified. + * @param message GhostBattleOpponent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleOpponent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleOpponent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a SaveGameResultResponse. */ + interface ISaveGameResultResponse { + + /** SaveGameResultResponse error */ + error: wm.protobuf.ErrorCode; + + /** SaveGameResultResponse ghostSessionId */ + ghostSessionId?: (number|Long|null); + + /** SaveGameResultResponse availableTickets */ + availableTickets?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a SaveGameResultResponse. */ + class SaveGameResultResponse implements ISaveGameResultResponse { + + /** + * Constructs a new SaveGameResultResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveGameResultResponse); + + /** SaveGameResultResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** SaveGameResultResponse ghostSessionId. */ + public ghostSessionId: (number|Long); + + /** SaveGameResultResponse availableTickets. */ + public availableTickets: wm.protobuf.IUserItem[]; + + /** + * Creates a new SaveGameResultResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveGameResultResponse instance + */ + public static create(properties?: wm.protobuf.ISaveGameResultResponse): wm.protobuf.SaveGameResultResponse; + + /** + * Encodes the specified SaveGameResultResponse message. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @param message SaveGameResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveGameResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveGameResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @param message SaveGameResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveGameResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultResponse; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultResponse; + + /** + * Verifies a SaveGameResultResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveGameResultResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveGameResultResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultResponse; + + /** + * Creates a plain object from a SaveGameResultResponse message. Also converts values to other types if specified. + * @param message SaveGameResultResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveGameResultResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveGameResultResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveChargeRequest. */ + interface ISaveChargeRequest { + + /** SaveChargeRequest chargeLogs */ + chargeLogs?: (wm.protobuf.SaveChargeRequest.IChargeLog[]|null); + } + + /** Represents a SaveChargeRequest. */ + class SaveChargeRequest implements ISaveChargeRequest { + + /** + * Constructs a new SaveChargeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveChargeRequest); + + /** SaveChargeRequest chargeLogs. */ + public chargeLogs: wm.protobuf.SaveChargeRequest.IChargeLog[]; + + /** + * Creates a new SaveChargeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveChargeRequest instance + */ + public static create(properties?: wm.protobuf.ISaveChargeRequest): wm.protobuf.SaveChargeRequest; + + /** + * Encodes the specified SaveChargeRequest message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @param message SaveChargeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveChargeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveChargeRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @param message SaveChargeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveChargeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveChargeRequest; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveChargeRequest; + + /** + * Verifies a SaveChargeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveChargeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveChargeRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveChargeRequest; + + /** + * Creates a plain object from a SaveChargeRequest message. Also converts values to other types if specified. + * @param message SaveChargeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveChargeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveChargeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveChargeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SaveChargeRequest { + + /** Properties of a ChargeLog. */ + interface IChargeLog { + + /** ChargeLog datetime */ + datetime: number; + + /** ChargeLog pcbSerial */ + pcbSerial: string; + + /** ChargeLog placeId */ + placeId: string; + + /** ChargeLog userId */ + userId?: (number|null); + } + + /** Represents a ChargeLog. */ + class ChargeLog implements IChargeLog { + + /** + * Constructs a new ChargeLog. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveChargeRequest.IChargeLog); + + /** ChargeLog datetime. */ + public datetime: number; + + /** ChargeLog pcbSerial. */ + public pcbSerial: string; + + /** ChargeLog placeId. */ + public placeId: string; + + /** ChargeLog userId. */ + public userId: number; + + /** + * Creates a new ChargeLog instance using the specified properties. + * @param [properties] Properties to set + * @returns ChargeLog instance + */ + public static create(properties?: wm.protobuf.SaveChargeRequest.IChargeLog): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Encodes the specified ChargeLog message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @param message ChargeLog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveChargeRequest.IChargeLog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChargeLog message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @param message ChargeLog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveChargeRequest.IChargeLog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChargeLog message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Decodes a ChargeLog message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Verifies a ChargeLog message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChargeLog message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChargeLog + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Creates a plain object from a ChargeLog message. Also converts values to other types if specified. + * @param message ChargeLog + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveChargeRequest.ChargeLog, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChargeLog to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChargeLog + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SaveChargeResponse. */ + interface ISaveChargeResponse { + + /** SaveChargeResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveChargeResponse. */ + class SaveChargeResponse implements ISaveChargeResponse { + + /** + * Constructs a new SaveChargeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveChargeResponse); + + /** SaveChargeResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveChargeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveChargeResponse instance + */ + public static create(properties?: wm.protobuf.ISaveChargeResponse): wm.protobuf.SaveChargeResponse; + + /** + * Encodes the specified SaveChargeResponse message. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @param message SaveChargeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveChargeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveChargeResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @param message SaveChargeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveChargeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveChargeResponse; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveChargeResponse; + + /** + * Verifies a SaveChargeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveChargeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveChargeResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveChargeResponse; + + /** + * Creates a plain object from a SaveChargeResponse message. Also converts values to other types if specified. + * @param message SaveChargeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveChargeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveChargeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveChargeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostBattleInfoRequest. */ + interface ILoadGhostBattleInfoRequest { + + /** LoadGhostBattleInfoRequest carId */ + carId: number; + } + + /** Represents a LoadGhostBattleInfoRequest. */ + class LoadGhostBattleInfoRequest implements ILoadGhostBattleInfoRequest { + + /** + * Constructs a new LoadGhostBattleInfoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostBattleInfoRequest); + + /** LoadGhostBattleInfoRequest carId. */ + public carId: number; + + /** + * Creates a new LoadGhostBattleInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostBattleInfoRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostBattleInfoRequest): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @param message LoadGhostBattleInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostBattleInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @param message LoadGhostBattleInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostBattleInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Verifies a LoadGhostBattleInfoRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostBattleInfoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostBattleInfoRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Creates a plain object from a LoadGhostBattleInfoRequest message. Also converts values to other types if specified. + * @param message LoadGhostBattleInfoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostBattleInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostBattleInfoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostBattleInfoRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostBattleInfoResponse. */ + interface ILoadGhostBattleInfoResponse { + + /** LoadGhostBattleInfoResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostBattleInfoResponse friendCars */ + friendCars?: (wm.protobuf.IFriendCar[]|null); + + /** LoadGhostBattleInfoResponse challengers */ + challengers?: (wm.protobuf.IChallengerCar[]|null); + + /** LoadGhostBattleInfoResponse stampTargetCars */ + stampTargetCars?: (wm.protobuf.IStampTargetCar[]|null); + + /** LoadGhostBattleInfoResponse previousVersionStampTargetCars */ + previousVersionStampTargetCars?: (wm.protobuf.IPreviousVersionStampTargetCar[]|null); + + /** LoadGhostBattleInfoResponse bookmarkedCars */ + bookmarkedCars?: (wm.protobuf.IBookmarkedCar[]|null); + + /** LoadGhostBattleInfoResponse history */ + history?: (wm.protobuf.ICar[]|null); + + /** LoadGhostBattleInfoResponse weakenedCars */ + weakenedCars?: (wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar[]|null); + + /** LoadGhostBattleInfoResponse stampSheetCount */ + stampSheetCount: number; + + /** LoadGhostBattleInfoResponse stampSheet */ + stampSheet?: (number[]|null); + + /** LoadGhostBattleInfoResponse stampReturnStats */ + stampReturnStats?: (number[]|null); + } + + /** Represents a LoadGhostBattleInfoResponse. */ + class LoadGhostBattleInfoResponse implements ILoadGhostBattleInfoResponse { + + /** + * Constructs a new LoadGhostBattleInfoResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostBattleInfoResponse); + + /** LoadGhostBattleInfoResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostBattleInfoResponse friendCars. */ + public friendCars: wm.protobuf.IFriendCar[]; + + /** LoadGhostBattleInfoResponse challengers. */ + public challengers: wm.protobuf.IChallengerCar[]; + + /** LoadGhostBattleInfoResponse stampTargetCars. */ + public stampTargetCars: wm.protobuf.IStampTargetCar[]; + + /** LoadGhostBattleInfoResponse previousVersionStampTargetCars. */ + public previousVersionStampTargetCars: wm.protobuf.IPreviousVersionStampTargetCar[]; + + /** LoadGhostBattleInfoResponse bookmarkedCars. */ + public bookmarkedCars: wm.protobuf.IBookmarkedCar[]; + + /** LoadGhostBattleInfoResponse history. */ + public history: wm.protobuf.ICar[]; + + /** LoadGhostBattleInfoResponse weakenedCars. */ + public weakenedCars: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar[]; + + /** LoadGhostBattleInfoResponse stampSheetCount. */ + public stampSheetCount: number; + + /** LoadGhostBattleInfoResponse stampSheet. */ + public stampSheet: number[]; + + /** LoadGhostBattleInfoResponse stampReturnStats. */ + public stampReturnStats: number[]; + + /** + * Creates a new LoadGhostBattleInfoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostBattleInfoResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostBattleInfoResponse): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @param message LoadGhostBattleInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostBattleInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @param message LoadGhostBattleInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostBattleInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Verifies a LoadGhostBattleInfoResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostBattleInfoResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostBattleInfoResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Creates a plain object from a LoadGhostBattleInfoResponse message. Also converts values to other types if specified. + * @param message LoadGhostBattleInfoResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostBattleInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostBattleInfoResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostBattleInfoResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGhostBattleInfoResponse { + + /** Properties of a WeakenedCar. */ + interface IWeakenedCar { + + /** WeakenedCar carId */ + carId: number; + + /** WeakenedCar consecutiveLosses */ + consecutiveLosses: number; + } + + /** Represents a WeakenedCar. */ + class WeakenedCar implements IWeakenedCar { + + /** + * Constructs a new WeakenedCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar); + + /** WeakenedCar carId. */ + public carId: number; + + /** WeakenedCar consecutiveLosses. */ + public consecutiveLosses: number; + + /** + * Creates a new WeakenedCar instance using the specified properties. + * @param [properties] Properties to set + * @returns WeakenedCar instance + */ + public static create(properties?: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Encodes the specified WeakenedCar message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @param message WeakenedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeakenedCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @param message WeakenedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Verifies a WeakenedCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WeakenedCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeakenedCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Creates a plain object from a WeakenedCar message. Also converts values to other types if specified. + * @param message WeakenedCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeakenedCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WeakenedCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadStampTargetRequest. */ + interface ILoadStampTargetRequest { + + /** LoadStampTargetRequest carId */ + carId: number; + + /** LoadStampTargetRequest needToPromote */ + needToPromote: boolean; + } + + /** Represents a LoadStampTargetRequest. */ + class LoadStampTargetRequest implements ILoadStampTargetRequest { + + /** + * Constructs a new LoadStampTargetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadStampTargetRequest); + + /** LoadStampTargetRequest carId. */ + public carId: number; + + /** LoadStampTargetRequest needToPromote. */ + public needToPromote: boolean; + + /** + * Creates a new LoadStampTargetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadStampTargetRequest instance + */ + public static create(properties?: wm.protobuf.ILoadStampTargetRequest): wm.protobuf.LoadStampTargetRequest; + + /** + * Encodes the specified LoadStampTargetRequest message. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @param message LoadStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @param message LoadStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadStampTargetRequest; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadStampTargetRequest; + + /** + * Verifies a LoadStampTargetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadStampTargetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadStampTargetRequest; + + /** + * Creates a plain object from a LoadStampTargetRequest message. Also converts values to other types if specified. + * @param message LoadStampTargetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadStampTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadStampTargetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadStampTargetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadStampTargetResponse. */ + interface ILoadStampTargetResponse { + + /** LoadStampTargetResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadStampTargetResponse cars */ + cars?: (wm.protobuf.IStampTargetCar[]|null); + + /** LoadStampTargetResponse challengers */ + challengers?: (wm.protobuf.IChallengerCar[]|null); + } + + /** Represents a LoadStampTargetResponse. */ + class LoadStampTargetResponse implements ILoadStampTargetResponse { + + /** + * Constructs a new LoadStampTargetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadStampTargetResponse); + + /** LoadStampTargetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadStampTargetResponse cars. */ + public cars: wm.protobuf.IStampTargetCar[]; + + /** LoadStampTargetResponse challengers. */ + public challengers: wm.protobuf.IChallengerCar[]; + + /** + * Creates a new LoadStampTargetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadStampTargetResponse instance + */ + public static create(properties?: wm.protobuf.ILoadStampTargetResponse): wm.protobuf.LoadStampTargetResponse; + + /** + * Encodes the specified LoadStampTargetResponse message. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @param message LoadStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @param message LoadStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadStampTargetResponse; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadStampTargetResponse; + + /** + * Verifies a LoadStampTargetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadStampTargetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadStampTargetResponse; + + /** + * Creates a plain object from a LoadStampTargetResponse message. Also converts values to other types if specified. + * @param message LoadStampTargetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadStampTargetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadStampTargetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadStampTargetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LockStampTargetRequest. */ + interface ILockStampTargetRequest { + + /** LockStampTargetRequest carId */ + carId: number; + + /** LockStampTargetRequest targetCars */ + targetCars?: (number[]|null); + } + + /** Represents a LockStampTargetRequest. */ + class LockStampTargetRequest implements ILockStampTargetRequest { + + /** + * Constructs a new LockStampTargetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILockStampTargetRequest); + + /** LockStampTargetRequest carId. */ + public carId: number; + + /** LockStampTargetRequest targetCars. */ + public targetCars: number[]; + + /** + * Creates a new LockStampTargetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LockStampTargetRequest instance + */ + public static create(properties?: wm.protobuf.ILockStampTargetRequest): wm.protobuf.LockStampTargetRequest; + + /** + * Encodes the specified LockStampTargetRequest message. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @param message LockStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILockStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LockStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @param message LockStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILockStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LockStampTargetRequest; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LockStampTargetRequest; + + /** + * Verifies a LockStampTargetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LockStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LockStampTargetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LockStampTargetRequest; + + /** + * Creates a plain object from a LockStampTargetRequest message. Also converts values to other types if specified. + * @param message LockStampTargetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LockStampTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LockStampTargetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LockStampTargetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LockStampTargetResponse. */ + interface ILockStampTargetResponse { + + /** LockStampTargetResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a LockStampTargetResponse. */ + class LockStampTargetResponse implements ILockStampTargetResponse { + + /** + * Constructs a new LockStampTargetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILockStampTargetResponse); + + /** LockStampTargetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new LockStampTargetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LockStampTargetResponse instance + */ + public static create(properties?: wm.protobuf.ILockStampTargetResponse): wm.protobuf.LockStampTargetResponse; + + /** + * Encodes the specified LockStampTargetResponse message. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @param message LockStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILockStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LockStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @param message LockStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILockStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LockStampTargetResponse; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LockStampTargetResponse; + + /** + * Verifies a LockStampTargetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LockStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LockStampTargetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LockStampTargetResponse; + + /** + * Creates a plain object from a LockStampTargetResponse message. Also converts values to other types if specified. + * @param message LockStampTargetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LockStampTargetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LockStampTargetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LockStampTargetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionInfoRequest. */ + interface ILoadGhostCompetitionInfoRequest { + + /** LoadGhostCompetitionInfoRequest carId */ + carId: number; + + /** LoadGhostCompetitionInfoRequest competitionId */ + competitionId: number; + } + + /** Represents a LoadGhostCompetitionInfoRequest. */ + class LoadGhostCompetitionInfoRequest implements ILoadGhostCompetitionInfoRequest { + + /** + * Constructs a new LoadGhostCompetitionInfoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionInfoRequest); + + /** LoadGhostCompetitionInfoRequest carId. */ + public carId: number; + + /** LoadGhostCompetitionInfoRequest competitionId. */ + public competitionId: number; + + /** + * Creates a new LoadGhostCompetitionInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionInfoRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionInfoRequest): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @param message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @param message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Verifies a LoadGhostCompetitionInfoRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionInfoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionInfoRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoRequest message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionInfoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionInfoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionInfoResponse. */ + interface ILoadGhostCompetitionInfoResponse { + + /** LoadGhostCompetitionInfoResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionInfoResponse periodId */ + periodId?: (number|null); + + /** LoadGhostCompetitionInfoResponse closed */ + closed: boolean; + + /** LoadGhostCompetitionInfoResponse brakingPoint */ + brakingPoint?: (number|null); + + /** LoadGhostCompetitionInfoResponse qualified */ + qualified?: (boolean|null); + + /** LoadGhostCompetitionInfoResponse topResults */ + topResults?: (number[]|null); + + /** LoadGhostCompetitionInfoResponse result */ + result?: (number|null); + + /** LoadGhostCompetitionInfoResponse rank */ + rank?: (number|null); + + /** LoadGhostCompetitionInfoResponse parameters1 */ + parameters1?: (number[]|null); + + /** LoadGhostCompetitionInfoResponse parameters2 */ + parameters2?: (boolean|null); + } + + /** Represents a LoadGhostCompetitionInfoResponse. */ + class LoadGhostCompetitionInfoResponse implements ILoadGhostCompetitionInfoResponse { + + /** + * Constructs a new LoadGhostCompetitionInfoResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionInfoResponse); + + /** LoadGhostCompetitionInfoResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionInfoResponse periodId. */ + public periodId: number; + + /** LoadGhostCompetitionInfoResponse closed. */ + public closed: boolean; + + /** LoadGhostCompetitionInfoResponse brakingPoint. */ + public brakingPoint: number; + + /** LoadGhostCompetitionInfoResponse qualified. */ + public qualified: boolean; + + /** LoadGhostCompetitionInfoResponse topResults. */ + public topResults: number[]; + + /** LoadGhostCompetitionInfoResponse result. */ + public result: number; + + /** LoadGhostCompetitionInfoResponse rank. */ + public rank: number; + + /** LoadGhostCompetitionInfoResponse parameters1. */ + public parameters1: number[]; + + /** LoadGhostCompetitionInfoResponse parameters2. */ + public parameters2: boolean; + + /** + * Creates a new LoadGhostCompetitionInfoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionInfoResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionInfoResponse): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @param message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @param message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Verifies a LoadGhostCompetitionInfoResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionInfoResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionInfoResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoResponse message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionInfoResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionInfoResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTimeAttackRecordRequest. */ + interface ILoadTimeAttackRecordRequest { + + /** LoadTimeAttackRecordRequest carId */ + carId?: (number|null); + + /** LoadTimeAttackRecordRequest model */ + model: number; + + /** LoadTimeAttackRecordRequest course */ + course: number; + } + + /** Represents a LoadTimeAttackRecordRequest. */ + class LoadTimeAttackRecordRequest implements ILoadTimeAttackRecordRequest { + + /** + * Constructs a new LoadTimeAttackRecordRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTimeAttackRecordRequest); + + /** LoadTimeAttackRecordRequest carId. */ + public carId: number; + + /** LoadTimeAttackRecordRequest model. */ + public model: number; + + /** LoadTimeAttackRecordRequest course. */ + public course: number; + + /** + * Creates a new LoadTimeAttackRecordRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTimeAttackRecordRequest instance + */ + public static create(properties?: wm.protobuf.ILoadTimeAttackRecordRequest): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @param message LoadTimeAttackRecordRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTimeAttackRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @param message LoadTimeAttackRecordRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTimeAttackRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Verifies a LoadTimeAttackRecordRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTimeAttackRecordRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTimeAttackRecordRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Creates a plain object from a LoadTimeAttackRecordRequest message. Also converts values to other types if specified. + * @param message LoadTimeAttackRecordRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTimeAttackRecordRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTimeAttackRecordRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTimeAttackRecordRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTimeAttackRecordResponse. */ + interface ILoadTimeAttackRecordResponse { + + /** LoadTimeAttackRecordResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadTimeAttackRecordResponse wholeRanking */ + wholeRanking?: (number[]|null); + + /** LoadTimeAttackRecordResponse modelRanking */ + modelRanking?: (number[]|null); + + /** LoadTimeAttackRecordResponse personalBestTime */ + personalBestTime?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_1Time */ + pbSection_1Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_2Time */ + pbSection_2Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_3Time */ + pbSection_3Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_4Time */ + pbSection_4Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_5Time */ + pbSection_5Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_6Time */ + pbSection_6Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_7Time */ + pbSection_7Time?: (number|null); + } + + /** Represents a LoadTimeAttackRecordResponse. */ + class LoadTimeAttackRecordResponse implements ILoadTimeAttackRecordResponse { + + /** + * Constructs a new LoadTimeAttackRecordResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTimeAttackRecordResponse); + + /** LoadTimeAttackRecordResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadTimeAttackRecordResponse wholeRanking. */ + public wholeRanking: number[]; + + /** LoadTimeAttackRecordResponse modelRanking. */ + public modelRanking: number[]; + + /** LoadTimeAttackRecordResponse personalBestTime. */ + public personalBestTime: number; + + /** LoadTimeAttackRecordResponse pbSection_1Time. */ + public pbSection_1Time: number; + + /** LoadTimeAttackRecordResponse pbSection_2Time. */ + public pbSection_2Time: number; + + /** LoadTimeAttackRecordResponse pbSection_3Time. */ + public pbSection_3Time: number; + + /** LoadTimeAttackRecordResponse pbSection_4Time. */ + public pbSection_4Time: number; + + /** LoadTimeAttackRecordResponse pbSection_5Time. */ + public pbSection_5Time: number; + + /** LoadTimeAttackRecordResponse pbSection_6Time. */ + public pbSection_6Time: number; + + /** LoadTimeAttackRecordResponse pbSection_7Time. */ + public pbSection_7Time: number; + + /** + * Creates a new LoadTimeAttackRecordResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTimeAttackRecordResponse instance + */ + public static create(properties?: wm.protobuf.ILoadTimeAttackRecordResponse): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @param message LoadTimeAttackRecordResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTimeAttackRecordResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @param message LoadTimeAttackRecordResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTimeAttackRecordResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Verifies a LoadTimeAttackRecordResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTimeAttackRecordResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTimeAttackRecordResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Creates a plain object from a LoadTimeAttackRecordResponse message. Also converts values to other types if specified. + * @param message LoadTimeAttackRecordResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTimeAttackRecordResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTimeAttackRecordResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTimeAttackRecordResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveTerminalResultRequest. */ + interface ISaveTerminalResultRequest { + + /** SaveTerminalResultRequest userId */ + userId: number; + + /** SaveTerminalResultRequest timestamp */ + timestamp: number; + + /** SaveTerminalResultRequest carOrder */ + carOrder?: (number[]|null); + + /** SaveTerminalResultRequest confirmedTutorials */ + confirmedTutorials?: (wm.protobuf.TutorialType[]|null); + + /** SaveTerminalResultRequest garageMenuEntered */ + garageMenuEntered?: (boolean|null); + } + + /** Represents a SaveTerminalResultRequest. */ + class SaveTerminalResultRequest implements ISaveTerminalResultRequest { + + /** + * Constructs a new SaveTerminalResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveTerminalResultRequest); + + /** SaveTerminalResultRequest userId. */ + public userId: number; + + /** SaveTerminalResultRequest timestamp. */ + public timestamp: number; + + /** SaveTerminalResultRequest carOrder. */ + public carOrder: number[]; + + /** SaveTerminalResultRequest confirmedTutorials. */ + public confirmedTutorials: wm.protobuf.TutorialType[]; + + /** SaveTerminalResultRequest garageMenuEntered. */ + public garageMenuEntered: boolean; + + /** + * Creates a new SaveTerminalResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveTerminalResultRequest instance + */ + public static create(properties?: wm.protobuf.ISaveTerminalResultRequest): wm.protobuf.SaveTerminalResultRequest; + + /** + * Encodes the specified SaveTerminalResultRequest message. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @param message SaveTerminalResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveTerminalResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveTerminalResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @param message SaveTerminalResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveTerminalResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveTerminalResultRequest; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveTerminalResultRequest; + + /** + * Verifies a SaveTerminalResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveTerminalResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveTerminalResultRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveTerminalResultRequest; + + /** + * Creates a plain object from a SaveTerminalResultRequest message. Also converts values to other types if specified. + * @param message SaveTerminalResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveTerminalResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveTerminalResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveTerminalResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveTerminalResultResponse. */ + interface ISaveTerminalResultResponse { + + /** SaveTerminalResultResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveTerminalResultResponse. */ + class SaveTerminalResultResponse implements ISaveTerminalResultResponse { + + /** + * Constructs a new SaveTerminalResultResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveTerminalResultResponse); + + /** SaveTerminalResultResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveTerminalResultResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveTerminalResultResponse instance + */ + public static create(properties?: wm.protobuf.ISaveTerminalResultResponse): wm.protobuf.SaveTerminalResultResponse; + + /** + * Encodes the specified SaveTerminalResultResponse message. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @param message SaveTerminalResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveTerminalResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveTerminalResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @param message SaveTerminalResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveTerminalResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveTerminalResultResponse; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveTerminalResultResponse; + + /** + * Verifies a SaveTerminalResultResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveTerminalResultResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveTerminalResultResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveTerminalResultResponse; + + /** + * Creates a plain object from a SaveTerminalResultResponse message. Also converts values to other types if specified. + * @param message SaveTerminalResultResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveTerminalResultResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveTerminalResultResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveTerminalResultResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PingRequest. */ + interface IPingRequest { + + /** PingRequest ping */ + ping?: (number|null); + } + + /** Represents a PingRequest. */ + class PingRequest implements IPingRequest { + + /** + * Constructs a new PingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPingRequest); + + /** PingRequest ping. */ + public ping: number; + + /** + * Creates a new PingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PingRequest instance + */ + public static create(properties?: wm.protobuf.IPingRequest): wm.protobuf.PingRequest; + + /** + * Encodes the specified PingRequest message. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @param message PingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PingRequest message, length delimited. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @param message PingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PingRequest; + + /** + * Decodes a PingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PingRequest; + + /** + * Verifies a PingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PingRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PingRequest; + + /** + * Creates a plain object from a PingRequest message. Also converts values to other types if specified. + * @param message PingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PingResponse. */ + interface IPingResponse { + + /** PingResponse error */ + error: wm.protobuf.ErrorCode; + + /** PingResponse pong */ + pong: number; + } + + /** Represents a PingResponse. */ + class PingResponse implements IPingResponse { + + /** + * Constructs a new PingResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPingResponse); + + /** PingResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** PingResponse pong. */ + public pong: number; + + /** + * Creates a new PingResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PingResponse instance + */ + public static create(properties?: wm.protobuf.IPingResponse): wm.protobuf.PingResponse; + + /** + * Encodes the specified PingResponse message. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @param message PingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PingResponse message, length delimited. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @param message PingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PingResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PingResponse; + + /** + * Decodes a PingResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PingResponse; + + /** + * Verifies a PingResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PingResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PingResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PingResponse; + + /** + * Creates a plain object from a PingResponse message. Also converts values to other types if specified. + * @param message PingResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PingResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PingResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PingResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTerminalInformationRequest. */ + interface ILoadTerminalInformationRequest { + + /** LoadTerminalInformationRequest userId */ + userId: number; + } + + /** Represents a LoadTerminalInformationRequest. */ + class LoadTerminalInformationRequest implements ILoadTerminalInformationRequest { + + /** + * Constructs a new LoadTerminalInformationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTerminalInformationRequest); + + /** LoadTerminalInformationRequest userId. */ + public userId: number; + + /** + * Creates a new LoadTerminalInformationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTerminalInformationRequest instance + */ + public static create(properties?: wm.protobuf.ILoadTerminalInformationRequest): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Encodes the specified LoadTerminalInformationRequest message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @param message LoadTerminalInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTerminalInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTerminalInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @param message LoadTerminalInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTerminalInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Verifies a LoadTerminalInformationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTerminalInformationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTerminalInformationRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Creates a plain object from a LoadTerminalInformationRequest message. Also converts values to other types if specified. + * @param message LoadTerminalInformationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTerminalInformationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTerminalInformationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTerminalInformationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTerminalInformationResponse. */ + interface ILoadTerminalInformationResponse { + + /** LoadTerminalInformationResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadTerminalInformationResponse prizeReceivable */ + prizeReceivable: boolean; + + /** LoadTerminalInformationResponse noticeEntries */ + noticeEntries?: (wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice[]|null); + + /** LoadTerminalInformationResponse noticeMessage */ + noticeMessage?: (string[]|null); + + /** LoadTerminalInformationResponse noticeWindow */ + noticeWindow?: (wm.protobuf.NoticeEntry[]|null); + + /** LoadTerminalInformationResponse noticeWindowMessage */ + noticeWindowMessage?: (string[]|null); + + /** LoadTerminalInformationResponse transferNotice */ + transferNotice: wm.protobuf.ITransferNotice; + + /** LoadTerminalInformationResponse announceFeature */ + announceFeature: boolean; + + /** LoadTerminalInformationResponse freeScratched */ + freeScratched: boolean; + + /** LoadTerminalInformationResponse restrictedModels */ + restrictedModels?: (number[]|null); + } + + /** Represents a LoadTerminalInformationResponse. */ + class LoadTerminalInformationResponse implements ILoadTerminalInformationResponse { + + /** + * Constructs a new LoadTerminalInformationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTerminalInformationResponse); + + /** LoadTerminalInformationResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadTerminalInformationResponse prizeReceivable. */ + public prizeReceivable: boolean; + + /** LoadTerminalInformationResponse noticeEntries. */ + public noticeEntries: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice[]; + + /** LoadTerminalInformationResponse noticeMessage. */ + public noticeMessage: string[]; + + /** LoadTerminalInformationResponse noticeWindow. */ + public noticeWindow: wm.protobuf.NoticeEntry[]; + + /** LoadTerminalInformationResponse noticeWindowMessage. */ + public noticeWindowMessage: string[]; + + /** LoadTerminalInformationResponse transferNotice. */ + public transferNotice: wm.protobuf.ITransferNotice; + + /** LoadTerminalInformationResponse announceFeature. */ + public announceFeature: boolean; + + /** LoadTerminalInformationResponse freeScratched. */ + public freeScratched: boolean; + + /** LoadTerminalInformationResponse restrictedModels. */ + public restrictedModels: number[]; + + /** + * Creates a new LoadTerminalInformationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTerminalInformationResponse instance + */ + public static create(properties?: wm.protobuf.ILoadTerminalInformationResponse): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Encodes the specified LoadTerminalInformationResponse message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @param message LoadTerminalInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTerminalInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTerminalInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @param message LoadTerminalInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTerminalInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Verifies a LoadTerminalInformationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTerminalInformationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTerminalInformationResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Creates a plain object from a LoadTerminalInformationResponse message. Also converts values to other types if specified. + * @param message LoadTerminalInformationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTerminalInformationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTerminalInformationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTerminalInformationResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadTerminalInformationResponse { + + /** Properties of a TerminalNotice. */ + interface ITerminalNotice { + + /** TerminalNotice noticeType */ + noticeType: wm.protobuf.NoticeEntry; + + /** TerminalNotice field_1 */ + field_1?: (string|null); + + /** TerminalNotice field_2 */ + field_2?: (number|null); + + /** TerminalNotice field_3 */ + field_3?: (number|null); + } + + /** Represents a TerminalNotice. */ + class TerminalNotice implements ITerminalNotice { + + /** + * Constructs a new TerminalNotice. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice); + + /** TerminalNotice noticeType. */ + public noticeType: wm.protobuf.NoticeEntry; + + /** TerminalNotice field_1. */ + public field_1: string; + + /** TerminalNotice field_2. */ + public field_2: number; + + /** TerminalNotice field_3. */ + public field_3: number; + + /** + * Creates a new TerminalNotice instance using the specified properties. + * @param [properties] Properties to set + * @returns TerminalNotice instance + */ + public static create(properties?: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Encodes the specified TerminalNotice message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @param message TerminalNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerminalNotice message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @param message TerminalNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Verifies a TerminalNotice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerminalNotice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerminalNotice + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Creates a plain object from a TerminalNotice message. Also converts values to other types if specified. + * @param message TerminalNotice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTerminalInformationResponse.TerminalNotice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerminalNotice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerminalNotice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateUserRequest. */ + interface ICreateUserRequest { + + /** CreateUserRequest banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateUserRequest cardChipId */ + cardChipId?: (string|null); + + /** CreateUserRequest accessCode */ + accessCode?: (string|null); + + /** CreateUserRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** CreateUserRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** CreateUserRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** CreateUserRequest timestamp */ + timestamp: number; + } + + /** Represents a CreateUserRequest. */ + class CreateUserRequest implements ICreateUserRequest { + + /** + * Constructs a new CreateUserRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateUserRequest); + + /** CreateUserRequest banapassportAmId. */ + public banapassportAmId: number; + + /** CreateUserRequest cardChipId. */ + public cardChipId: string; + + /** CreateUserRequest accessCode. */ + public accessCode: string; + + /** CreateUserRequest cardTypeCode. */ + public cardTypeCode: number; + + /** CreateUserRequest cardRegionCode. */ + public cardRegionCode: number; + + /** CreateUserRequest device. */ + public device: wm.protobuf.DeviceType; + + /** CreateUserRequest timestamp. */ + public timestamp: number; + + /** + * Creates a new CreateUserRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserRequest instance + */ + public static create(properties?: wm.protobuf.ICreateUserRequest): wm.protobuf.CreateUserRequest; + + /** + * Encodes the specified CreateUserRequest message. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @param message CreateUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @param message CreateUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateUserRequest; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateUserRequest; + + /** + * Verifies a CreateUserRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateUserRequest; + + /** + * Creates a plain object from a CreateUserRequest message. Also converts values to other types if specified. + * @param message CreateUserRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateUserRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateUserResponse. */ + interface ICreateUserResponse { + + /** CreateUserResponse error */ + error: wm.protobuf.ErrorCode; + + /** CreateUserResponse accessCode */ + accessCode?: (string|null); + + /** CreateUserResponse banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateUserResponse mbid */ + mbid?: (number|null); + + /** CreateUserResponse userId */ + userId: number; + } + + /** Represents a CreateUserResponse. */ + class CreateUserResponse implements ICreateUserResponse { + + /** + * Constructs a new CreateUserResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateUserResponse); + + /** CreateUserResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** CreateUserResponse accessCode. */ + public accessCode: string; + + /** CreateUserResponse banapassportAmId. */ + public banapassportAmId: number; + + /** CreateUserResponse mbid. */ + public mbid: number; + + /** CreateUserResponse userId. */ + public userId: number; + + /** + * Creates a new CreateUserResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserResponse instance + */ + public static create(properties?: wm.protobuf.ICreateUserResponse): wm.protobuf.CreateUserResponse; + + /** + * Encodes the specified CreateUserResponse message. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @param message CreateUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @param message CreateUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateUserResponse; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateUserResponse; + + /** + * Verifies a CreateUserResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateUserResponse; + + /** + * Creates a plain object from a CreateUserResponse message. Also converts values to other types if specified. + * @param message CreateUserResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateUserResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AskAccessCodeRequest. */ + interface IAskAccessCodeRequest { + + /** AskAccessCodeRequest cardChipId */ + cardChipId: string; + } + + /** Represents an AskAccessCodeRequest. */ + class AskAccessCodeRequest implements IAskAccessCodeRequest { + + /** + * Constructs a new AskAccessCodeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IAskAccessCodeRequest); + + /** AskAccessCodeRequest cardChipId. */ + public cardChipId: string; + + /** + * Creates a new AskAccessCodeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AskAccessCodeRequest instance + */ + public static create(properties?: wm.protobuf.IAskAccessCodeRequest): wm.protobuf.AskAccessCodeRequest; + + /** + * Encodes the specified AskAccessCodeRequest message. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @param message AskAccessCodeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IAskAccessCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AskAccessCodeRequest message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @param message AskAccessCodeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IAskAccessCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.AskAccessCodeRequest; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.AskAccessCodeRequest; + + /** + * Verifies an AskAccessCodeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AskAccessCodeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AskAccessCodeRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.AskAccessCodeRequest; + + /** + * Creates a plain object from an AskAccessCodeRequest message. Also converts values to other types if specified. + * @param message AskAccessCodeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.AskAccessCodeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AskAccessCodeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AskAccessCodeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AskAccessCodeResponse. */ + interface IAskAccessCodeResponse { + + /** AskAccessCodeResponse error */ + error: wm.protobuf.ErrorCode; + + /** AskAccessCodeResponse accessCode */ + accessCode: string; + } + + /** Represents an AskAccessCodeResponse. */ + class AskAccessCodeResponse implements IAskAccessCodeResponse { + + /** + * Constructs a new AskAccessCodeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IAskAccessCodeResponse); + + /** AskAccessCodeResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** AskAccessCodeResponse accessCode. */ + public accessCode: string; + + /** + * Creates a new AskAccessCodeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AskAccessCodeResponse instance + */ + public static create(properties?: wm.protobuf.IAskAccessCodeResponse): wm.protobuf.AskAccessCodeResponse; + + /** + * Encodes the specified AskAccessCodeResponse message. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @param message AskAccessCodeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IAskAccessCodeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AskAccessCodeResponse message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @param message AskAccessCodeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IAskAccessCodeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.AskAccessCodeResponse; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.AskAccessCodeResponse; + + /** + * Verifies an AskAccessCodeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AskAccessCodeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AskAccessCodeResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.AskAccessCodeResponse; + + /** + * Creates a plain object from an AskAccessCodeResponse message. Also converts values to other types if specified. + * @param message AskAccessCodeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.AskAccessCodeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AskAccessCodeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AskAccessCodeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterOpponentGhostRequest. */ + interface IRegisterOpponentGhostRequest { + + /** RegisterOpponentGhostRequest carId */ + carId: number; + + /** RegisterOpponentGhostRequest specialGhostId */ + specialGhostId: number; + } + + /** Represents a RegisterOpponentGhostRequest. */ + class RegisterOpponentGhostRequest implements IRegisterOpponentGhostRequest { + + /** + * Constructs a new RegisterOpponentGhostRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterOpponentGhostRequest); + + /** RegisterOpponentGhostRequest carId. */ + public carId: number; + + /** RegisterOpponentGhostRequest specialGhostId. */ + public specialGhostId: number; + + /** + * Creates a new RegisterOpponentGhostRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterOpponentGhostRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterOpponentGhostRequest): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Encodes the specified RegisterOpponentGhostRequest message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @param message RegisterOpponentGhostRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterOpponentGhostRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterOpponentGhostRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @param message RegisterOpponentGhostRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterOpponentGhostRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Verifies a RegisterOpponentGhostRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterOpponentGhostRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterOpponentGhostRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Creates a plain object from a RegisterOpponentGhostRequest message. Also converts values to other types if specified. + * @param message RegisterOpponentGhostRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterOpponentGhostRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterOpponentGhostRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterOpponentGhostRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterOpponentGhostResponse. */ + interface IRegisterOpponentGhostResponse { + + /** RegisterOpponentGhostResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a RegisterOpponentGhostResponse. */ + class RegisterOpponentGhostResponse implements IRegisterOpponentGhostResponse { + + /** + * Constructs a new RegisterOpponentGhostResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterOpponentGhostResponse); + + /** RegisterOpponentGhostResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new RegisterOpponentGhostResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterOpponentGhostResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterOpponentGhostResponse): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Encodes the specified RegisterOpponentGhostResponse message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @param message RegisterOpponentGhostResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterOpponentGhostResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterOpponentGhostResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @param message RegisterOpponentGhostResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterOpponentGhostResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Verifies a RegisterOpponentGhostResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterOpponentGhostResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterOpponentGhostResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Creates a plain object from a RegisterOpponentGhostResponse message. Also converts values to other types if specified. + * @param message RegisterOpponentGhostResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterOpponentGhostResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterOpponentGhostResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterOpponentGhostResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GrantCarRightRequest. */ + interface IGrantCarRightRequest { + + /** GrantCarRightRequest userId */ + userId: number; + + /** GrantCarRightRequest targetUserId */ + targetUserId: number; + + /** GrantCarRightRequest timestamp */ + timestamp: number; + } + + /** Represents a GrantCarRightRequest. */ + class GrantCarRightRequest implements IGrantCarRightRequest { + + /** + * Constructs a new GrantCarRightRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGrantCarRightRequest); + + /** GrantCarRightRequest userId. */ + public userId: number; + + /** GrantCarRightRequest targetUserId. */ + public targetUserId: number; + + /** GrantCarRightRequest timestamp. */ + public timestamp: number; + + /** + * Creates a new GrantCarRightRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GrantCarRightRequest instance + */ + public static create(properties?: wm.protobuf.IGrantCarRightRequest): wm.protobuf.GrantCarRightRequest; + + /** + * Encodes the specified GrantCarRightRequest message. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @param message GrantCarRightRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGrantCarRightRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GrantCarRightRequest message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @param message GrantCarRightRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGrantCarRightRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GrantCarRightRequest; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GrantCarRightRequest; + + /** + * Verifies a GrantCarRightRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GrantCarRightRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GrantCarRightRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GrantCarRightRequest; + + /** + * Creates a plain object from a GrantCarRightRequest message. Also converts values to other types if specified. + * @param message GrantCarRightRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GrantCarRightRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GrantCarRightRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GrantCarRightRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GrantCarRightResponse. */ + interface IGrantCarRightResponse { + + /** GrantCarRightResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a GrantCarRightResponse. */ + class GrantCarRightResponse implements IGrantCarRightResponse { + + /** + * Constructs a new GrantCarRightResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGrantCarRightResponse); + + /** GrantCarRightResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new GrantCarRightResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GrantCarRightResponse instance + */ + public static create(properties?: wm.protobuf.IGrantCarRightResponse): wm.protobuf.GrantCarRightResponse; + + /** + * Encodes the specified GrantCarRightResponse message. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @param message GrantCarRightResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGrantCarRightResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GrantCarRightResponse message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @param message GrantCarRightResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGrantCarRightResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GrantCarRightResponse; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GrantCarRightResponse; + + /** + * Verifies a GrantCarRightResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GrantCarRightResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GrantCarRightResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GrantCarRightResponse; + + /** + * Creates a plain object from a GrantCarRightResponse message. Also converts values to other types if specified. + * @param message GrantCarRightResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GrantCarRightResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GrantCarRightResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GrantCarRightResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionRankingRequest. */ + interface ILoadGhostCompetitionRankingRequest { + + /** LoadGhostCompetitionRankingRequest carId */ + carId: number; + + /** LoadGhostCompetitionRankingRequest competitionId */ + competitionId: number; + } + + /** Represents a LoadGhostCompetitionRankingRequest. */ + class LoadGhostCompetitionRankingRequest implements ILoadGhostCompetitionRankingRequest { + + /** + * Constructs a new LoadGhostCompetitionRankingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionRankingRequest); + + /** LoadGhostCompetitionRankingRequest carId. */ + public carId: number; + + /** LoadGhostCompetitionRankingRequest competitionId. */ + public competitionId: number; + + /** + * Creates a new LoadGhostCompetitionRankingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionRankingRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionRankingRequest): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @param message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionRankingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @param message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionRankingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Verifies a LoadGhostCompetitionRankingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionRankingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionRankingRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingRequest message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionRankingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionRankingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionRankingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionRankingResponse. */ + interface ILoadGhostCompetitionRankingResponse { + + /** LoadGhostCompetitionRankingResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionRankingResponse periodId */ + periodId?: (number|null); + + /** LoadGhostCompetitionRankingResponse numOfParticipants */ + numOfParticipants: number; + + /** LoadGhostCompetitionRankingResponse competitionSchedule */ + competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** LoadGhostCompetitionRankingResponse ownRecord */ + ownRecord?: (wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null); + + /** LoadGhostCompetitionRankingResponse topRecords */ + topRecords?: (wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry[]|null); + } + + /** Represents a LoadGhostCompetitionRankingResponse. */ + class LoadGhostCompetitionRankingResponse implements ILoadGhostCompetitionRankingResponse { + + /** + * Constructs a new LoadGhostCompetitionRankingResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionRankingResponse); + + /** LoadGhostCompetitionRankingResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionRankingResponse periodId. */ + public periodId: number; + + /** LoadGhostCompetitionRankingResponse numOfParticipants. */ + public numOfParticipants: number; + + /** LoadGhostCompetitionRankingResponse competitionSchedule. */ + public competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** LoadGhostCompetitionRankingResponse ownRecord. */ + public ownRecord?: (wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null); + + /** LoadGhostCompetitionRankingResponse topRecords. */ + public topRecords: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry[]; + + /** + * Creates a new LoadGhostCompetitionRankingResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionRankingResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionRankingResponse): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @param message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionRankingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @param message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionRankingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Verifies a LoadGhostCompetitionRankingResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionRankingResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionRankingResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingResponse message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionRankingResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionRankingResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionRankingResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGhostCompetitionRankingResponse { + + /** Properties of an Entry. */ + interface IEntry { + + /** Entry rank */ + rank: number; + + /** Entry result */ + result: number; + + /** Entry carId */ + carId: number; + + /** Entry name */ + name: string; + + /** Entry regionId */ + regionId: number; + + /** Entry model */ + model: number; + + /** Entry visualModel */ + visualModel: number; + + /** Entry defaultColor */ + defaultColor: number; + + /** Entry title */ + title: string; + + /** Entry level */ + level: number; + + /** Entry windowStickerString */ + windowStickerString?: (string|null); + + /** Entry playedShopName */ + playedShopName: string; + + /** Entry playedAt */ + playedAt: number; + } + + /** Represents an Entry. */ + class Entry implements IEntry { + + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry); + + /** Entry rank. */ + public rank: number; + + /** Entry result. */ + public result: number; + + /** Entry carId. */ + public carId: number; + + /** Entry name. */ + public name: string; + + /** Entry regionId. */ + public regionId: number; + + /** Entry model. */ + public model: number; + + /** Entry visualModel. */ + public visualModel: number; + + /** Entry defaultColor. */ + public defaultColor: number; + + /** Entry title. */ + public title: string; + + /** Entry level. */ + public level: number; + + /** Entry windowStickerString. */ + public windowStickerString: string; + + /** Entry playedShopName. */ + public playedShopName: string; + + /** Entry playedAt. */ + public playedAt: number; + + /** + * Creates a new Entry instance using the specified properties. + * @param [properties] Properties to set + * @returns Entry instance + */ + public static create(properties?: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Encodes the specified Entry message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Verifies an Entry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entry + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionRankingResponse.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadUnreceivedUserItemsRequest. */ + interface ILoadUnreceivedUserItemsRequest { + + /** LoadUnreceivedUserItemsRequest userId */ + userId: number; + } + + /** Represents a LoadUnreceivedUserItemsRequest. */ + class LoadUnreceivedUserItemsRequest implements ILoadUnreceivedUserItemsRequest { + + /** + * Constructs a new LoadUnreceivedUserItemsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUnreceivedUserItemsRequest); + + /** LoadUnreceivedUserItemsRequest userId. */ + public userId: number; + + /** + * Creates a new LoadUnreceivedUserItemsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUnreceivedUserItemsRequest instance + */ + public static create(properties?: wm.protobuf.ILoadUnreceivedUserItemsRequest): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @param message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUnreceivedUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @param message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUnreceivedUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Verifies a LoadUnreceivedUserItemsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUnreceivedUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUnreceivedUserItemsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsRequest message. Also converts values to other types if specified. + * @param message LoadUnreceivedUserItemsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUnreceivedUserItemsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUnreceivedUserItemsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadUnreceivedUserItemsResponse. */ + interface ILoadUnreceivedUserItemsResponse { + + /** LoadUnreceivedUserItemsResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadUnreceivedUserItemsResponse ownedUserItems */ + ownedUserItems?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a LoadUnreceivedUserItemsResponse. */ + class LoadUnreceivedUserItemsResponse implements ILoadUnreceivedUserItemsResponse { + + /** + * Constructs a new LoadUnreceivedUserItemsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUnreceivedUserItemsResponse); + + /** LoadUnreceivedUserItemsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadUnreceivedUserItemsResponse ownedUserItems. */ + public ownedUserItems: wm.protobuf.IUserItem[]; + + /** + * Creates a new LoadUnreceivedUserItemsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUnreceivedUserItemsResponse instance + */ + public static create(properties?: wm.protobuf.ILoadUnreceivedUserItemsResponse): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @param message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUnreceivedUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @param message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUnreceivedUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Verifies a LoadUnreceivedUserItemsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUnreceivedUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUnreceivedUserItemsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsResponse message. Also converts values to other types if specified. + * @param message LoadUnreceivedUserItemsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUnreceivedUserItemsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUnreceivedUserItemsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBookmarksRequest. */ + interface ILoadBookmarksRequest { + + /** LoadBookmarksRequest userId */ + userId: number; + } + + /** Represents a LoadBookmarksRequest. */ + class LoadBookmarksRequest implements ILoadBookmarksRequest { + + /** + * Constructs a new LoadBookmarksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadBookmarksRequest); + + /** LoadBookmarksRequest userId. */ + public userId: number; + + /** + * Creates a new LoadBookmarksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBookmarksRequest instance + */ + public static create(properties?: wm.protobuf.ILoadBookmarksRequest): wm.protobuf.LoadBookmarksRequest; + + /** + * Encodes the specified LoadBookmarksRequest message. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @param message LoadBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @param message LoadBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadBookmarksRequest; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadBookmarksRequest; + + /** + * Verifies a LoadBookmarksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBookmarksRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadBookmarksRequest; + + /** + * Creates a plain object from a LoadBookmarksRequest message. Also converts values to other types if specified. + * @param message LoadBookmarksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadBookmarksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBookmarksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBookmarksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBookmarksResponse. */ + interface ILoadBookmarksResponse { + + /** LoadBookmarksResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadBookmarksResponse cars */ + cars?: (wm.protobuf.ICar[]|null); + } + + /** Represents a LoadBookmarksResponse. */ + class LoadBookmarksResponse implements ILoadBookmarksResponse { + + /** + * Constructs a new LoadBookmarksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadBookmarksResponse); + + /** LoadBookmarksResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadBookmarksResponse cars. */ + public cars: wm.protobuf.ICar[]; + + /** + * Creates a new LoadBookmarksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBookmarksResponse instance + */ + public static create(properties?: wm.protobuf.ILoadBookmarksResponse): wm.protobuf.LoadBookmarksResponse; + + /** + * Encodes the specified LoadBookmarksResponse message. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @param message LoadBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @param message LoadBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadBookmarksResponse; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadBookmarksResponse; + + /** + * Verifies a LoadBookmarksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBookmarksResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadBookmarksResponse; + + /** + * Creates a plain object from a LoadBookmarksResponse message. Also converts values to other types if specified. + * @param message LoadBookmarksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadBookmarksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBookmarksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBookmarksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveBookmarksRequest. */ + interface ISaveBookmarksRequest { + + /** SaveBookmarksRequest userId */ + userId: number; + + /** SaveBookmarksRequest cars */ + cars?: (number[]|null); + } + + /** Represents a SaveBookmarksRequest. */ + class SaveBookmarksRequest implements ISaveBookmarksRequest { + + /** + * Constructs a new SaveBookmarksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveBookmarksRequest); + + /** SaveBookmarksRequest userId. */ + public userId: number; + + /** SaveBookmarksRequest cars. */ + public cars: number[]; + + /** + * Creates a new SaveBookmarksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveBookmarksRequest instance + */ + public static create(properties?: wm.protobuf.ISaveBookmarksRequest): wm.protobuf.SaveBookmarksRequest; + + /** + * Encodes the specified SaveBookmarksRequest message. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @param message SaveBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @param message SaveBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveBookmarksRequest; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveBookmarksRequest; + + /** + * Verifies a SaveBookmarksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveBookmarksRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveBookmarksRequest; + + /** + * Creates a plain object from a SaveBookmarksRequest message. Also converts values to other types if specified. + * @param message SaveBookmarksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveBookmarksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveBookmarksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveBookmarksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveBookmarksResponse. */ + interface ISaveBookmarksResponse { + + /** SaveBookmarksResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveBookmarksResponse. */ + class SaveBookmarksResponse implements ISaveBookmarksResponse { + + /** + * Constructs a new SaveBookmarksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveBookmarksResponse); + + /** SaveBookmarksResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveBookmarksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveBookmarksResponse instance + */ + public static create(properties?: wm.protobuf.ISaveBookmarksResponse): wm.protobuf.SaveBookmarksResponse; + + /** + * Encodes the specified SaveBookmarksResponse message. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @param message SaveBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @param message SaveBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveBookmarksResponse; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveBookmarksResponse; + + /** + * Verifies a SaveBookmarksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveBookmarksResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveBookmarksResponse; + + /** + * Creates a plain object from a SaveBookmarksResponse message. Also converts values to other types if specified. + * @param message SaveBookmarksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveBookmarksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveBookmarksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveBookmarksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StartTransferRequest. */ + interface IStartTransferRequest { + + /** StartTransferRequest banapassportAmId */ + banapassportAmId: number; + } + + /** Represents a StartTransferRequest. */ + class StartTransferRequest implements IStartTransferRequest { + + /** + * Constructs a new StartTransferRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IStartTransferRequest); + + /** StartTransferRequest banapassportAmId. */ + public banapassportAmId: number; + + /** + * Creates a new StartTransferRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StartTransferRequest instance + */ + public static create(properties?: wm.protobuf.IStartTransferRequest): wm.protobuf.StartTransferRequest; + + /** + * Encodes the specified StartTransferRequest message. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @param message StartTransferRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IStartTransferRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartTransferRequest message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @param message StartTransferRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IStartTransferRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.StartTransferRequest; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.StartTransferRequest; + + /** + * Verifies a StartTransferRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartTransferRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartTransferRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.StartTransferRequest; + + /** + * Creates a plain object from a StartTransferRequest message. Also converts values to other types if specified. + * @param message StartTransferRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.StartTransferRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartTransferRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartTransferRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StartTransferResponse. */ + interface IStartTransferResponse { + + /** StartTransferResponse error */ + error: wm.protobuf.ErrorCode; + + /** StartTransferResponse userId */ + userId: number; + + /** StartTransferResponse pollingInterval */ + pollingInterval?: (number|null); + } + + /** Represents a StartTransferResponse. */ + class StartTransferResponse implements IStartTransferResponse { + + /** + * Constructs a new StartTransferResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IStartTransferResponse); + + /** StartTransferResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** StartTransferResponse userId. */ + public userId: number; + + /** StartTransferResponse pollingInterval. */ + public pollingInterval: number; + + /** + * Creates a new StartTransferResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns StartTransferResponse instance + */ + public static create(properties?: wm.protobuf.IStartTransferResponse): wm.protobuf.StartTransferResponse; + + /** + * Encodes the specified StartTransferResponse message. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @param message StartTransferResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IStartTransferResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartTransferResponse message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @param message StartTransferResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IStartTransferResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.StartTransferResponse; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.StartTransferResponse; + + /** + * Verifies a StartTransferResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartTransferResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartTransferResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.StartTransferResponse; + + /** + * Creates a plain object from a StartTransferResponse message. Also converts values to other types if specified. + * @param message StartTransferResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.StartTransferResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartTransferResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartTransferResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveScreenshotRequest. */ + interface ISaveScreenshotRequest { + + /** SaveScreenshotRequest carId */ + carId: number; + + /** SaveScreenshotRequest timestamp */ + timestamp: number; + + /** SaveScreenshotRequest playedAt */ + playedAt?: (number|null); + + /** SaveScreenshotRequest transparent */ + transparent?: (boolean|null); + + /** SaveScreenshotRequest imageType */ + imageType: wm.protobuf.ScreenshotType; + + /** SaveScreenshotRequest image */ + image?: (Uint8Array|null); + + /** SaveScreenshotRequest ghostMetadata */ + ghostMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null); + + /** SaveScreenshotRequest versusMetadata */ + versusMetadata?: (wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null); + + /** SaveScreenshotRequest terminalMetadata */ + terminalMetadata?: (wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null); + + /** SaveScreenshotRequest acquiringVsStarMetadata */ + acquiringVsStarMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null); + + /** SaveScreenshotRequest acquiringAuraMotifMetadata */ + acquiringAuraMotifMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null); + + /** SaveScreenshotRequest ghostRegionMapMetadata */ + ghostRegionMapMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null); + + /** SaveScreenshotRequest acquiringCrownMetadata */ + acquiringCrownMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null); + + /** SaveScreenshotRequest competitionResultMetadata */ + competitionResultMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null); + + /** SaveScreenshotRequest timeAttackResultMetadata */ + timeAttackResultMetadata?: (wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null); + + /** SaveScreenshotRequest levelUpMetadata */ + levelUpMetadata?: (wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null); + } + + /** Represents a SaveScreenshotRequest. */ + class SaveScreenshotRequest implements ISaveScreenshotRequest { + + /** + * Constructs a new SaveScreenshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScreenshotRequest); + + /** SaveScreenshotRequest carId. */ + public carId: number; + + /** SaveScreenshotRequest timestamp. */ + public timestamp: number; + + /** SaveScreenshotRequest playedAt. */ + public playedAt: number; + + /** SaveScreenshotRequest transparent. */ + public transparent: boolean; + + /** SaveScreenshotRequest imageType. */ + public imageType: wm.protobuf.ScreenshotType; + + /** SaveScreenshotRequest image. */ + public image: Uint8Array; + + /** SaveScreenshotRequest ghostMetadata. */ + public ghostMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null); + + /** SaveScreenshotRequest versusMetadata. */ + public versusMetadata?: (wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null); + + /** SaveScreenshotRequest terminalMetadata. */ + public terminalMetadata?: (wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null); + + /** SaveScreenshotRequest acquiringVsStarMetadata. */ + public acquiringVsStarMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null); + + /** SaveScreenshotRequest acquiringAuraMotifMetadata. */ + public acquiringAuraMotifMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null); + + /** SaveScreenshotRequest ghostRegionMapMetadata. */ + public ghostRegionMapMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null); + + /** SaveScreenshotRequest acquiringCrownMetadata. */ + public acquiringCrownMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null); + + /** SaveScreenshotRequest competitionResultMetadata. */ + public competitionResultMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null); + + /** SaveScreenshotRequest timeAttackResultMetadata. */ + public timeAttackResultMetadata?: (wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null); + + /** SaveScreenshotRequest levelUpMetadata. */ + public levelUpMetadata?: (wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null); + + /** + * Creates a new SaveScreenshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScreenshotRequest instance + */ + public static create(properties?: wm.protobuf.ISaveScreenshotRequest): wm.protobuf.SaveScreenshotRequest; + + /** + * Encodes the specified SaveScreenshotRequest message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @param message SaveScreenshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScreenshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScreenshotRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @param message SaveScreenshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScreenshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest; + + /** + * Verifies a SaveScreenshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScreenshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScreenshotRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest; + + /** + * Creates a plain object from a SaveScreenshotRequest message. Also converts values to other types if specified. + * @param message SaveScreenshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScreenshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScreenshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SaveScreenshotRequest { + + /** Properties of a GhostBattleMetadata. */ + interface IGhostBattleMetadata { + + /** GhostBattleMetadata tunePower */ + tunePower: number; + + /** GhostBattleMetadata tuneHandling */ + tuneHandling: number; + + /** GhostBattleMetadata area */ + area: number; + + /** GhostBattleMetadata stampReturnCount */ + stampReturnCount: number; + + /** GhostBattleMetadata opponents */ + opponents?: (wm.protobuf.SaveScreenshotRequest.IOpponentCar[]|null); + } + + /** Represents a GhostBattleMetadata. */ + class GhostBattleMetadata implements IGhostBattleMetadata { + + /** + * Constructs a new GhostBattleMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata); + + /** GhostBattleMetadata tunePower. */ + public tunePower: number; + + /** GhostBattleMetadata tuneHandling. */ + public tuneHandling: number; + + /** GhostBattleMetadata area. */ + public area: number; + + /** GhostBattleMetadata stampReturnCount. */ + public stampReturnCount: number; + + /** GhostBattleMetadata opponents. */ + public opponents: wm.protobuf.SaveScreenshotRequest.IOpponentCar[]; + + /** + * Creates a new GhostBattleMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Encodes the specified GhostBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @param message GhostBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @param message GhostBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Verifies a GhostBattleMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Creates a plain object from a GhostBattleMetadata message. Also converts values to other types if specified. + * @param message GhostBattleMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VersusBattleMetadata. */ + interface IVersusBattleMetadata { + + /** VersusBattleMetadata tunePower */ + tunePower: number; + + /** VersusBattleMetadata tuneHandling */ + tuneHandling: number; + + /** VersusBattleMetadata area */ + area: number; + + /** VersusBattleMetadata opponents */ + opponents?: (wm.protobuf.SaveScreenshotRequest.IOpponentCar[]|null); + } + + /** Represents a VersusBattleMetadata. */ + class VersusBattleMetadata implements IVersusBattleMetadata { + + /** + * Constructs a new VersusBattleMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata); + + /** VersusBattleMetadata tunePower. */ + public tunePower: number; + + /** VersusBattleMetadata tuneHandling. */ + public tuneHandling: number; + + /** VersusBattleMetadata area. */ + public area: number; + + /** VersusBattleMetadata opponents. */ + public opponents: wm.protobuf.SaveScreenshotRequest.IOpponentCar[]; + + /** + * Creates a new VersusBattleMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns VersusBattleMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Encodes the specified VersusBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @param message VersusBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VersusBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @param message VersusBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Verifies a VersusBattleMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VersusBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersusBattleMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Creates a plain object from a VersusBattleMetadata message. Also converts values to other types if specified. + * @param message VersusBattleMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VersusBattleMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VersusBattleMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TerminalMetadata. */ + interface ITerminalMetadata { + + /** TerminalMetadata tunePower */ + tunePower: number; + + /** TerminalMetadata tuneHandling */ + tuneHandling: number; + + /** TerminalMetadata name */ + name: string; + + /** TerminalMetadata title */ + title: string; + + /** TerminalMetadata level */ + level: number; + } + + /** Represents a TerminalMetadata. */ + class TerminalMetadata implements ITerminalMetadata { + + /** + * Constructs a new TerminalMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata); + + /** TerminalMetadata tunePower. */ + public tunePower: number; + + /** TerminalMetadata tuneHandling. */ + public tuneHandling: number; + + /** TerminalMetadata name. */ + public name: string; + + /** TerminalMetadata title. */ + public title: string; + + /** TerminalMetadata level. */ + public level: number; + + /** + * Creates a new TerminalMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns TerminalMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Encodes the specified TerminalMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @param message TerminalMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerminalMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @param message TerminalMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Verifies a TerminalMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerminalMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerminalMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Creates a plain object from a TerminalMetadata message. Also converts values to other types if specified. + * @param message TerminalMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.TerminalMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerminalMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerminalMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcquiringVersusStarMetadata. */ + interface IAcquiringVersusStarMetadata { + + /** AcquiringVersusStarMetadata tunePower */ + tunePower: number; + + /** AcquiringVersusStarMetadata tuneHandling */ + tuneHandling: number; + + /** AcquiringVersusStarMetadata vsStarCount */ + vsStarCount: number; + } + + /** Represents an AcquiringVersusStarMetadata. */ + class AcquiringVersusStarMetadata implements IAcquiringVersusStarMetadata { + + /** + * Constructs a new AcquiringVersusStarMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata); + + /** AcquiringVersusStarMetadata tunePower. */ + public tunePower: number; + + /** AcquiringVersusStarMetadata tuneHandling. */ + public tuneHandling: number; + + /** AcquiringVersusStarMetadata vsStarCount. */ + public vsStarCount: number; + + /** + * Creates a new AcquiringVersusStarMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AcquiringVersusStarMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Encodes the specified AcquiringVersusStarMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @param message AcquiringVersusStarMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcquiringVersusStarMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @param message AcquiringVersusStarMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Verifies an AcquiringVersusStarMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcquiringVersusStarMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcquiringVersusStarMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Creates a plain object from an AcquiringVersusStarMetadata message. Also converts values to other types if specified. + * @param message AcquiringVersusStarMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcquiringVersusStarMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcquiringVersusStarMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcquiringAuraMotifMetadata. */ + interface IAcquiringAuraMotifMetadata { + + /** AcquiringAuraMotifMetadata tunePower */ + tunePower: number; + + /** AcquiringAuraMotifMetadata tuneHandling */ + tuneHandling: number; + + /** AcquiringAuraMotifMetadata auraMotif */ + auraMotif: number; + } + + /** Represents an AcquiringAuraMotifMetadata. */ + class AcquiringAuraMotifMetadata implements IAcquiringAuraMotifMetadata { + + /** + * Constructs a new AcquiringAuraMotifMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata); + + /** AcquiringAuraMotifMetadata tunePower. */ + public tunePower: number; + + /** AcquiringAuraMotifMetadata tuneHandling. */ + public tuneHandling: number; + + /** AcquiringAuraMotifMetadata auraMotif. */ + public auraMotif: number; + + /** + * Creates a new AcquiringAuraMotifMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AcquiringAuraMotifMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @param message AcquiringAuraMotifMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @param message AcquiringAuraMotifMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Verifies an AcquiringAuraMotifMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcquiringAuraMotifMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcquiringAuraMotifMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Creates a plain object from an AcquiringAuraMotifMetadata message. Also converts values to other types if specified. + * @param message AcquiringAuraMotifMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcquiringAuraMotifMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcquiringAuraMotifMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostRegionMapMetadata. */ + interface IGhostRegionMapMetadata { + + /** GhostRegionMapMetadata tunePower */ + tunePower: number; + + /** GhostRegionMapMetadata tuneHandling */ + tuneHandling: number; + + /** GhostRegionMapMetadata rgScore */ + rgScore: number; + + /** GhostRegionMapMetadata rgRegionMapScore */ + rgRegionMapScore?: (number[]|null); + } + + /** Represents a GhostRegionMapMetadata. */ + class GhostRegionMapMetadata implements IGhostRegionMapMetadata { + + /** + * Constructs a new GhostRegionMapMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata); + + /** GhostRegionMapMetadata tunePower. */ + public tunePower: number; + + /** GhostRegionMapMetadata tuneHandling. */ + public tuneHandling: number; + + /** GhostRegionMapMetadata rgScore. */ + public rgScore: number; + + /** GhostRegionMapMetadata rgRegionMapScore. */ + public rgRegionMapScore: number[]; + + /** + * Creates a new GhostRegionMapMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostRegionMapMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Encodes the specified GhostRegionMapMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @param message GhostRegionMapMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostRegionMapMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @param message GhostRegionMapMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Verifies a GhostRegionMapMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostRegionMapMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostRegionMapMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Creates a plain object from a GhostRegionMapMetadata message. Also converts values to other types if specified. + * @param message GhostRegionMapMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostRegionMapMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostRegionMapMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcquiringCrownMetadata. */ + interface IAcquiringCrownMetadata { + + /** AcquiringCrownMetadata tunePower */ + tunePower: number; + + /** AcquiringCrownMetadata tuneHandling */ + tuneHandling: number; + + /** AcquiringCrownMetadata area */ + area: number; + } + + /** Represents an AcquiringCrownMetadata. */ + class AcquiringCrownMetadata implements IAcquiringCrownMetadata { + + /** + * Constructs a new AcquiringCrownMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata); + + /** AcquiringCrownMetadata tunePower. */ + public tunePower: number; + + /** AcquiringCrownMetadata tuneHandling. */ + public tuneHandling: number; + + /** AcquiringCrownMetadata area. */ + public area: number; + + /** + * Creates a new AcquiringCrownMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AcquiringCrownMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Encodes the specified AcquiringCrownMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @param message AcquiringCrownMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcquiringCrownMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @param message AcquiringCrownMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Verifies an AcquiringCrownMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcquiringCrownMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcquiringCrownMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Creates a plain object from an AcquiringCrownMetadata message. Also converts values to other types if specified. + * @param message AcquiringCrownMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcquiringCrownMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcquiringCrownMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCompetitionResultMetadata. */ + interface IGhostCompetitionResultMetadata { + + /** GhostCompetitionResultMetadata tunePower */ + tunePower: number; + + /** GhostCompetitionResultMetadata tuneHandling */ + tuneHandling: number; + + /** GhostCompetitionResultMetadata rank */ + rank?: (number|null); + + /** GhostCompetitionResultMetadata result */ + result: number; + } + + /** Represents a GhostCompetitionResultMetadata. */ + class GhostCompetitionResultMetadata implements IGhostCompetitionResultMetadata { + + /** + * Constructs a new GhostCompetitionResultMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata); + + /** GhostCompetitionResultMetadata tunePower. */ + public tunePower: number; + + /** GhostCompetitionResultMetadata tuneHandling. */ + public tuneHandling: number; + + /** GhostCompetitionResultMetadata rank. */ + public rank: number; + + /** GhostCompetitionResultMetadata result. */ + public result: number; + + /** + * Creates a new GhostCompetitionResultMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionResultMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Encodes the specified GhostCompetitionResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @param message GhostCompetitionResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @param message GhostCompetitionResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Verifies a GhostCompetitionResultMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionResultMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionResultMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Creates a plain object from a GhostCompetitionResultMetadata message. Also converts values to other types if specified. + * @param message GhostCompetitionResultMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionResultMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionResultMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeAttackResultMetadata. */ + interface ITimeAttackResultMetadata { + + /** TimeAttackResultMetadata tunePower */ + tunePower: number; + + /** TimeAttackResultMetadata tuneHandling */ + tuneHandling: number; + + /** TimeAttackResultMetadata course */ + course: number; + + /** TimeAttackResultMetadata wholeRank */ + wholeRank?: (number|null); + + /** TimeAttackResultMetadata modelRank */ + modelRank?: (number|null); + } + + /** Represents a TimeAttackResultMetadata. */ + class TimeAttackResultMetadata implements ITimeAttackResultMetadata { + + /** + * Constructs a new TimeAttackResultMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata); + + /** TimeAttackResultMetadata tunePower. */ + public tunePower: number; + + /** TimeAttackResultMetadata tuneHandling. */ + public tuneHandling: number; + + /** TimeAttackResultMetadata course. */ + public course: number; + + /** TimeAttackResultMetadata wholeRank. */ + public wholeRank: number; + + /** TimeAttackResultMetadata modelRank. */ + public modelRank: number; + + /** + * Creates a new TimeAttackResultMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeAttackResultMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Encodes the specified TimeAttackResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @param message TimeAttackResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeAttackResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @param message TimeAttackResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Verifies a TimeAttackResultMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeAttackResultMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeAttackResultMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Creates a plain object from a TimeAttackResultMetadata message. Also converts values to other types if specified. + * @param message TimeAttackResultMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeAttackResultMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeAttackResultMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LevelUpMetadata. */ + interface ILevelUpMetadata { + + /** LevelUpMetadata tunePower */ + tunePower: number; + + /** LevelUpMetadata tuneHandling */ + tuneHandling: number; + + /** LevelUpMetadata level */ + level: number; + } + + /** Represents a LevelUpMetadata. */ + class LevelUpMetadata implements ILevelUpMetadata { + + /** + * Constructs a new LevelUpMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata); + + /** LevelUpMetadata tunePower. */ + public tunePower: number; + + /** LevelUpMetadata tuneHandling. */ + public tuneHandling: number; + + /** LevelUpMetadata level. */ + public level: number; + + /** + * Creates a new LevelUpMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns LevelUpMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Encodes the specified LevelUpMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @param message LevelUpMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LevelUpMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @param message LevelUpMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Verifies a LevelUpMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LevelUpMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LevelUpMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Creates a plain object from a LevelUpMetadata message. Also converts values to other types if specified. + * @param message LevelUpMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.LevelUpMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LevelUpMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LevelUpMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OpponentCar. */ + interface IOpponentCar { + + /** OpponentCar carId */ + carId?: (number|null); + + /** OpponentCar tunePower */ + tunePower: number; + + /** OpponentCar tuneHandling */ + tuneHandling: number; + } + + /** Represents an OpponentCar. */ + class OpponentCar implements IOpponentCar { + + /** + * Constructs a new OpponentCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IOpponentCar); + + /** OpponentCar carId. */ + public carId: number; + + /** OpponentCar tunePower. */ + public tunePower: number; + + /** OpponentCar tuneHandling. */ + public tuneHandling: number; + + /** + * Creates a new OpponentCar instance using the specified properties. + * @param [properties] Properties to set + * @returns OpponentCar instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IOpponentCar): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Encodes the specified OpponentCar message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @param message OpponentCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IOpponentCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpponentCar message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @param message OpponentCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IOpponentCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpponentCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Decodes an OpponentCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Verifies an OpponentCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OpponentCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpponentCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Creates a plain object from an OpponentCar message. Also converts values to other types if specified. + * @param message OpponentCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.OpponentCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpponentCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpponentCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SaveScreenshotResponse. */ + interface ISaveScreenshotResponse { + + /** SaveScreenshotResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveScreenshotResponse. */ + class SaveScreenshotResponse implements ISaveScreenshotResponse { + + /** + * Constructs a new SaveScreenshotResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScreenshotResponse); + + /** SaveScreenshotResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveScreenshotResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScreenshotResponse instance + */ + public static create(properties?: wm.protobuf.ISaveScreenshotResponse): wm.protobuf.SaveScreenshotResponse; + + /** + * Encodes the specified SaveScreenshotResponse message. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @param message SaveScreenshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScreenshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScreenshotResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @param message SaveScreenshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScreenshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotResponse; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotResponse; + + /** + * Verifies a SaveScreenshotResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScreenshotResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScreenshotResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotResponse; + + /** + * Creates a plain object from a SaveScreenshotResponse message. Also converts values to other types if specified. + * @param message SaveScreenshotResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScreenshotResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScreenshotResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SubmitClientLogRequest. */ + interface ISubmitClientLogRequest { + + /** SubmitClientLogRequest data */ + data: Uint8Array; + + /** SubmitClientLogRequest modifiedAt */ + modifiedAt: number; + + /** SubmitClientLogRequest logType */ + logType: wm.protobuf.ClientLogType; + } + + /** Represents a SubmitClientLogRequest. */ + class SubmitClientLogRequest implements ISubmitClientLogRequest { + + /** + * Constructs a new SubmitClientLogRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISubmitClientLogRequest); + + /** SubmitClientLogRequest data. */ + public data: Uint8Array; + + /** SubmitClientLogRequest modifiedAt. */ + public modifiedAt: number; + + /** SubmitClientLogRequest logType. */ + public logType: wm.protobuf.ClientLogType; + + /** + * Creates a new SubmitClientLogRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SubmitClientLogRequest instance + */ + public static create(properties?: wm.protobuf.ISubmitClientLogRequest): wm.protobuf.SubmitClientLogRequest; + + /** + * Encodes the specified SubmitClientLogRequest message. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @param message SubmitClientLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISubmitClientLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubmitClientLogRequest message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @param message SubmitClientLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISubmitClientLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SubmitClientLogRequest; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SubmitClientLogRequest; + + /** + * Verifies a SubmitClientLogRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubmitClientLogRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubmitClientLogRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SubmitClientLogRequest; + + /** + * Creates a plain object from a SubmitClientLogRequest message. Also converts values to other types if specified. + * @param message SubmitClientLogRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SubmitClientLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubmitClientLogRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubmitClientLogRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SubmitClientLogResponse. */ + interface ISubmitClientLogResponse { + + /** SubmitClientLogResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SubmitClientLogResponse. */ + class SubmitClientLogResponse implements ISubmitClientLogResponse { + + /** + * Constructs a new SubmitClientLogResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISubmitClientLogResponse); + + /** SubmitClientLogResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SubmitClientLogResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SubmitClientLogResponse instance + */ + public static create(properties?: wm.protobuf.ISubmitClientLogResponse): wm.protobuf.SubmitClientLogResponse; + + /** + * Encodes the specified SubmitClientLogResponse message. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @param message SubmitClientLogResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISubmitClientLogResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubmitClientLogResponse message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @param message SubmitClientLogResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISubmitClientLogResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SubmitClientLogResponse; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SubmitClientLogResponse; + + /** + * Verifies a SubmitClientLogResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubmitClientLogResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubmitClientLogResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SubmitClientLogResponse; + + /** + * Creates a plain object from a SubmitClientLogResponse message. Also converts values to other types if specified. + * @param message SubmitClientLogResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SubmitClientLogResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubmitClientLogResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubmitClientLogResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadScratchInformationRequest. */ + interface ILoadScratchInformationRequest { + + /** LoadScratchInformationRequest userId */ + userId: number; + } + + /** Represents a LoadScratchInformationRequest. */ + class LoadScratchInformationRequest implements ILoadScratchInformationRequest { + + /** + * Constructs a new LoadScratchInformationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadScratchInformationRequest); + + /** LoadScratchInformationRequest userId. */ + public userId: number; + + /** + * Creates a new LoadScratchInformationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadScratchInformationRequest instance + */ + public static create(properties?: wm.protobuf.ILoadScratchInformationRequest): wm.protobuf.LoadScratchInformationRequest; + + /** + * Encodes the specified LoadScratchInformationRequest message. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @param message LoadScratchInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadScratchInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadScratchInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @param message LoadScratchInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadScratchInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadScratchInformationRequest; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadScratchInformationRequest; + + /** + * Verifies a LoadScratchInformationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadScratchInformationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadScratchInformationRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadScratchInformationRequest; + + /** + * Creates a plain object from a LoadScratchInformationRequest message. Also converts values to other types if specified. + * @param message LoadScratchInformationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadScratchInformationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadScratchInformationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadScratchInformationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadScratchInformationResponse. */ + interface ILoadScratchInformationResponse { + + /** LoadScratchInformationResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadScratchInformationResponse scratchSheets */ + scratchSheets?: (wm.protobuf.IScratchSheet[]|null); + + /** LoadScratchInformationResponse currentSheet */ + currentSheet: number; + + /** LoadScratchInformationResponse numOfScratched */ + numOfScratched: number; + + /** LoadScratchInformationResponse ownedUserItems */ + ownedUserItems?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a LoadScratchInformationResponse. */ + class LoadScratchInformationResponse implements ILoadScratchInformationResponse { + + /** + * Constructs a new LoadScratchInformationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadScratchInformationResponse); + + /** LoadScratchInformationResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadScratchInformationResponse scratchSheets. */ + public scratchSheets: wm.protobuf.IScratchSheet[]; + + /** LoadScratchInformationResponse currentSheet. */ + public currentSheet: number; + + /** LoadScratchInformationResponse numOfScratched. */ + public numOfScratched: number; + + /** LoadScratchInformationResponse ownedUserItems. */ + public ownedUserItems: wm.protobuf.IUserItem[]; + + /** + * Creates a new LoadScratchInformationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadScratchInformationResponse instance + */ + public static create(properties?: wm.protobuf.ILoadScratchInformationResponse): wm.protobuf.LoadScratchInformationResponse; + + /** + * Encodes the specified LoadScratchInformationResponse message. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @param message LoadScratchInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadScratchInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadScratchInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @param message LoadScratchInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadScratchInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadScratchInformationResponse; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadScratchInformationResponse; + + /** + * Verifies a LoadScratchInformationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadScratchInformationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadScratchInformationResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadScratchInformationResponse; + + /** + * Creates a plain object from a LoadScratchInformationResponse message. Also converts values to other types if specified. + * @param message LoadScratchInformationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadScratchInformationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadScratchInformationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadScratchInformationResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveScratchSheetRequest. */ + interface ISaveScratchSheetRequest { + + /** SaveScratchSheetRequest timestamp */ + timestamp: number; + + /** SaveScratchSheetRequest targetSheet */ + targetSheet: number; + + /** SaveScratchSheetRequest targetSquare */ + targetSquare: number; + + /** SaveScratchSheetRequest userId */ + userId: number; + } + + /** Represents a SaveScratchSheetRequest. */ + class SaveScratchSheetRequest implements ISaveScratchSheetRequest { + + /** + * Constructs a new SaveScratchSheetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScratchSheetRequest); + + /** SaveScratchSheetRequest timestamp. */ + public timestamp: number; + + /** SaveScratchSheetRequest targetSheet. */ + public targetSheet: number; + + /** SaveScratchSheetRequest targetSquare. */ + public targetSquare: number; + + /** SaveScratchSheetRequest userId. */ + public userId: number; + + /** + * Creates a new SaveScratchSheetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScratchSheetRequest instance + */ + public static create(properties?: wm.protobuf.ISaveScratchSheetRequest): wm.protobuf.SaveScratchSheetRequest; + + /** + * Encodes the specified SaveScratchSheetRequest message. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @param message SaveScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @param message SaveScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScratchSheetRequest; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScratchSheetRequest; + + /** + * Verifies a SaveScratchSheetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScratchSheetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScratchSheetRequest; + + /** + * Creates a plain object from a SaveScratchSheetRequest message. Also converts values to other types if specified. + * @param message SaveScratchSheetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScratchSheetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScratchSheetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScratchSheetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveScratchSheetResponse. */ + interface ISaveScratchSheetResponse { + + /** SaveScratchSheetResponse error */ + error: wm.protobuf.ErrorCode; + + /** SaveScratchSheetResponse scratchSheets */ + scratchSheets?: (wm.protobuf.IScratchSheet[]|null); + + /** SaveScratchSheetResponse currentSheet */ + currentSheet: number; + + /** SaveScratchSheetResponse numOfScratched */ + numOfScratched: number; + + /** SaveScratchSheetResponse earnedItem */ + earnedItem?: (wm.protobuf.IUserItem|null); + } + + /** Represents a SaveScratchSheetResponse. */ + class SaveScratchSheetResponse implements ISaveScratchSheetResponse { + + /** + * Constructs a new SaveScratchSheetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScratchSheetResponse); + + /** SaveScratchSheetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** SaveScratchSheetResponse scratchSheets. */ + public scratchSheets: wm.protobuf.IScratchSheet[]; + + /** SaveScratchSheetResponse currentSheet. */ + public currentSheet: number; + + /** SaveScratchSheetResponse numOfScratched. */ + public numOfScratched: number; + + /** SaveScratchSheetResponse earnedItem. */ + public earnedItem?: (wm.protobuf.IUserItem|null); + + /** + * Creates a new SaveScratchSheetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScratchSheetResponse instance + */ + public static create(properties?: wm.protobuf.ISaveScratchSheetResponse): wm.protobuf.SaveScratchSheetResponse; + + /** + * Encodes the specified SaveScratchSheetResponse message. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @param message SaveScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @param message SaveScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScratchSheetResponse; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScratchSheetResponse; + + /** + * Verifies a SaveScratchSheetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScratchSheetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScratchSheetResponse; + + /** + * Creates a plain object from a SaveScratchSheetResponse message. Also converts values to other types if specified. + * @param message SaveScratchSheetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScratchSheetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScratchSheetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScratchSheetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TurnScratchSheetRequest. */ + interface ITurnScratchSheetRequest { + + /** TurnScratchSheetRequest userId */ + userId: number; + + /** TurnScratchSheetRequest targetSheet */ + targetSheet: number; + } + + /** Represents a TurnScratchSheetRequest. */ + class TurnScratchSheetRequest implements ITurnScratchSheetRequest { + + /** + * Constructs a new TurnScratchSheetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITurnScratchSheetRequest); + + /** TurnScratchSheetRequest userId. */ + public userId: number; + + /** TurnScratchSheetRequest targetSheet. */ + public targetSheet: number; + + /** + * Creates a new TurnScratchSheetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TurnScratchSheetRequest instance + */ + public static create(properties?: wm.protobuf.ITurnScratchSheetRequest): wm.protobuf.TurnScratchSheetRequest; + + /** + * Encodes the specified TurnScratchSheetRequest message. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @param message TurnScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITurnScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TurnScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @param message TurnScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITurnScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TurnScratchSheetRequest; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TurnScratchSheetRequest; + + /** + * Verifies a TurnScratchSheetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TurnScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TurnScratchSheetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TurnScratchSheetRequest; + + /** + * Creates a plain object from a TurnScratchSheetRequest message. Also converts values to other types if specified. + * @param message TurnScratchSheetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TurnScratchSheetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TurnScratchSheetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TurnScratchSheetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TurnScratchSheetResponse. */ + interface ITurnScratchSheetResponse { + + /** TurnScratchSheetResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a TurnScratchSheetResponse. */ + class TurnScratchSheetResponse implements ITurnScratchSheetResponse { + + /** + * Constructs a new TurnScratchSheetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITurnScratchSheetResponse); + + /** TurnScratchSheetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new TurnScratchSheetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TurnScratchSheetResponse instance + */ + public static create(properties?: wm.protobuf.ITurnScratchSheetResponse): wm.protobuf.TurnScratchSheetResponse; + + /** + * Encodes the specified TurnScratchSheetResponse message. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @param message TurnScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITurnScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TurnScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @param message TurnScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITurnScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TurnScratchSheetResponse; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TurnScratchSheetResponse; + + /** + * Verifies a TurnScratchSheetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TurnScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TurnScratchSheetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TurnScratchSheetResponse; + + /** + * Creates a plain object from a TurnScratchSheetResponse message. Also converts values to other types if specified. + * @param message TurnScratchSheetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TurnScratchSheetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TurnScratchSheetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TurnScratchSheetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckItemReceivableCarsRequest. */ + interface ICheckItemReceivableCarsRequest { + + /** CheckItemReceivableCarsRequest userId */ + userId: number; + + /** CheckItemReceivableCarsRequest itemsToBeEarned */ + itemsToBeEarned?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a CheckItemReceivableCarsRequest. */ + class CheckItemReceivableCarsRequest implements ICheckItemReceivableCarsRequest { + + /** + * Constructs a new CheckItemReceivableCarsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICheckItemReceivableCarsRequest); + + /** CheckItemReceivableCarsRequest userId. */ + public userId: number; + + /** CheckItemReceivableCarsRequest itemsToBeEarned. */ + public itemsToBeEarned: wm.protobuf.IUserItem[]; + + /** + * Creates a new CheckItemReceivableCarsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckItemReceivableCarsRequest instance + */ + public static create(properties?: wm.protobuf.ICheckItemReceivableCarsRequest): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @param message CheckItemReceivableCarsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICheckItemReceivableCarsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @param message CheckItemReceivableCarsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICheckItemReceivableCarsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Verifies a CheckItemReceivableCarsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckItemReceivableCarsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckItemReceivableCarsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Creates a plain object from a CheckItemReceivableCarsRequest message. Also converts values to other types if specified. + * @param message CheckItemReceivableCarsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CheckItemReceivableCarsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckItemReceivableCarsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckItemReceivableCarsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckItemReceivableCarsResponse. */ + interface ICheckItemReceivableCarsResponse { + + /** CheckItemReceivableCarsResponse error */ + error: wm.protobuf.ErrorCode; + + /** CheckItemReceivableCarsResponse carIds */ + carIds?: (number[]|null); + } + + /** Represents a CheckItemReceivableCarsResponse. */ + class CheckItemReceivableCarsResponse implements ICheckItemReceivableCarsResponse { + + /** + * Constructs a new CheckItemReceivableCarsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICheckItemReceivableCarsResponse); + + /** CheckItemReceivableCarsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** CheckItemReceivableCarsResponse carIds. */ + public carIds: number[]; + + /** + * Creates a new CheckItemReceivableCarsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckItemReceivableCarsResponse instance + */ + public static create(properties?: wm.protobuf.ICheckItemReceivableCarsResponse): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @param message CheckItemReceivableCarsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICheckItemReceivableCarsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @param message CheckItemReceivableCarsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICheckItemReceivableCarsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Verifies a CheckItemReceivableCarsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckItemReceivableCarsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckItemReceivableCarsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Creates a plain object from a CheckItemReceivableCarsResponse message. Also converts values to other types if specified. + * @param message CheckItemReceivableCarsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CheckItemReceivableCarsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckItemReceivableCarsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckItemReceivableCarsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReceiveUserItemsRequest. */ + interface IReceiveUserItemsRequest { + + /** ReceiveUserItemsRequest carId */ + carId: number; + + /** ReceiveUserItemsRequest targetItemIds */ + targetItemIds?: (number[]|null); + } + + /** Represents a ReceiveUserItemsRequest. */ + class ReceiveUserItemsRequest implements IReceiveUserItemsRequest { + + /** + * Constructs a new ReceiveUserItemsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IReceiveUserItemsRequest); + + /** ReceiveUserItemsRequest carId. */ + public carId: number; + + /** ReceiveUserItemsRequest targetItemIds. */ + public targetItemIds: number[]; + + /** + * Creates a new ReceiveUserItemsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReceiveUserItemsRequest instance + */ + public static create(properties?: wm.protobuf.IReceiveUserItemsRequest): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Encodes the specified ReceiveUserItemsRequest message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @param message ReceiveUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IReceiveUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReceiveUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @param message ReceiveUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IReceiveUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Verifies a ReceiveUserItemsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReceiveUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReceiveUserItemsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Creates a plain object from a ReceiveUserItemsRequest message. Also converts values to other types if specified. + * @param message ReceiveUserItemsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ReceiveUserItemsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReceiveUserItemsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReceiveUserItemsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReceiveUserItemsResponse. */ + interface IReceiveUserItemsResponse { + + /** ReceiveUserItemsResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a ReceiveUserItemsResponse. */ + class ReceiveUserItemsResponse implements IReceiveUserItemsResponse { + + /** + * Constructs a new ReceiveUserItemsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IReceiveUserItemsResponse); + + /** ReceiveUserItemsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new ReceiveUserItemsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReceiveUserItemsResponse instance + */ + public static create(properties?: wm.protobuf.IReceiveUserItemsResponse): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Encodes the specified ReceiveUserItemsResponse message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @param message ReceiveUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IReceiveUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReceiveUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @param message ReceiveUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IReceiveUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Verifies a ReceiveUserItemsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReceiveUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReceiveUserItemsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Creates a plain object from a ReceiveUserItemsResponse message. Also converts values to other types if specified. + * @param message ReceiveUserItemsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ReceiveUserItemsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReceiveUserItemsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReceiveUserItemsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEventModeSerialRequest. */ + interface IUpdateEventModeSerialRequest { + + /** UpdateEventModeSerialRequest eventModeSerial */ + eventModeSerial?: (string|null); + } + + /** Represents an UpdateEventModeSerialRequest. */ + class UpdateEventModeSerialRequest implements IUpdateEventModeSerialRequest { + + /** + * Constructs a new UpdateEventModeSerialRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateEventModeSerialRequest); + + /** UpdateEventModeSerialRequest eventModeSerial. */ + public eventModeSerial: string; + + /** + * Creates a new UpdateEventModeSerialRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEventModeSerialRequest instance + */ + public static create(properties?: wm.protobuf.IUpdateEventModeSerialRequest): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Encodes the specified UpdateEventModeSerialRequest message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @param message UpdateEventModeSerialRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateEventModeSerialRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEventModeSerialRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @param message UpdateEventModeSerialRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateEventModeSerialRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Verifies an UpdateEventModeSerialRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEventModeSerialRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEventModeSerialRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Creates a plain object from an UpdateEventModeSerialRequest message. Also converts values to other types if specified. + * @param message UpdateEventModeSerialRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateEventModeSerialRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEventModeSerialRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEventModeSerialRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEventModeSerialResponse. */ + interface IUpdateEventModeSerialResponse { + + /** UpdateEventModeSerialResponse error */ + error: wm.protobuf.ErrorCode; + + /** UpdateEventModeSerialResponse serialError */ + serialError: wm.protobuf.EventModeSerialErrorCode; + + /** UpdateEventModeSerialResponse eventModeSerial */ + eventModeSerial?: (string|null); + + /** UpdateEventModeSerialResponse startAt */ + startAt?: (number|null); + + /** UpdateEventModeSerialResponse endAt */ + endAt?: (number|null); + } + + /** Represents an UpdateEventModeSerialResponse. */ + class UpdateEventModeSerialResponse implements IUpdateEventModeSerialResponse { + + /** + * Constructs a new UpdateEventModeSerialResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateEventModeSerialResponse); + + /** UpdateEventModeSerialResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** UpdateEventModeSerialResponse serialError. */ + public serialError: wm.protobuf.EventModeSerialErrorCode; + + /** UpdateEventModeSerialResponse eventModeSerial. */ + public eventModeSerial: string; + + /** UpdateEventModeSerialResponse startAt. */ + public startAt: number; + + /** UpdateEventModeSerialResponse endAt. */ + public endAt: number; + + /** + * Creates a new UpdateEventModeSerialResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEventModeSerialResponse instance + */ + public static create(properties?: wm.protobuf.IUpdateEventModeSerialResponse): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Encodes the specified UpdateEventModeSerialResponse message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @param message UpdateEventModeSerialResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateEventModeSerialResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEventModeSerialResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @param message UpdateEventModeSerialResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateEventModeSerialResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Verifies an UpdateEventModeSerialResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEventModeSerialResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEventModeSerialResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Creates a plain object from an UpdateEventModeSerialResponse message. Also converts values to other types if specified. + * @param message UpdateEventModeSerialResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateEventModeSerialResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEventModeSerialResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEventModeSerialResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParticipateInInviteFriendCampaignRequest. */ + interface IParticipateInInviteFriendCampaignRequest { + + /** ParticipateInInviteFriendCampaignRequest invitingUserId */ + invitingUserId: number; + + /** ParticipateInInviteFriendCampaignRequest invitedUserId */ + invitedUserId: number; + + /** ParticipateInInviteFriendCampaignRequest sourceCarId */ + sourceCarId: number; + + /** ParticipateInInviteFriendCampaignRequest transmission */ + transmission: boolean; + } + + /** Represents a ParticipateInInviteFriendCampaignRequest. */ + class ParticipateInInviteFriendCampaignRequest implements IParticipateInInviteFriendCampaignRequest { + + /** + * Constructs a new ParticipateInInviteFriendCampaignRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IParticipateInInviteFriendCampaignRequest); + + /** ParticipateInInviteFriendCampaignRequest invitingUserId. */ + public invitingUserId: number; + + /** ParticipateInInviteFriendCampaignRequest invitedUserId. */ + public invitedUserId: number; + + /** ParticipateInInviteFriendCampaignRequest sourceCarId. */ + public sourceCarId: number; + + /** ParticipateInInviteFriendCampaignRequest transmission. */ + public transmission: boolean; + + /** + * Creates a new ParticipateInInviteFriendCampaignRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ParticipateInInviteFriendCampaignRequest instance + */ + public static create(properties?: wm.protobuf.IParticipateInInviteFriendCampaignRequest): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IParticipateInInviteFriendCampaignRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IParticipateInInviteFriendCampaignRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Verifies a ParticipateInInviteFriendCampaignRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParticipateInInviteFriendCampaignRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParticipateInInviteFriendCampaignRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignRequest message. Also converts values to other types if specified. + * @param message ParticipateInInviteFriendCampaignRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ParticipateInInviteFriendCampaignRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParticipateInInviteFriendCampaignRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParticipateInInviteFriendCampaignResponse. */ + interface IParticipateInInviteFriendCampaignResponse { + + /** ParticipateInInviteFriendCampaignResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a ParticipateInInviteFriendCampaignResponse. */ + class ParticipateInInviteFriendCampaignResponse implements IParticipateInInviteFriendCampaignResponse { + + /** + * Constructs a new ParticipateInInviteFriendCampaignResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IParticipateInInviteFriendCampaignResponse); + + /** ParticipateInInviteFriendCampaignResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new ParticipateInInviteFriendCampaignResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ParticipateInInviteFriendCampaignResponse instance + */ + public static create(properties?: wm.protobuf.IParticipateInInviteFriendCampaignResponse): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IParticipateInInviteFriendCampaignResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IParticipateInInviteFriendCampaignResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Verifies a ParticipateInInviteFriendCampaignResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParticipateInInviteFriendCampaignResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParticipateInInviteFriendCampaignResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignResponse message. Also converts values to other types if specified. + * @param message ParticipateInInviteFriendCampaignResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ParticipateInInviteFriendCampaignResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParticipateInInviteFriendCampaignResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConsumeUserItemRequest. */ + interface IConsumeUserItemRequest { + + /** ConsumeUserItemRequest userId */ + userId: number; + + /** ConsumeUserItemRequest carId */ + carId: number; + + /** ConsumeUserItemRequest userItemId */ + userItemId: number; + } + + /** Represents a ConsumeUserItemRequest. */ + class ConsumeUserItemRequest implements IConsumeUserItemRequest { + + /** + * Constructs a new ConsumeUserItemRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IConsumeUserItemRequest); + + /** ConsumeUserItemRequest userId. */ + public userId: number; + + /** ConsumeUserItemRequest carId. */ + public carId: number; + + /** ConsumeUserItemRequest userItemId. */ + public userItemId: number; + + /** + * Creates a new ConsumeUserItemRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ConsumeUserItemRequest instance + */ + public static create(properties?: wm.protobuf.IConsumeUserItemRequest): wm.protobuf.ConsumeUserItemRequest; + + /** + * Encodes the specified ConsumeUserItemRequest message. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @param message ConsumeUserItemRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IConsumeUserItemRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConsumeUserItemRequest message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @param message ConsumeUserItemRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IConsumeUserItemRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ConsumeUserItemRequest; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ConsumeUserItemRequest; + + /** + * Verifies a ConsumeUserItemRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConsumeUserItemRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConsumeUserItemRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ConsumeUserItemRequest; + + /** + * Creates a plain object from a ConsumeUserItemRequest message. Also converts values to other types if specified. + * @param message ConsumeUserItemRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ConsumeUserItemRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConsumeUserItemRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConsumeUserItemRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConsumeUserItemResponse. */ + interface IConsumeUserItemResponse { + + /** ConsumeUserItemResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a ConsumeUserItemResponse. */ + class ConsumeUserItemResponse implements IConsumeUserItemResponse { + + /** + * Constructs a new ConsumeUserItemResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IConsumeUserItemResponse); + + /** ConsumeUserItemResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new ConsumeUserItemResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ConsumeUserItemResponse instance + */ + public static create(properties?: wm.protobuf.IConsumeUserItemResponse): wm.protobuf.ConsumeUserItemResponse; + + /** + * Encodes the specified ConsumeUserItemResponse message. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @param message ConsumeUserItemResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IConsumeUserItemResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConsumeUserItemResponse message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @param message ConsumeUserItemResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IConsumeUserItemResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ConsumeUserItemResponse; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ConsumeUserItemResponse; + + /** + * Verifies a ConsumeUserItemResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConsumeUserItemResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConsumeUserItemResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ConsumeUserItemResponse; + + /** + * Creates a plain object from a ConsumeUserItemResponse message. Also converts values to other types if specified. + * @param message ConsumeUserItemResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ConsumeUserItemResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConsumeUserItemResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConsumeUserItemResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchCarsByLevelRequest. */ + interface ISearchCarsByLevelRequest { + + /** SearchCarsByLevelRequest carId */ + carId: number; + + /** SearchCarsByLevelRequest ghostLevel */ + ghostLevel: number; + + /** SearchCarsByLevelRequest area */ + area: number; + + /** SearchCarsByLevelRequest regionId */ + regionId?: (number|null); + } + + /** Represents a SearchCarsByLevelRequest. */ + class SearchCarsByLevelRequest implements ISearchCarsByLevelRequest { + + /** + * Constructs a new SearchCarsByLevelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISearchCarsByLevelRequest); + + /** SearchCarsByLevelRequest carId. */ + public carId: number; + + /** SearchCarsByLevelRequest ghostLevel. */ + public ghostLevel: number; + + /** SearchCarsByLevelRequest area. */ + public area: number; + + /** SearchCarsByLevelRequest regionId. */ + public regionId: number; + + /** + * Creates a new SearchCarsByLevelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchCarsByLevelRequest instance + */ + public static create(properties?: wm.protobuf.ISearchCarsByLevelRequest): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Encodes the specified SearchCarsByLevelRequest message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @param message SearchCarsByLevelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISearchCarsByLevelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchCarsByLevelRequest message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @param message SearchCarsByLevelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISearchCarsByLevelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Verifies a SearchCarsByLevelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchCarsByLevelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchCarsByLevelRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Creates a plain object from a SearchCarsByLevelRequest message. Also converts values to other types if specified. + * @param message SearchCarsByLevelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SearchCarsByLevelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchCarsByLevelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchCarsByLevelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchCarsByLevelResponse. */ + interface ISearchCarsByLevelResponse { + + /** SearchCarsByLevelResponse error */ + error: wm.protobuf.ErrorCode; + + /** SearchCarsByLevelResponse ramp */ + ramp: number; + + /** SearchCarsByLevelResponse path */ + path: number; + + /** SearchCarsByLevelResponse ghosts */ + ghosts?: (wm.protobuf.IGhostCar[]|null); + + /** SearchCarsByLevelResponse selectionMethod */ + selectionMethod: wm.protobuf.PathSelectionMethod; + + /** SearchCarsByLevelResponse rates */ + rates?: (wm.protobuf.SearchCarsByLevelResponse.IRate[]|null); + } + + /** Represents a SearchCarsByLevelResponse. */ + class SearchCarsByLevelResponse implements ISearchCarsByLevelResponse { + + /** + * Constructs a new SearchCarsByLevelResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISearchCarsByLevelResponse); + + /** SearchCarsByLevelResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** SearchCarsByLevelResponse ramp. */ + public ramp: number; + + /** SearchCarsByLevelResponse path. */ + public path: number; + + /** SearchCarsByLevelResponse ghosts. */ + public ghosts: wm.protobuf.IGhostCar[]; + + /** SearchCarsByLevelResponse selectionMethod. */ + public selectionMethod: wm.protobuf.PathSelectionMethod; + + /** SearchCarsByLevelResponse rates. */ + public rates: wm.protobuf.SearchCarsByLevelResponse.IRate[]; + + /** + * Creates a new SearchCarsByLevelResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchCarsByLevelResponse instance + */ + public static create(properties?: wm.protobuf.ISearchCarsByLevelResponse): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Encodes the specified SearchCarsByLevelResponse message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @param message SearchCarsByLevelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISearchCarsByLevelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchCarsByLevelResponse message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @param message SearchCarsByLevelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISearchCarsByLevelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Verifies a SearchCarsByLevelResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchCarsByLevelResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchCarsByLevelResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Creates a plain object from a SearchCarsByLevelResponse message. Also converts values to other types if specified. + * @param message SearchCarsByLevelResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SearchCarsByLevelResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchCarsByLevelResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchCarsByLevelResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SearchCarsByLevelResponse { + + /** Properties of a Rate. */ + interface IRate { + + /** Rate carId */ + carId: number; + + /** Rate type */ + type: wm.protobuf.GhostRateType; + + /** Rate rate */ + rate?: (number|null); + } + + /** Represents a Rate. */ + class Rate implements IRate { + + /** + * Constructs a new Rate. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SearchCarsByLevelResponse.IRate); + + /** Rate carId. */ + public carId: number; + + /** Rate type. */ + public type: wm.protobuf.GhostRateType; + + /** Rate rate. */ + public rate: number; + + /** + * Creates a new Rate instance using the specified properties. + * @param [properties] Properties to set + * @returns Rate instance + */ + public static create(properties?: wm.protobuf.SearchCarsByLevelResponse.IRate): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Encodes the specified Rate message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @param message Rate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SearchCarsByLevelResponse.IRate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Rate message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @param message Rate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SearchCarsByLevelResponse.IRate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Rate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Decodes a Rate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Verifies a Rate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Rate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Rate + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Creates a plain object from a Rate message. Also converts values to other types if specified. + * @param message Rate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SearchCarsByLevelResponse.Rate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Rate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Rate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadPathsAndTuningsRequest. */ + interface ILoadPathsAndTuningsRequest { + + /** LoadPathsAndTuningsRequest carId */ + carId: number; + + /** LoadPathsAndTuningsRequest selectedCars */ + selectedCars?: (number[]|null); + + /** LoadPathsAndTuningsRequest returnImmediately */ + returnImmediately?: (boolean|null); + + /** LoadPathsAndTuningsRequest stampTargetArea */ + stampTargetArea?: (number|null); + } + + /** Represents a LoadPathsAndTuningsRequest. */ + class LoadPathsAndTuningsRequest implements ILoadPathsAndTuningsRequest { + + /** + * Constructs a new LoadPathsAndTuningsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadPathsAndTuningsRequest); + + /** LoadPathsAndTuningsRequest carId. */ + public carId: number; + + /** LoadPathsAndTuningsRequest selectedCars. */ + public selectedCars: number[]; + + /** LoadPathsAndTuningsRequest returnImmediately. */ + public returnImmediately: boolean; + + /** LoadPathsAndTuningsRequest stampTargetArea. */ + public stampTargetArea: number; + + /** + * Creates a new LoadPathsAndTuningsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadPathsAndTuningsRequest instance + */ + public static create(properties?: wm.protobuf.ILoadPathsAndTuningsRequest): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @param message LoadPathsAndTuningsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadPathsAndTuningsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @param message LoadPathsAndTuningsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadPathsAndTuningsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Verifies a LoadPathsAndTuningsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadPathsAndTuningsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadPathsAndTuningsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Creates a plain object from a LoadPathsAndTuningsRequest message. Also converts values to other types if specified. + * @param message LoadPathsAndTuningsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadPathsAndTuningsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadPathsAndTuningsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadPathsAndTuningsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadPathsAndTuningsResponse. */ + interface ILoadPathsAndTuningsResponse { + + /** LoadPathsAndTuningsResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadPathsAndTuningsResponse data */ + data?: (wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath[]|null); + } + + /** Represents a LoadPathsAndTuningsResponse. */ + class LoadPathsAndTuningsResponse implements ILoadPathsAndTuningsResponse { + + /** + * Constructs a new LoadPathsAndTuningsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadPathsAndTuningsResponse); + + /** LoadPathsAndTuningsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadPathsAndTuningsResponse data. */ + public data: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath[]; + + /** + * Creates a new LoadPathsAndTuningsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadPathsAndTuningsResponse instance + */ + public static create(properties?: wm.protobuf.ILoadPathsAndTuningsResponse): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @param message LoadPathsAndTuningsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadPathsAndTuningsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @param message LoadPathsAndTuningsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadPathsAndTuningsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Verifies a LoadPathsAndTuningsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadPathsAndTuningsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadPathsAndTuningsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Creates a plain object from a LoadPathsAndTuningsResponse message. Also converts values to other types if specified. + * @param message LoadPathsAndTuningsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadPathsAndTuningsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadPathsAndTuningsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadPathsAndTuningsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadPathsAndTuningsResponse { + + /** Properties of a CarTuningsByPath. */ + interface ICarTuningsByPath { + + /** CarTuningsByPath area */ + area: number; + + /** CarTuningsByPath ramp */ + ramp: number; + + /** CarTuningsByPath path */ + path: number; + + /** CarTuningsByPath carTunings */ + carTunings?: (wm.protobuf.ICarTuning[]|null); + + /** CarTuningsByPath selectionMethod */ + selectionMethod: wm.protobuf.PathSelectionMethod; + } + + /** Represents a CarTuningsByPath. */ + class CarTuningsByPath implements ICarTuningsByPath { + + /** + * Constructs a new CarTuningsByPath. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath); + + /** CarTuningsByPath area. */ + public area: number; + + /** CarTuningsByPath ramp. */ + public ramp: number; + + /** CarTuningsByPath path. */ + public path: number; + + /** CarTuningsByPath carTunings. */ + public carTunings: wm.protobuf.ICarTuning[]; + + /** CarTuningsByPath selectionMethod. */ + public selectionMethod: wm.protobuf.PathSelectionMethod; + + /** + * Creates a new CarTuningsByPath instance using the specified properties. + * @param [properties] Properties to set + * @returns CarTuningsByPath instance + */ + public static create(properties?: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Encodes the specified CarTuningsByPath message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @param message CarTuningsByPath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarTuningsByPath message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @param message CarTuningsByPath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Verifies a CarTuningsByPath message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarTuningsByPath message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarTuningsByPath + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Creates a plain object from a CarTuningsByPath message. Also converts values to other types if specified. + * @param message CarTuningsByPath + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarTuningsByPath to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarTuningsByPath + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadGhostDriveDataRequest. */ + interface ILoadGhostDriveDataRequest { + + /** LoadGhostDriveDataRequest path */ + path: number; + + /** LoadGhostDriveDataRequest carTunings */ + carTunings?: (wm.protobuf.ICarTuning[]|null); + } + + /** Represents a LoadGhostDriveDataRequest. */ + class LoadGhostDriveDataRequest implements ILoadGhostDriveDataRequest { + + /** + * Constructs a new LoadGhostDriveDataRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostDriveDataRequest); + + /** LoadGhostDriveDataRequest path. */ + public path: number; + + /** LoadGhostDriveDataRequest carTunings. */ + public carTunings: wm.protobuf.ICarTuning[]; + + /** + * Creates a new LoadGhostDriveDataRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostDriveDataRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostDriveDataRequest): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Encodes the specified LoadGhostDriveDataRequest message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @param message LoadGhostDriveDataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostDriveDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostDriveDataRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @param message LoadGhostDriveDataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostDriveDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Verifies a LoadGhostDriveDataRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostDriveDataRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostDriveDataRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Creates a plain object from a LoadGhostDriveDataRequest message. Also converts values to other types if specified. + * @param message LoadGhostDriveDataRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostDriveDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostDriveDataRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostDriveDataRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostDriveDataResponse. */ + interface ILoadGhostDriveDataResponse { + + /** LoadGhostDriveDataResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostDriveDataResponse data */ + data?: (wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData[]|null); + } + + /** Represents a LoadGhostDriveDataResponse. */ + class LoadGhostDriveDataResponse implements ILoadGhostDriveDataResponse { + + /** + * Constructs a new LoadGhostDriveDataResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostDriveDataResponse); + + /** LoadGhostDriveDataResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostDriveDataResponse data. */ + public data: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData[]; + + /** + * Creates a new LoadGhostDriveDataResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostDriveDataResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostDriveDataResponse): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Encodes the specified LoadGhostDriveDataResponse message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @param message LoadGhostDriveDataResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostDriveDataResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostDriveDataResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @param message LoadGhostDriveDataResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostDriveDataResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Verifies a LoadGhostDriveDataResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostDriveDataResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostDriveDataResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Creates a plain object from a LoadGhostDriveDataResponse message. Also converts values to other types if specified. + * @param message LoadGhostDriveDataResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostDriveDataResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostDriveDataResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostDriveDataResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGhostDriveDataResponse { + + /** Properties of a GhostDriveData. */ + interface IGhostDriveData { + + /** GhostDriveData carId */ + carId: number; + + /** GhostDriveData type */ + type: wm.protobuf.GhostType; + + /** GhostDriveData driveData */ + driveData?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByUser */ + trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByCar */ + trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByArea */ + trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + } + + /** Represents a GhostDriveData. */ + class GhostDriveData implements IGhostDriveData { + + /** + * Constructs a new GhostDriveData. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData); + + /** GhostDriveData carId. */ + public carId: number; + + /** GhostDriveData type. */ + public type: wm.protobuf.GhostType; + + /** GhostDriveData driveData. */ + public driveData?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByUser. */ + public trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByCar. */ + public trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByArea. */ + public trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + + /** + * Creates a new GhostDriveData instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostDriveData instance + */ + public static create(properties?: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Encodes the specified GhostDriveData message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @param message GhostDriveData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostDriveData message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @param message GhostDriveData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Verifies a GhostDriveData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostDriveData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostDriveData + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Creates a plain object from a GhostDriveData message. Also converts values to other types if specified. + * @param message GhostDriveData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostDriveData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostDriveData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Car. */ + interface ICar { + + /** Car carId */ + carId?: (number|null); + + /** Car userId */ + userId?: (number|null); + + /** Car regionId */ + regionId?: (number|null); + + /** Car name */ + name?: (string|null); + + /** Car manufacturer */ + manufacturer?: (number|null); + + /** Car model */ + model?: (number|null); + + /** Car visualModel */ + visualModel?: (number|null); + + /** Car defaultColor */ + defaultColor?: (number|null); + + /** Car customColor */ + customColor: number; + + /** Car wheel */ + wheel: number; + + /** Car wheelColor */ + wheelColor: number; + + /** Car aero */ + aero: number; + + /** Car bonnet */ + bonnet: number; + + /** Car wing */ + wing: number; + + /** Car gtWing */ + gtWing?: (wm.protobuf.IGTWing|null); + + /** Car mirror */ + mirror: number; + + /** Car neon */ + neon: number; + + /** Car trunk */ + trunk: number; + + /** Car plate */ + plate: number; + + /** Car plateColor */ + plateColor: number; + + /** Car plateNumber */ + plateNumber: number; + + /** Car tunePower */ + tunePower: number; + + /** Car tuneHandling */ + tuneHandling: number; + + /** Car title */ + title: string; + + /** Car level */ + level: number; + + /** Car windowSticker */ + windowSticker?: (boolean|null); + + /** Car windowStickerString */ + windowStickerString?: (string|null); + + /** Car windowStickerFont */ + windowStickerFont?: (number|null); + + /** Car windowDecoration */ + windowDecoration?: (number|null); + + /** Car rivalMarker */ + rivalMarker?: (number|null); + + /** Car lastPlayedAt */ + lastPlayedAt?: (number|null); + + /** Car lastPlayedPlace */ + lastPlayedPlace?: (wm.protobuf.IPlace|null); + + /** Car aura */ + aura?: (number|null); + + /** Car auraMotif */ + auraMotif?: (number|null); + + /** Car ghostLevel */ + ghostLevel?: (number|null); + + /** Car country */ + country?: (string|null); + + /** Car searchCode */ + searchCode?: (string|null); + } + + /** Represents a Car. */ + class Car implements ICar { + + /** + * Constructs a new Car. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICar); + + /** Car carId. */ + public carId: number; + + /** Car userId. */ + public userId: number; + + /** Car regionId. */ + public regionId: number; + + /** Car name. */ + public name: string; + + /** Car manufacturer. */ + public manufacturer: number; + + /** Car model. */ + public model: number; + + /** Car visualModel. */ + public visualModel: number; + + /** Car defaultColor. */ + public defaultColor: number; + + /** Car customColor. */ + public customColor: number; + + /** Car wheel. */ + public wheel: number; + + /** Car wheelColor. */ + public wheelColor: number; + + /** Car aero. */ + public aero: number; + + /** Car bonnet. */ + public bonnet: number; + + /** Car wing. */ + public wing: number; + + /** Car gtWing. */ + public gtWing?: (wm.protobuf.IGTWing|null); + + /** Car mirror. */ + public mirror: number; + + /** Car neon. */ + public neon: number; + + /** Car trunk. */ + public trunk: number; + + /** Car plate. */ + public plate: number; + + /** Car plateColor. */ + public plateColor: number; + + /** Car plateNumber. */ + public plateNumber: number; + + /** Car tunePower. */ + public tunePower: number; + + /** Car tuneHandling. */ + public tuneHandling: number; + + /** Car title. */ + public title: string; + + /** Car level. */ + public level: number; + + /** Car windowSticker. */ + public windowSticker: boolean; + + /** Car windowStickerString. */ + public windowStickerString: string; + + /** Car windowStickerFont. */ + public windowStickerFont: number; + + /** Car windowDecoration. */ + public windowDecoration: number; + + /** Car rivalMarker. */ + public rivalMarker: number; + + /** Car lastPlayedAt. */ + public lastPlayedAt: number; + + /** Car lastPlayedPlace. */ + public lastPlayedPlace?: (wm.protobuf.IPlace|null); + + /** Car aura. */ + public aura: number; + + /** Car auraMotif. */ + public auraMotif: number; + + /** Car ghostLevel. */ + public ghostLevel: number; + + /** Car country. */ + public country: string; + + /** Car searchCode. */ + public searchCode: string; + + /** + * Creates a new Car instance using the specified properties. + * @param [properties] Properties to set + * @returns Car instance + */ + public static create(properties?: wm.protobuf.ICar): wm.protobuf.Car; + + /** + * Encodes the specified Car message. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @param message Car message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Car message, length delimited. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @param message Car message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Car message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Car; + + /** + * Decodes a Car message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Car; + + /** + * Verifies a Car message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Car message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Car + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Car; + + /** + * Creates a plain object from a Car message. Also converts values to other types if specified. + * @param message Car + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Car, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Car to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Car + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarSetting. */ + interface ICarSetting { + + /** CarSetting carId */ + carId?: (number|null); + + /** CarSetting view */ + view: boolean; + + /** CarSetting transmission */ + transmission: boolean; + + /** CarSetting retire */ + retire: boolean; + + /** CarSetting meter */ + meter: number; + + /** CarSetting navigationMap */ + navigationMap: boolean; + + /** CarSetting volume */ + volume: number; + + /** CarSetting bgm */ + bgm: number; + + /** CarSetting nameplate */ + nameplate: number; + + /** CarSetting nameplateColor */ + nameplateColor: number; + + /** CarSetting terminalBackground */ + terminalBackground: number; + } + + /** Represents a CarSetting. */ + class CarSetting implements ICarSetting { + + /** + * Constructs a new CarSetting. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarSetting); + + /** CarSetting carId. */ + public carId: number; + + /** CarSetting view. */ + public view: boolean; + + /** CarSetting transmission. */ + public transmission: boolean; + + /** CarSetting retire. */ + public retire: boolean; + + /** CarSetting meter. */ + public meter: number; + + /** CarSetting navigationMap. */ + public navigationMap: boolean; + + /** CarSetting volume. */ + public volume: number; + + /** CarSetting bgm. */ + public bgm: number; + + /** CarSetting nameplate. */ + public nameplate: number; + + /** CarSetting nameplateColor. */ + public nameplateColor: number; + + /** CarSetting terminalBackground. */ + public terminalBackground: number; + + /** + * Creates a new CarSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns CarSetting instance + */ + public static create(properties?: wm.protobuf.ICarSetting): wm.protobuf.CarSetting; + + /** + * Encodes the specified CarSetting message. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @param message CarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarSetting message, length delimited. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @param message CarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarSetting; + + /** + * Decodes a CarSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarSetting; + + /** + * Verifies a CarSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarSetting + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarSetting; + + /** + * Creates a plain object from a CarSetting message. Also converts values to other types if specified. + * @param message CarSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GTWing. */ + interface IGTWing { + + /** GTWing pillar */ + pillar: number; + + /** GTWing pillarMaterial */ + pillarMaterial: number; + + /** GTWing mainWing */ + mainWing: number; + + /** GTWing mainWingColor */ + mainWingColor: number; + + /** GTWing wingTip */ + wingTip: number; + + /** GTWing material */ + material: number; + } + + /** Represents a GTWing. */ + class GTWing implements IGTWing { + + /** + * Constructs a new GTWing. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGTWing); + + /** GTWing pillar. */ + public pillar: number; + + /** GTWing pillarMaterial. */ + public pillarMaterial: number; + + /** GTWing mainWing. */ + public mainWing: number; + + /** GTWing mainWingColor. */ + public mainWingColor: number; + + /** GTWing wingTip. */ + public wingTip: number; + + /** GTWing material. */ + public material: number; + + /** + * Creates a new GTWing instance using the specified properties. + * @param [properties] Properties to set + * @returns GTWing instance + */ + public static create(properties?: wm.protobuf.IGTWing): wm.protobuf.GTWing; + + /** + * Encodes the specified GTWing message. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @param message GTWing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGTWing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GTWing message, length delimited. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @param message GTWing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGTWing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GTWing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GTWing; + + /** + * Decodes a GTWing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GTWing; + + /** + * Verifies a GTWing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GTWing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GTWing + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GTWing; + + /** + * Creates a plain object from a GTWing message. Also converts values to other types if specified. + * @param message GTWing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GTWing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GTWing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GTWing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarItem. */ + interface ICarItem { + + /** CarItem category */ + category: wm.protobuf.ItemCategory; + + /** CarItem itemId */ + itemId: number; + + /** CarItem amount */ + amount?: (number|null); + } + + /** Represents a CarItem. */ + class CarItem implements ICarItem { + + /** + * Constructs a new CarItem. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarItem); + + /** CarItem category. */ + public category: wm.protobuf.ItemCategory; + + /** CarItem itemId. */ + public itemId: number; + + /** CarItem amount. */ + public amount: number; + + /** + * Creates a new CarItem instance using the specified properties. + * @param [properties] Properties to set + * @returns CarItem instance + */ + public static create(properties?: wm.protobuf.ICarItem): wm.protobuf.CarItem; + + /** + * Encodes the specified CarItem message. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @param message CarItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarItem message, length delimited. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @param message CarItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarItem; + + /** + * Decodes a CarItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarItem; + + /** + * Verifies a CarItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarItem + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarItem; + + /** + * Creates a plain object from a CarItem message. Also converts values to other types if specified. + * @param message CarItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CopiedCar. */ + interface ICopiedCar { + + /** CopiedCar car */ + car: wm.protobuf.ICar; + + /** CopiedCar remainingPlayCounts */ + remainingPlayCounts: number; + } + + /** Represents a CopiedCar. */ + class CopiedCar implements ICopiedCar { + + /** + * Constructs a new CopiedCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICopiedCar); + + /** CopiedCar car. */ + public car: wm.protobuf.ICar; + + /** CopiedCar remainingPlayCounts. */ + public remainingPlayCounts: number; + + /** + * Creates a new CopiedCar instance using the specified properties. + * @param [properties] Properties to set + * @returns CopiedCar instance + */ + public static create(properties?: wm.protobuf.ICopiedCar): wm.protobuf.CopiedCar; + + /** + * Encodes the specified CopiedCar message. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @param message CopiedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICopiedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CopiedCar message, length delimited. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @param message CopiedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICopiedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CopiedCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CopiedCar; + + /** + * Decodes a CopiedCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CopiedCar; + + /** + * Verifies a CopiedCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CopiedCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CopiedCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CopiedCar; + + /** + * Creates a plain object from a CopiedCar message. Also converts values to other types if specified. + * @param message CopiedCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CopiedCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CopiedCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CopiedCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FriendCar. */ + interface IFriendCar { + + /** FriendCar car */ + car: wm.protobuf.ICar; + + /** FriendCar friendshipLevel */ + friendshipLevel?: (number|null); + + /** FriendCar nonhuman */ + nonhuman: boolean; + } + + /** Represents a FriendCar. */ + class FriendCar implements IFriendCar { + + /** + * Constructs a new FriendCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IFriendCar); + + /** FriendCar car. */ + public car: wm.protobuf.ICar; + + /** FriendCar friendshipLevel. */ + public friendshipLevel: number; + + /** FriendCar nonhuman. */ + public nonhuman: boolean; + + /** + * Creates a new FriendCar instance using the specified properties. + * @param [properties] Properties to set + * @returns FriendCar instance + */ + public static create(properties?: wm.protobuf.IFriendCar): wm.protobuf.FriendCar; + + /** + * Encodes the specified FriendCar message. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @param message FriendCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IFriendCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FriendCar message, length delimited. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @param message FriendCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IFriendCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FriendCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.FriendCar; + + /** + * Decodes a FriendCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.FriendCar; + + /** + * Verifies a FriendCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FriendCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FriendCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.FriendCar; + + /** + * Creates a plain object from a FriendCar message. Also converts values to other types if specified. + * @param message FriendCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.FriendCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FriendCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FriendCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChallengerCar. */ + interface IChallengerCar { + + /** ChallengerCar car */ + car: wm.protobuf.ICar; + + /** ChallengerCar stamp */ + stamp: number; + + /** ChallengerCar result */ + result: number; + + /** ChallengerCar area */ + area: number; + } + + /** Represents a ChallengerCar. */ + class ChallengerCar implements IChallengerCar { + + /** + * Constructs a new ChallengerCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IChallengerCar); + + /** ChallengerCar car. */ + public car: wm.protobuf.ICar; + + /** ChallengerCar stamp. */ + public stamp: number; + + /** ChallengerCar result. */ + public result: number; + + /** ChallengerCar area. */ + public area: number; + + /** + * Creates a new ChallengerCar instance using the specified properties. + * @param [properties] Properties to set + * @returns ChallengerCar instance + */ + public static create(properties?: wm.protobuf.IChallengerCar): wm.protobuf.ChallengerCar; + + /** + * Encodes the specified ChallengerCar message. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @param message ChallengerCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IChallengerCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChallengerCar message, length delimited. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @param message ChallengerCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IChallengerCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ChallengerCar; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ChallengerCar; + + /** + * Verifies a ChallengerCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChallengerCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChallengerCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ChallengerCar; + + /** + * Creates a plain object from a ChallengerCar message. Also converts values to other types if specified. + * @param message ChallengerCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ChallengerCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChallengerCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChallengerCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StampTargetCar. */ + interface IStampTargetCar { + + /** StampTargetCar car */ + car: wm.protobuf.ICar; + + /** StampTargetCar returnCount */ + returnCount: number; + + /** StampTargetCar locked */ + locked: boolean; + + /** StampTargetCar recommended */ + recommended: boolean; + } + + /** Represents a StampTargetCar. */ + class StampTargetCar implements IStampTargetCar { + + /** + * Constructs a new StampTargetCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IStampTargetCar); + + /** StampTargetCar car. */ + public car: wm.protobuf.ICar; + + /** StampTargetCar returnCount. */ + public returnCount: number; + + /** StampTargetCar locked. */ + public locked: boolean; + + /** StampTargetCar recommended. */ + public recommended: boolean; + + /** + * Creates a new StampTargetCar instance using the specified properties. + * @param [properties] Properties to set + * @returns StampTargetCar instance + */ + public static create(properties?: wm.protobuf.IStampTargetCar): wm.protobuf.StampTargetCar; + + /** + * Encodes the specified StampTargetCar message. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @param message StampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @param message StampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.StampTargetCar; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.StampTargetCar; + + /** + * Verifies a StampTargetCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StampTargetCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StampTargetCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.StampTargetCar; + + /** + * Creates a plain object from a StampTargetCar message. Also converts values to other types if specified. + * @param message StampTargetCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.StampTargetCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StampTargetCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StampTargetCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BookmarkedCar. */ + interface IBookmarkedCar { + + /** BookmarkedCar car */ + car: wm.protobuf.ICar; + + /** BookmarkedCar returnCount */ + returnCount: number; + } + + /** Represents a BookmarkedCar. */ + class BookmarkedCar implements IBookmarkedCar { + + /** + * Constructs a new BookmarkedCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IBookmarkedCar); + + /** BookmarkedCar car. */ + public car: wm.protobuf.ICar; + + /** BookmarkedCar returnCount. */ + public returnCount: number; + + /** + * Creates a new BookmarkedCar instance using the specified properties. + * @param [properties] Properties to set + * @returns BookmarkedCar instance + */ + public static create(properties?: wm.protobuf.IBookmarkedCar): wm.protobuf.BookmarkedCar; + + /** + * Encodes the specified BookmarkedCar message. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @param message BookmarkedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IBookmarkedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BookmarkedCar message, length delimited. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @param message BookmarkedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IBookmarkedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.BookmarkedCar; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.BookmarkedCar; + + /** + * Verifies a BookmarkedCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BookmarkedCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BookmarkedCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.BookmarkedCar; + + /** + * Creates a plain object from a BookmarkedCar message. Also converts values to other types if specified. + * @param message BookmarkedCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.BookmarkedCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BookmarkedCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BookmarkedCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PreviousVersionStampTargetCar. */ + interface IPreviousVersionStampTargetCar { + + /** PreviousVersionStampTargetCar car */ + car: wm.protobuf.ICar; + + /** PreviousVersionStampTargetCar returnCount */ + returnCount: number; + + /** PreviousVersionStampTargetCar currentCarId */ + currentCarId?: (number|null); + } + + /** Represents a PreviousVersionStampTargetCar. */ + class PreviousVersionStampTargetCar implements IPreviousVersionStampTargetCar { + + /** + * Constructs a new PreviousVersionStampTargetCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPreviousVersionStampTargetCar); + + /** PreviousVersionStampTargetCar car. */ + public car: wm.protobuf.ICar; + + /** PreviousVersionStampTargetCar returnCount. */ + public returnCount: number; + + /** PreviousVersionStampTargetCar currentCarId. */ + public currentCarId: number; + + /** + * Creates a new PreviousVersionStampTargetCar instance using the specified properties. + * @param [properties] Properties to set + * @returns PreviousVersionStampTargetCar instance + */ + public static create(properties?: wm.protobuf.IPreviousVersionStampTargetCar): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Encodes the specified PreviousVersionStampTargetCar message. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @param message PreviousVersionStampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPreviousVersionStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreviousVersionStampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @param message PreviousVersionStampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPreviousVersionStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Verifies a PreviousVersionStampTargetCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PreviousVersionStampTargetCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreviousVersionStampTargetCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Creates a plain object from a PreviousVersionStampTargetCar message. Also converts values to other types if specified. + * @param message PreviousVersionStampTargetCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PreviousVersionStampTargetCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreviousVersionStampTargetCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PreviousVersionStampTargetCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCar. */ + interface IGhostCar { + + /** GhostCar car */ + car: wm.protobuf.ICar; + + /** GhostCar area */ + area?: (number|null); + + /** GhostCar ramp */ + ramp?: (number|null); + + /** GhostCar path */ + path?: (number|null); + + /** GhostCar nonhuman */ + nonhuman?: (boolean|null); + + /** GhostCar type */ + type?: (wm.protobuf.GhostType|null); + + /** GhostCar trailId */ + trailId?: (number|Long|null); + } + + /** Represents a GhostCar. */ + class GhostCar implements IGhostCar { + + /** + * Constructs a new GhostCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCar); + + /** GhostCar car. */ + public car: wm.protobuf.ICar; + + /** GhostCar area. */ + public area: number; + + /** GhostCar ramp. */ + public ramp: number; + + /** GhostCar path. */ + public path: number; + + /** GhostCar nonhuman. */ + public nonhuman: boolean; + + /** GhostCar type. */ + public type: wm.protobuf.GhostType; + + /** GhostCar trailId. */ + public trailId: (number|Long); + + /** + * Creates a new GhostCar instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCar instance + */ + public static create(properties?: wm.protobuf.IGhostCar): wm.protobuf.GhostCar; + + /** + * Encodes the specified GhostCar message. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @param message GhostCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCar message, length delimited. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @param message GhostCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCar; + + /** + * Decodes a GhostCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCar; + + /** + * Verifies a GhostCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCar; + + /** + * Creates a plain object from a GhostCar message. Also converts values to other types if specified. + * @param message GhostCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Place. */ + interface IPlace { + + /** Place placeId */ + placeId: string; + + /** Place shopName */ + shopName: string; + + /** Place regionId */ + regionId: number; + + /** Place country */ + country: string; + } + + /** Represents a Place. */ + class Place implements IPlace { + + /** + * Constructs a new Place. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPlace); + + /** Place placeId. */ + public placeId: string; + + /** Place shopName. */ + public shopName: string; + + /** Place regionId. */ + public regionId: number; + + /** Place country. */ + public country: string; + + /** + * Creates a new Place instance using the specified properties. + * @param [properties] Properties to set + * @returns Place instance + */ + public static create(properties?: wm.protobuf.IPlace): wm.protobuf.Place; + + /** + * Encodes the specified Place message. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @param message Place message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Place message, length delimited. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @param message Place message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Place message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Place; + + /** + * Decodes a Place message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Place; + + /** + * Verifies a Place message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Place message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Place + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Place; + + /** + * Creates a plain object from a Place message. Also converts values to other types if specified. + * @param message Place + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Place, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Place to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Place + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SystemSetting. */ + interface ISystemSetting { + + /** SystemSetting mCoinChute */ + mCoinChute: number; + + /** SystemSetting mBuyCardCost */ + mBuyCardCost: number; + + /** SystemSetting mGameCost */ + mGameCost: number; + + /** SystemSetting mContinueCost */ + mContinueCost: number; + + /** SystemSetting mFullCourseCost */ + mFullCourseCost: number; + + /** SystemSetting mFreePlay */ + mFreePlay: boolean; + + /** SystemSetting mPcbId */ + mPcbId?: (number|null); + + /** SystemSetting mIcCardRw */ + mIcCardRw: boolean; + + /** SystemSetting mIcCardVender */ + mIcCardVender: boolean; + + /** SystemSetting mMgCardRw */ + mMgCardRw?: (boolean|null); + + /** SystemSetting mForceFeedback */ + mForceFeedback?: (boolean|null); + + /** SystemSetting mWinsAndRemains */ + mWinsAndRemains: boolean; + + /** SystemSetting mEventMode */ + mEventMode: number; + + /** SystemSetting mEventModeDist */ + mEventModeDist: boolean; + + /** SystemSetting mCloseType */ + mCloseType: number; + + /** SystemSetting mCloseSun */ + mCloseSun: number; + + /** SystemSetting mCloseMon */ + mCloseMon: number; + + /** SystemSetting mCloseTue */ + mCloseTue: number; + + /** SystemSetting mCloseWed */ + mCloseWed: number; + + /** SystemSetting mCloseThu */ + mCloseThu: number; + + /** SystemSetting mCloseFri */ + mCloseFri: number; + + /** SystemSetting mCloseSat */ + mCloseSat: number; + + /** SystemSetting mCloseDay */ + mCloseDay: number; + + /** SystemSetting mTouchPanel */ + mTouchPanel?: (boolean|null); + + /** SystemSetting mGameVol */ + mGameVol: number; + + /** SystemSetting mAttractVol */ + mAttractVol: number; + + /** SystemSetting mCalibHandleCenter */ + mCalibHandleCenter?: (number|null); + + /** SystemSetting mCalibAccelCenter */ + mCalibAccelCenter?: (number|null); + + /** SystemSetting mCalibBrakeCenter */ + mCalibBrakeCenter?: (number|null); + + /** SystemSetting mCalibTouchLeft */ + mCalibTouchLeft?: (number|null); + + /** SystemSetting mCalibTouchRight */ + mCalibTouchRight?: (number|null); + + /** SystemSetting mCalibTouchTop */ + mCalibTouchTop?: (number|null); + + /** SystemSetting mCalibTouchBottom */ + mCalibTouchBottom?: (number|null); + } + + /** Represents a SystemSetting. */ + class SystemSetting implements ISystemSetting { + + /** + * Constructs a new SystemSetting. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISystemSetting); + + /** SystemSetting mCoinChute. */ + public mCoinChute: number; + + /** SystemSetting mBuyCardCost. */ + public mBuyCardCost: number; + + /** SystemSetting mGameCost. */ + public mGameCost: number; + + /** SystemSetting mContinueCost. */ + public mContinueCost: number; + + /** SystemSetting mFullCourseCost. */ + public mFullCourseCost: number; + + /** SystemSetting mFreePlay. */ + public mFreePlay: boolean; + + /** SystemSetting mPcbId. */ + public mPcbId: number; + + /** SystemSetting mIcCardRw. */ + public mIcCardRw: boolean; + + /** SystemSetting mIcCardVender. */ + public mIcCardVender: boolean; + + /** SystemSetting mMgCardRw. */ + public mMgCardRw: boolean; + + /** SystemSetting mForceFeedback. */ + public mForceFeedback: boolean; + + /** SystemSetting mWinsAndRemains. */ + public mWinsAndRemains: boolean; + + /** SystemSetting mEventMode. */ + public mEventMode: number; + + /** SystemSetting mEventModeDist. */ + public mEventModeDist: boolean; + + /** SystemSetting mCloseType. */ + public mCloseType: number; + + /** SystemSetting mCloseSun. */ + public mCloseSun: number; + + /** SystemSetting mCloseMon. */ + public mCloseMon: number; + + /** SystemSetting mCloseTue. */ + public mCloseTue: number; + + /** SystemSetting mCloseWed. */ + public mCloseWed: number; + + /** SystemSetting mCloseThu. */ + public mCloseThu: number; + + /** SystemSetting mCloseFri. */ + public mCloseFri: number; + + /** SystemSetting mCloseSat. */ + public mCloseSat: number; + + /** SystemSetting mCloseDay. */ + public mCloseDay: number; + + /** SystemSetting mTouchPanel. */ + public mTouchPanel: boolean; + + /** SystemSetting mGameVol. */ + public mGameVol: number; + + /** SystemSetting mAttractVol. */ + public mAttractVol: number; + + /** SystemSetting mCalibHandleCenter. */ + public mCalibHandleCenter: number; + + /** SystemSetting mCalibAccelCenter. */ + public mCalibAccelCenter: number; + + /** SystemSetting mCalibBrakeCenter. */ + public mCalibBrakeCenter: number; + + /** SystemSetting mCalibTouchLeft. */ + public mCalibTouchLeft: number; + + /** SystemSetting mCalibTouchRight. */ + public mCalibTouchRight: number; + + /** SystemSetting mCalibTouchTop. */ + public mCalibTouchTop: number; + + /** SystemSetting mCalibTouchBottom. */ + public mCalibTouchBottom: number; + + /** + * Creates a new SystemSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns SystemSetting instance + */ + public static create(properties?: wm.protobuf.ISystemSetting): wm.protobuf.SystemSetting; + + /** + * Encodes the specified SystemSetting message. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @param message SystemSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISystemSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SystemSetting message, length delimited. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @param message SystemSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISystemSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SystemSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SystemSetting; + + /** + * Decodes a SystemSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SystemSetting; + + /** + * Verifies a SystemSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SystemSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SystemSetting + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SystemSetting; + + /** + * Creates a plain object from a SystemSetting message. Also converts values to other types if specified. + * @param message SystemSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SystemSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SystemSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SystemSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCompetitionSchedule. */ + interface IGhostCompetitionSchedule { + + /** GhostCompetitionSchedule competitionId */ + competitionId: number; + + /** GhostCompetitionSchedule qualifyingPeriodStartAt */ + qualifyingPeriodStartAt: number; + + /** GhostCompetitionSchedule qualifyingPeriodCloseAt */ + qualifyingPeriodCloseAt: number; + + /** GhostCompetitionSchedule competitionStartAt */ + competitionStartAt: number; + + /** GhostCompetitionSchedule competitionCloseAt */ + competitionCloseAt: number; + + /** GhostCompetitionSchedule competitionEndAt */ + competitionEndAt: number; + + /** GhostCompetitionSchedule lengthOfPeriod */ + lengthOfPeriod: number; + + /** GhostCompetitionSchedule lengthOfInterval */ + lengthOfInterval: number; + + /** GhostCompetitionSchedule area */ + area: number; + + /** GhostCompetitionSchedule minigamePatternId */ + minigamePatternId: number; + } + + /** Represents a GhostCompetitionSchedule. */ + class GhostCompetitionSchedule implements IGhostCompetitionSchedule { + + /** + * Constructs a new GhostCompetitionSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCompetitionSchedule); + + /** GhostCompetitionSchedule competitionId. */ + public competitionId: number; + + /** GhostCompetitionSchedule qualifyingPeriodStartAt. */ + public qualifyingPeriodStartAt: number; + + /** GhostCompetitionSchedule qualifyingPeriodCloseAt. */ + public qualifyingPeriodCloseAt: number; + + /** GhostCompetitionSchedule competitionStartAt. */ + public competitionStartAt: number; + + /** GhostCompetitionSchedule competitionCloseAt. */ + public competitionCloseAt: number; + + /** GhostCompetitionSchedule competitionEndAt. */ + public competitionEndAt: number; + + /** GhostCompetitionSchedule lengthOfPeriod. */ + public lengthOfPeriod: number; + + /** GhostCompetitionSchedule lengthOfInterval. */ + public lengthOfInterval: number; + + /** GhostCompetitionSchedule area. */ + public area: number; + + /** GhostCompetitionSchedule minigamePatternId. */ + public minigamePatternId: number; + + /** + * Creates a new GhostCompetitionSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionSchedule instance + */ + public static create(properties?: wm.protobuf.IGhostCompetitionSchedule): wm.protobuf.GhostCompetitionSchedule; + + /** + * Encodes the specified GhostCompetitionSchedule message. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @param message GhostCompetitionSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCompetitionSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionSchedule message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @param message GhostCompetitionSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCompetitionSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCompetitionSchedule; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCompetitionSchedule; + + /** + * Verifies a GhostCompetitionSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionSchedule + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCompetitionSchedule; + + /** + * Creates a plain object from a GhostCompetitionSchedule message. Also converts values to other types if specified. + * @param message GhostCompetitionSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCompetitionSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCompetitionParameter. */ + interface IGhostCompetitionParameter { + + /** GhostCompetitionParameter parameters1 */ + parameters1?: (number[]|null); + + /** GhostCompetitionParameter parameters2 */ + parameters2: boolean; + } + + /** Represents a GhostCompetitionParameter. */ + class GhostCompetitionParameter implements IGhostCompetitionParameter { + + /** + * Constructs a new GhostCompetitionParameter. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCompetitionParameter); + + /** GhostCompetitionParameter parameters1. */ + public parameters1: number[]; + + /** GhostCompetitionParameter parameters2. */ + public parameters2: boolean; + + /** + * Creates a new GhostCompetitionParameter instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionParameter instance + */ + public static create(properties?: wm.protobuf.IGhostCompetitionParameter): wm.protobuf.GhostCompetitionParameter; + + /** + * Encodes the specified GhostCompetitionParameter message. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @param message GhostCompetitionParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCompetitionParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionParameter message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @param message GhostCompetitionParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCompetitionParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCompetitionParameter; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCompetitionParameter; + + /** + * Verifies a GhostCompetitionParameter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionParameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionParameter + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCompetitionParameter; + + /** + * Creates a plain object from a GhostCompetitionParameter message. Also converts values to other types if specified. + * @param message GhostCompetitionParameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCompetitionParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionParameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionParameter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TransferNotice. */ + interface ITransferNotice { + + /** TransferNotice needToSeeTransferred */ + needToSeeTransferred: boolean; + + /** TransferNotice totalMaxiGold */ + totalMaxiGold?: (number|null); + + /** TransferNotice numOfPorscheCars */ + numOfPorscheCars?: (number|null); + + /** TransferNotice porscheModels */ + porscheModels?: (number[]|null); + + /** TransferNotice hasR35 */ + hasR35?: (boolean|null); + } + + /** Represents a TransferNotice. */ + class TransferNotice implements ITransferNotice { + + /** + * Constructs a new TransferNotice. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITransferNotice); + + /** TransferNotice needToSeeTransferred. */ + public needToSeeTransferred: boolean; + + /** TransferNotice totalMaxiGold. */ + public totalMaxiGold: number; + + /** TransferNotice numOfPorscheCars. */ + public numOfPorscheCars: number; + + /** TransferNotice porscheModels. */ + public porscheModels: number[]; + + /** TransferNotice hasR35. */ + public hasR35: boolean; + + /** + * Creates a new TransferNotice instance using the specified properties. + * @param [properties] Properties to set + * @returns TransferNotice instance + */ + public static create(properties?: wm.protobuf.ITransferNotice): wm.protobuf.TransferNotice; + + /** + * Encodes the specified TransferNotice message. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @param message TransferNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITransferNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransferNotice message, length delimited. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @param message TransferNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITransferNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransferNotice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TransferNotice; + + /** + * Decodes a TransferNotice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TransferNotice; + + /** + * Verifies a TransferNotice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransferNotice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransferNotice + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TransferNotice; + + /** + * Creates a plain object from a TransferNotice message. Also converts values to other types if specified. + * @param message TransferNotice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TransferNotice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransferNotice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransferNotice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GameFeatureVersion. */ + interface IGameFeatureVersion { + + /** GameFeatureVersion version */ + version: number; + + /** GameFeatureVersion year */ + year: number; + + /** GameFeatureVersion month */ + month: number; + + /** GameFeatureVersion pluses */ + pluses: number; + + /** GameFeatureVersion releaseAt */ + releaseAt: number; + } + + /** Represents a GameFeatureVersion. */ + class GameFeatureVersion implements IGameFeatureVersion { + + /** + * Constructs a new GameFeatureVersion. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGameFeatureVersion); + + /** GameFeatureVersion version. */ + public version: number; + + /** GameFeatureVersion year. */ + public year: number; + + /** GameFeatureVersion month. */ + public month: number; + + /** GameFeatureVersion pluses. */ + public pluses: number; + + /** GameFeatureVersion releaseAt. */ + public releaseAt: number; + + /** + * Creates a new GameFeatureVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns GameFeatureVersion instance + */ + public static create(properties?: wm.protobuf.IGameFeatureVersion): wm.protobuf.GameFeatureVersion; + + /** + * Encodes the specified GameFeatureVersion message. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @param message GameFeatureVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGameFeatureVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GameFeatureVersion message, length delimited. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @param message GameFeatureVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGameFeatureVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GameFeatureVersion; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GameFeatureVersion; + + /** + * Verifies a GameFeatureVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GameFeatureVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GameFeatureVersion + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GameFeatureVersion; + + /** + * Creates a plain object from a GameFeatureVersion message. Also converts values to other types if specified. + * @param message GameFeatureVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GameFeatureVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GameFeatureVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GameFeatureVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ScratchSheet. */ + interface IScratchSheet { + + /** ScratchSheet squares */ + squares?: (wm.protobuf.ScratchSheet.IScratchSquare[]|null); + } + + /** Represents a ScratchSheet. */ + class ScratchSheet implements IScratchSheet { + + /** + * Constructs a new ScratchSheet. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IScratchSheet); + + /** ScratchSheet squares. */ + public squares: wm.protobuf.ScratchSheet.IScratchSquare[]; + + /** + * Creates a new ScratchSheet instance using the specified properties. + * @param [properties] Properties to set + * @returns ScratchSheet instance + */ + public static create(properties?: wm.protobuf.IScratchSheet): wm.protobuf.ScratchSheet; + + /** + * Encodes the specified ScratchSheet message. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @param message ScratchSheet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IScratchSheet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScratchSheet message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @param message ScratchSheet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IScratchSheet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ScratchSheet; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ScratchSheet; + + /** + * Verifies a ScratchSheet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScratchSheet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScratchSheet + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ScratchSheet; + + /** + * Creates a plain object from a ScratchSheet message. Also converts values to other types if specified. + * @param message ScratchSheet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ScratchSheet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScratchSheet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScratchSheet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ScratchSheet { + + /** Properties of a ScratchSquare. */ + interface IScratchSquare { + + /** ScratchSquare category */ + category: wm.protobuf.ItemCategory; + + /** ScratchSquare itemId */ + itemId: number; + + /** ScratchSquare earned */ + earned: boolean; + } + + /** Represents a ScratchSquare. */ + class ScratchSquare implements IScratchSquare { + + /** + * Constructs a new ScratchSquare. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ScratchSheet.IScratchSquare); + + /** ScratchSquare category. */ + public category: wm.protobuf.ItemCategory; + + /** ScratchSquare itemId. */ + public itemId: number; + + /** ScratchSquare earned. */ + public earned: boolean; + + /** + * Creates a new ScratchSquare instance using the specified properties. + * @param [properties] Properties to set + * @returns ScratchSquare instance + */ + public static create(properties?: wm.protobuf.ScratchSheet.IScratchSquare): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Encodes the specified ScratchSquare message. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @param message ScratchSquare message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ScratchSheet.IScratchSquare, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScratchSquare message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @param message ScratchSquare message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ScratchSheet.IScratchSquare, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Verifies a ScratchSquare message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScratchSquare message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScratchSquare + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Creates a plain object from a ScratchSquare message. Also converts values to other types if specified. + * @param message ScratchSquare + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ScratchSheet.ScratchSquare, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScratchSquare to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScratchSquare + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a UserItem. */ + interface IUserItem { + + /** UserItem category */ + category: wm.protobuf.ItemCategory; + + /** UserItem itemId */ + itemId: number; + + /** UserItem userItemId */ + userItemId?: (number|null); + + /** UserItem earnedAt */ + earnedAt?: (number|null); + + /** UserItem expireAt */ + expireAt?: (number|null); + } + + /** Represents a UserItem. */ + class UserItem implements IUserItem { + + /** + * Constructs a new UserItem. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUserItem); + + /** UserItem category. */ + public category: wm.protobuf.ItemCategory; + + /** UserItem itemId. */ + public itemId: number; + + /** UserItem userItemId. */ + public userItemId: number; + + /** UserItem earnedAt. */ + public earnedAt: number; + + /** UserItem expireAt. */ + public expireAt: number; + + /** + * Creates a new UserItem instance using the specified properties. + * @param [properties] Properties to set + * @returns UserItem instance + */ + public static create(properties?: wm.protobuf.IUserItem): wm.protobuf.UserItem; + + /** + * Encodes the specified UserItem message. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @param message UserItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUserItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserItem message, length delimited. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @param message UserItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUserItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UserItem; + + /** + * Decodes a UserItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UserItem; + + /** + * Verifies a UserItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserItem + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UserItem; + + /** + * Creates a plain object from a UserItem message. Also converts values to other types if specified. + * @param message UserItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UserItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InviteFriendCampaignSchedule. */ + interface IInviteFriendCampaignSchedule { + + /** InviteFriendCampaignSchedule campaignId */ + campaignId: number; + + /** InviteFriendCampaignSchedule startAt */ + startAt: number; + + /** InviteFriendCampaignSchedule endAt */ + endAt: number; + + /** InviteFriendCampaignSchedule couponUnreceivableAt */ + couponUnreceivableAt: number; + } + + /** Represents an InviteFriendCampaignSchedule. */ + class InviteFriendCampaignSchedule implements IInviteFriendCampaignSchedule { + + /** + * Constructs a new InviteFriendCampaignSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IInviteFriendCampaignSchedule); + + /** InviteFriendCampaignSchedule campaignId. */ + public campaignId: number; + + /** InviteFriendCampaignSchedule startAt. */ + public startAt: number; + + /** InviteFriendCampaignSchedule endAt. */ + public endAt: number; + + /** InviteFriendCampaignSchedule couponUnreceivableAt. */ + public couponUnreceivableAt: number; + + /** + * Creates a new InviteFriendCampaignSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns InviteFriendCampaignSchedule instance + */ + public static create(properties?: wm.protobuf.IInviteFriendCampaignSchedule): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Encodes the specified InviteFriendCampaignSchedule message. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @param message InviteFriendCampaignSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IInviteFriendCampaignSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InviteFriendCampaignSchedule message, length delimited. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @param message InviteFriendCampaignSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IInviteFriendCampaignSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Verifies an InviteFriendCampaignSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InviteFriendCampaignSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InviteFriendCampaignSchedule + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Creates a plain object from an InviteFriendCampaignSchedule message. Also converts values to other types if specified. + * @param message InviteFriendCampaignSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.InviteFriendCampaignSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InviteFriendCampaignSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InviteFriendCampaignSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarTuning. */ + interface ICarTuning { + + /** CarTuning carId */ + carId: number; + + /** CarTuning tunePower */ + tunePower: number; + + /** CarTuning tuneHandling */ + tuneHandling: number; + + /** CarTuning lastPlayedAt */ + lastPlayedAt?: (number|null); + } + + /** Represents a CarTuning. */ + class CarTuning implements ICarTuning { + + /** + * Constructs a new CarTuning. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarTuning); + + /** CarTuning carId. */ + public carId: number; + + /** CarTuning tunePower. */ + public tunePower: number; + + /** CarTuning tuneHandling. */ + public tuneHandling: number; + + /** CarTuning lastPlayedAt. */ + public lastPlayedAt: number; + + /** + * Creates a new CarTuning instance using the specified properties. + * @param [properties] Properties to set + * @returns CarTuning instance + */ + public static create(properties?: wm.protobuf.ICarTuning): wm.protobuf.CarTuning; + + /** + * Encodes the specified CarTuning message. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @param message CarTuning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarTuning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarTuning message, length delimited. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @param message CarTuning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarTuning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarTuning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarTuning; + + /** + * Decodes a CarTuning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarTuning; + + /** + * Verifies a CarTuning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarTuning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarTuning + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarTuning; + + /** + * Creates a plain object from a CarTuning message. Also converts values to other types if specified. + * @param message CarTuning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarTuning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarTuning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarTuning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BinaryData. */ + interface IBinaryData { + + /** BinaryData data */ + data: Uint8Array; + + /** BinaryData mergeSerial */ + mergeSerial: number; + } + + /** Represents a BinaryData. */ + class BinaryData implements IBinaryData { + + /** + * Constructs a new BinaryData. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IBinaryData); + + /** BinaryData data. */ + public data: Uint8Array; + + /** BinaryData mergeSerial. */ + public mergeSerial: number; + + /** + * Creates a new BinaryData instance using the specified properties. + * @param [properties] Properties to set + * @returns BinaryData instance + */ + public static create(properties?: wm.protobuf.IBinaryData): wm.protobuf.BinaryData; + + /** + * Encodes the specified BinaryData message. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @param message BinaryData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IBinaryData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BinaryData message, length delimited. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @param message BinaryData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IBinaryData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BinaryData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.BinaryData; + + /** + * Decodes a BinaryData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.BinaryData; + + /** + * Verifies a BinaryData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BinaryData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BinaryData + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.BinaryData; + + /** + * Creates a plain object from a BinaryData message. Also converts values to other types if specified. + * @param message BinaryData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.BinaryData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BinaryData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BinaryData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostTrail. */ + interface IGhostTrail { + + /** GhostTrail carId */ + carId: number; + + /** GhostTrail area */ + area: number; + + /** GhostTrail ramp */ + ramp: number; + + /** GhostTrail path */ + path: number; + + /** GhostTrail playedAt */ + playedAt: number; + + /** GhostTrail playedPlace */ + playedPlace?: (wm.protobuf.IPlace|null); + + /** GhostTrail trail */ + trail: Uint8Array; + } + + /** Represents a GhostTrail. */ + class GhostTrail implements IGhostTrail { + + /** + * Constructs a new GhostTrail. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostTrail); + + /** GhostTrail carId. */ + public carId: number; + + /** GhostTrail area. */ + public area: number; + + /** GhostTrail ramp. */ + public ramp: number; + + /** GhostTrail path. */ + public path: number; + + /** GhostTrail playedAt. */ + public playedAt: number; + + /** GhostTrail playedPlace. */ + public playedPlace?: (wm.protobuf.IPlace|null); + + /** GhostTrail trail. */ + public trail: Uint8Array; + + /** + * Creates a new GhostTrail instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostTrail instance + */ + public static create(properties?: wm.protobuf.IGhostTrail): wm.protobuf.GhostTrail; + + /** + * Encodes the specified GhostTrail message. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @param message GhostTrail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostTrail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostTrail message, length delimited. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @param message GhostTrail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostTrail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostTrail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostTrail; + + /** + * Decodes a GhostTrail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostTrail; + + /** + * Verifies a GhostTrail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostTrail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostTrail + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostTrail; + + /** + * Creates a plain object from a GhostTrail message. Also converts values to other types if specified. + * @param message GhostTrail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostTrail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostTrail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostTrail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PlaceList. */ + interface IPlaceList { + + /** PlaceList places */ + places?: (wm.protobuf.IPlace[]|null); + } + + /** Represents a PlaceList. */ + class PlaceList implements IPlaceList { + + /** + * Constructs a new PlaceList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPlaceList); + + /** PlaceList places. */ + public places: wm.protobuf.IPlace[]; + + /** + * Creates a new PlaceList instance using the specified properties. + * @param [properties] Properties to set + * @returns PlaceList instance + */ + public static create(properties?: wm.protobuf.IPlaceList): wm.protobuf.PlaceList; + + /** + * Encodes the specified PlaceList message. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @param message PlaceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPlaceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlaceList message, length delimited. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @param message PlaceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPlaceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlaceList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PlaceList; + + /** + * Decodes a PlaceList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PlaceList; + + /** + * Verifies a PlaceList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlaceList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlaceList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PlaceList; + + /** + * Creates a plain object from a PlaceList message. Also converts values to other types if specified. + * @param message PlaceList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PlaceList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlaceList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlaceList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostList. */ + interface IGhostList { + + /** GhostList ghosts */ + ghosts?: (wm.protobuf.IGhostCar[]|null); + } + + /** Represents a GhostList. */ + class GhostList implements IGhostList { + + /** + * Constructs a new GhostList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostList); + + /** GhostList ghosts. */ + public ghosts: wm.protobuf.IGhostCar[]; + + /** + * Creates a new GhostList instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostList instance + */ + public static create(properties?: wm.protobuf.IGhostList): wm.protobuf.GhostList; + + /** + * Encodes the specified GhostList message. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @param message GhostList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostList message, length delimited. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @param message GhostList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostList; + + /** + * Decodes a GhostList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostList; + + /** + * Verifies a GhostList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostList; + + /** + * Creates a plain object from a GhostList message. Also converts values to other types if specified. + * @param message GhostList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarSummary. */ + interface ICarSummary { + + /** CarSummary hitCount */ + hitCount: number; + + /** CarSummary cars */ + cars?: (wm.protobuf.ICar[]|null); + } + + /** Represents a CarSummary. */ + class CarSummary implements ICarSummary { + + /** + * Constructs a new CarSummary. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarSummary); + + /** CarSummary hitCount. */ + public hitCount: number; + + /** CarSummary cars. */ + public cars: wm.protobuf.ICar[]; + + /** + * Creates a new CarSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns CarSummary instance + */ + public static create(properties?: wm.protobuf.ICarSummary): wm.protobuf.CarSummary; + + /** + * Encodes the specified CarSummary message. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @param message CarSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarSummary message, length delimited. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @param message CarSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarSummary; + + /** + * Decodes a CarSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarSummary; + + /** + * Verifies a CarSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarSummary + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarSummary; + + /** + * Creates a plain object from a CarSummary message. Also converts values to other types if specified. + * @param message CarSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileList. */ + interface IFileList { + + /** FileList files */ + files?: (wm.protobuf.FileList.IFileInfo[]|null); + + /** FileList interval */ + interval?: (number|null); + } + + /** Represents a FileList. */ + class FileList implements IFileList { + + /** + * Constructs a new FileList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IFileList); + + /** FileList files. */ + public files: wm.protobuf.FileList.IFileInfo[]; + + /** FileList interval. */ + public interval: number; + + /** + * Creates a new FileList instance using the specified properties. + * @param [properties] Properties to set + * @returns FileList instance + */ + public static create(properties?: wm.protobuf.IFileList): wm.protobuf.FileList; + + /** + * Encodes the specified FileList message. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @param message FileList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IFileList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileList message, length delimited. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @param message FileList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IFileList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.FileList; + + /** + * Decodes a FileList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.FileList; + + /** + * Verifies a FileList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.FileList; + + /** + * Creates a plain object from a FileList message. Also converts values to other types if specified. + * @param message FileList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.FileList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileList { + + /** Properties of a FileInfo. */ + interface IFileInfo { + + /** FileInfo fileId */ + fileId: number; + + /** FileInfo fileType */ + fileType: wm.protobuf.FileType; + + /** FileInfo fileSize */ + fileSize: number; + + /** FileInfo url */ + url: string; + + /** FileInfo sha1sum */ + sha1sum: Uint8Array; + + /** FileInfo notBefore */ + notBefore: number; + + /** FileInfo notAfter */ + notAfter: number; + } + + /** Represents a FileInfo. */ + class FileInfo implements IFileInfo { + + /** + * Constructs a new FileInfo. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.FileList.IFileInfo); + + /** FileInfo fileId. */ + public fileId: number; + + /** FileInfo fileType. */ + public fileType: wm.protobuf.FileType; + + /** FileInfo fileSize. */ + public fileSize: number; + + /** FileInfo url. */ + public url: string; + + /** FileInfo sha1sum. */ + public sha1sum: Uint8Array; + + /** FileInfo notBefore. */ + public notBefore: number; + + /** FileInfo notAfter. */ + public notAfter: number; + + /** + * Creates a new FileInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FileInfo instance + */ + public static create(properties?: wm.protobuf.FileList.IFileInfo): wm.protobuf.FileList.FileInfo; + + /** + * Encodes the specified FileInfo message. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @param message FileInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.FileList.IFileInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileInfo message, length delimited. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @param message FileInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.FileList.IFileInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.FileList.FileInfo; + + /** + * Decodes a FileInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.FileList.FileInfo; + + /** + * Verifies a FileInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileInfo + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.FileList.FileInfo; + + /** + * Creates a plain object from a FileInfo message. Also converts values to other types if specified. + * @param message FileInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.FileList.FileInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GhostCompetitionTarget. */ + interface IGhostCompetitionTarget { + + /** GhostCompetitionTarget competitionId */ + competitionId: number; + + /** GhostCompetitionTarget specialGhostId */ + specialGhostId?: (number|null); + + /** GhostCompetitionTarget ghostCar */ + ghostCar: wm.protobuf.IGhostCar; + + /** GhostCompetitionTarget trailId */ + trailId: (number|Long); + + /** GhostCompetitionTarget updatedAt */ + updatedAt: number; + + /** GhostCompetitionTarget competitionSchedule */ + competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + } + + /** Represents a GhostCompetitionTarget. */ + class GhostCompetitionTarget implements IGhostCompetitionTarget { + + /** + * Constructs a new GhostCompetitionTarget. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCompetitionTarget); + + /** GhostCompetitionTarget competitionId. */ + public competitionId: number; + + /** GhostCompetitionTarget specialGhostId. */ + public specialGhostId: number; + + /** GhostCompetitionTarget ghostCar. */ + public ghostCar: wm.protobuf.IGhostCar; + + /** GhostCompetitionTarget trailId. */ + public trailId: (number|Long); + + /** GhostCompetitionTarget updatedAt. */ + public updatedAt: number; + + /** GhostCompetitionTarget competitionSchedule. */ + public competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** + * Creates a new GhostCompetitionTarget instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionTarget instance + */ + public static create(properties?: wm.protobuf.IGhostCompetitionTarget): wm.protobuf.GhostCompetitionTarget; + + /** + * Encodes the specified GhostCompetitionTarget message. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @param message GhostCompetitionTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCompetitionTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionTarget message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @param message GhostCompetitionTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCompetitionTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCompetitionTarget; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCompetitionTarget; + + /** + * Verifies a GhostCompetitionTarget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionTarget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionTarget + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCompetitionTarget; + + /** + * Creates a plain object from a GhostCompetitionTarget message. Also converts values to other types if specified. + * @param message GhostCompetitionTarget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCompetitionTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionTarget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** SystemConstant enum. */ + enum SystemConstant { + PROTOBUF_MESSAGE_REVISION = 8053 + } + + /** ErrorCode enum. */ + enum ErrorCode { + ERR_SUCCESS = 0, + ERR_REQUEST = 1, + ERR_NOT_FOUND = 2, + ERR_ID_SERVER = 3, + ERR_ID_BANNED = 4, + ERR_USER_LOCKED = 5, + ERR_USER_VERSION = 6, + ERR_NAME_CONFLICTED = 7, + ERR_FORBIDDEN = 9, + ERR_USER_SUCCEEDED = 11, + ERR_BEING_TRANSFERRED = 12, + ERR_SCRATCH_LOCKED = 13 + } + + /** LineType enum. */ + enum LineType { + L_UNKNOWN = 0, + L_MOBILE = 1, + L_ISDN = 2, + L_BFLETS = 3, + L_ADSL = 4, + L_WIRED = 5 + } + + /** TerminalType enum. */ + enum TerminalType { + T_DRIVE = 0, + T_TERMINAL = 1 + } + + /** DeviceType enum. */ + enum DeviceType { + DEVICE_CARD = 0, + DEVICE_PHONE = 1 + } + + /** ItemCategory enum. */ + enum ItemCategory { + CAT_CUSTOM_COLOR = 1, + CAT_WHEEL = 2, + CAT_AERO = 3, + CAT_BONNET = 4, + CAT_WING = 5, + CAT_MIRROR = 6, + CAT_NEON = 8, + CAT_TRUNK = 9, + CAT_NUMBER_PLATE = 10, + CAT_GT_WING = 12, + CAT_AURA_MOTIF = 14, + CAT_METER = 15, + CAT_BGM = 16, + CAT_NAME_PLATE = 17, + CAT_NUMBER = 19, + CAT_BGM_TRACK = 22, + CAT_WINDOW_STICKER_FONT = 24, + CAT_WINDOW_DECORATION = 25, + CAT_RIVAL_MARKER = 26, + CAT_STAMP = 27, + CAT_TERMINAL_BACKGROUND = 28, + CAT_CAR_TICKET = 201, + CAT_CONSUMPTION_ITEM = 202, + CAT_CAR_TICKET_FREE = 203, + CAT_AERO_FULLSET = 300, + CAT_AERO_LIMITED = 301 + } + + /** TutorialType enum. */ + enum TutorialType { + TUTORIAL_ID_STORY = 0, + TUTORIAL_ID_TIME_ATTACK = 1, + TUTORIAL_ID_GHOST = 2, + TUTORIAL_ID_GHOST_CHALLENGE = 3, + TUTORIAL_ID_GHOST_LEVEL = 4, + TUTORIAL_ID_UNUSED_5 = 5, + TUTORIAL_ID_GHOST_SEARCH = 6, + TUTORIAL_ID_GHOST_COMPETITION = 7, + TUTORIAL_ID_HP600_CARD = 8, + TUTORIAL_ID_UNUSED_9 = 9, + TUTORIAL_ID_COMPETITION_QUALIFIED = 10, + TUTORIAL_ID_COMPETITION_TERMINAL = 11, + TUTORIAL_ID_COMPETITION_NOTICE = 12, + TUTORIAL_ID_COMPETITION_FINISHED = 13, + TUTORIAL_ID_UNUSED_14 = 14, + TUTORIAL_ID_UNUSED_15 = 15, + TUTORIAL_ID_UNUSED_16 = 16, + TUTORIAL_ID_UNUSED_17 = 17, + TUTORIAL_ID_UNUSED_18 = 18, + TUTORIAL_ID_UNUSED_19 = 19, + TUTORIAL_ID_GHOST_STAMP = 20, + TUTORIAL_ID_GHOST_STAMP_DECLINED = 21, + TUTORIAL_ID_GHOST_STAMP_FRIENDS = 22, + TUTORIAL_ID_TERMINAL_SCRATCH = 23, + TUTORIAL_ID_TURN_SCRATCH_SHEET = 24, + TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN = 25, + TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE = 26, + TUTORIAL_ID_VS_CONTINUE_TICKET = 27, + TUTORIAL_ID_UNUSED_28 = 28, + TUTORIAL_ID_UNUSED_29 = 29, + TUTORIAL_ID_UNUSED_30 = 30, + TUTORIAL_ID_DRESS_UP = 31, + TUTORIAL_ID_MULTI_GHOST = 32, + TUTORIAL_ID_STORY_NEW_FEATURE = 33, + TUTORIAL_ID_GHOST_NEW_FEATURE = 34, + TUTORIAL_ID_GHOST_REGION_MAP = 35 + } + + /** GameMode enum. */ + enum GameMode { + MODE_STORY = 1, + MODE_TIME_ATTACK = 2, + MODE_VS_BATTLE = 3, + MODE_GHOST_BATTLE = 4, + MODE_EVENT = 5 + } + + /** GhostType enum. */ + enum GhostType { + GHOST_NORMAL = 1, + GHOST_PINCH_RUNNER = 2, + GHOST_DEFAULT = 3 + } + + /** GhostSelectionMethod enum. */ + enum GhostSelectionMethod { + GHOST_SEARCH_BY_REGION = 1, + GHOST_SELECT_BY_LEVEL = 2, + GHOST_SELECT_CROWN_MATCH = 3, + GHOST_SELECT_STAMP_MATCH = 4, + GHOST_SELECT_FROM_HISTORY = 5, + GHOST_SEARCH_BY_SHOP = 6, + GHOST_SEARCH_BY_NAME = 7, + GHOST_ACCEPT_CHALLENGER = 8, + GHOST_APPOINTMENT = 9, + GHOST_DEFAULT_OPPONENT = 10, + GHOST_COMPETITION = 11, + GHOST_SELECT_FROM_BOOKMARKS = 12 + } + + /** GhostRateType enum. */ + enum GhostRateType { + GHOST_RATE_UNKNOWN = 1, + GHOST_RATE_INVALID = 2, + GHOST_RATE_VALID = 3 + } + + /** PathSelectionMethod enum. */ + enum PathSelectionMethod { + PATH_NEW = 1, + PATH_PLAIN = 2, + PATH_FRIEND = 3, + PATH_NORMAL = 4, + PATH_CHALLENGER = 5 + } + + /** NoticeEntry enum. */ + enum NoticeEntry { + NOTICE_UNUSED_1 = 1, + NOTICE_UNUSED_2 = 2, + NOTICE_UNUSED_3 = 3, + NOTICE_UNUSED_4 = 4, + NOTICE_UNUSED_5 = 5, + NOTICE_UNUSED_6 = 6, + NOTICE_UNUSED_7 = 7, + NOTICE_UNUSED_8 = 8, + NOTICE_UNUSED_9 = 9, + NOTICE_UNUSED_10 = 10, + NOTICE_UNUSED_11 = 11, + NOTICE_UNUSED_12 = 12 + } + + /** FileType enum. */ + enum FileType { + FILE_PROMOTION_ANNOUNCEMENT = 1, + FILE_FEATURE_ANNOUNCEMENT = 4, + FILE_SPAPP_ANNOUNCEMENT = 6 + } + + /** GhostCompetitionParticipantState enum. */ + enum GhostCompetitionParticipantState { + COMPETITION_NOT_PARTICIPATED = 1, + COMPETITION_QUALIFIED = 2, + COMPETITION_PARTICIPATED = 3, + COMPETITION_WON = 4 + } + + /** ScreenshotType enum. */ + enum ScreenshotType { + SS_GHOST_BATTLE = 1, + SS_VERSUS_BATTLE = 2, + SS_TERMINAL = 3, + SS_ACQUIRING_VERSUS_STAR = 4, + SS_ACQUIRING_AURA_MOTIF = 5, + SS_GHOST_REGION_MAP = 6, + SS_ACQUIRING_CROWN = 7, + SS_GHOST_COMPETITION_RESULT = 8, + SS_TIME_ATTACK_RESULT = 9, + SS_LEVEL_UP = 10 + } + + /** TransferState enum. */ + enum TransferState { + NOT_REGISTERED = 0, + NEW_REGISTRATION = 1, + TRANSFER_REQUIRED = 2, + TRANSFERRING = 3, + TRANSFERRED = 4 + } + + /** EventModeSerialErrorCode enum. */ + enum EventModeSerialErrorCode { + SERIAL_SUCCESS = 0, + SERIAL_ATTEMPT_TO_CHANGE = 1, + SERIAL_NO_INPUT = 2, + SERIAL_INVALID = 3, + SERIAL_EXPIRED = 4, + SERIAL_OTHER_PLACE = 5 + } + + /** ClientLogType enum. */ + enum ClientLogType { + LOG_LOAD_REPORT = 0, + LOG_ERROR = 1 + } + + /** SmartphoneAppState enum. */ + enum SmartphoneAppState { + SPAPP_UNREGISTERED = 0, + SPAPP_KTID = 1, + SPAPP_BNID = 2 + } + } +} diff --git a/src/wmmt/system.proto.js b/src/wmmt/system.proto.js new file mode 100644 index 0000000..b710fec --- /dev/null +++ b/src/wmmt/system.proto.js @@ -0,0 +1,53569 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +import * as $protobuf from "protobufjs/minimal"; + +// Common aliases +const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +export const sys = $root.sys = (() => { + + /** + * Namespace sys. + * @exports sys + * @namespace + */ + const sys = {}; + + sys.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof sys + * @namespace + */ + const protobuf = {}; + + protobuf.Log = (function() { + + /** + * Properties of a Log. + * @memberof sys.protobuf + * @interface ILog + * @property {Array.|null} [errors] Log errors + */ + + /** + * Constructs a new Log. + * @memberof sys.protobuf + * @classdesc Represents a Log. + * @implements ILog + * @constructor + * @param {sys.protobuf.ILog=} [properties] Properties to set + */ + function Log(properties) { + this.errors = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Log errors. + * @member {Array.} errors + * @memberof sys.protobuf.Log + * @instance + */ + Log.prototype.errors = $util.emptyArray; + + /** + * Creates a new Log instance using the specified properties. + * @function create + * @memberof sys.protobuf.Log + * @static + * @param {sys.protobuf.ILog=} [properties] Properties to set + * @returns {sys.protobuf.Log} Log instance + */ + Log.create = function create(properties) { + return new Log(properties); + }; + + /** + * Encodes the specified Log message. Does not implicitly {@link sys.protobuf.Log.verify|verify} messages. + * @function encode + * @memberof sys.protobuf.Log + * @static + * @param {sys.protobuf.ILog} message Log message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Log.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.errors != null && message.errors.length) + for (let i = 0; i < message.errors.length; ++i) + $root.sys.protobuf.Log.Error.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Log message, length delimited. Does not implicitly {@link sys.protobuf.Log.verify|verify} messages. + * @function encodeDelimited + * @memberof sys.protobuf.Log + * @static + * @param {sys.protobuf.ILog} message Log message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Log.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Log message from the specified reader or buffer. + * @function decode + * @memberof sys.protobuf.Log + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {sys.protobuf.Log} Log + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Log.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sys.protobuf.Log(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.sys.protobuf.Log.Error.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Log message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof sys.protobuf.Log + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {sys.protobuf.Log} Log + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Log.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Log message. + * @function verify + * @memberof sys.protobuf.Log + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Log.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (let i = 0; i < message.errors.length; ++i) { + let error = $root.sys.protobuf.Log.Error.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + return null; + }; + + /** + * Creates a Log message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof sys.protobuf.Log + * @static + * @param {Object.} object Plain object + * @returns {sys.protobuf.Log} Log + */ + Log.fromObject = function fromObject(object) { + if (object instanceof $root.sys.protobuf.Log) + return object; + let message = new $root.sys.protobuf.Log(); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".sys.protobuf.Log.errors: array expected"); + message.errors = []; + for (let i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".sys.protobuf.Log.errors: object expected"); + message.errors[i] = $root.sys.protobuf.Log.Error.fromObject(object.errors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Log message. Also converts values to other types if specified. + * @function toObject + * @memberof sys.protobuf.Log + * @static + * @param {sys.protobuf.Log} message Log + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Log.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.errors = []; + if (message.errors && message.errors.length) { + object.errors = []; + for (let j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.sys.protobuf.Log.Error.toObject(message.errors[j], options); + } + return object; + }; + + /** + * Converts this Log to JSON. + * @function toJSON + * @memberof sys.protobuf.Log + * @instance + * @returns {Object.} JSON object + */ + Log.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Log + * @function getTypeUrl + * @memberof sys.protobuf.Log + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Log.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/sys.protobuf.Log"; + }; + + Log.Error = (function() { + + /** + * Properties of an Error. + * @memberof sys.protobuf.Log + * @interface IError + * @property {number} timestamp Error timestamp + * @property {number} code Error code + */ + + /** + * Constructs a new Error. + * @memberof sys.protobuf.Log + * @classdesc Represents an Error. + * @implements IError + * @constructor + * @param {sys.protobuf.Log.IError=} [properties] Properties to set + */ + function Error(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Error timestamp. + * @member {number} timestamp + * @memberof sys.protobuf.Log.Error + * @instance + */ + Error.prototype.timestamp = 0; + + /** + * Error code. + * @member {number} code + * @memberof sys.protobuf.Log.Error + * @instance + */ + Error.prototype.code = 0; + + /** + * Creates a new Error instance using the specified properties. + * @function create + * @memberof sys.protobuf.Log.Error + * @static + * @param {sys.protobuf.Log.IError=} [properties] Properties to set + * @returns {sys.protobuf.Log.Error} Error instance + */ + Error.create = function create(properties) { + return new Error(properties); + }; + + /** + * Encodes the specified Error message. Does not implicitly {@link sys.protobuf.Log.Error.verify|verify} messages. + * @function encode + * @memberof sys.protobuf.Log.Error + * @static + * @param {sys.protobuf.Log.IError} message Error message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Error.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.timestamp); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.code); + return writer; + }; + + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link sys.protobuf.Log.Error.verify|verify} messages. + * @function encodeDelimited + * @memberof sys.protobuf.Log.Error + * @static + * @param {sys.protobuf.Log.IError} message Error message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Error.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Error message from the specified reader or buffer. + * @function decode + * @memberof sys.protobuf.Log.Error + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {sys.protobuf.Log.Error} Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Error.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sys.protobuf.Log.Error(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.timestamp = reader.uint32(); + break; + } + case 2: { + message.code = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + if (!message.hasOwnProperty("code")) + throw $util.ProtocolError("missing required 'code'", { instance: message }); + return message; + }; + + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof sys.protobuf.Log.Error + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {sys.protobuf.Log.Error} Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Error.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Error message. + * @function verify + * @memberof sys.protobuf.Log.Error + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Error.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (!$util.isInteger(message.code)) + return "code: integer expected"; + return null; + }; + + /** + * Creates an Error message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof sys.protobuf.Log.Error + * @static + * @param {Object.} object Plain object + * @returns {sys.protobuf.Log.Error} Error + */ + Error.fromObject = function fromObject(object) { + if (object instanceof $root.sys.protobuf.Log.Error) + return object; + let message = new $root.sys.protobuf.Log.Error(); + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.code != null) + message.code = object.code >>> 0; + return message; + }; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @function toObject + * @memberof sys.protobuf.Log.Error + * @static + * @param {sys.protobuf.Log.Error} message Error + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Error.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.timestamp = 0; + object.code = 0; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + return object; + }; + + /** + * Converts this Error to JSON. + * @function toJSON + * @memberof sys.protobuf.Log.Error + * @instance + * @returns {Object.} JSON object + */ + Error.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Error + * @function getTypeUrl + * @memberof sys.protobuf.Log.Error + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Error.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/sys.protobuf.Log.Error"; + }; + + return Error; + })(); + + return Log; + })(); + + protobuf.BanaCoinPaymentLog = (function() { + + /** + * Properties of a BanaCoinPaymentLog. + * @memberof sys.protobuf + * @interface IBanaCoinPaymentLog + * @property {Array.|null} [payments] BanaCoinPaymentLog payments + */ + + /** + * Constructs a new BanaCoinPaymentLog. + * @memberof sys.protobuf + * @classdesc Represents a BanaCoinPaymentLog. + * @implements IBanaCoinPaymentLog + * @constructor + * @param {sys.protobuf.IBanaCoinPaymentLog=} [properties] Properties to set + */ + function BanaCoinPaymentLog(properties) { + this.payments = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BanaCoinPaymentLog payments. + * @member {Array.} payments + * @memberof sys.protobuf.BanaCoinPaymentLog + * @instance + */ + BanaCoinPaymentLog.prototype.payments = $util.emptyArray; + + /** + * Creates a new BanaCoinPaymentLog instance using the specified properties. + * @function create + * @memberof sys.protobuf.BanaCoinPaymentLog + * @static + * @param {sys.protobuf.IBanaCoinPaymentLog=} [properties] Properties to set + * @returns {sys.protobuf.BanaCoinPaymentLog} BanaCoinPaymentLog instance + */ + BanaCoinPaymentLog.create = function create(properties) { + return new BanaCoinPaymentLog(properties); + }; + + /** + * Encodes the specified BanaCoinPaymentLog message. Does not implicitly {@link sys.protobuf.BanaCoinPaymentLog.verify|verify} messages. + * @function encode + * @memberof sys.protobuf.BanaCoinPaymentLog + * @static + * @param {sys.protobuf.IBanaCoinPaymentLog} message BanaCoinPaymentLog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BanaCoinPaymentLog.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.payments != null && message.payments.length) + for (let i = 0; i < message.payments.length; ++i) + $root.sys.protobuf.BanaCoinPaymentLog.Payment.encode(message.payments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BanaCoinPaymentLog message, length delimited. Does not implicitly {@link sys.protobuf.BanaCoinPaymentLog.verify|verify} messages. + * @function encodeDelimited + * @memberof sys.protobuf.BanaCoinPaymentLog + * @static + * @param {sys.protobuf.IBanaCoinPaymentLog} message BanaCoinPaymentLog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BanaCoinPaymentLog.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BanaCoinPaymentLog message from the specified reader or buffer. + * @function decode + * @memberof sys.protobuf.BanaCoinPaymentLog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {sys.protobuf.BanaCoinPaymentLog} BanaCoinPaymentLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BanaCoinPaymentLog.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sys.protobuf.BanaCoinPaymentLog(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.payments && message.payments.length)) + message.payments = []; + message.payments.push($root.sys.protobuf.BanaCoinPaymentLog.Payment.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BanaCoinPaymentLog message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof sys.protobuf.BanaCoinPaymentLog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {sys.protobuf.BanaCoinPaymentLog} BanaCoinPaymentLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BanaCoinPaymentLog.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BanaCoinPaymentLog message. + * @function verify + * @memberof sys.protobuf.BanaCoinPaymentLog + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BanaCoinPaymentLog.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.payments != null && message.hasOwnProperty("payments")) { + if (!Array.isArray(message.payments)) + return "payments: array expected"; + for (let i = 0; i < message.payments.length; ++i) { + let error = $root.sys.protobuf.BanaCoinPaymentLog.Payment.verify(message.payments[i]); + if (error) + return "payments." + error; + } + } + return null; + }; + + /** + * Creates a BanaCoinPaymentLog message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof sys.protobuf.BanaCoinPaymentLog + * @static + * @param {Object.} object Plain object + * @returns {sys.protobuf.BanaCoinPaymentLog} BanaCoinPaymentLog + */ + BanaCoinPaymentLog.fromObject = function fromObject(object) { + if (object instanceof $root.sys.protobuf.BanaCoinPaymentLog) + return object; + let message = new $root.sys.protobuf.BanaCoinPaymentLog(); + if (object.payments) { + if (!Array.isArray(object.payments)) + throw TypeError(".sys.protobuf.BanaCoinPaymentLog.payments: array expected"); + message.payments = []; + for (let i = 0; i < object.payments.length; ++i) { + if (typeof object.payments[i] !== "object") + throw TypeError(".sys.protobuf.BanaCoinPaymentLog.payments: object expected"); + message.payments[i] = $root.sys.protobuf.BanaCoinPaymentLog.Payment.fromObject(object.payments[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BanaCoinPaymentLog message. Also converts values to other types if specified. + * @function toObject + * @memberof sys.protobuf.BanaCoinPaymentLog + * @static + * @param {sys.protobuf.BanaCoinPaymentLog} message BanaCoinPaymentLog + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BanaCoinPaymentLog.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.payments = []; + if (message.payments && message.payments.length) { + object.payments = []; + for (let j = 0; j < message.payments.length; ++j) + object.payments[j] = $root.sys.protobuf.BanaCoinPaymentLog.Payment.toObject(message.payments[j], options); + } + return object; + }; + + /** + * Converts this BanaCoinPaymentLog to JSON. + * @function toJSON + * @memberof sys.protobuf.BanaCoinPaymentLog + * @instance + * @returns {Object.} JSON object + */ + BanaCoinPaymentLog.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BanaCoinPaymentLog + * @function getTypeUrl + * @memberof sys.protobuf.BanaCoinPaymentLog + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BanaCoinPaymentLog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/sys.protobuf.BanaCoinPaymentLog"; + }; + + BanaCoinPaymentLog.Payment = (function() { + + /** + * Properties of a Payment. + * @memberof sys.protobuf.BanaCoinPaymentLog + * @interface IPayment + * @property {number} date Payment date + * @property {string|null} [contactNumber] Payment contactNumber + * @property {sys.protobuf.BanaCoinPaymentState} state Payment state + * @property {number|null} [cost] Payment cost + * @property {string} accessCode Payment accessCode + * @property {string} personId Payment personId + */ + + /** + * Constructs a new Payment. + * @memberof sys.protobuf.BanaCoinPaymentLog + * @classdesc Represents a Payment. + * @implements IPayment + * @constructor + * @param {sys.protobuf.BanaCoinPaymentLog.IPayment=} [properties] Properties to set + */ + function Payment(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Payment date. + * @member {number} date + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @instance + */ + Payment.prototype.date = 0; + + /** + * Payment contactNumber. + * @member {string} contactNumber + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @instance + */ + Payment.prototype.contactNumber = ""; + + /** + * Payment state. + * @member {sys.protobuf.BanaCoinPaymentState} state + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @instance + */ + Payment.prototype.state = 0; + + /** + * Payment cost. + * @member {number} cost + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @instance + */ + Payment.prototype.cost = 0; + + /** + * Payment accessCode. + * @member {string} accessCode + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @instance + */ + Payment.prototype.accessCode = ""; + + /** + * Payment personId. + * @member {string} personId + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @instance + */ + Payment.prototype.personId = ""; + + /** + * Creates a new Payment instance using the specified properties. + * @function create + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @static + * @param {sys.protobuf.BanaCoinPaymentLog.IPayment=} [properties] Properties to set + * @returns {sys.protobuf.BanaCoinPaymentLog.Payment} Payment instance + */ + Payment.create = function create(properties) { + return new Payment(properties); + }; + + /** + * Encodes the specified Payment message. Does not implicitly {@link sys.protobuf.BanaCoinPaymentLog.Payment.verify|verify} messages. + * @function encode + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @static + * @param {sys.protobuf.BanaCoinPaymentLog.IPayment} message Payment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Payment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.date); + if (message.contactNumber != null && Object.hasOwnProperty.call(message, "contactNumber")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.contactNumber); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cost); + writer.uint32(/* id 6, wireType 2 =*/50).string(message.accessCode); + writer.uint32(/* id 7, wireType 2 =*/58).string(message.personId); + return writer; + }; + + /** + * Encodes the specified Payment message, length delimited. Does not implicitly {@link sys.protobuf.BanaCoinPaymentLog.Payment.verify|verify} messages. + * @function encodeDelimited + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @static + * @param {sys.protobuf.BanaCoinPaymentLog.IPayment} message Payment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Payment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Payment message from the specified reader or buffer. + * @function decode + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {sys.protobuf.BanaCoinPaymentLog.Payment} Payment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Payment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sys.protobuf.BanaCoinPaymentLog.Payment(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.date = reader.uint32(); + break; + } + case 2: { + message.contactNumber = reader.string(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.cost = reader.uint32(); + break; + } + case 6: { + message.accessCode = reader.string(); + break; + } + case 7: { + message.personId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("date")) + throw $util.ProtocolError("missing required 'date'", { instance: message }); + if (!message.hasOwnProperty("state")) + throw $util.ProtocolError("missing required 'state'", { instance: message }); + if (!message.hasOwnProperty("accessCode")) + throw $util.ProtocolError("missing required 'accessCode'", { instance: message }); + if (!message.hasOwnProperty("personId")) + throw $util.ProtocolError("missing required 'personId'", { instance: message }); + return message; + }; + + /** + * Decodes a Payment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {sys.protobuf.BanaCoinPaymentLog.Payment} Payment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Payment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Payment message. + * @function verify + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Payment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.date)) + return "date: integer expected"; + if (message.contactNumber != null && message.hasOwnProperty("contactNumber")) + if (!$util.isString(message.contactNumber)) + return "contactNumber: string expected"; + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 99: + break; + } + if (message.cost != null && message.hasOwnProperty("cost")) + if (!$util.isInteger(message.cost)) + return "cost: integer expected"; + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (!$util.isString(message.personId)) + return "personId: string expected"; + return null; + }; + + /** + * Creates a Payment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @static + * @param {Object.} object Plain object + * @returns {sys.protobuf.BanaCoinPaymentLog.Payment} Payment + */ + Payment.fromObject = function fromObject(object) { + if (object instanceof $root.sys.protobuf.BanaCoinPaymentLog.Payment) + return object; + let message = new $root.sys.protobuf.BanaCoinPaymentLog.Payment(); + if (object.date != null) + message.date = object.date >>> 0; + if (object.contactNumber != null) + message.contactNumber = String(object.contactNumber); + switch (object.state) { + case "BC_SUCCESS": + case 0: + message.state = 0; + break; + case "BC_SHORTAGE": + case 1: + message.state = 1; + break; + case "BC_BNID_MEMBER_ERROR": + case 2: + message.state = 2; + break; + case "BC_UNKNOWN_ERROR": + case 3: + message.state = 3; + break; + case "BC_BNID_SYSTEM_ERROR": + case 4: + message.state = 4; + break; + case "BC_BNID_VERIFY_ERROR": + case 5: + message.state = 5; + break; + case "BC_BNID_EXECUTE_ERROR": + case 6: + message.state = 6; + break; + case "BC_BNID_SERVER_UNAVAILABLE": + case 99: + message.state = 99; + break; + } + if (object.cost != null) + message.cost = object.cost >>> 0; + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.personId != null) + message.personId = String(object.personId); + return message; + }; + + /** + * Creates a plain object from a Payment message. Also converts values to other types if specified. + * @function toObject + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @static + * @param {sys.protobuf.BanaCoinPaymentLog.Payment} message Payment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Payment.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.date = 0; + object.contactNumber = ""; + object.state = options.enums === String ? "BC_SUCCESS" : 0; + object.cost = 0; + object.accessCode = ""; + object.personId = ""; + } + if (message.date != null && message.hasOwnProperty("date")) + object.date = message.date; + if (message.contactNumber != null && message.hasOwnProperty("contactNumber")) + object.contactNumber = message.contactNumber; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.sys.protobuf.BanaCoinPaymentState[message.state] : message.state; + if (message.cost != null && message.hasOwnProperty("cost")) + object.cost = message.cost; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.personId != null && message.hasOwnProperty("personId")) + object.personId = message.personId; + return object; + }; + + /** + * Converts this Payment to JSON. + * @function toJSON + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @instance + * @returns {Object.} JSON object + */ + Payment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Payment + * @function getTypeUrl + * @memberof sys.protobuf.BanaCoinPaymentLog.Payment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Payment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/sys.protobuf.BanaCoinPaymentLog.Payment"; + }; + + return Payment; + })(); + + return BanaCoinPaymentLog; + })(); + + protobuf.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof sys.protobuf + * @interface IOperation + * @property {number|null} [authorizationAt] Operation authorizationAt + * @property {wm.protobuf.IGameFeatureVersion|null} [featureVersion] Operation featureVersion + */ + + /** + * Constructs a new Operation. + * @memberof sys.protobuf + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {sys.protobuf.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation authorizationAt. + * @member {number} authorizationAt + * @memberof sys.protobuf.Operation + * @instance + */ + Operation.prototype.authorizationAt = 0; + + /** + * Operation featureVersion. + * @member {wm.protobuf.IGameFeatureVersion|null|undefined} featureVersion + * @memberof sys.protobuf.Operation + * @instance + */ + Operation.prototype.featureVersion = null; + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof sys.protobuf.Operation + * @static + * @param {sys.protobuf.IOperation=} [properties] Properties to set + * @returns {sys.protobuf.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link sys.protobuf.Operation.verify|verify} messages. + * @function encode + * @memberof sys.protobuf.Operation + * @static + * @param {sys.protobuf.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.authorizationAt != null && Object.hasOwnProperty.call(message, "authorizationAt")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.authorizationAt); + if (message.featureVersion != null && Object.hasOwnProperty.call(message, "featureVersion")) + $root.wm.protobuf.GameFeatureVersion.encode(message.featureVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link sys.protobuf.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof sys.protobuf.Operation + * @static + * @param {sys.protobuf.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof sys.protobuf.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {sys.protobuf.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sys.protobuf.Operation(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.authorizationAt = reader.uint32(); + break; + } + case 2: { + message.featureVersion = $root.wm.protobuf.GameFeatureVersion.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof sys.protobuf.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {sys.protobuf.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof sys.protobuf.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.authorizationAt != null && message.hasOwnProperty("authorizationAt")) + if (!$util.isInteger(message.authorizationAt)) + return "authorizationAt: integer expected"; + if (message.featureVersion != null && message.hasOwnProperty("featureVersion")) { + let error = $root.wm.protobuf.GameFeatureVersion.verify(message.featureVersion); + if (error) + return "featureVersion." + error; + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof sys.protobuf.Operation + * @static + * @param {Object.} object Plain object + * @returns {sys.protobuf.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.sys.protobuf.Operation) + return object; + let message = new $root.sys.protobuf.Operation(); + if (object.authorizationAt != null) + message.authorizationAt = object.authorizationAt >>> 0; + if (object.featureVersion != null) { + if (typeof object.featureVersion !== "object") + throw TypeError(".sys.protobuf.Operation.featureVersion: object expected"); + message.featureVersion = $root.wm.protobuf.GameFeatureVersion.fromObject(object.featureVersion); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof sys.protobuf.Operation + * @static + * @param {sys.protobuf.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.authorizationAt = 0; + object.featureVersion = null; + } + if (message.authorizationAt != null && message.hasOwnProperty("authorizationAt")) + object.authorizationAt = message.authorizationAt; + if (message.featureVersion != null && message.hasOwnProperty("featureVersion")) + object.featureVersion = $root.wm.protobuf.GameFeatureVersion.toObject(message.featureVersion, options); + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof sys.protobuf.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof sys.protobuf.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/sys.protobuf.Operation"; + }; + + return Operation; + })(); + + protobuf.Status = (function() { + + /** + * Properties of a Status. + * @memberof sys.protobuf + * @interface IStatus + * @property {sys.protobuf.State} state Status state + * @property {string|null} [name] Status name + * @property {number|null} [address] Status address + * @property {number|null} [value] Status value + * @property {number|null} [value2] Status value2 + */ + + /** + * Constructs a new Status. + * @memberof sys.protobuf + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {sys.protobuf.IStatus=} [properties] Properties to set + */ + function Status(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status state. + * @member {sys.protobuf.State} state + * @memberof sys.protobuf.Status + * @instance + */ + Status.prototype.state = 0; + + /** + * Status name. + * @member {string} name + * @memberof sys.protobuf.Status + * @instance + */ + Status.prototype.name = ""; + + /** + * Status address. + * @member {number} address + * @memberof sys.protobuf.Status + * @instance + */ + Status.prototype.address = 0; + + /** + * Status value. + * @member {number} value + * @memberof sys.protobuf.Status + * @instance + */ + Status.prototype.value = 0; + + /** + * Status value2. + * @member {number} value2 + * @memberof sys.protobuf.Status + * @instance + */ + Status.prototype.value2 = 0; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof sys.protobuf.Status + * @static + * @param {sys.protobuf.IStatus=} [properties] Properties to set + * @returns {sys.protobuf.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link sys.protobuf.Status.verify|verify} messages. + * @function encode + * @memberof sys.protobuf.Status + * @static + * @param {sys.protobuf.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.address); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.value); + if (message.value2 != null && Object.hasOwnProperty.call(message, "value2")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.value2); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link sys.protobuf.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof sys.protobuf.Status + * @static + * @param {sys.protobuf.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof sys.protobuf.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {sys.protobuf.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sys.protobuf.Status(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.address = reader.uint32(); + break; + } + case 4: { + message.value = reader.int32(); + break; + } + case 5: { + message.value2 = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("state")) + throw $util.ProtocolError("missing required 'state'", { instance: message }); + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof sys.protobuf.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {sys.protobuf.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof sys.protobuf.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isInteger(message.address)) + return "address: integer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + if (message.value2 != null && message.hasOwnProperty("value2")) + if (!$util.isInteger(message.value2)) + return "value2: integer expected"; + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof sys.protobuf.Status + * @static + * @param {Object.} object Plain object + * @returns {sys.protobuf.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.sys.protobuf.Status) + return object; + let message = new $root.sys.protobuf.Status(); + switch (object.state) { + case "State_None": + case 0: + message.state = 0; + break; + case "State_Checking": + case 1: + message.state = 1; + break; + case "State_NG": + case 2: + message.state = 2; + break; + case "State_OK": + case 3: + message.state = 3; + break; + } + if (object.name != null) + message.name = String(object.name); + if (object.address != null) + message.address = object.address >>> 0; + if (object.value != null) + message.value = object.value | 0; + if (object.value2 != null) + message.value2 = object.value2 | 0; + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof sys.protobuf.Status + * @static + * @param {sys.protobuf.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.state = options.enums === String ? "State_None" : 0; + object.name = ""; + object.address = 0; + object.value = 0; + object.value2 = 0; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.sys.protobuf.State[message.state] : message.state; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.value2 != null && message.hasOwnProperty("value2")) + object.value2 = message.value2; + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof sys.protobuf.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof sys.protobuf.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/sys.protobuf.Status"; + }; + + return Status; + })(); + + protobuf.Command = (function() { + + /** + * Properties of a Command. + * @memberof sys.protobuf + * @interface ICommand + * @property {number|null} [sequence] Command sequence + * @property {string|null} [ntp] Command ntp + * @property {string|null} [checkCable] Command checkCable + * @property {string|null} [renewDhcp] Command renewDhcp + * @property {number|null} [setDate] Command setDate + * @property {string|null} [syncDate] Command syncDate + * @property {Array.|null} [ping] Command ping + * @property {number|null} [traceRoute] Command traceRoute + * @property {string|null} [checkPacket] Command checkPacket + * @property {string|null} [reboot] Command reboot + * @property {string|null} [checkPkg] Command checkPkg + */ + + /** + * Constructs a new Command. + * @memberof sys.protobuf + * @classdesc Represents a Command. + * @implements ICommand + * @constructor + * @param {sys.protobuf.ICommand=} [properties] Properties to set + */ + function Command(properties) { + this.ping = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Command sequence. + * @member {number} sequence + * @memberof sys.protobuf.Command + * @instance + */ + Command.prototype.sequence = 0; + + /** + * Command ntp. + * @member {string} ntp + * @memberof sys.protobuf.Command + * @instance + */ + Command.prototype.ntp = ""; + + /** + * Command checkCable. + * @member {string} checkCable + * @memberof sys.protobuf.Command + * @instance + */ + Command.prototype.checkCable = ""; + + /** + * Command renewDhcp. + * @member {string} renewDhcp + * @memberof sys.protobuf.Command + * @instance + */ + Command.prototype.renewDhcp = ""; + + /** + * Command setDate. + * @member {number} setDate + * @memberof sys.protobuf.Command + * @instance + */ + Command.prototype.setDate = 0; + + /** + * Command syncDate. + * @member {string} syncDate + * @memberof sys.protobuf.Command + * @instance + */ + Command.prototype.syncDate = ""; + + /** + * Command ping. + * @member {Array.} ping + * @memberof sys.protobuf.Command + * @instance + */ + Command.prototype.ping = $util.emptyArray; + + /** + * Command traceRoute. + * @member {number} traceRoute + * @memberof sys.protobuf.Command + * @instance + */ + Command.prototype.traceRoute = 0; + + /** + * Command checkPacket. + * @member {string} checkPacket + * @memberof sys.protobuf.Command + * @instance + */ + Command.prototype.checkPacket = ""; + + /** + * Command reboot. + * @member {string} reboot + * @memberof sys.protobuf.Command + * @instance + */ + Command.prototype.reboot = ""; + + /** + * Command checkPkg. + * @member {string} checkPkg + * @memberof sys.protobuf.Command + * @instance + */ + Command.prototype.checkPkg = ""; + + /** + * Creates a new Command instance using the specified properties. + * @function create + * @memberof sys.protobuf.Command + * @static + * @param {sys.protobuf.ICommand=} [properties] Properties to set + * @returns {sys.protobuf.Command} Command instance + */ + Command.create = function create(properties) { + return new Command(properties); + }; + + /** + * Encodes the specified Command message. Does not implicitly {@link sys.protobuf.Command.verify|verify} messages. + * @function encode + * @memberof sys.protobuf.Command + * @static + * @param {sys.protobuf.ICommand} message Command message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Command.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.sequence); + if (message.ntp != null && Object.hasOwnProperty.call(message, "ntp")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ntp); + if (message.checkCable != null && Object.hasOwnProperty.call(message, "checkCable")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.checkCable); + if (message.renewDhcp != null && Object.hasOwnProperty.call(message, "renewDhcp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.renewDhcp); + if (message.setDate != null && Object.hasOwnProperty.call(message, "setDate")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.setDate); + if (message.syncDate != null && Object.hasOwnProperty.call(message, "syncDate")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.syncDate); + if (message.ping != null && message.ping.length) + for (let i = 0; i < message.ping.length; ++i) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.ping[i]); + if (message.traceRoute != null && Object.hasOwnProperty.call(message, "traceRoute")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.traceRoute); + if (message.checkPacket != null && Object.hasOwnProperty.call(message, "checkPacket")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.checkPacket); + if (message.reboot != null && Object.hasOwnProperty.call(message, "reboot")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reboot); + if (message.checkPkg != null && Object.hasOwnProperty.call(message, "checkPkg")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.checkPkg); + return writer; + }; + + /** + * Encodes the specified Command message, length delimited. Does not implicitly {@link sys.protobuf.Command.verify|verify} messages. + * @function encodeDelimited + * @memberof sys.protobuf.Command + * @static + * @param {sys.protobuf.ICommand} message Command message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Command.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Command message from the specified reader or buffer. + * @function decode + * @memberof sys.protobuf.Command + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {sys.protobuf.Command} Command + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Command.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sys.protobuf.Command(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sequence = reader.uint32(); + break; + } + case 2: { + message.ntp = reader.string(); + break; + } + case 3: { + message.checkCable = reader.string(); + break; + } + case 4: { + message.renewDhcp = reader.string(); + break; + } + case 5: { + message.setDate = reader.uint32(); + break; + } + case 6: { + message.syncDate = reader.string(); + break; + } + case 7: { + if (!(message.ping && message.ping.length)) + message.ping = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.ping.push(reader.uint32()); + } else + message.ping.push(reader.uint32()); + break; + } + case 8: { + message.traceRoute = reader.uint32(); + break; + } + case 9: { + message.checkPacket = reader.string(); + break; + } + case 10: { + message.reboot = reader.string(); + break; + } + case 11: { + message.checkPkg = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Command message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof sys.protobuf.Command + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {sys.protobuf.Command} Command + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Command.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Command message. + * @function verify + * @memberof sys.protobuf.Command + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Command.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence)) + return "sequence: integer expected"; + if (message.ntp != null && message.hasOwnProperty("ntp")) + if (!$util.isString(message.ntp)) + return "ntp: string expected"; + if (message.checkCable != null && message.hasOwnProperty("checkCable")) + if (!$util.isString(message.checkCable)) + return "checkCable: string expected"; + if (message.renewDhcp != null && message.hasOwnProperty("renewDhcp")) + if (!$util.isString(message.renewDhcp)) + return "renewDhcp: string expected"; + if (message.setDate != null && message.hasOwnProperty("setDate")) + if (!$util.isInteger(message.setDate)) + return "setDate: integer expected"; + if (message.syncDate != null && message.hasOwnProperty("syncDate")) + if (!$util.isString(message.syncDate)) + return "syncDate: string expected"; + if (message.ping != null && message.hasOwnProperty("ping")) { + if (!Array.isArray(message.ping)) + return "ping: array expected"; + for (let i = 0; i < message.ping.length; ++i) + if (!$util.isInteger(message.ping[i])) + return "ping: integer[] expected"; + } + if (message.traceRoute != null && message.hasOwnProperty("traceRoute")) + if (!$util.isInteger(message.traceRoute)) + return "traceRoute: integer expected"; + if (message.checkPacket != null && message.hasOwnProperty("checkPacket")) + if (!$util.isString(message.checkPacket)) + return "checkPacket: string expected"; + if (message.reboot != null && message.hasOwnProperty("reboot")) + if (!$util.isString(message.reboot)) + return "reboot: string expected"; + if (message.checkPkg != null && message.hasOwnProperty("checkPkg")) + if (!$util.isString(message.checkPkg)) + return "checkPkg: string expected"; + return null; + }; + + /** + * Creates a Command message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof sys.protobuf.Command + * @static + * @param {Object.} object Plain object + * @returns {sys.protobuf.Command} Command + */ + Command.fromObject = function fromObject(object) { + if (object instanceof $root.sys.protobuf.Command) + return object; + let message = new $root.sys.protobuf.Command(); + if (object.sequence != null) + message.sequence = object.sequence >>> 0; + if (object.ntp != null) + message.ntp = String(object.ntp); + if (object.checkCable != null) + message.checkCable = String(object.checkCable); + if (object.renewDhcp != null) + message.renewDhcp = String(object.renewDhcp); + if (object.setDate != null) + message.setDate = object.setDate >>> 0; + if (object.syncDate != null) + message.syncDate = String(object.syncDate); + if (object.ping) { + if (!Array.isArray(object.ping)) + throw TypeError(".sys.protobuf.Command.ping: array expected"); + message.ping = []; + for (let i = 0; i < object.ping.length; ++i) + message.ping[i] = object.ping[i] >>> 0; + } + if (object.traceRoute != null) + message.traceRoute = object.traceRoute >>> 0; + if (object.checkPacket != null) + message.checkPacket = String(object.checkPacket); + if (object.reboot != null) + message.reboot = String(object.reboot); + if (object.checkPkg != null) + message.checkPkg = String(object.checkPkg); + return message; + }; + + /** + * Creates a plain object from a Command message. Also converts values to other types if specified. + * @function toObject + * @memberof sys.protobuf.Command + * @static + * @param {sys.protobuf.Command} message Command + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Command.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.ping = []; + if (options.defaults) { + object.sequence = 0; + object.ntp = ""; + object.checkCable = ""; + object.renewDhcp = ""; + object.setDate = 0; + object.syncDate = ""; + object.traceRoute = 0; + object.checkPacket = ""; + object.reboot = ""; + object.checkPkg = ""; + } + if (message.sequence != null && message.hasOwnProperty("sequence")) + object.sequence = message.sequence; + if (message.ntp != null && message.hasOwnProperty("ntp")) + object.ntp = message.ntp; + if (message.checkCable != null && message.hasOwnProperty("checkCable")) + object.checkCable = message.checkCable; + if (message.renewDhcp != null && message.hasOwnProperty("renewDhcp")) + object.renewDhcp = message.renewDhcp; + if (message.setDate != null && message.hasOwnProperty("setDate")) + object.setDate = message.setDate; + if (message.syncDate != null && message.hasOwnProperty("syncDate")) + object.syncDate = message.syncDate; + if (message.ping && message.ping.length) { + object.ping = []; + for (let j = 0; j < message.ping.length; ++j) + object.ping[j] = message.ping[j]; + } + if (message.traceRoute != null && message.hasOwnProperty("traceRoute")) + object.traceRoute = message.traceRoute; + if (message.checkPacket != null && message.hasOwnProperty("checkPacket")) + object.checkPacket = message.checkPacket; + if (message.reboot != null && message.hasOwnProperty("reboot")) + object.reboot = message.reboot; + if (message.checkPkg != null && message.hasOwnProperty("checkPkg")) + object.checkPkg = message.checkPkg; + return object; + }; + + /** + * Converts this Command to JSON. + * @function toJSON + * @memberof sys.protobuf.Command + * @instance + * @returns {Object.} JSON object + */ + Command.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Command + * @function getTypeUrl + * @memberof sys.protobuf.Command + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Command.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/sys.protobuf.Command"; + }; + + return Command; + })(); + + protobuf.Reply = (function() { + + /** + * Properties of a Reply. + * @memberof sys.protobuf + * @interface IReply + * @property {number|null} [sequence] Reply sequence + * @property {sys.protobuf.IStatus|null} [ntp] Reply ntp + * @property {sys.protobuf.IStatus|null} [checkCable] Reply checkCable + * @property {sys.protobuf.IStatus|null} [renewDhcp] Reply renewDhcp + * @property {sys.protobuf.IStatus|null} [setDate] Reply setDate + * @property {sys.protobuf.IStatus|null} [syncDate] Reply syncDate + * @property {Array.|null} [ping] Reply ping + * @property {sys.protobuf.IStatus|null} [traceRoute] Reply traceRoute + * @property {sys.protobuf.IStatus|null} [checkPacket] Reply checkPacket + * @property {sys.protobuf.IStatus|null} [reboot] Reply reboot + * @property {sys.protobuf.IStatus|null} [checkPkg] Reply checkPkg + */ + + /** + * Constructs a new Reply. + * @memberof sys.protobuf + * @classdesc Represents a Reply. + * @implements IReply + * @constructor + * @param {sys.protobuf.IReply=} [properties] Properties to set + */ + function Reply(properties) { + this.ping = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Reply sequence. + * @member {number} sequence + * @memberof sys.protobuf.Reply + * @instance + */ + Reply.prototype.sequence = 0; + + /** + * Reply ntp. + * @member {sys.protobuf.IStatus|null|undefined} ntp + * @memberof sys.protobuf.Reply + * @instance + */ + Reply.prototype.ntp = null; + + /** + * Reply checkCable. + * @member {sys.protobuf.IStatus|null|undefined} checkCable + * @memberof sys.protobuf.Reply + * @instance + */ + Reply.prototype.checkCable = null; + + /** + * Reply renewDhcp. + * @member {sys.protobuf.IStatus|null|undefined} renewDhcp + * @memberof sys.protobuf.Reply + * @instance + */ + Reply.prototype.renewDhcp = null; + + /** + * Reply setDate. + * @member {sys.protobuf.IStatus|null|undefined} setDate + * @memberof sys.protobuf.Reply + * @instance + */ + Reply.prototype.setDate = null; + + /** + * Reply syncDate. + * @member {sys.protobuf.IStatus|null|undefined} syncDate + * @memberof sys.protobuf.Reply + * @instance + */ + Reply.prototype.syncDate = null; + + /** + * Reply ping. + * @member {Array.} ping + * @memberof sys.protobuf.Reply + * @instance + */ + Reply.prototype.ping = $util.emptyArray; + + /** + * Reply traceRoute. + * @member {sys.protobuf.IStatus|null|undefined} traceRoute + * @memberof sys.protobuf.Reply + * @instance + */ + Reply.prototype.traceRoute = null; + + /** + * Reply checkPacket. + * @member {sys.protobuf.IStatus|null|undefined} checkPacket + * @memberof sys.protobuf.Reply + * @instance + */ + Reply.prototype.checkPacket = null; + + /** + * Reply reboot. + * @member {sys.protobuf.IStatus|null|undefined} reboot + * @memberof sys.protobuf.Reply + * @instance + */ + Reply.prototype.reboot = null; + + /** + * Reply checkPkg. + * @member {sys.protobuf.IStatus|null|undefined} checkPkg + * @memberof sys.protobuf.Reply + * @instance + */ + Reply.prototype.checkPkg = null; + + /** + * Creates a new Reply instance using the specified properties. + * @function create + * @memberof sys.protobuf.Reply + * @static + * @param {sys.protobuf.IReply=} [properties] Properties to set + * @returns {sys.protobuf.Reply} Reply instance + */ + Reply.create = function create(properties) { + return new Reply(properties); + }; + + /** + * Encodes the specified Reply message. Does not implicitly {@link sys.protobuf.Reply.verify|verify} messages. + * @function encode + * @memberof sys.protobuf.Reply + * @static + * @param {sys.protobuf.IReply} message Reply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Reply.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.sequence); + if (message.ntp != null && Object.hasOwnProperty.call(message, "ntp")) + $root.sys.protobuf.Status.encode(message.ntp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.checkCable != null && Object.hasOwnProperty.call(message, "checkCable")) + $root.sys.protobuf.Status.encode(message.checkCable, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.renewDhcp != null && Object.hasOwnProperty.call(message, "renewDhcp")) + $root.sys.protobuf.Status.encode(message.renewDhcp, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.setDate != null && Object.hasOwnProperty.call(message, "setDate")) + $root.sys.protobuf.Status.encode(message.setDate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.syncDate != null && Object.hasOwnProperty.call(message, "syncDate")) + $root.sys.protobuf.Status.encode(message.syncDate, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.ping != null && message.ping.length) + for (let i = 0; i < message.ping.length; ++i) + $root.sys.protobuf.Status.encode(message.ping[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.traceRoute != null && Object.hasOwnProperty.call(message, "traceRoute")) + $root.sys.protobuf.Status.encode(message.traceRoute, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.checkPacket != null && Object.hasOwnProperty.call(message, "checkPacket")) + $root.sys.protobuf.Status.encode(message.checkPacket, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reboot != null && Object.hasOwnProperty.call(message, "reboot")) + $root.sys.protobuf.Status.encode(message.reboot, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.checkPkg != null && Object.hasOwnProperty.call(message, "checkPkg")) + $root.sys.protobuf.Status.encode(message.checkPkg, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Reply message, length delimited. Does not implicitly {@link sys.protobuf.Reply.verify|verify} messages. + * @function encodeDelimited + * @memberof sys.protobuf.Reply + * @static + * @param {sys.protobuf.IReply} message Reply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Reply.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Reply message from the specified reader or buffer. + * @function decode + * @memberof sys.protobuf.Reply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {sys.protobuf.Reply} Reply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Reply.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sys.protobuf.Reply(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sequence = reader.uint32(); + break; + } + case 2: { + message.ntp = $root.sys.protobuf.Status.decode(reader, reader.uint32()); + break; + } + case 3: { + message.checkCable = $root.sys.protobuf.Status.decode(reader, reader.uint32()); + break; + } + case 4: { + message.renewDhcp = $root.sys.protobuf.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.setDate = $root.sys.protobuf.Status.decode(reader, reader.uint32()); + break; + } + case 6: { + message.syncDate = $root.sys.protobuf.Status.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.ping && message.ping.length)) + message.ping = []; + message.ping.push($root.sys.protobuf.Status.decode(reader, reader.uint32())); + break; + } + case 8: { + message.traceRoute = $root.sys.protobuf.Status.decode(reader, reader.uint32()); + break; + } + case 9: { + message.checkPacket = $root.sys.protobuf.Status.decode(reader, reader.uint32()); + break; + } + case 10: { + message.reboot = $root.sys.protobuf.Status.decode(reader, reader.uint32()); + break; + } + case 11: { + message.checkPkg = $root.sys.protobuf.Status.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Reply message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof sys.protobuf.Reply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {sys.protobuf.Reply} Reply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Reply.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Reply message. + * @function verify + * @memberof sys.protobuf.Reply + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Reply.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence)) + return "sequence: integer expected"; + if (message.ntp != null && message.hasOwnProperty("ntp")) { + let error = $root.sys.protobuf.Status.verify(message.ntp); + if (error) + return "ntp." + error; + } + if (message.checkCable != null && message.hasOwnProperty("checkCable")) { + let error = $root.sys.protobuf.Status.verify(message.checkCable); + if (error) + return "checkCable." + error; + } + if (message.renewDhcp != null && message.hasOwnProperty("renewDhcp")) { + let error = $root.sys.protobuf.Status.verify(message.renewDhcp); + if (error) + return "renewDhcp." + error; + } + if (message.setDate != null && message.hasOwnProperty("setDate")) { + let error = $root.sys.protobuf.Status.verify(message.setDate); + if (error) + return "setDate." + error; + } + if (message.syncDate != null && message.hasOwnProperty("syncDate")) { + let error = $root.sys.protobuf.Status.verify(message.syncDate); + if (error) + return "syncDate." + error; + } + if (message.ping != null && message.hasOwnProperty("ping")) { + if (!Array.isArray(message.ping)) + return "ping: array expected"; + for (let i = 0; i < message.ping.length; ++i) { + let error = $root.sys.protobuf.Status.verify(message.ping[i]); + if (error) + return "ping." + error; + } + } + if (message.traceRoute != null && message.hasOwnProperty("traceRoute")) { + let error = $root.sys.protobuf.Status.verify(message.traceRoute); + if (error) + return "traceRoute." + error; + } + if (message.checkPacket != null && message.hasOwnProperty("checkPacket")) { + let error = $root.sys.protobuf.Status.verify(message.checkPacket); + if (error) + return "checkPacket." + error; + } + if (message.reboot != null && message.hasOwnProperty("reboot")) { + let error = $root.sys.protobuf.Status.verify(message.reboot); + if (error) + return "reboot." + error; + } + if (message.checkPkg != null && message.hasOwnProperty("checkPkg")) { + let error = $root.sys.protobuf.Status.verify(message.checkPkg); + if (error) + return "checkPkg." + error; + } + return null; + }; + + /** + * Creates a Reply message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof sys.protobuf.Reply + * @static + * @param {Object.} object Plain object + * @returns {sys.protobuf.Reply} Reply + */ + Reply.fromObject = function fromObject(object) { + if (object instanceof $root.sys.protobuf.Reply) + return object; + let message = new $root.sys.protobuf.Reply(); + if (object.sequence != null) + message.sequence = object.sequence >>> 0; + if (object.ntp != null) { + if (typeof object.ntp !== "object") + throw TypeError(".sys.protobuf.Reply.ntp: object expected"); + message.ntp = $root.sys.protobuf.Status.fromObject(object.ntp); + } + if (object.checkCable != null) { + if (typeof object.checkCable !== "object") + throw TypeError(".sys.protobuf.Reply.checkCable: object expected"); + message.checkCable = $root.sys.protobuf.Status.fromObject(object.checkCable); + } + if (object.renewDhcp != null) { + if (typeof object.renewDhcp !== "object") + throw TypeError(".sys.protobuf.Reply.renewDhcp: object expected"); + message.renewDhcp = $root.sys.protobuf.Status.fromObject(object.renewDhcp); + } + if (object.setDate != null) { + if (typeof object.setDate !== "object") + throw TypeError(".sys.protobuf.Reply.setDate: object expected"); + message.setDate = $root.sys.protobuf.Status.fromObject(object.setDate); + } + if (object.syncDate != null) { + if (typeof object.syncDate !== "object") + throw TypeError(".sys.protobuf.Reply.syncDate: object expected"); + message.syncDate = $root.sys.protobuf.Status.fromObject(object.syncDate); + } + if (object.ping) { + if (!Array.isArray(object.ping)) + throw TypeError(".sys.protobuf.Reply.ping: array expected"); + message.ping = []; + for (let i = 0; i < object.ping.length; ++i) { + if (typeof object.ping[i] !== "object") + throw TypeError(".sys.protobuf.Reply.ping: object expected"); + message.ping[i] = $root.sys.protobuf.Status.fromObject(object.ping[i]); + } + } + if (object.traceRoute != null) { + if (typeof object.traceRoute !== "object") + throw TypeError(".sys.protobuf.Reply.traceRoute: object expected"); + message.traceRoute = $root.sys.protobuf.Status.fromObject(object.traceRoute); + } + if (object.checkPacket != null) { + if (typeof object.checkPacket !== "object") + throw TypeError(".sys.protobuf.Reply.checkPacket: object expected"); + message.checkPacket = $root.sys.protobuf.Status.fromObject(object.checkPacket); + } + if (object.reboot != null) { + if (typeof object.reboot !== "object") + throw TypeError(".sys.protobuf.Reply.reboot: object expected"); + message.reboot = $root.sys.protobuf.Status.fromObject(object.reboot); + } + if (object.checkPkg != null) { + if (typeof object.checkPkg !== "object") + throw TypeError(".sys.protobuf.Reply.checkPkg: object expected"); + message.checkPkg = $root.sys.protobuf.Status.fromObject(object.checkPkg); + } + return message; + }; + + /** + * Creates a plain object from a Reply message. Also converts values to other types if specified. + * @function toObject + * @memberof sys.protobuf.Reply + * @static + * @param {sys.protobuf.Reply} message Reply + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Reply.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.ping = []; + if (options.defaults) { + object.sequence = 0; + object.ntp = null; + object.checkCable = null; + object.renewDhcp = null; + object.setDate = null; + object.syncDate = null; + object.traceRoute = null; + object.checkPacket = null; + object.reboot = null; + object.checkPkg = null; + } + if (message.sequence != null && message.hasOwnProperty("sequence")) + object.sequence = message.sequence; + if (message.ntp != null && message.hasOwnProperty("ntp")) + object.ntp = $root.sys.protobuf.Status.toObject(message.ntp, options); + if (message.checkCable != null && message.hasOwnProperty("checkCable")) + object.checkCable = $root.sys.protobuf.Status.toObject(message.checkCable, options); + if (message.renewDhcp != null && message.hasOwnProperty("renewDhcp")) + object.renewDhcp = $root.sys.protobuf.Status.toObject(message.renewDhcp, options); + if (message.setDate != null && message.hasOwnProperty("setDate")) + object.setDate = $root.sys.protobuf.Status.toObject(message.setDate, options); + if (message.syncDate != null && message.hasOwnProperty("syncDate")) + object.syncDate = $root.sys.protobuf.Status.toObject(message.syncDate, options); + if (message.ping && message.ping.length) { + object.ping = []; + for (let j = 0; j < message.ping.length; ++j) + object.ping[j] = $root.sys.protobuf.Status.toObject(message.ping[j], options); + } + if (message.traceRoute != null && message.hasOwnProperty("traceRoute")) + object.traceRoute = $root.sys.protobuf.Status.toObject(message.traceRoute, options); + if (message.checkPacket != null && message.hasOwnProperty("checkPacket")) + object.checkPacket = $root.sys.protobuf.Status.toObject(message.checkPacket, options); + if (message.reboot != null && message.hasOwnProperty("reboot")) + object.reboot = $root.sys.protobuf.Status.toObject(message.reboot, options); + if (message.checkPkg != null && message.hasOwnProperty("checkPkg")) + object.checkPkg = $root.sys.protobuf.Status.toObject(message.checkPkg, options); + return object; + }; + + /** + * Converts this Reply to JSON. + * @function toJSON + * @memberof sys.protobuf.Reply + * @instance + * @returns {Object.} JSON object + */ + Reply.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Reply + * @function getTypeUrl + * @memberof sys.protobuf.Reply + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Reply.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/sys.protobuf.Reply"; + }; + + return Reply; + })(); + + /** + * State enum. + * @name sys.protobuf.State + * @enum {number} + * @property {number} State_None=0 State_None value + * @property {number} State_Checking=1 State_Checking value + * @property {number} State_NG=2 State_NG value + * @property {number} State_OK=3 State_OK value + */ + protobuf.State = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "State_None"] = 0; + values[valuesById[1] = "State_Checking"] = 1; + values[valuesById[2] = "State_NG"] = 2; + values[valuesById[3] = "State_OK"] = 3; + return values; + })(); + + /** + * BanaCoinPaymentState enum. + * @name sys.protobuf.BanaCoinPaymentState + * @enum {number} + * @property {number} BC_SUCCESS=0 BC_SUCCESS value + * @property {number} BC_SHORTAGE=1 BC_SHORTAGE value + * @property {number} BC_BNID_MEMBER_ERROR=2 BC_BNID_MEMBER_ERROR value + * @property {number} BC_UNKNOWN_ERROR=3 BC_UNKNOWN_ERROR value + * @property {number} BC_BNID_SYSTEM_ERROR=4 BC_BNID_SYSTEM_ERROR value + * @property {number} BC_BNID_VERIFY_ERROR=5 BC_BNID_VERIFY_ERROR value + * @property {number} BC_BNID_EXECUTE_ERROR=6 BC_BNID_EXECUTE_ERROR value + * @property {number} BC_BNID_SERVER_UNAVAILABLE=99 BC_BNID_SERVER_UNAVAILABLE value + */ + protobuf.BanaCoinPaymentState = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BC_SUCCESS"] = 0; + values[valuesById[1] = "BC_SHORTAGE"] = 1; + values[valuesById[2] = "BC_BNID_MEMBER_ERROR"] = 2; + values[valuesById[3] = "BC_UNKNOWN_ERROR"] = 3; + values[valuesById[4] = "BC_BNID_SYSTEM_ERROR"] = 4; + values[valuesById[5] = "BC_BNID_VERIFY_ERROR"] = 5; + values[valuesById[6] = "BC_BNID_EXECUTE_ERROR"] = 6; + values[valuesById[99] = "BC_BNID_SERVER_UNAVAILABLE"] = 99; + return values; + })(); + + return protobuf; + })(); + + return sys; +})(); + +export const wm = $root.wm = (() => { + + /** + * Namespace wm. + * @exports wm + * @namespace + */ + const wm = {}; + + wm.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof wm + * @namespace + */ + const protobuf = {}; + + protobuf.RegisterSystemInfoRequest = (function() { + + /** + * Properties of a RegisterSystemInfoRequest. + * @memberof wm.protobuf + * @interface IRegisterSystemInfoRequest + * @property {string} pcbSerial RegisterSystemInfoRequest pcbSerial + * @property {wm.protobuf.TerminalType} terminalType RegisterSystemInfoRequest terminalType + * @property {number} romVersion RegisterSystemInfoRequest romVersion + * @property {string} country RegisterSystemInfoRequest country + * @property {wm.protobuf.LineType} lineType RegisterSystemInfoRequest lineType + * @property {string} shopName RegisterSystemInfoRequest shopName + * @property {string} shopNickname RegisterSystemInfoRequest shopNickname + * @property {number|null} [allnetPlaceId] RegisterSystemInfoRequest allnetPlaceId + * @property {number|null} [allnetRegion0] RegisterSystemInfoRequest allnetRegion0 + * @property {string|null} [muchaPlaceId] RegisterSystemInfoRequest muchaPlaceId + * @property {number|null} [muchaPrefectureId] RegisterSystemInfoRequest muchaPrefectureId + * @property {string} regionName0 RegisterSystemInfoRequest regionName0 + * @property {string} regionName1 RegisterSystemInfoRequest regionName1 + * @property {string} regionName2 RegisterSystemInfoRequest regionName2 + * @property {string} regionName3 RegisterSystemInfoRequest regionName3 + * @property {number} timezoneOffset RegisterSystemInfoRequest timezoneOffset + * @property {wm.protobuf.ISystemSetting} systemSetting RegisterSystemInfoRequest systemSetting + * @property {Array.|null} [errorLogs] RegisterSystemInfoRequest errorLogs + */ + + /** + * Constructs a new RegisterSystemInfoRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemInfoRequest. + * @implements IRegisterSystemInfoRequest + * @constructor + * @param {wm.protobuf.IRegisterSystemInfoRequest=} [properties] Properties to set + */ + function RegisterSystemInfoRequest(properties) { + this.errorLogs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemInfoRequest pcbSerial. + * @member {string} pcbSerial + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.pcbSerial = ""; + + /** + * RegisterSystemInfoRequest terminalType. + * @member {wm.protobuf.TerminalType} terminalType + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.terminalType = 0; + + /** + * RegisterSystemInfoRequest romVersion. + * @member {number} romVersion + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.romVersion = 0; + + /** + * RegisterSystemInfoRequest country. + * @member {string} country + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.country = ""; + + /** + * RegisterSystemInfoRequest lineType. + * @member {wm.protobuf.LineType} lineType + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.lineType = 0; + + /** + * RegisterSystemInfoRequest shopName. + * @member {string} shopName + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.shopName = ""; + + /** + * RegisterSystemInfoRequest shopNickname. + * @member {string} shopNickname + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.shopNickname = ""; + + /** + * RegisterSystemInfoRequest allnetPlaceId. + * @member {number} allnetPlaceId + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.allnetPlaceId = 0; + + /** + * RegisterSystemInfoRequest allnetRegion0. + * @member {number} allnetRegion0 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.allnetRegion0 = 0; + + /** + * RegisterSystemInfoRequest muchaPlaceId. + * @member {string} muchaPlaceId + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.muchaPlaceId = ""; + + /** + * RegisterSystemInfoRequest muchaPrefectureId. + * @member {number} muchaPrefectureId + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.muchaPrefectureId = 0; + + /** + * RegisterSystemInfoRequest regionName0. + * @member {string} regionName0 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName0 = ""; + + /** + * RegisterSystemInfoRequest regionName1. + * @member {string} regionName1 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName1 = ""; + + /** + * RegisterSystemInfoRequest regionName2. + * @member {string} regionName2 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName2 = ""; + + /** + * RegisterSystemInfoRequest regionName3. + * @member {string} regionName3 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName3 = ""; + + /** + * RegisterSystemInfoRequest timezoneOffset. + * @member {number} timezoneOffset + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.timezoneOffset = 0; + + /** + * RegisterSystemInfoRequest systemSetting. + * @member {wm.protobuf.ISystemSetting} systemSetting + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.systemSetting = null; + + /** + * RegisterSystemInfoRequest errorLogs. + * @member {Array.} errorLogs + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.errorLogs = $util.emptyArray; + + /** + * Creates a new RegisterSystemInfoRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.IRegisterSystemInfoRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest instance + */ + RegisterSystemInfoRequest.create = function create(properties) { + return new RegisterSystemInfoRequest(properties); + }; + + /** + * Encodes the specified RegisterSystemInfoRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.IRegisterSystemInfoRequest} message RegisterSystemInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pcbSerial); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.terminalType); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.romVersion); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.country); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.lineType); + writer.uint32(/* id 6, wireType 2 =*/50).string(message.shopName); + writer.uint32(/* id 7, wireType 2 =*/58).string(message.shopNickname); + if (message.allnetPlaceId != null && Object.hasOwnProperty.call(message, "allnetPlaceId")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.allnetPlaceId); + if (message.allnetRegion0 != null && Object.hasOwnProperty.call(message, "allnetRegion0")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.allnetRegion0); + if (message.muchaPlaceId != null && Object.hasOwnProperty.call(message, "muchaPlaceId")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.muchaPlaceId); + if (message.muchaPrefectureId != null && Object.hasOwnProperty.call(message, "muchaPrefectureId")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.muchaPrefectureId); + writer.uint32(/* id 12, wireType 2 =*/98).string(message.regionName0); + writer.uint32(/* id 13, wireType 2 =*/106).string(message.regionName1); + writer.uint32(/* id 14, wireType 2 =*/114).string(message.regionName2); + writer.uint32(/* id 15, wireType 2 =*/122).string(message.regionName3); + writer.uint32(/* id 16, wireType 0 =*/128).sint32(message.timezoneOffset); + $root.wm.protobuf.SystemSetting.encode(message.systemSetting, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.errorLogs != null && message.errorLogs.length) + for (let i = 0; i < message.errorLogs.length; ++i) + $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.encode(message.errorLogs[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RegisterSystemInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.IRegisterSystemInfoRequest} message RegisterSystemInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pcbSerial = reader.string(); + break; + } + case 2: { + message.terminalType = reader.int32(); + break; + } + case 3: { + message.romVersion = reader.uint32(); + break; + } + case 4: { + message.country = reader.string(); + break; + } + case 5: { + message.lineType = reader.int32(); + break; + } + case 6: { + message.shopName = reader.string(); + break; + } + case 7: { + message.shopNickname = reader.string(); + break; + } + case 8: { + message.allnetPlaceId = reader.uint32(); + break; + } + case 9: { + message.allnetRegion0 = reader.uint32(); + break; + } + case 10: { + message.muchaPlaceId = reader.string(); + break; + } + case 11: { + message.muchaPrefectureId = reader.uint32(); + break; + } + case 12: { + message.regionName0 = reader.string(); + break; + } + case 13: { + message.regionName1 = reader.string(); + break; + } + case 14: { + message.regionName2 = reader.string(); + break; + } + case 15: { + message.regionName3 = reader.string(); + break; + } + case 16: { + message.timezoneOffset = reader.sint32(); + break; + } + case 17: { + message.systemSetting = $root.wm.protobuf.SystemSetting.decode(reader, reader.uint32()); + break; + } + case 18: { + if (!(message.errorLogs && message.errorLogs.length)) + message.errorLogs = []; + message.errorLogs.push($root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("pcbSerial")) + throw $util.ProtocolError("missing required 'pcbSerial'", { instance: message }); + if (!message.hasOwnProperty("terminalType")) + throw $util.ProtocolError("missing required 'terminalType'", { instance: message }); + if (!message.hasOwnProperty("romVersion")) + throw $util.ProtocolError("missing required 'romVersion'", { instance: message }); + if (!message.hasOwnProperty("country")) + throw $util.ProtocolError("missing required 'country'", { instance: message }); + if (!message.hasOwnProperty("lineType")) + throw $util.ProtocolError("missing required 'lineType'", { instance: message }); + if (!message.hasOwnProperty("shopName")) + throw $util.ProtocolError("missing required 'shopName'", { instance: message }); + if (!message.hasOwnProperty("shopNickname")) + throw $util.ProtocolError("missing required 'shopNickname'", { instance: message }); + if (!message.hasOwnProperty("regionName0")) + throw $util.ProtocolError("missing required 'regionName0'", { instance: message }); + if (!message.hasOwnProperty("regionName1")) + throw $util.ProtocolError("missing required 'regionName1'", { instance: message }); + if (!message.hasOwnProperty("regionName2")) + throw $util.ProtocolError("missing required 'regionName2'", { instance: message }); + if (!message.hasOwnProperty("regionName3")) + throw $util.ProtocolError("missing required 'regionName3'", { instance: message }); + if (!message.hasOwnProperty("timezoneOffset")) + throw $util.ProtocolError("missing required 'timezoneOffset'", { instance: message }); + if (!message.hasOwnProperty("systemSetting")) + throw $util.ProtocolError("missing required 'systemSetting'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemInfoRequest message. + * @function verify + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.pcbSerial)) + return "pcbSerial: string expected"; + switch (message.terminalType) { + default: + return "terminalType: enum value expected"; + case 0: + case 1: + break; + } + if (!$util.isInteger(message.romVersion)) + return "romVersion: integer expected"; + if (!$util.isString(message.country)) + return "country: string expected"; + switch (message.lineType) { + default: + return "lineType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (!$util.isString(message.shopName)) + return "shopName: string expected"; + if (!$util.isString(message.shopNickname)) + return "shopNickname: string expected"; + if (message.allnetPlaceId != null && message.hasOwnProperty("allnetPlaceId")) + if (!$util.isInteger(message.allnetPlaceId)) + return "allnetPlaceId: integer expected"; + if (message.allnetRegion0 != null && message.hasOwnProperty("allnetRegion0")) + if (!$util.isInteger(message.allnetRegion0)) + return "allnetRegion0: integer expected"; + if (message.muchaPlaceId != null && message.hasOwnProperty("muchaPlaceId")) + if (!$util.isString(message.muchaPlaceId)) + return "muchaPlaceId: string expected"; + if (message.muchaPrefectureId != null && message.hasOwnProperty("muchaPrefectureId")) + if (!$util.isInteger(message.muchaPrefectureId)) + return "muchaPrefectureId: integer expected"; + if (!$util.isString(message.regionName0)) + return "regionName0: string expected"; + if (!$util.isString(message.regionName1)) + return "regionName1: string expected"; + if (!$util.isString(message.regionName2)) + return "regionName2: string expected"; + if (!$util.isString(message.regionName3)) + return "regionName3: string expected"; + if (!$util.isInteger(message.timezoneOffset)) + return "timezoneOffset: integer expected"; + { + let error = $root.wm.protobuf.SystemSetting.verify(message.systemSetting); + if (error) + return "systemSetting." + error; + } + if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) { + if (!Array.isArray(message.errorLogs)) + return "errorLogs: array expected"; + for (let i = 0; i < message.errorLogs.length; ++i) { + let error = $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify(message.errorLogs[i]); + if (error) + return "errorLogs." + error; + } + } + return null; + }; + + /** + * Creates a RegisterSystemInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest + */ + RegisterSystemInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemInfoRequest) + return object; + let message = new $root.wm.protobuf.RegisterSystemInfoRequest(); + if (object.pcbSerial != null) + message.pcbSerial = String(object.pcbSerial); + switch (object.terminalType) { + case "T_DRIVE": + case 0: + message.terminalType = 0; + break; + case "T_TERMINAL": + case 1: + message.terminalType = 1; + break; + } + if (object.romVersion != null) + message.romVersion = object.romVersion >>> 0; + if (object.country != null) + message.country = String(object.country); + switch (object.lineType) { + case "L_UNKNOWN": + case 0: + message.lineType = 0; + break; + case "L_MOBILE": + case 1: + message.lineType = 1; + break; + case "L_ISDN": + case 2: + message.lineType = 2; + break; + case "L_BFLETS": + case 3: + message.lineType = 3; + break; + case "L_ADSL": + case 4: + message.lineType = 4; + break; + case "L_WIRED": + case 5: + message.lineType = 5; + break; + } + if (object.shopName != null) + message.shopName = String(object.shopName); + if (object.shopNickname != null) + message.shopNickname = String(object.shopNickname); + if (object.allnetPlaceId != null) + message.allnetPlaceId = object.allnetPlaceId >>> 0; + if (object.allnetRegion0 != null) + message.allnetRegion0 = object.allnetRegion0 >>> 0; + if (object.muchaPlaceId != null) + message.muchaPlaceId = String(object.muchaPlaceId); + if (object.muchaPrefectureId != null) + message.muchaPrefectureId = object.muchaPrefectureId >>> 0; + if (object.regionName0 != null) + message.regionName0 = String(object.regionName0); + if (object.regionName1 != null) + message.regionName1 = String(object.regionName1); + if (object.regionName2 != null) + message.regionName2 = String(object.regionName2); + if (object.regionName3 != null) + message.regionName3 = String(object.regionName3); + if (object.timezoneOffset != null) + message.timezoneOffset = object.timezoneOffset | 0; + if (object.systemSetting != null) { + if (typeof object.systemSetting !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoRequest.systemSetting: object expected"); + message.systemSetting = $root.wm.protobuf.SystemSetting.fromObject(object.systemSetting); + } + if (object.errorLogs) { + if (!Array.isArray(object.errorLogs)) + throw TypeError(".wm.protobuf.RegisterSystemInfoRequest.errorLogs: array expected"); + message.errorLogs = []; + for (let i = 0; i < object.errorLogs.length; ++i) { + if (typeof object.errorLogs[i] !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoRequest.errorLogs: object expected"); + message.errorLogs[i] = $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.fromObject(object.errorLogs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RegisterSystemInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest} message RegisterSystemInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.errorLogs = []; + if (options.defaults) { + object.pcbSerial = ""; + object.terminalType = options.enums === String ? "T_DRIVE" : 0; + object.romVersion = 0; + object.country = ""; + object.lineType = options.enums === String ? "L_UNKNOWN" : 0; + object.shopName = ""; + object.shopNickname = ""; + object.allnetPlaceId = 0; + object.allnetRegion0 = 0; + object.muchaPlaceId = ""; + object.muchaPrefectureId = 0; + object.regionName0 = ""; + object.regionName1 = ""; + object.regionName2 = ""; + object.regionName3 = ""; + object.timezoneOffset = 0; + object.systemSetting = null; + } + if (message.pcbSerial != null && message.hasOwnProperty("pcbSerial")) + object.pcbSerial = message.pcbSerial; + if (message.terminalType != null && message.hasOwnProperty("terminalType")) + object.terminalType = options.enums === String ? $root.wm.protobuf.TerminalType[message.terminalType] : message.terminalType; + if (message.romVersion != null && message.hasOwnProperty("romVersion")) + object.romVersion = message.romVersion; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + if (message.lineType != null && message.hasOwnProperty("lineType")) + object.lineType = options.enums === String ? $root.wm.protobuf.LineType[message.lineType] : message.lineType; + if (message.shopName != null && message.hasOwnProperty("shopName")) + object.shopName = message.shopName; + if (message.shopNickname != null && message.hasOwnProperty("shopNickname")) + object.shopNickname = message.shopNickname; + if (message.allnetPlaceId != null && message.hasOwnProperty("allnetPlaceId")) + object.allnetPlaceId = message.allnetPlaceId; + if (message.allnetRegion0 != null && message.hasOwnProperty("allnetRegion0")) + object.allnetRegion0 = message.allnetRegion0; + if (message.muchaPlaceId != null && message.hasOwnProperty("muchaPlaceId")) + object.muchaPlaceId = message.muchaPlaceId; + if (message.muchaPrefectureId != null && message.hasOwnProperty("muchaPrefectureId")) + object.muchaPrefectureId = message.muchaPrefectureId; + if (message.regionName0 != null && message.hasOwnProperty("regionName0")) + object.regionName0 = message.regionName0; + if (message.regionName1 != null && message.hasOwnProperty("regionName1")) + object.regionName1 = message.regionName1; + if (message.regionName2 != null && message.hasOwnProperty("regionName2")) + object.regionName2 = message.regionName2; + if (message.regionName3 != null && message.hasOwnProperty("regionName3")) + object.regionName3 = message.regionName3; + if (message.timezoneOffset != null && message.hasOwnProperty("timezoneOffset")) + object.timezoneOffset = message.timezoneOffset; + if (message.systemSetting != null && message.hasOwnProperty("systemSetting")) + object.systemSetting = $root.wm.protobuf.SystemSetting.toObject(message.systemSetting, options); + if (message.errorLogs && message.errorLogs.length) { + object.errorLogs = []; + for (let j = 0; j < message.errorLogs.length; ++j) + object.errorLogs[j] = $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.toObject(message.errorLogs[j], options); + } + return object; + }; + + /** + * Converts this RegisterSystemInfoRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemInfoRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemInfoRequest"; + }; + + RegisterSystemInfoRequest.ErrorLogEntry = (function() { + + /** + * Properties of an ErrorLogEntry. + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @interface IErrorLogEntry + * @property {number} datetime ErrorLogEntry datetime + * @property {string} message ErrorLogEntry message + */ + + /** + * Constructs a new ErrorLogEntry. + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @classdesc Represents an ErrorLogEntry. + * @implements IErrorLogEntry + * @constructor + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry=} [properties] Properties to set + */ + function ErrorLogEntry(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorLogEntry datetime. + * @member {number} datetime + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @instance + */ + ErrorLogEntry.prototype.datetime = 0; + + /** + * ErrorLogEntry message. + * @member {string} message + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @instance + */ + ErrorLogEntry.prototype.message = ""; + + /** + * Creates a new ErrorLogEntry instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry instance + */ + ErrorLogEntry.create = function create(properties) { + return new ErrorLogEntry(properties); + }; + + /** + * Encodes the specified ErrorLogEntry message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry} message ErrorLogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorLogEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.datetime); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + return writer; + }; + + /** + * Encodes the specified ErrorLogEntry message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry} message ErrorLogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorLogEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorLogEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datetime = reader.uint32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("datetime")) + throw $util.ProtocolError("missing required 'datetime'", { instance: message }); + if (!message.hasOwnProperty("message")) + throw $util.ProtocolError("missing required 'message'", { instance: message }); + return message; + }; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorLogEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorLogEntry message. + * @function verify + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorLogEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.datetime)) + return "datetime: integer expected"; + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates an ErrorLogEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry + */ + ErrorLogEntry.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry) + return object; + let message = new $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry(); + if (object.datetime != null) + message.datetime = object.datetime >>> 0; + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from an ErrorLogEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} message ErrorLogEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorLogEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.datetime = 0; + object.message = ""; + } + if (message.datetime != null && message.hasOwnProperty("datetime")) + object.datetime = message.datetime; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this ErrorLogEntry to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @instance + * @returns {Object.} JSON object + */ + ErrorLogEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorLogEntry + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorLogEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry"; + }; + + return ErrorLogEntry; + })(); + + return RegisterSystemInfoRequest; + })(); + + protobuf.RegisterSystemInfoResponse = (function() { + + /** + * Properties of a RegisterSystemInfoResponse. + * @memberof wm.protobuf + * @interface IRegisterSystemInfoResponse + * @property {wm.protobuf.ErrorCode} error RegisterSystemInfoResponse error + * @property {number} regionId RegisterSystemInfoResponse regionId + * @property {string} placeId RegisterSystemInfoResponse placeId + * @property {Array.|null} [allowedClientLogTypes] RegisterSystemInfoResponse allowedClientLogTypes + * @property {wm.protobuf.IGameFeatureVersion} featureVersion RegisterSystemInfoResponse featureVersion + * @property {number|null} [latestCompetitionId] RegisterSystemInfoResponse latestCompetitionId + * @property {wm.protobuf.IGhostCompetitionSchedule|null} [competitionSchedule] RegisterSystemInfoResponse competitionSchedule + * @property {string|null} [scratchNotes] RegisterSystemInfoResponse scratchNotes + * @property {wm.protobuf.IInviteFriendCampaignSchedule|null} [inviteFriendCampaignSchedule] RegisterSystemInfoResponse inviteFriendCampaignSchedule + * @property {number} ghostSelectionMinRedoWait RegisterSystemInfoResponse ghostSelectionMinRedoWait + * @property {number} ghostSelectionMaxRedoWait RegisterSystemInfoResponse ghostSelectionMaxRedoWait + */ + + /** + * Constructs a new RegisterSystemInfoResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemInfoResponse. + * @implements IRegisterSystemInfoResponse + * @constructor + * @param {wm.protobuf.IRegisterSystemInfoResponse=} [properties] Properties to set + */ + function RegisterSystemInfoResponse(properties) { + this.allowedClientLogTypes = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemInfoResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.error = 0; + + /** + * RegisterSystemInfoResponse regionId. + * @member {number} regionId + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.regionId = 0; + + /** + * RegisterSystemInfoResponse placeId. + * @member {string} placeId + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.placeId = ""; + + /** + * RegisterSystemInfoResponse allowedClientLogTypes. + * @member {Array.} allowedClientLogTypes + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.allowedClientLogTypes = $util.emptyArray; + + /** + * RegisterSystemInfoResponse featureVersion. + * @member {wm.protobuf.IGameFeatureVersion} featureVersion + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.featureVersion = null; + + /** + * RegisterSystemInfoResponse latestCompetitionId. + * @member {number} latestCompetitionId + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.latestCompetitionId = 0; + + /** + * RegisterSystemInfoResponse competitionSchedule. + * @member {wm.protobuf.IGhostCompetitionSchedule|null|undefined} competitionSchedule + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.competitionSchedule = null; + + /** + * RegisterSystemInfoResponse scratchNotes. + * @member {string} scratchNotes + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.scratchNotes = ""; + + /** + * RegisterSystemInfoResponse inviteFriendCampaignSchedule. + * @member {wm.protobuf.IInviteFriendCampaignSchedule|null|undefined} inviteFriendCampaignSchedule + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.inviteFriendCampaignSchedule = null; + + /** + * RegisterSystemInfoResponse ghostSelectionMinRedoWait. + * @member {number} ghostSelectionMinRedoWait + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.ghostSelectionMinRedoWait = 0; + + /** + * RegisterSystemInfoResponse ghostSelectionMaxRedoWait. + * @member {number} ghostSelectionMaxRedoWait + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.ghostSelectionMaxRedoWait = 0; + + /** + * Creates a new RegisterSystemInfoResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.IRegisterSystemInfoResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse instance + */ + RegisterSystemInfoResponse.create = function create(properties) { + return new RegisterSystemInfoResponse(properties); + }; + + /** + * Encodes the specified RegisterSystemInfoResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.IRegisterSystemInfoResponse} message RegisterSystemInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.regionId); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.placeId); + if (message.allowedClientLogTypes != null && message.allowedClientLogTypes.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (let i = 0; i < message.allowedClientLogTypes.length; ++i) + writer.int32(message.allowedClientLogTypes[i]); + writer.ldelim(); + } + $root.wm.protobuf.GameFeatureVersion.encode(message.featureVersion, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.latestCompetitionId != null && Object.hasOwnProperty.call(message, "latestCompetitionId")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.latestCompetitionId); + if (message.competitionSchedule != null && Object.hasOwnProperty.call(message, "competitionSchedule")) + $root.wm.protobuf.GhostCompetitionSchedule.encode(message.competitionSchedule, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.scratchNotes != null && Object.hasOwnProperty.call(message, "scratchNotes")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.scratchNotes); + if (message.inviteFriendCampaignSchedule != null && Object.hasOwnProperty.call(message, "inviteFriendCampaignSchedule")) + $root.wm.protobuf.InviteFriendCampaignSchedule.encode(message.inviteFriendCampaignSchedule, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.ghostSelectionMinRedoWait); + writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.ghostSelectionMaxRedoWait); + return writer; + }; + + /** + * Encodes the specified RegisterSystemInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.IRegisterSystemInfoResponse} message RegisterSystemInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.regionId = reader.uint32(); + break; + } + case 3: { + message.placeId = reader.string(); + break; + } + case 4: { + if (!(message.allowedClientLogTypes && message.allowedClientLogTypes.length)) + message.allowedClientLogTypes = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.allowedClientLogTypes.push(reader.int32()); + } else + message.allowedClientLogTypes.push(reader.int32()); + break; + } + case 10: { + message.featureVersion = $root.wm.protobuf.GameFeatureVersion.decode(reader, reader.uint32()); + break; + } + case 11: { + message.latestCompetitionId = reader.uint32(); + break; + } + case 12: { + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.decode(reader, reader.uint32()); + break; + } + case 19: { + message.scratchNotes = reader.string(); + break; + } + case 27: { + message.inviteFriendCampaignSchedule = $root.wm.protobuf.InviteFriendCampaignSchedule.decode(reader, reader.uint32()); + break; + } + case 28: { + message.ghostSelectionMinRedoWait = reader.uint32(); + break; + } + case 29: { + message.ghostSelectionMaxRedoWait = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("regionId")) + throw $util.ProtocolError("missing required 'regionId'", { instance: message }); + if (!message.hasOwnProperty("placeId")) + throw $util.ProtocolError("missing required 'placeId'", { instance: message }); + if (!message.hasOwnProperty("featureVersion")) + throw $util.ProtocolError("missing required 'featureVersion'", { instance: message }); + if (!message.hasOwnProperty("ghostSelectionMinRedoWait")) + throw $util.ProtocolError("missing required 'ghostSelectionMinRedoWait'", { instance: message }); + if (!message.hasOwnProperty("ghostSelectionMaxRedoWait")) + throw $util.ProtocolError("missing required 'ghostSelectionMaxRedoWait'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemInfoResponse message. + * @function verify + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (!$util.isString(message.placeId)) + return "placeId: string expected"; + if (message.allowedClientLogTypes != null && message.hasOwnProperty("allowedClientLogTypes")) { + if (!Array.isArray(message.allowedClientLogTypes)) + return "allowedClientLogTypes: array expected"; + for (let i = 0; i < message.allowedClientLogTypes.length; ++i) + switch (message.allowedClientLogTypes[i]) { + default: + return "allowedClientLogTypes: enum value[] expected"; + case 0: + case 1: + break; + } + } + { + let error = $root.wm.protobuf.GameFeatureVersion.verify(message.featureVersion); + if (error) + return "featureVersion." + error; + } + if (message.latestCompetitionId != null && message.hasOwnProperty("latestCompetitionId")) + if (!$util.isInteger(message.latestCompetitionId)) + return "latestCompetitionId: integer expected"; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) { + let error = $root.wm.protobuf.GhostCompetitionSchedule.verify(message.competitionSchedule); + if (error) + return "competitionSchedule." + error; + } + if (message.scratchNotes != null && message.hasOwnProperty("scratchNotes")) + if (!$util.isString(message.scratchNotes)) + return "scratchNotes: string expected"; + if (message.inviteFriendCampaignSchedule != null && message.hasOwnProperty("inviteFriendCampaignSchedule")) { + let error = $root.wm.protobuf.InviteFriendCampaignSchedule.verify(message.inviteFriendCampaignSchedule); + if (error) + return "inviteFriendCampaignSchedule." + error; + } + if (!$util.isInteger(message.ghostSelectionMinRedoWait)) + return "ghostSelectionMinRedoWait: integer expected"; + if (!$util.isInteger(message.ghostSelectionMaxRedoWait)) + return "ghostSelectionMaxRedoWait: integer expected"; + return null; + }; + + /** + * Creates a RegisterSystemInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse + */ + RegisterSystemInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemInfoResponse) + return object; + let message = new $root.wm.protobuf.RegisterSystemInfoResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.placeId != null) + message.placeId = String(object.placeId); + if (object.allowedClientLogTypes) { + if (!Array.isArray(object.allowedClientLogTypes)) + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.allowedClientLogTypes: array expected"); + message.allowedClientLogTypes = []; + for (let i = 0; i < object.allowedClientLogTypes.length; ++i) + switch (object.allowedClientLogTypes[i]) { + default: + case "LOG_LOAD_REPORT": + case 0: + message.allowedClientLogTypes[i] = 0; + break; + case "LOG_ERROR": + case 1: + message.allowedClientLogTypes[i] = 1; + break; + } + } + if (object.featureVersion != null) { + if (typeof object.featureVersion !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.featureVersion: object expected"); + message.featureVersion = $root.wm.protobuf.GameFeatureVersion.fromObject(object.featureVersion); + } + if (object.latestCompetitionId != null) + message.latestCompetitionId = object.latestCompetitionId >>> 0; + if (object.competitionSchedule != null) { + if (typeof object.competitionSchedule !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.competitionSchedule: object expected"); + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.fromObject(object.competitionSchedule); + } + if (object.scratchNotes != null) + message.scratchNotes = String(object.scratchNotes); + if (object.inviteFriendCampaignSchedule != null) { + if (typeof object.inviteFriendCampaignSchedule !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.inviteFriendCampaignSchedule: object expected"); + message.inviteFriendCampaignSchedule = $root.wm.protobuf.InviteFriendCampaignSchedule.fromObject(object.inviteFriendCampaignSchedule); + } + if (object.ghostSelectionMinRedoWait != null) + message.ghostSelectionMinRedoWait = object.ghostSelectionMinRedoWait >>> 0; + if (object.ghostSelectionMaxRedoWait != null) + message.ghostSelectionMaxRedoWait = object.ghostSelectionMaxRedoWait >>> 0; + return message; + }; + + /** + * Creates a plain object from a RegisterSystemInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.RegisterSystemInfoResponse} message RegisterSystemInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.allowedClientLogTypes = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.regionId = 0; + object.placeId = ""; + object.featureVersion = null; + object.latestCompetitionId = 0; + object.competitionSchedule = null; + object.scratchNotes = ""; + object.inviteFriendCampaignSchedule = null; + object.ghostSelectionMinRedoWait = 0; + object.ghostSelectionMaxRedoWait = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.placeId != null && message.hasOwnProperty("placeId")) + object.placeId = message.placeId; + if (message.allowedClientLogTypes && message.allowedClientLogTypes.length) { + object.allowedClientLogTypes = []; + for (let j = 0; j < message.allowedClientLogTypes.length; ++j) + object.allowedClientLogTypes[j] = options.enums === String ? $root.wm.protobuf.ClientLogType[message.allowedClientLogTypes[j]] : message.allowedClientLogTypes[j]; + } + if (message.featureVersion != null && message.hasOwnProperty("featureVersion")) + object.featureVersion = $root.wm.protobuf.GameFeatureVersion.toObject(message.featureVersion, options); + if (message.latestCompetitionId != null && message.hasOwnProperty("latestCompetitionId")) + object.latestCompetitionId = message.latestCompetitionId; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) + object.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.toObject(message.competitionSchedule, options); + if (message.scratchNotes != null && message.hasOwnProperty("scratchNotes")) + object.scratchNotes = message.scratchNotes; + if (message.inviteFriendCampaignSchedule != null && message.hasOwnProperty("inviteFriendCampaignSchedule")) + object.inviteFriendCampaignSchedule = $root.wm.protobuf.InviteFriendCampaignSchedule.toObject(message.inviteFriendCampaignSchedule, options); + if (message.ghostSelectionMinRedoWait != null && message.hasOwnProperty("ghostSelectionMinRedoWait")) + object.ghostSelectionMinRedoWait = message.ghostSelectionMinRedoWait; + if (message.ghostSelectionMaxRedoWait != null && message.hasOwnProperty("ghostSelectionMaxRedoWait")) + object.ghostSelectionMaxRedoWait = message.ghostSelectionMaxRedoWait; + return object; + }; + + /** + * Converts this RegisterSystemInfoResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemInfoResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemInfoResponse"; + }; + + return RegisterSystemInfoResponse; + })(); + + protobuf.RegisterSystemStatsRequest = (function() { + + /** + * Properties of a RegisterSystemStatsRequest. + * @memberof wm.protobuf + * @interface IRegisterSystemStatsRequest + * @property {string} pcbSerial RegisterSystemStatsRequest pcbSerial + * @property {wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null} [driveStats] RegisterSystemStatsRequest driveStats + * @property {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null} [terminalStats] RegisterSystemStatsRequest terminalStats + */ + + /** + * Constructs a new RegisterSystemStatsRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemStatsRequest. + * @implements IRegisterSystemStatsRequest + * @constructor + * @param {wm.protobuf.IRegisterSystemStatsRequest=} [properties] Properties to set + */ + function RegisterSystemStatsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemStatsRequest pcbSerial. + * @member {string} pcbSerial + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + */ + RegisterSystemStatsRequest.prototype.pcbSerial = ""; + + /** + * RegisterSystemStatsRequest driveStats. + * @member {wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null|undefined} driveStats + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + */ + RegisterSystemStatsRequest.prototype.driveStats = null; + + /** + * RegisterSystemStatsRequest terminalStats. + * @member {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null|undefined} terminalStats + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + */ + RegisterSystemStatsRequest.prototype.terminalStats = null; + + /** + * Creates a new RegisterSystemStatsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.IRegisterSystemStatsRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest instance + */ + RegisterSystemStatsRequest.create = function create(properties) { + return new RegisterSystemStatsRequest(properties); + }; + + /** + * Encodes the specified RegisterSystemStatsRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.IRegisterSystemStatsRequest} message RegisterSystemStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pcbSerial); + if (message.driveStats != null && Object.hasOwnProperty.call(message, "driveStats")) + $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.encode(message.driveStats, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.terminalStats != null && Object.hasOwnProperty.call(message, "terminalStats")) + $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.encode(message.terminalStats, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RegisterSystemStatsRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.IRegisterSystemStatsRequest} message RegisterSystemStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pcbSerial = reader.string(); + break; + } + case 2: { + message.driveStats = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.decode(reader, reader.uint32()); + break; + } + case 3: { + message.terminalStats = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("pcbSerial")) + throw $util.ProtocolError("missing required 'pcbSerial'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemStatsRequest message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemStatsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.pcbSerial)) + return "pcbSerial: string expected"; + if (message.driveStats != null && message.hasOwnProperty("driveStats")) { + let error = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify(message.driveStats); + if (error) + return "driveStats." + error; + } + if (message.terminalStats != null && message.hasOwnProperty("terminalStats")) { + let error = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify(message.terminalStats); + if (error) + return "terminalStats." + error; + } + return null; + }; + + /** + * Creates a RegisterSystemStatsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest + */ + RegisterSystemStatsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsRequest) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsRequest(); + if (object.pcbSerial != null) + message.pcbSerial = String(object.pcbSerial); + if (object.driveStats != null) { + if (typeof object.driveStats !== "object") + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.driveStats: object expected"); + message.driveStats = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.fromObject(object.driveStats); + } + if (object.terminalStats != null) { + if (typeof object.terminalStats !== "object") + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.terminalStats: object expected"); + message.terminalStats = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.fromObject(object.terminalStats); + } + return message; + }; + + /** + * Creates a plain object from a RegisterSystemStatsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest} message RegisterSystemStatsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemStatsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.pcbSerial = ""; + object.driveStats = null; + object.terminalStats = null; + } + if (message.pcbSerial != null && message.hasOwnProperty("pcbSerial")) + object.pcbSerial = message.pcbSerial; + if (message.driveStats != null && message.hasOwnProperty("driveStats")) + object.driveStats = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.toObject(message.driveStats, options); + if (message.terminalStats != null && message.hasOwnProperty("terminalStats")) + object.terminalStats = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.toObject(message.terminalStats, options); + return object; + }; + + /** + * Converts this RegisterSystemStatsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemStatsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemStatsRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemStatsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsRequest"; + }; + + RegisterSystemStatsRequest.DriveStats = (function() { + + /** + * Properties of a DriveStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @interface IDriveStats + * @property {Array.|null} [operation] DriveStats operation + * @property {Array.|null} [story] DriveStats story + * @property {Array.|null} [versus] DriveStats versus + * @property {Array.|null} [ghost] DriveStats ghost + * @property {Array.|null} [timeAttack] DriveStats timeAttack + * @property {Array.|null} [event] DriveStats event + */ + + /** + * Constructs a new DriveStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @classdesc Represents a DriveStats. + * @implements IDriveStats + * @constructor + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats=} [properties] Properties to set + */ + function DriveStats(properties) { + this.operation = []; + this.story = []; + this.versus = []; + this.ghost = []; + this.timeAttack = []; + this.event = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DriveStats operation. + * @member {Array.} operation + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.operation = $util.emptyArray; + + /** + * DriveStats story. + * @member {Array.} story + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.story = $util.emptyArray; + + /** + * DriveStats versus. + * @member {Array.} versus + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.versus = $util.emptyArray; + + /** + * DriveStats ghost. + * @member {Array.} ghost + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.ghost = $util.emptyArray; + + /** + * DriveStats timeAttack. + * @member {Array.} timeAttack + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.timeAttack = $util.emptyArray; + + /** + * DriveStats event. + * @member {Array.} event + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.event = $util.emptyArray; + + /** + * Creates a new DriveStats instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats instance + */ + DriveStats.create = function create(properties) { + return new DriveStats(properties); + }; + + /** + * Encodes the specified DriveStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats} message DriveStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DriveStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && message.operation.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (let i = 0; i < message.operation.length; ++i) + writer.uint32(message.operation[i]); + writer.ldelim(); + } + if (message.story != null && message.story.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (let i = 0; i < message.story.length; ++i) + writer.uint32(message.story[i]); + writer.ldelim(); + } + if (message.versus != null && message.versus.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (let i = 0; i < message.versus.length; ++i) + writer.uint32(message.versus[i]); + writer.ldelim(); + } + if (message.ghost != null && message.ghost.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (let i = 0; i < message.ghost.length; ++i) + writer.uint32(message.ghost[i]); + writer.ldelim(); + } + if (message.timeAttack != null && message.timeAttack.length) { + writer.uint32(/* id 5, wireType 2 =*/42).fork(); + for (let i = 0; i < message.timeAttack.length; ++i) + writer.uint32(message.timeAttack[i]); + writer.ldelim(); + } + if (message.event != null && message.event.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (let i = 0; i < message.event.length; ++i) + writer.uint32(message.event[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified DriveStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats} message DriveStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DriveStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DriveStats message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DriveStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operation && message.operation.length)) + message.operation = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.operation.push(reader.uint32()); + } else + message.operation.push(reader.uint32()); + break; + } + case 2: { + if (!(message.story && message.story.length)) + message.story = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.story.push(reader.uint32()); + } else + message.story.push(reader.uint32()); + break; + } + case 3: { + if (!(message.versus && message.versus.length)) + message.versus = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.versus.push(reader.uint32()); + } else + message.versus.push(reader.uint32()); + break; + } + case 4: { + if (!(message.ghost && message.ghost.length)) + message.ghost = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.ghost.push(reader.uint32()); + } else + message.ghost.push(reader.uint32()); + break; + } + case 5: { + if (!(message.timeAttack && message.timeAttack.length)) + message.timeAttack = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.timeAttack.push(reader.uint32()); + } else + message.timeAttack.push(reader.uint32()); + break; + } + case 6: { + if (!(message.event && message.event.length)) + message.event = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.event.push(reader.uint32()); + } else + message.event.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DriveStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DriveStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DriveStats message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DriveStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) { + if (!Array.isArray(message.operation)) + return "operation: array expected"; + for (let i = 0; i < message.operation.length; ++i) + if (!$util.isInteger(message.operation[i])) + return "operation: integer[] expected"; + } + if (message.story != null && message.hasOwnProperty("story")) { + if (!Array.isArray(message.story)) + return "story: array expected"; + for (let i = 0; i < message.story.length; ++i) + if (!$util.isInteger(message.story[i])) + return "story: integer[] expected"; + } + if (message.versus != null && message.hasOwnProperty("versus")) { + if (!Array.isArray(message.versus)) + return "versus: array expected"; + for (let i = 0; i < message.versus.length; ++i) + if (!$util.isInteger(message.versus[i])) + return "versus: integer[] expected"; + } + if (message.ghost != null && message.hasOwnProperty("ghost")) { + if (!Array.isArray(message.ghost)) + return "ghost: array expected"; + for (let i = 0; i < message.ghost.length; ++i) + if (!$util.isInteger(message.ghost[i])) + return "ghost: integer[] expected"; + } + if (message.timeAttack != null && message.hasOwnProperty("timeAttack")) { + if (!Array.isArray(message.timeAttack)) + return "timeAttack: array expected"; + for (let i = 0; i < message.timeAttack.length; ++i) + if (!$util.isInteger(message.timeAttack[i])) + return "timeAttack: integer[] expected"; + } + if (message.event != null && message.hasOwnProperty("event")) { + if (!Array.isArray(message.event)) + return "event: array expected"; + for (let i = 0; i < message.event.length; ++i) + if (!$util.isInteger(message.event[i])) + return "event: integer[] expected"; + } + return null; + }; + + /** + * Creates a DriveStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats + */ + DriveStats.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats(); + if (object.operation) { + if (!Array.isArray(object.operation)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.operation: array expected"); + message.operation = []; + for (let i = 0; i < object.operation.length; ++i) + message.operation[i] = object.operation[i] >>> 0; + } + if (object.story) { + if (!Array.isArray(object.story)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.story: array expected"); + message.story = []; + for (let i = 0; i < object.story.length; ++i) + message.story[i] = object.story[i] >>> 0; + } + if (object.versus) { + if (!Array.isArray(object.versus)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.versus: array expected"); + message.versus = []; + for (let i = 0; i < object.versus.length; ++i) + message.versus[i] = object.versus[i] >>> 0; + } + if (object.ghost) { + if (!Array.isArray(object.ghost)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.ghost: array expected"); + message.ghost = []; + for (let i = 0; i < object.ghost.length; ++i) + message.ghost[i] = object.ghost[i] >>> 0; + } + if (object.timeAttack) { + if (!Array.isArray(object.timeAttack)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.timeAttack: array expected"); + message.timeAttack = []; + for (let i = 0; i < object.timeAttack.length; ++i) + message.timeAttack[i] = object.timeAttack[i] >>> 0; + } + if (object.event) { + if (!Array.isArray(object.event)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.event: array expected"); + message.event = []; + for (let i = 0; i < object.event.length; ++i) + message.event[i] = object.event[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a DriveStats message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.DriveStats} message DriveStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DriveStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.operation = []; + object.story = []; + object.versus = []; + object.ghost = []; + object.timeAttack = []; + object.event = []; + } + if (message.operation && message.operation.length) { + object.operation = []; + for (let j = 0; j < message.operation.length; ++j) + object.operation[j] = message.operation[j]; + } + if (message.story && message.story.length) { + object.story = []; + for (let j = 0; j < message.story.length; ++j) + object.story[j] = message.story[j]; + } + if (message.versus && message.versus.length) { + object.versus = []; + for (let j = 0; j < message.versus.length; ++j) + object.versus[j] = message.versus[j]; + } + if (message.ghost && message.ghost.length) { + object.ghost = []; + for (let j = 0; j < message.ghost.length; ++j) + object.ghost[j] = message.ghost[j]; + } + if (message.timeAttack && message.timeAttack.length) { + object.timeAttack = []; + for (let j = 0; j < message.timeAttack.length; ++j) + object.timeAttack[j] = message.timeAttack[j]; + } + if (message.event && message.event.length) { + object.event = []; + for (let j = 0; j < message.event.length; ++j) + object.event[j] = message.event[j]; + } + return object; + }; + + /** + * Converts this DriveStats to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + * @returns {Object.} JSON object + */ + DriveStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DriveStats + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DriveStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsRequest.DriveStats"; + }; + + return DriveStats; + })(); + + RegisterSystemStatsRequest.TerminalStats = (function() { + + /** + * Properties of a TerminalStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @interface ITerminalStats + * @property {Array.|null} [operation] TerminalStats operation + */ + + /** + * Constructs a new TerminalStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @classdesc Represents a TerminalStats. + * @implements ITerminalStats + * @constructor + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats=} [properties] Properties to set + */ + function TerminalStats(properties) { + this.operation = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerminalStats operation. + * @member {Array.} operation + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @instance + */ + TerminalStats.prototype.operation = $util.emptyArray; + + /** + * Creates a new TerminalStats instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats instance + */ + TerminalStats.create = function create(properties) { + return new TerminalStats(properties); + }; + + /** + * Encodes the specified TerminalStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats} message TerminalStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && message.operation.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (let i = 0; i < message.operation.length; ++i) + writer.uint32(message.operation[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified TerminalStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats} message TerminalStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerminalStats message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operation && message.operation.length)) + message.operation = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.operation.push(reader.uint32()); + } else + message.operation.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TerminalStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerminalStats message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerminalStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) { + if (!Array.isArray(message.operation)) + return "operation: array expected"; + for (let i = 0; i < message.operation.length; ++i) + if (!$util.isInteger(message.operation[i])) + return "operation: integer[] expected"; + } + return null; + }; + + /** + * Creates a TerminalStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats + */ + TerminalStats.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats(); + if (object.operation) { + if (!Array.isArray(object.operation)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.TerminalStats.operation: array expected"); + message.operation = []; + for (let i = 0; i < object.operation.length; ++i) + message.operation[i] = object.operation[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a TerminalStats message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} message TerminalStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerminalStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.operation = []; + if (message.operation && message.operation.length) { + object.operation = []; + for (let j = 0; j < message.operation.length; ++j) + object.operation[j] = message.operation[j]; + } + return object; + }; + + /** + * Converts this TerminalStats to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @instance + * @returns {Object.} JSON object + */ + TerminalStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerminalStats + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerminalStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsRequest.TerminalStats"; + }; + + return TerminalStats; + })(); + + return RegisterSystemStatsRequest; + })(); + + protobuf.RegisterSystemStatsResponse = (function() { + + /** + * Properties of a RegisterSystemStatsResponse. + * @memberof wm.protobuf + * @interface IRegisterSystemStatsResponse + * @property {wm.protobuf.ErrorCode} error RegisterSystemStatsResponse error + */ + + /** + * Constructs a new RegisterSystemStatsResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemStatsResponse. + * @implements IRegisterSystemStatsResponse + * @constructor + * @param {wm.protobuf.IRegisterSystemStatsResponse=} [properties] Properties to set + */ + function RegisterSystemStatsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemStatsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @instance + */ + RegisterSystemStatsResponse.prototype.error = 0; + + /** + * Creates a new RegisterSystemStatsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.IRegisterSystemStatsResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse instance + */ + RegisterSystemStatsResponse.create = function create(properties) { + return new RegisterSystemStatsResponse(properties); + }; + + /** + * Encodes the specified RegisterSystemStatsResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.IRegisterSystemStatsResponse} message RegisterSystemStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified RegisterSystemStatsResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.IRegisterSystemStatsResponse} message RegisterSystemStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemStatsResponse message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemStatsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a RegisterSystemStatsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse + */ + RegisterSystemStatsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsResponse) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a RegisterSystemStatsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.RegisterSystemStatsResponse} message RegisterSystemStatsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemStatsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this RegisterSystemStatsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemStatsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemStatsResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemStatsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsResponse"; + }; + + return RegisterSystemStatsResponse; + })(); + + protobuf.RegisterGhostTrailRequest = (function() { + + /** + * Properties of a RegisterGhostTrailRequest. + * @memberof wm.protobuf + * @interface IRegisterGhostTrailRequest + * @property {number|Long} ghostSessionId RegisterGhostTrailRequest ghostSessionId + * @property {wm.protobuf.IGhostCar} ghost RegisterGhostTrailRequest ghost + * @property {Uint8Array} trail RegisterGhostTrailRequest trail + * @property {number|null} [time] RegisterGhostTrailRequest time + * @property {wm.protobuf.IBinaryData|null} [driveData] RegisterGhostTrailRequest driveData + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByArea] RegisterGhostTrailRequest trendBinaryByArea + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByCar] RegisterGhostTrailRequest trendBinaryByCar + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByUser] RegisterGhostTrailRequest trendBinaryByUser + */ + + /** + * Constructs a new RegisterGhostTrailRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterGhostTrailRequest. + * @implements IRegisterGhostTrailRequest + * @constructor + * @param {wm.protobuf.IRegisterGhostTrailRequest=} [properties] Properties to set + */ + function RegisterGhostTrailRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterGhostTrailRequest ghostSessionId. + * @member {number|Long} ghostSessionId + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.ghostSessionId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * RegisterGhostTrailRequest ghost. + * @member {wm.protobuf.IGhostCar} ghost + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.ghost = null; + + /** + * RegisterGhostTrailRequest trail. + * @member {Uint8Array} trail + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trail = $util.newBuffer([]); + + /** + * RegisterGhostTrailRequest time. + * @member {number} time + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.time = 0; + + /** + * RegisterGhostTrailRequest driveData. + * @member {wm.protobuf.IBinaryData|null|undefined} driveData + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.driveData = null; + + /** + * RegisterGhostTrailRequest trendBinaryByArea. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByArea + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trendBinaryByArea = null; + + /** + * RegisterGhostTrailRequest trendBinaryByCar. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByCar + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trendBinaryByCar = null; + + /** + * RegisterGhostTrailRequest trendBinaryByUser. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByUser + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trendBinaryByUser = null; + + /** + * Creates a new RegisterGhostTrailRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.IRegisterGhostTrailRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest instance + */ + RegisterGhostTrailRequest.create = function create(properties) { + return new RegisterGhostTrailRequest(properties); + }; + + /** + * Encodes the specified RegisterGhostTrailRequest message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.IRegisterGhostTrailRequest} message RegisterGhostTrailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.ghostSessionId); + $root.wm.protobuf.GhostCar.encode(message.ghost, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.trail); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time); + if (message.driveData != null && Object.hasOwnProperty.call(message, "driveData")) + $root.wm.protobuf.BinaryData.encode(message.driveData, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.trendBinaryByArea != null && Object.hasOwnProperty.call(message, "trendBinaryByArea")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByArea, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.trendBinaryByCar != null && Object.hasOwnProperty.call(message, "trendBinaryByCar")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByCar, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.trendBinaryByUser != null && Object.hasOwnProperty.call(message, "trendBinaryByUser")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByUser, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RegisterGhostTrailRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.IRegisterGhostTrailRequest} message RegisterGhostTrailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterGhostTrailRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ghostSessionId = reader.uint64(); + break; + } + case 2: { + message.ghost = $root.wm.protobuf.GhostCar.decode(reader, reader.uint32()); + break; + } + case 3: { + message.trail = reader.bytes(); + break; + } + case 4: { + message.time = reader.uint32(); + break; + } + case 5: { + message.driveData = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 6: { + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 7: { + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 8: { + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("ghostSessionId")) + throw $util.ProtocolError("missing required 'ghostSessionId'", { instance: message }); + if (!message.hasOwnProperty("ghost")) + throw $util.ProtocolError("missing required 'ghost'", { instance: message }); + if (!message.hasOwnProperty("trail")) + throw $util.ProtocolError("missing required 'trail'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterGhostTrailRequest message. + * @function verify + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterGhostTrailRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.ghostSessionId) && !(message.ghostSessionId && $util.isInteger(message.ghostSessionId.low) && $util.isInteger(message.ghostSessionId.high))) + return "ghostSessionId: integer|Long expected"; + { + let error = $root.wm.protobuf.GhostCar.verify(message.ghost); + if (error) + return "ghost." + error; + } + if (!(message.trail && typeof message.trail.length === "number" || $util.isString(message.trail))) + return "trail: buffer expected"; + if (message.time != null && message.hasOwnProperty("time")) + if (!$util.isInteger(message.time)) + return "time: integer expected"; + if (message.driveData != null && message.hasOwnProperty("driveData")) { + let error = $root.wm.protobuf.BinaryData.verify(message.driveData); + if (error) + return "driveData." + error; + } + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByArea); + if (error) + return "trendBinaryByArea." + error; + } + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByCar); + if (error) + return "trendBinaryByCar." + error; + } + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByUser); + if (error) + return "trendBinaryByUser." + error; + } + return null; + }; + + /** + * Creates a RegisterGhostTrailRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest + */ + RegisterGhostTrailRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterGhostTrailRequest) + return object; + let message = new $root.wm.protobuf.RegisterGhostTrailRequest(); + if (object.ghostSessionId != null) + if ($util.Long) + (message.ghostSessionId = $util.Long.fromValue(object.ghostSessionId)).unsigned = true; + else if (typeof object.ghostSessionId === "string") + message.ghostSessionId = parseInt(object.ghostSessionId, 10); + else if (typeof object.ghostSessionId === "number") + message.ghostSessionId = object.ghostSessionId; + else if (typeof object.ghostSessionId === "object") + message.ghostSessionId = new $util.LongBits(object.ghostSessionId.low >>> 0, object.ghostSessionId.high >>> 0).toNumber(true); + if (object.ghost != null) { + if (typeof object.ghost !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.ghost: object expected"); + message.ghost = $root.wm.protobuf.GhostCar.fromObject(object.ghost); + } + if (object.trail != null) + if (typeof object.trail === "string") + $util.base64.decode(object.trail, message.trail = $util.newBuffer($util.base64.length(object.trail)), 0); + else if (object.trail.length >= 0) + message.trail = object.trail; + if (object.time != null) + message.time = object.time >>> 0; + if (object.driveData != null) { + if (typeof object.driveData !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.driveData: object expected"); + message.driveData = $root.wm.protobuf.BinaryData.fromObject(object.driveData); + } + if (object.trendBinaryByArea != null) { + if (typeof object.trendBinaryByArea !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.trendBinaryByArea: object expected"); + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByArea); + } + if (object.trendBinaryByCar != null) { + if (typeof object.trendBinaryByCar !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.trendBinaryByCar: object expected"); + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByCar); + } + if (object.trendBinaryByUser != null) { + if (typeof object.trendBinaryByUser !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.trendBinaryByUser: object expected"); + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByUser); + } + return message; + }; + + /** + * Creates a plain object from a RegisterGhostTrailRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.RegisterGhostTrailRequest} message RegisterGhostTrailRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterGhostTrailRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.ghostSessionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ghostSessionId = options.longs === String ? "0" : 0; + object.ghost = null; + if (options.bytes === String) + object.trail = ""; + else { + object.trail = []; + if (options.bytes !== Array) + object.trail = $util.newBuffer(object.trail); + } + object.time = 0; + object.driveData = null; + object.trendBinaryByArea = null; + object.trendBinaryByCar = null; + object.trendBinaryByUser = null; + } + if (message.ghostSessionId != null && message.hasOwnProperty("ghostSessionId")) + if (typeof message.ghostSessionId === "number") + object.ghostSessionId = options.longs === String ? String(message.ghostSessionId) : message.ghostSessionId; + else + object.ghostSessionId = options.longs === String ? $util.Long.prototype.toString.call(message.ghostSessionId) : options.longs === Number ? new $util.LongBits(message.ghostSessionId.low >>> 0, message.ghostSessionId.high >>> 0).toNumber(true) : message.ghostSessionId; + if (message.ghost != null && message.hasOwnProperty("ghost")) + object.ghost = $root.wm.protobuf.GhostCar.toObject(message.ghost, options); + if (message.trail != null && message.hasOwnProperty("trail")) + object.trail = options.bytes === String ? $util.base64.encode(message.trail, 0, message.trail.length) : options.bytes === Array ? Array.prototype.slice.call(message.trail) : message.trail; + if (message.time != null && message.hasOwnProperty("time")) + object.time = message.time; + if (message.driveData != null && message.hasOwnProperty("driveData")) + object.driveData = $root.wm.protobuf.BinaryData.toObject(message.driveData, options); + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) + object.trendBinaryByArea = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByArea, options); + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) + object.trendBinaryByCar = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByCar, options); + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) + object.trendBinaryByUser = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByUser, options); + return object; + }; + + /** + * Converts this RegisterGhostTrailRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterGhostTrailRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterGhostTrailRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterGhostTrailRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterGhostTrailRequest"; + }; + + return RegisterGhostTrailRequest; + })(); + + protobuf.RegisterGhostTrailResponse = (function() { + + /** + * Properties of a RegisterGhostTrailResponse. + * @memberof wm.protobuf + * @interface IRegisterGhostTrailResponse + * @property {wm.protobuf.ErrorCode} error RegisterGhostTrailResponse error + */ + + /** + * Constructs a new RegisterGhostTrailResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterGhostTrailResponse. + * @implements IRegisterGhostTrailResponse + * @constructor + * @param {wm.protobuf.IRegisterGhostTrailResponse=} [properties] Properties to set + */ + function RegisterGhostTrailResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterGhostTrailResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @instance + */ + RegisterGhostTrailResponse.prototype.error = 0; + + /** + * Creates a new RegisterGhostTrailResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.IRegisterGhostTrailResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse instance + */ + RegisterGhostTrailResponse.create = function create(properties) { + return new RegisterGhostTrailResponse(properties); + }; + + /** + * Encodes the specified RegisterGhostTrailResponse message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.IRegisterGhostTrailResponse} message RegisterGhostTrailResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified RegisterGhostTrailResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.IRegisterGhostTrailResponse} message RegisterGhostTrailResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterGhostTrailResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterGhostTrailResponse message. + * @function verify + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterGhostTrailResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a RegisterGhostTrailResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse + */ + RegisterGhostTrailResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterGhostTrailResponse) + return object; + let message = new $root.wm.protobuf.RegisterGhostTrailResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a RegisterGhostTrailResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.RegisterGhostTrailResponse} message RegisterGhostTrailResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterGhostTrailResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this RegisterGhostTrailResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterGhostTrailResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterGhostTrailResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterGhostTrailResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterGhostTrailResponse"; + }; + + return RegisterGhostTrailResponse; + })(); + + protobuf.LoadUserRequest = (function() { + + /** + * Properties of a LoadUserRequest. + * @memberof wm.protobuf + * @interface ILoadUserRequest + * @property {string|null} [cardChipId] LoadUserRequest cardChipId + * @property {string|null} [accessCode] LoadUserRequest accessCode + * @property {number|null} [cardTypeCode] LoadUserRequest cardTypeCode + * @property {number|null} [cardRegionCode] LoadUserRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] LoadUserRequest device + * @property {number|null} [userId] LoadUserRequest userId + * @property {number} romVersion LoadUserRequest romVersion + * @property {number} maxCars LoadUserRequest maxCars + * @property {boolean|null} [createUser] LoadUserRequest createUser + */ + + /** + * Constructs a new LoadUserRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadUserRequest. + * @implements ILoadUserRequest + * @constructor + * @param {wm.protobuf.ILoadUserRequest=} [properties] Properties to set + */ + function LoadUserRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUserRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.cardChipId = ""; + + /** + * LoadUserRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.accessCode = ""; + + /** + * LoadUserRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.cardTypeCode = 0; + + /** + * LoadUserRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.cardRegionCode = 0; + + /** + * LoadUserRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.device = 0; + + /** + * LoadUserRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.userId = 0; + + /** + * LoadUserRequest romVersion. + * @member {number} romVersion + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.romVersion = 0; + + /** + * LoadUserRequest maxCars. + * @member {number} maxCars + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.maxCars = 0; + + /** + * LoadUserRequest createUser. + * @member {boolean} createUser + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.createUser = false; + + /** + * Creates a new LoadUserRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.ILoadUserRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest instance + */ + LoadUserRequest.create = function create(properties) { + return new LoadUserRequest(properties); + }; + + /** + * Encodes the specified LoadUserRequest message. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.ILoadUserRequest} message LoadUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.device); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.userId); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.romVersion); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.maxCars); + if (message.createUser != null && Object.hasOwnProperty.call(message, "createUser")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.createUser); + return writer; + }; + + /** + * Encodes the specified LoadUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.ILoadUserRequest} message LoadUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUserRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cardChipId = reader.string(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + case 3: { + message.cardTypeCode = reader.uint32(); + break; + } + case 4: { + message.cardRegionCode = reader.uint32(); + break; + } + case 5: { + message.device = reader.int32(); + break; + } + case 6: { + message.userId = reader.uint32(); + break; + } + case 7: { + message.romVersion = reader.uint32(); + break; + } + case 8: { + message.maxCars = reader.uint32(); + break; + } + case 9: { + message.createUser = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("romVersion")) + throw $util.ProtocolError("missing required 'romVersion'", { instance: message }); + if (!message.hasOwnProperty("maxCars")) + throw $util.ProtocolError("missing required 'maxCars'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUserRequest message. + * @function verify + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUserRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.romVersion)) + return "romVersion: integer expected"; + if (!$util.isInteger(message.maxCars)) + return "maxCars: integer expected"; + if (message.createUser != null && message.hasOwnProperty("createUser")) + if (typeof message.createUser !== "boolean") + return "createUser: boolean expected"; + return null; + }; + + /** + * Creates a LoadUserRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest + */ + LoadUserRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUserRequest) + return object; + let message = new $root.wm.protobuf.LoadUserRequest(); + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.romVersion != null) + message.romVersion = object.romVersion >>> 0; + if (object.maxCars != null) + message.maxCars = object.maxCars >>> 0; + if (object.createUser != null) + message.createUser = Boolean(object.createUser); + return message; + }; + + /** + * Creates a plain object from a LoadUserRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.LoadUserRequest} message LoadUserRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUserRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.userId = 0; + object.romVersion = 0; + object.maxCars = 0; + object.createUser = false; + } + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.romVersion != null && message.hasOwnProperty("romVersion")) + object.romVersion = message.romVersion; + if (message.maxCars != null && message.hasOwnProperty("maxCars")) + object.maxCars = message.maxCars; + if (message.createUser != null && message.hasOwnProperty("createUser")) + object.createUser = message.createUser; + return object; + }; + + /** + * Converts this LoadUserRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUserRequest + * @instance + * @returns {Object.} JSON object + */ + LoadUserRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUserRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUserRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUserRequest"; + }; + + return LoadUserRequest; + })(); + + protobuf.LoadUserResponse = (function() { + + /** + * Properties of a LoadUserResponse. + * @memberof wm.protobuf + * @interface ILoadUserResponse + * @property {wm.protobuf.ErrorCode} error LoadUserResponse error + * @property {number|null} [unlockAt] LoadUserResponse unlockAt + * @property {string|null} [accessCode] LoadUserResponse accessCode + * @property {number|null} [banapassportAmId] LoadUserResponse banapassportAmId + * @property {number|null} [mbid] LoadUserResponse mbid + * @property {number|null} [userId] LoadUserResponse userId + * @property {number} numOfOwnedCars LoadUserResponse numOfOwnedCars + * @property {Array.|null} [cars] LoadUserResponse cars + * @property {Array.|null} [carStates] LoadUserResponse carStates + * @property {Array.|null} [unusedCarTickets] LoadUserResponse unusedCarTickets + * @property {Array.|null} [tutorials] LoadUserResponse tutorials + * @property {wm.protobuf.GhostCompetitionParticipantState|null} [competitionUserState] LoadUserResponse competitionUserState + * @property {string|null} [windowStickerString] LoadUserResponse windowStickerString + * @property {number|null} [windowStickerFont] LoadUserResponse windowStickerFont + * @property {wm.protobuf.SmartphoneAppState} spappState LoadUserResponse spappState + * @property {wm.protobuf.TransferState} transferState LoadUserResponse transferState + * @property {number|null} [totalVsStarCount] LoadUserResponse totalVsStarCount + * @property {number|null} [totalVsMedalPoint] LoadUserResponse totalVsMedalPoint + * @property {wm.protobuf.ICopiedCar|null} [copiedCar] LoadUserResponse copiedCar + * @property {boolean|null} [wasCreatedToday] LoadUserResponse wasCreatedToday + * @property {boolean|null} [participatedInInviteFriendCampaign] LoadUserResponse participatedInInviteFriendCampaign + */ + + /** + * Constructs a new LoadUserResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadUserResponse. + * @implements ILoadUserResponse + * @constructor + * @param {wm.protobuf.ILoadUserResponse=} [properties] Properties to set + */ + function LoadUserResponse(properties) { + this.cars = []; + this.carStates = []; + this.unusedCarTickets = []; + this.tutorials = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUserResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.error = 0; + + /** + * LoadUserResponse unlockAt. + * @member {number} unlockAt + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.unlockAt = 0; + + /** + * LoadUserResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.accessCode = ""; + + /** + * LoadUserResponse banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.banapassportAmId = 0; + + /** + * LoadUserResponse mbid. + * @member {number} mbid + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.mbid = 0; + + /** + * LoadUserResponse userId. + * @member {number} userId + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.userId = 0; + + /** + * LoadUserResponse numOfOwnedCars. + * @member {number} numOfOwnedCars + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.numOfOwnedCars = 0; + + /** + * LoadUserResponse cars. + * @member {Array.} cars + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.cars = $util.emptyArray; + + /** + * LoadUserResponse carStates. + * @member {Array.} carStates + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.carStates = $util.emptyArray; + + /** + * LoadUserResponse unusedCarTickets. + * @member {Array.} unusedCarTickets + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.unusedCarTickets = $util.emptyArray; + + /** + * LoadUserResponse tutorials. + * @member {Array.} tutorials + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.tutorials = $util.emptyArray; + + /** + * LoadUserResponse competitionUserState. + * @member {wm.protobuf.GhostCompetitionParticipantState} competitionUserState + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.competitionUserState = 1; + + /** + * LoadUserResponse windowStickerString. + * @member {string} windowStickerString + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.windowStickerString = ""; + + /** + * LoadUserResponse windowStickerFont. + * @member {number} windowStickerFont + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.windowStickerFont = 0; + + /** + * LoadUserResponse spappState. + * @member {wm.protobuf.SmartphoneAppState} spappState + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.spappState = 0; + + /** + * LoadUserResponse transferState. + * @member {wm.protobuf.TransferState} transferState + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.transferState = 0; + + /** + * LoadUserResponse totalVsStarCount. + * @member {number} totalVsStarCount + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.totalVsStarCount = 0; + + /** + * LoadUserResponse totalVsMedalPoint. + * @member {number} totalVsMedalPoint + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.totalVsMedalPoint = 0; + + /** + * LoadUserResponse copiedCar. + * @member {wm.protobuf.ICopiedCar|null|undefined} copiedCar + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.copiedCar = null; + + /** + * LoadUserResponse wasCreatedToday. + * @member {boolean} wasCreatedToday + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.wasCreatedToday = false; + + /** + * LoadUserResponse participatedInInviteFriendCampaign. + * @member {boolean} participatedInInviteFriendCampaign + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.participatedInInviteFriendCampaign = false; + + /** + * Creates a new LoadUserResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.ILoadUserResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse instance + */ + LoadUserResponse.create = function create(properties) { + return new LoadUserResponse(properties); + }; + + /** + * Encodes the specified LoadUserResponse message. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.ILoadUserResponse} message LoadUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.unlockAt != null && Object.hasOwnProperty.call(message, "unlockAt")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.unlockAt); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.accessCode); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.banapassportAmId); + if (message.mbid != null && Object.hasOwnProperty.call(message, "mbid")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.mbid); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.userId); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.numOfOwnedCars); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.Car.encode(message.cars[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.carStates != null && message.carStates.length) + for (let i = 0; i < message.carStates.length; ++i) + $root.wm.protobuf.LoadUserResponse.CarState.encode(message.carStates[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.unusedCarTickets != null && message.unusedCarTickets.length) + for (let i = 0; i < message.unusedCarTickets.length; ++i) + $root.wm.protobuf.UserItem.encode(message.unusedCarTickets[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.tutorials != null && message.tutorials.length) + for (let i = 0; i < message.tutorials.length; ++i) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.tutorials[i]); + if (message.competitionUserState != null && Object.hasOwnProperty.call(message, "competitionUserState")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.competitionUserState); + if (message.windowStickerString != null && Object.hasOwnProperty.call(message, "windowStickerString")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.windowStickerString); + if (message.windowStickerFont != null && Object.hasOwnProperty.call(message, "windowStickerFont")) + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.windowStickerFont); + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.spappState); + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.transferState); + if (message.totalVsStarCount != null && Object.hasOwnProperty.call(message, "totalVsStarCount")) + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.totalVsStarCount); + if (message.totalVsMedalPoint != null && Object.hasOwnProperty.call(message, "totalVsMedalPoint")) + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.totalVsMedalPoint); + if (message.copiedCar != null && Object.hasOwnProperty.call(message, "copiedCar")) + $root.wm.protobuf.CopiedCar.encode(message.copiedCar, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.wasCreatedToday != null && Object.hasOwnProperty.call(message, "wasCreatedToday")) + writer.uint32(/* id 28, wireType 0 =*/224).bool(message.wasCreatedToday); + if (message.participatedInInviteFriendCampaign != null && Object.hasOwnProperty.call(message, "participatedInInviteFriendCampaign")) + writer.uint32(/* id 29, wireType 0 =*/232).bool(message.participatedInInviteFriendCampaign); + return writer; + }; + + /** + * Encodes the specified LoadUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.ILoadUserResponse} message LoadUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUserResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.unlockAt = reader.uint32(); + break; + } + case 3: { + message.accessCode = reader.string(); + break; + } + case 4: { + message.banapassportAmId = reader.uint32(); + break; + } + case 5: { + message.mbid = reader.uint32(); + break; + } + case 6: { + message.userId = reader.uint32(); + break; + } + case 10: { + message.numOfOwnedCars = reader.uint32(); + break; + } + case 11: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + case 12: { + if (!(message.carStates && message.carStates.length)) + message.carStates = []; + message.carStates.push($root.wm.protobuf.LoadUserResponse.CarState.decode(reader, reader.uint32())); + break; + } + case 13: { + if (!(message.unusedCarTickets && message.unusedCarTickets.length)) + message.unusedCarTickets = []; + message.unusedCarTickets.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + case 15: { + if (!(message.tutorials && message.tutorials.length)) + message.tutorials = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.tutorials.push(reader.bool()); + } else + message.tutorials.push(reader.bool()); + break; + } + case 17: { + message.competitionUserState = reader.int32(); + break; + } + case 19: { + message.windowStickerString = reader.string(); + break; + } + case 20: { + message.windowStickerFont = reader.uint32(); + break; + } + case 21: { + message.spappState = reader.int32(); + break; + } + case 22: { + message.transferState = reader.int32(); + break; + } + case 25: { + message.totalVsStarCount = reader.uint32(); + break; + } + case 26: { + message.totalVsMedalPoint = reader.uint32(); + break; + } + case 27: { + message.copiedCar = $root.wm.protobuf.CopiedCar.decode(reader, reader.uint32()); + break; + } + case 28: { + message.wasCreatedToday = reader.bool(); + break; + } + case 29: { + message.participatedInInviteFriendCampaign = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("numOfOwnedCars")) + throw $util.ProtocolError("missing required 'numOfOwnedCars'", { instance: message }); + if (!message.hasOwnProperty("spappState")) + throw $util.ProtocolError("missing required 'spappState'", { instance: message }); + if (!message.hasOwnProperty("transferState")) + throw $util.ProtocolError("missing required 'transferState'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUserResponse message. + * @function verify + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUserResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.unlockAt != null && message.hasOwnProperty("unlockAt")) + if (!$util.isInteger(message.unlockAt)) + return "unlockAt: integer expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.mbid != null && message.hasOwnProperty("mbid")) + if (!$util.isInteger(message.mbid)) + return "mbid: integer expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.numOfOwnedCars)) + return "numOfOwnedCars: integer expected"; + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + if (message.carStates != null && message.hasOwnProperty("carStates")) { + if (!Array.isArray(message.carStates)) + return "carStates: array expected"; + for (let i = 0; i < message.carStates.length; ++i) { + let error = $root.wm.protobuf.LoadUserResponse.CarState.verify(message.carStates[i]); + if (error) + return "carStates." + error; + } + } + if (message.unusedCarTickets != null && message.hasOwnProperty("unusedCarTickets")) { + if (!Array.isArray(message.unusedCarTickets)) + return "unusedCarTickets: array expected"; + for (let i = 0; i < message.unusedCarTickets.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.unusedCarTickets[i]); + if (error) + return "unusedCarTickets." + error; + } + } + if (message.tutorials != null && message.hasOwnProperty("tutorials")) { + if (!Array.isArray(message.tutorials)) + return "tutorials: array expected"; + for (let i = 0; i < message.tutorials.length; ++i) + if (typeof message.tutorials[i] !== "boolean") + return "tutorials: boolean[] expected"; + } + if (message.competitionUserState != null && message.hasOwnProperty("competitionUserState")) + switch (message.competitionUserState) { + default: + return "competitionUserState: enum value expected"; + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + if (!$util.isString(message.windowStickerString)) + return "windowStickerString: string expected"; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + if (!$util.isInteger(message.windowStickerFont)) + return "windowStickerFont: integer expected"; + switch (message.spappState) { + default: + return "spappState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + switch (message.transferState) { + default: + return "transferState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.totalVsStarCount != null && message.hasOwnProperty("totalVsStarCount")) + if (!$util.isInteger(message.totalVsStarCount)) + return "totalVsStarCount: integer expected"; + if (message.totalVsMedalPoint != null && message.hasOwnProperty("totalVsMedalPoint")) + if (!$util.isInteger(message.totalVsMedalPoint)) + return "totalVsMedalPoint: integer expected"; + if (message.copiedCar != null && message.hasOwnProperty("copiedCar")) { + let error = $root.wm.protobuf.CopiedCar.verify(message.copiedCar); + if (error) + return "copiedCar." + error; + } + if (message.wasCreatedToday != null && message.hasOwnProperty("wasCreatedToday")) + if (typeof message.wasCreatedToday !== "boolean") + return "wasCreatedToday: boolean expected"; + if (message.participatedInInviteFriendCampaign != null && message.hasOwnProperty("participatedInInviteFriendCampaign")) + if (typeof message.participatedInInviteFriendCampaign !== "boolean") + return "participatedInInviteFriendCampaign: boolean expected"; + return null; + }; + + /** + * Creates a LoadUserResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse + */ + LoadUserResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUserResponse) + return object; + let message = new $root.wm.protobuf.LoadUserResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.unlockAt != null) + message.unlockAt = object.unlockAt >>> 0; + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.mbid != null) + message.mbid = object.mbid >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.numOfOwnedCars != null) + message.numOfOwnedCars = object.numOfOwnedCars >>> 0; + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.LoadUserResponse.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.cars: object expected"); + message.cars[i] = $root.wm.protobuf.Car.fromObject(object.cars[i]); + } + } + if (object.carStates) { + if (!Array.isArray(object.carStates)) + throw TypeError(".wm.protobuf.LoadUserResponse.carStates: array expected"); + message.carStates = []; + for (let i = 0; i < object.carStates.length; ++i) { + if (typeof object.carStates[i] !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.carStates: object expected"); + message.carStates[i] = $root.wm.protobuf.LoadUserResponse.CarState.fromObject(object.carStates[i]); + } + } + if (object.unusedCarTickets) { + if (!Array.isArray(object.unusedCarTickets)) + throw TypeError(".wm.protobuf.LoadUserResponse.unusedCarTickets: array expected"); + message.unusedCarTickets = []; + for (let i = 0; i < object.unusedCarTickets.length; ++i) { + if (typeof object.unusedCarTickets[i] !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.unusedCarTickets: object expected"); + message.unusedCarTickets[i] = $root.wm.protobuf.UserItem.fromObject(object.unusedCarTickets[i]); + } + } + if (object.tutorials) { + if (!Array.isArray(object.tutorials)) + throw TypeError(".wm.protobuf.LoadUserResponse.tutorials: array expected"); + message.tutorials = []; + for (let i = 0; i < object.tutorials.length; ++i) + message.tutorials[i] = Boolean(object.tutorials[i]); + } + switch (object.competitionUserState) { + case "COMPETITION_NOT_PARTICIPATED": + case 1: + message.competitionUserState = 1; + break; + case "COMPETITION_QUALIFIED": + case 2: + message.competitionUserState = 2; + break; + case "COMPETITION_PARTICIPATED": + case 3: + message.competitionUserState = 3; + break; + case "COMPETITION_WON": + case 4: + message.competitionUserState = 4; + break; + } + if (object.windowStickerString != null) + message.windowStickerString = String(object.windowStickerString); + if (object.windowStickerFont != null) + message.windowStickerFont = object.windowStickerFont >>> 0; + switch (object.spappState) { + case "SPAPP_UNREGISTERED": + case 0: + message.spappState = 0; + break; + case "SPAPP_KTID": + case 1: + message.spappState = 1; + break; + case "SPAPP_BNID": + case 2: + message.spappState = 2; + break; + } + switch (object.transferState) { + case "NOT_REGISTERED": + case 0: + message.transferState = 0; + break; + case "NEW_REGISTRATION": + case 1: + message.transferState = 1; + break; + case "TRANSFER_REQUIRED": + case 2: + message.transferState = 2; + break; + case "TRANSFERRING": + case 3: + message.transferState = 3; + break; + case "TRANSFERRED": + case 4: + message.transferState = 4; + break; + } + if (object.totalVsStarCount != null) + message.totalVsStarCount = object.totalVsStarCount >>> 0; + if (object.totalVsMedalPoint != null) + message.totalVsMedalPoint = object.totalVsMedalPoint >>> 0; + if (object.copiedCar != null) { + if (typeof object.copiedCar !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.copiedCar: object expected"); + message.copiedCar = $root.wm.protobuf.CopiedCar.fromObject(object.copiedCar); + } + if (object.wasCreatedToday != null) + message.wasCreatedToday = Boolean(object.wasCreatedToday); + if (object.participatedInInviteFriendCampaign != null) + message.participatedInInviteFriendCampaign = Boolean(object.participatedInInviteFriendCampaign); + return message; + }; + + /** + * Creates a plain object from a LoadUserResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.LoadUserResponse} message LoadUserResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUserResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.cars = []; + object.carStates = []; + object.unusedCarTickets = []; + object.tutorials = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.unlockAt = 0; + object.accessCode = ""; + object.banapassportAmId = 0; + object.mbid = 0; + object.userId = 0; + object.numOfOwnedCars = 0; + object.competitionUserState = options.enums === String ? "COMPETITION_NOT_PARTICIPATED" : 1; + object.windowStickerString = ""; + object.windowStickerFont = 0; + object.spappState = options.enums === String ? "SPAPP_UNREGISTERED" : 0; + object.transferState = options.enums === String ? "NOT_REGISTERED" : 0; + object.totalVsStarCount = 0; + object.totalVsMedalPoint = 0; + object.copiedCar = null; + object.wasCreatedToday = false; + object.participatedInInviteFriendCampaign = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.unlockAt != null && message.hasOwnProperty("unlockAt")) + object.unlockAt = message.unlockAt; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.mbid != null && message.hasOwnProperty("mbid")) + object.mbid = message.mbid; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.numOfOwnedCars != null && message.hasOwnProperty("numOfOwnedCars")) + object.numOfOwnedCars = message.numOfOwnedCars; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.Car.toObject(message.cars[j], options); + } + if (message.carStates && message.carStates.length) { + object.carStates = []; + for (let j = 0; j < message.carStates.length; ++j) + object.carStates[j] = $root.wm.protobuf.LoadUserResponse.CarState.toObject(message.carStates[j], options); + } + if (message.unusedCarTickets && message.unusedCarTickets.length) { + object.unusedCarTickets = []; + for (let j = 0; j < message.unusedCarTickets.length; ++j) + object.unusedCarTickets[j] = $root.wm.protobuf.UserItem.toObject(message.unusedCarTickets[j], options); + } + if (message.tutorials && message.tutorials.length) { + object.tutorials = []; + for (let j = 0; j < message.tutorials.length; ++j) + object.tutorials[j] = message.tutorials[j]; + } + if (message.competitionUserState != null && message.hasOwnProperty("competitionUserState")) + object.competitionUserState = options.enums === String ? $root.wm.protobuf.GhostCompetitionParticipantState[message.competitionUserState] : message.competitionUserState; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + object.windowStickerString = message.windowStickerString; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + object.windowStickerFont = message.windowStickerFont; + if (message.spappState != null && message.hasOwnProperty("spappState")) + object.spappState = options.enums === String ? $root.wm.protobuf.SmartphoneAppState[message.spappState] : message.spappState; + if (message.transferState != null && message.hasOwnProperty("transferState")) + object.transferState = options.enums === String ? $root.wm.protobuf.TransferState[message.transferState] : message.transferState; + if (message.totalVsStarCount != null && message.hasOwnProperty("totalVsStarCount")) + object.totalVsStarCount = message.totalVsStarCount; + if (message.totalVsMedalPoint != null && message.hasOwnProperty("totalVsMedalPoint")) + object.totalVsMedalPoint = message.totalVsMedalPoint; + if (message.copiedCar != null && message.hasOwnProperty("copiedCar")) + object.copiedCar = $root.wm.protobuf.CopiedCar.toObject(message.copiedCar, options); + if (message.wasCreatedToday != null && message.hasOwnProperty("wasCreatedToday")) + object.wasCreatedToday = message.wasCreatedToday; + if (message.participatedInInviteFriendCampaign != null && message.hasOwnProperty("participatedInInviteFriendCampaign")) + object.participatedInInviteFriendCampaign = message.participatedInInviteFriendCampaign; + return object; + }; + + /** + * Converts this LoadUserResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUserResponse + * @instance + * @returns {Object.} JSON object + */ + LoadUserResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUserResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUserResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUserResponse"; + }; + + LoadUserResponse.CarState = (function() { + + /** + * Properties of a CarState. + * @memberof wm.protobuf.LoadUserResponse + * @interface ICarState + * @property {boolean} hasOpponentGhost CarState hasOpponentGhost + * @property {wm.protobuf.GhostCompetitionParticipantState|null} [competitionState] CarState competitionState + * @property {boolean} toBeDeleted CarState toBeDeleted + * @property {boolean} eventJoined CarState eventJoined + * @property {boolean} transferred CarState transferred + * @property {number|null} [driveLastPlayedAt] CarState driveLastPlayedAt + */ + + /** + * Constructs a new CarState. + * @memberof wm.protobuf.LoadUserResponse + * @classdesc Represents a CarState. + * @implements ICarState + * @constructor + * @param {wm.protobuf.LoadUserResponse.ICarState=} [properties] Properties to set + */ + function CarState(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarState hasOpponentGhost. + * @member {boolean} hasOpponentGhost + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.hasOpponentGhost = false; + + /** + * CarState competitionState. + * @member {wm.protobuf.GhostCompetitionParticipantState} competitionState + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.competitionState = 1; + + /** + * CarState toBeDeleted. + * @member {boolean} toBeDeleted + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.toBeDeleted = false; + + /** + * CarState eventJoined. + * @member {boolean} eventJoined + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.eventJoined = false; + + /** + * CarState transferred. + * @member {boolean} transferred + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.transferred = false; + + /** + * CarState driveLastPlayedAt. + * @member {number} driveLastPlayedAt + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.driveLastPlayedAt = 0; + + /** + * Creates a new CarState instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.ICarState=} [properties] Properties to set + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState instance + */ + CarState.create = function create(properties) { + return new CarState(properties); + }; + + /** + * Encodes the specified CarState message. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.ICarState} message CarState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.hasOpponentGhost); + if (message.competitionState != null && Object.hasOwnProperty.call(message, "competitionState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.competitionState); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.toBeDeleted); + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.eventJoined); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.transferred); + if (message.driveLastPlayedAt != null && Object.hasOwnProperty.call(message, "driveLastPlayedAt")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.driveLastPlayedAt); + return writer; + }; + + /** + * Encodes the specified CarState message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.ICarState} message CarState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarState message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUserResponse.CarState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hasOpponentGhost = reader.bool(); + break; + } + case 2: { + message.competitionState = reader.int32(); + break; + } + case 4: { + message.toBeDeleted = reader.bool(); + break; + } + case 5: { + message.eventJoined = reader.bool(); + break; + } + case 6: { + message.transferred = reader.bool(); + break; + } + case 7: { + message.driveLastPlayedAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("hasOpponentGhost")) + throw $util.ProtocolError("missing required 'hasOpponentGhost'", { instance: message }); + if (!message.hasOwnProperty("toBeDeleted")) + throw $util.ProtocolError("missing required 'toBeDeleted'", { instance: message }); + if (!message.hasOwnProperty("eventJoined")) + throw $util.ProtocolError("missing required 'eventJoined'", { instance: message }); + if (!message.hasOwnProperty("transferred")) + throw $util.ProtocolError("missing required 'transferred'", { instance: message }); + return message; + }; + + /** + * Decodes a CarState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarState message. + * @function verify + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (typeof message.hasOpponentGhost !== "boolean") + return "hasOpponentGhost: boolean expected"; + if (message.competitionState != null && message.hasOwnProperty("competitionState")) + switch (message.competitionState) { + default: + return "competitionState: enum value expected"; + case 1: + case 2: + case 3: + case 4: + break; + } + if (typeof message.toBeDeleted !== "boolean") + return "toBeDeleted: boolean expected"; + if (typeof message.eventJoined !== "boolean") + return "eventJoined: boolean expected"; + if (typeof message.transferred !== "boolean") + return "transferred: boolean expected"; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + if (!$util.isInteger(message.driveLastPlayedAt)) + return "driveLastPlayedAt: integer expected"; + return null; + }; + + /** + * Creates a CarState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState + */ + CarState.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUserResponse.CarState) + return object; + let message = new $root.wm.protobuf.LoadUserResponse.CarState(); + if (object.hasOpponentGhost != null) + message.hasOpponentGhost = Boolean(object.hasOpponentGhost); + switch (object.competitionState) { + case "COMPETITION_NOT_PARTICIPATED": + case 1: + message.competitionState = 1; + break; + case "COMPETITION_QUALIFIED": + case 2: + message.competitionState = 2; + break; + case "COMPETITION_PARTICIPATED": + case 3: + message.competitionState = 3; + break; + case "COMPETITION_WON": + case 4: + message.competitionState = 4; + break; + } + if (object.toBeDeleted != null) + message.toBeDeleted = Boolean(object.toBeDeleted); + if (object.eventJoined != null) + message.eventJoined = Boolean(object.eventJoined); + if (object.transferred != null) + message.transferred = Boolean(object.transferred); + if (object.driveLastPlayedAt != null) + message.driveLastPlayedAt = object.driveLastPlayedAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarState message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.CarState} message CarState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.hasOpponentGhost = false; + object.competitionState = options.enums === String ? "COMPETITION_NOT_PARTICIPATED" : 1; + object.toBeDeleted = false; + object.eventJoined = false; + object.transferred = false; + object.driveLastPlayedAt = 0; + } + if (message.hasOpponentGhost != null && message.hasOwnProperty("hasOpponentGhost")) + object.hasOpponentGhost = message.hasOpponentGhost; + if (message.competitionState != null && message.hasOwnProperty("competitionState")) + object.competitionState = options.enums === String ? $root.wm.protobuf.GhostCompetitionParticipantState[message.competitionState] : message.competitionState; + if (message.toBeDeleted != null && message.hasOwnProperty("toBeDeleted")) + object.toBeDeleted = message.toBeDeleted; + if (message.eventJoined != null && message.hasOwnProperty("eventJoined")) + object.eventJoined = message.eventJoined; + if (message.transferred != null && message.hasOwnProperty("transferred")) + object.transferred = message.transferred; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + object.driveLastPlayedAt = message.driveLastPlayedAt; + return object; + }; + + /** + * Converts this CarState to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + * @returns {Object.} JSON object + */ + CarState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarState + * @function getTypeUrl + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUserResponse.CarState"; + }; + + return CarState; + })(); + + return LoadUserResponse; + })(); + + protobuf.UpdateUserSessionRequest = (function() { + + /** + * Properties of an UpdateUserSessionRequest. + * @memberof wm.protobuf + * @interface IUpdateUserSessionRequest + * @property {number|null} [userId] UpdateUserSessionRequest userId + * @property {string|null} [cardChipId] UpdateUserSessionRequest cardChipId + * @property {string|null} [accessCode] UpdateUserSessionRequest accessCode + * @property {number|null} [cardTypeCode] UpdateUserSessionRequest cardTypeCode + * @property {number|null} [cardRegionCode] UpdateUserSessionRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] UpdateUserSessionRequest device + * @property {number} unlockAt UpdateUserSessionRequest unlockAt + * @property {boolean|null} [acceptVs] UpdateUserSessionRequest acceptVs + */ + + /** + * Constructs a new UpdateUserSessionRequest. + * @memberof wm.protobuf + * @classdesc Represents an UpdateUserSessionRequest. + * @implements IUpdateUserSessionRequest + * @constructor + * @param {wm.protobuf.IUpdateUserSessionRequest=} [properties] Properties to set + */ + function UpdateUserSessionRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserSessionRequest userId. + * @member {number} userId + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.userId = 0; + + /** + * UpdateUserSessionRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.cardChipId = ""; + + /** + * UpdateUserSessionRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.accessCode = ""; + + /** + * UpdateUserSessionRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.cardTypeCode = 0; + + /** + * UpdateUserSessionRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.cardRegionCode = 0; + + /** + * UpdateUserSessionRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.device = 0; + + /** + * UpdateUserSessionRequest unlockAt. + * @member {number} unlockAt + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.unlockAt = 0; + + /** + * UpdateUserSessionRequest acceptVs. + * @member {boolean} acceptVs + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.acceptVs = false; + + /** + * Creates a new UpdateUserSessionRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.IUpdateUserSessionRequest=} [properties] Properties to set + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest instance + */ + UpdateUserSessionRequest.create = function create(properties) { + return new UpdateUserSessionRequest(properties); + }; + + /** + * Encodes the specified UpdateUserSessionRequest message. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.IUpdateUserSessionRequest} message UpdateUserSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.device); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.unlockAt); + if (message.acceptVs != null && Object.hasOwnProperty.call(message, "acceptVs")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.acceptVs); + return writer; + }; + + /** + * Encodes the specified UpdateUserSessionRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.IUpdateUserSessionRequest} message UpdateUserSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateUserSessionRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.cardChipId = reader.string(); + break; + } + case 3: { + message.accessCode = reader.string(); + break; + } + case 4: { + message.cardTypeCode = reader.uint32(); + break; + } + case 5: { + message.cardRegionCode = reader.uint32(); + break; + } + case 6: { + message.device = reader.int32(); + break; + } + case 7: { + message.unlockAt = reader.uint32(); + break; + } + case 8: { + message.acceptVs = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("unlockAt")) + throw $util.ProtocolError("missing required 'unlockAt'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserSessionRequest message. + * @function verify + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserSessionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + if (!$util.isInteger(message.unlockAt)) + return "unlockAt: integer expected"; + if (message.acceptVs != null && message.hasOwnProperty("acceptVs")) + if (typeof message.acceptVs !== "boolean") + return "acceptVs: boolean expected"; + return null; + }; + + /** + * Creates an UpdateUserSessionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest + */ + UpdateUserSessionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateUserSessionRequest) + return object; + let message = new $root.wm.protobuf.UpdateUserSessionRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.unlockAt != null) + message.unlockAt = object.unlockAt >>> 0; + if (object.acceptVs != null) + message.acceptVs = Boolean(object.acceptVs); + return message; + }; + + /** + * Creates a plain object from an UpdateUserSessionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.UpdateUserSessionRequest} message UpdateUserSessionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserSessionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.unlockAt = 0; + object.acceptVs = false; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.unlockAt != null && message.hasOwnProperty("unlockAt")) + object.unlockAt = message.unlockAt; + if (message.acceptVs != null && message.hasOwnProperty("acceptVs")) + object.acceptVs = message.acceptVs; + return object; + }; + + /** + * Converts this UpdateUserSessionRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUserSessionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserSessionRequest + * @function getTypeUrl + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateUserSessionRequest"; + }; + + return UpdateUserSessionRequest; + })(); + + protobuf.UpdateUserSessionResponse = (function() { + + /** + * Properties of an UpdateUserSessionResponse. + * @memberof wm.protobuf + * @interface IUpdateUserSessionResponse + * @property {wm.protobuf.ErrorCode} error UpdateUserSessionResponse error + */ + + /** + * Constructs a new UpdateUserSessionResponse. + * @memberof wm.protobuf + * @classdesc Represents an UpdateUserSessionResponse. + * @implements IUpdateUserSessionResponse + * @constructor + * @param {wm.protobuf.IUpdateUserSessionResponse=} [properties] Properties to set + */ + function UpdateUserSessionResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserSessionResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.UpdateUserSessionResponse + * @instance + */ + UpdateUserSessionResponse.prototype.error = 0; + + /** + * Creates a new UpdateUserSessionResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.IUpdateUserSessionResponse=} [properties] Properties to set + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse instance + */ + UpdateUserSessionResponse.create = function create(properties) { + return new UpdateUserSessionResponse(properties); + }; + + /** + * Encodes the specified UpdateUserSessionResponse message. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.IUpdateUserSessionResponse} message UpdateUserSessionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified UpdateUserSessionResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.IUpdateUserSessionResponse} message UpdateUserSessionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateUserSessionResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserSessionResponse message. + * @function verify + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserSessionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates an UpdateUserSessionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse + */ + UpdateUserSessionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateUserSessionResponse) + return object; + let message = new $root.wm.protobuf.UpdateUserSessionResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from an UpdateUserSessionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.UpdateUserSessionResponse} message UpdateUserSessionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserSessionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this UpdateUserSessionResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateUserSessionResponse + * @instance + * @returns {Object.} JSON object + */ + UpdateUserSessionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserSessionResponse + * @function getTypeUrl + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserSessionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateUserSessionResponse"; + }; + + return UpdateUserSessionResponse; + })(); + + protobuf.LoadDriveInformationRequest = (function() { + + /** + * Properties of a LoadDriveInformationRequest. + * @memberof wm.protobuf + * @interface ILoadDriveInformationRequest + * @property {number|null} [userId] LoadDriveInformationRequest userId + */ + + /** + * Constructs a new LoadDriveInformationRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadDriveInformationRequest. + * @implements ILoadDriveInformationRequest + * @constructor + * @param {wm.protobuf.ILoadDriveInformationRequest=} [properties] Properties to set + */ + function LoadDriveInformationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadDriveInformationRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadDriveInformationRequest + * @instance + */ + LoadDriveInformationRequest.prototype.userId = 0; + + /** + * Creates a new LoadDriveInformationRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.ILoadDriveInformationRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest instance + */ + LoadDriveInformationRequest.create = function create(properties) { + return new LoadDriveInformationRequest(properties); + }; + + /** + * Encodes the specified LoadDriveInformationRequest message. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.ILoadDriveInformationRequest} message LoadDriveInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadDriveInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.ILoadDriveInformationRequest} message LoadDriveInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadDriveInformationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadDriveInformationRequest message. + * @function verify + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadDriveInformationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadDriveInformationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest + */ + LoadDriveInformationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadDriveInformationRequest) + return object; + let message = new $root.wm.protobuf.LoadDriveInformationRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadDriveInformationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.LoadDriveInformationRequest} message LoadDriveInformationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadDriveInformationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadDriveInformationRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadDriveInformationRequest + * @instance + * @returns {Object.} JSON object + */ + LoadDriveInformationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadDriveInformationRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadDriveInformationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadDriveInformationRequest"; + }; + + return LoadDriveInformationRequest; + })(); + + protobuf.LoadDriveInformationResponse = (function() { + + /** + * Properties of a LoadDriveInformationResponse. + * @memberof wm.protobuf + * @interface ILoadDriveInformationResponse + * @property {wm.protobuf.ErrorCode} error LoadDriveInformationResponse error + * @property {Array.|null} [noticeWindow] LoadDriveInformationResponse noticeWindow + * @property {Array.|null} [noticeWindowMessage] LoadDriveInformationResponse noticeWindowMessage + * @property {wm.protobuf.ITransferNotice|null} [transferNotice] LoadDriveInformationResponse transferNotice + * @property {Array.|null} [restrictedModels] LoadDriveInformationResponse restrictedModels + * @property {boolean|null} [announceFeature] LoadDriveInformationResponse announceFeature + * @property {boolean|null} [announceMobile] LoadDriveInformationResponse announceMobile + * @property {Array.|null} [availableTickets] LoadDriveInformationResponse availableTickets + */ + + /** + * Constructs a new LoadDriveInformationResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadDriveInformationResponse. + * @implements ILoadDriveInformationResponse + * @constructor + * @param {wm.protobuf.ILoadDriveInformationResponse=} [properties] Properties to set + */ + function LoadDriveInformationResponse(properties) { + this.noticeWindow = []; + this.noticeWindowMessage = []; + this.restrictedModels = []; + this.availableTickets = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadDriveInformationResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.error = 0; + + /** + * LoadDriveInformationResponse noticeWindow. + * @member {Array.} noticeWindow + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.noticeWindow = $util.emptyArray; + + /** + * LoadDriveInformationResponse noticeWindowMessage. + * @member {Array.} noticeWindowMessage + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.noticeWindowMessage = $util.emptyArray; + + /** + * LoadDriveInformationResponse transferNotice. + * @member {wm.protobuf.ITransferNotice|null|undefined} transferNotice + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.transferNotice = null; + + /** + * LoadDriveInformationResponse restrictedModels. + * @member {Array.} restrictedModels + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.restrictedModels = $util.emptyArray; + + /** + * LoadDriveInformationResponse announceFeature. + * @member {boolean} announceFeature + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.announceFeature = false; + + /** + * LoadDriveInformationResponse announceMobile. + * @member {boolean} announceMobile + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.announceMobile = false; + + /** + * LoadDriveInformationResponse availableTickets. + * @member {Array.} availableTickets + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.availableTickets = $util.emptyArray; + + /** + * Creates a new LoadDriveInformationResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.ILoadDriveInformationResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse instance + */ + LoadDriveInformationResponse.create = function create(properties) { + return new LoadDriveInformationResponse(properties); + }; + + /** + * Encodes the specified LoadDriveInformationResponse message. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.ILoadDriveInformationResponse} message LoadDriveInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.noticeWindow != null && message.noticeWindow.length) + for (let i = 0; i < message.noticeWindow.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.noticeWindow[i]); + if (message.noticeWindowMessage != null && message.noticeWindowMessage.length) + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.noticeWindowMessage[i]); + if (message.transferNotice != null && Object.hasOwnProperty.call(message, "transferNotice")) + $root.wm.protobuf.TransferNotice.encode(message.transferNotice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.restrictedModels != null && message.restrictedModels.length) + for (let i = 0; i < message.restrictedModels.length; ++i) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.restrictedModels[i]); + if (message.announceFeature != null && Object.hasOwnProperty.call(message, "announceFeature")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.announceFeature); + if (message.announceMobile != null && Object.hasOwnProperty.call(message, "announceMobile")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.announceMobile); + if (message.availableTickets != null && message.availableTickets.length) + for (let i = 0; i < message.availableTickets.length; ++i) + $root.wm.protobuf.UserItem.encode(message.availableTickets[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadDriveInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.ILoadDriveInformationResponse} message LoadDriveInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadDriveInformationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.noticeWindow && message.noticeWindow.length)) + message.noticeWindow = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.noticeWindow.push(reader.int32()); + } else + message.noticeWindow.push(reader.int32()); + break; + } + case 3: { + if (!(message.noticeWindowMessage && message.noticeWindowMessage.length)) + message.noticeWindowMessage = []; + message.noticeWindowMessage.push(reader.string()); + break; + } + case 4: { + message.transferNotice = $root.wm.protobuf.TransferNotice.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.restrictedModels && message.restrictedModels.length)) + message.restrictedModels = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedModels.push(reader.uint32()); + } else + message.restrictedModels.push(reader.uint32()); + break; + } + case 7: { + message.announceFeature = reader.bool(); + break; + } + case 8: { + message.announceMobile = reader.bool(); + break; + } + case 9: { + if (!(message.availableTickets && message.availableTickets.length)) + message.availableTickets = []; + message.availableTickets.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadDriveInformationResponse message. + * @function verify + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadDriveInformationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.noticeWindow != null && message.hasOwnProperty("noticeWindow")) { + if (!Array.isArray(message.noticeWindow)) + return "noticeWindow: array expected"; + for (let i = 0; i < message.noticeWindow.length; ++i) + switch (message.noticeWindow[i]) { + default: + return "noticeWindow: enum value[] expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + } + if (message.noticeWindowMessage != null && message.hasOwnProperty("noticeWindowMessage")) { + if (!Array.isArray(message.noticeWindowMessage)) + return "noticeWindowMessage: array expected"; + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + if (!$util.isString(message.noticeWindowMessage[i])) + return "noticeWindowMessage: string[] expected"; + } + if (message.transferNotice != null && message.hasOwnProperty("transferNotice")) { + let error = $root.wm.protobuf.TransferNotice.verify(message.transferNotice); + if (error) + return "transferNotice." + error; + } + if (message.restrictedModels != null && message.hasOwnProperty("restrictedModels")) { + if (!Array.isArray(message.restrictedModels)) + return "restrictedModels: array expected"; + for (let i = 0; i < message.restrictedModels.length; ++i) + if (!$util.isInteger(message.restrictedModels[i])) + return "restrictedModels: integer[] expected"; + } + if (message.announceFeature != null && message.hasOwnProperty("announceFeature")) + if (typeof message.announceFeature !== "boolean") + return "announceFeature: boolean expected"; + if (message.announceMobile != null && message.hasOwnProperty("announceMobile")) + if (typeof message.announceMobile !== "boolean") + return "announceMobile: boolean expected"; + if (message.availableTickets != null && message.hasOwnProperty("availableTickets")) { + if (!Array.isArray(message.availableTickets)) + return "availableTickets: array expected"; + for (let i = 0; i < message.availableTickets.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.availableTickets[i]); + if (error) + return "availableTickets." + error; + } + } + return null; + }; + + /** + * Creates a LoadDriveInformationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse + */ + LoadDriveInformationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadDriveInformationResponse) + return object; + let message = new $root.wm.protobuf.LoadDriveInformationResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.noticeWindow) { + if (!Array.isArray(object.noticeWindow)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.noticeWindow: array expected"); + message.noticeWindow = []; + for (let i = 0; i < object.noticeWindow.length; ++i) + switch (object.noticeWindow[i]) { + default: + case "NOTICE_UNUSED_1": + case 1: + message.noticeWindow[i] = 1; + break; + case "NOTICE_UNUSED_2": + case 2: + message.noticeWindow[i] = 2; + break; + case "NOTICE_UNUSED_3": + case 3: + message.noticeWindow[i] = 3; + break; + case "NOTICE_UNUSED_4": + case 4: + message.noticeWindow[i] = 4; + break; + case "NOTICE_UNUSED_5": + case 5: + message.noticeWindow[i] = 5; + break; + case "NOTICE_UNUSED_6": + case 6: + message.noticeWindow[i] = 6; + break; + case "NOTICE_UNUSED_7": + case 7: + message.noticeWindow[i] = 7; + break; + case "NOTICE_UNUSED_8": + case 8: + message.noticeWindow[i] = 8; + break; + case "NOTICE_UNUSED_9": + case 9: + message.noticeWindow[i] = 9; + break; + case "NOTICE_UNUSED_10": + case 10: + message.noticeWindow[i] = 10; + break; + case "NOTICE_UNUSED_11": + case 11: + message.noticeWindow[i] = 11; + break; + case "NOTICE_UNUSED_12": + case 12: + message.noticeWindow[i] = 12; + break; + } + } + if (object.noticeWindowMessage) { + if (!Array.isArray(object.noticeWindowMessage)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.noticeWindowMessage: array expected"); + message.noticeWindowMessage = []; + for (let i = 0; i < object.noticeWindowMessage.length; ++i) + message.noticeWindowMessage[i] = String(object.noticeWindowMessage[i]); + } + if (object.transferNotice != null) { + if (typeof object.transferNotice !== "object") + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.transferNotice: object expected"); + message.transferNotice = $root.wm.protobuf.TransferNotice.fromObject(object.transferNotice); + } + if (object.restrictedModels) { + if (!Array.isArray(object.restrictedModels)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.restrictedModels: array expected"); + message.restrictedModels = []; + for (let i = 0; i < object.restrictedModels.length; ++i) + message.restrictedModels[i] = object.restrictedModels[i] >>> 0; + } + if (object.announceFeature != null) + message.announceFeature = Boolean(object.announceFeature); + if (object.announceMobile != null) + message.announceMobile = Boolean(object.announceMobile); + if (object.availableTickets) { + if (!Array.isArray(object.availableTickets)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.availableTickets: array expected"); + message.availableTickets = []; + for (let i = 0; i < object.availableTickets.length; ++i) { + if (typeof object.availableTickets[i] !== "object") + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.availableTickets: object expected"); + message.availableTickets[i] = $root.wm.protobuf.UserItem.fromObject(object.availableTickets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadDriveInformationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.LoadDriveInformationResponse} message LoadDriveInformationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadDriveInformationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.noticeWindow = []; + object.noticeWindowMessage = []; + object.restrictedModels = []; + object.availableTickets = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.transferNotice = null; + object.announceFeature = false; + object.announceMobile = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.noticeWindow && message.noticeWindow.length) { + object.noticeWindow = []; + for (let j = 0; j < message.noticeWindow.length; ++j) + object.noticeWindow[j] = options.enums === String ? $root.wm.protobuf.NoticeEntry[message.noticeWindow[j]] : message.noticeWindow[j]; + } + if (message.noticeWindowMessage && message.noticeWindowMessage.length) { + object.noticeWindowMessage = []; + for (let j = 0; j < message.noticeWindowMessage.length; ++j) + object.noticeWindowMessage[j] = message.noticeWindowMessage[j]; + } + if (message.transferNotice != null && message.hasOwnProperty("transferNotice")) + object.transferNotice = $root.wm.protobuf.TransferNotice.toObject(message.transferNotice, options); + if (message.restrictedModels && message.restrictedModels.length) { + object.restrictedModels = []; + for (let j = 0; j < message.restrictedModels.length; ++j) + object.restrictedModels[j] = message.restrictedModels[j]; + } + if (message.announceFeature != null && message.hasOwnProperty("announceFeature")) + object.announceFeature = message.announceFeature; + if (message.announceMobile != null && message.hasOwnProperty("announceMobile")) + object.announceMobile = message.announceMobile; + if (message.availableTickets && message.availableTickets.length) { + object.availableTickets = []; + for (let j = 0; j < message.availableTickets.length; ++j) + object.availableTickets[j] = $root.wm.protobuf.UserItem.toObject(message.availableTickets[j], options); + } + return object; + }; + + /** + * Converts this LoadDriveInformationResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + * @returns {Object.} JSON object + */ + LoadDriveInformationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadDriveInformationResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadDriveInformationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadDriveInformationResponse"; + }; + + return LoadDriveInformationResponse; + })(); + + protobuf.LoadCarRequest = (function() { + + /** + * Properties of a LoadCarRequest. + * @memberof wm.protobuf + * @interface ILoadCarRequest + * @property {number} carId LoadCarRequest carId + * @property {boolean|null} [eventMode] LoadCarRequest eventMode + * @property {string|null} [eventModeSerial] LoadCarRequest eventModeSerial + */ + + /** + * Constructs a new LoadCarRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadCarRequest. + * @implements ILoadCarRequest + * @constructor + * @param {wm.protobuf.ILoadCarRequest=} [properties] Properties to set + */ + function LoadCarRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadCarRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadCarRequest + * @instance + */ + LoadCarRequest.prototype.carId = 0; + + /** + * LoadCarRequest eventMode. + * @member {boolean} eventMode + * @memberof wm.protobuf.LoadCarRequest + * @instance + */ + LoadCarRequest.prototype.eventMode = false; + + /** + * LoadCarRequest eventModeSerial. + * @member {string} eventModeSerial + * @memberof wm.protobuf.LoadCarRequest + * @instance + */ + LoadCarRequest.prototype.eventModeSerial = ""; + + /** + * Creates a new LoadCarRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.ILoadCarRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest instance + */ + LoadCarRequest.create = function create(properties) { + return new LoadCarRequest(properties); + }; + + /** + * Encodes the specified LoadCarRequest message. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.ILoadCarRequest} message LoadCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.eventMode != null && Object.hasOwnProperty.call(message, "eventMode")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.eventMode); + if (message.eventModeSerial != null && Object.hasOwnProperty.call(message, "eventModeSerial")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.eventModeSerial); + return writer; + }; + + /** + * Encodes the specified LoadCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.ILoadCarRequest} message LoadCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadCarRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.eventMode = reader.bool(); + break; + } + case 3: { + message.eventModeSerial = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadCarRequest message. + * @function verify + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadCarRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.eventMode != null && message.hasOwnProperty("eventMode")) + if (typeof message.eventMode !== "boolean") + return "eventMode: boolean expected"; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + if (!$util.isString(message.eventModeSerial)) + return "eventModeSerial: string expected"; + return null; + }; + + /** + * Creates a LoadCarRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest + */ + LoadCarRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadCarRequest) + return object; + let message = new $root.wm.protobuf.LoadCarRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.eventMode != null) + message.eventMode = Boolean(object.eventMode); + if (object.eventModeSerial != null) + message.eventModeSerial = String(object.eventModeSerial); + return message; + }; + + /** + * Creates a plain object from a LoadCarRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.LoadCarRequest} message LoadCarRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadCarRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.eventMode = false; + object.eventModeSerial = ""; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.eventMode != null && message.hasOwnProperty("eventMode")) + object.eventMode = message.eventMode; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + object.eventModeSerial = message.eventModeSerial; + return object; + }; + + /** + * Converts this LoadCarRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadCarRequest + * @instance + * @returns {Object.} JSON object + */ + LoadCarRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadCarRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadCarRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadCarRequest"; + }; + + return LoadCarRequest; + })(); + + protobuf.LoadCarResponse = (function() { + + /** + * Properties of a LoadCarResponse. + * @memberof wm.protobuf + * @interface ILoadCarResponse + * @property {wm.protobuf.ErrorCode} error LoadCarResponse error + * @property {wm.protobuf.ICar} car LoadCarResponse car + * @property {number} tuningPoint LoadCarResponse tuningPoint + * @property {number} odometer LoadCarResponse odometer + * @property {number} playCount LoadCarResponse playCount + * @property {boolean} earnedCustomColor LoadCarResponse earnedCustomColor + * @property {wm.protobuf.ICarSetting} setting LoadCarResponse setting + * @property {number} vsPlayCount LoadCarResponse vsPlayCount + * @property {number} vsBurstCount LoadCarResponse vsBurstCount + * @property {number} vsStarCount LoadCarResponse vsStarCount + * @property {number} vsStarCountMax LoadCarResponse vsStarCountMax + * @property {number} vsCoolOrWild LoadCarResponse vsCoolOrWild + * @property {number} vsSmoothOrRough LoadCarResponse vsSmoothOrRough + * @property {number} vsTripleStarMedals LoadCarResponse vsTripleStarMedals + * @property {number} vsDoubleStarMedals LoadCarResponse vsDoubleStarMedals + * @property {number} vsSingleStarMedals LoadCarResponse vsSingleStarMedals + * @property {number} vsPlainMedals LoadCarResponse vsPlainMedals + * @property {number} rgPlayCount LoadCarResponse rgPlayCount + * @property {number} rgWinCount LoadCarResponse rgWinCount + * @property {number} rgTrophy LoadCarResponse rgTrophy + * @property {number} rgPreviousVersionPlayCount LoadCarResponse rgPreviousVersionPlayCount + * @property {number} rgScore LoadCarResponse rgScore + * @property {Array.|null} [rgRegionMapScore] LoadCarResponse rgRegionMapScore + * @property {Array.|null} [rgRegions] LoadCarResponse rgRegions + * @property {number} rgStamp LoadCarResponse rgStamp + * @property {boolean} rgAcquireAllCrowns LoadCarResponse rgAcquireAllCrowns + * @property {number} dressupLevel LoadCarResponse dressupLevel + * @property {number} dressupPoint LoadCarResponse dressupPoint + * @property {number} stPlayCount LoadCarResponse stPlayCount + * @property {number} stClearBits LoadCarResponse stClearBits + * @property {number} stClearDivCount LoadCarResponse stClearDivCount + * @property {number} stClearCount LoadCarResponse stClearCount + * @property {number|Long} stLoseBits LoadCarResponse stLoseBits + * @property {number} stConsecutiveWins LoadCarResponse stConsecutiveWins + * @property {number} stConsecutiveWinsMax LoadCarResponse stConsecutiveWinsMax + * @property {boolean} stCompleted_100Episodes LoadCarResponse stCompleted_100Episodes + * @property {wm.protobuf.IChallengerCar|null} [challenger] LoadCarResponse challenger + * @property {number|null} [challengerReturnCount] LoadCarResponse challengerReturnCount + * @property {number|null} [numOfChallengers] LoadCarResponse numOfChallengers + * @property {wm.protobuf.IGhostCar|null} [opponentGhost] LoadCarResponse opponentGhost + * @property {number|Long|null} [opponentTrailId] LoadCarResponse opponentTrailId + * @property {number|null} [opponentCompetitionId] LoadCarResponse opponentCompetitionId + * @property {wm.protobuf.IGhostCompetitionParameter|null} [competitionParameter] LoadCarResponse competitionParameter + * @property {Array.|null} [specialTitles] LoadCarResponse specialTitles + * @property {Array.|null} [earnedTitles] LoadCarResponse earnedTitles + * @property {Array.|null} [ownedItems] LoadCarResponse ownedItems + * @property {boolean} auraMotifAutoChange LoadCarResponse auraMotifAutoChange + * @property {number} screenshotCount LoadCarResponse screenshotCount + * @property {boolean|null} [announceEventModePrize] LoadCarResponse announceEventModePrize + * @property {boolean} transferred LoadCarResponse transferred + * @property {number|null} [driveLastPlayedAt] LoadCarResponse driveLastPlayedAt + * @property {wm.protobuf.LoadCarResponse.IStoryInsurance|null} [insurance] LoadCarResponse insurance + */ + + /** + * Constructs a new LoadCarResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadCarResponse. + * @implements ILoadCarResponse + * @constructor + * @param {wm.protobuf.ILoadCarResponse=} [properties] Properties to set + */ + function LoadCarResponse(properties) { + this.rgRegionMapScore = []; + this.rgRegions = []; + this.specialTitles = []; + this.earnedTitles = []; + this.ownedItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadCarResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.error = 0; + + /** + * LoadCarResponse car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.car = null; + + /** + * LoadCarResponse tuningPoint. + * @member {number} tuningPoint + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.tuningPoint = 0; + + /** + * LoadCarResponse odometer. + * @member {number} odometer + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.odometer = 0; + + /** + * LoadCarResponse playCount. + * @member {number} playCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.playCount = 0; + + /** + * LoadCarResponse earnedCustomColor. + * @member {boolean} earnedCustomColor + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.earnedCustomColor = false; + + /** + * LoadCarResponse setting. + * @member {wm.protobuf.ICarSetting} setting + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.setting = null; + + /** + * LoadCarResponse vsPlayCount. + * @member {number} vsPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsPlayCount = 0; + + /** + * LoadCarResponse vsBurstCount. + * @member {number} vsBurstCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsBurstCount = 0; + + /** + * LoadCarResponse vsStarCount. + * @member {number} vsStarCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsStarCount = 0; + + /** + * LoadCarResponse vsStarCountMax. + * @member {number} vsStarCountMax + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsStarCountMax = 0; + + /** + * LoadCarResponse vsCoolOrWild. + * @member {number} vsCoolOrWild + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsCoolOrWild = 0; + + /** + * LoadCarResponse vsSmoothOrRough. + * @member {number} vsSmoothOrRough + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsSmoothOrRough = 0; + + /** + * LoadCarResponse vsTripleStarMedals. + * @member {number} vsTripleStarMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsTripleStarMedals = 0; + + /** + * LoadCarResponse vsDoubleStarMedals. + * @member {number} vsDoubleStarMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsDoubleStarMedals = 0; + + /** + * LoadCarResponse vsSingleStarMedals. + * @member {number} vsSingleStarMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsSingleStarMedals = 0; + + /** + * LoadCarResponse vsPlainMedals. + * @member {number} vsPlainMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsPlainMedals = 0; + + /** + * LoadCarResponse rgPlayCount. + * @member {number} rgPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgPlayCount = 0; + + /** + * LoadCarResponse rgWinCount. + * @member {number} rgWinCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgWinCount = 0; + + /** + * LoadCarResponse rgTrophy. + * @member {number} rgTrophy + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgTrophy = 0; + + /** + * LoadCarResponse rgPreviousVersionPlayCount. + * @member {number} rgPreviousVersionPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgPreviousVersionPlayCount = 0; + + /** + * LoadCarResponse rgScore. + * @member {number} rgScore + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgScore = 0; + + /** + * LoadCarResponse rgRegionMapScore. + * @member {Array.} rgRegionMapScore + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgRegionMapScore = $util.emptyArray; + + /** + * LoadCarResponse rgRegions. + * @member {Array.} rgRegions + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgRegions = $util.emptyArray; + + /** + * LoadCarResponse rgStamp. + * @member {number} rgStamp + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgStamp = 0; + + /** + * LoadCarResponse rgAcquireAllCrowns. + * @member {boolean} rgAcquireAllCrowns + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgAcquireAllCrowns = false; + + /** + * LoadCarResponse dressupLevel. + * @member {number} dressupLevel + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.dressupLevel = 0; + + /** + * LoadCarResponse dressupPoint. + * @member {number} dressupPoint + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.dressupPoint = 0; + + /** + * LoadCarResponse stPlayCount. + * @member {number} stPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stPlayCount = 0; + + /** + * LoadCarResponse stClearBits. + * @member {number} stClearBits + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stClearBits = 0; + + /** + * LoadCarResponse stClearDivCount. + * @member {number} stClearDivCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stClearDivCount = 0; + + /** + * LoadCarResponse stClearCount. + * @member {number} stClearCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stClearCount = 0; + + /** + * LoadCarResponse stLoseBits. + * @member {number|Long} stLoseBits + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stLoseBits = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * LoadCarResponse stConsecutiveWins. + * @member {number} stConsecutiveWins + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stConsecutiveWins = 0; + + /** + * LoadCarResponse stConsecutiveWinsMax. + * @member {number} stConsecutiveWinsMax + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stConsecutiveWinsMax = 0; + + /** + * LoadCarResponse stCompleted_100Episodes. + * @member {boolean} stCompleted_100Episodes + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stCompleted_100Episodes = false; + + /** + * LoadCarResponse challenger. + * @member {wm.protobuf.IChallengerCar|null|undefined} challenger + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.challenger = null; + + /** + * LoadCarResponse challengerReturnCount. + * @member {number} challengerReturnCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.challengerReturnCount = 0; + + /** + * LoadCarResponse numOfChallengers. + * @member {number} numOfChallengers + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.numOfChallengers = 0; + + /** + * LoadCarResponse opponentGhost. + * @member {wm.protobuf.IGhostCar|null|undefined} opponentGhost + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.opponentGhost = null; + + /** + * LoadCarResponse opponentTrailId. + * @member {number|Long} opponentTrailId + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.opponentTrailId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * LoadCarResponse opponentCompetitionId. + * @member {number} opponentCompetitionId + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.opponentCompetitionId = 0; + + /** + * LoadCarResponse competitionParameter. + * @member {wm.protobuf.IGhostCompetitionParameter|null|undefined} competitionParameter + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.competitionParameter = null; + + /** + * LoadCarResponse specialTitles. + * @member {Array.} specialTitles + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.specialTitles = $util.emptyArray; + + /** + * LoadCarResponse earnedTitles. + * @member {Array.} earnedTitles + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.earnedTitles = $util.emptyArray; + + /** + * LoadCarResponse ownedItems. + * @member {Array.} ownedItems + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.ownedItems = $util.emptyArray; + + /** + * LoadCarResponse auraMotifAutoChange. + * @member {boolean} auraMotifAutoChange + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.auraMotifAutoChange = false; + + /** + * LoadCarResponse screenshotCount. + * @member {number} screenshotCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.screenshotCount = 0; + + /** + * LoadCarResponse announceEventModePrize. + * @member {boolean} announceEventModePrize + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.announceEventModePrize = false; + + /** + * LoadCarResponse transferred. + * @member {boolean} transferred + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.transferred = false; + + /** + * LoadCarResponse driveLastPlayedAt. + * @member {number} driveLastPlayedAt + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.driveLastPlayedAt = 0; + + /** + * LoadCarResponse insurance. + * @member {wm.protobuf.LoadCarResponse.IStoryInsurance|null|undefined} insurance + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.insurance = null; + + /** + * Creates a new LoadCarResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.ILoadCarResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse instance + */ + LoadCarResponse.create = function create(properties) { + return new LoadCarResponse(properties); + }; + + /** + * Encodes the specified LoadCarResponse message. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.ILoadCarResponse} message LoadCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuningPoint); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.odometer); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.playCount); + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.earnedCustomColor); + $root.wm.protobuf.CarSetting.encode(message.setting, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.vsPlayCount); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.vsBurstCount); + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.vsStarCount); + writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.vsStarCountMax); + writer.uint32(/* id 16, wireType 0 =*/128).sint32(message.vsCoolOrWild); + writer.uint32(/* id 17, wireType 0 =*/136).sint32(message.vsSmoothOrRough); + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.vsTripleStarMedals); + writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.vsDoubleStarMedals); + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.vsSingleStarMedals); + writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.vsPlainMedals); + writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.rgPlayCount); + writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.rgWinCount); + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.rgTrophy); + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.rgScore); + if (message.rgRegionMapScore != null && message.rgRegionMapScore.length) + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.rgRegionMapScore[i]); + writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.rgStamp); + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.dressupLevel); + writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.dressupPoint); + if (message.rgRegions != null && message.rgRegions.length) + for (let i = 0; i < message.rgRegions.length; ++i) + writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.rgRegions[i]); + writer.uint32(/* id 34, wireType 0 =*/272).uint32(message.stPlayCount); + writer.uint32(/* id 35, wireType 0 =*/280).uint32(message.stClearBits); + writer.uint32(/* id 36, wireType 0 =*/288).uint32(message.stClearDivCount); + writer.uint32(/* id 37, wireType 0 =*/296).uint32(message.stClearCount); + writer.uint32(/* id 38, wireType 0 =*/304).uint64(message.stLoseBits); + writer.uint32(/* id 40, wireType 0 =*/320).uint32(message.stConsecutiveWins); + writer.uint32(/* id 41, wireType 0 =*/328).uint32(message.stConsecutiveWinsMax); + if (message.challenger != null && Object.hasOwnProperty.call(message, "challenger")) + $root.wm.protobuf.ChallengerCar.encode(message.challenger, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.challengerReturnCount != null && Object.hasOwnProperty.call(message, "challengerReturnCount")) + writer.uint32(/* id 43, wireType 0 =*/344).uint32(message.challengerReturnCount); + if (message.opponentGhost != null && Object.hasOwnProperty.call(message, "opponentGhost")) + $root.wm.protobuf.GhostCar.encode(message.opponentGhost, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); + if (message.opponentTrailId != null && Object.hasOwnProperty.call(message, "opponentTrailId")) + writer.uint32(/* id 45, wireType 0 =*/360).uint64(message.opponentTrailId); + if (message.opponentCompetitionId != null && Object.hasOwnProperty.call(message, "opponentCompetitionId")) + writer.uint32(/* id 46, wireType 0 =*/368).uint32(message.opponentCompetitionId); + if (message.competitionParameter != null && Object.hasOwnProperty.call(message, "competitionParameter")) + $root.wm.protobuf.GhostCompetitionParameter.encode(message.competitionParameter, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.specialTitles != null && message.specialTitles.length) + for (let i = 0; i < message.specialTitles.length; ++i) + writer.uint32(/* id 48, wireType 2 =*/386).string(message.specialTitles[i]); + if (message.earnedTitles != null && message.earnedTitles.length) + for (let i = 0; i < message.earnedTitles.length; ++i) + writer.uint32(/* id 49, wireType 2 =*/394).string(message.earnedTitles[i]); + if (message.ownedItems != null && message.ownedItems.length) + for (let i = 0; i < message.ownedItems.length; ++i) + $root.wm.protobuf.CarItem.encode(message.ownedItems[i], writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + writer.uint32(/* id 51, wireType 0 =*/408).bool(message.auraMotifAutoChange); + writer.uint32(/* id 53, wireType 0 =*/424).uint32(message.screenshotCount); + if (message.numOfChallengers != null && Object.hasOwnProperty.call(message, "numOfChallengers")) + writer.uint32(/* id 55, wireType 0 =*/440).uint32(message.numOfChallengers); + if (message.announceEventModePrize != null && Object.hasOwnProperty.call(message, "announceEventModePrize")) + writer.uint32(/* id 58, wireType 0 =*/464).bool(message.announceEventModePrize); + writer.uint32(/* id 59, wireType 0 =*/472).bool(message.rgAcquireAllCrowns); + writer.uint32(/* id 60, wireType 0 =*/480).bool(message.transferred); + if (message.driveLastPlayedAt != null && Object.hasOwnProperty.call(message, "driveLastPlayedAt")) + writer.uint32(/* id 61, wireType 0 =*/488).uint32(message.driveLastPlayedAt); + if (message.insurance != null && Object.hasOwnProperty.call(message, "insurance")) + $root.wm.protobuf.LoadCarResponse.StoryInsurance.encode(message.insurance, writer.uint32(/* id 62, wireType 2 =*/498).fork()).ldelim(); + writer.uint32(/* id 63, wireType 0 =*/504).bool(message.stCompleted_100Episodes); + writer.uint32(/* id 64, wireType 0 =*/512).uint32(message.rgPreviousVersionPlayCount); + return writer; + }; + + /** + * Encodes the specified LoadCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.ILoadCarResponse} message LoadCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadCarResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 3: { + message.tuningPoint = reader.uint32(); + break; + } + case 6: { + message.odometer = reader.uint32(); + break; + } + case 7: { + message.playCount = reader.uint32(); + break; + } + case 8: { + message.earnedCustomColor = reader.bool(); + break; + } + case 10: { + message.setting = $root.wm.protobuf.CarSetting.decode(reader, reader.uint32()); + break; + } + case 12: { + message.vsPlayCount = reader.uint32(); + break; + } + case 13: { + message.vsBurstCount = reader.uint32(); + break; + } + case 14: { + message.vsStarCount = reader.uint32(); + break; + } + case 15: { + message.vsStarCountMax = reader.uint32(); + break; + } + case 16: { + message.vsCoolOrWild = reader.sint32(); + break; + } + case 17: { + message.vsSmoothOrRough = reader.sint32(); + break; + } + case 18: { + message.vsTripleStarMedals = reader.uint32(); + break; + } + case 19: { + message.vsDoubleStarMedals = reader.uint32(); + break; + } + case 20: { + message.vsSingleStarMedals = reader.uint32(); + break; + } + case 21: { + message.vsPlainMedals = reader.uint32(); + break; + } + case 22: { + message.rgPlayCount = reader.uint32(); + break; + } + case 23: { + message.rgWinCount = reader.uint32(); + break; + } + case 24: { + message.rgTrophy = reader.uint32(); + break; + } + case 64: { + message.rgPreviousVersionPlayCount = reader.uint32(); + break; + } + case 25: { + message.rgScore = reader.uint32(); + break; + } + case 26: { + if (!(message.rgRegionMapScore && message.rgRegionMapScore.length)) + message.rgRegionMapScore = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegionMapScore.push(reader.uint32()); + } else + message.rgRegionMapScore.push(reader.uint32()); + break; + } + case 30: { + if (!(message.rgRegions && message.rgRegions.length)) + message.rgRegions = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegions.push(reader.uint32()); + } else + message.rgRegions.push(reader.uint32()); + break; + } + case 27: { + message.rgStamp = reader.uint32(); + break; + } + case 59: { + message.rgAcquireAllCrowns = reader.bool(); + break; + } + case 28: { + message.dressupLevel = reader.uint32(); + break; + } + case 29: { + message.dressupPoint = reader.uint32(); + break; + } + case 34: { + message.stPlayCount = reader.uint32(); + break; + } + case 35: { + message.stClearBits = reader.uint32(); + break; + } + case 36: { + message.stClearDivCount = reader.uint32(); + break; + } + case 37: { + message.stClearCount = reader.uint32(); + break; + } + case 38: { + message.stLoseBits = reader.uint64(); + break; + } + case 40: { + message.stConsecutiveWins = reader.uint32(); + break; + } + case 41: { + message.stConsecutiveWinsMax = reader.uint32(); + break; + } + case 63: { + message.stCompleted_100Episodes = reader.bool(); + break; + } + case 42: { + message.challenger = $root.wm.protobuf.ChallengerCar.decode(reader, reader.uint32()); + break; + } + case 43: { + message.challengerReturnCount = reader.uint32(); + break; + } + case 55: { + message.numOfChallengers = reader.uint32(); + break; + } + case 44: { + message.opponentGhost = $root.wm.protobuf.GhostCar.decode(reader, reader.uint32()); + break; + } + case 45: { + message.opponentTrailId = reader.uint64(); + break; + } + case 46: { + message.opponentCompetitionId = reader.uint32(); + break; + } + case 47: { + message.competitionParameter = $root.wm.protobuf.GhostCompetitionParameter.decode(reader, reader.uint32()); + break; + } + case 48: { + if (!(message.specialTitles && message.specialTitles.length)) + message.specialTitles = []; + message.specialTitles.push(reader.string()); + break; + } + case 49: { + if (!(message.earnedTitles && message.earnedTitles.length)) + message.earnedTitles = []; + message.earnedTitles.push(reader.string()); + break; + } + case 50: { + if (!(message.ownedItems && message.ownedItems.length)) + message.ownedItems = []; + message.ownedItems.push($root.wm.protobuf.CarItem.decode(reader, reader.uint32())); + break; + } + case 51: { + message.auraMotifAutoChange = reader.bool(); + break; + } + case 53: { + message.screenshotCount = reader.uint32(); + break; + } + case 58: { + message.announceEventModePrize = reader.bool(); + break; + } + case 60: { + message.transferred = reader.bool(); + break; + } + case 61: { + message.driveLastPlayedAt = reader.uint32(); + break; + } + case 62: { + message.insurance = $root.wm.protobuf.LoadCarResponse.StoryInsurance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("tuningPoint")) + throw $util.ProtocolError("missing required 'tuningPoint'", { instance: message }); + if (!message.hasOwnProperty("odometer")) + throw $util.ProtocolError("missing required 'odometer'", { instance: message }); + if (!message.hasOwnProperty("playCount")) + throw $util.ProtocolError("missing required 'playCount'", { instance: message }); + if (!message.hasOwnProperty("earnedCustomColor")) + throw $util.ProtocolError("missing required 'earnedCustomColor'", { instance: message }); + if (!message.hasOwnProperty("setting")) + throw $util.ProtocolError("missing required 'setting'", { instance: message }); + if (!message.hasOwnProperty("vsPlayCount")) + throw $util.ProtocolError("missing required 'vsPlayCount'", { instance: message }); + if (!message.hasOwnProperty("vsBurstCount")) + throw $util.ProtocolError("missing required 'vsBurstCount'", { instance: message }); + if (!message.hasOwnProperty("vsStarCount")) + throw $util.ProtocolError("missing required 'vsStarCount'", { instance: message }); + if (!message.hasOwnProperty("vsStarCountMax")) + throw $util.ProtocolError("missing required 'vsStarCountMax'", { instance: message }); + if (!message.hasOwnProperty("vsCoolOrWild")) + throw $util.ProtocolError("missing required 'vsCoolOrWild'", { instance: message }); + if (!message.hasOwnProperty("vsSmoothOrRough")) + throw $util.ProtocolError("missing required 'vsSmoothOrRough'", { instance: message }); + if (!message.hasOwnProperty("vsTripleStarMedals")) + throw $util.ProtocolError("missing required 'vsTripleStarMedals'", { instance: message }); + if (!message.hasOwnProperty("vsDoubleStarMedals")) + throw $util.ProtocolError("missing required 'vsDoubleStarMedals'", { instance: message }); + if (!message.hasOwnProperty("vsSingleStarMedals")) + throw $util.ProtocolError("missing required 'vsSingleStarMedals'", { instance: message }); + if (!message.hasOwnProperty("vsPlainMedals")) + throw $util.ProtocolError("missing required 'vsPlainMedals'", { instance: message }); + if (!message.hasOwnProperty("rgPlayCount")) + throw $util.ProtocolError("missing required 'rgPlayCount'", { instance: message }); + if (!message.hasOwnProperty("rgWinCount")) + throw $util.ProtocolError("missing required 'rgWinCount'", { instance: message }); + if (!message.hasOwnProperty("rgTrophy")) + throw $util.ProtocolError("missing required 'rgTrophy'", { instance: message }); + if (!message.hasOwnProperty("rgPreviousVersionPlayCount")) + throw $util.ProtocolError("missing required 'rgPreviousVersionPlayCount'", { instance: message }); + if (!message.hasOwnProperty("rgScore")) + throw $util.ProtocolError("missing required 'rgScore'", { instance: message }); + if (!message.hasOwnProperty("rgStamp")) + throw $util.ProtocolError("missing required 'rgStamp'", { instance: message }); + if (!message.hasOwnProperty("rgAcquireAllCrowns")) + throw $util.ProtocolError("missing required 'rgAcquireAllCrowns'", { instance: message }); + if (!message.hasOwnProperty("dressupLevel")) + throw $util.ProtocolError("missing required 'dressupLevel'", { instance: message }); + if (!message.hasOwnProperty("dressupPoint")) + throw $util.ProtocolError("missing required 'dressupPoint'", { instance: message }); + if (!message.hasOwnProperty("stPlayCount")) + throw $util.ProtocolError("missing required 'stPlayCount'", { instance: message }); + if (!message.hasOwnProperty("stClearBits")) + throw $util.ProtocolError("missing required 'stClearBits'", { instance: message }); + if (!message.hasOwnProperty("stClearDivCount")) + throw $util.ProtocolError("missing required 'stClearDivCount'", { instance: message }); + if (!message.hasOwnProperty("stClearCount")) + throw $util.ProtocolError("missing required 'stClearCount'", { instance: message }); + if (!message.hasOwnProperty("stLoseBits")) + throw $util.ProtocolError("missing required 'stLoseBits'", { instance: message }); + if (!message.hasOwnProperty("stConsecutiveWins")) + throw $util.ProtocolError("missing required 'stConsecutiveWins'", { instance: message }); + if (!message.hasOwnProperty("stConsecutiveWinsMax")) + throw $util.ProtocolError("missing required 'stConsecutiveWinsMax'", { instance: message }); + if (!message.hasOwnProperty("stCompleted_100Episodes")) + throw $util.ProtocolError("missing required 'stCompleted_100Episodes'", { instance: message }); + if (!message.hasOwnProperty("auraMotifAutoChange")) + throw $util.ProtocolError("missing required 'auraMotifAutoChange'", { instance: message }); + if (!message.hasOwnProperty("screenshotCount")) + throw $util.ProtocolError("missing required 'screenshotCount'", { instance: message }); + if (!message.hasOwnProperty("transferred")) + throw $util.ProtocolError("missing required 'transferred'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadCarResponse message. + * @function verify + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadCarResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.tuningPoint)) + return "tuningPoint: integer expected"; + if (!$util.isInteger(message.odometer)) + return "odometer: integer expected"; + if (!$util.isInteger(message.playCount)) + return "playCount: integer expected"; + if (typeof message.earnedCustomColor !== "boolean") + return "earnedCustomColor: boolean expected"; + { + let error = $root.wm.protobuf.CarSetting.verify(message.setting); + if (error) + return "setting." + error; + } + if (!$util.isInteger(message.vsPlayCount)) + return "vsPlayCount: integer expected"; + if (!$util.isInteger(message.vsBurstCount)) + return "vsBurstCount: integer expected"; + if (!$util.isInteger(message.vsStarCount)) + return "vsStarCount: integer expected"; + if (!$util.isInteger(message.vsStarCountMax)) + return "vsStarCountMax: integer expected"; + if (!$util.isInteger(message.vsCoolOrWild)) + return "vsCoolOrWild: integer expected"; + if (!$util.isInteger(message.vsSmoothOrRough)) + return "vsSmoothOrRough: integer expected"; + if (!$util.isInteger(message.vsTripleStarMedals)) + return "vsTripleStarMedals: integer expected"; + if (!$util.isInteger(message.vsDoubleStarMedals)) + return "vsDoubleStarMedals: integer expected"; + if (!$util.isInteger(message.vsSingleStarMedals)) + return "vsSingleStarMedals: integer expected"; + if (!$util.isInteger(message.vsPlainMedals)) + return "vsPlainMedals: integer expected"; + if (!$util.isInteger(message.rgPlayCount)) + return "rgPlayCount: integer expected"; + if (!$util.isInteger(message.rgWinCount)) + return "rgWinCount: integer expected"; + if (!$util.isInteger(message.rgTrophy)) + return "rgTrophy: integer expected"; + if (!$util.isInteger(message.rgPreviousVersionPlayCount)) + return "rgPreviousVersionPlayCount: integer expected"; + if (!$util.isInteger(message.rgScore)) + return "rgScore: integer expected"; + if (message.rgRegionMapScore != null && message.hasOwnProperty("rgRegionMapScore")) { + if (!Array.isArray(message.rgRegionMapScore)) + return "rgRegionMapScore: array expected"; + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + if (!$util.isInteger(message.rgRegionMapScore[i])) + return "rgRegionMapScore: integer[] expected"; + } + if (message.rgRegions != null && message.hasOwnProperty("rgRegions")) { + if (!Array.isArray(message.rgRegions)) + return "rgRegions: array expected"; + for (let i = 0; i < message.rgRegions.length; ++i) + if (!$util.isInteger(message.rgRegions[i])) + return "rgRegions: integer[] expected"; + } + if (!$util.isInteger(message.rgStamp)) + return "rgStamp: integer expected"; + if (typeof message.rgAcquireAllCrowns !== "boolean") + return "rgAcquireAllCrowns: boolean expected"; + if (!$util.isInteger(message.dressupLevel)) + return "dressupLevel: integer expected"; + if (!$util.isInteger(message.dressupPoint)) + return "dressupPoint: integer expected"; + if (!$util.isInteger(message.stPlayCount)) + return "stPlayCount: integer expected"; + if (!$util.isInteger(message.stClearBits)) + return "stClearBits: integer expected"; + if (!$util.isInteger(message.stClearDivCount)) + return "stClearDivCount: integer expected"; + if (!$util.isInteger(message.stClearCount)) + return "stClearCount: integer expected"; + if (!$util.isInteger(message.stLoseBits) && !(message.stLoseBits && $util.isInteger(message.stLoseBits.low) && $util.isInteger(message.stLoseBits.high))) + return "stLoseBits: integer|Long expected"; + if (!$util.isInteger(message.stConsecutiveWins)) + return "stConsecutiveWins: integer expected"; + if (!$util.isInteger(message.stConsecutiveWinsMax)) + return "stConsecutiveWinsMax: integer expected"; + if (typeof message.stCompleted_100Episodes !== "boolean") + return "stCompleted_100Episodes: boolean expected"; + if (message.challenger != null && message.hasOwnProperty("challenger")) { + let error = $root.wm.protobuf.ChallengerCar.verify(message.challenger); + if (error) + return "challenger." + error; + } + if (message.challengerReturnCount != null && message.hasOwnProperty("challengerReturnCount")) + if (!$util.isInteger(message.challengerReturnCount)) + return "challengerReturnCount: integer expected"; + if (message.numOfChallengers != null && message.hasOwnProperty("numOfChallengers")) + if (!$util.isInteger(message.numOfChallengers)) + return "numOfChallengers: integer expected"; + if (message.opponentGhost != null && message.hasOwnProperty("opponentGhost")) { + let error = $root.wm.protobuf.GhostCar.verify(message.opponentGhost); + if (error) + return "opponentGhost." + error; + } + if (message.opponentTrailId != null && message.hasOwnProperty("opponentTrailId")) + if (!$util.isInteger(message.opponentTrailId) && !(message.opponentTrailId && $util.isInteger(message.opponentTrailId.low) && $util.isInteger(message.opponentTrailId.high))) + return "opponentTrailId: integer|Long expected"; + if (message.opponentCompetitionId != null && message.hasOwnProperty("opponentCompetitionId")) + if (!$util.isInteger(message.opponentCompetitionId)) + return "opponentCompetitionId: integer expected"; + if (message.competitionParameter != null && message.hasOwnProperty("competitionParameter")) { + let error = $root.wm.protobuf.GhostCompetitionParameter.verify(message.competitionParameter); + if (error) + return "competitionParameter." + error; + } + if (message.specialTitles != null && message.hasOwnProperty("specialTitles")) { + if (!Array.isArray(message.specialTitles)) + return "specialTitles: array expected"; + for (let i = 0; i < message.specialTitles.length; ++i) + if (!$util.isString(message.specialTitles[i])) + return "specialTitles: string[] expected"; + } + if (message.earnedTitles != null && message.hasOwnProperty("earnedTitles")) { + if (!Array.isArray(message.earnedTitles)) + return "earnedTitles: array expected"; + for (let i = 0; i < message.earnedTitles.length; ++i) + if (!$util.isString(message.earnedTitles[i])) + return "earnedTitles: string[] expected"; + } + if (message.ownedItems != null && message.hasOwnProperty("ownedItems")) { + if (!Array.isArray(message.ownedItems)) + return "ownedItems: array expected"; + for (let i = 0; i < message.ownedItems.length; ++i) { + let error = $root.wm.protobuf.CarItem.verify(message.ownedItems[i]); + if (error) + return "ownedItems." + error; + } + } + if (typeof message.auraMotifAutoChange !== "boolean") + return "auraMotifAutoChange: boolean expected"; + if (!$util.isInteger(message.screenshotCount)) + return "screenshotCount: integer expected"; + if (message.announceEventModePrize != null && message.hasOwnProperty("announceEventModePrize")) + if (typeof message.announceEventModePrize !== "boolean") + return "announceEventModePrize: boolean expected"; + if (typeof message.transferred !== "boolean") + return "transferred: boolean expected"; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + if (!$util.isInteger(message.driveLastPlayedAt)) + return "driveLastPlayedAt: integer expected"; + if (message.insurance != null && message.hasOwnProperty("insurance")) { + let error = $root.wm.protobuf.LoadCarResponse.StoryInsurance.verify(message.insurance); + if (error) + return "insurance." + error; + } + return null; + }; + + /** + * Creates a LoadCarResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse + */ + LoadCarResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadCarResponse) + return object; + let message = new $root.wm.protobuf.LoadCarResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.tuningPoint != null) + message.tuningPoint = object.tuningPoint >>> 0; + if (object.odometer != null) + message.odometer = object.odometer >>> 0; + if (object.playCount != null) + message.playCount = object.playCount >>> 0; + if (object.earnedCustomColor != null) + message.earnedCustomColor = Boolean(object.earnedCustomColor); + if (object.setting != null) { + if (typeof object.setting !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.setting: object expected"); + message.setting = $root.wm.protobuf.CarSetting.fromObject(object.setting); + } + if (object.vsPlayCount != null) + message.vsPlayCount = object.vsPlayCount >>> 0; + if (object.vsBurstCount != null) + message.vsBurstCount = object.vsBurstCount >>> 0; + if (object.vsStarCount != null) + message.vsStarCount = object.vsStarCount >>> 0; + if (object.vsStarCountMax != null) + message.vsStarCountMax = object.vsStarCountMax >>> 0; + if (object.vsCoolOrWild != null) + message.vsCoolOrWild = object.vsCoolOrWild | 0; + if (object.vsSmoothOrRough != null) + message.vsSmoothOrRough = object.vsSmoothOrRough | 0; + if (object.vsTripleStarMedals != null) + message.vsTripleStarMedals = object.vsTripleStarMedals >>> 0; + if (object.vsDoubleStarMedals != null) + message.vsDoubleStarMedals = object.vsDoubleStarMedals >>> 0; + if (object.vsSingleStarMedals != null) + message.vsSingleStarMedals = object.vsSingleStarMedals >>> 0; + if (object.vsPlainMedals != null) + message.vsPlainMedals = object.vsPlainMedals >>> 0; + if (object.rgPlayCount != null) + message.rgPlayCount = object.rgPlayCount >>> 0; + if (object.rgWinCount != null) + message.rgWinCount = object.rgWinCount >>> 0; + if (object.rgTrophy != null) + message.rgTrophy = object.rgTrophy >>> 0; + if (object.rgPreviousVersionPlayCount != null) + message.rgPreviousVersionPlayCount = object.rgPreviousVersionPlayCount >>> 0; + if (object.rgScore != null) + message.rgScore = object.rgScore >>> 0; + if (object.rgRegionMapScore) { + if (!Array.isArray(object.rgRegionMapScore)) + throw TypeError(".wm.protobuf.LoadCarResponse.rgRegionMapScore: array expected"); + message.rgRegionMapScore = []; + for (let i = 0; i < object.rgRegionMapScore.length; ++i) + message.rgRegionMapScore[i] = object.rgRegionMapScore[i] >>> 0; + } + if (object.rgRegions) { + if (!Array.isArray(object.rgRegions)) + throw TypeError(".wm.protobuf.LoadCarResponse.rgRegions: array expected"); + message.rgRegions = []; + for (let i = 0; i < object.rgRegions.length; ++i) + message.rgRegions[i] = object.rgRegions[i] >>> 0; + } + if (object.rgStamp != null) + message.rgStamp = object.rgStamp >>> 0; + if (object.rgAcquireAllCrowns != null) + message.rgAcquireAllCrowns = Boolean(object.rgAcquireAllCrowns); + if (object.dressupLevel != null) + message.dressupLevel = object.dressupLevel >>> 0; + if (object.dressupPoint != null) + message.dressupPoint = object.dressupPoint >>> 0; + if (object.stPlayCount != null) + message.stPlayCount = object.stPlayCount >>> 0; + if (object.stClearBits != null) + message.stClearBits = object.stClearBits >>> 0; + if (object.stClearDivCount != null) + message.stClearDivCount = object.stClearDivCount >>> 0; + if (object.stClearCount != null) + message.stClearCount = object.stClearCount >>> 0; + if (object.stLoseBits != null) + if ($util.Long) + (message.stLoseBits = $util.Long.fromValue(object.stLoseBits)).unsigned = true; + else if (typeof object.stLoseBits === "string") + message.stLoseBits = parseInt(object.stLoseBits, 10); + else if (typeof object.stLoseBits === "number") + message.stLoseBits = object.stLoseBits; + else if (typeof object.stLoseBits === "object") + message.stLoseBits = new $util.LongBits(object.stLoseBits.low >>> 0, object.stLoseBits.high >>> 0).toNumber(true); + if (object.stConsecutiveWins != null) + message.stConsecutiveWins = object.stConsecutiveWins >>> 0; + if (object.stConsecutiveWinsMax != null) + message.stConsecutiveWinsMax = object.stConsecutiveWinsMax >>> 0; + if (object.stCompleted_100Episodes != null) + message.stCompleted_100Episodes = Boolean(object.stCompleted_100Episodes); + if (object.challenger != null) { + if (typeof object.challenger !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.challenger: object expected"); + message.challenger = $root.wm.protobuf.ChallengerCar.fromObject(object.challenger); + } + if (object.challengerReturnCount != null) + message.challengerReturnCount = object.challengerReturnCount >>> 0; + if (object.numOfChallengers != null) + message.numOfChallengers = object.numOfChallengers >>> 0; + if (object.opponentGhost != null) { + if (typeof object.opponentGhost !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.opponentGhost: object expected"); + message.opponentGhost = $root.wm.protobuf.GhostCar.fromObject(object.opponentGhost); + } + if (object.opponentTrailId != null) + if ($util.Long) + (message.opponentTrailId = $util.Long.fromValue(object.opponentTrailId)).unsigned = true; + else if (typeof object.opponentTrailId === "string") + message.opponentTrailId = parseInt(object.opponentTrailId, 10); + else if (typeof object.opponentTrailId === "number") + message.opponentTrailId = object.opponentTrailId; + else if (typeof object.opponentTrailId === "object") + message.opponentTrailId = new $util.LongBits(object.opponentTrailId.low >>> 0, object.opponentTrailId.high >>> 0).toNumber(true); + if (object.opponentCompetitionId != null) + message.opponentCompetitionId = object.opponentCompetitionId >>> 0; + if (object.competitionParameter != null) { + if (typeof object.competitionParameter !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.competitionParameter: object expected"); + message.competitionParameter = $root.wm.protobuf.GhostCompetitionParameter.fromObject(object.competitionParameter); + } + if (object.specialTitles) { + if (!Array.isArray(object.specialTitles)) + throw TypeError(".wm.protobuf.LoadCarResponse.specialTitles: array expected"); + message.specialTitles = []; + for (let i = 0; i < object.specialTitles.length; ++i) + message.specialTitles[i] = String(object.specialTitles[i]); + } + if (object.earnedTitles) { + if (!Array.isArray(object.earnedTitles)) + throw TypeError(".wm.protobuf.LoadCarResponse.earnedTitles: array expected"); + message.earnedTitles = []; + for (let i = 0; i < object.earnedTitles.length; ++i) + message.earnedTitles[i] = String(object.earnedTitles[i]); + } + if (object.ownedItems) { + if (!Array.isArray(object.ownedItems)) + throw TypeError(".wm.protobuf.LoadCarResponse.ownedItems: array expected"); + message.ownedItems = []; + for (let i = 0; i < object.ownedItems.length; ++i) { + if (typeof object.ownedItems[i] !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.ownedItems: object expected"); + message.ownedItems[i] = $root.wm.protobuf.CarItem.fromObject(object.ownedItems[i]); + } + } + if (object.auraMotifAutoChange != null) + message.auraMotifAutoChange = Boolean(object.auraMotifAutoChange); + if (object.screenshotCount != null) + message.screenshotCount = object.screenshotCount >>> 0; + if (object.announceEventModePrize != null) + message.announceEventModePrize = Boolean(object.announceEventModePrize); + if (object.transferred != null) + message.transferred = Boolean(object.transferred); + if (object.driveLastPlayedAt != null) + message.driveLastPlayedAt = object.driveLastPlayedAt >>> 0; + if (object.insurance != null) { + if (typeof object.insurance !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.insurance: object expected"); + message.insurance = $root.wm.protobuf.LoadCarResponse.StoryInsurance.fromObject(object.insurance); + } + return message; + }; + + /** + * Creates a plain object from a LoadCarResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.LoadCarResponse} message LoadCarResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadCarResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.rgRegionMapScore = []; + object.rgRegions = []; + object.specialTitles = []; + object.earnedTitles = []; + object.ownedItems = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.car = null; + object.tuningPoint = 0; + object.odometer = 0; + object.playCount = 0; + object.earnedCustomColor = false; + object.setting = null; + object.vsPlayCount = 0; + object.vsBurstCount = 0; + object.vsStarCount = 0; + object.vsStarCountMax = 0; + object.vsCoolOrWild = 0; + object.vsSmoothOrRough = 0; + object.vsTripleStarMedals = 0; + object.vsDoubleStarMedals = 0; + object.vsSingleStarMedals = 0; + object.vsPlainMedals = 0; + object.rgPlayCount = 0; + object.rgWinCount = 0; + object.rgTrophy = 0; + object.rgScore = 0; + object.rgStamp = 0; + object.dressupLevel = 0; + object.dressupPoint = 0; + object.stPlayCount = 0; + object.stClearBits = 0; + object.stClearDivCount = 0; + object.stClearCount = 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.stLoseBits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.stLoseBits = options.longs === String ? "0" : 0; + object.stConsecutiveWins = 0; + object.stConsecutiveWinsMax = 0; + object.challenger = null; + object.challengerReturnCount = 0; + object.opponentGhost = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.opponentTrailId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.opponentTrailId = options.longs === String ? "0" : 0; + object.opponentCompetitionId = 0; + object.competitionParameter = null; + object.auraMotifAutoChange = false; + object.screenshotCount = 0; + object.numOfChallengers = 0; + object.announceEventModePrize = false; + object.rgAcquireAllCrowns = false; + object.transferred = false; + object.driveLastPlayedAt = 0; + object.insurance = null; + object.stCompleted_100Episodes = false; + object.rgPreviousVersionPlayCount = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.tuningPoint != null && message.hasOwnProperty("tuningPoint")) + object.tuningPoint = message.tuningPoint; + if (message.odometer != null && message.hasOwnProperty("odometer")) + object.odometer = message.odometer; + if (message.playCount != null && message.hasOwnProperty("playCount")) + object.playCount = message.playCount; + if (message.earnedCustomColor != null && message.hasOwnProperty("earnedCustomColor")) + object.earnedCustomColor = message.earnedCustomColor; + if (message.setting != null && message.hasOwnProperty("setting")) + object.setting = $root.wm.protobuf.CarSetting.toObject(message.setting, options); + if (message.vsPlayCount != null && message.hasOwnProperty("vsPlayCount")) + object.vsPlayCount = message.vsPlayCount; + if (message.vsBurstCount != null && message.hasOwnProperty("vsBurstCount")) + object.vsBurstCount = message.vsBurstCount; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + object.vsStarCount = message.vsStarCount; + if (message.vsStarCountMax != null && message.hasOwnProperty("vsStarCountMax")) + object.vsStarCountMax = message.vsStarCountMax; + if (message.vsCoolOrWild != null && message.hasOwnProperty("vsCoolOrWild")) + object.vsCoolOrWild = message.vsCoolOrWild; + if (message.vsSmoothOrRough != null && message.hasOwnProperty("vsSmoothOrRough")) + object.vsSmoothOrRough = message.vsSmoothOrRough; + if (message.vsTripleStarMedals != null && message.hasOwnProperty("vsTripleStarMedals")) + object.vsTripleStarMedals = message.vsTripleStarMedals; + if (message.vsDoubleStarMedals != null && message.hasOwnProperty("vsDoubleStarMedals")) + object.vsDoubleStarMedals = message.vsDoubleStarMedals; + if (message.vsSingleStarMedals != null && message.hasOwnProperty("vsSingleStarMedals")) + object.vsSingleStarMedals = message.vsSingleStarMedals; + if (message.vsPlainMedals != null && message.hasOwnProperty("vsPlainMedals")) + object.vsPlainMedals = message.vsPlainMedals; + if (message.rgPlayCount != null && message.hasOwnProperty("rgPlayCount")) + object.rgPlayCount = message.rgPlayCount; + if (message.rgWinCount != null && message.hasOwnProperty("rgWinCount")) + object.rgWinCount = message.rgWinCount; + if (message.rgTrophy != null && message.hasOwnProperty("rgTrophy")) + object.rgTrophy = message.rgTrophy; + if (message.rgScore != null && message.hasOwnProperty("rgScore")) + object.rgScore = message.rgScore; + if (message.rgRegionMapScore && message.rgRegionMapScore.length) { + object.rgRegionMapScore = []; + for (let j = 0; j < message.rgRegionMapScore.length; ++j) + object.rgRegionMapScore[j] = message.rgRegionMapScore[j]; + } + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + object.rgStamp = message.rgStamp; + if (message.dressupLevel != null && message.hasOwnProperty("dressupLevel")) + object.dressupLevel = message.dressupLevel; + if (message.dressupPoint != null && message.hasOwnProperty("dressupPoint")) + object.dressupPoint = message.dressupPoint; + if (message.rgRegions && message.rgRegions.length) { + object.rgRegions = []; + for (let j = 0; j < message.rgRegions.length; ++j) + object.rgRegions[j] = message.rgRegions[j]; + } + if (message.stPlayCount != null && message.hasOwnProperty("stPlayCount")) + object.stPlayCount = message.stPlayCount; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + object.stClearBits = message.stClearBits; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + object.stClearDivCount = message.stClearDivCount; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + object.stClearCount = message.stClearCount; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (typeof message.stLoseBits === "number") + object.stLoseBits = options.longs === String ? String(message.stLoseBits) : message.stLoseBits; + else + object.stLoseBits = options.longs === String ? $util.Long.prototype.toString.call(message.stLoseBits) : options.longs === Number ? new $util.LongBits(message.stLoseBits.low >>> 0, message.stLoseBits.high >>> 0).toNumber(true) : message.stLoseBits; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + object.stConsecutiveWins = message.stConsecutiveWins; + if (message.stConsecutiveWinsMax != null && message.hasOwnProperty("stConsecutiveWinsMax")) + object.stConsecutiveWinsMax = message.stConsecutiveWinsMax; + if (message.challenger != null && message.hasOwnProperty("challenger")) + object.challenger = $root.wm.protobuf.ChallengerCar.toObject(message.challenger, options); + if (message.challengerReturnCount != null && message.hasOwnProperty("challengerReturnCount")) + object.challengerReturnCount = message.challengerReturnCount; + if (message.opponentGhost != null && message.hasOwnProperty("opponentGhost")) + object.opponentGhost = $root.wm.protobuf.GhostCar.toObject(message.opponentGhost, options); + if (message.opponentTrailId != null && message.hasOwnProperty("opponentTrailId")) + if (typeof message.opponentTrailId === "number") + object.opponentTrailId = options.longs === String ? String(message.opponentTrailId) : message.opponentTrailId; + else + object.opponentTrailId = options.longs === String ? $util.Long.prototype.toString.call(message.opponentTrailId) : options.longs === Number ? new $util.LongBits(message.opponentTrailId.low >>> 0, message.opponentTrailId.high >>> 0).toNumber(true) : message.opponentTrailId; + if (message.opponentCompetitionId != null && message.hasOwnProperty("opponentCompetitionId")) + object.opponentCompetitionId = message.opponentCompetitionId; + if (message.competitionParameter != null && message.hasOwnProperty("competitionParameter")) + object.competitionParameter = $root.wm.protobuf.GhostCompetitionParameter.toObject(message.competitionParameter, options); + if (message.specialTitles && message.specialTitles.length) { + object.specialTitles = []; + for (let j = 0; j < message.specialTitles.length; ++j) + object.specialTitles[j] = message.specialTitles[j]; + } + if (message.earnedTitles && message.earnedTitles.length) { + object.earnedTitles = []; + for (let j = 0; j < message.earnedTitles.length; ++j) + object.earnedTitles[j] = message.earnedTitles[j]; + } + if (message.ownedItems && message.ownedItems.length) { + object.ownedItems = []; + for (let j = 0; j < message.ownedItems.length; ++j) + object.ownedItems[j] = $root.wm.protobuf.CarItem.toObject(message.ownedItems[j], options); + } + if (message.auraMotifAutoChange != null && message.hasOwnProperty("auraMotifAutoChange")) + object.auraMotifAutoChange = message.auraMotifAutoChange; + if (message.screenshotCount != null && message.hasOwnProperty("screenshotCount")) + object.screenshotCount = message.screenshotCount; + if (message.numOfChallengers != null && message.hasOwnProperty("numOfChallengers")) + object.numOfChallengers = message.numOfChallengers; + if (message.announceEventModePrize != null && message.hasOwnProperty("announceEventModePrize")) + object.announceEventModePrize = message.announceEventModePrize; + if (message.rgAcquireAllCrowns != null && message.hasOwnProperty("rgAcquireAllCrowns")) + object.rgAcquireAllCrowns = message.rgAcquireAllCrowns; + if (message.transferred != null && message.hasOwnProperty("transferred")) + object.transferred = message.transferred; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + object.driveLastPlayedAt = message.driveLastPlayedAt; + if (message.insurance != null && message.hasOwnProperty("insurance")) + object.insurance = $root.wm.protobuf.LoadCarResponse.StoryInsurance.toObject(message.insurance, options); + if (message.stCompleted_100Episodes != null && message.hasOwnProperty("stCompleted_100Episodes")) + object.stCompleted_100Episodes = message.stCompleted_100Episodes; + if (message.rgPreviousVersionPlayCount != null && message.hasOwnProperty("rgPreviousVersionPlayCount")) + object.rgPreviousVersionPlayCount = message.rgPreviousVersionPlayCount; + return object; + }; + + /** + * Converts this LoadCarResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadCarResponse + * @instance + * @returns {Object.} JSON object + */ + LoadCarResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadCarResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadCarResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadCarResponse"; + }; + + LoadCarResponse.StoryInsurance = (function() { + + /** + * Properties of a StoryInsurance. + * @memberof wm.protobuf.LoadCarResponse + * @interface IStoryInsurance + * @property {number} numOfRemains StoryInsurance numOfRemains + */ + + /** + * Constructs a new StoryInsurance. + * @memberof wm.protobuf.LoadCarResponse + * @classdesc Represents a StoryInsurance. + * @implements IStoryInsurance + * @constructor + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance=} [properties] Properties to set + */ + function StoryInsurance(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoryInsurance numOfRemains. + * @member {number} numOfRemains + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @instance + */ + StoryInsurance.prototype.numOfRemains = 0; + + /** + * Creates a new StoryInsurance instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance=} [properties] Properties to set + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance instance + */ + StoryInsurance.create = function create(properties) { + return new StoryInsurance(properties); + }; + + /** + * Encodes the specified StoryInsurance message. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance} message StoryInsurance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryInsurance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.numOfRemains); + return writer; + }; + + /** + * Encodes the specified StoryInsurance message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance} message StoryInsurance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryInsurance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryInsurance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadCarResponse.StoryInsurance(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.numOfRemains = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("numOfRemains")) + throw $util.ProtocolError("missing required 'numOfRemains'", { instance: message }); + return message; + }; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryInsurance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoryInsurance message. + * @function verify + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoryInsurance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.numOfRemains)) + return "numOfRemains: integer expected"; + return null; + }; + + /** + * Creates a StoryInsurance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance + */ + StoryInsurance.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadCarResponse.StoryInsurance) + return object; + let message = new $root.wm.protobuf.LoadCarResponse.StoryInsurance(); + if (object.numOfRemains != null) + message.numOfRemains = object.numOfRemains >>> 0; + return message; + }; + + /** + * Creates a plain object from a StoryInsurance message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.StoryInsurance} message StoryInsurance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoryInsurance.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.numOfRemains = 0; + if (message.numOfRemains != null && message.hasOwnProperty("numOfRemains")) + object.numOfRemains = message.numOfRemains; + return object; + }; + + /** + * Converts this StoryInsurance to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @instance + * @returns {Object.} JSON object + */ + StoryInsurance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoryInsurance + * @function getTypeUrl + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoryInsurance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadCarResponse.StoryInsurance"; + }; + + return StoryInsurance; + })(); + + return LoadCarResponse; + })(); + + protobuf.CreateCarRequest = (function() { + + /** + * Properties of a CreateCarRequest. + * @memberof wm.protobuf + * @interface ICreateCarRequest + * @property {number|null} [userId] CreateCarRequest userId + * @property {number|null} [banapassportAmId] CreateCarRequest banapassportAmId + * @property {string|null} [cardChipId] CreateCarRequest cardChipId + * @property {string|null} [accessCode] CreateCarRequest accessCode + * @property {number|null} [cardTypeCode] CreateCarRequest cardTypeCode + * @property {number|null} [cardRegionCode] CreateCarRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] CreateCarRequest device + * @property {wm.protobuf.ICar} car CreateCarRequest car + * @property {boolean} transmission CreateCarRequest transmission + * @property {number} timestamp CreateCarRequest timestamp + * @property {number|null} [userItemId] CreateCarRequest userItemId + * @property {number|null} [deletedCarId] CreateCarRequest deletedCarId + */ + + /** + * Constructs a new CreateCarRequest. + * @memberof wm.protobuf + * @classdesc Represents a CreateCarRequest. + * @implements ICreateCarRequest + * @constructor + * @param {wm.protobuf.ICreateCarRequest=} [properties] Properties to set + */ + function CreateCarRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCarRequest userId. + * @member {number} userId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.userId = 0; + + /** + * CreateCarRequest banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.banapassportAmId = 0; + + /** + * CreateCarRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.cardChipId = ""; + + /** + * CreateCarRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.accessCode = ""; + + /** + * CreateCarRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.cardTypeCode = 0; + + /** + * CreateCarRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.cardRegionCode = 0; + + /** + * CreateCarRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.device = 0; + + /** + * CreateCarRequest car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.car = null; + + /** + * CreateCarRequest transmission. + * @member {boolean} transmission + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.transmission = false; + + /** + * CreateCarRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.timestamp = 0; + + /** + * CreateCarRequest userItemId. + * @member {number} userItemId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.userItemId = 0; + + /** + * CreateCarRequest deletedCarId. + * @member {number} deletedCarId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.deletedCarId = 0; + + /** + * Creates a new CreateCarRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.ICreateCarRequest=} [properties] Properties to set + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest instance + */ + CreateCarRequest.create = function create(properties) { + return new CreateCarRequest(properties); + }; + + /** + * Encodes the specified CreateCarRequest message. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.ICreateCarRequest} message CreateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.banapassportAmId); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.device); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.transmission); + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.timestamp); + if (message.userItemId != null && Object.hasOwnProperty.call(message, "userItemId")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.userItemId); + if (message.deletedCarId != null && Object.hasOwnProperty.call(message, "deletedCarId")) + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.deletedCarId); + return writer; + }; + + /** + * Encodes the specified CreateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.ICreateCarRequest} message CreateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateCarRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.banapassportAmId = reader.uint32(); + break; + } + case 3: { + message.cardChipId = reader.string(); + break; + } + case 4: { + message.accessCode = reader.string(); + break; + } + case 5: { + message.cardTypeCode = reader.uint32(); + break; + } + case 6: { + message.cardRegionCode = reader.uint32(); + break; + } + case 7: { + message.device = reader.int32(); + break; + } + case 8: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 9: { + message.transmission = reader.bool(); + break; + } + case 11: { + message.timestamp = reader.uint32(); + break; + } + case 12: { + message.userItemId = reader.uint32(); + break; + } + case 13: { + message.deletedCarId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("transmission")) + throw $util.ProtocolError("missing required 'transmission'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCarRequest message. + * @function verify + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCarRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (typeof message.transmission !== "boolean") + return "transmission: boolean expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + if (!$util.isInteger(message.userItemId)) + return "userItemId: integer expected"; + if (message.deletedCarId != null && message.hasOwnProperty("deletedCarId")) + if (!$util.isInteger(message.deletedCarId)) + return "deletedCarId: integer expected"; + return null; + }; + + /** + * Creates a CreateCarRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest + */ + CreateCarRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateCarRequest) + return object; + let message = new $root.wm.protobuf.CreateCarRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.CreateCarRequest.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.transmission != null) + message.transmission = Boolean(object.transmission); + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.userItemId != null) + message.userItemId = object.userItemId >>> 0; + if (object.deletedCarId != null) + message.deletedCarId = object.deletedCarId >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateCarRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.CreateCarRequest} message CreateCarRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCarRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.banapassportAmId = 0; + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.car = null; + object.transmission = false; + object.timestamp = 0; + object.userItemId = 0; + object.deletedCarId = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.transmission != null && message.hasOwnProperty("transmission")) + object.transmission = message.transmission; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + object.userItemId = message.userItemId; + if (message.deletedCarId != null && message.hasOwnProperty("deletedCarId")) + object.deletedCarId = message.deletedCarId; + return object; + }; + + /** + * Converts this CreateCarRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateCarRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCarRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCarRequest + * @function getTypeUrl + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCarRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateCarRequest"; + }; + + return CreateCarRequest; + })(); + + protobuf.CreateCarResponse = (function() { + + /** + * Properties of a CreateCarResponse. + * @memberof wm.protobuf + * @interface ICreateCarResponse + * @property {wm.protobuf.ErrorCode} error CreateCarResponse error + * @property {string|null} [accessCode] CreateCarResponse accessCode + * @property {number|null} [banapassportAmId] CreateCarResponse banapassportAmId + * @property {number|null} [mbid] CreateCarResponse mbid + * @property {number} userId CreateCarResponse userId + * @property {number} carId CreateCarResponse carId + * @property {number|null} [stClearBits] CreateCarResponse stClearBits + * @property {number|null} [stClearDivCount] CreateCarResponse stClearDivCount + * @property {number|null} [stClearCount] CreateCarResponse stClearCount + * @property {number|Long|null} [stLoseBits] CreateCarResponse stLoseBits + * @property {number|null} [stConsecutiveWins] CreateCarResponse stConsecutiveWins + * @property {number|null} [stConsecutiveWinsMax] CreateCarResponse stConsecutiveWinsMax + * @property {number|null} [fullTunedCarCouponUnreceivableAt] CreateCarResponse fullTunedCarCouponUnreceivableAt + */ + + /** + * Constructs a new CreateCarResponse. + * @memberof wm.protobuf + * @classdesc Represents a CreateCarResponse. + * @implements ICreateCarResponse + * @constructor + * @param {wm.protobuf.ICreateCarResponse=} [properties] Properties to set + */ + function CreateCarResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCarResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.error = 0; + + /** + * CreateCarResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.accessCode = ""; + + /** + * CreateCarResponse banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.banapassportAmId = 0; + + /** + * CreateCarResponse mbid. + * @member {number} mbid + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.mbid = 0; + + /** + * CreateCarResponse userId. + * @member {number} userId + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.userId = 0; + + /** + * CreateCarResponse carId. + * @member {number} carId + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.carId = 0; + + /** + * CreateCarResponse stClearBits. + * @member {number} stClearBits + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stClearBits = 0; + + /** + * CreateCarResponse stClearDivCount. + * @member {number} stClearDivCount + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stClearDivCount = 0; + + /** + * CreateCarResponse stClearCount. + * @member {number} stClearCount + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stClearCount = 0; + + /** + * CreateCarResponse stLoseBits. + * @member {number|Long} stLoseBits + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stLoseBits = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * CreateCarResponse stConsecutiveWins. + * @member {number} stConsecutiveWins + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stConsecutiveWins = 0; + + /** + * CreateCarResponse stConsecutiveWinsMax. + * @member {number} stConsecutiveWinsMax + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stConsecutiveWinsMax = 0; + + /** + * CreateCarResponse fullTunedCarCouponUnreceivableAt. + * @member {number} fullTunedCarCouponUnreceivableAt + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.fullTunedCarCouponUnreceivableAt = 0; + + /** + * Creates a new CreateCarResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.ICreateCarResponse=} [properties] Properties to set + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse instance + */ + CreateCarResponse.create = function create(properties) { + return new CreateCarResponse(properties); + }; + + /** + * Encodes the specified CreateCarResponse message. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.ICreateCarResponse} message CreateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.banapassportAmId); + if (message.mbid != null && Object.hasOwnProperty.call(message, "mbid")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mbid); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.userId); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.carId); + if (message.stClearBits != null && Object.hasOwnProperty.call(message, "stClearBits")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stClearBits); + if (message.stClearDivCount != null && Object.hasOwnProperty.call(message, "stClearDivCount")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.stClearDivCount); + if (message.stClearCount != null && Object.hasOwnProperty.call(message, "stClearCount")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.stClearCount); + if (message.stLoseBits != null && Object.hasOwnProperty.call(message, "stLoseBits")) + writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.stLoseBits); + if (message.stConsecutiveWins != null && Object.hasOwnProperty.call(message, "stConsecutiveWins")) + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.stConsecutiveWins); + if (message.stConsecutiveWinsMax != null && Object.hasOwnProperty.call(message, "stConsecutiveWinsMax")) + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.stConsecutiveWinsMax); + if (message.fullTunedCarCouponUnreceivableAt != null && Object.hasOwnProperty.call(message, "fullTunedCarCouponUnreceivableAt")) + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.fullTunedCarCouponUnreceivableAt); + return writer; + }; + + /** + * Encodes the specified CreateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.ICreateCarResponse} message CreateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateCarResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + case 3: { + message.banapassportAmId = reader.uint32(); + break; + } + case 4: { + message.mbid = reader.uint32(); + break; + } + case 5: { + message.userId = reader.uint32(); + break; + } + case 6: { + message.carId = reader.uint32(); + break; + } + case 8: { + message.stClearBits = reader.uint32(); + break; + } + case 9: { + message.stClearDivCount = reader.uint32(); + break; + } + case 10: { + message.stClearCount = reader.uint32(); + break; + } + case 11: { + message.stLoseBits = reader.uint64(); + break; + } + case 13: { + message.stConsecutiveWins = reader.uint32(); + break; + } + case 14: { + message.stConsecutiveWinsMax = reader.uint32(); + break; + } + case 17: { + message.fullTunedCarCouponUnreceivableAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCarResponse message. + * @function verify + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCarResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.mbid != null && message.hasOwnProperty("mbid")) + if (!$util.isInteger(message.mbid)) + return "mbid: integer expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + if (!$util.isInteger(message.stClearBits)) + return "stClearBits: integer expected"; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + if (!$util.isInteger(message.stClearDivCount)) + return "stClearDivCount: integer expected"; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + if (!$util.isInteger(message.stClearCount)) + return "stClearCount: integer expected"; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (!$util.isInteger(message.stLoseBits) && !(message.stLoseBits && $util.isInteger(message.stLoseBits.low) && $util.isInteger(message.stLoseBits.high))) + return "stLoseBits: integer|Long expected"; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + if (!$util.isInteger(message.stConsecutiveWins)) + return "stConsecutiveWins: integer expected"; + if (message.stConsecutiveWinsMax != null && message.hasOwnProperty("stConsecutiveWinsMax")) + if (!$util.isInteger(message.stConsecutiveWinsMax)) + return "stConsecutiveWinsMax: integer expected"; + if (message.fullTunedCarCouponUnreceivableAt != null && message.hasOwnProperty("fullTunedCarCouponUnreceivableAt")) + if (!$util.isInteger(message.fullTunedCarCouponUnreceivableAt)) + return "fullTunedCarCouponUnreceivableAt: integer expected"; + return null; + }; + + /** + * Creates a CreateCarResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse + */ + CreateCarResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateCarResponse) + return object; + let message = new $root.wm.protobuf.CreateCarResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.mbid != null) + message.mbid = object.mbid >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.stClearBits != null) + message.stClearBits = object.stClearBits >>> 0; + if (object.stClearDivCount != null) + message.stClearDivCount = object.stClearDivCount >>> 0; + if (object.stClearCount != null) + message.stClearCount = object.stClearCount >>> 0; + if (object.stLoseBits != null) + if ($util.Long) + (message.stLoseBits = $util.Long.fromValue(object.stLoseBits)).unsigned = true; + else if (typeof object.stLoseBits === "string") + message.stLoseBits = parseInt(object.stLoseBits, 10); + else if (typeof object.stLoseBits === "number") + message.stLoseBits = object.stLoseBits; + else if (typeof object.stLoseBits === "object") + message.stLoseBits = new $util.LongBits(object.stLoseBits.low >>> 0, object.stLoseBits.high >>> 0).toNumber(true); + if (object.stConsecutiveWins != null) + message.stConsecutiveWins = object.stConsecutiveWins >>> 0; + if (object.stConsecutiveWinsMax != null) + message.stConsecutiveWinsMax = object.stConsecutiveWinsMax >>> 0; + if (object.fullTunedCarCouponUnreceivableAt != null) + message.fullTunedCarCouponUnreceivableAt = object.fullTunedCarCouponUnreceivableAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateCarResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.CreateCarResponse} message CreateCarResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCarResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.accessCode = ""; + object.banapassportAmId = 0; + object.mbid = 0; + object.userId = 0; + object.carId = 0; + object.stClearBits = 0; + object.stClearDivCount = 0; + object.stClearCount = 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.stLoseBits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.stLoseBits = options.longs === String ? "0" : 0; + object.stConsecutiveWins = 0; + object.stConsecutiveWinsMax = 0; + object.fullTunedCarCouponUnreceivableAt = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.mbid != null && message.hasOwnProperty("mbid")) + object.mbid = message.mbid; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + object.stClearBits = message.stClearBits; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + object.stClearDivCount = message.stClearDivCount; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + object.stClearCount = message.stClearCount; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (typeof message.stLoseBits === "number") + object.stLoseBits = options.longs === String ? String(message.stLoseBits) : message.stLoseBits; + else + object.stLoseBits = options.longs === String ? $util.Long.prototype.toString.call(message.stLoseBits) : options.longs === Number ? new $util.LongBits(message.stLoseBits.low >>> 0, message.stLoseBits.high >>> 0).toNumber(true) : message.stLoseBits; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + object.stConsecutiveWins = message.stConsecutiveWins; + if (message.stConsecutiveWinsMax != null && message.hasOwnProperty("stConsecutiveWinsMax")) + object.stConsecutiveWinsMax = message.stConsecutiveWinsMax; + if (message.fullTunedCarCouponUnreceivableAt != null && message.hasOwnProperty("fullTunedCarCouponUnreceivableAt")) + object.fullTunedCarCouponUnreceivableAt = message.fullTunedCarCouponUnreceivableAt; + return object; + }; + + /** + * Converts this CreateCarResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateCarResponse + * @instance + * @returns {Object.} JSON object + */ + CreateCarResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCarResponse + * @function getTypeUrl + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCarResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateCarResponse"; + }; + + return CreateCarResponse; + })(); + + protobuf.LoadGameHistoryRequest = (function() { + + /** + * Properties of a LoadGameHistoryRequest. + * @memberof wm.protobuf + * @interface ILoadGameHistoryRequest + * @property {number} carId LoadGameHistoryRequest carId + */ + + /** + * Constructs a new LoadGameHistoryRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGameHistoryRequest. + * @implements ILoadGameHistoryRequest + * @constructor + * @param {wm.protobuf.ILoadGameHistoryRequest=} [properties] Properties to set + */ + function LoadGameHistoryRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGameHistoryRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGameHistoryRequest + * @instance + */ + LoadGameHistoryRequest.prototype.carId = 0; + + /** + * Creates a new LoadGameHistoryRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.ILoadGameHistoryRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest instance + */ + LoadGameHistoryRequest.create = function create(properties) { + return new LoadGameHistoryRequest(properties); + }; + + /** + * Encodes the specified LoadGameHistoryRequest message. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.ILoadGameHistoryRequest} message LoadGameHistoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + return writer; + }; + + /** + * Encodes the specified LoadGameHistoryRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.ILoadGameHistoryRequest} message LoadGameHistoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGameHistoryRequest message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGameHistoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + return null; + }; + + /** + * Creates a LoadGameHistoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest + */ + LoadGameHistoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryRequest) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGameHistoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.LoadGameHistoryRequest} message LoadGameHistoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGameHistoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + return object; + }; + + /** + * Converts this LoadGameHistoryRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGameHistoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGameHistoryRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGameHistoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryRequest"; + }; + + return LoadGameHistoryRequest; + })(); + + protobuf.LoadGameHistoryResponse = (function() { + + /** + * Properties of a LoadGameHistoryResponse. + * @memberof wm.protobuf + * @interface ILoadGameHistoryResponse + * @property {wm.protobuf.ErrorCode} error LoadGameHistoryResponse error + * @property {Array.|null} [taRecords] LoadGameHistoryResponse taRecords + * @property {number} taRankingUpdatedAt LoadGameHistoryResponse taRankingUpdatedAt + * @property {Array.|null} [ghostHistory] LoadGameHistoryResponse ghostHistory + * @property {number} ghostBattleCount LoadGameHistoryResponse ghostBattleCount + * @property {number} ghostBattleWinCount LoadGameHistoryResponse ghostBattleWinCount + * @property {number} stampSheetCount LoadGameHistoryResponse stampSheetCount + * @property {Array.|null} [stampSheet] LoadGameHistoryResponse stampSheet + */ + + /** + * Constructs a new LoadGameHistoryResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGameHistoryResponse. + * @implements ILoadGameHistoryResponse + * @constructor + * @param {wm.protobuf.ILoadGameHistoryResponse=} [properties] Properties to set + */ + function LoadGameHistoryResponse(properties) { + this.taRecords = []; + this.ghostHistory = []; + this.stampSheet = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGameHistoryResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.error = 0; + + /** + * LoadGameHistoryResponse taRecords. + * @member {Array.} taRecords + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.taRecords = $util.emptyArray; + + /** + * LoadGameHistoryResponse taRankingUpdatedAt. + * @member {number} taRankingUpdatedAt + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.taRankingUpdatedAt = 0; + + /** + * LoadGameHistoryResponse ghostHistory. + * @member {Array.} ghostHistory + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.ghostHistory = $util.emptyArray; + + /** + * LoadGameHistoryResponse ghostBattleCount. + * @member {number} ghostBattleCount + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.ghostBattleCount = 0; + + /** + * LoadGameHistoryResponse ghostBattleWinCount. + * @member {number} ghostBattleWinCount + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.ghostBattleWinCount = 0; + + /** + * LoadGameHistoryResponse stampSheetCount. + * @member {number} stampSheetCount + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.stampSheetCount = 0; + + /** + * LoadGameHistoryResponse stampSheet. + * @member {Array.} stampSheet + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.stampSheet = $util.emptyArray; + + /** + * Creates a new LoadGameHistoryResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.ILoadGameHistoryResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse instance + */ + LoadGameHistoryResponse.create = function create(properties) { + return new LoadGameHistoryResponse(properties); + }; + + /** + * Encodes the specified LoadGameHistoryResponse message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.ILoadGameHistoryResponse} message LoadGameHistoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.taRecords != null && message.taRecords.length) + for (let i = 0; i < message.taRecords.length; ++i) + $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.encode(message.taRecords[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.taRankingUpdatedAt); + if (message.ghostHistory != null && message.ghostHistory.length) + for (let i = 0; i < message.ghostHistory.length; ++i) + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.encode(message.ghostHistory[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.ghostBattleCount); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.ghostBattleWinCount); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.stampSheetCount); + if (message.stampSheet != null && message.stampSheet.length) + for (let i = 0; i < message.stampSheet.length; ++i) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stampSheet[i]); + return writer; + }; + + /** + * Encodes the specified LoadGameHistoryResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.ILoadGameHistoryResponse} message LoadGameHistoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.taRecords && message.taRecords.length)) + message.taRecords = []; + message.taRecords.push($root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.decode(reader, reader.uint32())); + break; + } + case 3: { + message.taRankingUpdatedAt = reader.uint32(); + break; + } + case 4: { + if (!(message.ghostHistory && message.ghostHistory.length)) + message.ghostHistory = []; + message.ghostHistory.push($root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.decode(reader, reader.uint32())); + break; + } + case 5: { + message.ghostBattleCount = reader.uint32(); + break; + } + case 6: { + message.ghostBattleWinCount = reader.uint32(); + break; + } + case 7: { + message.stampSheetCount = reader.uint32(); + break; + } + case 8: { + if (!(message.stampSheet && message.stampSheet.length)) + message.stampSheet = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampSheet.push(reader.uint32()); + } else + message.stampSheet.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("taRankingUpdatedAt")) + throw $util.ProtocolError("missing required 'taRankingUpdatedAt'", { instance: message }); + if (!message.hasOwnProperty("ghostBattleCount")) + throw $util.ProtocolError("missing required 'ghostBattleCount'", { instance: message }); + if (!message.hasOwnProperty("ghostBattleWinCount")) + throw $util.ProtocolError("missing required 'ghostBattleWinCount'", { instance: message }); + if (!message.hasOwnProperty("stampSheetCount")) + throw $util.ProtocolError("missing required 'stampSheetCount'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGameHistoryResponse message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGameHistoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.taRecords != null && message.hasOwnProperty("taRecords")) { + if (!Array.isArray(message.taRecords)) + return "taRecords: array expected"; + for (let i = 0; i < message.taRecords.length; ++i) { + let error = $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify(message.taRecords[i]); + if (error) + return "taRecords." + error; + } + } + if (!$util.isInteger(message.taRankingUpdatedAt)) + return "taRankingUpdatedAt: integer expected"; + if (message.ghostHistory != null && message.hasOwnProperty("ghostHistory")) { + if (!Array.isArray(message.ghostHistory)) + return "ghostHistory: array expected"; + for (let i = 0; i < message.ghostHistory.length; ++i) { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify(message.ghostHistory[i]); + if (error) + return "ghostHistory." + error; + } + } + if (!$util.isInteger(message.ghostBattleCount)) + return "ghostBattleCount: integer expected"; + if (!$util.isInteger(message.ghostBattleWinCount)) + return "ghostBattleWinCount: integer expected"; + if (!$util.isInteger(message.stampSheetCount)) + return "stampSheetCount: integer expected"; + if (message.stampSheet != null && message.hasOwnProperty("stampSheet")) { + if (!Array.isArray(message.stampSheet)) + return "stampSheet: array expected"; + for (let i = 0; i < message.stampSheet.length; ++i) + if (!$util.isInteger(message.stampSheet[i])) + return "stampSheet: integer[] expected"; + } + return null; + }; + + /** + * Creates a LoadGameHistoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse + */ + LoadGameHistoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.taRecords) { + if (!Array.isArray(object.taRecords)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.taRecords: array expected"); + message.taRecords = []; + for (let i = 0; i < object.taRecords.length; ++i) { + if (typeof object.taRecords[i] !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.taRecords: object expected"); + message.taRecords[i] = $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.fromObject(object.taRecords[i]); + } + } + if (object.taRankingUpdatedAt != null) + message.taRankingUpdatedAt = object.taRankingUpdatedAt >>> 0; + if (object.ghostHistory) { + if (!Array.isArray(object.ghostHistory)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.ghostHistory: array expected"); + message.ghostHistory = []; + for (let i = 0; i < object.ghostHistory.length; ++i) { + if (typeof object.ghostHistory[i] !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.ghostHistory: object expected"); + message.ghostHistory[i] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.fromObject(object.ghostHistory[i]); + } + } + if (object.ghostBattleCount != null) + message.ghostBattleCount = object.ghostBattleCount >>> 0; + if (object.ghostBattleWinCount != null) + message.ghostBattleWinCount = object.ghostBattleWinCount >>> 0; + if (object.stampSheetCount != null) + message.stampSheetCount = object.stampSheetCount >>> 0; + if (object.stampSheet) { + if (!Array.isArray(object.stampSheet)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.stampSheet: array expected"); + message.stampSheet = []; + for (let i = 0; i < object.stampSheet.length; ++i) + message.stampSheet[i] = object.stampSheet[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LoadGameHistoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.LoadGameHistoryResponse} message LoadGameHistoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGameHistoryResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.taRecords = []; + object.ghostHistory = []; + object.stampSheet = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.taRankingUpdatedAt = 0; + object.ghostBattleCount = 0; + object.ghostBattleWinCount = 0; + object.stampSheetCount = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.taRecords && message.taRecords.length) { + object.taRecords = []; + for (let j = 0; j < message.taRecords.length; ++j) + object.taRecords[j] = $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.toObject(message.taRecords[j], options); + } + if (message.taRankingUpdatedAt != null && message.hasOwnProperty("taRankingUpdatedAt")) + object.taRankingUpdatedAt = message.taRankingUpdatedAt; + if (message.ghostHistory && message.ghostHistory.length) { + object.ghostHistory = []; + for (let j = 0; j < message.ghostHistory.length; ++j) + object.ghostHistory[j] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.toObject(message.ghostHistory[j], options); + } + if (message.ghostBattleCount != null && message.hasOwnProperty("ghostBattleCount")) + object.ghostBattleCount = message.ghostBattleCount; + if (message.ghostBattleWinCount != null && message.hasOwnProperty("ghostBattleWinCount")) + object.ghostBattleWinCount = message.ghostBattleWinCount; + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + object.stampSheetCount = message.stampSheetCount; + if (message.stampSheet && message.stampSheet.length) { + object.stampSheet = []; + for (let j = 0; j < message.stampSheet.length; ++j) + object.stampSheet[j] = message.stampSheet[j]; + } + return object; + }; + + /** + * Converts this LoadGameHistoryResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGameHistoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGameHistoryResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGameHistoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse"; + }; + + LoadGameHistoryResponse.TimeAttackRecord = (function() { + + /** + * Properties of a TimeAttackRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @interface ITimeAttackRecord + * @property {number} course TimeAttackRecord course + * @property {number|null} [time] TimeAttackRecord time + * @property {number|null} [tunePower] TimeAttackRecord tunePower + * @property {number|null} [tuneHandling] TimeAttackRecord tuneHandling + * @property {number|null} [wholeRank] TimeAttackRecord wholeRank + * @property {number} wholeParticipants TimeAttackRecord wholeParticipants + * @property {number|null} [modelRank] TimeAttackRecord modelRank + * @property {number} modelParticipants TimeAttackRecord modelParticipants + */ + + /** + * Constructs a new TimeAttackRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @classdesc Represents a TimeAttackRecord. + * @implements ITimeAttackRecord + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord=} [properties] Properties to set + */ + function TimeAttackRecord(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeAttackRecord course. + * @member {number} course + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.course = 0; + + /** + * TimeAttackRecord time. + * @member {number} time + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.time = 0; + + /** + * TimeAttackRecord tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.tunePower = 0; + + /** + * TimeAttackRecord tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.tuneHandling = 0; + + /** + * TimeAttackRecord wholeRank. + * @member {number} wholeRank + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.wholeRank = 0; + + /** + * TimeAttackRecord wholeParticipants. + * @member {number} wholeParticipants + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.wholeParticipants = 0; + + /** + * TimeAttackRecord modelRank. + * @member {number} modelRank + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.modelRank = 0; + + /** + * TimeAttackRecord modelParticipants. + * @member {number} modelParticipants + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.modelParticipants = 0; + + /** + * Creates a new TimeAttackRecord instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord instance + */ + TimeAttackRecord.create = function create(properties) { + return new TimeAttackRecord(properties); + }; + + /** + * Encodes the specified TimeAttackRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord} message TimeAttackRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.course); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.time); + if (message.tunePower != null && Object.hasOwnProperty.call(message, "tunePower")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tunePower); + if (message.tuneHandling != null && Object.hasOwnProperty.call(message, "tuneHandling")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.tuneHandling); + if (message.wholeRank != null && Object.hasOwnProperty.call(message, "wholeRank")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.wholeRank); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.wholeParticipants); + if (message.modelRank != null && Object.hasOwnProperty.call(message, "modelRank")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.modelRank); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.modelParticipants); + return writer; + }; + + /** + * Encodes the specified TimeAttackRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord} message TimeAttackRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.course = reader.uint32(); + break; + } + case 2: { + message.time = reader.uint32(); + break; + } + case 3: { + message.tunePower = reader.uint32(); + break; + } + case 4: { + message.tuneHandling = reader.uint32(); + break; + } + case 5: { + message.wholeRank = reader.uint32(); + break; + } + case 6: { + message.wholeParticipants = reader.uint32(); + break; + } + case 7: { + message.modelRank = reader.uint32(); + break; + } + case 8: { + message.modelParticipants = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + if (!message.hasOwnProperty("wholeParticipants")) + throw $util.ProtocolError("missing required 'wholeParticipants'", { instance: message }); + if (!message.hasOwnProperty("modelParticipants")) + throw $util.ProtocolError("missing required 'modelParticipants'", { instance: message }); + return message; + }; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeAttackRecord message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeAttackRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + if (message.time != null && message.hasOwnProperty("time")) + if (!$util.isInteger(message.time)) + return "time: integer expected"; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + if (!$util.isInteger(message.wholeRank)) + return "wholeRank: integer expected"; + if (!$util.isInteger(message.wholeParticipants)) + return "wholeParticipants: integer expected"; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + if (!$util.isInteger(message.modelRank)) + return "modelRank: integer expected"; + if (!$util.isInteger(message.modelParticipants)) + return "modelParticipants: integer expected"; + return null; + }; + + /** + * Creates a TimeAttackRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord + */ + TimeAttackRecord.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord(); + if (object.course != null) + message.course = object.course >>> 0; + if (object.time != null) + message.time = object.time >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.wholeRank != null) + message.wholeRank = object.wholeRank >>> 0; + if (object.wholeParticipants != null) + message.wholeParticipants = object.wholeParticipants >>> 0; + if (object.modelRank != null) + message.modelRank = object.modelRank >>> 0; + if (object.modelParticipants != null) + message.modelParticipants = object.modelParticipants >>> 0; + return message; + }; + + /** + * Creates a plain object from a TimeAttackRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} message TimeAttackRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeAttackRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.course = 0; + object.time = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.wholeRank = 0; + object.wholeParticipants = 0; + object.modelRank = 0; + object.modelParticipants = 0; + } + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + if (message.time != null && message.hasOwnProperty("time")) + object.time = message.time; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + object.wholeRank = message.wholeRank; + if (message.wholeParticipants != null && message.hasOwnProperty("wholeParticipants")) + object.wholeParticipants = message.wholeParticipants; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + object.modelRank = message.modelRank; + if (message.modelParticipants != null && message.hasOwnProperty("modelParticipants")) + object.modelParticipants = message.modelParticipants; + return object; + }; + + /** + * Converts this TimeAttackRecord to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + * @returns {Object.} JSON object + */ + TimeAttackRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeAttackRecord + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeAttackRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord"; + }; + + return TimeAttackRecord; + })(); + + LoadGameHistoryResponse.GhostBattleRecord = (function() { + + /** + * Properties of a GhostBattleRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @interface IGhostBattleRecord + * @property {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} carSetting GhostBattleRecord carSetting + * @property {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} opponent GhostBattleRecord opponent + * @property {Array.|null} [mobs] GhostBattleRecord mobs + * @property {number} area GhostBattleRecord area + * @property {number} playedAt GhostBattleRecord playedAt + * @property {string} playedShopName GhostBattleRecord playedShopName + */ + + /** + * Constructs a new GhostBattleRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @classdesc Represents a GhostBattleRecord. + * @implements IGhostBattleRecord + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord=} [properties] Properties to set + */ + function GhostBattleRecord(properties) { + this.mobs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleRecord carSetting. + * @member {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} carSetting + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.carSetting = null; + + /** + * GhostBattleRecord opponent. + * @member {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} opponent + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.opponent = null; + + /** + * GhostBattleRecord mobs. + * @member {Array.} mobs + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.mobs = $util.emptyArray; + + /** + * GhostBattleRecord area. + * @member {number} area + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.area = 0; + + /** + * GhostBattleRecord playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.playedAt = 0; + + /** + * GhostBattleRecord playedShopName. + * @member {string} playedShopName + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.playedShopName = ""; + + /** + * Creates a new GhostBattleRecord instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord instance + */ + GhostBattleRecord.create = function create(properties) { + return new GhostBattleRecord(properties); + }; + + /** + * Encodes the specified GhostBattleRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord} message GhostBattleRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.encode(message.carSetting, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.encode(message.opponent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.mobs != null && message.mobs.length) + for (let i = 0; i < message.mobs.length; ++i) + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.encode(message.mobs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.area); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.playedAt); + writer.uint32(/* id 6, wireType 2 =*/50).string(message.playedShopName); + return writer; + }; + + /** + * Encodes the specified GhostBattleRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord} message GhostBattleRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carSetting = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.decode(reader, reader.uint32()); + break; + } + case 2: { + message.opponent = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.mobs && message.mobs.length)) + message.mobs = []; + message.mobs.push($root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.decode(reader, reader.uint32())); + break; + } + case 4: { + message.area = reader.uint32(); + break; + } + case 5: { + message.playedAt = reader.uint32(); + break; + } + case 6: { + message.playedShopName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carSetting")) + throw $util.ProtocolError("missing required 'carSetting'", { instance: message }); + if (!message.hasOwnProperty("opponent")) + throw $util.ProtocolError("missing required 'opponent'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + if (!message.hasOwnProperty("playedShopName")) + throw $util.ProtocolError("missing required 'playedShopName'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleRecord message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify(message.carSetting); + if (error) + return "carSetting." + error; + } + { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify(message.opponent); + if (error) + return "opponent." + error; + } + if (message.mobs != null && message.hasOwnProperty("mobs")) { + if (!Array.isArray(message.mobs)) + return "mobs: array expected"; + for (let i = 0; i < message.mobs.length; ++i) { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify(message.mobs[i]); + if (error) + return "mobs." + error; + } + } + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (!$util.isString(message.playedShopName)) + return "playedShopName: string expected"; + return null; + }; + + /** + * Creates a GhostBattleRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord + */ + GhostBattleRecord.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord(); + if (object.carSetting != null) { + if (typeof object.carSetting !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.carSetting: object expected"); + message.carSetting = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.fromObject(object.carSetting); + } + if (object.opponent != null) { + if (typeof object.opponent !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.opponent: object expected"); + message.opponent = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.fromObject(object.opponent); + } + if (object.mobs) { + if (!Array.isArray(object.mobs)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.mobs: array expected"); + message.mobs = []; + for (let i = 0; i < object.mobs.length; ++i) { + if (typeof object.mobs[i] !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.mobs: object expected"); + message.mobs[i] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.fromObject(object.mobs[i]); + } + } + if (object.area != null) + message.area = object.area >>> 0; + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.playedShopName != null) + message.playedShopName = String(object.playedShopName); + return message; + }; + + /** + * Creates a plain object from a GhostBattleRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} message GhostBattleRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.mobs = []; + if (options.defaults) { + object.carSetting = null; + object.opponent = null; + object.area = 0; + object.playedAt = 0; + object.playedShopName = ""; + } + if (message.carSetting != null && message.hasOwnProperty("carSetting")) + object.carSetting = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.toObject(message.carSetting, options); + if (message.opponent != null && message.hasOwnProperty("opponent")) + object.opponent = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.toObject(message.opponent, options); + if (message.mobs && message.mobs.length) { + object.mobs = []; + for (let j = 0; j < message.mobs.length; ++j) + object.mobs[j] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.toObject(message.mobs[j], options); + } + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.playedShopName != null && message.hasOwnProperty("playedShopName")) + object.playedShopName = message.playedShopName; + return object; + }; + + /** + * Converts this GhostBattleRecord to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + * @returns {Object.} JSON object + */ + GhostBattleRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleRecord + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord"; + }; + + GhostBattleRecord.GhostCarSetting = (function() { + + /** + * Properties of a GhostCarSetting. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @interface IGhostCarSetting + * @property {number} tunePower GhostCarSetting tunePower + * @property {number} tuneHandling GhostCarSetting tuneHandling + */ + + /** + * Constructs a new GhostCarSetting. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @classdesc Represents a GhostCarSetting. + * @implements IGhostCarSetting + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting=} [properties] Properties to set + */ + function GhostCarSetting(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCarSetting tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @instance + */ + GhostCarSetting.prototype.tunePower = 0; + + /** + * GhostCarSetting tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @instance + */ + GhostCarSetting.prototype.tuneHandling = 0; + + /** + * Creates a new GhostCarSetting instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting instance + */ + GhostCarSetting.create = function create(properties) { + return new GhostCarSetting(properties); + }; + + /** + * Encodes the specified GhostCarSetting message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} message GhostCarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCarSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + return writer; + }; + + /** + * Encodes the specified GhostCarSetting message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} message GhostCarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCarSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCarSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCarSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCarSetting message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCarSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + return null; + }; + + /** + * Creates a GhostCarSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting + */ + GhostCarSetting.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + return message; + }; + + /** + * Creates a plain object from a GhostCarSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} message GhostCarSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCarSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + return object; + }; + + /** + * Converts this GhostCarSetting to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @instance + * @returns {Object.} JSON object + */ + GhostCarSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCarSetting + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCarSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting"; + }; + + return GhostCarSetting; + })(); + + GhostBattleRecord.GhostBattleRecordCar = (function() { + + /** + * Properties of a GhostBattleRecordCar. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @interface IGhostBattleRecordCar + * @property {wm.protobuf.ICar} car GhostBattleRecordCar car + * @property {number} result GhostBattleRecordCar result + */ + + /** + * Constructs a new GhostBattleRecordCar. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @classdesc Represents a GhostBattleRecordCar. + * @implements IGhostBattleRecordCar + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar=} [properties] Properties to set + */ + function GhostBattleRecordCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleRecordCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @instance + */ + GhostBattleRecordCar.prototype.car = null; + + /** + * GhostBattleRecordCar result. + * @member {number} result + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @instance + */ + GhostBattleRecordCar.prototype.result = 0; + + /** + * Creates a new GhostBattleRecordCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar instance + */ + GhostBattleRecordCar.create = function create(properties) { + return new GhostBattleRecordCar(properties); + }; + + /** + * Encodes the specified GhostBattleRecordCar message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} message GhostBattleRecordCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecordCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.result); + return writer; + }; + + /** + * Encodes the specified GhostBattleRecordCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} message GhostBattleRecordCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecordCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecordCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.result = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecordCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleRecordCar message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleRecordCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.result)) + return "result: integer expected"; + return null; + }; + + /** + * Creates a GhostBattleRecordCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar + */ + GhostBattleRecordCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.result != null) + message.result = object.result | 0; + return message; + }; + + /** + * Creates a plain object from a GhostBattleRecordCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} message GhostBattleRecordCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleRecordCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.result = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + return object; + }; + + /** + * Converts this GhostBattleRecordCar to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @instance + * @returns {Object.} JSON object + */ + GhostBattleRecordCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleRecordCar + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleRecordCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar"; + }; + + return GhostBattleRecordCar; + })(); + + return GhostBattleRecord; + })(); + + return LoadGameHistoryResponse; + })(); + + protobuf.UpdateCarRequest = (function() { + + /** + * Properties of an UpdateCarRequest. + * @memberof wm.protobuf + * @interface IUpdateCarRequest + * @property {number} carId UpdateCarRequest carId + * @property {wm.protobuf.ICar|null} [car] UpdateCarRequest car + * @property {Array.|null} [earnedItems] UpdateCarRequest earnedItems + * @property {wm.protobuf.ICarSetting|null} [setting] UpdateCarRequest setting + * @property {boolean|null} [toBeDeleted] UpdateCarRequest toBeDeleted + * @property {boolean|null} [auraMotifAutoChange] UpdateCarRequest auraMotifAutoChange + * @property {number|null} [rgStamp] UpdateCarRequest rgStamp + * @property {number} timestamp UpdateCarRequest timestamp + */ + + /** + * Constructs a new UpdateCarRequest. + * @memberof wm.protobuf + * @classdesc Represents an UpdateCarRequest. + * @implements IUpdateCarRequest + * @constructor + * @param {wm.protobuf.IUpdateCarRequest=} [properties] Properties to set + */ + function UpdateCarRequest(properties) { + this.earnedItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCarRequest carId. + * @member {number} carId + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.carId = 0; + + /** + * UpdateCarRequest car. + * @member {wm.protobuf.ICar|null|undefined} car + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.car = null; + + /** + * UpdateCarRequest earnedItems. + * @member {Array.} earnedItems + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.earnedItems = $util.emptyArray; + + /** + * UpdateCarRequest setting. + * @member {wm.protobuf.ICarSetting|null|undefined} setting + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.setting = null; + + /** + * UpdateCarRequest toBeDeleted. + * @member {boolean} toBeDeleted + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.toBeDeleted = false; + + /** + * UpdateCarRequest auraMotifAutoChange. + * @member {boolean} auraMotifAutoChange + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.auraMotifAutoChange = false; + + /** + * UpdateCarRequest rgStamp. + * @member {number} rgStamp + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.rgStamp = 0; + + /** + * UpdateCarRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.timestamp = 0; + + /** + * Creates a new UpdateCarRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.IUpdateCarRequest=} [properties] Properties to set + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest instance + */ + UpdateCarRequest.create = function create(properties) { + return new UpdateCarRequest(properties); + }; + + /** + * Encodes the specified UpdateCarRequest message. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.IUpdateCarRequest} message UpdateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.car != null && Object.hasOwnProperty.call(message, "car")) + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.earnedItems != null && message.earnedItems.length) + for (let i = 0; i < message.earnedItems.length; ++i) + $root.wm.protobuf.CarItem.encode(message.earnedItems[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.setting != null && Object.hasOwnProperty.call(message, "setting")) + $root.wm.protobuf.CarSetting.encode(message.setting, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.toBeDeleted != null && Object.hasOwnProperty.call(message, "toBeDeleted")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.toBeDeleted); + if (message.auraMotifAutoChange != null && Object.hasOwnProperty.call(message, "auraMotifAutoChange")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.auraMotifAutoChange); + if (message.rgStamp != null && Object.hasOwnProperty.call(message, "rgStamp")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.rgStamp); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified UpdateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.IUpdateCarRequest} message UpdateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateCarRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.earnedItems && message.earnedItems.length)) + message.earnedItems = []; + message.earnedItems.push($root.wm.protobuf.CarItem.decode(reader, reader.uint32())); + break; + } + case 5: { + message.setting = $root.wm.protobuf.CarSetting.decode(reader, reader.uint32()); + break; + } + case 9: { + message.toBeDeleted = reader.bool(); + break; + } + case 10: { + message.auraMotifAutoChange = reader.bool(); + break; + } + case 12: { + message.rgStamp = reader.uint32(); + break; + } + case 13: { + message.timestamp = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCarRequest message. + * @function verify + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCarRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.car != null && message.hasOwnProperty("car")) { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.earnedItems != null && message.hasOwnProperty("earnedItems")) { + if (!Array.isArray(message.earnedItems)) + return "earnedItems: array expected"; + for (let i = 0; i < message.earnedItems.length; ++i) { + let error = $root.wm.protobuf.CarItem.verify(message.earnedItems[i]); + if (error) + return "earnedItems." + error; + } + } + if (message.setting != null && message.hasOwnProperty("setting")) { + let error = $root.wm.protobuf.CarSetting.verify(message.setting); + if (error) + return "setting." + error; + } + if (message.toBeDeleted != null && message.hasOwnProperty("toBeDeleted")) + if (typeof message.toBeDeleted !== "boolean") + return "toBeDeleted: boolean expected"; + if (message.auraMotifAutoChange != null && message.hasOwnProperty("auraMotifAutoChange")) + if (typeof message.auraMotifAutoChange !== "boolean") + return "auraMotifAutoChange: boolean expected"; + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + if (!$util.isInteger(message.rgStamp)) + return "rgStamp: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + return null; + }; + + /** + * Creates an UpdateCarRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest + */ + UpdateCarRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateCarRequest) + return object; + let message = new $root.wm.protobuf.UpdateCarRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.UpdateCarRequest.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.earnedItems) { + if (!Array.isArray(object.earnedItems)) + throw TypeError(".wm.protobuf.UpdateCarRequest.earnedItems: array expected"); + message.earnedItems = []; + for (let i = 0; i < object.earnedItems.length; ++i) { + if (typeof object.earnedItems[i] !== "object") + throw TypeError(".wm.protobuf.UpdateCarRequest.earnedItems: object expected"); + message.earnedItems[i] = $root.wm.protobuf.CarItem.fromObject(object.earnedItems[i]); + } + } + if (object.setting != null) { + if (typeof object.setting !== "object") + throw TypeError(".wm.protobuf.UpdateCarRequest.setting: object expected"); + message.setting = $root.wm.protobuf.CarSetting.fromObject(object.setting); + } + if (object.toBeDeleted != null) + message.toBeDeleted = Boolean(object.toBeDeleted); + if (object.auraMotifAutoChange != null) + message.auraMotifAutoChange = Boolean(object.auraMotifAutoChange); + if (object.rgStamp != null) + message.rgStamp = object.rgStamp >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + return message; + }; + + /** + * Creates a plain object from an UpdateCarRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.UpdateCarRequest} message UpdateCarRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCarRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.earnedItems = []; + if (options.defaults) { + object.carId = 0; + object.car = null; + object.setting = null; + object.toBeDeleted = false; + object.auraMotifAutoChange = false; + object.rgStamp = 0; + object.timestamp = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.earnedItems && message.earnedItems.length) { + object.earnedItems = []; + for (let j = 0; j < message.earnedItems.length; ++j) + object.earnedItems[j] = $root.wm.protobuf.CarItem.toObject(message.earnedItems[j], options); + } + if (message.setting != null && message.hasOwnProperty("setting")) + object.setting = $root.wm.protobuf.CarSetting.toObject(message.setting, options); + if (message.toBeDeleted != null && message.hasOwnProperty("toBeDeleted")) + object.toBeDeleted = message.toBeDeleted; + if (message.auraMotifAutoChange != null && message.hasOwnProperty("auraMotifAutoChange")) + object.auraMotifAutoChange = message.auraMotifAutoChange; + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + object.rgStamp = message.rgStamp; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this UpdateCarRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateCarRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCarRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCarRequest + * @function getTypeUrl + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCarRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateCarRequest"; + }; + + return UpdateCarRequest; + })(); + + protobuf.UpdateCarResponse = (function() { + + /** + * Properties of an UpdateCarResponse. + * @memberof wm.protobuf + * @interface IUpdateCarResponse + * @property {wm.protobuf.ErrorCode} error UpdateCarResponse error + */ + + /** + * Constructs a new UpdateCarResponse. + * @memberof wm.protobuf + * @classdesc Represents an UpdateCarResponse. + * @implements IUpdateCarResponse + * @constructor + * @param {wm.protobuf.IUpdateCarResponse=} [properties] Properties to set + */ + function UpdateCarResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCarResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.UpdateCarResponse + * @instance + */ + UpdateCarResponse.prototype.error = 0; + + /** + * Creates a new UpdateCarResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.IUpdateCarResponse=} [properties] Properties to set + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse instance + */ + UpdateCarResponse.create = function create(properties) { + return new UpdateCarResponse(properties); + }; + + /** + * Encodes the specified UpdateCarResponse message. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.IUpdateCarResponse} message UpdateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified UpdateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.IUpdateCarResponse} message UpdateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateCarResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCarResponse message. + * @function verify + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCarResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates an UpdateCarResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse + */ + UpdateCarResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateCarResponse) + return object; + let message = new $root.wm.protobuf.UpdateCarResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from an UpdateCarResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.UpdateCarResponse} message UpdateCarResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCarResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this UpdateCarResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateCarResponse + * @instance + * @returns {Object.} JSON object + */ + UpdateCarResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCarResponse + * @function getTypeUrl + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCarResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateCarResponse"; + }; + + return UpdateCarResponse; + })(); + + protobuf.SaveGameResultRequest = (function() { + + /** + * Properties of a SaveGameResultRequest. + * @memberof wm.protobuf + * @interface ISaveGameResultRequest + * @property {number} carId SaveGameResultRequest carId + * @property {wm.protobuf.GameMode} gameMode SaveGameResultRequest gameMode + * @property {number} playedAt SaveGameResultRequest playedAt + * @property {number} playCount SaveGameResultRequest playCount + * @property {boolean} retired SaveGameResultRequest retired + * @property {boolean} timeup SaveGameResultRequest timeup + * @property {wm.protobuf.ICar|null} [car] SaveGameResultRequest car + * @property {wm.protobuf.ICarSetting|null} [setting] SaveGameResultRequest setting + * @property {number|null} [odometer] SaveGameResultRequest odometer + * @property {boolean|null} [earnedCustomColor] SaveGameResultRequest earnedCustomColor + * @property {Array.|null} [confirmedTutorials] SaveGameResultRequest confirmedTutorials + * @property {Array.|null} [earnedItems] SaveGameResultRequest earnedItems + * @property {Array.|null} [earnedUserItems] SaveGameResultRequest earnedUserItems + * @property {Array.|null} [preservedTitles] SaveGameResultRequest preservedTitles + * @property {Array.|null} [neighborCars] SaveGameResultRequest neighborCars + * @property {wm.protobuf.SaveGameResultRequest.IStoryResult|null} [stResult] SaveGameResultRequest stResult + * @property {wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null} [taResult] SaveGameResultRequest taResult + * @property {wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null} [vsResult] SaveGameResultRequest vsResult + * @property {wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null} [rgResult] SaveGameResultRequest rgResult + */ + + /** + * Constructs a new SaveGameResultRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveGameResultRequest. + * @implements ISaveGameResultRequest + * @constructor + * @param {wm.protobuf.ISaveGameResultRequest=} [properties] Properties to set + */ + function SaveGameResultRequest(properties) { + this.confirmedTutorials = []; + this.earnedItems = []; + this.earnedUserItems = []; + this.preservedTitles = []; + this.neighborCars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveGameResultRequest carId. + * @member {number} carId + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.carId = 0; + + /** + * SaveGameResultRequest gameMode. + * @member {wm.protobuf.GameMode} gameMode + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.gameMode = 1; + + /** + * SaveGameResultRequest playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.playedAt = 0; + + /** + * SaveGameResultRequest playCount. + * @member {number} playCount + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.playCount = 0; + + /** + * SaveGameResultRequest retired. + * @member {boolean} retired + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.retired = false; + + /** + * SaveGameResultRequest timeup. + * @member {boolean} timeup + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.timeup = false; + + /** + * SaveGameResultRequest car. + * @member {wm.protobuf.ICar|null|undefined} car + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.car = null; + + /** + * SaveGameResultRequest setting. + * @member {wm.protobuf.ICarSetting|null|undefined} setting + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.setting = null; + + /** + * SaveGameResultRequest odometer. + * @member {number} odometer + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.odometer = 0; + + /** + * SaveGameResultRequest earnedCustomColor. + * @member {boolean} earnedCustomColor + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.earnedCustomColor = false; + + /** + * SaveGameResultRequest confirmedTutorials. + * @member {Array.} confirmedTutorials + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.confirmedTutorials = $util.emptyArray; + + /** + * SaveGameResultRequest earnedItems. + * @member {Array.} earnedItems + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.earnedItems = $util.emptyArray; + + /** + * SaveGameResultRequest earnedUserItems. + * @member {Array.} earnedUserItems + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.earnedUserItems = $util.emptyArray; + + /** + * SaveGameResultRequest preservedTitles. + * @member {Array.} preservedTitles + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.preservedTitles = $util.emptyArray; + + /** + * SaveGameResultRequest neighborCars. + * @member {Array.} neighborCars + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.neighborCars = $util.emptyArray; + + /** + * SaveGameResultRequest stResult. + * @member {wm.protobuf.SaveGameResultRequest.IStoryResult|null|undefined} stResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.stResult = null; + + /** + * SaveGameResultRequest taResult. + * @member {wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null|undefined} taResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.taResult = null; + + /** + * SaveGameResultRequest vsResult. + * @member {wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null|undefined} vsResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.vsResult = null; + + /** + * SaveGameResultRequest rgResult. + * @member {wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null|undefined} rgResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.rgResult = null; + + /** + * Creates a new SaveGameResultRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.ISaveGameResultRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest instance + */ + SaveGameResultRequest.create = function create(properties) { + return new SaveGameResultRequest(properties); + }; + + /** + * Encodes the specified SaveGameResultRequest message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.ISaveGameResultRequest} message SaveGameResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gameMode); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.playedAt); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.playCount); + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.retired); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.timeup); + if (message.car != null && Object.hasOwnProperty.call(message, "car")) + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.setting != null && Object.hasOwnProperty.call(message, "setting")) + $root.wm.protobuf.CarSetting.encode(message.setting, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.odometer != null && Object.hasOwnProperty.call(message, "odometer")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.odometer); + if (message.earnedCustomColor != null && Object.hasOwnProperty.call(message, "earnedCustomColor")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.earnedCustomColor); + if (message.confirmedTutorials != null && message.confirmedTutorials.length) + for (let i = 0; i < message.confirmedTutorials.length; ++i) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.confirmedTutorials[i]); + if (message.earnedItems != null && message.earnedItems.length) + for (let i = 0; i < message.earnedItems.length; ++i) + $root.wm.protobuf.CarItem.encode(message.earnedItems[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.earnedUserItems != null && message.earnedUserItems.length) + for (let i = 0; i < message.earnedUserItems.length; ++i) + $root.wm.protobuf.UserItem.encode(message.earnedUserItems[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.preservedTitles != null && message.preservedTitles.length) + for (let i = 0; i < message.preservedTitles.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.preservedTitles[i]); + if (message.neighborCars != null && message.neighborCars.length) + for (let i = 0; i < message.neighborCars.length; ++i) + writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.neighborCars[i]); + if (message.stResult != null && Object.hasOwnProperty.call(message, "stResult")) + $root.wm.protobuf.SaveGameResultRequest.StoryResult.encode(message.stResult, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.taResult != null && Object.hasOwnProperty.call(message, "taResult")) + $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.encode(message.taResult, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.vsResult != null && Object.hasOwnProperty.call(message, "vsResult")) + $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.encode(message.vsResult, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.rgResult != null && Object.hasOwnProperty.call(message, "rgResult")) + $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.encode(message.rgResult, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveGameResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.ISaveGameResultRequest} message SaveGameResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.gameMode = reader.int32(); + break; + } + case 3: { + message.playedAt = reader.uint32(); + break; + } + case 4: { + message.playCount = reader.uint32(); + break; + } + case 5: { + message.retired = reader.bool(); + break; + } + case 6: { + message.timeup = reader.bool(); + break; + } + case 7: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 8: { + message.setting = $root.wm.protobuf.CarSetting.decode(reader, reader.uint32()); + break; + } + case 9: { + message.odometer = reader.uint32(); + break; + } + case 11: { + message.earnedCustomColor = reader.bool(); + break; + } + case 12: { + if (!(message.confirmedTutorials && message.confirmedTutorials.length)) + message.confirmedTutorials = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.confirmedTutorials.push(reader.int32()); + } else + message.confirmedTutorials.push(reader.int32()); + break; + } + case 13: { + if (!(message.earnedItems && message.earnedItems.length)) + message.earnedItems = []; + message.earnedItems.push($root.wm.protobuf.CarItem.decode(reader, reader.uint32())); + break; + } + case 14: { + if (!(message.earnedUserItems && message.earnedUserItems.length)) + message.earnedUserItems = []; + message.earnedUserItems.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + case 15: { + if (!(message.preservedTitles && message.preservedTitles.length)) + message.preservedTitles = []; + message.preservedTitles.push(reader.string()); + break; + } + case 21: { + if (!(message.neighborCars && message.neighborCars.length)) + message.neighborCars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.neighborCars.push(reader.uint32()); + } else + message.neighborCars.push(reader.uint32()); + break; + } + case 22: { + message.stResult = $root.wm.protobuf.SaveGameResultRequest.StoryResult.decode(reader, reader.uint32()); + break; + } + case 23: { + message.taResult = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.decode(reader, reader.uint32()); + break; + } + case 24: { + message.vsResult = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.decode(reader, reader.uint32()); + break; + } + case 25: { + message.rgResult = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("gameMode")) + throw $util.ProtocolError("missing required 'gameMode'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + if (!message.hasOwnProperty("playCount")) + throw $util.ProtocolError("missing required 'playCount'", { instance: message }); + if (!message.hasOwnProperty("retired")) + throw $util.ProtocolError("missing required 'retired'", { instance: message }); + if (!message.hasOwnProperty("timeup")) + throw $util.ProtocolError("missing required 'timeup'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveGameResultRequest message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveGameResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + switch (message.gameMode) { + default: + return "gameMode: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (!$util.isInteger(message.playCount)) + return "playCount: integer expected"; + if (typeof message.retired !== "boolean") + return "retired: boolean expected"; + if (typeof message.timeup !== "boolean") + return "timeup: boolean expected"; + if (message.car != null && message.hasOwnProperty("car")) { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.setting != null && message.hasOwnProperty("setting")) { + let error = $root.wm.protobuf.CarSetting.verify(message.setting); + if (error) + return "setting." + error; + } + if (message.odometer != null && message.hasOwnProperty("odometer")) + if (!$util.isInteger(message.odometer)) + return "odometer: integer expected"; + if (message.earnedCustomColor != null && message.hasOwnProperty("earnedCustomColor")) + if (typeof message.earnedCustomColor !== "boolean") + return "earnedCustomColor: boolean expected"; + if (message.confirmedTutorials != null && message.hasOwnProperty("confirmedTutorials")) { + if (!Array.isArray(message.confirmedTutorials)) + return "confirmedTutorials: array expected"; + for (let i = 0; i < message.confirmedTutorials.length; ++i) + switch (message.confirmedTutorials[i]) { + default: + return "confirmedTutorials: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + break; + } + } + if (message.earnedItems != null && message.hasOwnProperty("earnedItems")) { + if (!Array.isArray(message.earnedItems)) + return "earnedItems: array expected"; + for (let i = 0; i < message.earnedItems.length; ++i) { + let error = $root.wm.protobuf.CarItem.verify(message.earnedItems[i]); + if (error) + return "earnedItems." + error; + } + } + if (message.earnedUserItems != null && message.hasOwnProperty("earnedUserItems")) { + if (!Array.isArray(message.earnedUserItems)) + return "earnedUserItems: array expected"; + for (let i = 0; i < message.earnedUserItems.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.earnedUserItems[i]); + if (error) + return "earnedUserItems." + error; + } + } + if (message.preservedTitles != null && message.hasOwnProperty("preservedTitles")) { + if (!Array.isArray(message.preservedTitles)) + return "preservedTitles: array expected"; + for (let i = 0; i < message.preservedTitles.length; ++i) + if (!$util.isString(message.preservedTitles[i])) + return "preservedTitles: string[] expected"; + } + if (message.neighborCars != null && message.hasOwnProperty("neighborCars")) { + if (!Array.isArray(message.neighborCars)) + return "neighborCars: array expected"; + for (let i = 0; i < message.neighborCars.length; ++i) + if (!$util.isInteger(message.neighborCars[i])) + return "neighborCars: integer[] expected"; + } + if (message.stResult != null && message.hasOwnProperty("stResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.StoryResult.verify(message.stResult); + if (error) + return "stResult." + error; + } + if (message.taResult != null && message.hasOwnProperty("taResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify(message.taResult); + if (error) + return "taResult." + error; + } + if (message.vsResult != null && message.hasOwnProperty("vsResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify(message.vsResult); + if (error) + return "vsResult." + error; + } + if (message.rgResult != null && message.hasOwnProperty("rgResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify(message.rgResult); + if (error) + return "rgResult." + error; + } + return null; + }; + + /** + * Creates a SaveGameResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest + */ + SaveGameResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + switch (object.gameMode) { + case "MODE_STORY": + case 1: + message.gameMode = 1; + break; + case "MODE_TIME_ATTACK": + case 2: + message.gameMode = 2; + break; + case "MODE_VS_BATTLE": + case 3: + message.gameMode = 3; + break; + case "MODE_GHOST_BATTLE": + case 4: + message.gameMode = 4; + break; + case "MODE_EVENT": + case 5: + message.gameMode = 5; + break; + } + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.playCount != null) + message.playCount = object.playCount >>> 0; + if (object.retired != null) + message.retired = Boolean(object.retired); + if (object.timeup != null) + message.timeup = Boolean(object.timeup); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.setting != null) { + if (typeof object.setting !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.setting: object expected"); + message.setting = $root.wm.protobuf.CarSetting.fromObject(object.setting); + } + if (object.odometer != null) + message.odometer = object.odometer >>> 0; + if (object.earnedCustomColor != null) + message.earnedCustomColor = Boolean(object.earnedCustomColor); + if (object.confirmedTutorials) { + if (!Array.isArray(object.confirmedTutorials)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.confirmedTutorials: array expected"); + message.confirmedTutorials = []; + for (let i = 0; i < object.confirmedTutorials.length; ++i) + switch (object.confirmedTutorials[i]) { + default: + case "TUTORIAL_ID_STORY": + case 0: + message.confirmedTutorials[i] = 0; + break; + case "TUTORIAL_ID_TIME_ATTACK": + case 1: + message.confirmedTutorials[i] = 1; + break; + case "TUTORIAL_ID_GHOST": + case 2: + message.confirmedTutorials[i] = 2; + break; + case "TUTORIAL_ID_GHOST_CHALLENGE": + case 3: + message.confirmedTutorials[i] = 3; + break; + case "TUTORIAL_ID_GHOST_LEVEL": + case 4: + message.confirmedTutorials[i] = 4; + break; + case "TUTORIAL_ID_UNUSED_5": + case 5: + message.confirmedTutorials[i] = 5; + break; + case "TUTORIAL_ID_GHOST_SEARCH": + case 6: + message.confirmedTutorials[i] = 6; + break; + case "TUTORIAL_ID_GHOST_COMPETITION": + case 7: + message.confirmedTutorials[i] = 7; + break; + case "TUTORIAL_ID_HP600_CARD": + case 8: + message.confirmedTutorials[i] = 8; + break; + case "TUTORIAL_ID_UNUSED_9": + case 9: + message.confirmedTutorials[i] = 9; + break; + case "TUTORIAL_ID_COMPETITION_QUALIFIED": + case 10: + message.confirmedTutorials[i] = 10; + break; + case "TUTORIAL_ID_COMPETITION_TERMINAL": + case 11: + message.confirmedTutorials[i] = 11; + break; + case "TUTORIAL_ID_COMPETITION_NOTICE": + case 12: + message.confirmedTutorials[i] = 12; + break; + case "TUTORIAL_ID_COMPETITION_FINISHED": + case 13: + message.confirmedTutorials[i] = 13; + break; + case "TUTORIAL_ID_UNUSED_14": + case 14: + message.confirmedTutorials[i] = 14; + break; + case "TUTORIAL_ID_UNUSED_15": + case 15: + message.confirmedTutorials[i] = 15; + break; + case "TUTORIAL_ID_UNUSED_16": + case 16: + message.confirmedTutorials[i] = 16; + break; + case "TUTORIAL_ID_UNUSED_17": + case 17: + message.confirmedTutorials[i] = 17; + break; + case "TUTORIAL_ID_UNUSED_18": + case 18: + message.confirmedTutorials[i] = 18; + break; + case "TUTORIAL_ID_UNUSED_19": + case 19: + message.confirmedTutorials[i] = 19; + break; + case "TUTORIAL_ID_GHOST_STAMP": + case 20: + message.confirmedTutorials[i] = 20; + break; + case "TUTORIAL_ID_GHOST_STAMP_DECLINED": + case 21: + message.confirmedTutorials[i] = 21; + break; + case "TUTORIAL_ID_GHOST_STAMP_FRIENDS": + case 22: + message.confirmedTutorials[i] = 22; + break; + case "TUTORIAL_ID_TERMINAL_SCRATCH": + case 23: + message.confirmedTutorials[i] = 23; + break; + case "TUTORIAL_ID_TURN_SCRATCH_SHEET": + case 24: + message.confirmedTutorials[i] = 24; + break; + case "TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN": + case 25: + message.confirmedTutorials[i] = 25; + break; + case "TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE": + case 26: + message.confirmedTutorials[i] = 26; + break; + case "TUTORIAL_ID_VS_CONTINUE_TICKET": + case 27: + message.confirmedTutorials[i] = 27; + break; + case "TUTORIAL_ID_UNUSED_28": + case 28: + message.confirmedTutorials[i] = 28; + break; + case "TUTORIAL_ID_UNUSED_29": + case 29: + message.confirmedTutorials[i] = 29; + break; + case "TUTORIAL_ID_UNUSED_30": + case 30: + message.confirmedTutorials[i] = 30; + break; + case "TUTORIAL_ID_DRESS_UP": + case 31: + message.confirmedTutorials[i] = 31; + break; + case "TUTORIAL_ID_MULTI_GHOST": + case 32: + message.confirmedTutorials[i] = 32; + break; + case "TUTORIAL_ID_STORY_NEW_FEATURE": + case 33: + message.confirmedTutorials[i] = 33; + break; + case "TUTORIAL_ID_GHOST_NEW_FEATURE": + case 34: + message.confirmedTutorials[i] = 34; + break; + case "TUTORIAL_ID_GHOST_REGION_MAP": + case 35: + message.confirmedTutorials[i] = 35; + break; + } + } + if (object.earnedItems) { + if (!Array.isArray(object.earnedItems)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedItems: array expected"); + message.earnedItems = []; + for (let i = 0; i < object.earnedItems.length; ++i) { + if (typeof object.earnedItems[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedItems: object expected"); + message.earnedItems[i] = $root.wm.protobuf.CarItem.fromObject(object.earnedItems[i]); + } + } + if (object.earnedUserItems) { + if (!Array.isArray(object.earnedUserItems)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedUserItems: array expected"); + message.earnedUserItems = []; + for (let i = 0; i < object.earnedUserItems.length; ++i) { + if (typeof object.earnedUserItems[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedUserItems: object expected"); + message.earnedUserItems[i] = $root.wm.protobuf.UserItem.fromObject(object.earnedUserItems[i]); + } + } + if (object.preservedTitles) { + if (!Array.isArray(object.preservedTitles)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.preservedTitles: array expected"); + message.preservedTitles = []; + for (let i = 0; i < object.preservedTitles.length; ++i) + message.preservedTitles[i] = String(object.preservedTitles[i]); + } + if (object.neighborCars) { + if (!Array.isArray(object.neighborCars)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.neighborCars: array expected"); + message.neighborCars = []; + for (let i = 0; i < object.neighborCars.length; ++i) + message.neighborCars[i] = object.neighborCars[i] >>> 0; + } + if (object.stResult != null) { + if (typeof object.stResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.stResult: object expected"); + message.stResult = $root.wm.protobuf.SaveGameResultRequest.StoryResult.fromObject(object.stResult); + } + if (object.taResult != null) { + if (typeof object.taResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.taResult: object expected"); + message.taResult = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.fromObject(object.taResult); + } + if (object.vsResult != null) { + if (typeof object.vsResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.vsResult: object expected"); + message.vsResult = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.fromObject(object.vsResult); + } + if (object.rgResult != null) { + if (typeof object.rgResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.rgResult: object expected"); + message.rgResult = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.fromObject(object.rgResult); + } + return message; + }; + + /** + * Creates a plain object from a SaveGameResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.SaveGameResultRequest} message SaveGameResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveGameResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.confirmedTutorials = []; + object.earnedItems = []; + object.earnedUserItems = []; + object.preservedTitles = []; + object.neighborCars = []; + } + if (options.defaults) { + object.carId = 0; + object.gameMode = options.enums === String ? "MODE_STORY" : 1; + object.playedAt = 0; + object.playCount = 0; + object.retired = false; + object.timeup = false; + object.car = null; + object.setting = null; + object.odometer = 0; + object.earnedCustomColor = false; + object.stResult = null; + object.taResult = null; + object.vsResult = null; + object.rgResult = null; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.gameMode != null && message.hasOwnProperty("gameMode")) + object.gameMode = options.enums === String ? $root.wm.protobuf.GameMode[message.gameMode] : message.gameMode; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.playCount != null && message.hasOwnProperty("playCount")) + object.playCount = message.playCount; + if (message.retired != null && message.hasOwnProperty("retired")) + object.retired = message.retired; + if (message.timeup != null && message.hasOwnProperty("timeup")) + object.timeup = message.timeup; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.setting != null && message.hasOwnProperty("setting")) + object.setting = $root.wm.protobuf.CarSetting.toObject(message.setting, options); + if (message.odometer != null && message.hasOwnProperty("odometer")) + object.odometer = message.odometer; + if (message.earnedCustomColor != null && message.hasOwnProperty("earnedCustomColor")) + object.earnedCustomColor = message.earnedCustomColor; + if (message.confirmedTutorials && message.confirmedTutorials.length) { + object.confirmedTutorials = []; + for (let j = 0; j < message.confirmedTutorials.length; ++j) + object.confirmedTutorials[j] = options.enums === String ? $root.wm.protobuf.TutorialType[message.confirmedTutorials[j]] : message.confirmedTutorials[j]; + } + if (message.earnedItems && message.earnedItems.length) { + object.earnedItems = []; + for (let j = 0; j < message.earnedItems.length; ++j) + object.earnedItems[j] = $root.wm.protobuf.CarItem.toObject(message.earnedItems[j], options); + } + if (message.earnedUserItems && message.earnedUserItems.length) { + object.earnedUserItems = []; + for (let j = 0; j < message.earnedUserItems.length; ++j) + object.earnedUserItems[j] = $root.wm.protobuf.UserItem.toObject(message.earnedUserItems[j], options); + } + if (message.preservedTitles && message.preservedTitles.length) { + object.preservedTitles = []; + for (let j = 0; j < message.preservedTitles.length; ++j) + object.preservedTitles[j] = message.preservedTitles[j]; + } + if (message.neighborCars && message.neighborCars.length) { + object.neighborCars = []; + for (let j = 0; j < message.neighborCars.length; ++j) + object.neighborCars[j] = message.neighborCars[j]; + } + if (message.stResult != null && message.hasOwnProperty("stResult")) + object.stResult = $root.wm.protobuf.SaveGameResultRequest.StoryResult.toObject(message.stResult, options); + if (message.taResult != null && message.hasOwnProperty("taResult")) + object.taResult = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.toObject(message.taResult, options); + if (message.vsResult != null && message.hasOwnProperty("vsResult")) + object.vsResult = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.toObject(message.vsResult, options); + if (message.rgResult != null && message.hasOwnProperty("rgResult")) + object.rgResult = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.toObject(message.rgResult, options); + return object; + }; + + /** + * Converts this SaveGameResultRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + * @returns {Object.} JSON object + */ + SaveGameResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveGameResultRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveGameResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest"; + }; + + SaveGameResultRequest.StoryResult = (function() { + + /** + * Properties of a StoryResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface IStoryResult + * @property {number} stPlayCount StoryResult stPlayCount + * @property {number} stPlayedStory StoryResult stPlayedStory + * @property {number|null} [tuningPoint] StoryResult tuningPoint + * @property {number|null} [stClearBits] StoryResult stClearBits + * @property {number|null} [stClearDivCount] StoryResult stClearDivCount + * @property {number|null} [stClearCount] StoryResult stClearCount + * @property {number|Long|null} [stLoseBits] StoryResult stLoseBits + * @property {number|null} [stConsecutiveWins] StoryResult stConsecutiveWins + * @property {boolean|null} [stCompleted_100Episodes] StoryResult stCompleted_100Episodes + * @property {boolean|null} [isInsuranceUsed] StoryResult isInsuranceUsed + */ + + /** + * Constructs a new StoryResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a StoryResult. + * @implements IStoryResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult=} [properties] Properties to set + */ + function StoryResult(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoryResult stPlayCount. + * @member {number} stPlayCount + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stPlayCount = 0; + + /** + * StoryResult stPlayedStory. + * @member {number} stPlayedStory + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stPlayedStory = 0; + + /** + * StoryResult tuningPoint. + * @member {number} tuningPoint + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.tuningPoint = 0; + + /** + * StoryResult stClearBits. + * @member {number} stClearBits + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stClearBits = 0; + + /** + * StoryResult stClearDivCount. + * @member {number} stClearDivCount + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stClearDivCount = 0; + + /** + * StoryResult stClearCount. + * @member {number} stClearCount + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stClearCount = 0; + + /** + * StoryResult stLoseBits. + * @member {number|Long} stLoseBits + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stLoseBits = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * StoryResult stConsecutiveWins. + * @member {number} stConsecutiveWins + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stConsecutiveWins = 0; + + /** + * StoryResult stCompleted_100Episodes. + * @member {boolean} stCompleted_100Episodes + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stCompleted_100Episodes = false; + + /** + * StoryResult isInsuranceUsed. + * @member {boolean} isInsuranceUsed + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.isInsuranceUsed = false; + + /** + * Creates a new StoryResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult instance + */ + StoryResult.create = function create(properties) { + return new StoryResult(properties); + }; + + /** + * Encodes the specified StoryResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult} message StoryResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.stPlayCount); + if (message.tuningPoint != null && Object.hasOwnProperty.call(message, "tuningPoint")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuningPoint); + if (message.stClearBits != null && Object.hasOwnProperty.call(message, "stClearBits")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stClearBits); + if (message.stClearDivCount != null && Object.hasOwnProperty.call(message, "stClearDivCount")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stClearDivCount); + if (message.stClearCount != null && Object.hasOwnProperty.call(message, "stClearCount")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.stClearCount); + if (message.stLoseBits != null && Object.hasOwnProperty.call(message, "stLoseBits")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.stLoseBits); + if (message.stConsecutiveWins != null && Object.hasOwnProperty.call(message, "stConsecutiveWins")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stConsecutiveWins); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.stPlayedStory); + if (message.stCompleted_100Episodes != null && Object.hasOwnProperty.call(message, "stCompleted_100Episodes")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.stCompleted_100Episodes); + if (message.isInsuranceUsed != null && Object.hasOwnProperty.call(message, "isInsuranceUsed")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.isInsuranceUsed); + return writer; + }; + + /** + * Encodes the specified StoryResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult} message StoryResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoryResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.StoryResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.stPlayCount = reader.uint32(); + break; + } + case 9: { + message.stPlayedStory = reader.uint32(); + break; + } + case 2: { + message.tuningPoint = reader.uint32(); + break; + } + case 3: { + message.stClearBits = reader.uint32(); + break; + } + case 4: { + message.stClearDivCount = reader.uint32(); + break; + } + case 5: { + message.stClearCount = reader.uint32(); + break; + } + case 6: { + message.stLoseBits = reader.uint64(); + break; + } + case 8: { + message.stConsecutiveWins = reader.uint32(); + break; + } + case 10: { + message.stCompleted_100Episodes = reader.bool(); + break; + } + case 11: { + message.isInsuranceUsed = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("stPlayCount")) + throw $util.ProtocolError("missing required 'stPlayCount'", { instance: message }); + if (!message.hasOwnProperty("stPlayedStory")) + throw $util.ProtocolError("missing required 'stPlayedStory'", { instance: message }); + return message; + }; + + /** + * Decodes a StoryResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoryResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoryResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.stPlayCount)) + return "stPlayCount: integer expected"; + if (!$util.isInteger(message.stPlayedStory)) + return "stPlayedStory: integer expected"; + if (message.tuningPoint != null && message.hasOwnProperty("tuningPoint")) + if (!$util.isInteger(message.tuningPoint)) + return "tuningPoint: integer expected"; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + if (!$util.isInteger(message.stClearBits)) + return "stClearBits: integer expected"; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + if (!$util.isInteger(message.stClearDivCount)) + return "stClearDivCount: integer expected"; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + if (!$util.isInteger(message.stClearCount)) + return "stClearCount: integer expected"; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (!$util.isInteger(message.stLoseBits) && !(message.stLoseBits && $util.isInteger(message.stLoseBits.low) && $util.isInteger(message.stLoseBits.high))) + return "stLoseBits: integer|Long expected"; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + if (!$util.isInteger(message.stConsecutiveWins)) + return "stConsecutiveWins: integer expected"; + if (message.stCompleted_100Episodes != null && message.hasOwnProperty("stCompleted_100Episodes")) + if (typeof message.stCompleted_100Episodes !== "boolean") + return "stCompleted_100Episodes: boolean expected"; + if (message.isInsuranceUsed != null && message.hasOwnProperty("isInsuranceUsed")) + if (typeof message.isInsuranceUsed !== "boolean") + return "isInsuranceUsed: boolean expected"; + return null; + }; + + /** + * Creates a StoryResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult + */ + StoryResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.StoryResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.StoryResult(); + if (object.stPlayCount != null) + message.stPlayCount = object.stPlayCount >>> 0; + if (object.stPlayedStory != null) + message.stPlayedStory = object.stPlayedStory >>> 0; + if (object.tuningPoint != null) + message.tuningPoint = object.tuningPoint >>> 0; + if (object.stClearBits != null) + message.stClearBits = object.stClearBits >>> 0; + if (object.stClearDivCount != null) + message.stClearDivCount = object.stClearDivCount >>> 0; + if (object.stClearCount != null) + message.stClearCount = object.stClearCount >>> 0; + if (object.stLoseBits != null) + if ($util.Long) + (message.stLoseBits = $util.Long.fromValue(object.stLoseBits)).unsigned = true; + else if (typeof object.stLoseBits === "string") + message.stLoseBits = parseInt(object.stLoseBits, 10); + else if (typeof object.stLoseBits === "number") + message.stLoseBits = object.stLoseBits; + else if (typeof object.stLoseBits === "object") + message.stLoseBits = new $util.LongBits(object.stLoseBits.low >>> 0, object.stLoseBits.high >>> 0).toNumber(true); + if (object.stConsecutiveWins != null) + message.stConsecutiveWins = object.stConsecutiveWins >>> 0; + if (object.stCompleted_100Episodes != null) + message.stCompleted_100Episodes = Boolean(object.stCompleted_100Episodes); + if (object.isInsuranceUsed != null) + message.isInsuranceUsed = Boolean(object.isInsuranceUsed); + return message; + }; + + /** + * Creates a plain object from a StoryResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.StoryResult} message StoryResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoryResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.stPlayCount = 0; + object.tuningPoint = 0; + object.stClearBits = 0; + object.stClearDivCount = 0; + object.stClearCount = 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.stLoseBits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.stLoseBits = options.longs === String ? "0" : 0; + object.stConsecutiveWins = 0; + object.stPlayedStory = 0; + object.stCompleted_100Episodes = false; + object.isInsuranceUsed = false; + } + if (message.stPlayCount != null && message.hasOwnProperty("stPlayCount")) + object.stPlayCount = message.stPlayCount; + if (message.tuningPoint != null && message.hasOwnProperty("tuningPoint")) + object.tuningPoint = message.tuningPoint; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + object.stClearBits = message.stClearBits; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + object.stClearDivCount = message.stClearDivCount; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + object.stClearCount = message.stClearCount; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (typeof message.stLoseBits === "number") + object.stLoseBits = options.longs === String ? String(message.stLoseBits) : message.stLoseBits; + else + object.stLoseBits = options.longs === String ? $util.Long.prototype.toString.call(message.stLoseBits) : options.longs === Number ? new $util.LongBits(message.stLoseBits.low >>> 0, message.stLoseBits.high >>> 0).toNumber(true) : message.stLoseBits; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + object.stConsecutiveWins = message.stConsecutiveWins; + if (message.stPlayedStory != null && message.hasOwnProperty("stPlayedStory")) + object.stPlayedStory = message.stPlayedStory; + if (message.stCompleted_100Episodes != null && message.hasOwnProperty("stCompleted_100Episodes")) + object.stCompleted_100Episodes = message.stCompleted_100Episodes; + if (message.isInsuranceUsed != null && message.hasOwnProperty("isInsuranceUsed")) + object.isInsuranceUsed = message.isInsuranceUsed; + return object; + }; + + /** + * Converts this StoryResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + * @returns {Object.} JSON object + */ + StoryResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoryResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.StoryResult"; + }; + + return StoryResult; + })(); + + SaveGameResultRequest.TimeAttackResult = (function() { + + /** + * Properties of a TimeAttackResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface ITimeAttackResult + * @property {number} time TimeAttackResult time + * @property {number} course TimeAttackResult course + * @property {boolean} isMorning TimeAttackResult isMorning + * @property {number} section_1Time TimeAttackResult section_1Time + * @property {number} section_2Time TimeAttackResult section_2Time + * @property {number} section_3Time TimeAttackResult section_3Time + * @property {number} section_4Time TimeAttackResult section_4Time + * @property {number|null} [section_5Time] TimeAttackResult section_5Time + * @property {number|null} [section_6Time] TimeAttackResult section_6Time + * @property {number|null} [section_7Time] TimeAttackResult section_7Time + * @property {number|null} [wholeRank] TimeAttackResult wholeRank + * @property {number|null} [modelRank] TimeAttackResult modelRank + */ + + /** + * Constructs a new TimeAttackResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a TimeAttackResult. + * @implements ITimeAttackResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult=} [properties] Properties to set + */ + function TimeAttackResult(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeAttackResult time. + * @member {number} time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.time = 0; + + /** + * TimeAttackResult course. + * @member {number} course + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.course = 0; + + /** + * TimeAttackResult isMorning. + * @member {boolean} isMorning + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.isMorning = false; + + /** + * TimeAttackResult section_1Time. + * @member {number} section_1Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_1Time = 0; + + /** + * TimeAttackResult section_2Time. + * @member {number} section_2Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_2Time = 0; + + /** + * TimeAttackResult section_3Time. + * @member {number} section_3Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_3Time = 0; + + /** + * TimeAttackResult section_4Time. + * @member {number} section_4Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_4Time = 0; + + /** + * TimeAttackResult section_5Time. + * @member {number} section_5Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_5Time = 0; + + /** + * TimeAttackResult section_6Time. + * @member {number} section_6Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_6Time = 0; + + /** + * TimeAttackResult section_7Time. + * @member {number} section_7Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_7Time = 0; + + /** + * TimeAttackResult wholeRank. + * @member {number} wholeRank + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.wholeRank = 0; + + /** + * TimeAttackResult modelRank. + * @member {number} modelRank + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.modelRank = 0; + + /** + * Creates a new TimeAttackResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult instance + */ + TimeAttackResult.create = function create(properties) { + return new TimeAttackResult(properties); + }; + + /** + * Encodes the specified TimeAttackResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult} message TimeAttackResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.time); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.course); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.section_1Time); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.section_2Time); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.section_3Time); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.section_4Time); + if (message.section_5Time != null && Object.hasOwnProperty.call(message, "section_5Time")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.section_5Time); + if (message.section_6Time != null && Object.hasOwnProperty.call(message, "section_6Time")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.section_6Time); + if (message.section_7Time != null && Object.hasOwnProperty.call(message, "section_7Time")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.section_7Time); + if (message.wholeRank != null && Object.hasOwnProperty.call(message, "wholeRank")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.wholeRank); + if (message.modelRank != null && Object.hasOwnProperty.call(message, "modelRank")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.modelRank); + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isMorning); + return writer; + }; + + /** + * Encodes the specified TimeAttackResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult} message TimeAttackResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.time = reader.uint32(); + break; + } + case 2: { + message.course = reader.uint32(); + break; + } + case 12: { + message.isMorning = reader.bool(); + break; + } + case 3: { + message.section_1Time = reader.uint32(); + break; + } + case 4: { + message.section_2Time = reader.uint32(); + break; + } + case 5: { + message.section_3Time = reader.uint32(); + break; + } + case 6: { + message.section_4Time = reader.uint32(); + break; + } + case 7: { + message.section_5Time = reader.uint32(); + break; + } + case 8: { + message.section_6Time = reader.uint32(); + break; + } + case 9: { + message.section_7Time = reader.uint32(); + break; + } + case 10: { + message.wholeRank = reader.uint32(); + break; + } + case 11: { + message.modelRank = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("time")) + throw $util.ProtocolError("missing required 'time'", { instance: message }); + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + if (!message.hasOwnProperty("isMorning")) + throw $util.ProtocolError("missing required 'isMorning'", { instance: message }); + if (!message.hasOwnProperty("section_1Time")) + throw $util.ProtocolError("missing required 'section_1Time'", { instance: message }); + if (!message.hasOwnProperty("section_2Time")) + throw $util.ProtocolError("missing required 'section_2Time'", { instance: message }); + if (!message.hasOwnProperty("section_3Time")) + throw $util.ProtocolError("missing required 'section_3Time'", { instance: message }); + if (!message.hasOwnProperty("section_4Time")) + throw $util.ProtocolError("missing required 'section_4Time'", { instance: message }); + return message; + }; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeAttackResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeAttackResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.time)) + return "time: integer expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + if (typeof message.isMorning !== "boolean") + return "isMorning: boolean expected"; + if (!$util.isInteger(message.section_1Time)) + return "section_1Time: integer expected"; + if (!$util.isInteger(message.section_2Time)) + return "section_2Time: integer expected"; + if (!$util.isInteger(message.section_3Time)) + return "section_3Time: integer expected"; + if (!$util.isInteger(message.section_4Time)) + return "section_4Time: integer expected"; + if (message.section_5Time != null && message.hasOwnProperty("section_5Time")) + if (!$util.isInteger(message.section_5Time)) + return "section_5Time: integer expected"; + if (message.section_6Time != null && message.hasOwnProperty("section_6Time")) + if (!$util.isInteger(message.section_6Time)) + return "section_6Time: integer expected"; + if (message.section_7Time != null && message.hasOwnProperty("section_7Time")) + if (!$util.isInteger(message.section_7Time)) + return "section_7Time: integer expected"; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + if (!$util.isInteger(message.wholeRank)) + return "wholeRank: integer expected"; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + if (!$util.isInteger(message.modelRank)) + return "modelRank: integer expected"; + return null; + }; + + /** + * Creates a TimeAttackResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult + */ + TimeAttackResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult(); + if (object.time != null) + message.time = object.time >>> 0; + if (object.course != null) + message.course = object.course >>> 0; + if (object.isMorning != null) + message.isMorning = Boolean(object.isMorning); + if (object.section_1Time != null) + message.section_1Time = object.section_1Time >>> 0; + if (object.section_2Time != null) + message.section_2Time = object.section_2Time >>> 0; + if (object.section_3Time != null) + message.section_3Time = object.section_3Time >>> 0; + if (object.section_4Time != null) + message.section_4Time = object.section_4Time >>> 0; + if (object.section_5Time != null) + message.section_5Time = object.section_5Time >>> 0; + if (object.section_6Time != null) + message.section_6Time = object.section_6Time >>> 0; + if (object.section_7Time != null) + message.section_7Time = object.section_7Time >>> 0; + if (object.wholeRank != null) + message.wholeRank = object.wholeRank >>> 0; + if (object.modelRank != null) + message.modelRank = object.modelRank >>> 0; + return message; + }; + + /** + * Creates a plain object from a TimeAttackResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.TimeAttackResult} message TimeAttackResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeAttackResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.time = 0; + object.course = 0; + object.section_1Time = 0; + object.section_2Time = 0; + object.section_3Time = 0; + object.section_4Time = 0; + object.section_5Time = 0; + object.section_6Time = 0; + object.section_7Time = 0; + object.wholeRank = 0; + object.modelRank = 0; + object.isMorning = false; + } + if (message.time != null && message.hasOwnProperty("time")) + object.time = message.time; + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + if (message.section_1Time != null && message.hasOwnProperty("section_1Time")) + object.section_1Time = message.section_1Time; + if (message.section_2Time != null && message.hasOwnProperty("section_2Time")) + object.section_2Time = message.section_2Time; + if (message.section_3Time != null && message.hasOwnProperty("section_3Time")) + object.section_3Time = message.section_3Time; + if (message.section_4Time != null && message.hasOwnProperty("section_4Time")) + object.section_4Time = message.section_4Time; + if (message.section_5Time != null && message.hasOwnProperty("section_5Time")) + object.section_5Time = message.section_5Time; + if (message.section_6Time != null && message.hasOwnProperty("section_6Time")) + object.section_6Time = message.section_6Time; + if (message.section_7Time != null && message.hasOwnProperty("section_7Time")) + object.section_7Time = message.section_7Time; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + object.wholeRank = message.wholeRank; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + object.modelRank = message.modelRank; + if (message.isMorning != null && message.hasOwnProperty("isMorning")) + object.isMorning = message.isMorning; + return object; + }; + + /** + * Converts this TimeAttackResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + * @returns {Object.} JSON object + */ + TimeAttackResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeAttackResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeAttackResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.TimeAttackResult"; + }; + + return TimeAttackResult; + })(); + + SaveGameResultRequest.VersusBattleResult = (function() { + + /** + * Properties of a VersusBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface IVersusBattleResult + * @property {number} result VersusBattleResult result + * @property {boolean} survived VersusBattleResult survived + * @property {Array.|null} [opponentCarId] VersusBattleResult opponentCarId + * @property {number} numOfPlayers VersusBattleResult numOfPlayers + * @property {number} area VersusBattleResult area + * @property {boolean} isMorning VersusBattleResult isMorning + * @property {number} vsPlayCount VersusBattleResult vsPlayCount + * @property {number|null} [vsBurstCount] VersusBattleResult vsBurstCount + * @property {number|null} [vsStarCount] VersusBattleResult vsStarCount + * @property {number|null} [vsCoolOrWild] VersusBattleResult vsCoolOrWild + * @property {number|null} [vsSmoothOrRough] VersusBattleResult vsSmoothOrRough + * @property {number|null} [vsTripleStarMedals] VersusBattleResult vsTripleStarMedals + * @property {number|null} [vsDoubleStarMedals] VersusBattleResult vsDoubleStarMedals + * @property {number|null} [vsSingleStarMedals] VersusBattleResult vsSingleStarMedals + * @property {number|null} [vsPlainMedals] VersusBattleResult vsPlainMedals + */ + + /** + * Constructs a new VersusBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a VersusBattleResult. + * @implements IVersusBattleResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult=} [properties] Properties to set + */ + function VersusBattleResult(properties) { + this.opponentCarId = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersusBattleResult result. + * @member {number} result + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.result = 0; + + /** + * VersusBattleResult survived. + * @member {boolean} survived + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.survived = false; + + /** + * VersusBattleResult opponentCarId. + * @member {Array.} opponentCarId + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.opponentCarId = $util.emptyArray; + + /** + * VersusBattleResult numOfPlayers. + * @member {number} numOfPlayers + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.numOfPlayers = 0; + + /** + * VersusBattleResult area. + * @member {number} area + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.area = 0; + + /** + * VersusBattleResult isMorning. + * @member {boolean} isMorning + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.isMorning = false; + + /** + * VersusBattleResult vsPlayCount. + * @member {number} vsPlayCount + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsPlayCount = 0; + + /** + * VersusBattleResult vsBurstCount. + * @member {number} vsBurstCount + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsBurstCount = 0; + + /** + * VersusBattleResult vsStarCount. + * @member {number} vsStarCount + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsStarCount = 0; + + /** + * VersusBattleResult vsCoolOrWild. + * @member {number} vsCoolOrWild + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsCoolOrWild = 0; + + /** + * VersusBattleResult vsSmoothOrRough. + * @member {number} vsSmoothOrRough + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsSmoothOrRough = 0; + + /** + * VersusBattleResult vsTripleStarMedals. + * @member {number} vsTripleStarMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsTripleStarMedals = 0; + + /** + * VersusBattleResult vsDoubleStarMedals. + * @member {number} vsDoubleStarMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsDoubleStarMedals = 0; + + /** + * VersusBattleResult vsSingleStarMedals. + * @member {number} vsSingleStarMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsSingleStarMedals = 0; + + /** + * VersusBattleResult vsPlainMedals. + * @member {number} vsPlainMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsPlainMedals = 0; + + /** + * Creates a new VersusBattleResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult instance + */ + VersusBattleResult.create = function create(properties) { + return new VersusBattleResult(properties); + }; + + /** + * Encodes the specified VersusBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult} message VersusBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.result); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.survived); + if (message.opponentCarId != null && message.opponentCarId.length) + for (let i = 0; i < message.opponentCarId.length; ++i) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.opponentCarId[i]); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.numOfPlayers); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.vsPlayCount); + if (message.vsBurstCount != null && Object.hasOwnProperty.call(message, "vsBurstCount")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.vsBurstCount); + if (message.vsStarCount != null && Object.hasOwnProperty.call(message, "vsStarCount")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.vsStarCount); + if (message.vsCoolOrWild != null && Object.hasOwnProperty.call(message, "vsCoolOrWild")) + writer.uint32(/* id 9, wireType 0 =*/72).sint32(message.vsCoolOrWild); + if (message.vsSmoothOrRough != null && Object.hasOwnProperty.call(message, "vsSmoothOrRough")) + writer.uint32(/* id 10, wireType 0 =*/80).sint32(message.vsSmoothOrRough); + if (message.vsTripleStarMedals != null && Object.hasOwnProperty.call(message, "vsTripleStarMedals")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.vsTripleStarMedals); + if (message.vsDoubleStarMedals != null && Object.hasOwnProperty.call(message, "vsDoubleStarMedals")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.vsDoubleStarMedals); + if (message.vsSingleStarMedals != null && Object.hasOwnProperty.call(message, "vsSingleStarMedals")) + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.vsSingleStarMedals); + if (message.vsPlainMedals != null && Object.hasOwnProperty.call(message, "vsPlainMedals")) + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.vsPlainMedals); + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.area); + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.isMorning); + return writer; + }; + + /** + * Encodes the specified VersusBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult} message VersusBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.uint32(); + break; + } + case 2: { + message.survived = reader.bool(); + break; + } + case 3: { + if (!(message.opponentCarId && message.opponentCarId.length)) + message.opponentCarId = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.opponentCarId.push(reader.uint32()); + } else + message.opponentCarId.push(reader.uint32()); + break; + } + case 5: { + message.numOfPlayers = reader.uint32(); + break; + } + case 17: { + message.area = reader.uint32(); + break; + } + case 18: { + message.isMorning = reader.bool(); + break; + } + case 6: { + message.vsPlayCount = reader.uint32(); + break; + } + case 7: { + message.vsBurstCount = reader.uint32(); + break; + } + case 8: { + message.vsStarCount = reader.uint32(); + break; + } + case 9: { + message.vsCoolOrWild = reader.sint32(); + break; + } + case 10: { + message.vsSmoothOrRough = reader.sint32(); + break; + } + case 11: { + message.vsTripleStarMedals = reader.uint32(); + break; + } + case 12: { + message.vsDoubleStarMedals = reader.uint32(); + break; + } + case 13: { + message.vsSingleStarMedals = reader.uint32(); + break; + } + case 14: { + message.vsPlainMedals = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("survived")) + throw $util.ProtocolError("missing required 'survived'", { instance: message }); + if (!message.hasOwnProperty("numOfPlayers")) + throw $util.ProtocolError("missing required 'numOfPlayers'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("isMorning")) + throw $util.ProtocolError("missing required 'isMorning'", { instance: message }); + if (!message.hasOwnProperty("vsPlayCount")) + throw $util.ProtocolError("missing required 'vsPlayCount'", { instance: message }); + return message; + }; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersusBattleResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersusBattleResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (typeof message.survived !== "boolean") + return "survived: boolean expected"; + if (message.opponentCarId != null && message.hasOwnProperty("opponentCarId")) { + if (!Array.isArray(message.opponentCarId)) + return "opponentCarId: array expected"; + for (let i = 0; i < message.opponentCarId.length; ++i) + if (!$util.isInteger(message.opponentCarId[i])) + return "opponentCarId: integer[] expected"; + } + if (!$util.isInteger(message.numOfPlayers)) + return "numOfPlayers: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (typeof message.isMorning !== "boolean") + return "isMorning: boolean expected"; + if (!$util.isInteger(message.vsPlayCount)) + return "vsPlayCount: integer expected"; + if (message.vsBurstCount != null && message.hasOwnProperty("vsBurstCount")) + if (!$util.isInteger(message.vsBurstCount)) + return "vsBurstCount: integer expected"; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + if (!$util.isInteger(message.vsStarCount)) + return "vsStarCount: integer expected"; + if (message.vsCoolOrWild != null && message.hasOwnProperty("vsCoolOrWild")) + if (!$util.isInteger(message.vsCoolOrWild)) + return "vsCoolOrWild: integer expected"; + if (message.vsSmoothOrRough != null && message.hasOwnProperty("vsSmoothOrRough")) + if (!$util.isInteger(message.vsSmoothOrRough)) + return "vsSmoothOrRough: integer expected"; + if (message.vsTripleStarMedals != null && message.hasOwnProperty("vsTripleStarMedals")) + if (!$util.isInteger(message.vsTripleStarMedals)) + return "vsTripleStarMedals: integer expected"; + if (message.vsDoubleStarMedals != null && message.hasOwnProperty("vsDoubleStarMedals")) + if (!$util.isInteger(message.vsDoubleStarMedals)) + return "vsDoubleStarMedals: integer expected"; + if (message.vsSingleStarMedals != null && message.hasOwnProperty("vsSingleStarMedals")) + if (!$util.isInteger(message.vsSingleStarMedals)) + return "vsSingleStarMedals: integer expected"; + if (message.vsPlainMedals != null && message.hasOwnProperty("vsPlainMedals")) + if (!$util.isInteger(message.vsPlainMedals)) + return "vsPlainMedals: integer expected"; + return null; + }; + + /** + * Creates a VersusBattleResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult + */ + VersusBattleResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult(); + if (object.result != null) + message.result = object.result >>> 0; + if (object.survived != null) + message.survived = Boolean(object.survived); + if (object.opponentCarId) { + if (!Array.isArray(object.opponentCarId)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.VersusBattleResult.opponentCarId: array expected"); + message.opponentCarId = []; + for (let i = 0; i < object.opponentCarId.length; ++i) + message.opponentCarId[i] = object.opponentCarId[i] >>> 0; + } + if (object.numOfPlayers != null) + message.numOfPlayers = object.numOfPlayers >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.isMorning != null) + message.isMorning = Boolean(object.isMorning); + if (object.vsPlayCount != null) + message.vsPlayCount = object.vsPlayCount >>> 0; + if (object.vsBurstCount != null) + message.vsBurstCount = object.vsBurstCount >>> 0; + if (object.vsStarCount != null) + message.vsStarCount = object.vsStarCount >>> 0; + if (object.vsCoolOrWild != null) + message.vsCoolOrWild = object.vsCoolOrWild | 0; + if (object.vsSmoothOrRough != null) + message.vsSmoothOrRough = object.vsSmoothOrRough | 0; + if (object.vsTripleStarMedals != null) + message.vsTripleStarMedals = object.vsTripleStarMedals >>> 0; + if (object.vsDoubleStarMedals != null) + message.vsDoubleStarMedals = object.vsDoubleStarMedals >>> 0; + if (object.vsSingleStarMedals != null) + message.vsSingleStarMedals = object.vsSingleStarMedals >>> 0; + if (object.vsPlainMedals != null) + message.vsPlainMedals = object.vsPlainMedals >>> 0; + return message; + }; + + /** + * Creates a plain object from a VersusBattleResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.VersusBattleResult} message VersusBattleResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersusBattleResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.opponentCarId = []; + if (options.defaults) { + object.result = 0; + object.survived = false; + object.numOfPlayers = 0; + object.vsPlayCount = 0; + object.vsBurstCount = 0; + object.vsStarCount = 0; + object.vsCoolOrWild = 0; + object.vsSmoothOrRough = 0; + object.vsTripleStarMedals = 0; + object.vsDoubleStarMedals = 0; + object.vsSingleStarMedals = 0; + object.vsPlainMedals = 0; + object.area = 0; + object.isMorning = false; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.survived != null && message.hasOwnProperty("survived")) + object.survived = message.survived; + if (message.opponentCarId && message.opponentCarId.length) { + object.opponentCarId = []; + for (let j = 0; j < message.opponentCarId.length; ++j) + object.opponentCarId[j] = message.opponentCarId[j]; + } + if (message.numOfPlayers != null && message.hasOwnProperty("numOfPlayers")) + object.numOfPlayers = message.numOfPlayers; + if (message.vsPlayCount != null && message.hasOwnProperty("vsPlayCount")) + object.vsPlayCount = message.vsPlayCount; + if (message.vsBurstCount != null && message.hasOwnProperty("vsBurstCount")) + object.vsBurstCount = message.vsBurstCount; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + object.vsStarCount = message.vsStarCount; + if (message.vsCoolOrWild != null && message.hasOwnProperty("vsCoolOrWild")) + object.vsCoolOrWild = message.vsCoolOrWild; + if (message.vsSmoothOrRough != null && message.hasOwnProperty("vsSmoothOrRough")) + object.vsSmoothOrRough = message.vsSmoothOrRough; + if (message.vsTripleStarMedals != null && message.hasOwnProperty("vsTripleStarMedals")) + object.vsTripleStarMedals = message.vsTripleStarMedals; + if (message.vsDoubleStarMedals != null && message.hasOwnProperty("vsDoubleStarMedals")) + object.vsDoubleStarMedals = message.vsDoubleStarMedals; + if (message.vsSingleStarMedals != null && message.hasOwnProperty("vsSingleStarMedals")) + object.vsSingleStarMedals = message.vsSingleStarMedals; + if (message.vsPlainMedals != null && message.hasOwnProperty("vsPlainMedals")) + object.vsPlainMedals = message.vsPlainMedals; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.isMorning != null && message.hasOwnProperty("isMorning")) + object.isMorning = message.isMorning; + return object; + }; + + /** + * Converts this VersusBattleResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + * @returns {Object.} JSON object + */ + VersusBattleResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VersusBattleResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VersusBattleResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.VersusBattleResult"; + }; + + return VersusBattleResult; + })(); + + SaveGameResultRequest.GhostBattleResult = (function() { + + /** + * Properties of a GhostBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface IGhostBattleResult + * @property {Array.|null} [opponents] GhostBattleResult opponents + * @property {number} path GhostBattleResult path + * @property {boolean} isMorning GhostBattleResult isMorning + * @property {wm.protobuf.GhostSelectionMethod} selectionMethod GhostBattleResult selectionMethod + * @property {number|null} [stampSheetCount] GhostBattleResult stampSheetCount + * @property {Array.|null} [stampSheet] GhostBattleResult stampSheet + * @property {number|null} [rgStamp] GhostBattleResult rgStamp + * @property {Array.|null} [confirmedTransferredStampTargetCarIds] GhostBattleResult confirmedTransferredStampTargetCarIds + * @property {number} rgPlayCount GhostBattleResult rgPlayCount + * @property {number|null} [dressupLevel] GhostBattleResult dressupLevel + * @property {number|null} [dressupPoint] GhostBattleResult dressupPoint + * @property {Array.|null} [rgRegionMapScore] GhostBattleResult rgRegionMapScore + * @property {number|null} [competitionId] GhostBattleResult competitionId + * @property {number|null} [periodId] GhostBattleResult periodId + * @property {number|null} [brakingPoint] GhostBattleResult brakingPoint + * @property {boolean|null} [acquireCrown] GhostBattleResult acquireCrown + * @property {boolean|null} [acquireAllCrowns] GhostBattleResult acquireAllCrowns + */ + + /** + * Constructs a new GhostBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a GhostBattleResult. + * @implements IGhostBattleResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult=} [properties] Properties to set + */ + function GhostBattleResult(properties) { + this.opponents = []; + this.stampSheet = []; + this.confirmedTransferredStampTargetCarIds = []; + this.rgRegionMapScore = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleResult opponents. + * @member {Array.} opponents + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.opponents = $util.emptyArray; + + /** + * GhostBattleResult path. + * @member {number} path + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.path = 0; + + /** + * GhostBattleResult isMorning. + * @member {boolean} isMorning + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.isMorning = false; + + /** + * GhostBattleResult selectionMethod. + * @member {wm.protobuf.GhostSelectionMethod} selectionMethod + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.selectionMethod = 1; + + /** + * GhostBattleResult stampSheetCount. + * @member {number} stampSheetCount + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.stampSheetCount = 0; + + /** + * GhostBattleResult stampSheet. + * @member {Array.} stampSheet + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.stampSheet = $util.emptyArray; + + /** + * GhostBattleResult rgStamp. + * @member {number} rgStamp + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.rgStamp = 0; + + /** + * GhostBattleResult confirmedTransferredStampTargetCarIds. + * @member {Array.} confirmedTransferredStampTargetCarIds + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.confirmedTransferredStampTargetCarIds = $util.emptyArray; + + /** + * GhostBattleResult rgPlayCount. + * @member {number} rgPlayCount + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.rgPlayCount = 0; + + /** + * GhostBattleResult dressupLevel. + * @member {number} dressupLevel + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.dressupLevel = 0; + + /** + * GhostBattleResult dressupPoint. + * @member {number} dressupPoint + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.dressupPoint = 0; + + /** + * GhostBattleResult rgRegionMapScore. + * @member {Array.} rgRegionMapScore + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.rgRegionMapScore = $util.emptyArray; + + /** + * GhostBattleResult competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.competitionId = 0; + + /** + * GhostBattleResult periodId. + * @member {number} periodId + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.periodId = 0; + + /** + * GhostBattleResult brakingPoint. + * @member {number} brakingPoint + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.brakingPoint = 0; + + /** + * GhostBattleResult acquireCrown. + * @member {boolean} acquireCrown + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.acquireCrown = false; + + /** + * GhostBattleResult acquireAllCrowns. + * @member {boolean} acquireAllCrowns + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.acquireAllCrowns = false; + + /** + * Creates a new GhostBattleResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult instance + */ + GhostBattleResult.create = function create(properties) { + return new GhostBattleResult(properties); + }; + + /** + * Encodes the specified GhostBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult} message GhostBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.opponents != null && message.opponents.length) + for (let i = 0; i < message.opponents.length; ++i) + $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.encode(message.opponents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.path); + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.selectionMethod); + if (message.stampSheetCount != null && Object.hasOwnProperty.call(message, "stampSheetCount")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.stampSheetCount); + if (message.stampSheet != null && message.stampSheet.length) + for (let i = 0; i < message.stampSheet.length; ++i) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.stampSheet[i]); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.rgPlayCount); + if (message.dressupLevel != null && Object.hasOwnProperty.call(message, "dressupLevel")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.dressupLevel); + if (message.dressupPoint != null && Object.hasOwnProperty.call(message, "dressupPoint")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.dressupPoint); + if (message.rgRegionMapScore != null && message.rgRegionMapScore.length) + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.rgRegionMapScore[i]); + if (message.competitionId != null && Object.hasOwnProperty.call(message, "competitionId")) + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.competitionId); + if (message.periodId != null && Object.hasOwnProperty.call(message, "periodId")) + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.periodId); + if (message.brakingPoint != null && Object.hasOwnProperty.call(message, "brakingPoint")) + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.brakingPoint); + if (message.acquireCrown != null && Object.hasOwnProperty.call(message, "acquireCrown")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.acquireCrown); + if (message.acquireAllCrowns != null && Object.hasOwnProperty.call(message, "acquireAllCrowns")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.acquireAllCrowns); + if (message.rgStamp != null && Object.hasOwnProperty.call(message, "rgStamp")) + writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.rgStamp); + if (message.confirmedTransferredStampTargetCarIds != null && message.confirmedTransferredStampTargetCarIds.length) + for (let i = 0; i < message.confirmedTransferredStampTargetCarIds.length; ++i) + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.confirmedTransferredStampTargetCarIds[i]); + writer.uint32(/* id 25, wireType 0 =*/200).bool(message.isMorning); + return writer; + }; + + /** + * Encodes the specified GhostBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult} message GhostBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.opponents && message.opponents.length)) + message.opponents = []; + message.opponents.push($root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.decode(reader, reader.uint32())); + break; + } + case 3: { + message.path = reader.uint32(); + break; + } + case 25: { + message.isMorning = reader.bool(); + break; + } + case 4: { + message.selectionMethod = reader.int32(); + break; + } + case 5: { + message.stampSheetCount = reader.uint32(); + break; + } + case 6: { + if (!(message.stampSheet && message.stampSheet.length)) + message.stampSheet = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampSheet.push(reader.uint32()); + } else + message.stampSheet.push(reader.uint32()); + break; + } + case 23: { + message.rgStamp = reader.uint32(); + break; + } + case 24: { + if (!(message.confirmedTransferredStampTargetCarIds && message.confirmedTransferredStampTargetCarIds.length)) + message.confirmedTransferredStampTargetCarIds = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.confirmedTransferredStampTargetCarIds.push(reader.uint32()); + } else + message.confirmedTransferredStampTargetCarIds.push(reader.uint32()); + break; + } + case 8: { + message.rgPlayCount = reader.uint32(); + break; + } + case 10: { + message.dressupLevel = reader.uint32(); + break; + } + case 11: { + message.dressupPoint = reader.uint32(); + break; + } + case 14: { + if (!(message.rgRegionMapScore && message.rgRegionMapScore.length)) + message.rgRegionMapScore = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegionMapScore.push(reader.uint32()); + } else + message.rgRegionMapScore.push(reader.uint32()); + break; + } + case 16: { + message.competitionId = reader.uint32(); + break; + } + case 17: { + message.periodId = reader.uint32(); + break; + } + case 18: { + message.brakingPoint = reader.uint32(); + break; + } + case 20: { + message.acquireCrown = reader.bool(); + break; + } + case 21: { + message.acquireAllCrowns = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("isMorning")) + throw $util.ProtocolError("missing required 'isMorning'", { instance: message }); + if (!message.hasOwnProperty("selectionMethod")) + throw $util.ProtocolError("missing required 'selectionMethod'", { instance: message }); + if (!message.hasOwnProperty("rgPlayCount")) + throw $util.ProtocolError("missing required 'rgPlayCount'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.opponents != null && message.hasOwnProperty("opponents")) { + if (!Array.isArray(message.opponents)) + return "opponents: array expected"; + for (let i = 0; i < message.opponents.length; ++i) { + let error = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify(message.opponents[i]); + if (error) + return "opponents." + error; + } + } + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (typeof message.isMorning !== "boolean") + return "isMorning: boolean expected"; + switch (message.selectionMethod) { + default: + return "selectionMethod: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + if (!$util.isInteger(message.stampSheetCount)) + return "stampSheetCount: integer expected"; + if (message.stampSheet != null && message.hasOwnProperty("stampSheet")) { + if (!Array.isArray(message.stampSheet)) + return "stampSheet: array expected"; + for (let i = 0; i < message.stampSheet.length; ++i) + if (!$util.isInteger(message.stampSheet[i])) + return "stampSheet: integer[] expected"; + } + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + if (!$util.isInteger(message.rgStamp)) + return "rgStamp: integer expected"; + if (message.confirmedTransferredStampTargetCarIds != null && message.hasOwnProperty("confirmedTransferredStampTargetCarIds")) { + if (!Array.isArray(message.confirmedTransferredStampTargetCarIds)) + return "confirmedTransferredStampTargetCarIds: array expected"; + for (let i = 0; i < message.confirmedTransferredStampTargetCarIds.length; ++i) + if (!$util.isInteger(message.confirmedTransferredStampTargetCarIds[i])) + return "confirmedTransferredStampTargetCarIds: integer[] expected"; + } + if (!$util.isInteger(message.rgPlayCount)) + return "rgPlayCount: integer expected"; + if (message.dressupLevel != null && message.hasOwnProperty("dressupLevel")) + if (!$util.isInteger(message.dressupLevel)) + return "dressupLevel: integer expected"; + if (message.dressupPoint != null && message.hasOwnProperty("dressupPoint")) + if (!$util.isInteger(message.dressupPoint)) + return "dressupPoint: integer expected"; + if (message.rgRegionMapScore != null && message.hasOwnProperty("rgRegionMapScore")) { + if (!Array.isArray(message.rgRegionMapScore)) + return "rgRegionMapScore: array expected"; + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + if (!$util.isInteger(message.rgRegionMapScore[i])) + return "rgRegionMapScore: integer[] expected"; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + if (message.periodId != null && message.hasOwnProperty("periodId")) + if (!$util.isInteger(message.periodId)) + return "periodId: integer expected"; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + if (!$util.isInteger(message.brakingPoint)) + return "brakingPoint: integer expected"; + if (message.acquireCrown != null && message.hasOwnProperty("acquireCrown")) + if (typeof message.acquireCrown !== "boolean") + return "acquireCrown: boolean expected"; + if (message.acquireAllCrowns != null && message.hasOwnProperty("acquireAllCrowns")) + if (typeof message.acquireAllCrowns !== "boolean") + return "acquireAllCrowns: boolean expected"; + return null; + }; + + /** + * Creates a GhostBattleResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult + */ + GhostBattleResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult(); + if (object.opponents) { + if (!Array.isArray(object.opponents)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.opponents: array expected"); + message.opponents = []; + for (let i = 0; i < object.opponents.length; ++i) { + if (typeof object.opponents[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.opponents: object expected"); + message.opponents[i] = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.fromObject(object.opponents[i]); + } + } + if (object.path != null) + message.path = object.path >>> 0; + if (object.isMorning != null) + message.isMorning = Boolean(object.isMorning); + switch (object.selectionMethod) { + case "GHOST_SEARCH_BY_REGION": + case 1: + message.selectionMethod = 1; + break; + case "GHOST_SELECT_BY_LEVEL": + case 2: + message.selectionMethod = 2; + break; + case "GHOST_SELECT_CROWN_MATCH": + case 3: + message.selectionMethod = 3; + break; + case "GHOST_SELECT_STAMP_MATCH": + case 4: + message.selectionMethod = 4; + break; + case "GHOST_SELECT_FROM_HISTORY": + case 5: + message.selectionMethod = 5; + break; + case "GHOST_SEARCH_BY_SHOP": + case 6: + message.selectionMethod = 6; + break; + case "GHOST_SEARCH_BY_NAME": + case 7: + message.selectionMethod = 7; + break; + case "GHOST_ACCEPT_CHALLENGER": + case 8: + message.selectionMethod = 8; + break; + case "GHOST_APPOINTMENT": + case 9: + message.selectionMethod = 9; + break; + case "GHOST_DEFAULT_OPPONENT": + case 10: + message.selectionMethod = 10; + break; + case "GHOST_COMPETITION": + case 11: + message.selectionMethod = 11; + break; + case "GHOST_SELECT_FROM_BOOKMARKS": + case 12: + message.selectionMethod = 12; + break; + } + if (object.stampSheetCount != null) + message.stampSheetCount = object.stampSheetCount >>> 0; + if (object.stampSheet) { + if (!Array.isArray(object.stampSheet)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.stampSheet: array expected"); + message.stampSheet = []; + for (let i = 0; i < object.stampSheet.length; ++i) + message.stampSheet[i] = object.stampSheet[i] >>> 0; + } + if (object.rgStamp != null) + message.rgStamp = object.rgStamp >>> 0; + if (object.confirmedTransferredStampTargetCarIds) { + if (!Array.isArray(object.confirmedTransferredStampTargetCarIds)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.confirmedTransferredStampTargetCarIds: array expected"); + message.confirmedTransferredStampTargetCarIds = []; + for (let i = 0; i < object.confirmedTransferredStampTargetCarIds.length; ++i) + message.confirmedTransferredStampTargetCarIds[i] = object.confirmedTransferredStampTargetCarIds[i] >>> 0; + } + if (object.rgPlayCount != null) + message.rgPlayCount = object.rgPlayCount >>> 0; + if (object.dressupLevel != null) + message.dressupLevel = object.dressupLevel >>> 0; + if (object.dressupPoint != null) + message.dressupPoint = object.dressupPoint >>> 0; + if (object.rgRegionMapScore) { + if (!Array.isArray(object.rgRegionMapScore)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.rgRegionMapScore: array expected"); + message.rgRegionMapScore = []; + for (let i = 0; i < object.rgRegionMapScore.length; ++i) + message.rgRegionMapScore[i] = object.rgRegionMapScore[i] >>> 0; + } + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + if (object.periodId != null) + message.periodId = object.periodId >>> 0; + if (object.brakingPoint != null) + message.brakingPoint = object.brakingPoint >>> 0; + if (object.acquireCrown != null) + message.acquireCrown = Boolean(object.acquireCrown); + if (object.acquireAllCrowns != null) + message.acquireAllCrowns = Boolean(object.acquireAllCrowns); + return message; + }; + + /** + * Creates a plain object from a GhostBattleResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult} message GhostBattleResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.opponents = []; + object.stampSheet = []; + object.rgRegionMapScore = []; + object.confirmedTransferredStampTargetCarIds = []; + } + if (options.defaults) { + object.path = 0; + object.selectionMethod = options.enums === String ? "GHOST_SEARCH_BY_REGION" : 1; + object.stampSheetCount = 0; + object.rgPlayCount = 0; + object.dressupLevel = 0; + object.dressupPoint = 0; + object.competitionId = 0; + object.periodId = 0; + object.brakingPoint = 0; + object.acquireCrown = false; + object.acquireAllCrowns = false; + object.rgStamp = 0; + object.isMorning = false; + } + if (message.opponents && message.opponents.length) { + object.opponents = []; + for (let j = 0; j < message.opponents.length; ++j) + object.opponents[j] = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.toObject(message.opponents[j], options); + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.selectionMethod != null && message.hasOwnProperty("selectionMethod")) + object.selectionMethod = options.enums === String ? $root.wm.protobuf.GhostSelectionMethod[message.selectionMethod] : message.selectionMethod; + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + object.stampSheetCount = message.stampSheetCount; + if (message.stampSheet && message.stampSheet.length) { + object.stampSheet = []; + for (let j = 0; j < message.stampSheet.length; ++j) + object.stampSheet[j] = message.stampSheet[j]; + } + if (message.rgPlayCount != null && message.hasOwnProperty("rgPlayCount")) + object.rgPlayCount = message.rgPlayCount; + if (message.dressupLevel != null && message.hasOwnProperty("dressupLevel")) + object.dressupLevel = message.dressupLevel; + if (message.dressupPoint != null && message.hasOwnProperty("dressupPoint")) + object.dressupPoint = message.dressupPoint; + if (message.rgRegionMapScore && message.rgRegionMapScore.length) { + object.rgRegionMapScore = []; + for (let j = 0; j < message.rgRegionMapScore.length; ++j) + object.rgRegionMapScore[j] = message.rgRegionMapScore[j]; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + if (message.periodId != null && message.hasOwnProperty("periodId")) + object.periodId = message.periodId; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + object.brakingPoint = message.brakingPoint; + if (message.acquireCrown != null && message.hasOwnProperty("acquireCrown")) + object.acquireCrown = message.acquireCrown; + if (message.acquireAllCrowns != null && message.hasOwnProperty("acquireAllCrowns")) + object.acquireAllCrowns = message.acquireAllCrowns; + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + object.rgStamp = message.rgStamp; + if (message.confirmedTransferredStampTargetCarIds && message.confirmedTransferredStampTargetCarIds.length) { + object.confirmedTransferredStampTargetCarIds = []; + for (let j = 0; j < message.confirmedTransferredStampTargetCarIds.length; ++j) + object.confirmedTransferredStampTargetCarIds[j] = message.confirmedTransferredStampTargetCarIds[j]; + } + if (message.isMorning != null && message.hasOwnProperty("isMorning")) + object.isMorning = message.isMorning; + return object; + }; + + /** + * Converts this GhostBattleResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + * @returns {Object.} JSON object + */ + GhostBattleResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.GhostBattleResult"; + }; + + GhostBattleResult.GhostBattleOpponent = (function() { + + /** + * Properties of a GhostBattleOpponent. + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @interface IGhostBattleOpponent + * @property {number} result GhostBattleOpponent result + * @property {number} carId GhostBattleOpponent carId + * @property {number} tunePower GhostBattleOpponent tunePower + * @property {number} tuneHandling GhostBattleOpponent tuneHandling + * @property {boolean|null} [receiveStamp] GhostBattleOpponent receiveStamp + */ + + /** + * Constructs a new GhostBattleOpponent. + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @classdesc Represents a GhostBattleOpponent. + * @implements IGhostBattleOpponent + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent=} [properties] Properties to set + */ + function GhostBattleOpponent(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleOpponent result. + * @member {number} result + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.result = 0; + + /** + * GhostBattleOpponent carId. + * @member {number} carId + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.carId = 0; + + /** + * GhostBattleOpponent tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.tunePower = 0; + + /** + * GhostBattleOpponent tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.tuneHandling = 0; + + /** + * GhostBattleOpponent receiveStamp. + * @member {boolean} receiveStamp + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.receiveStamp = false; + + /** + * Creates a new GhostBattleOpponent instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent instance + */ + GhostBattleOpponent.create = function create(properties) { + return new GhostBattleOpponent(properties); + }; + + /** + * Encodes the specified GhostBattleOpponent message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent} message GhostBattleOpponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleOpponent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).sint32(message.result); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.carId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tunePower); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.tuneHandling); + if (message.receiveStamp != null && Object.hasOwnProperty.call(message, "receiveStamp")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.receiveStamp); + return writer; + }; + + /** + * Encodes the specified GhostBattleOpponent message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent} message GhostBattleOpponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleOpponent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleOpponent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.sint32(); + break; + } + case 2: { + message.carId = reader.uint32(); + break; + } + case 3: { + message.tunePower = reader.uint32(); + break; + } + case 4: { + message.tuneHandling = reader.uint32(); + break; + } + case 5: { + message.receiveStamp = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleOpponent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleOpponent message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleOpponent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.receiveStamp != null && message.hasOwnProperty("receiveStamp")) + if (typeof message.receiveStamp !== "boolean") + return "receiveStamp: boolean expected"; + return null; + }; + + /** + * Creates a GhostBattleOpponent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent + */ + GhostBattleOpponent.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent(); + if (object.result != null) + message.result = object.result | 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.receiveStamp != null) + message.receiveStamp = Boolean(object.receiveStamp); + return message; + }; + + /** + * Creates a plain object from a GhostBattleOpponent message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} message GhostBattleOpponent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleOpponent.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.result = 0; + object.carId = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.receiveStamp = false; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.receiveStamp != null && message.hasOwnProperty("receiveStamp")) + object.receiveStamp = message.receiveStamp; + return object; + }; + + /** + * Converts this GhostBattleOpponent to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + * @returns {Object.} JSON object + */ + GhostBattleOpponent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleOpponent + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleOpponent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent"; + }; + + return GhostBattleOpponent; + })(); + + return GhostBattleResult; + })(); + + return SaveGameResultRequest; + })(); + + protobuf.SaveGameResultResponse = (function() { + + /** + * Properties of a SaveGameResultResponse. + * @memberof wm.protobuf + * @interface ISaveGameResultResponse + * @property {wm.protobuf.ErrorCode} error SaveGameResultResponse error + * @property {number|Long|null} [ghostSessionId] SaveGameResultResponse ghostSessionId + * @property {Array.|null} [availableTickets] SaveGameResultResponse availableTickets + */ + + /** + * Constructs a new SaveGameResultResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveGameResultResponse. + * @implements ISaveGameResultResponse + * @constructor + * @param {wm.protobuf.ISaveGameResultResponse=} [properties] Properties to set + */ + function SaveGameResultResponse(properties) { + this.availableTickets = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveGameResultResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + */ + SaveGameResultResponse.prototype.error = 0; + + /** + * SaveGameResultResponse ghostSessionId. + * @member {number|Long} ghostSessionId + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + */ + SaveGameResultResponse.prototype.ghostSessionId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * SaveGameResultResponse availableTickets. + * @member {Array.} availableTickets + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + */ + SaveGameResultResponse.prototype.availableTickets = $util.emptyArray; + + /** + * Creates a new SaveGameResultResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.ISaveGameResultResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse instance + */ + SaveGameResultResponse.create = function create(properties) { + return new SaveGameResultResponse(properties); + }; + + /** + * Encodes the specified SaveGameResultResponse message. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.ISaveGameResultResponse} message SaveGameResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.ghostSessionId != null && Object.hasOwnProperty.call(message, "ghostSessionId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.ghostSessionId); + if (message.availableTickets != null && message.availableTickets.length) + for (let i = 0; i < message.availableTickets.length; ++i) + $root.wm.protobuf.UserItem.encode(message.availableTickets[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveGameResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.ISaveGameResultResponse} message SaveGameResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.ghostSessionId = reader.uint64(); + break; + } + case 3: { + if (!(message.availableTickets && message.availableTickets.length)) + message.availableTickets = []; + message.availableTickets.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveGameResultResponse message. + * @function verify + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveGameResultResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.ghostSessionId != null && message.hasOwnProperty("ghostSessionId")) + if (!$util.isInteger(message.ghostSessionId) && !(message.ghostSessionId && $util.isInteger(message.ghostSessionId.low) && $util.isInteger(message.ghostSessionId.high))) + return "ghostSessionId: integer|Long expected"; + if (message.availableTickets != null && message.hasOwnProperty("availableTickets")) { + if (!Array.isArray(message.availableTickets)) + return "availableTickets: array expected"; + for (let i = 0; i < message.availableTickets.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.availableTickets[i]); + if (error) + return "availableTickets." + error; + } + } + return null; + }; + + /** + * Creates a SaveGameResultResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse + */ + SaveGameResultResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultResponse) + return object; + let message = new $root.wm.protobuf.SaveGameResultResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.ghostSessionId != null) + if ($util.Long) + (message.ghostSessionId = $util.Long.fromValue(object.ghostSessionId)).unsigned = true; + else if (typeof object.ghostSessionId === "string") + message.ghostSessionId = parseInt(object.ghostSessionId, 10); + else if (typeof object.ghostSessionId === "number") + message.ghostSessionId = object.ghostSessionId; + else if (typeof object.ghostSessionId === "object") + message.ghostSessionId = new $util.LongBits(object.ghostSessionId.low >>> 0, object.ghostSessionId.high >>> 0).toNumber(true); + if (object.availableTickets) { + if (!Array.isArray(object.availableTickets)) + throw TypeError(".wm.protobuf.SaveGameResultResponse.availableTickets: array expected"); + message.availableTickets = []; + for (let i = 0; i < object.availableTickets.length; ++i) { + if (typeof object.availableTickets[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultResponse.availableTickets: object expected"); + message.availableTickets[i] = $root.wm.protobuf.UserItem.fromObject(object.availableTickets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SaveGameResultResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.SaveGameResultResponse} message SaveGameResultResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveGameResultResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.availableTickets = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.ghostSessionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ghostSessionId = options.longs === String ? "0" : 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.ghostSessionId != null && message.hasOwnProperty("ghostSessionId")) + if (typeof message.ghostSessionId === "number") + object.ghostSessionId = options.longs === String ? String(message.ghostSessionId) : message.ghostSessionId; + else + object.ghostSessionId = options.longs === String ? $util.Long.prototype.toString.call(message.ghostSessionId) : options.longs === Number ? new $util.LongBits(message.ghostSessionId.low >>> 0, message.ghostSessionId.high >>> 0).toNumber(true) : message.ghostSessionId; + if (message.availableTickets && message.availableTickets.length) { + object.availableTickets = []; + for (let j = 0; j < message.availableTickets.length; ++j) + object.availableTickets[j] = $root.wm.protobuf.UserItem.toObject(message.availableTickets[j], options); + } + return object; + }; + + /** + * Converts this SaveGameResultResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + * @returns {Object.} JSON object + */ + SaveGameResultResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveGameResultResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveGameResultResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultResponse"; + }; + + return SaveGameResultResponse; + })(); + + protobuf.SaveChargeRequest = (function() { + + /** + * Properties of a SaveChargeRequest. + * @memberof wm.protobuf + * @interface ISaveChargeRequest + * @property {Array.|null} [chargeLogs] SaveChargeRequest chargeLogs + */ + + /** + * Constructs a new SaveChargeRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveChargeRequest. + * @implements ISaveChargeRequest + * @constructor + * @param {wm.protobuf.ISaveChargeRequest=} [properties] Properties to set + */ + function SaveChargeRequest(properties) { + this.chargeLogs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveChargeRequest chargeLogs. + * @member {Array.} chargeLogs + * @memberof wm.protobuf.SaveChargeRequest + * @instance + */ + SaveChargeRequest.prototype.chargeLogs = $util.emptyArray; + + /** + * Creates a new SaveChargeRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.ISaveChargeRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest instance + */ + SaveChargeRequest.create = function create(properties) { + return new SaveChargeRequest(properties); + }; + + /** + * Encodes the specified SaveChargeRequest message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.ISaveChargeRequest} message SaveChargeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chargeLogs != null && message.chargeLogs.length) + for (let i = 0; i < message.chargeLogs.length; ++i) + $root.wm.protobuf.SaveChargeRequest.ChargeLog.encode(message.chargeLogs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveChargeRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.ISaveChargeRequest} message SaveChargeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveChargeRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.chargeLogs && message.chargeLogs.length)) + message.chargeLogs = []; + message.chargeLogs.push($root.wm.protobuf.SaveChargeRequest.ChargeLog.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveChargeRequest message. + * @function verify + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveChargeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chargeLogs != null && message.hasOwnProperty("chargeLogs")) { + if (!Array.isArray(message.chargeLogs)) + return "chargeLogs: array expected"; + for (let i = 0; i < message.chargeLogs.length; ++i) { + let error = $root.wm.protobuf.SaveChargeRequest.ChargeLog.verify(message.chargeLogs[i]); + if (error) + return "chargeLogs." + error; + } + } + return null; + }; + + /** + * Creates a SaveChargeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest + */ + SaveChargeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveChargeRequest) + return object; + let message = new $root.wm.protobuf.SaveChargeRequest(); + if (object.chargeLogs) { + if (!Array.isArray(object.chargeLogs)) + throw TypeError(".wm.protobuf.SaveChargeRequest.chargeLogs: array expected"); + message.chargeLogs = []; + for (let i = 0; i < object.chargeLogs.length; ++i) { + if (typeof object.chargeLogs[i] !== "object") + throw TypeError(".wm.protobuf.SaveChargeRequest.chargeLogs: object expected"); + message.chargeLogs[i] = $root.wm.protobuf.SaveChargeRequest.ChargeLog.fromObject(object.chargeLogs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SaveChargeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.SaveChargeRequest} message SaveChargeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveChargeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.chargeLogs = []; + if (message.chargeLogs && message.chargeLogs.length) { + object.chargeLogs = []; + for (let j = 0; j < message.chargeLogs.length; ++j) + object.chargeLogs[j] = $root.wm.protobuf.SaveChargeRequest.ChargeLog.toObject(message.chargeLogs[j], options); + } + return object; + }; + + /** + * Converts this SaveChargeRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveChargeRequest + * @instance + * @returns {Object.} JSON object + */ + SaveChargeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveChargeRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveChargeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveChargeRequest"; + }; + + SaveChargeRequest.ChargeLog = (function() { + + /** + * Properties of a ChargeLog. + * @memberof wm.protobuf.SaveChargeRequest + * @interface IChargeLog + * @property {number} datetime ChargeLog datetime + * @property {string} pcbSerial ChargeLog pcbSerial + * @property {string} placeId ChargeLog placeId + * @property {number|null} [userId] ChargeLog userId + */ + + /** + * Constructs a new ChargeLog. + * @memberof wm.protobuf.SaveChargeRequest + * @classdesc Represents a ChargeLog. + * @implements IChargeLog + * @constructor + * @param {wm.protobuf.SaveChargeRequest.IChargeLog=} [properties] Properties to set + */ + function ChargeLog(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChargeLog datetime. + * @member {number} datetime + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.datetime = 0; + + /** + * ChargeLog pcbSerial. + * @member {string} pcbSerial + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.pcbSerial = ""; + + /** + * ChargeLog placeId. + * @member {string} placeId + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.placeId = ""; + + /** + * ChargeLog userId. + * @member {number} userId + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.userId = 0; + + /** + * Creates a new ChargeLog instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.IChargeLog=} [properties] Properties to set + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog instance + */ + ChargeLog.create = function create(properties) { + return new ChargeLog(properties); + }; + + /** + * Encodes the specified ChargeLog message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.IChargeLog} message ChargeLog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChargeLog.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.datetime); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pcbSerial); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.placeId); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified ChargeLog message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.IChargeLog} message ChargeLog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChargeLog.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChargeLog message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChargeLog.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveChargeRequest.ChargeLog(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datetime = reader.uint32(); + break; + } + case 2: { + message.pcbSerial = reader.string(); + break; + } + case 3: { + message.placeId = reader.string(); + break; + } + case 4: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("datetime")) + throw $util.ProtocolError("missing required 'datetime'", { instance: message }); + if (!message.hasOwnProperty("pcbSerial")) + throw $util.ProtocolError("missing required 'pcbSerial'", { instance: message }); + if (!message.hasOwnProperty("placeId")) + throw $util.ProtocolError("missing required 'placeId'", { instance: message }); + return message; + }; + + /** + * Decodes a ChargeLog message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChargeLog.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChargeLog message. + * @function verify + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChargeLog.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.datetime)) + return "datetime: integer expected"; + if (!$util.isString(message.pcbSerial)) + return "pcbSerial: string expected"; + if (!$util.isString(message.placeId)) + return "placeId: string expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a ChargeLog message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog + */ + ChargeLog.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveChargeRequest.ChargeLog) + return object; + let message = new $root.wm.protobuf.SaveChargeRequest.ChargeLog(); + if (object.datetime != null) + message.datetime = object.datetime >>> 0; + if (object.pcbSerial != null) + message.pcbSerial = String(object.pcbSerial); + if (object.placeId != null) + message.placeId = String(object.placeId); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a ChargeLog message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.ChargeLog} message ChargeLog + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChargeLog.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.datetime = 0; + object.pcbSerial = ""; + object.placeId = ""; + object.userId = 0; + } + if (message.datetime != null && message.hasOwnProperty("datetime")) + object.datetime = message.datetime; + if (message.pcbSerial != null && message.hasOwnProperty("pcbSerial")) + object.pcbSerial = message.pcbSerial; + if (message.placeId != null && message.hasOwnProperty("placeId")) + object.placeId = message.placeId; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this ChargeLog to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + * @returns {Object.} JSON object + */ + ChargeLog.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChargeLog + * @function getTypeUrl + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChargeLog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveChargeRequest.ChargeLog"; + }; + + return ChargeLog; + })(); + + return SaveChargeRequest; + })(); + + protobuf.SaveChargeResponse = (function() { + + /** + * Properties of a SaveChargeResponse. + * @memberof wm.protobuf + * @interface ISaveChargeResponse + * @property {wm.protobuf.ErrorCode} error SaveChargeResponse error + */ + + /** + * Constructs a new SaveChargeResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveChargeResponse. + * @implements ISaveChargeResponse + * @constructor + * @param {wm.protobuf.ISaveChargeResponse=} [properties] Properties to set + */ + function SaveChargeResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveChargeResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveChargeResponse + * @instance + */ + SaveChargeResponse.prototype.error = 0; + + /** + * Creates a new SaveChargeResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.ISaveChargeResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse instance + */ + SaveChargeResponse.create = function create(properties) { + return new SaveChargeResponse(properties); + }; + + /** + * Encodes the specified SaveChargeResponse message. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.ISaveChargeResponse} message SaveChargeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveChargeResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.ISaveChargeResponse} message SaveChargeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveChargeResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveChargeResponse message. + * @function verify + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveChargeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveChargeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse + */ + SaveChargeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveChargeResponse) + return object; + let message = new $root.wm.protobuf.SaveChargeResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveChargeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.SaveChargeResponse} message SaveChargeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveChargeResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveChargeResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveChargeResponse + * @instance + * @returns {Object.} JSON object + */ + SaveChargeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveChargeResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveChargeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveChargeResponse"; + }; + + return SaveChargeResponse; + })(); + + protobuf.LoadGhostBattleInfoRequest = (function() { + + /** + * Properties of a LoadGhostBattleInfoRequest. + * @memberof wm.protobuf + * @interface ILoadGhostBattleInfoRequest + * @property {number} carId LoadGhostBattleInfoRequest carId + */ + + /** + * Constructs a new LoadGhostBattleInfoRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostBattleInfoRequest. + * @implements ILoadGhostBattleInfoRequest + * @constructor + * @param {wm.protobuf.ILoadGhostBattleInfoRequest=} [properties] Properties to set + */ + function LoadGhostBattleInfoRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostBattleInfoRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @instance + */ + LoadGhostBattleInfoRequest.prototype.carId = 0; + + /** + * Creates a new LoadGhostBattleInfoRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest instance + */ + LoadGhostBattleInfoRequest.create = function create(properties) { + return new LoadGhostBattleInfoRequest(properties); + }; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoRequest} message LoadGhostBattleInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + return writer; + }; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoRequest} message LoadGhostBattleInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostBattleInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostBattleInfoRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostBattleInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + return null; + }; + + /** + * Creates a LoadGhostBattleInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest + */ + LoadGhostBattleInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostBattleInfoRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostBattleInfoRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGhostBattleInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.LoadGhostBattleInfoRequest} message LoadGhostBattleInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostBattleInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + return object; + }; + + /** + * Converts this LoadGhostBattleInfoRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostBattleInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostBattleInfoRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostBattleInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostBattleInfoRequest"; + }; + + return LoadGhostBattleInfoRequest; + })(); + + protobuf.LoadGhostBattleInfoResponse = (function() { + + /** + * Properties of a LoadGhostBattleInfoResponse. + * @memberof wm.protobuf + * @interface ILoadGhostBattleInfoResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostBattleInfoResponse error + * @property {Array.|null} [friendCars] LoadGhostBattleInfoResponse friendCars + * @property {Array.|null} [challengers] LoadGhostBattleInfoResponse challengers + * @property {Array.|null} [stampTargetCars] LoadGhostBattleInfoResponse stampTargetCars + * @property {Array.|null} [previousVersionStampTargetCars] LoadGhostBattleInfoResponse previousVersionStampTargetCars + * @property {Array.|null} [bookmarkedCars] LoadGhostBattleInfoResponse bookmarkedCars + * @property {Array.|null} [history] LoadGhostBattleInfoResponse history + * @property {Array.|null} [weakenedCars] LoadGhostBattleInfoResponse weakenedCars + * @property {number} stampSheetCount LoadGhostBattleInfoResponse stampSheetCount + * @property {Array.|null} [stampSheet] LoadGhostBattleInfoResponse stampSheet + * @property {Array.|null} [stampReturnStats] LoadGhostBattleInfoResponse stampReturnStats + */ + + /** + * Constructs a new LoadGhostBattleInfoResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostBattleInfoResponse. + * @implements ILoadGhostBattleInfoResponse + * @constructor + * @param {wm.protobuf.ILoadGhostBattleInfoResponse=} [properties] Properties to set + */ + function LoadGhostBattleInfoResponse(properties) { + this.friendCars = []; + this.challengers = []; + this.stampTargetCars = []; + this.previousVersionStampTargetCars = []; + this.bookmarkedCars = []; + this.history = []; + this.weakenedCars = []; + this.stampSheet = []; + this.stampReturnStats = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostBattleInfoResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.error = 0; + + /** + * LoadGhostBattleInfoResponse friendCars. + * @member {Array.} friendCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.friendCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse challengers. + * @member {Array.} challengers + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.challengers = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse stampTargetCars. + * @member {Array.} stampTargetCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampTargetCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse previousVersionStampTargetCars. + * @member {Array.} previousVersionStampTargetCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.previousVersionStampTargetCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse bookmarkedCars. + * @member {Array.} bookmarkedCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.bookmarkedCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse history. + * @member {Array.} history + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.history = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse weakenedCars. + * @member {Array.} weakenedCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.weakenedCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse stampSheetCount. + * @member {number} stampSheetCount + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampSheetCount = 0; + + /** + * LoadGhostBattleInfoResponse stampSheet. + * @member {Array.} stampSheet + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampSheet = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse stampReturnStats. + * @member {Array.} stampReturnStats + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampReturnStats = $util.emptyArray; + + /** + * Creates a new LoadGhostBattleInfoResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse instance + */ + LoadGhostBattleInfoResponse.create = function create(properties) { + return new LoadGhostBattleInfoResponse(properties); + }; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoResponse} message LoadGhostBattleInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.friendCars != null && message.friendCars.length) + for (let i = 0; i < message.friendCars.length; ++i) + $root.wm.protobuf.FriendCar.encode(message.friendCars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.challengers != null && message.challengers.length) + for (let i = 0; i < message.challengers.length; ++i) + $root.wm.protobuf.ChallengerCar.encode(message.challengers[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.stampTargetCars != null && message.stampTargetCars.length) + for (let i = 0; i < message.stampTargetCars.length; ++i) + $root.wm.protobuf.StampTargetCar.encode(message.stampTargetCars[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.history != null && message.history.length) + for (let i = 0; i < message.history.length; ++i) + $root.wm.protobuf.Car.encode(message.history[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.stampSheetCount); + if (message.stampSheet != null && message.stampSheet.length) + for (let i = 0; i < message.stampSheet.length; ++i) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stampSheet[i]); + if (message.stampReturnStats != null && message.stampReturnStats.length) + for (let i = 0; i < message.stampReturnStats.length; ++i) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.stampReturnStats[i]); + if (message.weakenedCars != null && message.weakenedCars.length) + for (let i = 0; i < message.weakenedCars.length; ++i) + $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.encode(message.weakenedCars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.bookmarkedCars != null && message.bookmarkedCars.length) + for (let i = 0; i < message.bookmarkedCars.length; ++i) + $root.wm.protobuf.BookmarkedCar.encode(message.bookmarkedCars[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.previousVersionStampTargetCars != null && message.previousVersionStampTargetCars.length) + for (let i = 0; i < message.previousVersionStampTargetCars.length; ++i) + $root.wm.protobuf.PreviousVersionStampTargetCar.encode(message.previousVersionStampTargetCars[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoResponse} message LoadGhostBattleInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostBattleInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.friendCars && message.friendCars.length)) + message.friendCars = []; + message.friendCars.push($root.wm.protobuf.FriendCar.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.challengers && message.challengers.length)) + message.challengers = []; + message.challengers.push($root.wm.protobuf.ChallengerCar.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.stampTargetCars && message.stampTargetCars.length)) + message.stampTargetCars = []; + message.stampTargetCars.push($root.wm.protobuf.StampTargetCar.decode(reader, reader.uint32())); + break; + } + case 12: { + if (!(message.previousVersionStampTargetCars && message.previousVersionStampTargetCars.length)) + message.previousVersionStampTargetCars = []; + message.previousVersionStampTargetCars.push($root.wm.protobuf.PreviousVersionStampTargetCar.decode(reader, reader.uint32())); + break; + } + case 11: { + if (!(message.bookmarkedCars && message.bookmarkedCars.length)) + message.bookmarkedCars = []; + message.bookmarkedCars.push($root.wm.protobuf.BookmarkedCar.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.history && message.history.length)) + message.history = []; + message.history.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.weakenedCars && message.weakenedCars.length)) + message.weakenedCars = []; + message.weakenedCars.push($root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.decode(reader, reader.uint32())); + break; + } + case 7: { + message.stampSheetCount = reader.uint32(); + break; + } + case 8: { + if (!(message.stampSheet && message.stampSheet.length)) + message.stampSheet = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampSheet.push(reader.uint32()); + } else + message.stampSheet.push(reader.uint32()); + break; + } + case 9: { + if (!(message.stampReturnStats && message.stampReturnStats.length)) + message.stampReturnStats = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampReturnStats.push(reader.uint32()); + } else + message.stampReturnStats.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("stampSheetCount")) + throw $util.ProtocolError("missing required 'stampSheetCount'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostBattleInfoResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostBattleInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.friendCars != null && message.hasOwnProperty("friendCars")) { + if (!Array.isArray(message.friendCars)) + return "friendCars: array expected"; + for (let i = 0; i < message.friendCars.length; ++i) { + let error = $root.wm.protobuf.FriendCar.verify(message.friendCars[i]); + if (error) + return "friendCars." + error; + } + } + if (message.challengers != null && message.hasOwnProperty("challengers")) { + if (!Array.isArray(message.challengers)) + return "challengers: array expected"; + for (let i = 0; i < message.challengers.length; ++i) { + let error = $root.wm.protobuf.ChallengerCar.verify(message.challengers[i]); + if (error) + return "challengers." + error; + } + } + if (message.stampTargetCars != null && message.hasOwnProperty("stampTargetCars")) { + if (!Array.isArray(message.stampTargetCars)) + return "stampTargetCars: array expected"; + for (let i = 0; i < message.stampTargetCars.length; ++i) { + let error = $root.wm.protobuf.StampTargetCar.verify(message.stampTargetCars[i]); + if (error) + return "stampTargetCars." + error; + } + } + if (message.previousVersionStampTargetCars != null && message.hasOwnProperty("previousVersionStampTargetCars")) { + if (!Array.isArray(message.previousVersionStampTargetCars)) + return "previousVersionStampTargetCars: array expected"; + for (let i = 0; i < message.previousVersionStampTargetCars.length; ++i) { + let error = $root.wm.protobuf.PreviousVersionStampTargetCar.verify(message.previousVersionStampTargetCars[i]); + if (error) + return "previousVersionStampTargetCars." + error; + } + } + if (message.bookmarkedCars != null && message.hasOwnProperty("bookmarkedCars")) { + if (!Array.isArray(message.bookmarkedCars)) + return "bookmarkedCars: array expected"; + for (let i = 0; i < message.bookmarkedCars.length; ++i) { + let error = $root.wm.protobuf.BookmarkedCar.verify(message.bookmarkedCars[i]); + if (error) + return "bookmarkedCars." + error; + } + } + if (message.history != null && message.hasOwnProperty("history")) { + if (!Array.isArray(message.history)) + return "history: array expected"; + for (let i = 0; i < message.history.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.history[i]); + if (error) + return "history." + error; + } + } + if (message.weakenedCars != null && message.hasOwnProperty("weakenedCars")) { + if (!Array.isArray(message.weakenedCars)) + return "weakenedCars: array expected"; + for (let i = 0; i < message.weakenedCars.length; ++i) { + let error = $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify(message.weakenedCars[i]); + if (error) + return "weakenedCars." + error; + } + } + if (!$util.isInteger(message.stampSheetCount)) + return "stampSheetCount: integer expected"; + if (message.stampSheet != null && message.hasOwnProperty("stampSheet")) { + if (!Array.isArray(message.stampSheet)) + return "stampSheet: array expected"; + for (let i = 0; i < message.stampSheet.length; ++i) + if (!$util.isInteger(message.stampSheet[i])) + return "stampSheet: integer[] expected"; + } + if (message.stampReturnStats != null && message.hasOwnProperty("stampReturnStats")) { + if (!Array.isArray(message.stampReturnStats)) + return "stampReturnStats: array expected"; + for (let i = 0; i < message.stampReturnStats.length; ++i) + if (!$util.isInteger(message.stampReturnStats[i])) + return "stampReturnStats: integer[] expected"; + } + return null; + }; + + /** + * Creates a LoadGhostBattleInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse + */ + LoadGhostBattleInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostBattleInfoResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostBattleInfoResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.friendCars) { + if (!Array.isArray(object.friendCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.friendCars: array expected"); + message.friendCars = []; + for (let i = 0; i < object.friendCars.length; ++i) { + if (typeof object.friendCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.friendCars: object expected"); + message.friendCars[i] = $root.wm.protobuf.FriendCar.fromObject(object.friendCars[i]); + } + } + if (object.challengers) { + if (!Array.isArray(object.challengers)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.challengers: array expected"); + message.challengers = []; + for (let i = 0; i < object.challengers.length; ++i) { + if (typeof object.challengers[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.challengers: object expected"); + message.challengers[i] = $root.wm.protobuf.ChallengerCar.fromObject(object.challengers[i]); + } + } + if (object.stampTargetCars) { + if (!Array.isArray(object.stampTargetCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampTargetCars: array expected"); + message.stampTargetCars = []; + for (let i = 0; i < object.stampTargetCars.length; ++i) { + if (typeof object.stampTargetCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampTargetCars: object expected"); + message.stampTargetCars[i] = $root.wm.protobuf.StampTargetCar.fromObject(object.stampTargetCars[i]); + } + } + if (object.previousVersionStampTargetCars) { + if (!Array.isArray(object.previousVersionStampTargetCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.previousVersionStampTargetCars: array expected"); + message.previousVersionStampTargetCars = []; + for (let i = 0; i < object.previousVersionStampTargetCars.length; ++i) { + if (typeof object.previousVersionStampTargetCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.previousVersionStampTargetCars: object expected"); + message.previousVersionStampTargetCars[i] = $root.wm.protobuf.PreviousVersionStampTargetCar.fromObject(object.previousVersionStampTargetCars[i]); + } + } + if (object.bookmarkedCars) { + if (!Array.isArray(object.bookmarkedCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.bookmarkedCars: array expected"); + message.bookmarkedCars = []; + for (let i = 0; i < object.bookmarkedCars.length; ++i) { + if (typeof object.bookmarkedCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.bookmarkedCars: object expected"); + message.bookmarkedCars[i] = $root.wm.protobuf.BookmarkedCar.fromObject(object.bookmarkedCars[i]); + } + } + if (object.history) { + if (!Array.isArray(object.history)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.history: array expected"); + message.history = []; + for (let i = 0; i < object.history.length; ++i) { + if (typeof object.history[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.history: object expected"); + message.history[i] = $root.wm.protobuf.Car.fromObject(object.history[i]); + } + } + if (object.weakenedCars) { + if (!Array.isArray(object.weakenedCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.weakenedCars: array expected"); + message.weakenedCars = []; + for (let i = 0; i < object.weakenedCars.length; ++i) { + if (typeof object.weakenedCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.weakenedCars: object expected"); + message.weakenedCars[i] = $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.fromObject(object.weakenedCars[i]); + } + } + if (object.stampSheetCount != null) + message.stampSheetCount = object.stampSheetCount >>> 0; + if (object.stampSheet) { + if (!Array.isArray(object.stampSheet)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampSheet: array expected"); + message.stampSheet = []; + for (let i = 0; i < object.stampSheet.length; ++i) + message.stampSheet[i] = object.stampSheet[i] >>> 0; + } + if (object.stampReturnStats) { + if (!Array.isArray(object.stampReturnStats)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampReturnStats: array expected"); + message.stampReturnStats = []; + for (let i = 0; i < object.stampReturnStats.length; ++i) + message.stampReturnStats[i] = object.stampReturnStats[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostBattleInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse} message LoadGhostBattleInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostBattleInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.friendCars = []; + object.challengers = []; + object.stampTargetCars = []; + object.history = []; + object.stampSheet = []; + object.stampReturnStats = []; + object.weakenedCars = []; + object.bookmarkedCars = []; + object.previousVersionStampTargetCars = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.stampSheetCount = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.friendCars && message.friendCars.length) { + object.friendCars = []; + for (let j = 0; j < message.friendCars.length; ++j) + object.friendCars[j] = $root.wm.protobuf.FriendCar.toObject(message.friendCars[j], options); + } + if (message.challengers && message.challengers.length) { + object.challengers = []; + for (let j = 0; j < message.challengers.length; ++j) + object.challengers[j] = $root.wm.protobuf.ChallengerCar.toObject(message.challengers[j], options); + } + if (message.stampTargetCars && message.stampTargetCars.length) { + object.stampTargetCars = []; + for (let j = 0; j < message.stampTargetCars.length; ++j) + object.stampTargetCars[j] = $root.wm.protobuf.StampTargetCar.toObject(message.stampTargetCars[j], options); + } + if (message.history && message.history.length) { + object.history = []; + for (let j = 0; j < message.history.length; ++j) + object.history[j] = $root.wm.protobuf.Car.toObject(message.history[j], options); + } + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + object.stampSheetCount = message.stampSheetCount; + if (message.stampSheet && message.stampSheet.length) { + object.stampSheet = []; + for (let j = 0; j < message.stampSheet.length; ++j) + object.stampSheet[j] = message.stampSheet[j]; + } + if (message.stampReturnStats && message.stampReturnStats.length) { + object.stampReturnStats = []; + for (let j = 0; j < message.stampReturnStats.length; ++j) + object.stampReturnStats[j] = message.stampReturnStats[j]; + } + if (message.weakenedCars && message.weakenedCars.length) { + object.weakenedCars = []; + for (let j = 0; j < message.weakenedCars.length; ++j) + object.weakenedCars[j] = $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.toObject(message.weakenedCars[j], options); + } + if (message.bookmarkedCars && message.bookmarkedCars.length) { + object.bookmarkedCars = []; + for (let j = 0; j < message.bookmarkedCars.length; ++j) + object.bookmarkedCars[j] = $root.wm.protobuf.BookmarkedCar.toObject(message.bookmarkedCars[j], options); + } + if (message.previousVersionStampTargetCars && message.previousVersionStampTargetCars.length) { + object.previousVersionStampTargetCars = []; + for (let j = 0; j < message.previousVersionStampTargetCars.length; ++j) + object.previousVersionStampTargetCars[j] = $root.wm.protobuf.PreviousVersionStampTargetCar.toObject(message.previousVersionStampTargetCars[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostBattleInfoResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostBattleInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostBattleInfoResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostBattleInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostBattleInfoResponse"; + }; + + LoadGhostBattleInfoResponse.WeakenedCar = (function() { + + /** + * Properties of a WeakenedCar. + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @interface IWeakenedCar + * @property {number} carId WeakenedCar carId + * @property {number} consecutiveLosses WeakenedCar consecutiveLosses + */ + + /** + * Constructs a new WeakenedCar. + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @classdesc Represents a WeakenedCar. + * @implements IWeakenedCar + * @constructor + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar=} [properties] Properties to set + */ + function WeakenedCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WeakenedCar carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @instance + */ + WeakenedCar.prototype.carId = 0; + + /** + * WeakenedCar consecutiveLosses. + * @member {number} consecutiveLosses + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @instance + */ + WeakenedCar.prototype.consecutiveLosses = 0; + + /** + * Creates a new WeakenedCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar instance + */ + WeakenedCar.create = function create(properties) { + return new WeakenedCar(properties); + }; + + /** + * Encodes the specified WeakenedCar message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar} message WeakenedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeakenedCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.consecutiveLosses); + return writer; + }; + + /** + * Encodes the specified WeakenedCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar} message WeakenedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeakenedCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeakenedCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.consecutiveLosses = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("consecutiveLosses")) + throw $util.ProtocolError("missing required 'consecutiveLosses'", { instance: message }); + return message; + }; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeakenedCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WeakenedCar message. + * @function verify + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeakenedCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.consecutiveLosses)) + return "consecutiveLosses: integer expected"; + return null; + }; + + /** + * Creates a WeakenedCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar + */ + WeakenedCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar) + return object; + let message = new $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.consecutiveLosses != null) + message.consecutiveLosses = object.consecutiveLosses >>> 0; + return message; + }; + + /** + * Creates a plain object from a WeakenedCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} message WeakenedCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeakenedCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.consecutiveLosses = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.consecutiveLosses != null && message.hasOwnProperty("consecutiveLosses")) + object.consecutiveLosses = message.consecutiveLosses; + return object; + }; + + /** + * Converts this WeakenedCar to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @instance + * @returns {Object.} JSON object + */ + WeakenedCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WeakenedCar + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WeakenedCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar"; + }; + + return WeakenedCar; + })(); + + return LoadGhostBattleInfoResponse; + })(); + + protobuf.LoadStampTargetRequest = (function() { + + /** + * Properties of a LoadStampTargetRequest. + * @memberof wm.protobuf + * @interface ILoadStampTargetRequest + * @property {number} carId LoadStampTargetRequest carId + * @property {boolean} needToPromote LoadStampTargetRequest needToPromote + */ + + /** + * Constructs a new LoadStampTargetRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadStampTargetRequest. + * @implements ILoadStampTargetRequest + * @constructor + * @param {wm.protobuf.ILoadStampTargetRequest=} [properties] Properties to set + */ + function LoadStampTargetRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadStampTargetRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadStampTargetRequest + * @instance + */ + LoadStampTargetRequest.prototype.carId = 0; + + /** + * LoadStampTargetRequest needToPromote. + * @member {boolean} needToPromote + * @memberof wm.protobuf.LoadStampTargetRequest + * @instance + */ + LoadStampTargetRequest.prototype.needToPromote = false; + + /** + * Creates a new LoadStampTargetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.ILoadStampTargetRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest instance + */ + LoadStampTargetRequest.create = function create(properties) { + return new LoadStampTargetRequest(properties); + }; + + /** + * Encodes the specified LoadStampTargetRequest message. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.ILoadStampTargetRequest} message LoadStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.needToPromote); + return writer; + }; + + /** + * Encodes the specified LoadStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.ILoadStampTargetRequest} message LoadStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadStampTargetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.needToPromote = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("needToPromote")) + throw $util.ProtocolError("missing required 'needToPromote'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadStampTargetRequest message. + * @function verify + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadStampTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (typeof message.needToPromote !== "boolean") + return "needToPromote: boolean expected"; + return null; + }; + + /** + * Creates a LoadStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest + */ + LoadStampTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadStampTargetRequest) + return object; + let message = new $root.wm.protobuf.LoadStampTargetRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.needToPromote != null) + message.needToPromote = Boolean(object.needToPromote); + return message; + }; + + /** + * Creates a plain object from a LoadStampTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.LoadStampTargetRequest} message LoadStampTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadStampTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.needToPromote = false; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.needToPromote != null && message.hasOwnProperty("needToPromote")) + object.needToPromote = message.needToPromote; + return object; + }; + + /** + * Converts this LoadStampTargetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadStampTargetRequest + * @instance + * @returns {Object.} JSON object + */ + LoadStampTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadStampTargetRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadStampTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadStampTargetRequest"; + }; + + return LoadStampTargetRequest; + })(); + + protobuf.LoadStampTargetResponse = (function() { + + /** + * Properties of a LoadStampTargetResponse. + * @memberof wm.protobuf + * @interface ILoadStampTargetResponse + * @property {wm.protobuf.ErrorCode} error LoadStampTargetResponse error + * @property {Array.|null} [cars] LoadStampTargetResponse cars + * @property {Array.|null} [challengers] LoadStampTargetResponse challengers + */ + + /** + * Constructs a new LoadStampTargetResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadStampTargetResponse. + * @implements ILoadStampTargetResponse + * @constructor + * @param {wm.protobuf.ILoadStampTargetResponse=} [properties] Properties to set + */ + function LoadStampTargetResponse(properties) { + this.cars = []; + this.challengers = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadStampTargetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + */ + LoadStampTargetResponse.prototype.error = 0; + + /** + * LoadStampTargetResponse cars. + * @member {Array.} cars + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + */ + LoadStampTargetResponse.prototype.cars = $util.emptyArray; + + /** + * LoadStampTargetResponse challengers. + * @member {Array.} challengers + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + */ + LoadStampTargetResponse.prototype.challengers = $util.emptyArray; + + /** + * Creates a new LoadStampTargetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.ILoadStampTargetResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse instance + */ + LoadStampTargetResponse.create = function create(properties) { + return new LoadStampTargetResponse(properties); + }; + + /** + * Encodes the specified LoadStampTargetResponse message. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.ILoadStampTargetResponse} message LoadStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.StampTargetCar.encode(message.cars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.challengers != null && message.challengers.length) + for (let i = 0; i < message.challengers.length; ++i) + $root.wm.protobuf.ChallengerCar.encode(message.challengers[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.ILoadStampTargetResponse} message LoadStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadStampTargetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.StampTargetCar.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.challengers && message.challengers.length)) + message.challengers = []; + message.challengers.push($root.wm.protobuf.ChallengerCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadStampTargetResponse message. + * @function verify + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadStampTargetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.StampTargetCar.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + if (message.challengers != null && message.hasOwnProperty("challengers")) { + if (!Array.isArray(message.challengers)) + return "challengers: array expected"; + for (let i = 0; i < message.challengers.length; ++i) { + let error = $root.wm.protobuf.ChallengerCar.verify(message.challengers[i]); + if (error) + return "challengers." + error; + } + } + return null; + }; + + /** + * Creates a LoadStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse + */ + LoadStampTargetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadStampTargetResponse) + return object; + let message = new $root.wm.protobuf.LoadStampTargetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.LoadStampTargetResponse.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.LoadStampTargetResponse.cars: object expected"); + message.cars[i] = $root.wm.protobuf.StampTargetCar.fromObject(object.cars[i]); + } + } + if (object.challengers) { + if (!Array.isArray(object.challengers)) + throw TypeError(".wm.protobuf.LoadStampTargetResponse.challengers: array expected"); + message.challengers = []; + for (let i = 0; i < object.challengers.length; ++i) { + if (typeof object.challengers[i] !== "object") + throw TypeError(".wm.protobuf.LoadStampTargetResponse.challengers: object expected"); + message.challengers[i] = $root.wm.protobuf.ChallengerCar.fromObject(object.challengers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadStampTargetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.LoadStampTargetResponse} message LoadStampTargetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadStampTargetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.cars = []; + object.challengers = []; + } + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.StampTargetCar.toObject(message.cars[j], options); + } + if (message.challengers && message.challengers.length) { + object.challengers = []; + for (let j = 0; j < message.challengers.length; ++j) + object.challengers[j] = $root.wm.protobuf.ChallengerCar.toObject(message.challengers[j], options); + } + return object; + }; + + /** + * Converts this LoadStampTargetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + * @returns {Object.} JSON object + */ + LoadStampTargetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadStampTargetResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadStampTargetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadStampTargetResponse"; + }; + + return LoadStampTargetResponse; + })(); + + protobuf.LockStampTargetRequest = (function() { + + /** + * Properties of a LockStampTargetRequest. + * @memberof wm.protobuf + * @interface ILockStampTargetRequest + * @property {number} carId LockStampTargetRequest carId + * @property {Array.|null} [targetCars] LockStampTargetRequest targetCars + */ + + /** + * Constructs a new LockStampTargetRequest. + * @memberof wm.protobuf + * @classdesc Represents a LockStampTargetRequest. + * @implements ILockStampTargetRequest + * @constructor + * @param {wm.protobuf.ILockStampTargetRequest=} [properties] Properties to set + */ + function LockStampTargetRequest(properties) { + this.targetCars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LockStampTargetRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LockStampTargetRequest + * @instance + */ + LockStampTargetRequest.prototype.carId = 0; + + /** + * LockStampTargetRequest targetCars. + * @member {Array.} targetCars + * @memberof wm.protobuf.LockStampTargetRequest + * @instance + */ + LockStampTargetRequest.prototype.targetCars = $util.emptyArray; + + /** + * Creates a new LockStampTargetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.ILockStampTargetRequest=} [properties] Properties to set + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest instance + */ + LockStampTargetRequest.create = function create(properties) { + return new LockStampTargetRequest(properties); + }; + + /** + * Encodes the specified LockStampTargetRequest message. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.ILockStampTargetRequest} message LockStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.targetCars != null && message.targetCars.length) + for (let i = 0; i < message.targetCars.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetCars[i]); + return writer; + }; + + /** + * Encodes the specified LockStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.ILockStampTargetRequest} message LockStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LockStampTargetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + if (!(message.targetCars && message.targetCars.length)) + message.targetCars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targetCars.push(reader.uint32()); + } else + message.targetCars.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LockStampTargetRequest message. + * @function verify + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LockStampTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.targetCars != null && message.hasOwnProperty("targetCars")) { + if (!Array.isArray(message.targetCars)) + return "targetCars: array expected"; + for (let i = 0; i < message.targetCars.length; ++i) + if (!$util.isInteger(message.targetCars[i])) + return "targetCars: integer[] expected"; + } + return null; + }; + + /** + * Creates a LockStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest + */ + LockStampTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LockStampTargetRequest) + return object; + let message = new $root.wm.protobuf.LockStampTargetRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.targetCars) { + if (!Array.isArray(object.targetCars)) + throw TypeError(".wm.protobuf.LockStampTargetRequest.targetCars: array expected"); + message.targetCars = []; + for (let i = 0; i < object.targetCars.length; ++i) + message.targetCars[i] = object.targetCars[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LockStampTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.LockStampTargetRequest} message LockStampTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LockStampTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.targetCars = []; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.targetCars && message.targetCars.length) { + object.targetCars = []; + for (let j = 0; j < message.targetCars.length; ++j) + object.targetCars[j] = message.targetCars[j]; + } + return object; + }; + + /** + * Converts this LockStampTargetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LockStampTargetRequest + * @instance + * @returns {Object.} JSON object + */ + LockStampTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LockStampTargetRequest + * @function getTypeUrl + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LockStampTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LockStampTargetRequest"; + }; + + return LockStampTargetRequest; + })(); + + protobuf.LockStampTargetResponse = (function() { + + /** + * Properties of a LockStampTargetResponse. + * @memberof wm.protobuf + * @interface ILockStampTargetResponse + * @property {wm.protobuf.ErrorCode} error LockStampTargetResponse error + */ + + /** + * Constructs a new LockStampTargetResponse. + * @memberof wm.protobuf + * @classdesc Represents a LockStampTargetResponse. + * @implements ILockStampTargetResponse + * @constructor + * @param {wm.protobuf.ILockStampTargetResponse=} [properties] Properties to set + */ + function LockStampTargetResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LockStampTargetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LockStampTargetResponse + * @instance + */ + LockStampTargetResponse.prototype.error = 0; + + /** + * Creates a new LockStampTargetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.ILockStampTargetResponse=} [properties] Properties to set + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse instance + */ + LockStampTargetResponse.create = function create(properties) { + return new LockStampTargetResponse(properties); + }; + + /** + * Encodes the specified LockStampTargetResponse message. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.ILockStampTargetResponse} message LockStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified LockStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.ILockStampTargetResponse} message LockStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LockStampTargetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LockStampTargetResponse message. + * @function verify + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LockStampTargetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a LockStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse + */ + LockStampTargetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LockStampTargetResponse) + return object; + let message = new $root.wm.protobuf.LockStampTargetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a LockStampTargetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.LockStampTargetResponse} message LockStampTargetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LockStampTargetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this LockStampTargetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LockStampTargetResponse + * @instance + * @returns {Object.} JSON object + */ + LockStampTargetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LockStampTargetResponse + * @function getTypeUrl + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LockStampTargetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LockStampTargetResponse"; + }; + + return LockStampTargetResponse; + })(); + + protobuf.LoadGhostCompetitionInfoRequest = (function() { + + /** + * Properties of a LoadGhostCompetitionInfoRequest. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionInfoRequest + * @property {number} carId LoadGhostCompetitionInfoRequest carId + * @property {number} competitionId LoadGhostCompetitionInfoRequest competitionId + */ + + /** + * Constructs a new LoadGhostCompetitionInfoRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionInfoRequest. + * @implements ILoadGhostCompetitionInfoRequest + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest=} [properties] Properties to set + */ + function LoadGhostCompetitionInfoRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionInfoRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @instance + */ + LoadGhostCompetitionInfoRequest.prototype.carId = 0; + + /** + * LoadGhostCompetitionInfoRequest competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @instance + */ + LoadGhostCompetitionInfoRequest.prototype.competitionId = 0; + + /** + * Creates a new LoadGhostCompetitionInfoRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest instance + */ + LoadGhostCompetitionInfoRequest.create = function create(properties) { + return new LoadGhostCompetitionInfoRequest(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest} message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.competitionId); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest} message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.competitionId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionInfoRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + return null; + }; + + /** + * Creates a LoadGhostCompetitionInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest + */ + LoadGhostCompetitionInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionInfoRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionInfoRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.LoadGhostCompetitionInfoRequest} message LoadGhostCompetitionInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.competitionId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + return object; + }; + + /** + * Converts this LoadGhostCompetitionInfoRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionInfoRequest"; + }; + + return LoadGhostCompetitionInfoRequest; + })(); + + protobuf.LoadGhostCompetitionInfoResponse = (function() { + + /** + * Properties of a LoadGhostCompetitionInfoResponse. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionInfoResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostCompetitionInfoResponse error + * @property {number|null} [periodId] LoadGhostCompetitionInfoResponse periodId + * @property {boolean} closed LoadGhostCompetitionInfoResponse closed + * @property {number|null} [brakingPoint] LoadGhostCompetitionInfoResponse brakingPoint + * @property {boolean|null} [qualified] LoadGhostCompetitionInfoResponse qualified + * @property {Array.|null} [topResults] LoadGhostCompetitionInfoResponse topResults + * @property {number|null} [result] LoadGhostCompetitionInfoResponse result + * @property {number|null} [rank] LoadGhostCompetitionInfoResponse rank + * @property {Array.|null} [parameters1] LoadGhostCompetitionInfoResponse parameters1 + * @property {boolean|null} [parameters2] LoadGhostCompetitionInfoResponse parameters2 + */ + + /** + * Constructs a new LoadGhostCompetitionInfoResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionInfoResponse. + * @implements ILoadGhostCompetitionInfoResponse + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse=} [properties] Properties to set + */ + function LoadGhostCompetitionInfoResponse(properties) { + this.topResults = []; + this.parameters1 = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionInfoResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.error = 0; + + /** + * LoadGhostCompetitionInfoResponse periodId. + * @member {number} periodId + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.periodId = 0; + + /** + * LoadGhostCompetitionInfoResponse closed. + * @member {boolean} closed + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.closed = false; + + /** + * LoadGhostCompetitionInfoResponse brakingPoint. + * @member {number} brakingPoint + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.brakingPoint = 0; + + /** + * LoadGhostCompetitionInfoResponse qualified. + * @member {boolean} qualified + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.qualified = false; + + /** + * LoadGhostCompetitionInfoResponse topResults. + * @member {Array.} topResults + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.topResults = $util.emptyArray; + + /** + * LoadGhostCompetitionInfoResponse result. + * @member {number} result + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.result = 0; + + /** + * LoadGhostCompetitionInfoResponse rank. + * @member {number} rank + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.rank = 0; + + /** + * LoadGhostCompetitionInfoResponse parameters1. + * @member {Array.} parameters1 + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.parameters1 = $util.emptyArray; + + /** + * LoadGhostCompetitionInfoResponse parameters2. + * @member {boolean} parameters2 + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.parameters2 = false; + + /** + * Creates a new LoadGhostCompetitionInfoResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse instance + */ + LoadGhostCompetitionInfoResponse.create = function create(properties) { + return new LoadGhostCompetitionInfoResponse(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse} message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.periodId != null && Object.hasOwnProperty.call(message, "periodId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.periodId); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.closed); + if (message.brakingPoint != null && Object.hasOwnProperty.call(message, "brakingPoint")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.brakingPoint); + if (message.qualified != null && Object.hasOwnProperty.call(message, "qualified")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.qualified); + if (message.topResults != null && message.topResults.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (let i = 0; i < message.topResults.length; ++i) + writer.sint32(message.topResults[i]); + writer.ldelim(); + } + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 7, wireType 0 =*/56).sint32(message.result); + if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.rank); + if (message.parameters1 != null && message.parameters1.length) + for (let i = 0; i < message.parameters1.length; ++i) + writer.uint32(/* id 9, wireType 5 =*/77).float(message.parameters1[i]); + if (message.parameters2 != null && Object.hasOwnProperty.call(message, "parameters2")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.parameters2); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse} message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.periodId = reader.uint32(); + break; + } + case 3: { + message.closed = reader.bool(); + break; + } + case 4: { + message.brakingPoint = reader.uint32(); + break; + } + case 5: { + message.qualified = reader.bool(); + break; + } + case 6: { + if (!(message.topResults && message.topResults.length)) + message.topResults = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.topResults.push(reader.sint32()); + } else + message.topResults.push(reader.sint32()); + break; + } + case 7: { + message.result = reader.sint32(); + break; + } + case 8: { + message.rank = reader.uint32(); + break; + } + case 9: { + if (!(message.parameters1 && message.parameters1.length)) + message.parameters1 = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.parameters1.push(reader.float()); + } else + message.parameters1.push(reader.float()); + break; + } + case 10: { + message.parameters2 = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("closed")) + throw $util.ProtocolError("missing required 'closed'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionInfoResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.periodId != null && message.hasOwnProperty("periodId")) + if (!$util.isInteger(message.periodId)) + return "periodId: integer expected"; + if (typeof message.closed !== "boolean") + return "closed: boolean expected"; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + if (!$util.isInteger(message.brakingPoint)) + return "brakingPoint: integer expected"; + if (message.qualified != null && message.hasOwnProperty("qualified")) + if (typeof message.qualified !== "boolean") + return "qualified: boolean expected"; + if (message.topResults != null && message.hasOwnProperty("topResults")) { + if (!Array.isArray(message.topResults)) + return "topResults: array expected"; + for (let i = 0; i < message.topResults.length; ++i) + if (!$util.isInteger(message.topResults[i])) + return "topResults: integer[] expected"; + } + if (message.result != null && message.hasOwnProperty("result")) + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (message.rank != null && message.hasOwnProperty("rank")) + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (message.parameters1 != null && message.hasOwnProperty("parameters1")) { + if (!Array.isArray(message.parameters1)) + return "parameters1: array expected"; + for (let i = 0; i < message.parameters1.length; ++i) + if (typeof message.parameters1[i] !== "number") + return "parameters1: number[] expected"; + } + if (message.parameters2 != null && message.hasOwnProperty("parameters2")) + if (typeof message.parameters2 !== "boolean") + return "parameters2: boolean expected"; + return null; + }; + + /** + * Creates a LoadGhostCompetitionInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse + */ + LoadGhostCompetitionInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionInfoResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionInfoResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.periodId != null) + message.periodId = object.periodId >>> 0; + if (object.closed != null) + message.closed = Boolean(object.closed); + if (object.brakingPoint != null) + message.brakingPoint = object.brakingPoint >>> 0; + if (object.qualified != null) + message.qualified = Boolean(object.qualified); + if (object.topResults) { + if (!Array.isArray(object.topResults)) + throw TypeError(".wm.protobuf.LoadGhostCompetitionInfoResponse.topResults: array expected"); + message.topResults = []; + for (let i = 0; i < object.topResults.length; ++i) + message.topResults[i] = object.topResults[i] | 0; + } + if (object.result != null) + message.result = object.result | 0; + if (object.rank != null) + message.rank = object.rank >>> 0; + if (object.parameters1) { + if (!Array.isArray(object.parameters1)) + throw TypeError(".wm.protobuf.LoadGhostCompetitionInfoResponse.parameters1: array expected"); + message.parameters1 = []; + for (let i = 0; i < object.parameters1.length; ++i) + message.parameters1[i] = Number(object.parameters1[i]); + } + if (object.parameters2 != null) + message.parameters2 = Boolean(object.parameters2); + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.LoadGhostCompetitionInfoResponse} message LoadGhostCompetitionInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.topResults = []; + object.parameters1 = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.periodId = 0; + object.closed = false; + object.brakingPoint = 0; + object.qualified = false; + object.result = 0; + object.rank = 0; + object.parameters2 = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.periodId != null && message.hasOwnProperty("periodId")) + object.periodId = message.periodId; + if (message.closed != null && message.hasOwnProperty("closed")) + object.closed = message.closed; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + object.brakingPoint = message.brakingPoint; + if (message.qualified != null && message.hasOwnProperty("qualified")) + object.qualified = message.qualified; + if (message.topResults && message.topResults.length) { + object.topResults = []; + for (let j = 0; j < message.topResults.length; ++j) + object.topResults[j] = message.topResults[j]; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.parameters1 && message.parameters1.length) { + object.parameters1 = []; + for (let j = 0; j < message.parameters1.length; ++j) + object.parameters1[j] = options.json && !isFinite(message.parameters1[j]) ? String(message.parameters1[j]) : message.parameters1[j]; + } + if (message.parameters2 != null && message.hasOwnProperty("parameters2")) + object.parameters2 = message.parameters2; + return object; + }; + + /** + * Converts this LoadGhostCompetitionInfoResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionInfoResponse"; + }; + + return LoadGhostCompetitionInfoResponse; + })(); + + protobuf.LoadTimeAttackRecordRequest = (function() { + + /** + * Properties of a LoadTimeAttackRecordRequest. + * @memberof wm.protobuf + * @interface ILoadTimeAttackRecordRequest + * @property {number|null} [carId] LoadTimeAttackRecordRequest carId + * @property {number} model LoadTimeAttackRecordRequest model + * @property {number} course LoadTimeAttackRecordRequest course + */ + + /** + * Constructs a new LoadTimeAttackRecordRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadTimeAttackRecordRequest. + * @implements ILoadTimeAttackRecordRequest + * @constructor + * @param {wm.protobuf.ILoadTimeAttackRecordRequest=} [properties] Properties to set + */ + function LoadTimeAttackRecordRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTimeAttackRecordRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + */ + LoadTimeAttackRecordRequest.prototype.carId = 0; + + /** + * LoadTimeAttackRecordRequest model. + * @member {number} model + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + */ + LoadTimeAttackRecordRequest.prototype.model = 0; + + /** + * LoadTimeAttackRecordRequest course. + * @member {number} course + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + */ + LoadTimeAttackRecordRequest.prototype.course = 0; + + /** + * Creates a new LoadTimeAttackRecordRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest instance + */ + LoadTimeAttackRecordRequest.create = function create(properties) { + return new LoadTimeAttackRecordRequest(properties); + }; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordRequest} message LoadTimeAttackRecordRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.model); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.course); + return writer; + }; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordRequest} message LoadTimeAttackRecordRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTimeAttackRecordRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.model = reader.uint32(); + break; + } + case 3: { + message.course = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("model")) + throw $util.ProtocolError("missing required 'model'", { instance: message }); + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTimeAttackRecordRequest message. + * @function verify + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTimeAttackRecordRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.model)) + return "model: integer expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + return null; + }; + + /** + * Creates a LoadTimeAttackRecordRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest + */ + LoadTimeAttackRecordRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTimeAttackRecordRequest) + return object; + let message = new $root.wm.protobuf.LoadTimeAttackRecordRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.model != null) + message.model = object.model >>> 0; + if (object.course != null) + message.course = object.course >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadTimeAttackRecordRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.LoadTimeAttackRecordRequest} message LoadTimeAttackRecordRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTimeAttackRecordRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.model = 0; + object.course = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + return object; + }; + + /** + * Converts this LoadTimeAttackRecordRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + * @returns {Object.} JSON object + */ + LoadTimeAttackRecordRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTimeAttackRecordRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTimeAttackRecordRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTimeAttackRecordRequest"; + }; + + return LoadTimeAttackRecordRequest; + })(); + + protobuf.LoadTimeAttackRecordResponse = (function() { + + /** + * Properties of a LoadTimeAttackRecordResponse. + * @memberof wm.protobuf + * @interface ILoadTimeAttackRecordResponse + * @property {wm.protobuf.ErrorCode} error LoadTimeAttackRecordResponse error + * @property {Array.|null} [wholeRanking] LoadTimeAttackRecordResponse wholeRanking + * @property {Array.|null} [modelRanking] LoadTimeAttackRecordResponse modelRanking + * @property {number|null} [personalBestTime] LoadTimeAttackRecordResponse personalBestTime + * @property {number|null} [pbSection_1Time] LoadTimeAttackRecordResponse pbSection_1Time + * @property {number|null} [pbSection_2Time] LoadTimeAttackRecordResponse pbSection_2Time + * @property {number|null} [pbSection_3Time] LoadTimeAttackRecordResponse pbSection_3Time + * @property {number|null} [pbSection_4Time] LoadTimeAttackRecordResponse pbSection_4Time + * @property {number|null} [pbSection_5Time] LoadTimeAttackRecordResponse pbSection_5Time + * @property {number|null} [pbSection_6Time] LoadTimeAttackRecordResponse pbSection_6Time + * @property {number|null} [pbSection_7Time] LoadTimeAttackRecordResponse pbSection_7Time + */ + + /** + * Constructs a new LoadTimeAttackRecordResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadTimeAttackRecordResponse. + * @implements ILoadTimeAttackRecordResponse + * @constructor + * @param {wm.protobuf.ILoadTimeAttackRecordResponse=} [properties] Properties to set + */ + function LoadTimeAttackRecordResponse(properties) { + this.wholeRanking = []; + this.modelRanking = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTimeAttackRecordResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.error = 0; + + /** + * LoadTimeAttackRecordResponse wholeRanking. + * @member {Array.} wholeRanking + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.wholeRanking = $util.emptyArray; + + /** + * LoadTimeAttackRecordResponse modelRanking. + * @member {Array.} modelRanking + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.modelRanking = $util.emptyArray; + + /** + * LoadTimeAttackRecordResponse personalBestTime. + * @member {number} personalBestTime + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.personalBestTime = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_1Time. + * @member {number} pbSection_1Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_1Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_2Time. + * @member {number} pbSection_2Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_2Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_3Time. + * @member {number} pbSection_3Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_3Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_4Time. + * @member {number} pbSection_4Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_4Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_5Time. + * @member {number} pbSection_5Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_5Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_6Time. + * @member {number} pbSection_6Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_6Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_7Time. + * @member {number} pbSection_7Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_7Time = 0; + + /** + * Creates a new LoadTimeAttackRecordResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse instance + */ + LoadTimeAttackRecordResponse.create = function create(properties) { + return new LoadTimeAttackRecordResponse(properties); + }; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordResponse} message LoadTimeAttackRecordResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.wholeRanking != null && message.wholeRanking.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (let i = 0; i < message.wholeRanking.length; ++i) + writer.uint32(message.wholeRanking[i]); + writer.ldelim(); + } + if (message.modelRanking != null && message.modelRanking.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (let i = 0; i < message.modelRanking.length; ++i) + writer.uint32(message.modelRanking[i]); + writer.ldelim(); + } + if (message.personalBestTime != null && Object.hasOwnProperty.call(message, "personalBestTime")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.personalBestTime); + if (message.pbSection_1Time != null && Object.hasOwnProperty.call(message, "pbSection_1Time")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.pbSection_1Time); + if (message.pbSection_2Time != null && Object.hasOwnProperty.call(message, "pbSection_2Time")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.pbSection_2Time); + if (message.pbSection_3Time != null && Object.hasOwnProperty.call(message, "pbSection_3Time")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.pbSection_3Time); + if (message.pbSection_4Time != null && Object.hasOwnProperty.call(message, "pbSection_4Time")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.pbSection_4Time); + if (message.pbSection_5Time != null && Object.hasOwnProperty.call(message, "pbSection_5Time")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.pbSection_5Time); + if (message.pbSection_6Time != null && Object.hasOwnProperty.call(message, "pbSection_6Time")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.pbSection_6Time); + if (message.pbSection_7Time != null && Object.hasOwnProperty.call(message, "pbSection_7Time")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.pbSection_7Time); + return writer; + }; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordResponse} message LoadTimeAttackRecordResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTimeAttackRecordResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.wholeRanking && message.wholeRanking.length)) + message.wholeRanking = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.wholeRanking.push(reader.uint32()); + } else + message.wholeRanking.push(reader.uint32()); + break; + } + case 3: { + if (!(message.modelRanking && message.modelRanking.length)) + message.modelRanking = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.modelRanking.push(reader.uint32()); + } else + message.modelRanking.push(reader.uint32()); + break; + } + case 4: { + message.personalBestTime = reader.uint32(); + break; + } + case 5: { + message.pbSection_1Time = reader.uint32(); + break; + } + case 6: { + message.pbSection_2Time = reader.uint32(); + break; + } + case 7: { + message.pbSection_3Time = reader.uint32(); + break; + } + case 8: { + message.pbSection_4Time = reader.uint32(); + break; + } + case 9: { + message.pbSection_5Time = reader.uint32(); + break; + } + case 10: { + message.pbSection_6Time = reader.uint32(); + break; + } + case 11: { + message.pbSection_7Time = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTimeAttackRecordResponse message. + * @function verify + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTimeAttackRecordResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.wholeRanking != null && message.hasOwnProperty("wholeRanking")) { + if (!Array.isArray(message.wholeRanking)) + return "wholeRanking: array expected"; + for (let i = 0; i < message.wholeRanking.length; ++i) + if (!$util.isInteger(message.wholeRanking[i])) + return "wholeRanking: integer[] expected"; + } + if (message.modelRanking != null && message.hasOwnProperty("modelRanking")) { + if (!Array.isArray(message.modelRanking)) + return "modelRanking: array expected"; + for (let i = 0; i < message.modelRanking.length; ++i) + if (!$util.isInteger(message.modelRanking[i])) + return "modelRanking: integer[] expected"; + } + if (message.personalBestTime != null && message.hasOwnProperty("personalBestTime")) + if (!$util.isInteger(message.personalBestTime)) + return "personalBestTime: integer expected"; + if (message.pbSection_1Time != null && message.hasOwnProperty("pbSection_1Time")) + if (!$util.isInteger(message.pbSection_1Time)) + return "pbSection_1Time: integer expected"; + if (message.pbSection_2Time != null && message.hasOwnProperty("pbSection_2Time")) + if (!$util.isInteger(message.pbSection_2Time)) + return "pbSection_2Time: integer expected"; + if (message.pbSection_3Time != null && message.hasOwnProperty("pbSection_3Time")) + if (!$util.isInteger(message.pbSection_3Time)) + return "pbSection_3Time: integer expected"; + if (message.pbSection_4Time != null && message.hasOwnProperty("pbSection_4Time")) + if (!$util.isInteger(message.pbSection_4Time)) + return "pbSection_4Time: integer expected"; + if (message.pbSection_5Time != null && message.hasOwnProperty("pbSection_5Time")) + if (!$util.isInteger(message.pbSection_5Time)) + return "pbSection_5Time: integer expected"; + if (message.pbSection_6Time != null && message.hasOwnProperty("pbSection_6Time")) + if (!$util.isInteger(message.pbSection_6Time)) + return "pbSection_6Time: integer expected"; + if (message.pbSection_7Time != null && message.hasOwnProperty("pbSection_7Time")) + if (!$util.isInteger(message.pbSection_7Time)) + return "pbSection_7Time: integer expected"; + return null; + }; + + /** + * Creates a LoadTimeAttackRecordResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse + */ + LoadTimeAttackRecordResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTimeAttackRecordResponse) + return object; + let message = new $root.wm.protobuf.LoadTimeAttackRecordResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.wholeRanking) { + if (!Array.isArray(object.wholeRanking)) + throw TypeError(".wm.protobuf.LoadTimeAttackRecordResponse.wholeRanking: array expected"); + message.wholeRanking = []; + for (let i = 0; i < object.wholeRanking.length; ++i) + message.wholeRanking[i] = object.wholeRanking[i] >>> 0; + } + if (object.modelRanking) { + if (!Array.isArray(object.modelRanking)) + throw TypeError(".wm.protobuf.LoadTimeAttackRecordResponse.modelRanking: array expected"); + message.modelRanking = []; + for (let i = 0; i < object.modelRanking.length; ++i) + message.modelRanking[i] = object.modelRanking[i] >>> 0; + } + if (object.personalBestTime != null) + message.personalBestTime = object.personalBestTime >>> 0; + if (object.pbSection_1Time != null) + message.pbSection_1Time = object.pbSection_1Time >>> 0; + if (object.pbSection_2Time != null) + message.pbSection_2Time = object.pbSection_2Time >>> 0; + if (object.pbSection_3Time != null) + message.pbSection_3Time = object.pbSection_3Time >>> 0; + if (object.pbSection_4Time != null) + message.pbSection_4Time = object.pbSection_4Time >>> 0; + if (object.pbSection_5Time != null) + message.pbSection_5Time = object.pbSection_5Time >>> 0; + if (object.pbSection_6Time != null) + message.pbSection_6Time = object.pbSection_6Time >>> 0; + if (object.pbSection_7Time != null) + message.pbSection_7Time = object.pbSection_7Time >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadTimeAttackRecordResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.LoadTimeAttackRecordResponse} message LoadTimeAttackRecordResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTimeAttackRecordResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.wholeRanking = []; + object.modelRanking = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.personalBestTime = 0; + object.pbSection_1Time = 0; + object.pbSection_2Time = 0; + object.pbSection_3Time = 0; + object.pbSection_4Time = 0; + object.pbSection_5Time = 0; + object.pbSection_6Time = 0; + object.pbSection_7Time = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.wholeRanking && message.wholeRanking.length) { + object.wholeRanking = []; + for (let j = 0; j < message.wholeRanking.length; ++j) + object.wholeRanking[j] = message.wholeRanking[j]; + } + if (message.modelRanking && message.modelRanking.length) { + object.modelRanking = []; + for (let j = 0; j < message.modelRanking.length; ++j) + object.modelRanking[j] = message.modelRanking[j]; + } + if (message.personalBestTime != null && message.hasOwnProperty("personalBestTime")) + object.personalBestTime = message.personalBestTime; + if (message.pbSection_1Time != null && message.hasOwnProperty("pbSection_1Time")) + object.pbSection_1Time = message.pbSection_1Time; + if (message.pbSection_2Time != null && message.hasOwnProperty("pbSection_2Time")) + object.pbSection_2Time = message.pbSection_2Time; + if (message.pbSection_3Time != null && message.hasOwnProperty("pbSection_3Time")) + object.pbSection_3Time = message.pbSection_3Time; + if (message.pbSection_4Time != null && message.hasOwnProperty("pbSection_4Time")) + object.pbSection_4Time = message.pbSection_4Time; + if (message.pbSection_5Time != null && message.hasOwnProperty("pbSection_5Time")) + object.pbSection_5Time = message.pbSection_5Time; + if (message.pbSection_6Time != null && message.hasOwnProperty("pbSection_6Time")) + object.pbSection_6Time = message.pbSection_6Time; + if (message.pbSection_7Time != null && message.hasOwnProperty("pbSection_7Time")) + object.pbSection_7Time = message.pbSection_7Time; + return object; + }; + + /** + * Converts this LoadTimeAttackRecordResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + * @returns {Object.} JSON object + */ + LoadTimeAttackRecordResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTimeAttackRecordResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTimeAttackRecordResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTimeAttackRecordResponse"; + }; + + return LoadTimeAttackRecordResponse; + })(); + + protobuf.SaveTerminalResultRequest = (function() { + + /** + * Properties of a SaveTerminalResultRequest. + * @memberof wm.protobuf + * @interface ISaveTerminalResultRequest + * @property {number} userId SaveTerminalResultRequest userId + * @property {number} timestamp SaveTerminalResultRequest timestamp + * @property {Array.|null} [carOrder] SaveTerminalResultRequest carOrder + * @property {Array.|null} [confirmedTutorials] SaveTerminalResultRequest confirmedTutorials + * @property {boolean|null} [garageMenuEntered] SaveTerminalResultRequest garageMenuEntered + */ + + /** + * Constructs a new SaveTerminalResultRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveTerminalResultRequest. + * @implements ISaveTerminalResultRequest + * @constructor + * @param {wm.protobuf.ISaveTerminalResultRequest=} [properties] Properties to set + */ + function SaveTerminalResultRequest(properties) { + this.carOrder = []; + this.confirmedTutorials = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveTerminalResultRequest userId. + * @member {number} userId + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.userId = 0; + + /** + * SaveTerminalResultRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.timestamp = 0; + + /** + * SaveTerminalResultRequest carOrder. + * @member {Array.} carOrder + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.carOrder = $util.emptyArray; + + /** + * SaveTerminalResultRequest confirmedTutorials. + * @member {Array.} confirmedTutorials + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.confirmedTutorials = $util.emptyArray; + + /** + * SaveTerminalResultRequest garageMenuEntered. + * @member {boolean} garageMenuEntered + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.garageMenuEntered = false; + + /** + * Creates a new SaveTerminalResultRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.ISaveTerminalResultRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest instance + */ + SaveTerminalResultRequest.create = function create(properties) { + return new SaveTerminalResultRequest(properties); + }; + + /** + * Encodes the specified SaveTerminalResultRequest message. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.ISaveTerminalResultRequest} message SaveTerminalResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.timestamp); + if (message.carOrder != null && message.carOrder.length) + for (let i = 0; i < message.carOrder.length; ++i) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.carOrder[i]); + if (message.confirmedTutorials != null && message.confirmedTutorials.length) + for (let i = 0; i < message.confirmedTutorials.length; ++i) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.confirmedTutorials[i]); + if (message.garageMenuEntered != null && Object.hasOwnProperty.call(message, "garageMenuEntered")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.garageMenuEntered); + return writer; + }; + + /** + * Encodes the specified SaveTerminalResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.ISaveTerminalResultRequest} message SaveTerminalResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveTerminalResultRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.timestamp = reader.uint32(); + break; + } + case 3: { + if (!(message.carOrder && message.carOrder.length)) + message.carOrder = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.carOrder.push(reader.uint32()); + } else + message.carOrder.push(reader.uint32()); + break; + } + case 5: { + if (!(message.confirmedTutorials && message.confirmedTutorials.length)) + message.confirmedTutorials = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.confirmedTutorials.push(reader.int32()); + } else + message.confirmedTutorials.push(reader.int32()); + break; + } + case 8: { + message.garageMenuEntered = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveTerminalResultRequest message. + * @function verify + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveTerminalResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (message.carOrder != null && message.hasOwnProperty("carOrder")) { + if (!Array.isArray(message.carOrder)) + return "carOrder: array expected"; + for (let i = 0; i < message.carOrder.length; ++i) + if (!$util.isInteger(message.carOrder[i])) + return "carOrder: integer[] expected"; + } + if (message.confirmedTutorials != null && message.hasOwnProperty("confirmedTutorials")) { + if (!Array.isArray(message.confirmedTutorials)) + return "confirmedTutorials: array expected"; + for (let i = 0; i < message.confirmedTutorials.length; ++i) + switch (message.confirmedTutorials[i]) { + default: + return "confirmedTutorials: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + break; + } + } + if (message.garageMenuEntered != null && message.hasOwnProperty("garageMenuEntered")) + if (typeof message.garageMenuEntered !== "boolean") + return "garageMenuEntered: boolean expected"; + return null; + }; + + /** + * Creates a SaveTerminalResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest + */ + SaveTerminalResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveTerminalResultRequest) + return object; + let message = new $root.wm.protobuf.SaveTerminalResultRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.carOrder) { + if (!Array.isArray(object.carOrder)) + throw TypeError(".wm.protobuf.SaveTerminalResultRequest.carOrder: array expected"); + message.carOrder = []; + for (let i = 0; i < object.carOrder.length; ++i) + message.carOrder[i] = object.carOrder[i] >>> 0; + } + if (object.confirmedTutorials) { + if (!Array.isArray(object.confirmedTutorials)) + throw TypeError(".wm.protobuf.SaveTerminalResultRequest.confirmedTutorials: array expected"); + message.confirmedTutorials = []; + for (let i = 0; i < object.confirmedTutorials.length; ++i) + switch (object.confirmedTutorials[i]) { + default: + case "TUTORIAL_ID_STORY": + case 0: + message.confirmedTutorials[i] = 0; + break; + case "TUTORIAL_ID_TIME_ATTACK": + case 1: + message.confirmedTutorials[i] = 1; + break; + case "TUTORIAL_ID_GHOST": + case 2: + message.confirmedTutorials[i] = 2; + break; + case "TUTORIAL_ID_GHOST_CHALLENGE": + case 3: + message.confirmedTutorials[i] = 3; + break; + case "TUTORIAL_ID_GHOST_LEVEL": + case 4: + message.confirmedTutorials[i] = 4; + break; + case "TUTORIAL_ID_UNUSED_5": + case 5: + message.confirmedTutorials[i] = 5; + break; + case "TUTORIAL_ID_GHOST_SEARCH": + case 6: + message.confirmedTutorials[i] = 6; + break; + case "TUTORIAL_ID_GHOST_COMPETITION": + case 7: + message.confirmedTutorials[i] = 7; + break; + case "TUTORIAL_ID_HP600_CARD": + case 8: + message.confirmedTutorials[i] = 8; + break; + case "TUTORIAL_ID_UNUSED_9": + case 9: + message.confirmedTutorials[i] = 9; + break; + case "TUTORIAL_ID_COMPETITION_QUALIFIED": + case 10: + message.confirmedTutorials[i] = 10; + break; + case "TUTORIAL_ID_COMPETITION_TERMINAL": + case 11: + message.confirmedTutorials[i] = 11; + break; + case "TUTORIAL_ID_COMPETITION_NOTICE": + case 12: + message.confirmedTutorials[i] = 12; + break; + case "TUTORIAL_ID_COMPETITION_FINISHED": + case 13: + message.confirmedTutorials[i] = 13; + break; + case "TUTORIAL_ID_UNUSED_14": + case 14: + message.confirmedTutorials[i] = 14; + break; + case "TUTORIAL_ID_UNUSED_15": + case 15: + message.confirmedTutorials[i] = 15; + break; + case "TUTORIAL_ID_UNUSED_16": + case 16: + message.confirmedTutorials[i] = 16; + break; + case "TUTORIAL_ID_UNUSED_17": + case 17: + message.confirmedTutorials[i] = 17; + break; + case "TUTORIAL_ID_UNUSED_18": + case 18: + message.confirmedTutorials[i] = 18; + break; + case "TUTORIAL_ID_UNUSED_19": + case 19: + message.confirmedTutorials[i] = 19; + break; + case "TUTORIAL_ID_GHOST_STAMP": + case 20: + message.confirmedTutorials[i] = 20; + break; + case "TUTORIAL_ID_GHOST_STAMP_DECLINED": + case 21: + message.confirmedTutorials[i] = 21; + break; + case "TUTORIAL_ID_GHOST_STAMP_FRIENDS": + case 22: + message.confirmedTutorials[i] = 22; + break; + case "TUTORIAL_ID_TERMINAL_SCRATCH": + case 23: + message.confirmedTutorials[i] = 23; + break; + case "TUTORIAL_ID_TURN_SCRATCH_SHEET": + case 24: + message.confirmedTutorials[i] = 24; + break; + case "TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN": + case 25: + message.confirmedTutorials[i] = 25; + break; + case "TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE": + case 26: + message.confirmedTutorials[i] = 26; + break; + case "TUTORIAL_ID_VS_CONTINUE_TICKET": + case 27: + message.confirmedTutorials[i] = 27; + break; + case "TUTORIAL_ID_UNUSED_28": + case 28: + message.confirmedTutorials[i] = 28; + break; + case "TUTORIAL_ID_UNUSED_29": + case 29: + message.confirmedTutorials[i] = 29; + break; + case "TUTORIAL_ID_UNUSED_30": + case 30: + message.confirmedTutorials[i] = 30; + break; + case "TUTORIAL_ID_DRESS_UP": + case 31: + message.confirmedTutorials[i] = 31; + break; + case "TUTORIAL_ID_MULTI_GHOST": + case 32: + message.confirmedTutorials[i] = 32; + break; + case "TUTORIAL_ID_STORY_NEW_FEATURE": + case 33: + message.confirmedTutorials[i] = 33; + break; + case "TUTORIAL_ID_GHOST_NEW_FEATURE": + case 34: + message.confirmedTutorials[i] = 34; + break; + case "TUTORIAL_ID_GHOST_REGION_MAP": + case 35: + message.confirmedTutorials[i] = 35; + break; + } + } + if (object.garageMenuEntered != null) + message.garageMenuEntered = Boolean(object.garageMenuEntered); + return message; + }; + + /** + * Creates a plain object from a SaveTerminalResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.SaveTerminalResultRequest} message SaveTerminalResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveTerminalResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.carOrder = []; + object.confirmedTutorials = []; + } + if (options.defaults) { + object.userId = 0; + object.timestamp = 0; + object.garageMenuEntered = false; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + if (message.carOrder && message.carOrder.length) { + object.carOrder = []; + for (let j = 0; j < message.carOrder.length; ++j) + object.carOrder[j] = message.carOrder[j]; + } + if (message.confirmedTutorials && message.confirmedTutorials.length) { + object.confirmedTutorials = []; + for (let j = 0; j < message.confirmedTutorials.length; ++j) + object.confirmedTutorials[j] = options.enums === String ? $root.wm.protobuf.TutorialType[message.confirmedTutorials[j]] : message.confirmedTutorials[j]; + } + if (message.garageMenuEntered != null && message.hasOwnProperty("garageMenuEntered")) + object.garageMenuEntered = message.garageMenuEntered; + return object; + }; + + /** + * Converts this SaveTerminalResultRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + * @returns {Object.} JSON object + */ + SaveTerminalResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveTerminalResultRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveTerminalResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveTerminalResultRequest"; + }; + + return SaveTerminalResultRequest; + })(); + + protobuf.SaveTerminalResultResponse = (function() { + + /** + * Properties of a SaveTerminalResultResponse. + * @memberof wm.protobuf + * @interface ISaveTerminalResultResponse + * @property {wm.protobuf.ErrorCode} error SaveTerminalResultResponse error + */ + + /** + * Constructs a new SaveTerminalResultResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveTerminalResultResponse. + * @implements ISaveTerminalResultResponse + * @constructor + * @param {wm.protobuf.ISaveTerminalResultResponse=} [properties] Properties to set + */ + function SaveTerminalResultResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveTerminalResultResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveTerminalResultResponse + * @instance + */ + SaveTerminalResultResponse.prototype.error = 0; + + /** + * Creates a new SaveTerminalResultResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.ISaveTerminalResultResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse instance + */ + SaveTerminalResultResponse.create = function create(properties) { + return new SaveTerminalResultResponse(properties); + }; + + /** + * Encodes the specified SaveTerminalResultResponse message. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.ISaveTerminalResultResponse} message SaveTerminalResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveTerminalResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.ISaveTerminalResultResponse} message SaveTerminalResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveTerminalResultResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveTerminalResultResponse message. + * @function verify + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveTerminalResultResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveTerminalResultResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse + */ + SaveTerminalResultResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveTerminalResultResponse) + return object; + let message = new $root.wm.protobuf.SaveTerminalResultResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveTerminalResultResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.SaveTerminalResultResponse} message SaveTerminalResultResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveTerminalResultResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveTerminalResultResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveTerminalResultResponse + * @instance + * @returns {Object.} JSON object + */ + SaveTerminalResultResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveTerminalResultResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveTerminalResultResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveTerminalResultResponse"; + }; + + return SaveTerminalResultResponse; + })(); + + protobuf.PingRequest = (function() { + + /** + * Properties of a PingRequest. + * @memberof wm.protobuf + * @interface IPingRequest + * @property {number|null} [ping] PingRequest ping + */ + + /** + * Constructs a new PingRequest. + * @memberof wm.protobuf + * @classdesc Represents a PingRequest. + * @implements IPingRequest + * @constructor + * @param {wm.protobuf.IPingRequest=} [properties] Properties to set + */ + function PingRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PingRequest ping. + * @member {number} ping + * @memberof wm.protobuf.PingRequest + * @instance + */ + PingRequest.prototype.ping = 0; + + /** + * Creates a new PingRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.IPingRequest=} [properties] Properties to set + * @returns {wm.protobuf.PingRequest} PingRequest instance + */ + PingRequest.create = function create(properties) { + return new PingRequest(properties); + }; + + /** + * Encodes the specified PingRequest message. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.IPingRequest} message PingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ping != null && Object.hasOwnProperty.call(message, "ping")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.ping); + return writer; + }; + + /** + * Encodes the specified PingRequest message, length delimited. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.IPingRequest} message PingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PingRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PingRequest} PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PingRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ping = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PingRequest} PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PingRequest message. + * @function verify + * @memberof wm.protobuf.PingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ping != null && message.hasOwnProperty("ping")) + if (!$util.isInteger(message.ping)) + return "ping: integer expected"; + return null; + }; + + /** + * Creates a PingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PingRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PingRequest} PingRequest + */ + PingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PingRequest) + return object; + let message = new $root.wm.protobuf.PingRequest(); + if (object.ping != null) + message.ping = object.ping >>> 0; + return message; + }; + + /** + * Creates a plain object from a PingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.PingRequest} message PingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.ping = 0; + if (message.ping != null && message.hasOwnProperty("ping")) + object.ping = message.ping; + return object; + }; + + /** + * Converts this PingRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.PingRequest + * @instance + * @returns {Object.} JSON object + */ + PingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PingRequest + * @function getTypeUrl + * @memberof wm.protobuf.PingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PingRequest"; + }; + + return PingRequest; + })(); + + protobuf.PingResponse = (function() { + + /** + * Properties of a PingResponse. + * @memberof wm.protobuf + * @interface IPingResponse + * @property {wm.protobuf.ErrorCode} error PingResponse error + * @property {number} pong PingResponse pong + */ + + /** + * Constructs a new PingResponse. + * @memberof wm.protobuf + * @classdesc Represents a PingResponse. + * @implements IPingResponse + * @constructor + * @param {wm.protobuf.IPingResponse=} [properties] Properties to set + */ + function PingResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PingResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.PingResponse + * @instance + */ + PingResponse.prototype.error = 0; + + /** + * PingResponse pong. + * @member {number} pong + * @memberof wm.protobuf.PingResponse + * @instance + */ + PingResponse.prototype.pong = 0; + + /** + * Creates a new PingResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.IPingResponse=} [properties] Properties to set + * @returns {wm.protobuf.PingResponse} PingResponse instance + */ + PingResponse.create = function create(properties) { + return new PingResponse(properties); + }; + + /** + * Encodes the specified PingResponse message. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.IPingResponse} message PingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.pong); + return writer; + }; + + /** + * Encodes the specified PingResponse message, length delimited. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.IPingResponse} message PingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PingResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PingResponse} PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PingResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.pong = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("pong")) + throw $util.ProtocolError("missing required 'pong'", { instance: message }); + return message; + }; + + /** + * Decodes a PingResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PingResponse} PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PingResponse message. + * @function verify + * @memberof wm.protobuf.PingResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PingResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.pong)) + return "pong: integer expected"; + return null; + }; + + /** + * Creates a PingResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PingResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PingResponse} PingResponse + */ + PingResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PingResponse) + return object; + let message = new $root.wm.protobuf.PingResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.pong != null) + message.pong = object.pong >>> 0; + return message; + }; + + /** + * Creates a plain object from a PingResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.PingResponse} message PingResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PingResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.pong = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.pong != null && message.hasOwnProperty("pong")) + object.pong = message.pong; + return object; + }; + + /** + * Converts this PingResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.PingResponse + * @instance + * @returns {Object.} JSON object + */ + PingResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PingResponse + * @function getTypeUrl + * @memberof wm.protobuf.PingResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PingResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PingResponse"; + }; + + return PingResponse; + })(); + + protobuf.LoadTerminalInformationRequest = (function() { + + /** + * Properties of a LoadTerminalInformationRequest. + * @memberof wm.protobuf + * @interface ILoadTerminalInformationRequest + * @property {number} userId LoadTerminalInformationRequest userId + */ + + /** + * Constructs a new LoadTerminalInformationRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadTerminalInformationRequest. + * @implements ILoadTerminalInformationRequest + * @constructor + * @param {wm.protobuf.ILoadTerminalInformationRequest=} [properties] Properties to set + */ + function LoadTerminalInformationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTerminalInformationRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @instance + */ + LoadTerminalInformationRequest.prototype.userId = 0; + + /** + * Creates a new LoadTerminalInformationRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.ILoadTerminalInformationRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest instance + */ + LoadTerminalInformationRequest.create = function create(properties) { + return new LoadTerminalInformationRequest(properties); + }; + + /** + * Encodes the specified LoadTerminalInformationRequest message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.ILoadTerminalInformationRequest} message LoadTerminalInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadTerminalInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.ILoadTerminalInformationRequest} message LoadTerminalInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTerminalInformationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTerminalInformationRequest message. + * @function verify + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTerminalInformationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadTerminalInformationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest + */ + LoadTerminalInformationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTerminalInformationRequest) + return object; + let message = new $root.wm.protobuf.LoadTerminalInformationRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadTerminalInformationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.LoadTerminalInformationRequest} message LoadTerminalInformationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTerminalInformationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadTerminalInformationRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @instance + * @returns {Object.} JSON object + */ + LoadTerminalInformationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTerminalInformationRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTerminalInformationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTerminalInformationRequest"; + }; + + return LoadTerminalInformationRequest; + })(); + + protobuf.LoadTerminalInformationResponse = (function() { + + /** + * Properties of a LoadTerminalInformationResponse. + * @memberof wm.protobuf + * @interface ILoadTerminalInformationResponse + * @property {wm.protobuf.ErrorCode} error LoadTerminalInformationResponse error + * @property {boolean} prizeReceivable LoadTerminalInformationResponse prizeReceivable + * @property {Array.|null} [noticeEntries] LoadTerminalInformationResponse noticeEntries + * @property {Array.|null} [noticeMessage] LoadTerminalInformationResponse noticeMessage + * @property {Array.|null} [noticeWindow] LoadTerminalInformationResponse noticeWindow + * @property {Array.|null} [noticeWindowMessage] LoadTerminalInformationResponse noticeWindowMessage + * @property {wm.protobuf.ITransferNotice} transferNotice LoadTerminalInformationResponse transferNotice + * @property {boolean} announceFeature LoadTerminalInformationResponse announceFeature + * @property {boolean} freeScratched LoadTerminalInformationResponse freeScratched + * @property {Array.|null} [restrictedModels] LoadTerminalInformationResponse restrictedModels + */ + + /** + * Constructs a new LoadTerminalInformationResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadTerminalInformationResponse. + * @implements ILoadTerminalInformationResponse + * @constructor + * @param {wm.protobuf.ILoadTerminalInformationResponse=} [properties] Properties to set + */ + function LoadTerminalInformationResponse(properties) { + this.noticeEntries = []; + this.noticeMessage = []; + this.noticeWindow = []; + this.noticeWindowMessage = []; + this.restrictedModels = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTerminalInformationResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.error = 0; + + /** + * LoadTerminalInformationResponse prizeReceivable. + * @member {boolean} prizeReceivable + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.prizeReceivable = false; + + /** + * LoadTerminalInformationResponse noticeEntries. + * @member {Array.} noticeEntries + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeEntries = $util.emptyArray; + + /** + * LoadTerminalInformationResponse noticeMessage. + * @member {Array.} noticeMessage + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeMessage = $util.emptyArray; + + /** + * LoadTerminalInformationResponse noticeWindow. + * @member {Array.} noticeWindow + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeWindow = $util.emptyArray; + + /** + * LoadTerminalInformationResponse noticeWindowMessage. + * @member {Array.} noticeWindowMessage + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeWindowMessage = $util.emptyArray; + + /** + * LoadTerminalInformationResponse transferNotice. + * @member {wm.protobuf.ITransferNotice} transferNotice + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.transferNotice = null; + + /** + * LoadTerminalInformationResponse announceFeature. + * @member {boolean} announceFeature + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.announceFeature = false; + + /** + * LoadTerminalInformationResponse freeScratched. + * @member {boolean} freeScratched + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.freeScratched = false; + + /** + * LoadTerminalInformationResponse restrictedModels. + * @member {Array.} restrictedModels + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.restrictedModels = $util.emptyArray; + + /** + * Creates a new LoadTerminalInformationResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.ILoadTerminalInformationResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse instance + */ + LoadTerminalInformationResponse.create = function create(properties) { + return new LoadTerminalInformationResponse(properties); + }; + + /** + * Encodes the specified LoadTerminalInformationResponse message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.ILoadTerminalInformationResponse} message LoadTerminalInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.restrictedModels != null && message.restrictedModels.length) + for (let i = 0; i < message.restrictedModels.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.restrictedModels[i]); + if (message.noticeEntries != null && message.noticeEntries.length) + for (let i = 0; i < message.noticeEntries.length; ++i) + $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.encode(message.noticeEntries[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.noticeMessage != null && message.noticeMessage.length) + for (let i = 0; i < message.noticeMessage.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.noticeMessage[i]); + if (message.noticeWindow != null && message.noticeWindow.length) + for (let i = 0; i < message.noticeWindow.length; ++i) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.noticeWindow[i]); + if (message.noticeWindowMessage != null && message.noticeWindowMessage.length) + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.noticeWindowMessage[i]); + $root.wm.protobuf.TransferNotice.encode(message.transferNotice, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.announceFeature); + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.prizeReceivable); + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.freeScratched); + return writer; + }; + + /** + * Encodes the specified LoadTerminalInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.ILoadTerminalInformationResponse} message LoadTerminalInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTerminalInformationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 17: { + message.prizeReceivable = reader.bool(); + break; + } + case 10: { + if (!(message.noticeEntries && message.noticeEntries.length)) + message.noticeEntries = []; + message.noticeEntries.push($root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.decode(reader, reader.uint32())); + break; + } + case 11: { + if (!(message.noticeMessage && message.noticeMessage.length)) + message.noticeMessage = []; + message.noticeMessage.push(reader.string()); + break; + } + case 12: { + if (!(message.noticeWindow && message.noticeWindow.length)) + message.noticeWindow = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.noticeWindow.push(reader.int32()); + } else + message.noticeWindow.push(reader.int32()); + break; + } + case 13: { + if (!(message.noticeWindowMessage && message.noticeWindowMessage.length)) + message.noticeWindowMessage = []; + message.noticeWindowMessage.push(reader.string()); + break; + } + case 14: { + message.transferNotice = $root.wm.protobuf.TransferNotice.decode(reader, reader.uint32()); + break; + } + case 16: { + message.announceFeature = reader.bool(); + break; + } + case 18: { + message.freeScratched = reader.bool(); + break; + } + case 2: { + if (!(message.restrictedModels && message.restrictedModels.length)) + message.restrictedModels = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedModels.push(reader.uint32()); + } else + message.restrictedModels.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("prizeReceivable")) + throw $util.ProtocolError("missing required 'prizeReceivable'", { instance: message }); + if (!message.hasOwnProperty("transferNotice")) + throw $util.ProtocolError("missing required 'transferNotice'", { instance: message }); + if (!message.hasOwnProperty("announceFeature")) + throw $util.ProtocolError("missing required 'announceFeature'", { instance: message }); + if (!message.hasOwnProperty("freeScratched")) + throw $util.ProtocolError("missing required 'freeScratched'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTerminalInformationResponse message. + * @function verify + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTerminalInformationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (typeof message.prizeReceivable !== "boolean") + return "prizeReceivable: boolean expected"; + if (message.noticeEntries != null && message.hasOwnProperty("noticeEntries")) { + if (!Array.isArray(message.noticeEntries)) + return "noticeEntries: array expected"; + for (let i = 0; i < message.noticeEntries.length; ++i) { + let error = $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify(message.noticeEntries[i]); + if (error) + return "noticeEntries." + error; + } + } + if (message.noticeMessage != null && message.hasOwnProperty("noticeMessage")) { + if (!Array.isArray(message.noticeMessage)) + return "noticeMessage: array expected"; + for (let i = 0; i < message.noticeMessage.length; ++i) + if (!$util.isString(message.noticeMessage[i])) + return "noticeMessage: string[] expected"; + } + if (message.noticeWindow != null && message.hasOwnProperty("noticeWindow")) { + if (!Array.isArray(message.noticeWindow)) + return "noticeWindow: array expected"; + for (let i = 0; i < message.noticeWindow.length; ++i) + switch (message.noticeWindow[i]) { + default: + return "noticeWindow: enum value[] expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + } + if (message.noticeWindowMessage != null && message.hasOwnProperty("noticeWindowMessage")) { + if (!Array.isArray(message.noticeWindowMessage)) + return "noticeWindowMessage: array expected"; + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + if (!$util.isString(message.noticeWindowMessage[i])) + return "noticeWindowMessage: string[] expected"; + } + { + let error = $root.wm.protobuf.TransferNotice.verify(message.transferNotice); + if (error) + return "transferNotice." + error; + } + if (typeof message.announceFeature !== "boolean") + return "announceFeature: boolean expected"; + if (typeof message.freeScratched !== "boolean") + return "freeScratched: boolean expected"; + if (message.restrictedModels != null && message.hasOwnProperty("restrictedModels")) { + if (!Array.isArray(message.restrictedModels)) + return "restrictedModels: array expected"; + for (let i = 0; i < message.restrictedModels.length; ++i) + if (!$util.isInteger(message.restrictedModels[i])) + return "restrictedModels: integer[] expected"; + } + return null; + }; + + /** + * Creates a LoadTerminalInformationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse + */ + LoadTerminalInformationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTerminalInformationResponse) + return object; + let message = new $root.wm.protobuf.LoadTerminalInformationResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.prizeReceivable != null) + message.prizeReceivable = Boolean(object.prizeReceivable); + if (object.noticeEntries) { + if (!Array.isArray(object.noticeEntries)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeEntries: array expected"); + message.noticeEntries = []; + for (let i = 0; i < object.noticeEntries.length; ++i) { + if (typeof object.noticeEntries[i] !== "object") + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeEntries: object expected"); + message.noticeEntries[i] = $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.fromObject(object.noticeEntries[i]); + } + } + if (object.noticeMessage) { + if (!Array.isArray(object.noticeMessage)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeMessage: array expected"); + message.noticeMessage = []; + for (let i = 0; i < object.noticeMessage.length; ++i) + message.noticeMessage[i] = String(object.noticeMessage[i]); + } + if (object.noticeWindow) { + if (!Array.isArray(object.noticeWindow)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeWindow: array expected"); + message.noticeWindow = []; + for (let i = 0; i < object.noticeWindow.length; ++i) + switch (object.noticeWindow[i]) { + default: + case "NOTICE_UNUSED_1": + case 1: + message.noticeWindow[i] = 1; + break; + case "NOTICE_UNUSED_2": + case 2: + message.noticeWindow[i] = 2; + break; + case "NOTICE_UNUSED_3": + case 3: + message.noticeWindow[i] = 3; + break; + case "NOTICE_UNUSED_4": + case 4: + message.noticeWindow[i] = 4; + break; + case "NOTICE_UNUSED_5": + case 5: + message.noticeWindow[i] = 5; + break; + case "NOTICE_UNUSED_6": + case 6: + message.noticeWindow[i] = 6; + break; + case "NOTICE_UNUSED_7": + case 7: + message.noticeWindow[i] = 7; + break; + case "NOTICE_UNUSED_8": + case 8: + message.noticeWindow[i] = 8; + break; + case "NOTICE_UNUSED_9": + case 9: + message.noticeWindow[i] = 9; + break; + case "NOTICE_UNUSED_10": + case 10: + message.noticeWindow[i] = 10; + break; + case "NOTICE_UNUSED_11": + case 11: + message.noticeWindow[i] = 11; + break; + case "NOTICE_UNUSED_12": + case 12: + message.noticeWindow[i] = 12; + break; + } + } + if (object.noticeWindowMessage) { + if (!Array.isArray(object.noticeWindowMessage)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeWindowMessage: array expected"); + message.noticeWindowMessage = []; + for (let i = 0; i < object.noticeWindowMessage.length; ++i) + message.noticeWindowMessage[i] = String(object.noticeWindowMessage[i]); + } + if (object.transferNotice != null) { + if (typeof object.transferNotice !== "object") + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.transferNotice: object expected"); + message.transferNotice = $root.wm.protobuf.TransferNotice.fromObject(object.transferNotice); + } + if (object.announceFeature != null) + message.announceFeature = Boolean(object.announceFeature); + if (object.freeScratched != null) + message.freeScratched = Boolean(object.freeScratched); + if (object.restrictedModels) { + if (!Array.isArray(object.restrictedModels)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.restrictedModels: array expected"); + message.restrictedModels = []; + for (let i = 0; i < object.restrictedModels.length; ++i) + message.restrictedModels[i] = object.restrictedModels[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LoadTerminalInformationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse} message LoadTerminalInformationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTerminalInformationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.restrictedModels = []; + object.noticeEntries = []; + object.noticeMessage = []; + object.noticeWindow = []; + object.noticeWindowMessage = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.transferNotice = null; + object.announceFeature = false; + object.prizeReceivable = false; + object.freeScratched = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.restrictedModels && message.restrictedModels.length) { + object.restrictedModels = []; + for (let j = 0; j < message.restrictedModels.length; ++j) + object.restrictedModels[j] = message.restrictedModels[j]; + } + if (message.noticeEntries && message.noticeEntries.length) { + object.noticeEntries = []; + for (let j = 0; j < message.noticeEntries.length; ++j) + object.noticeEntries[j] = $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.toObject(message.noticeEntries[j], options); + } + if (message.noticeMessage && message.noticeMessage.length) { + object.noticeMessage = []; + for (let j = 0; j < message.noticeMessage.length; ++j) + object.noticeMessage[j] = message.noticeMessage[j]; + } + if (message.noticeWindow && message.noticeWindow.length) { + object.noticeWindow = []; + for (let j = 0; j < message.noticeWindow.length; ++j) + object.noticeWindow[j] = options.enums === String ? $root.wm.protobuf.NoticeEntry[message.noticeWindow[j]] : message.noticeWindow[j]; + } + if (message.noticeWindowMessage && message.noticeWindowMessage.length) { + object.noticeWindowMessage = []; + for (let j = 0; j < message.noticeWindowMessage.length; ++j) + object.noticeWindowMessage[j] = message.noticeWindowMessage[j]; + } + if (message.transferNotice != null && message.hasOwnProperty("transferNotice")) + object.transferNotice = $root.wm.protobuf.TransferNotice.toObject(message.transferNotice, options); + if (message.announceFeature != null && message.hasOwnProperty("announceFeature")) + object.announceFeature = message.announceFeature; + if (message.prizeReceivable != null && message.hasOwnProperty("prizeReceivable")) + object.prizeReceivable = message.prizeReceivable; + if (message.freeScratched != null && message.hasOwnProperty("freeScratched")) + object.freeScratched = message.freeScratched; + return object; + }; + + /** + * Converts this LoadTerminalInformationResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + * @returns {Object.} JSON object + */ + LoadTerminalInformationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTerminalInformationResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTerminalInformationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTerminalInformationResponse"; + }; + + LoadTerminalInformationResponse.TerminalNotice = (function() { + + /** + * Properties of a TerminalNotice. + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @interface ITerminalNotice + * @property {wm.protobuf.NoticeEntry} noticeType TerminalNotice noticeType + * @property {string|null} [field_1] TerminalNotice field_1 + * @property {number|null} [field_2] TerminalNotice field_2 + * @property {number|null} [field_3] TerminalNotice field_3 + */ + + /** + * Constructs a new TerminalNotice. + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @classdesc Represents a TerminalNotice. + * @implements ITerminalNotice + * @constructor + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice=} [properties] Properties to set + */ + function TerminalNotice(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerminalNotice noticeType. + * @member {wm.protobuf.NoticeEntry} noticeType + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.noticeType = 1; + + /** + * TerminalNotice field_1. + * @member {string} field_1 + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.field_1 = ""; + + /** + * TerminalNotice field_2. + * @member {number} field_2 + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.field_2 = 0; + + /** + * TerminalNotice field_3. + * @member {number} field_3 + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.field_3 = 0; + + /** + * Creates a new TerminalNotice instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice=} [properties] Properties to set + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice instance + */ + TerminalNotice.create = function create(properties) { + return new TerminalNotice(properties); + }; + + /** + * Encodes the specified TerminalNotice message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice} message TerminalNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalNotice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.noticeType); + if (message.field_1 != null && Object.hasOwnProperty.call(message, "field_1")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.field_1); + if (message.field_2 != null && Object.hasOwnProperty.call(message, "field_2")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.field_2); + if (message.field_3 != null && Object.hasOwnProperty.call(message, "field_3")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.field_3); + return writer; + }; + + /** + * Encodes the specified TerminalNotice message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice} message TerminalNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalNotice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalNotice.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.noticeType = reader.int32(); + break; + } + case 2: { + message.field_1 = reader.string(); + break; + } + case 3: { + message.field_2 = reader.uint32(); + break; + } + case 4: { + message.field_3 = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("noticeType")) + throw $util.ProtocolError("missing required 'noticeType'", { instance: message }); + return message; + }; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalNotice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerminalNotice message. + * @function verify + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerminalNotice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.noticeType) { + default: + return "noticeType: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + if (message.field_1 != null && message.hasOwnProperty("field_1")) + if (!$util.isString(message.field_1)) + return "field_1: string expected"; + if (message.field_2 != null && message.hasOwnProperty("field_2")) + if (!$util.isInteger(message.field_2)) + return "field_2: integer expected"; + if (message.field_3 != null && message.hasOwnProperty("field_3")) + if (!$util.isInteger(message.field_3)) + return "field_3: integer expected"; + return null; + }; + + /** + * Creates a TerminalNotice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice + */ + TerminalNotice.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice) + return object; + let message = new $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice(); + switch (object.noticeType) { + case "NOTICE_UNUSED_1": + case 1: + message.noticeType = 1; + break; + case "NOTICE_UNUSED_2": + case 2: + message.noticeType = 2; + break; + case "NOTICE_UNUSED_3": + case 3: + message.noticeType = 3; + break; + case "NOTICE_UNUSED_4": + case 4: + message.noticeType = 4; + break; + case "NOTICE_UNUSED_5": + case 5: + message.noticeType = 5; + break; + case "NOTICE_UNUSED_6": + case 6: + message.noticeType = 6; + break; + case "NOTICE_UNUSED_7": + case 7: + message.noticeType = 7; + break; + case "NOTICE_UNUSED_8": + case 8: + message.noticeType = 8; + break; + case "NOTICE_UNUSED_9": + case 9: + message.noticeType = 9; + break; + case "NOTICE_UNUSED_10": + case 10: + message.noticeType = 10; + break; + case "NOTICE_UNUSED_11": + case 11: + message.noticeType = 11; + break; + case "NOTICE_UNUSED_12": + case 12: + message.noticeType = 12; + break; + } + if (object.field_1 != null) + message.field_1 = String(object.field_1); + if (object.field_2 != null) + message.field_2 = object.field_2 >>> 0; + if (object.field_3 != null) + message.field_3 = object.field_3 >>> 0; + return message; + }; + + /** + * Creates a plain object from a TerminalNotice message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} message TerminalNotice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerminalNotice.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.noticeType = options.enums === String ? "NOTICE_UNUSED_1" : 1; + object.field_1 = ""; + object.field_2 = 0; + object.field_3 = 0; + } + if (message.noticeType != null && message.hasOwnProperty("noticeType")) + object.noticeType = options.enums === String ? $root.wm.protobuf.NoticeEntry[message.noticeType] : message.noticeType; + if (message.field_1 != null && message.hasOwnProperty("field_1")) + object.field_1 = message.field_1; + if (message.field_2 != null && message.hasOwnProperty("field_2")) + object.field_2 = message.field_2; + if (message.field_3 != null && message.hasOwnProperty("field_3")) + object.field_3 = message.field_3; + return object; + }; + + /** + * Converts this TerminalNotice to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + * @returns {Object.} JSON object + */ + TerminalNotice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerminalNotice + * @function getTypeUrl + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerminalNotice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTerminalInformationResponse.TerminalNotice"; + }; + + return TerminalNotice; + })(); + + return LoadTerminalInformationResponse; + })(); + + protobuf.CreateUserRequest = (function() { + + /** + * Properties of a CreateUserRequest. + * @memberof wm.protobuf + * @interface ICreateUserRequest + * @property {number|null} [banapassportAmId] CreateUserRequest banapassportAmId + * @property {string|null} [cardChipId] CreateUserRequest cardChipId + * @property {string|null} [accessCode] CreateUserRequest accessCode + * @property {number|null} [cardTypeCode] CreateUserRequest cardTypeCode + * @property {number|null} [cardRegionCode] CreateUserRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] CreateUserRequest device + * @property {number} timestamp CreateUserRequest timestamp + */ + + /** + * Constructs a new CreateUserRequest. + * @memberof wm.protobuf + * @classdesc Represents a CreateUserRequest. + * @implements ICreateUserRequest + * @constructor + * @param {wm.protobuf.ICreateUserRequest=} [properties] Properties to set + */ + function CreateUserRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserRequest banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.banapassportAmId = 0; + + /** + * CreateUserRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.cardChipId = ""; + + /** + * CreateUserRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.accessCode = ""; + + /** + * CreateUserRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.cardTypeCode = 0; + + /** + * CreateUserRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.cardRegionCode = 0; + + /** + * CreateUserRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.device = 0; + + /** + * CreateUserRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.timestamp = 0; + + /** + * Creates a new CreateUserRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.ICreateUserRequest=} [properties] Properties to set + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest instance + */ + CreateUserRequest.create = function create(properties) { + return new CreateUserRequest(properties); + }; + + /** + * Encodes the specified CreateUserRequest message. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.ICreateUserRequest} message CreateUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.banapassportAmId); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.device); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified CreateUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.ICreateUserRequest} message CreateUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateUserRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.banapassportAmId = reader.uint32(); + break; + } + case 2: { + message.cardChipId = reader.string(); + break; + } + case 3: { + message.accessCode = reader.string(); + break; + } + case 4: { + message.cardTypeCode = reader.uint32(); + break; + } + case 5: { + message.cardRegionCode = reader.uint32(); + break; + } + case 6: { + message.device = reader.int32(); + break; + } + case 7: { + message.timestamp = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserRequest message. + * @function verify + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + return null; + }; + + /** + * Creates a CreateUserRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest + */ + CreateUserRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateUserRequest) + return object; + let message = new $root.wm.protobuf.CreateUserRequest(); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateUserRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.CreateUserRequest} message CreateUserRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.banapassportAmId = 0; + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.timestamp = 0; + } + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this CreateUserRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateUserRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUserRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserRequest + * @function getTypeUrl + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateUserRequest"; + }; + + return CreateUserRequest; + })(); + + protobuf.CreateUserResponse = (function() { + + /** + * Properties of a CreateUserResponse. + * @memberof wm.protobuf + * @interface ICreateUserResponse + * @property {wm.protobuf.ErrorCode} error CreateUserResponse error + * @property {string|null} [accessCode] CreateUserResponse accessCode + * @property {number|null} [banapassportAmId] CreateUserResponse banapassportAmId + * @property {number|null} [mbid] CreateUserResponse mbid + * @property {number} userId CreateUserResponse userId + */ + + /** + * Constructs a new CreateUserResponse. + * @memberof wm.protobuf + * @classdesc Represents a CreateUserResponse. + * @implements ICreateUserResponse + * @constructor + * @param {wm.protobuf.ICreateUserResponse=} [properties] Properties to set + */ + function CreateUserResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.error = 0; + + /** + * CreateUserResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.accessCode = ""; + + /** + * CreateUserResponse banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.banapassportAmId = 0; + + /** + * CreateUserResponse mbid. + * @member {number} mbid + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.mbid = 0; + + /** + * CreateUserResponse userId. + * @member {number} userId + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.userId = 0; + + /** + * Creates a new CreateUserResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.ICreateUserResponse=} [properties] Properties to set + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse instance + */ + CreateUserResponse.create = function create(properties) { + return new CreateUserResponse(properties); + }; + + /** + * Encodes the specified CreateUserResponse message. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.ICreateUserResponse} message CreateUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.banapassportAmId); + if (message.mbid != null && Object.hasOwnProperty.call(message, "mbid")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mbid); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified CreateUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.ICreateUserResponse} message CreateUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateUserResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + case 3: { + message.banapassportAmId = reader.uint32(); + break; + } + case 4: { + message.mbid = reader.uint32(); + break; + } + case 5: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserResponse message. + * @function verify + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.mbid != null && message.hasOwnProperty("mbid")) + if (!$util.isInteger(message.mbid)) + return "mbid: integer expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a CreateUserResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse + */ + CreateUserResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateUserResponse) + return object; + let message = new $root.wm.protobuf.CreateUserResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.mbid != null) + message.mbid = object.mbid >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateUserResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.CreateUserResponse} message CreateUserResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.accessCode = ""; + object.banapassportAmId = 0; + object.mbid = 0; + object.userId = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.mbid != null && message.hasOwnProperty("mbid")) + object.mbid = message.mbid; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this CreateUserResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateUserResponse + * @instance + * @returns {Object.} JSON object + */ + CreateUserResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserResponse + * @function getTypeUrl + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateUserResponse"; + }; + + return CreateUserResponse; + })(); + + protobuf.AskAccessCodeRequest = (function() { + + /** + * Properties of an AskAccessCodeRequest. + * @memberof wm.protobuf + * @interface IAskAccessCodeRequest + * @property {string} cardChipId AskAccessCodeRequest cardChipId + */ + + /** + * Constructs a new AskAccessCodeRequest. + * @memberof wm.protobuf + * @classdesc Represents an AskAccessCodeRequest. + * @implements IAskAccessCodeRequest + * @constructor + * @param {wm.protobuf.IAskAccessCodeRequest=} [properties] Properties to set + */ + function AskAccessCodeRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AskAccessCodeRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.AskAccessCodeRequest + * @instance + */ + AskAccessCodeRequest.prototype.cardChipId = ""; + + /** + * Creates a new AskAccessCodeRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.IAskAccessCodeRequest=} [properties] Properties to set + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest instance + */ + AskAccessCodeRequest.create = function create(properties) { + return new AskAccessCodeRequest(properties); + }; + + /** + * Encodes the specified AskAccessCodeRequest message. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.IAskAccessCodeRequest} message AskAccessCodeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cardChipId); + return writer; + }; + + /** + * Encodes the specified AskAccessCodeRequest message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.IAskAccessCodeRequest} message AskAccessCodeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.AskAccessCodeRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cardChipId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("cardChipId")) + throw $util.ProtocolError("missing required 'cardChipId'", { instance: message }); + return message; + }; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AskAccessCodeRequest message. + * @function verify + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AskAccessCodeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + return null; + }; + + /** + * Creates an AskAccessCodeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest + */ + AskAccessCodeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.AskAccessCodeRequest) + return object; + let message = new $root.wm.protobuf.AskAccessCodeRequest(); + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + return message; + }; + + /** + * Creates a plain object from an AskAccessCodeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.AskAccessCodeRequest} message AskAccessCodeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AskAccessCodeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.cardChipId = ""; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + return object; + }; + + /** + * Converts this AskAccessCodeRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.AskAccessCodeRequest + * @instance + * @returns {Object.} JSON object + */ + AskAccessCodeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AskAccessCodeRequest + * @function getTypeUrl + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AskAccessCodeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.AskAccessCodeRequest"; + }; + + return AskAccessCodeRequest; + })(); + + protobuf.AskAccessCodeResponse = (function() { + + /** + * Properties of an AskAccessCodeResponse. + * @memberof wm.protobuf + * @interface IAskAccessCodeResponse + * @property {wm.protobuf.ErrorCode} error AskAccessCodeResponse error + * @property {string} accessCode AskAccessCodeResponse accessCode + */ + + /** + * Constructs a new AskAccessCodeResponse. + * @memberof wm.protobuf + * @classdesc Represents an AskAccessCodeResponse. + * @implements IAskAccessCodeResponse + * @constructor + * @param {wm.protobuf.IAskAccessCodeResponse=} [properties] Properties to set + */ + function AskAccessCodeResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AskAccessCodeResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.AskAccessCodeResponse + * @instance + */ + AskAccessCodeResponse.prototype.error = 0; + + /** + * AskAccessCodeResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.AskAccessCodeResponse + * @instance + */ + AskAccessCodeResponse.prototype.accessCode = ""; + + /** + * Creates a new AskAccessCodeResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.IAskAccessCodeResponse=} [properties] Properties to set + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse instance + */ + AskAccessCodeResponse.create = function create(properties) { + return new AskAccessCodeResponse(properties); + }; + + /** + * Encodes the specified AskAccessCodeResponse message. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.IAskAccessCodeResponse} message AskAccessCodeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + return writer; + }; + + /** + * Encodes the specified AskAccessCodeResponse message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.IAskAccessCodeResponse} message AskAccessCodeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.AskAccessCodeResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("accessCode")) + throw $util.ProtocolError("missing required 'accessCode'", { instance: message }); + return message; + }; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AskAccessCodeResponse message. + * @function verify + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AskAccessCodeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + return null; + }; + + /** + * Creates an AskAccessCodeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse + */ + AskAccessCodeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.AskAccessCodeResponse) + return object; + let message = new $root.wm.protobuf.AskAccessCodeResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + return message; + }; + + /** + * Creates a plain object from an AskAccessCodeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.AskAccessCodeResponse} message AskAccessCodeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AskAccessCodeResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.accessCode = ""; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + return object; + }; + + /** + * Converts this AskAccessCodeResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.AskAccessCodeResponse + * @instance + * @returns {Object.} JSON object + */ + AskAccessCodeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AskAccessCodeResponse + * @function getTypeUrl + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AskAccessCodeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.AskAccessCodeResponse"; + }; + + return AskAccessCodeResponse; + })(); + + protobuf.RegisterOpponentGhostRequest = (function() { + + /** + * Properties of a RegisterOpponentGhostRequest. + * @memberof wm.protobuf + * @interface IRegisterOpponentGhostRequest + * @property {number} carId RegisterOpponentGhostRequest carId + * @property {number} specialGhostId RegisterOpponentGhostRequest specialGhostId + */ + + /** + * Constructs a new RegisterOpponentGhostRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterOpponentGhostRequest. + * @implements IRegisterOpponentGhostRequest + * @constructor + * @param {wm.protobuf.IRegisterOpponentGhostRequest=} [properties] Properties to set + */ + function RegisterOpponentGhostRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterOpponentGhostRequest carId. + * @member {number} carId + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @instance + */ + RegisterOpponentGhostRequest.prototype.carId = 0; + + /** + * RegisterOpponentGhostRequest specialGhostId. + * @member {number} specialGhostId + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @instance + */ + RegisterOpponentGhostRequest.prototype.specialGhostId = 0; + + /** + * Creates a new RegisterOpponentGhostRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.IRegisterOpponentGhostRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest instance + */ + RegisterOpponentGhostRequest.create = function create(properties) { + return new RegisterOpponentGhostRequest(properties); + }; + + /** + * Encodes the specified RegisterOpponentGhostRequest message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.IRegisterOpponentGhostRequest} message RegisterOpponentGhostRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.specialGhostId); + return writer; + }; + + /** + * Encodes the specified RegisterOpponentGhostRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.IRegisterOpponentGhostRequest} message RegisterOpponentGhostRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterOpponentGhostRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.specialGhostId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("specialGhostId")) + throw $util.ProtocolError("missing required 'specialGhostId'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterOpponentGhostRequest message. + * @function verify + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterOpponentGhostRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.specialGhostId)) + return "specialGhostId: integer expected"; + return null; + }; + + /** + * Creates a RegisterOpponentGhostRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest + */ + RegisterOpponentGhostRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterOpponentGhostRequest) + return object; + let message = new $root.wm.protobuf.RegisterOpponentGhostRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.specialGhostId != null) + message.specialGhostId = object.specialGhostId >>> 0; + return message; + }; + + /** + * Creates a plain object from a RegisterOpponentGhostRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.RegisterOpponentGhostRequest} message RegisterOpponentGhostRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterOpponentGhostRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.specialGhostId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.specialGhostId != null && message.hasOwnProperty("specialGhostId")) + object.specialGhostId = message.specialGhostId; + return object; + }; + + /** + * Converts this RegisterOpponentGhostRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterOpponentGhostRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterOpponentGhostRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterOpponentGhostRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterOpponentGhostRequest"; + }; + + return RegisterOpponentGhostRequest; + })(); + + protobuf.RegisterOpponentGhostResponse = (function() { + + /** + * Properties of a RegisterOpponentGhostResponse. + * @memberof wm.protobuf + * @interface IRegisterOpponentGhostResponse + * @property {wm.protobuf.ErrorCode} error RegisterOpponentGhostResponse error + */ + + /** + * Constructs a new RegisterOpponentGhostResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterOpponentGhostResponse. + * @implements IRegisterOpponentGhostResponse + * @constructor + * @param {wm.protobuf.IRegisterOpponentGhostResponse=} [properties] Properties to set + */ + function RegisterOpponentGhostResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterOpponentGhostResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @instance + */ + RegisterOpponentGhostResponse.prototype.error = 0; + + /** + * Creates a new RegisterOpponentGhostResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.IRegisterOpponentGhostResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse instance + */ + RegisterOpponentGhostResponse.create = function create(properties) { + return new RegisterOpponentGhostResponse(properties); + }; + + /** + * Encodes the specified RegisterOpponentGhostResponse message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.IRegisterOpponentGhostResponse} message RegisterOpponentGhostResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified RegisterOpponentGhostResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.IRegisterOpponentGhostResponse} message RegisterOpponentGhostResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterOpponentGhostResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterOpponentGhostResponse message. + * @function verify + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterOpponentGhostResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a RegisterOpponentGhostResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse + */ + RegisterOpponentGhostResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterOpponentGhostResponse) + return object; + let message = new $root.wm.protobuf.RegisterOpponentGhostResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a RegisterOpponentGhostResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.RegisterOpponentGhostResponse} message RegisterOpponentGhostResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterOpponentGhostResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this RegisterOpponentGhostResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterOpponentGhostResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterOpponentGhostResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterOpponentGhostResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterOpponentGhostResponse"; + }; + + return RegisterOpponentGhostResponse; + })(); + + protobuf.GrantCarRightRequest = (function() { + + /** + * Properties of a GrantCarRightRequest. + * @memberof wm.protobuf + * @interface IGrantCarRightRequest + * @property {number} userId GrantCarRightRequest userId + * @property {number} targetUserId GrantCarRightRequest targetUserId + * @property {number} timestamp GrantCarRightRequest timestamp + */ + + /** + * Constructs a new GrantCarRightRequest. + * @memberof wm.protobuf + * @classdesc Represents a GrantCarRightRequest. + * @implements IGrantCarRightRequest + * @constructor + * @param {wm.protobuf.IGrantCarRightRequest=} [properties] Properties to set + */ + function GrantCarRightRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GrantCarRightRequest userId. + * @member {number} userId + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + */ + GrantCarRightRequest.prototype.userId = 0; + + /** + * GrantCarRightRequest targetUserId. + * @member {number} targetUserId + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + */ + GrantCarRightRequest.prototype.targetUserId = 0; + + /** + * GrantCarRightRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + */ + GrantCarRightRequest.prototype.timestamp = 0; + + /** + * Creates a new GrantCarRightRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.IGrantCarRightRequest=} [properties] Properties to set + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest instance + */ + GrantCarRightRequest.create = function create(properties) { + return new GrantCarRightRequest(properties); + }; + + /** + * Encodes the specified GrantCarRightRequest message. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.IGrantCarRightRequest} message GrantCarRightRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetUserId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified GrantCarRightRequest message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.IGrantCarRightRequest} message GrantCarRightRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GrantCarRightRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.targetUserId = reader.uint32(); + break; + } + case 3: { + message.timestamp = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("targetUserId")) + throw $util.ProtocolError("missing required 'targetUserId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GrantCarRightRequest message. + * @function verify + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GrantCarRightRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.targetUserId)) + return "targetUserId: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + return null; + }; + + /** + * Creates a GrantCarRightRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest + */ + GrantCarRightRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GrantCarRightRequest) + return object; + let message = new $root.wm.protobuf.GrantCarRightRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.targetUserId != null) + message.targetUserId = object.targetUserId >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + return message; + }; + + /** + * Creates a plain object from a GrantCarRightRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.GrantCarRightRequest} message GrantCarRightRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GrantCarRightRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.targetUserId = 0; + object.timestamp = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.targetUserId != null && message.hasOwnProperty("targetUserId")) + object.targetUserId = message.targetUserId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this GrantCarRightRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + * @returns {Object.} JSON object + */ + GrantCarRightRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GrantCarRightRequest + * @function getTypeUrl + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GrantCarRightRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GrantCarRightRequest"; + }; + + return GrantCarRightRequest; + })(); + + protobuf.GrantCarRightResponse = (function() { + + /** + * Properties of a GrantCarRightResponse. + * @memberof wm.protobuf + * @interface IGrantCarRightResponse + * @property {wm.protobuf.ErrorCode} error GrantCarRightResponse error + */ + + /** + * Constructs a new GrantCarRightResponse. + * @memberof wm.protobuf + * @classdesc Represents a GrantCarRightResponse. + * @implements IGrantCarRightResponse + * @constructor + * @param {wm.protobuf.IGrantCarRightResponse=} [properties] Properties to set + */ + function GrantCarRightResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GrantCarRightResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.GrantCarRightResponse + * @instance + */ + GrantCarRightResponse.prototype.error = 0; + + /** + * Creates a new GrantCarRightResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.IGrantCarRightResponse=} [properties] Properties to set + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse instance + */ + GrantCarRightResponse.create = function create(properties) { + return new GrantCarRightResponse(properties); + }; + + /** + * Encodes the specified GrantCarRightResponse message. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.IGrantCarRightResponse} message GrantCarRightResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified GrantCarRightResponse message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.IGrantCarRightResponse} message GrantCarRightResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GrantCarRightResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GrantCarRightResponse message. + * @function verify + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GrantCarRightResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a GrantCarRightResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse + */ + GrantCarRightResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GrantCarRightResponse) + return object; + let message = new $root.wm.protobuf.GrantCarRightResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a GrantCarRightResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.GrantCarRightResponse} message GrantCarRightResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GrantCarRightResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this GrantCarRightResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.GrantCarRightResponse + * @instance + * @returns {Object.} JSON object + */ + GrantCarRightResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GrantCarRightResponse + * @function getTypeUrl + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GrantCarRightResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GrantCarRightResponse"; + }; + + return GrantCarRightResponse; + })(); + + protobuf.LoadGhostCompetitionRankingRequest = (function() { + + /** + * Properties of a LoadGhostCompetitionRankingRequest. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionRankingRequest + * @property {number} carId LoadGhostCompetitionRankingRequest carId + * @property {number} competitionId LoadGhostCompetitionRankingRequest competitionId + */ + + /** + * Constructs a new LoadGhostCompetitionRankingRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionRankingRequest. + * @implements ILoadGhostCompetitionRankingRequest + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest=} [properties] Properties to set + */ + function LoadGhostCompetitionRankingRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionRankingRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @instance + */ + LoadGhostCompetitionRankingRequest.prototype.carId = 0; + + /** + * LoadGhostCompetitionRankingRequest competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @instance + */ + LoadGhostCompetitionRankingRequest.prototype.competitionId = 0; + + /** + * Creates a new LoadGhostCompetitionRankingRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest instance + */ + LoadGhostCompetitionRankingRequest.create = function create(properties) { + return new LoadGhostCompetitionRankingRequest(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest} message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.competitionId); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest} message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionRankingRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.competitionId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionRankingRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionRankingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + return null; + }; + + /** + * Creates a LoadGhostCompetitionRankingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest + */ + LoadGhostCompetitionRankingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionRankingRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionRankingRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingRequest} message LoadGhostCompetitionRankingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionRankingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.competitionId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + return object; + }; + + /** + * Converts this LoadGhostCompetitionRankingRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionRankingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionRankingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionRankingRequest"; + }; + + return LoadGhostCompetitionRankingRequest; + })(); + + protobuf.LoadGhostCompetitionRankingResponse = (function() { + + /** + * Properties of a LoadGhostCompetitionRankingResponse. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionRankingResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostCompetitionRankingResponse error + * @property {number|null} [periodId] LoadGhostCompetitionRankingResponse periodId + * @property {number} numOfParticipants LoadGhostCompetitionRankingResponse numOfParticipants + * @property {wm.protobuf.IGhostCompetitionSchedule|null} [competitionSchedule] LoadGhostCompetitionRankingResponse competitionSchedule + * @property {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null} [ownRecord] LoadGhostCompetitionRankingResponse ownRecord + * @property {Array.|null} [topRecords] LoadGhostCompetitionRankingResponse topRecords + */ + + /** + * Constructs a new LoadGhostCompetitionRankingResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionRankingResponse. + * @implements ILoadGhostCompetitionRankingResponse + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse=} [properties] Properties to set + */ + function LoadGhostCompetitionRankingResponse(properties) { + this.topRecords = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionRankingResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.error = 0; + + /** + * LoadGhostCompetitionRankingResponse periodId. + * @member {number} periodId + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.periodId = 0; + + /** + * LoadGhostCompetitionRankingResponse numOfParticipants. + * @member {number} numOfParticipants + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.numOfParticipants = 0; + + /** + * LoadGhostCompetitionRankingResponse competitionSchedule. + * @member {wm.protobuf.IGhostCompetitionSchedule|null|undefined} competitionSchedule + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.competitionSchedule = null; + + /** + * LoadGhostCompetitionRankingResponse ownRecord. + * @member {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null|undefined} ownRecord + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.ownRecord = null; + + /** + * LoadGhostCompetitionRankingResponse topRecords. + * @member {Array.} topRecords + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.topRecords = $util.emptyArray; + + /** + * Creates a new LoadGhostCompetitionRankingResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse instance + */ + LoadGhostCompetitionRankingResponse.create = function create(properties) { + return new LoadGhostCompetitionRankingResponse(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse} message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.periodId != null && Object.hasOwnProperty.call(message, "periodId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.periodId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.numOfParticipants); + if (message.competitionSchedule != null && Object.hasOwnProperty.call(message, "competitionSchedule")) + $root.wm.protobuf.GhostCompetitionSchedule.encode(message.competitionSchedule, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.ownRecord != null && Object.hasOwnProperty.call(message, "ownRecord")) + $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.encode(message.ownRecord, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.topRecords != null && message.topRecords.length) + for (let i = 0; i < message.topRecords.length; ++i) + $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.encode(message.topRecords[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse} message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.periodId = reader.uint32(); + break; + } + case 3: { + message.numOfParticipants = reader.uint32(); + break; + } + case 4: { + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.decode(reader, reader.uint32()); + break; + } + case 5: { + message.ownRecord = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.topRecords && message.topRecords.length)) + message.topRecords = []; + message.topRecords.push($root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("numOfParticipants")) + throw $util.ProtocolError("missing required 'numOfParticipants'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionRankingResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionRankingResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.periodId != null && message.hasOwnProperty("periodId")) + if (!$util.isInteger(message.periodId)) + return "periodId: integer expected"; + if (!$util.isInteger(message.numOfParticipants)) + return "numOfParticipants: integer expected"; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) { + let error = $root.wm.protobuf.GhostCompetitionSchedule.verify(message.competitionSchedule); + if (error) + return "competitionSchedule." + error; + } + if (message.ownRecord != null && message.hasOwnProperty("ownRecord")) { + let error = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify(message.ownRecord); + if (error) + return "ownRecord." + error; + } + if (message.topRecords != null && message.hasOwnProperty("topRecords")) { + if (!Array.isArray(message.topRecords)) + return "topRecords: array expected"; + for (let i = 0; i < message.topRecords.length; ++i) { + let error = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify(message.topRecords[i]); + if (error) + return "topRecords." + error; + } + } + return null; + }; + + /** + * Creates a LoadGhostCompetitionRankingResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse + */ + LoadGhostCompetitionRankingResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionRankingResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.periodId != null) + message.periodId = object.periodId >>> 0; + if (object.numOfParticipants != null) + message.numOfParticipants = object.numOfParticipants >>> 0; + if (object.competitionSchedule != null) { + if (typeof object.competitionSchedule !== "object") + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.competitionSchedule: object expected"); + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.fromObject(object.competitionSchedule); + } + if (object.ownRecord != null) { + if (typeof object.ownRecord !== "object") + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.ownRecord: object expected"); + message.ownRecord = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.fromObject(object.ownRecord); + } + if (object.topRecords) { + if (!Array.isArray(object.topRecords)) + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.topRecords: array expected"); + message.topRecords = []; + for (let i = 0; i < object.topRecords.length; ++i) { + if (typeof object.topRecords[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.topRecords: object expected"); + message.topRecords[i] = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.fromObject(object.topRecords[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse} message LoadGhostCompetitionRankingResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionRankingResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.topRecords = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.periodId = 0; + object.numOfParticipants = 0; + object.competitionSchedule = null; + object.ownRecord = null; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.periodId != null && message.hasOwnProperty("periodId")) + object.periodId = message.periodId; + if (message.numOfParticipants != null && message.hasOwnProperty("numOfParticipants")) + object.numOfParticipants = message.numOfParticipants; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) + object.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.toObject(message.competitionSchedule, options); + if (message.ownRecord != null && message.hasOwnProperty("ownRecord")) + object.ownRecord = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.toObject(message.ownRecord, options); + if (message.topRecords && message.topRecords.length) { + object.topRecords = []; + for (let j = 0; j < message.topRecords.length; ++j) + object.topRecords[j] = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.toObject(message.topRecords[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostCompetitionRankingResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionRankingResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionRankingResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionRankingResponse"; + }; + + LoadGhostCompetitionRankingResponse.Entry = (function() { + + /** + * Properties of an Entry. + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @interface IEntry + * @property {number} rank Entry rank + * @property {number} result Entry result + * @property {number} carId Entry carId + * @property {string} name Entry name + * @property {number} regionId Entry regionId + * @property {number} model Entry model + * @property {number} visualModel Entry visualModel + * @property {number} defaultColor Entry defaultColor + * @property {string} title Entry title + * @property {number} level Entry level + * @property {string|null} [windowStickerString] Entry windowStickerString + * @property {string} playedShopName Entry playedShopName + * @property {number} playedAt Entry playedAt + */ + + /** + * Constructs a new Entry. + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @classdesc Represents an Entry. + * @implements IEntry + * @constructor + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry=} [properties] Properties to set + */ + function Entry(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entry rank. + * @member {number} rank + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.rank = 0; + + /** + * Entry result. + * @member {number} result + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.result = 0; + + /** + * Entry carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.carId = 0; + + /** + * Entry name. + * @member {string} name + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.name = ""; + + /** + * Entry regionId. + * @member {number} regionId + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.regionId = 0; + + /** + * Entry model. + * @member {number} model + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.model = 0; + + /** + * Entry visualModel. + * @member {number} visualModel + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.visualModel = 0; + + /** + * Entry defaultColor. + * @member {number} defaultColor + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.defaultColor = 0; + + /** + * Entry title. + * @member {string} title + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.title = ""; + + /** + * Entry level. + * @member {number} level + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.level = 0; + + /** + * Entry windowStickerString. + * @member {string} windowStickerString + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.windowStickerString = ""; + + /** + * Entry playedShopName. + * @member {string} playedShopName + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.playedShopName = ""; + + /** + * Entry playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.playedAt = 0; + + /** + * Creates a new Entry instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry instance + */ + Entry.create = function create(properties) { + return new Entry(properties); + }; + + /** + * Encodes the specified Entry message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rank); + writer.uint32(/* id 2, wireType 0 =*/16).sint32(message.result); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.carId); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.regionId); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.model); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.visualModel); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.defaultColor); + writer.uint32(/* id 10, wireType 2 =*/82).string(message.title); + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.level); + if (message.windowStickerString != null && Object.hasOwnProperty.call(message, "windowStickerString")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.windowStickerString); + writer.uint32(/* id 13, wireType 2 =*/106).string(message.playedShopName); + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.playedAt); + return writer; + }; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rank = reader.uint32(); + break; + } + case 2: { + message.result = reader.sint32(); + break; + } + case 3: { + message.carId = reader.uint32(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + case 5: { + message.regionId = reader.uint32(); + break; + } + case 6: { + message.model = reader.uint32(); + break; + } + case 7: { + message.visualModel = reader.uint32(); + break; + } + case 8: { + message.defaultColor = reader.uint32(); + break; + } + case 10: { + message.title = reader.string(); + break; + } + case 11: { + message.level = reader.uint32(); + break; + } + case 12: { + message.windowStickerString = reader.string(); + break; + } + case 13: { + message.playedShopName = reader.string(); + break; + } + case 14: { + message.playedAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("rank")) + throw $util.ProtocolError("missing required 'rank'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("name")) + throw $util.ProtocolError("missing required 'name'", { instance: message }); + if (!message.hasOwnProperty("regionId")) + throw $util.ProtocolError("missing required 'regionId'", { instance: message }); + if (!message.hasOwnProperty("model")) + throw $util.ProtocolError("missing required 'model'", { instance: message }); + if (!message.hasOwnProperty("visualModel")) + throw $util.ProtocolError("missing required 'visualModel'", { instance: message }); + if (!message.hasOwnProperty("defaultColor")) + throw $util.ProtocolError("missing required 'defaultColor'", { instance: message }); + if (!message.hasOwnProperty("title")) + throw $util.ProtocolError("missing required 'title'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + if (!message.hasOwnProperty("playedShopName")) + throw $util.ProtocolError("missing required 'playedShopName'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + return message; + }; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entry message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isString(message.name)) + return "name: string expected"; + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (!$util.isInteger(message.model)) + return "model: integer expected"; + if (!$util.isInteger(message.visualModel)) + return "visualModel: integer expected"; + if (!$util.isInteger(message.defaultColor)) + return "defaultColor: integer expected"; + if (!$util.isString(message.title)) + return "title: string expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + if (!$util.isString(message.windowStickerString)) + return "windowStickerString: string expected"; + if (!$util.isString(message.playedShopName)) + return "playedShopName: string expected"; + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + return null; + }; + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry + */ + Entry.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry(); + if (object.rank != null) + message.rank = object.rank >>> 0; + if (object.result != null) + message.result = object.result | 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.model != null) + message.model = object.model >>> 0; + if (object.visualModel != null) + message.visualModel = object.visualModel >>> 0; + if (object.defaultColor != null) + message.defaultColor = object.defaultColor >>> 0; + if (object.title != null) + message.title = String(object.title); + if (object.level != null) + message.level = object.level >>> 0; + if (object.windowStickerString != null) + message.windowStickerString = String(object.windowStickerString); + if (object.playedShopName != null) + message.playedShopName = String(object.playedShopName); + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + return message; + }; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} message Entry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.rank = 0; + object.result = 0; + object.carId = 0; + object.name = ""; + object.regionId = 0; + object.model = 0; + object.visualModel = 0; + object.defaultColor = 0; + object.title = ""; + object.level = 0; + object.windowStickerString = ""; + object.playedShopName = ""; + object.playedAt = 0; + } + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.visualModel != null && message.hasOwnProperty("visualModel")) + object.visualModel = message.visualModel; + if (message.defaultColor != null && message.hasOwnProperty("defaultColor")) + object.defaultColor = message.defaultColor; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + object.windowStickerString = message.windowStickerString; + if (message.playedShopName != null && message.hasOwnProperty("playedShopName")) + object.playedShopName = message.playedShopName; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + return object; + }; + + /** + * Converts this Entry to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + * @returns {Object.} JSON object + */ + Entry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entry + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionRankingResponse.Entry"; + }; + + return Entry; + })(); + + return LoadGhostCompetitionRankingResponse; + })(); + + protobuf.LoadUnreceivedUserItemsRequest = (function() { + + /** + * Properties of a LoadUnreceivedUserItemsRequest. + * @memberof wm.protobuf + * @interface ILoadUnreceivedUserItemsRequest + * @property {number} userId LoadUnreceivedUserItemsRequest userId + */ + + /** + * Constructs a new LoadUnreceivedUserItemsRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadUnreceivedUserItemsRequest. + * @implements ILoadUnreceivedUserItemsRequest + * @constructor + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest=} [properties] Properties to set + */ + function LoadUnreceivedUserItemsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUnreceivedUserItemsRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @instance + */ + LoadUnreceivedUserItemsRequest.prototype.userId = 0; + + /** + * Creates a new LoadUnreceivedUserItemsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest instance + */ + LoadUnreceivedUserItemsRequest.create = function create(properties) { + return new LoadUnreceivedUserItemsRequest(properties); + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest} message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest} message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUnreceivedUserItemsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUnreceivedUserItemsRequest message. + * @function verify + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUnreceivedUserItemsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadUnreceivedUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest + */ + LoadUnreceivedUserItemsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUnreceivedUserItemsRequest) + return object; + let message = new $root.wm.protobuf.LoadUnreceivedUserItemsRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.LoadUnreceivedUserItemsRequest} message LoadUnreceivedUserItemsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUnreceivedUserItemsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadUnreceivedUserItemsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @instance + * @returns {Object.} JSON object + */ + LoadUnreceivedUserItemsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUnreceivedUserItemsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUnreceivedUserItemsRequest"; + }; + + return LoadUnreceivedUserItemsRequest; + })(); + + protobuf.LoadUnreceivedUserItemsResponse = (function() { + + /** + * Properties of a LoadUnreceivedUserItemsResponse. + * @memberof wm.protobuf + * @interface ILoadUnreceivedUserItemsResponse + * @property {wm.protobuf.ErrorCode} error LoadUnreceivedUserItemsResponse error + * @property {Array.|null} [ownedUserItems] LoadUnreceivedUserItemsResponse ownedUserItems + */ + + /** + * Constructs a new LoadUnreceivedUserItemsResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadUnreceivedUserItemsResponse. + * @implements ILoadUnreceivedUserItemsResponse + * @constructor + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse=} [properties] Properties to set + */ + function LoadUnreceivedUserItemsResponse(properties) { + this.ownedUserItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUnreceivedUserItemsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @instance + */ + LoadUnreceivedUserItemsResponse.prototype.error = 0; + + /** + * LoadUnreceivedUserItemsResponse ownedUserItems. + * @member {Array.} ownedUserItems + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @instance + */ + LoadUnreceivedUserItemsResponse.prototype.ownedUserItems = $util.emptyArray; + + /** + * Creates a new LoadUnreceivedUserItemsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse instance + */ + LoadUnreceivedUserItemsResponse.create = function create(properties) { + return new LoadUnreceivedUserItemsResponse(properties); + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse} message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.ownedUserItems != null && message.ownedUserItems.length) + for (let i = 0; i < message.ownedUserItems.length; ++i) + $root.wm.protobuf.UserItem.encode(message.ownedUserItems[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse} message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUnreceivedUserItemsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 7: { + if (!(message.ownedUserItems && message.ownedUserItems.length)) + message.ownedUserItems = []; + message.ownedUserItems.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUnreceivedUserItemsResponse message. + * @function verify + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUnreceivedUserItemsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.ownedUserItems != null && message.hasOwnProperty("ownedUserItems")) { + if (!Array.isArray(message.ownedUserItems)) + return "ownedUserItems: array expected"; + for (let i = 0; i < message.ownedUserItems.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.ownedUserItems[i]); + if (error) + return "ownedUserItems." + error; + } + } + return null; + }; + + /** + * Creates a LoadUnreceivedUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse + */ + LoadUnreceivedUserItemsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUnreceivedUserItemsResponse) + return object; + let message = new $root.wm.protobuf.LoadUnreceivedUserItemsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.ownedUserItems) { + if (!Array.isArray(object.ownedUserItems)) + throw TypeError(".wm.protobuf.LoadUnreceivedUserItemsResponse.ownedUserItems: array expected"); + message.ownedUserItems = []; + for (let i = 0; i < object.ownedUserItems.length; ++i) { + if (typeof object.ownedUserItems[i] !== "object") + throw TypeError(".wm.protobuf.LoadUnreceivedUserItemsResponse.ownedUserItems: object expected"); + message.ownedUserItems[i] = $root.wm.protobuf.UserItem.fromObject(object.ownedUserItems[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.LoadUnreceivedUserItemsResponse} message LoadUnreceivedUserItemsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUnreceivedUserItemsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.ownedUserItems = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.ownedUserItems && message.ownedUserItems.length) { + object.ownedUserItems = []; + for (let j = 0; j < message.ownedUserItems.length; ++j) + object.ownedUserItems[j] = $root.wm.protobuf.UserItem.toObject(message.ownedUserItems[j], options); + } + return object; + }; + + /** + * Converts this LoadUnreceivedUserItemsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @instance + * @returns {Object.} JSON object + */ + LoadUnreceivedUserItemsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUnreceivedUserItemsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUnreceivedUserItemsResponse"; + }; + + return LoadUnreceivedUserItemsResponse; + })(); + + protobuf.LoadBookmarksRequest = (function() { + + /** + * Properties of a LoadBookmarksRequest. + * @memberof wm.protobuf + * @interface ILoadBookmarksRequest + * @property {number} userId LoadBookmarksRequest userId + */ + + /** + * Constructs a new LoadBookmarksRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadBookmarksRequest. + * @implements ILoadBookmarksRequest + * @constructor + * @param {wm.protobuf.ILoadBookmarksRequest=} [properties] Properties to set + */ + function LoadBookmarksRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBookmarksRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadBookmarksRequest + * @instance + */ + LoadBookmarksRequest.prototype.userId = 0; + + /** + * Creates a new LoadBookmarksRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.ILoadBookmarksRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest instance + */ + LoadBookmarksRequest.create = function create(properties) { + return new LoadBookmarksRequest(properties); + }; + + /** + * Encodes the specified LoadBookmarksRequest message. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.ILoadBookmarksRequest} message LoadBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.ILoadBookmarksRequest} message LoadBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadBookmarksRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBookmarksRequest message. + * @function verify + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBookmarksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest + */ + LoadBookmarksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadBookmarksRequest) + return object; + let message = new $root.wm.protobuf.LoadBookmarksRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadBookmarksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.LoadBookmarksRequest} message LoadBookmarksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBookmarksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadBookmarksRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadBookmarksRequest + * @instance + * @returns {Object.} JSON object + */ + LoadBookmarksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBookmarksRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBookmarksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadBookmarksRequest"; + }; + + return LoadBookmarksRequest; + })(); + + protobuf.LoadBookmarksResponse = (function() { + + /** + * Properties of a LoadBookmarksResponse. + * @memberof wm.protobuf + * @interface ILoadBookmarksResponse + * @property {wm.protobuf.ErrorCode} error LoadBookmarksResponse error + * @property {Array.|null} [cars] LoadBookmarksResponse cars + */ + + /** + * Constructs a new LoadBookmarksResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadBookmarksResponse. + * @implements ILoadBookmarksResponse + * @constructor + * @param {wm.protobuf.ILoadBookmarksResponse=} [properties] Properties to set + */ + function LoadBookmarksResponse(properties) { + this.cars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBookmarksResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadBookmarksResponse + * @instance + */ + LoadBookmarksResponse.prototype.error = 0; + + /** + * LoadBookmarksResponse cars. + * @member {Array.} cars + * @memberof wm.protobuf.LoadBookmarksResponse + * @instance + */ + LoadBookmarksResponse.prototype.cars = $util.emptyArray; + + /** + * Creates a new LoadBookmarksResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.ILoadBookmarksResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse instance + */ + LoadBookmarksResponse.create = function create(properties) { + return new LoadBookmarksResponse(properties); + }; + + /** + * Encodes the specified LoadBookmarksResponse message. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.ILoadBookmarksResponse} message LoadBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.Car.encode(message.cars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.ILoadBookmarksResponse} message LoadBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadBookmarksResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBookmarksResponse message. + * @function verify + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBookmarksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + return null; + }; + + /** + * Creates a LoadBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse + */ + LoadBookmarksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadBookmarksResponse) + return object; + let message = new $root.wm.protobuf.LoadBookmarksResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.LoadBookmarksResponse.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.LoadBookmarksResponse.cars: object expected"); + message.cars[i] = $root.wm.protobuf.Car.fromObject(object.cars[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadBookmarksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.LoadBookmarksResponse} message LoadBookmarksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBookmarksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cars = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.Car.toObject(message.cars[j], options); + } + return object; + }; + + /** + * Converts this LoadBookmarksResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadBookmarksResponse + * @instance + * @returns {Object.} JSON object + */ + LoadBookmarksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBookmarksResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBookmarksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadBookmarksResponse"; + }; + + return LoadBookmarksResponse; + })(); + + protobuf.SaveBookmarksRequest = (function() { + + /** + * Properties of a SaveBookmarksRequest. + * @memberof wm.protobuf + * @interface ISaveBookmarksRequest + * @property {number} userId SaveBookmarksRequest userId + * @property {Array.|null} [cars] SaveBookmarksRequest cars + */ + + /** + * Constructs a new SaveBookmarksRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveBookmarksRequest. + * @implements ISaveBookmarksRequest + * @constructor + * @param {wm.protobuf.ISaveBookmarksRequest=} [properties] Properties to set + */ + function SaveBookmarksRequest(properties) { + this.cars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveBookmarksRequest userId. + * @member {number} userId + * @memberof wm.protobuf.SaveBookmarksRequest + * @instance + */ + SaveBookmarksRequest.prototype.userId = 0; + + /** + * SaveBookmarksRequest cars. + * @member {Array.} cars + * @memberof wm.protobuf.SaveBookmarksRequest + * @instance + */ + SaveBookmarksRequest.prototype.cars = $util.emptyArray; + + /** + * Creates a new SaveBookmarksRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.ISaveBookmarksRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest instance + */ + SaveBookmarksRequest.create = function create(properties) { + return new SaveBookmarksRequest(properties); + }; + + /** + * Encodes the specified SaveBookmarksRequest message. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.ISaveBookmarksRequest} message SaveBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.cars[i]); + return writer; + }; + + /** + * Encodes the specified SaveBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.ISaveBookmarksRequest} message SaveBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveBookmarksRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.cars.push(reader.uint32()); + } else + message.cars.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveBookmarksRequest message. + * @function verify + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveBookmarksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) + if (!$util.isInteger(message.cars[i])) + return "cars: integer[] expected"; + } + return null; + }; + + /** + * Creates a SaveBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest + */ + SaveBookmarksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveBookmarksRequest) + return object; + let message = new $root.wm.protobuf.SaveBookmarksRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.SaveBookmarksRequest.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) + message.cars[i] = object.cars[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a SaveBookmarksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.SaveBookmarksRequest} message SaveBookmarksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveBookmarksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cars = []; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = message.cars[j]; + } + return object; + }; + + /** + * Converts this SaveBookmarksRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveBookmarksRequest + * @instance + * @returns {Object.} JSON object + */ + SaveBookmarksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveBookmarksRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveBookmarksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveBookmarksRequest"; + }; + + return SaveBookmarksRequest; + })(); + + protobuf.SaveBookmarksResponse = (function() { + + /** + * Properties of a SaveBookmarksResponse. + * @memberof wm.protobuf + * @interface ISaveBookmarksResponse + * @property {wm.protobuf.ErrorCode} error SaveBookmarksResponse error + */ + + /** + * Constructs a new SaveBookmarksResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveBookmarksResponse. + * @implements ISaveBookmarksResponse + * @constructor + * @param {wm.protobuf.ISaveBookmarksResponse=} [properties] Properties to set + */ + function SaveBookmarksResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveBookmarksResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveBookmarksResponse + * @instance + */ + SaveBookmarksResponse.prototype.error = 0; + + /** + * Creates a new SaveBookmarksResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.ISaveBookmarksResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse instance + */ + SaveBookmarksResponse.create = function create(properties) { + return new SaveBookmarksResponse(properties); + }; + + /** + * Encodes the specified SaveBookmarksResponse message. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.ISaveBookmarksResponse} message SaveBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.ISaveBookmarksResponse} message SaveBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveBookmarksResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveBookmarksResponse message. + * @function verify + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveBookmarksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse + */ + SaveBookmarksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveBookmarksResponse) + return object; + let message = new $root.wm.protobuf.SaveBookmarksResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveBookmarksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.SaveBookmarksResponse} message SaveBookmarksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveBookmarksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveBookmarksResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveBookmarksResponse + * @instance + * @returns {Object.} JSON object + */ + SaveBookmarksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveBookmarksResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveBookmarksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveBookmarksResponse"; + }; + + return SaveBookmarksResponse; + })(); + + protobuf.StartTransferRequest = (function() { + + /** + * Properties of a StartTransferRequest. + * @memberof wm.protobuf + * @interface IStartTransferRequest + * @property {number} banapassportAmId StartTransferRequest banapassportAmId + */ + + /** + * Constructs a new StartTransferRequest. + * @memberof wm.protobuf + * @classdesc Represents a StartTransferRequest. + * @implements IStartTransferRequest + * @constructor + * @param {wm.protobuf.IStartTransferRequest=} [properties] Properties to set + */ + function StartTransferRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StartTransferRequest banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.StartTransferRequest + * @instance + */ + StartTransferRequest.prototype.banapassportAmId = 0; + + /** + * Creates a new StartTransferRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.IStartTransferRequest=} [properties] Properties to set + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest instance + */ + StartTransferRequest.create = function create(properties) { + return new StartTransferRequest(properties); + }; + + /** + * Encodes the specified StartTransferRequest message. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.IStartTransferRequest} message StartTransferRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.banapassportAmId); + return writer; + }; + + /** + * Encodes the specified StartTransferRequest message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.IStartTransferRequest} message StartTransferRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.StartTransferRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.banapassportAmId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("banapassportAmId")) + throw $util.ProtocolError("missing required 'banapassportAmId'", { instance: message }); + return message; + }; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartTransferRequest message. + * @function verify + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartTransferRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + return null; + }; + + /** + * Creates a StartTransferRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest + */ + StartTransferRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.StartTransferRequest) + return object; + let message = new $root.wm.protobuf.StartTransferRequest(); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + return message; + }; + + /** + * Creates a plain object from a StartTransferRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.StartTransferRequest} message StartTransferRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartTransferRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.banapassportAmId = 0; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + return object; + }; + + /** + * Converts this StartTransferRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.StartTransferRequest + * @instance + * @returns {Object.} JSON object + */ + StartTransferRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StartTransferRequest + * @function getTypeUrl + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartTransferRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.StartTransferRequest"; + }; + + return StartTransferRequest; + })(); + + protobuf.StartTransferResponse = (function() { + + /** + * Properties of a StartTransferResponse. + * @memberof wm.protobuf + * @interface IStartTransferResponse + * @property {wm.protobuf.ErrorCode} error StartTransferResponse error + * @property {number} userId StartTransferResponse userId + * @property {number|null} [pollingInterval] StartTransferResponse pollingInterval + */ + + /** + * Constructs a new StartTransferResponse. + * @memberof wm.protobuf + * @classdesc Represents a StartTransferResponse. + * @implements IStartTransferResponse + * @constructor + * @param {wm.protobuf.IStartTransferResponse=} [properties] Properties to set + */ + function StartTransferResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StartTransferResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.StartTransferResponse + * @instance + */ + StartTransferResponse.prototype.error = 0; + + /** + * StartTransferResponse userId. + * @member {number} userId + * @memberof wm.protobuf.StartTransferResponse + * @instance + */ + StartTransferResponse.prototype.userId = 0; + + /** + * StartTransferResponse pollingInterval. + * @member {number} pollingInterval + * @memberof wm.protobuf.StartTransferResponse + * @instance + */ + StartTransferResponse.prototype.pollingInterval = 0; + + /** + * Creates a new StartTransferResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.IStartTransferResponse=} [properties] Properties to set + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse instance + */ + StartTransferResponse.create = function create(properties) { + return new StartTransferResponse(properties); + }; + + /** + * Encodes the specified StartTransferResponse message. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.IStartTransferResponse} message StartTransferResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.userId); + if (message.pollingInterval != null && Object.hasOwnProperty.call(message, "pollingInterval")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.pollingInterval); + return writer; + }; + + /** + * Encodes the specified StartTransferResponse message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.IStartTransferResponse} message StartTransferResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.StartTransferResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.userId = reader.uint32(); + break; + } + case 3: { + message.pollingInterval = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartTransferResponse message. + * @function verify + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartTransferResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.pollingInterval != null && message.hasOwnProperty("pollingInterval")) + if (!$util.isInteger(message.pollingInterval)) + return "pollingInterval: integer expected"; + return null; + }; + + /** + * Creates a StartTransferResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse + */ + StartTransferResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.StartTransferResponse) + return object; + let message = new $root.wm.protobuf.StartTransferResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.pollingInterval != null) + message.pollingInterval = object.pollingInterval >>> 0; + return message; + }; + + /** + * Creates a plain object from a StartTransferResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.StartTransferResponse} message StartTransferResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartTransferResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.userId = 0; + object.pollingInterval = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.pollingInterval != null && message.hasOwnProperty("pollingInterval")) + object.pollingInterval = message.pollingInterval; + return object; + }; + + /** + * Converts this StartTransferResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.StartTransferResponse + * @instance + * @returns {Object.} JSON object + */ + StartTransferResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StartTransferResponse + * @function getTypeUrl + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartTransferResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.StartTransferResponse"; + }; + + return StartTransferResponse; + })(); + + protobuf.SaveScreenshotRequest = (function() { + + /** + * Properties of a SaveScreenshotRequest. + * @memberof wm.protobuf + * @interface ISaveScreenshotRequest + * @property {number} carId SaveScreenshotRequest carId + * @property {number} timestamp SaveScreenshotRequest timestamp + * @property {number|null} [playedAt] SaveScreenshotRequest playedAt + * @property {boolean|null} [transparent] SaveScreenshotRequest transparent + * @property {wm.protobuf.ScreenshotType} imageType SaveScreenshotRequest imageType + * @property {Uint8Array|null} [image] SaveScreenshotRequest image + * @property {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null} [ghostMetadata] SaveScreenshotRequest ghostMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null} [versusMetadata] SaveScreenshotRequest versusMetadata + * @property {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null} [terminalMetadata] SaveScreenshotRequest terminalMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null} [acquiringVsStarMetadata] SaveScreenshotRequest acquiringVsStarMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null} [acquiringAuraMotifMetadata] SaveScreenshotRequest acquiringAuraMotifMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null} [ghostRegionMapMetadata] SaveScreenshotRequest ghostRegionMapMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null} [acquiringCrownMetadata] SaveScreenshotRequest acquiringCrownMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null} [competitionResultMetadata] SaveScreenshotRequest competitionResultMetadata + * @property {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null} [timeAttackResultMetadata] SaveScreenshotRequest timeAttackResultMetadata + * @property {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null} [levelUpMetadata] SaveScreenshotRequest levelUpMetadata + */ + + /** + * Constructs a new SaveScreenshotRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveScreenshotRequest. + * @implements ISaveScreenshotRequest + * @constructor + * @param {wm.protobuf.ISaveScreenshotRequest=} [properties] Properties to set + */ + function SaveScreenshotRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScreenshotRequest carId. + * @member {number} carId + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.carId = 0; + + /** + * SaveScreenshotRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.timestamp = 0; + + /** + * SaveScreenshotRequest playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.playedAt = 0; + + /** + * SaveScreenshotRequest transparent. + * @member {boolean} transparent + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.transparent = false; + + /** + * SaveScreenshotRequest imageType. + * @member {wm.protobuf.ScreenshotType} imageType + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.imageType = 1; + + /** + * SaveScreenshotRequest image. + * @member {Uint8Array} image + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.image = $util.newBuffer([]); + + /** + * SaveScreenshotRequest ghostMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null|undefined} ghostMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.ghostMetadata = null; + + /** + * SaveScreenshotRequest versusMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null|undefined} versusMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.versusMetadata = null; + + /** + * SaveScreenshotRequest terminalMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null|undefined} terminalMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.terminalMetadata = null; + + /** + * SaveScreenshotRequest acquiringVsStarMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null|undefined} acquiringVsStarMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.acquiringVsStarMetadata = null; + + /** + * SaveScreenshotRequest acquiringAuraMotifMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null|undefined} acquiringAuraMotifMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.acquiringAuraMotifMetadata = null; + + /** + * SaveScreenshotRequest ghostRegionMapMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null|undefined} ghostRegionMapMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.ghostRegionMapMetadata = null; + + /** + * SaveScreenshotRequest acquiringCrownMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null|undefined} acquiringCrownMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.acquiringCrownMetadata = null; + + /** + * SaveScreenshotRequest competitionResultMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null|undefined} competitionResultMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.competitionResultMetadata = null; + + /** + * SaveScreenshotRequest timeAttackResultMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null|undefined} timeAttackResultMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.timeAttackResultMetadata = null; + + /** + * SaveScreenshotRequest levelUpMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null|undefined} levelUpMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.levelUpMetadata = null; + + /** + * Creates a new SaveScreenshotRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.ISaveScreenshotRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest instance + */ + SaveScreenshotRequest.create = function create(properties) { + return new SaveScreenshotRequest(properties); + }; + + /** + * Encodes the specified SaveScreenshotRequest message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.ISaveScreenshotRequest} message SaveScreenshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.timestamp); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.imageType); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.image); + if (message.ghostMetadata != null && Object.hasOwnProperty.call(message, "ghostMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.encode(message.ghostMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.versusMetadata != null && Object.hasOwnProperty.call(message, "versusMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.encode(message.versusMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.terminalMetadata != null && Object.hasOwnProperty.call(message, "terminalMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.encode(message.terminalMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.transparent != null && Object.hasOwnProperty.call(message, "transparent")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.transparent); + if (message.playedAt != null && Object.hasOwnProperty.call(message, "playedAt")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.playedAt); + if (message.acquiringVsStarMetadata != null && Object.hasOwnProperty.call(message, "acquiringVsStarMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.encode(message.acquiringVsStarMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.acquiringAuraMotifMetadata != null && Object.hasOwnProperty.call(message, "acquiringAuraMotifMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.encode(message.acquiringAuraMotifMetadata, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.ghostRegionMapMetadata != null && Object.hasOwnProperty.call(message, "ghostRegionMapMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.encode(message.ghostRegionMapMetadata, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.acquiringCrownMetadata != null && Object.hasOwnProperty.call(message, "acquiringCrownMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.encode(message.acquiringCrownMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.competitionResultMetadata != null && Object.hasOwnProperty.call(message, "competitionResultMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.encode(message.competitionResultMetadata, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.timeAttackResultMetadata != null && Object.hasOwnProperty.call(message, "timeAttackResultMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.encode(message.timeAttackResultMetadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.levelUpMetadata != null && Object.hasOwnProperty.call(message, "levelUpMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.encode(message.levelUpMetadata, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveScreenshotRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.ISaveScreenshotRequest} message SaveScreenshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.timestamp = reader.uint32(); + break; + } + case 9: { + message.playedAt = reader.uint32(); + break; + } + case 8: { + message.transparent = reader.bool(); + break; + } + case 3: { + message.imageType = reader.int32(); + break; + } + case 4: { + message.image = reader.bytes(); + break; + } + case 5: { + message.ghostMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.decode(reader, reader.uint32()); + break; + } + case 6: { + message.versusMetadata = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.decode(reader, reader.uint32()); + break; + } + case 7: { + message.terminalMetadata = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.decode(reader, reader.uint32()); + break; + } + case 10: { + message.acquiringVsStarMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.decode(reader, reader.uint32()); + break; + } + case 11: { + message.acquiringAuraMotifMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.decode(reader, reader.uint32()); + break; + } + case 12: { + message.ghostRegionMapMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.decode(reader, reader.uint32()); + break; + } + case 13: { + message.acquiringCrownMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.decode(reader, reader.uint32()); + break; + } + case 14: { + message.competitionResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.decode(reader, reader.uint32()); + break; + } + case 15: { + message.timeAttackResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.decode(reader, reader.uint32()); + break; + } + case 16: { + message.levelUpMetadata = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + if (!message.hasOwnProperty("imageType")) + throw $util.ProtocolError("missing required 'imageType'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScreenshotRequest message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScreenshotRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (message.transparent != null && message.hasOwnProperty("transparent")) + if (typeof message.transparent !== "boolean") + return "transparent: boolean expected"; + switch (message.imageType) { + default: + return "imageType: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + if (message.image != null && message.hasOwnProperty("image")) + if (!(message.image && typeof message.image.length === "number" || $util.isString(message.image))) + return "image: buffer expected"; + if (message.ghostMetadata != null && message.hasOwnProperty("ghostMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify(message.ghostMetadata); + if (error) + return "ghostMetadata." + error; + } + if (message.versusMetadata != null && message.hasOwnProperty("versusMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify(message.versusMetadata); + if (error) + return "versusMetadata." + error; + } + if (message.terminalMetadata != null && message.hasOwnProperty("terminalMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify(message.terminalMetadata); + if (error) + return "terminalMetadata." + error; + } + if (message.acquiringVsStarMetadata != null && message.hasOwnProperty("acquiringVsStarMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify(message.acquiringVsStarMetadata); + if (error) + return "acquiringVsStarMetadata." + error; + } + if (message.acquiringAuraMotifMetadata != null && message.hasOwnProperty("acquiringAuraMotifMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify(message.acquiringAuraMotifMetadata); + if (error) + return "acquiringAuraMotifMetadata." + error; + } + if (message.ghostRegionMapMetadata != null && message.hasOwnProperty("ghostRegionMapMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify(message.ghostRegionMapMetadata); + if (error) + return "ghostRegionMapMetadata." + error; + } + if (message.acquiringCrownMetadata != null && message.hasOwnProperty("acquiringCrownMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify(message.acquiringCrownMetadata); + if (error) + return "acquiringCrownMetadata." + error; + } + if (message.competitionResultMetadata != null && message.hasOwnProperty("competitionResultMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify(message.competitionResultMetadata); + if (error) + return "competitionResultMetadata." + error; + } + if (message.timeAttackResultMetadata != null && message.hasOwnProperty("timeAttackResultMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify(message.timeAttackResultMetadata); + if (error) + return "timeAttackResultMetadata." + error; + } + if (message.levelUpMetadata != null && message.hasOwnProperty("levelUpMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify(message.levelUpMetadata); + if (error) + return "levelUpMetadata." + error; + } + return null; + }; + + /** + * Creates a SaveScreenshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest + */ + SaveScreenshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.transparent != null) + message.transparent = Boolean(object.transparent); + switch (object.imageType) { + case "SS_GHOST_BATTLE": + case 1: + message.imageType = 1; + break; + case "SS_VERSUS_BATTLE": + case 2: + message.imageType = 2; + break; + case "SS_TERMINAL": + case 3: + message.imageType = 3; + break; + case "SS_ACQUIRING_VERSUS_STAR": + case 4: + message.imageType = 4; + break; + case "SS_ACQUIRING_AURA_MOTIF": + case 5: + message.imageType = 5; + break; + case "SS_GHOST_REGION_MAP": + case 6: + message.imageType = 6; + break; + case "SS_ACQUIRING_CROWN": + case 7: + message.imageType = 7; + break; + case "SS_GHOST_COMPETITION_RESULT": + case 8: + message.imageType = 8; + break; + case "SS_TIME_ATTACK_RESULT": + case 9: + message.imageType = 9; + break; + case "SS_LEVEL_UP": + case 10: + message.imageType = 10; + break; + } + if (object.image != null) + if (typeof object.image === "string") + $util.base64.decode(object.image, message.image = $util.newBuffer($util.base64.length(object.image)), 0); + else if (object.image.length >= 0) + message.image = object.image; + if (object.ghostMetadata != null) { + if (typeof object.ghostMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.ghostMetadata: object expected"); + message.ghostMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.fromObject(object.ghostMetadata); + } + if (object.versusMetadata != null) { + if (typeof object.versusMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.versusMetadata: object expected"); + message.versusMetadata = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.fromObject(object.versusMetadata); + } + if (object.terminalMetadata != null) { + if (typeof object.terminalMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.terminalMetadata: object expected"); + message.terminalMetadata = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.fromObject(object.terminalMetadata); + } + if (object.acquiringVsStarMetadata != null) { + if (typeof object.acquiringVsStarMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.acquiringVsStarMetadata: object expected"); + message.acquiringVsStarMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.fromObject(object.acquiringVsStarMetadata); + } + if (object.acquiringAuraMotifMetadata != null) { + if (typeof object.acquiringAuraMotifMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.acquiringAuraMotifMetadata: object expected"); + message.acquiringAuraMotifMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.fromObject(object.acquiringAuraMotifMetadata); + } + if (object.ghostRegionMapMetadata != null) { + if (typeof object.ghostRegionMapMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.ghostRegionMapMetadata: object expected"); + message.ghostRegionMapMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.fromObject(object.ghostRegionMapMetadata); + } + if (object.acquiringCrownMetadata != null) { + if (typeof object.acquiringCrownMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.acquiringCrownMetadata: object expected"); + message.acquiringCrownMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.fromObject(object.acquiringCrownMetadata); + } + if (object.competitionResultMetadata != null) { + if (typeof object.competitionResultMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.competitionResultMetadata: object expected"); + message.competitionResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.fromObject(object.competitionResultMetadata); + } + if (object.timeAttackResultMetadata != null) { + if (typeof object.timeAttackResultMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.timeAttackResultMetadata: object expected"); + message.timeAttackResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.fromObject(object.timeAttackResultMetadata); + } + if (object.levelUpMetadata != null) { + if (typeof object.levelUpMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.levelUpMetadata: object expected"); + message.levelUpMetadata = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.fromObject(object.levelUpMetadata); + } + return message; + }; + + /** + * Creates a plain object from a SaveScreenshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.SaveScreenshotRequest} message SaveScreenshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScreenshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.timestamp = 0; + object.imageType = options.enums === String ? "SS_GHOST_BATTLE" : 1; + if (options.bytes === String) + object.image = ""; + else { + object.image = []; + if (options.bytes !== Array) + object.image = $util.newBuffer(object.image); + } + object.ghostMetadata = null; + object.versusMetadata = null; + object.terminalMetadata = null; + object.transparent = false; + object.playedAt = 0; + object.acquiringVsStarMetadata = null; + object.acquiringAuraMotifMetadata = null; + object.ghostRegionMapMetadata = null; + object.acquiringCrownMetadata = null; + object.competitionResultMetadata = null; + object.timeAttackResultMetadata = null; + object.levelUpMetadata = null; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + if (message.imageType != null && message.hasOwnProperty("imageType")) + object.imageType = options.enums === String ? $root.wm.protobuf.ScreenshotType[message.imageType] : message.imageType; + if (message.image != null && message.hasOwnProperty("image")) + object.image = options.bytes === String ? $util.base64.encode(message.image, 0, message.image.length) : options.bytes === Array ? Array.prototype.slice.call(message.image) : message.image; + if (message.ghostMetadata != null && message.hasOwnProperty("ghostMetadata")) + object.ghostMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.toObject(message.ghostMetadata, options); + if (message.versusMetadata != null && message.hasOwnProperty("versusMetadata")) + object.versusMetadata = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.toObject(message.versusMetadata, options); + if (message.terminalMetadata != null && message.hasOwnProperty("terminalMetadata")) + object.terminalMetadata = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.toObject(message.terminalMetadata, options); + if (message.transparent != null && message.hasOwnProperty("transparent")) + object.transparent = message.transparent; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.acquiringVsStarMetadata != null && message.hasOwnProperty("acquiringVsStarMetadata")) + object.acquiringVsStarMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.toObject(message.acquiringVsStarMetadata, options); + if (message.acquiringAuraMotifMetadata != null && message.hasOwnProperty("acquiringAuraMotifMetadata")) + object.acquiringAuraMotifMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.toObject(message.acquiringAuraMotifMetadata, options); + if (message.ghostRegionMapMetadata != null && message.hasOwnProperty("ghostRegionMapMetadata")) + object.ghostRegionMapMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.toObject(message.ghostRegionMapMetadata, options); + if (message.acquiringCrownMetadata != null && message.hasOwnProperty("acquiringCrownMetadata")) + object.acquiringCrownMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.toObject(message.acquiringCrownMetadata, options); + if (message.competitionResultMetadata != null && message.hasOwnProperty("competitionResultMetadata")) + object.competitionResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.toObject(message.competitionResultMetadata, options); + if (message.timeAttackResultMetadata != null && message.hasOwnProperty("timeAttackResultMetadata")) + object.timeAttackResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.toObject(message.timeAttackResultMetadata, options); + if (message.levelUpMetadata != null && message.hasOwnProperty("levelUpMetadata")) + object.levelUpMetadata = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.toObject(message.levelUpMetadata, options); + return object; + }; + + /** + * Converts this SaveScreenshotRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + * @returns {Object.} JSON object + */ + SaveScreenshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScreenshotRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScreenshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest"; + }; + + SaveScreenshotRequest.GhostBattleMetadata = (function() { + + /** + * Properties of a GhostBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IGhostBattleMetadata + * @property {number} tunePower GhostBattleMetadata tunePower + * @property {number} tuneHandling GhostBattleMetadata tuneHandling + * @property {number} area GhostBattleMetadata area + * @property {number} stampReturnCount GhostBattleMetadata stampReturnCount + * @property {Array.|null} [opponents] GhostBattleMetadata opponents + */ + + /** + * Constructs a new GhostBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a GhostBattleMetadata. + * @implements IGhostBattleMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata=} [properties] Properties to set + */ + function GhostBattleMetadata(properties) { + this.opponents = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.tunePower = 0; + + /** + * GhostBattleMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.tuneHandling = 0; + + /** + * GhostBattleMetadata area. + * @member {number} area + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.area = 0; + + /** + * GhostBattleMetadata stampReturnCount. + * @member {number} stampReturnCount + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.stampReturnCount = 0; + + /** + * GhostBattleMetadata opponents. + * @member {Array.} opponents + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.opponents = $util.emptyArray; + + /** + * Creates a new GhostBattleMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata instance + */ + GhostBattleMetadata.create = function create(properties) { + return new GhostBattleMetadata(properties); + }; + + /** + * Encodes the specified GhostBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata} message GhostBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stampReturnCount); + if (message.opponents != null && message.opponents.length) + for (let i = 0; i < message.opponents.length; ++i) + $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.encode(message.opponents[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata} message GhostBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + case 4: { + message.stampReturnCount = reader.uint32(); + break; + } + case 6: { + if (!(message.opponents && message.opponents.length)) + message.opponents = []; + message.opponents.push($root.wm.protobuf.SaveScreenshotRequest.OpponentCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("stampReturnCount")) + throw $util.ProtocolError("missing required 'stampReturnCount'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.stampReturnCount)) + return "stampReturnCount: integer expected"; + if (message.opponents != null && message.hasOwnProperty("opponents")) { + if (!Array.isArray(message.opponents)) + return "opponents: array expected"; + for (let i = 0; i < message.opponents.length; ++i) { + let error = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.verify(message.opponents[i]); + if (error) + return "opponents." + error; + } + } + return null; + }; + + /** + * Creates a GhostBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata + */ + GhostBattleMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.stampReturnCount != null) + message.stampReturnCount = object.stampReturnCount >>> 0; + if (object.opponents) { + if (!Array.isArray(object.opponents)) + throw TypeError(".wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.opponents: array expected"); + message.opponents = []; + for (let i = 0; i < object.opponents.length; ++i) { + if (typeof object.opponents[i] !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.opponents: object expected"); + message.opponents[i] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.fromObject(object.opponents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GhostBattleMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} message GhostBattleMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.opponents = []; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.area = 0; + object.stampReturnCount = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.stampReturnCount != null && message.hasOwnProperty("stampReturnCount")) + object.stampReturnCount = message.stampReturnCount; + if (message.opponents && message.opponents.length) { + object.opponents = []; + for (let j = 0; j < message.opponents.length; ++j) + object.opponents[j] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.toObject(message.opponents[j], options); + } + return object; + }; + + /** + * Converts this GhostBattleMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + * @returns {Object.} JSON object + */ + GhostBattleMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata"; + }; + + return GhostBattleMetadata; + })(); + + SaveScreenshotRequest.VersusBattleMetadata = (function() { + + /** + * Properties of a VersusBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IVersusBattleMetadata + * @property {number} tunePower VersusBattleMetadata tunePower + * @property {number} tuneHandling VersusBattleMetadata tuneHandling + * @property {number} area VersusBattleMetadata area + * @property {Array.|null} [opponents] VersusBattleMetadata opponents + */ + + /** + * Constructs a new VersusBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a VersusBattleMetadata. + * @implements IVersusBattleMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata=} [properties] Properties to set + */ + function VersusBattleMetadata(properties) { + this.opponents = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersusBattleMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.tunePower = 0; + + /** + * VersusBattleMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.tuneHandling = 0; + + /** + * VersusBattleMetadata area. + * @member {number} area + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.area = 0; + + /** + * VersusBattleMetadata opponents. + * @member {Array.} opponents + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.opponents = $util.emptyArray; + + /** + * Creates a new VersusBattleMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata instance + */ + VersusBattleMetadata.create = function create(properties) { + return new VersusBattleMetadata(properties); + }; + + /** + * Encodes the specified VersusBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata} message VersusBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + if (message.opponents != null && message.opponents.length) + for (let i = 0; i < message.opponents.length; ++i) + $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.encode(message.opponents[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VersusBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata} message VersusBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + case 4: { + if (!(message.opponents && message.opponents.length)) + message.opponents = []; + message.opponents.push($root.wm.protobuf.SaveScreenshotRequest.OpponentCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersusBattleMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersusBattleMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (message.opponents != null && message.hasOwnProperty("opponents")) { + if (!Array.isArray(message.opponents)) + return "opponents: array expected"; + for (let i = 0; i < message.opponents.length; ++i) { + let error = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.verify(message.opponents[i]); + if (error) + return "opponents." + error; + } + } + return null; + }; + + /** + * Creates a VersusBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata + */ + VersusBattleMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.opponents) { + if (!Array.isArray(object.opponents)) + throw TypeError(".wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.opponents: array expected"); + message.opponents = []; + for (let i = 0; i < object.opponents.length; ++i) { + if (typeof object.opponents[i] !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.opponents: object expected"); + message.opponents[i] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.fromObject(object.opponents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a VersusBattleMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} message VersusBattleMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersusBattleMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.opponents = []; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.area = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.opponents && message.opponents.length) { + object.opponents = []; + for (let j = 0; j < message.opponents.length; ++j) + object.opponents[j] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.toObject(message.opponents[j], options); + } + return object; + }; + + /** + * Converts this VersusBattleMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + * @returns {Object.} JSON object + */ + VersusBattleMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VersusBattleMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VersusBattleMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata"; + }; + + return VersusBattleMetadata; + })(); + + SaveScreenshotRequest.TerminalMetadata = (function() { + + /** + * Properties of a TerminalMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface ITerminalMetadata + * @property {number} tunePower TerminalMetadata tunePower + * @property {number} tuneHandling TerminalMetadata tuneHandling + * @property {string} name TerminalMetadata name + * @property {string} title TerminalMetadata title + * @property {number} level TerminalMetadata level + */ + + /** + * Constructs a new TerminalMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a TerminalMetadata. + * @implements ITerminalMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata=} [properties] Properties to set + */ + function TerminalMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerminalMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.tunePower = 0; + + /** + * TerminalMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.tuneHandling = 0; + + /** + * TerminalMetadata name. + * @member {string} name + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.name = ""; + + /** + * TerminalMetadata title. + * @member {string} title + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.title = ""; + + /** + * TerminalMetadata level. + * @member {number} level + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.level = 0; + + /** + * Creates a new TerminalMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata instance + */ + TerminalMetadata.create = function create(properties) { + return new TerminalMetadata(properties); + }; + + /** + * Encodes the specified TerminalMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata} message TerminalMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.title); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.level); + return writer; + }; + + /** + * Encodes the specified TerminalMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata} message TerminalMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + case 4: { + message.title = reader.string(); + break; + } + case 5: { + message.level = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("name")) + throw $util.ProtocolError("missing required 'name'", { instance: message }); + if (!message.hasOwnProperty("title")) + throw $util.ProtocolError("missing required 'title'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + return message; + }; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerminalMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerminalMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isString(message.name)) + return "name: string expected"; + if (!$util.isString(message.title)) + return "title: string expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + return null; + }; + + /** + * Creates a TerminalMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata + */ + TerminalMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.title != null) + message.title = String(object.title); + if (object.level != null) + message.level = object.level >>> 0; + return message; + }; + + /** + * Creates a plain object from a TerminalMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} message TerminalMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerminalMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.name = ""; + object.title = ""; + object.level = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + return object; + }; + + /** + * Converts this TerminalMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + * @returns {Object.} JSON object + */ + TerminalMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerminalMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerminalMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.TerminalMetadata"; + }; + + return TerminalMetadata; + })(); + + SaveScreenshotRequest.AcquiringVersusStarMetadata = (function() { + + /** + * Properties of an AcquiringVersusStarMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IAcquiringVersusStarMetadata + * @property {number} tunePower AcquiringVersusStarMetadata tunePower + * @property {number} tuneHandling AcquiringVersusStarMetadata tuneHandling + * @property {number} vsStarCount AcquiringVersusStarMetadata vsStarCount + */ + + /** + * Constructs a new AcquiringVersusStarMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an AcquiringVersusStarMetadata. + * @implements IAcquiringVersusStarMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata=} [properties] Properties to set + */ + function AcquiringVersusStarMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcquiringVersusStarMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + */ + AcquiringVersusStarMetadata.prototype.tunePower = 0; + + /** + * AcquiringVersusStarMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + */ + AcquiringVersusStarMetadata.prototype.tuneHandling = 0; + + /** + * AcquiringVersusStarMetadata vsStarCount. + * @member {number} vsStarCount + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + */ + AcquiringVersusStarMetadata.prototype.vsStarCount = 0; + + /** + * Creates a new AcquiringVersusStarMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata instance + */ + AcquiringVersusStarMetadata.create = function create(properties) { + return new AcquiringVersusStarMetadata(properties); + }; + + /** + * Encodes the specified AcquiringVersusStarMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata} message AcquiringVersusStarMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringVersusStarMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.vsStarCount); + return writer; + }; + + /** + * Encodes the specified AcquiringVersusStarMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata} message AcquiringVersusStarMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringVersusStarMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringVersusStarMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.vsStarCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("vsStarCount")) + throw $util.ProtocolError("missing required 'vsStarCount'", { instance: message }); + return message; + }; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringVersusStarMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcquiringVersusStarMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcquiringVersusStarMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.vsStarCount)) + return "vsStarCount: integer expected"; + return null; + }; + + /** + * Creates an AcquiringVersusStarMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata + */ + AcquiringVersusStarMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.vsStarCount != null) + message.vsStarCount = object.vsStarCount >>> 0; + return message; + }; + + /** + * Creates a plain object from an AcquiringVersusStarMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} message AcquiringVersusStarMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcquiringVersusStarMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.vsStarCount = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + object.vsStarCount = message.vsStarCount; + return object; + }; + + /** + * Converts this AcquiringVersusStarMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + * @returns {Object.} JSON object + */ + AcquiringVersusStarMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcquiringVersusStarMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcquiringVersusStarMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata"; + }; + + return AcquiringVersusStarMetadata; + })(); + + SaveScreenshotRequest.AcquiringAuraMotifMetadata = (function() { + + /** + * Properties of an AcquiringAuraMotifMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IAcquiringAuraMotifMetadata + * @property {number} tunePower AcquiringAuraMotifMetadata tunePower + * @property {number} tuneHandling AcquiringAuraMotifMetadata tuneHandling + * @property {number} auraMotif AcquiringAuraMotifMetadata auraMotif + */ + + /** + * Constructs a new AcquiringAuraMotifMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an AcquiringAuraMotifMetadata. + * @implements IAcquiringAuraMotifMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata=} [properties] Properties to set + */ + function AcquiringAuraMotifMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcquiringAuraMotifMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + */ + AcquiringAuraMotifMetadata.prototype.tunePower = 0; + + /** + * AcquiringAuraMotifMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + */ + AcquiringAuraMotifMetadata.prototype.tuneHandling = 0; + + /** + * AcquiringAuraMotifMetadata auraMotif. + * @member {number} auraMotif + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + */ + AcquiringAuraMotifMetadata.prototype.auraMotif = 0; + + /** + * Creates a new AcquiringAuraMotifMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata instance + */ + AcquiringAuraMotifMetadata.create = function create(properties) { + return new AcquiringAuraMotifMetadata(properties); + }; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata} message AcquiringAuraMotifMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringAuraMotifMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.auraMotif); + return writer; + }; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata} message AcquiringAuraMotifMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringAuraMotifMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringAuraMotifMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.auraMotif = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("auraMotif")) + throw $util.ProtocolError("missing required 'auraMotif'", { instance: message }); + return message; + }; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringAuraMotifMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcquiringAuraMotifMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcquiringAuraMotifMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.auraMotif)) + return "auraMotif: integer expected"; + return null; + }; + + /** + * Creates an AcquiringAuraMotifMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata + */ + AcquiringAuraMotifMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.auraMotif != null) + message.auraMotif = object.auraMotif >>> 0; + return message; + }; + + /** + * Creates a plain object from an AcquiringAuraMotifMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} message AcquiringAuraMotifMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcquiringAuraMotifMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.auraMotif = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.auraMotif != null && message.hasOwnProperty("auraMotif")) + object.auraMotif = message.auraMotif; + return object; + }; + + /** + * Converts this AcquiringAuraMotifMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + * @returns {Object.} JSON object + */ + AcquiringAuraMotifMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcquiringAuraMotifMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcquiringAuraMotifMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata"; + }; + + return AcquiringAuraMotifMetadata; + })(); + + SaveScreenshotRequest.GhostRegionMapMetadata = (function() { + + /** + * Properties of a GhostRegionMapMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IGhostRegionMapMetadata + * @property {number} tunePower GhostRegionMapMetadata tunePower + * @property {number} tuneHandling GhostRegionMapMetadata tuneHandling + * @property {number} rgScore GhostRegionMapMetadata rgScore + * @property {Array.|null} [rgRegionMapScore] GhostRegionMapMetadata rgRegionMapScore + */ + + /** + * Constructs a new GhostRegionMapMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a GhostRegionMapMetadata. + * @implements IGhostRegionMapMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata=} [properties] Properties to set + */ + function GhostRegionMapMetadata(properties) { + this.rgRegionMapScore = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostRegionMapMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.tunePower = 0; + + /** + * GhostRegionMapMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.tuneHandling = 0; + + /** + * GhostRegionMapMetadata rgScore. + * @member {number} rgScore + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.rgScore = 0; + + /** + * GhostRegionMapMetadata rgRegionMapScore. + * @member {Array.} rgRegionMapScore + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.rgRegionMapScore = $util.emptyArray; + + /** + * Creates a new GhostRegionMapMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata instance + */ + GhostRegionMapMetadata.create = function create(properties) { + return new GhostRegionMapMetadata(properties); + }; + + /** + * Encodes the specified GhostRegionMapMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata} message GhostRegionMapMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostRegionMapMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rgScore); + if (message.rgRegionMapScore != null && message.rgRegionMapScore.length) + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.rgRegionMapScore[i]); + return writer; + }; + + /** + * Encodes the specified GhostRegionMapMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata} message GhostRegionMapMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostRegionMapMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostRegionMapMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.rgScore = reader.uint32(); + break; + } + case 4: { + if (!(message.rgRegionMapScore && message.rgRegionMapScore.length)) + message.rgRegionMapScore = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegionMapScore.push(reader.uint32()); + } else + message.rgRegionMapScore.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("rgScore")) + throw $util.ProtocolError("missing required 'rgScore'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostRegionMapMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostRegionMapMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostRegionMapMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.rgScore)) + return "rgScore: integer expected"; + if (message.rgRegionMapScore != null && message.hasOwnProperty("rgRegionMapScore")) { + if (!Array.isArray(message.rgRegionMapScore)) + return "rgRegionMapScore: array expected"; + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + if (!$util.isInteger(message.rgRegionMapScore[i])) + return "rgRegionMapScore: integer[] expected"; + } + return null; + }; + + /** + * Creates a GhostRegionMapMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata + */ + GhostRegionMapMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.rgScore != null) + message.rgScore = object.rgScore >>> 0; + if (object.rgRegionMapScore) { + if (!Array.isArray(object.rgRegionMapScore)) + throw TypeError(".wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.rgRegionMapScore: array expected"); + message.rgRegionMapScore = []; + for (let i = 0; i < object.rgRegionMapScore.length; ++i) + message.rgRegionMapScore[i] = object.rgRegionMapScore[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a GhostRegionMapMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} message GhostRegionMapMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostRegionMapMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.rgRegionMapScore = []; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.rgScore = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.rgScore != null && message.hasOwnProperty("rgScore")) + object.rgScore = message.rgScore; + if (message.rgRegionMapScore && message.rgRegionMapScore.length) { + object.rgRegionMapScore = []; + for (let j = 0; j < message.rgRegionMapScore.length; ++j) + object.rgRegionMapScore[j] = message.rgRegionMapScore[j]; + } + return object; + }; + + /** + * Converts this GhostRegionMapMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + * @returns {Object.} JSON object + */ + GhostRegionMapMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostRegionMapMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostRegionMapMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata"; + }; + + return GhostRegionMapMetadata; + })(); + + SaveScreenshotRequest.AcquiringCrownMetadata = (function() { + + /** + * Properties of an AcquiringCrownMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IAcquiringCrownMetadata + * @property {number} tunePower AcquiringCrownMetadata tunePower + * @property {number} tuneHandling AcquiringCrownMetadata tuneHandling + * @property {number} area AcquiringCrownMetadata area + */ + + /** + * Constructs a new AcquiringCrownMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an AcquiringCrownMetadata. + * @implements IAcquiringCrownMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata=} [properties] Properties to set + */ + function AcquiringCrownMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcquiringCrownMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + */ + AcquiringCrownMetadata.prototype.tunePower = 0; + + /** + * AcquiringCrownMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + */ + AcquiringCrownMetadata.prototype.tuneHandling = 0; + + /** + * AcquiringCrownMetadata area. + * @member {number} area + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + */ + AcquiringCrownMetadata.prototype.area = 0; + + /** + * Creates a new AcquiringCrownMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata instance + */ + AcquiringCrownMetadata.create = function create(properties) { + return new AcquiringCrownMetadata(properties); + }; + + /** + * Encodes the specified AcquiringCrownMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata} message AcquiringCrownMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringCrownMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + return writer; + }; + + /** + * Encodes the specified AcquiringCrownMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata} message AcquiringCrownMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringCrownMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringCrownMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringCrownMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcquiringCrownMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcquiringCrownMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + return null; + }; + + /** + * Creates an AcquiringCrownMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata + */ + AcquiringCrownMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + return message; + }; + + /** + * Creates a plain object from an AcquiringCrownMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} message AcquiringCrownMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcquiringCrownMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.area = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + return object; + }; + + /** + * Converts this AcquiringCrownMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + * @returns {Object.} JSON object + */ + AcquiringCrownMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcquiringCrownMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcquiringCrownMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata"; + }; + + return AcquiringCrownMetadata; + })(); + + SaveScreenshotRequest.GhostCompetitionResultMetadata = (function() { + + /** + * Properties of a GhostCompetitionResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IGhostCompetitionResultMetadata + * @property {number} tunePower GhostCompetitionResultMetadata tunePower + * @property {number} tuneHandling GhostCompetitionResultMetadata tuneHandling + * @property {number|null} [rank] GhostCompetitionResultMetadata rank + * @property {number} result GhostCompetitionResultMetadata result + */ + + /** + * Constructs a new GhostCompetitionResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a GhostCompetitionResultMetadata. + * @implements IGhostCompetitionResultMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata=} [properties] Properties to set + */ + function GhostCompetitionResultMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionResultMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.tunePower = 0; + + /** + * GhostCompetitionResultMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.tuneHandling = 0; + + /** + * GhostCompetitionResultMetadata rank. + * @member {number} rank + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.rank = 0; + + /** + * GhostCompetitionResultMetadata result. + * @member {number} result + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.result = 0; + + /** + * Creates a new GhostCompetitionResultMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata instance + */ + GhostCompetitionResultMetadata.create = function create(properties) { + return new GhostCompetitionResultMetadata(properties); + }; + + /** + * Encodes the specified GhostCompetitionResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata} message GhostCompetitionResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionResultMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rank); + writer.uint32(/* id 4, wireType 0 =*/32).sint32(message.result); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata} message GhostCompetitionResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionResultMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionResultMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.rank = reader.uint32(); + break; + } + case 4: { + message.result = reader.sint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionResultMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionResultMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionResultMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.rank != null && message.hasOwnProperty("rank")) + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + return null; + }; + + /** + * Creates a GhostCompetitionResultMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata + */ + GhostCompetitionResultMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.rank != null) + message.rank = object.rank >>> 0; + if (object.result != null) + message.result = object.result | 0; + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionResultMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} message GhostCompetitionResultMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionResultMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.rank = 0; + object.result = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + return object; + }; + + /** + * Converts this GhostCompetitionResultMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionResultMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionResultMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionResultMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata"; + }; + + return GhostCompetitionResultMetadata; + })(); + + SaveScreenshotRequest.TimeAttackResultMetadata = (function() { + + /** + * Properties of a TimeAttackResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface ITimeAttackResultMetadata + * @property {number} tunePower TimeAttackResultMetadata tunePower + * @property {number} tuneHandling TimeAttackResultMetadata tuneHandling + * @property {number} course TimeAttackResultMetadata course + * @property {number|null} [wholeRank] TimeAttackResultMetadata wholeRank + * @property {number|null} [modelRank] TimeAttackResultMetadata modelRank + */ + + /** + * Constructs a new TimeAttackResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a TimeAttackResultMetadata. + * @implements ITimeAttackResultMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata=} [properties] Properties to set + */ + function TimeAttackResultMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeAttackResultMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.tunePower = 0; + + /** + * TimeAttackResultMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.tuneHandling = 0; + + /** + * TimeAttackResultMetadata course. + * @member {number} course + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.course = 0; + + /** + * TimeAttackResultMetadata wholeRank. + * @member {number} wholeRank + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.wholeRank = 0; + + /** + * TimeAttackResultMetadata modelRank. + * @member {number} modelRank + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.modelRank = 0; + + /** + * Creates a new TimeAttackResultMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata instance + */ + TimeAttackResultMetadata.create = function create(properties) { + return new TimeAttackResultMetadata(properties); + }; + + /** + * Encodes the specified TimeAttackResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata} message TimeAttackResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResultMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.course); + if (message.wholeRank != null && Object.hasOwnProperty.call(message, "wholeRank")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.wholeRank); + if (message.modelRank != null && Object.hasOwnProperty.call(message, "modelRank")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.modelRank); + return writer; + }; + + /** + * Encodes the specified TimeAttackResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata} message TimeAttackResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResultMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResultMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.course = reader.uint32(); + break; + } + case 4: { + message.wholeRank = reader.uint32(); + break; + } + case 5: { + message.modelRank = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + return message; + }; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResultMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeAttackResultMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeAttackResultMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + if (!$util.isInteger(message.wholeRank)) + return "wholeRank: integer expected"; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + if (!$util.isInteger(message.modelRank)) + return "modelRank: integer expected"; + return null; + }; + + /** + * Creates a TimeAttackResultMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata + */ + TimeAttackResultMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.course != null) + message.course = object.course >>> 0; + if (object.wholeRank != null) + message.wholeRank = object.wholeRank >>> 0; + if (object.modelRank != null) + message.modelRank = object.modelRank >>> 0; + return message; + }; + + /** + * Creates a plain object from a TimeAttackResultMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} message TimeAttackResultMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeAttackResultMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.course = 0; + object.wholeRank = 0; + object.modelRank = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + object.wholeRank = message.wholeRank; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + object.modelRank = message.modelRank; + return object; + }; + + /** + * Converts this TimeAttackResultMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + * @returns {Object.} JSON object + */ + TimeAttackResultMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeAttackResultMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeAttackResultMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata"; + }; + + return TimeAttackResultMetadata; + })(); + + SaveScreenshotRequest.LevelUpMetadata = (function() { + + /** + * Properties of a LevelUpMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface ILevelUpMetadata + * @property {number} tunePower LevelUpMetadata tunePower + * @property {number} tuneHandling LevelUpMetadata tuneHandling + * @property {number} level LevelUpMetadata level + */ + + /** + * Constructs a new LevelUpMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a LevelUpMetadata. + * @implements ILevelUpMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata=} [properties] Properties to set + */ + function LevelUpMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LevelUpMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + */ + LevelUpMetadata.prototype.tunePower = 0; + + /** + * LevelUpMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + */ + LevelUpMetadata.prototype.tuneHandling = 0; + + /** + * LevelUpMetadata level. + * @member {number} level + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + */ + LevelUpMetadata.prototype.level = 0; + + /** + * Creates a new LevelUpMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata instance + */ + LevelUpMetadata.create = function create(properties) { + return new LevelUpMetadata(properties); + }; + + /** + * Encodes the specified LevelUpMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata} message LevelUpMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LevelUpMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.level); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tunePower); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuneHandling); + return writer; + }; + + /** + * Encodes the specified LevelUpMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata} message LevelUpMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LevelUpMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LevelUpMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.tunePower = reader.uint32(); + break; + } + case 3: { + message.tuneHandling = reader.uint32(); + break; + } + case 1: { + message.level = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + return message; + }; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LevelUpMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LevelUpMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LevelUpMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + return null; + }; + + /** + * Creates a LevelUpMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata + */ + LevelUpMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.level != null) + message.level = object.level >>> 0; + return message; + }; + + /** + * Creates a plain object from a LevelUpMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} message LevelUpMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LevelUpMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.level = 0; + object.tunePower = 0; + object.tuneHandling = 0; + } + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + return object; + }; + + /** + * Converts this LevelUpMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + * @returns {Object.} JSON object + */ + LevelUpMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LevelUpMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LevelUpMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.LevelUpMetadata"; + }; + + return LevelUpMetadata; + })(); + + SaveScreenshotRequest.OpponentCar = (function() { + + /** + * Properties of an OpponentCar. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IOpponentCar + * @property {number|null} [carId] OpponentCar carId + * @property {number} tunePower OpponentCar tunePower + * @property {number} tuneHandling OpponentCar tuneHandling + */ + + /** + * Constructs a new OpponentCar. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an OpponentCar. + * @implements IOpponentCar + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar=} [properties] Properties to set + */ + function OpponentCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OpponentCar carId. + * @member {number} carId + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + */ + OpponentCar.prototype.carId = 0; + + /** + * OpponentCar tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + */ + OpponentCar.prototype.tunePower = 0; + + /** + * OpponentCar tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + */ + OpponentCar.prototype.tuneHandling = 0; + + /** + * Creates a new OpponentCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar instance + */ + OpponentCar.create = function create(properties) { + return new OpponentCar(properties); + }; + + /** + * Encodes the specified OpponentCar message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar} message OpponentCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpponentCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tunePower); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuneHandling); + return writer; + }; + + /** + * Encodes the specified OpponentCar message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar} message OpponentCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpponentCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OpponentCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpponentCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.OpponentCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.tunePower = reader.uint32(); + break; + } + case 3: { + message.tuneHandling = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes an OpponentCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpponentCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpponentCar message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpponentCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + return null; + }; + + /** + * Creates an OpponentCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar + */ + OpponentCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.OpponentCar) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.OpponentCar(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + return message; + }; + + /** + * Creates a plain object from an OpponentCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.OpponentCar} message OpponentCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpponentCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.tunePower = 0; + object.tuneHandling = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + return object; + }; + + /** + * Converts this OpponentCar to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + * @returns {Object.} JSON object + */ + OpponentCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpponentCar + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpponentCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.OpponentCar"; + }; + + return OpponentCar; + })(); + + return SaveScreenshotRequest; + })(); + + protobuf.SaveScreenshotResponse = (function() { + + /** + * Properties of a SaveScreenshotResponse. + * @memberof wm.protobuf + * @interface ISaveScreenshotResponse + * @property {wm.protobuf.ErrorCode} error SaveScreenshotResponse error + */ + + /** + * Constructs a new SaveScreenshotResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveScreenshotResponse. + * @implements ISaveScreenshotResponse + * @constructor + * @param {wm.protobuf.ISaveScreenshotResponse=} [properties] Properties to set + */ + function SaveScreenshotResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScreenshotResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveScreenshotResponse + * @instance + */ + SaveScreenshotResponse.prototype.error = 0; + + /** + * Creates a new SaveScreenshotResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.ISaveScreenshotResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse instance + */ + SaveScreenshotResponse.create = function create(properties) { + return new SaveScreenshotResponse(properties); + }; + + /** + * Encodes the specified SaveScreenshotResponse message. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.ISaveScreenshotResponse} message SaveScreenshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveScreenshotResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.ISaveScreenshotResponse} message SaveScreenshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScreenshotResponse message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScreenshotResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveScreenshotResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse + */ + SaveScreenshotResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotResponse) + return object; + let message = new $root.wm.protobuf.SaveScreenshotResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveScreenshotResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.SaveScreenshotResponse} message SaveScreenshotResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScreenshotResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveScreenshotResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotResponse + * @instance + * @returns {Object.} JSON object + */ + SaveScreenshotResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScreenshotResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScreenshotResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotResponse"; + }; + + return SaveScreenshotResponse; + })(); + + protobuf.SubmitClientLogRequest = (function() { + + /** + * Properties of a SubmitClientLogRequest. + * @memberof wm.protobuf + * @interface ISubmitClientLogRequest + * @property {Uint8Array} data SubmitClientLogRequest data + * @property {number} modifiedAt SubmitClientLogRequest modifiedAt + * @property {wm.protobuf.ClientLogType} logType SubmitClientLogRequest logType + */ + + /** + * Constructs a new SubmitClientLogRequest. + * @memberof wm.protobuf + * @classdesc Represents a SubmitClientLogRequest. + * @implements ISubmitClientLogRequest + * @constructor + * @param {wm.protobuf.ISubmitClientLogRequest=} [properties] Properties to set + */ + function SubmitClientLogRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubmitClientLogRequest data. + * @member {Uint8Array} data + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + */ + SubmitClientLogRequest.prototype.data = $util.newBuffer([]); + + /** + * SubmitClientLogRequest modifiedAt. + * @member {number} modifiedAt + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + */ + SubmitClientLogRequest.prototype.modifiedAt = 0; + + /** + * SubmitClientLogRequest logType. + * @member {wm.protobuf.ClientLogType} logType + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + */ + SubmitClientLogRequest.prototype.logType = 0; + + /** + * Creates a new SubmitClientLogRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.ISubmitClientLogRequest=} [properties] Properties to set + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest instance + */ + SubmitClientLogRequest.create = function create(properties) { + return new SubmitClientLogRequest(properties); + }; + + /** + * Encodes the specified SubmitClientLogRequest message. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.ISubmitClientLogRequest} message SubmitClientLogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.modifiedAt); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.logType); + return writer; + }; + + /** + * Encodes the specified SubmitClientLogRequest message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.ISubmitClientLogRequest} message SubmitClientLogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SubmitClientLogRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.data = reader.bytes(); + break; + } + case 2: { + message.modifiedAt = reader.uint32(); + break; + } + case 3: { + message.logType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("data")) + throw $util.ProtocolError("missing required 'data'", { instance: message }); + if (!message.hasOwnProperty("modifiedAt")) + throw $util.ProtocolError("missing required 'modifiedAt'", { instance: message }); + if (!message.hasOwnProperty("logType")) + throw $util.ProtocolError("missing required 'logType'", { instance: message }); + return message; + }; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubmitClientLogRequest message. + * @function verify + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubmitClientLogRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (!$util.isInteger(message.modifiedAt)) + return "modifiedAt: integer expected"; + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a SubmitClientLogRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest + */ + SubmitClientLogRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SubmitClientLogRequest) + return object; + let message = new $root.wm.protobuf.SubmitClientLogRequest(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + if (object.modifiedAt != null) + message.modifiedAt = object.modifiedAt >>> 0; + switch (object.logType) { + case "LOG_LOAD_REPORT": + case 0: + message.logType = 0; + break; + case "LOG_ERROR": + case 1: + message.logType = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a SubmitClientLogRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.SubmitClientLogRequest} message SubmitClientLogRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubmitClientLogRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.modifiedAt = 0; + object.logType = options.enums === String ? "LOG_LOAD_REPORT" : 0; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.modifiedAt != null && message.hasOwnProperty("modifiedAt")) + object.modifiedAt = message.modifiedAt; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = options.enums === String ? $root.wm.protobuf.ClientLogType[message.logType] : message.logType; + return object; + }; + + /** + * Converts this SubmitClientLogRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + * @returns {Object.} JSON object + */ + SubmitClientLogRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SubmitClientLogRequest + * @function getTypeUrl + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubmitClientLogRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SubmitClientLogRequest"; + }; + + return SubmitClientLogRequest; + })(); + + protobuf.SubmitClientLogResponse = (function() { + + /** + * Properties of a SubmitClientLogResponse. + * @memberof wm.protobuf + * @interface ISubmitClientLogResponse + * @property {wm.protobuf.ErrorCode} error SubmitClientLogResponse error + */ + + /** + * Constructs a new SubmitClientLogResponse. + * @memberof wm.protobuf + * @classdesc Represents a SubmitClientLogResponse. + * @implements ISubmitClientLogResponse + * @constructor + * @param {wm.protobuf.ISubmitClientLogResponse=} [properties] Properties to set + */ + function SubmitClientLogResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubmitClientLogResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SubmitClientLogResponse + * @instance + */ + SubmitClientLogResponse.prototype.error = 0; + + /** + * Creates a new SubmitClientLogResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.ISubmitClientLogResponse=} [properties] Properties to set + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse instance + */ + SubmitClientLogResponse.create = function create(properties) { + return new SubmitClientLogResponse(properties); + }; + + /** + * Encodes the specified SubmitClientLogResponse message. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.ISubmitClientLogResponse} message SubmitClientLogResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SubmitClientLogResponse message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.ISubmitClientLogResponse} message SubmitClientLogResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SubmitClientLogResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubmitClientLogResponse message. + * @function verify + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubmitClientLogResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SubmitClientLogResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse + */ + SubmitClientLogResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SubmitClientLogResponse) + return object; + let message = new $root.wm.protobuf.SubmitClientLogResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SubmitClientLogResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.SubmitClientLogResponse} message SubmitClientLogResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubmitClientLogResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SubmitClientLogResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SubmitClientLogResponse + * @instance + * @returns {Object.} JSON object + */ + SubmitClientLogResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SubmitClientLogResponse + * @function getTypeUrl + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubmitClientLogResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SubmitClientLogResponse"; + }; + + return SubmitClientLogResponse; + })(); + + protobuf.LoadScratchInformationRequest = (function() { + + /** + * Properties of a LoadScratchInformationRequest. + * @memberof wm.protobuf + * @interface ILoadScratchInformationRequest + * @property {number} userId LoadScratchInformationRequest userId + */ + + /** + * Constructs a new LoadScratchInformationRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadScratchInformationRequest. + * @implements ILoadScratchInformationRequest + * @constructor + * @param {wm.protobuf.ILoadScratchInformationRequest=} [properties] Properties to set + */ + function LoadScratchInformationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadScratchInformationRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadScratchInformationRequest + * @instance + */ + LoadScratchInformationRequest.prototype.userId = 0; + + /** + * Creates a new LoadScratchInformationRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.ILoadScratchInformationRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest instance + */ + LoadScratchInformationRequest.create = function create(properties) { + return new LoadScratchInformationRequest(properties); + }; + + /** + * Encodes the specified LoadScratchInformationRequest message. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.ILoadScratchInformationRequest} message LoadScratchInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadScratchInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.ILoadScratchInformationRequest} message LoadScratchInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadScratchInformationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadScratchInformationRequest message. + * @function verify + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadScratchInformationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadScratchInformationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest + */ + LoadScratchInformationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadScratchInformationRequest) + return object; + let message = new $root.wm.protobuf.LoadScratchInformationRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadScratchInformationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.LoadScratchInformationRequest} message LoadScratchInformationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadScratchInformationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadScratchInformationRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadScratchInformationRequest + * @instance + * @returns {Object.} JSON object + */ + LoadScratchInformationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadScratchInformationRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadScratchInformationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadScratchInformationRequest"; + }; + + return LoadScratchInformationRequest; + })(); + + protobuf.LoadScratchInformationResponse = (function() { + + /** + * Properties of a LoadScratchInformationResponse. + * @memberof wm.protobuf + * @interface ILoadScratchInformationResponse + * @property {wm.protobuf.ErrorCode} error LoadScratchInformationResponse error + * @property {Array.|null} [scratchSheets] LoadScratchInformationResponse scratchSheets + * @property {number} currentSheet LoadScratchInformationResponse currentSheet + * @property {number} numOfScratched LoadScratchInformationResponse numOfScratched + * @property {Array.|null} [ownedUserItems] LoadScratchInformationResponse ownedUserItems + */ + + /** + * Constructs a new LoadScratchInformationResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadScratchInformationResponse. + * @implements ILoadScratchInformationResponse + * @constructor + * @param {wm.protobuf.ILoadScratchInformationResponse=} [properties] Properties to set + */ + function LoadScratchInformationResponse(properties) { + this.scratchSheets = []; + this.ownedUserItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadScratchInformationResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.error = 0; + + /** + * LoadScratchInformationResponse scratchSheets. + * @member {Array.} scratchSheets + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.scratchSheets = $util.emptyArray; + + /** + * LoadScratchInformationResponse currentSheet. + * @member {number} currentSheet + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.currentSheet = 0; + + /** + * LoadScratchInformationResponse numOfScratched. + * @member {number} numOfScratched + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.numOfScratched = 0; + + /** + * LoadScratchInformationResponse ownedUserItems. + * @member {Array.} ownedUserItems + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.ownedUserItems = $util.emptyArray; + + /** + * Creates a new LoadScratchInformationResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.ILoadScratchInformationResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse instance + */ + LoadScratchInformationResponse.create = function create(properties) { + return new LoadScratchInformationResponse(properties); + }; + + /** + * Encodes the specified LoadScratchInformationResponse message. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.ILoadScratchInformationResponse} message LoadScratchInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.scratchSheets != null && message.scratchSheets.length) + for (let i = 0; i < message.scratchSheets.length; ++i) + $root.wm.protobuf.ScratchSheet.encode(message.scratchSheets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.currentSheet); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.numOfScratched); + if (message.ownedUserItems != null && message.ownedUserItems.length) + for (let i = 0; i < message.ownedUserItems.length; ++i) + $root.wm.protobuf.UserItem.encode(message.ownedUserItems[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadScratchInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.ILoadScratchInformationResponse} message LoadScratchInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadScratchInformationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.scratchSheets && message.scratchSheets.length)) + message.scratchSheets = []; + message.scratchSheets.push($root.wm.protobuf.ScratchSheet.decode(reader, reader.uint32())); + break; + } + case 3: { + message.currentSheet = reader.uint32(); + break; + } + case 4: { + message.numOfScratched = reader.uint32(); + break; + } + case 5: { + if (!(message.ownedUserItems && message.ownedUserItems.length)) + message.ownedUserItems = []; + message.ownedUserItems.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("currentSheet")) + throw $util.ProtocolError("missing required 'currentSheet'", { instance: message }); + if (!message.hasOwnProperty("numOfScratched")) + throw $util.ProtocolError("missing required 'numOfScratched'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadScratchInformationResponse message. + * @function verify + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadScratchInformationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.scratchSheets != null && message.hasOwnProperty("scratchSheets")) { + if (!Array.isArray(message.scratchSheets)) + return "scratchSheets: array expected"; + for (let i = 0; i < message.scratchSheets.length; ++i) { + let error = $root.wm.protobuf.ScratchSheet.verify(message.scratchSheets[i]); + if (error) + return "scratchSheets." + error; + } + } + if (!$util.isInteger(message.currentSheet)) + return "currentSheet: integer expected"; + if (!$util.isInteger(message.numOfScratched)) + return "numOfScratched: integer expected"; + if (message.ownedUserItems != null && message.hasOwnProperty("ownedUserItems")) { + if (!Array.isArray(message.ownedUserItems)) + return "ownedUserItems: array expected"; + for (let i = 0; i < message.ownedUserItems.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.ownedUserItems[i]); + if (error) + return "ownedUserItems." + error; + } + } + return null; + }; + + /** + * Creates a LoadScratchInformationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse + */ + LoadScratchInformationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadScratchInformationResponse) + return object; + let message = new $root.wm.protobuf.LoadScratchInformationResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.scratchSheets) { + if (!Array.isArray(object.scratchSheets)) + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.scratchSheets: array expected"); + message.scratchSheets = []; + for (let i = 0; i < object.scratchSheets.length; ++i) { + if (typeof object.scratchSheets[i] !== "object") + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.scratchSheets: object expected"); + message.scratchSheets[i] = $root.wm.protobuf.ScratchSheet.fromObject(object.scratchSheets[i]); + } + } + if (object.currentSheet != null) + message.currentSheet = object.currentSheet >>> 0; + if (object.numOfScratched != null) + message.numOfScratched = object.numOfScratched >>> 0; + if (object.ownedUserItems) { + if (!Array.isArray(object.ownedUserItems)) + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.ownedUserItems: array expected"); + message.ownedUserItems = []; + for (let i = 0; i < object.ownedUserItems.length; ++i) { + if (typeof object.ownedUserItems[i] !== "object") + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.ownedUserItems: object expected"); + message.ownedUserItems[i] = $root.wm.protobuf.UserItem.fromObject(object.ownedUserItems[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadScratchInformationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.LoadScratchInformationResponse} message LoadScratchInformationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadScratchInformationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.scratchSheets = []; + object.ownedUserItems = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.currentSheet = 0; + object.numOfScratched = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.scratchSheets && message.scratchSheets.length) { + object.scratchSheets = []; + for (let j = 0; j < message.scratchSheets.length; ++j) + object.scratchSheets[j] = $root.wm.protobuf.ScratchSheet.toObject(message.scratchSheets[j], options); + } + if (message.currentSheet != null && message.hasOwnProperty("currentSheet")) + object.currentSheet = message.currentSheet; + if (message.numOfScratched != null && message.hasOwnProperty("numOfScratched")) + object.numOfScratched = message.numOfScratched; + if (message.ownedUserItems && message.ownedUserItems.length) { + object.ownedUserItems = []; + for (let j = 0; j < message.ownedUserItems.length; ++j) + object.ownedUserItems[j] = $root.wm.protobuf.UserItem.toObject(message.ownedUserItems[j], options); + } + return object; + }; + + /** + * Converts this LoadScratchInformationResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + * @returns {Object.} JSON object + */ + LoadScratchInformationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadScratchInformationResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadScratchInformationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadScratchInformationResponse"; + }; + + return LoadScratchInformationResponse; + })(); + + protobuf.SaveScratchSheetRequest = (function() { + + /** + * Properties of a SaveScratchSheetRequest. + * @memberof wm.protobuf + * @interface ISaveScratchSheetRequest + * @property {number} timestamp SaveScratchSheetRequest timestamp + * @property {number} targetSheet SaveScratchSheetRequest targetSheet + * @property {number} targetSquare SaveScratchSheetRequest targetSquare + * @property {number} userId SaveScratchSheetRequest userId + */ + + /** + * Constructs a new SaveScratchSheetRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveScratchSheetRequest. + * @implements ISaveScratchSheetRequest + * @constructor + * @param {wm.protobuf.ISaveScratchSheetRequest=} [properties] Properties to set + */ + function SaveScratchSheetRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScratchSheetRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.timestamp = 0; + + /** + * SaveScratchSheetRequest targetSheet. + * @member {number} targetSheet + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.targetSheet = 0; + + /** + * SaveScratchSheetRequest targetSquare. + * @member {number} targetSquare + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.targetSquare = 0; + + /** + * SaveScratchSheetRequest userId. + * @member {number} userId + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.userId = 0; + + /** + * Creates a new SaveScratchSheetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.ISaveScratchSheetRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest instance + */ + SaveScratchSheetRequest.create = function create(properties) { + return new SaveScratchSheetRequest(properties); + }; + + /** + * Encodes the specified SaveScratchSheetRequest message. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.ISaveScratchSheetRequest} message SaveScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.targetSheet); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetSquare); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.userId); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified SaveScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.ISaveScratchSheetRequest} message SaveScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScratchSheetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + message.timestamp = reader.uint32(); + break; + } + case 1: { + message.targetSheet = reader.uint32(); + break; + } + case 2: { + message.targetSquare = reader.uint32(); + break; + } + case 3: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + if (!message.hasOwnProperty("targetSheet")) + throw $util.ProtocolError("missing required 'targetSheet'", { instance: message }); + if (!message.hasOwnProperty("targetSquare")) + throw $util.ProtocolError("missing required 'targetSquare'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScratchSheetRequest message. + * @function verify + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScratchSheetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (!$util.isInteger(message.targetSheet)) + return "targetSheet: integer expected"; + if (!$util.isInteger(message.targetSquare)) + return "targetSquare: integer expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a SaveScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest + */ + SaveScratchSheetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScratchSheetRequest) + return object; + let message = new $root.wm.protobuf.SaveScratchSheetRequest(); + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.targetSheet != null) + message.targetSheet = object.targetSheet >>> 0; + if (object.targetSquare != null) + message.targetSquare = object.targetSquare >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a SaveScratchSheetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.SaveScratchSheetRequest} message SaveScratchSheetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScratchSheetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.targetSheet = 0; + object.targetSquare = 0; + object.userId = 0; + object.timestamp = 0; + } + if (message.targetSheet != null && message.hasOwnProperty("targetSheet")) + object.targetSheet = message.targetSheet; + if (message.targetSquare != null && message.hasOwnProperty("targetSquare")) + object.targetSquare = message.targetSquare; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this SaveScratchSheetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + * @returns {Object.} JSON object + */ + SaveScratchSheetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScratchSheetRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScratchSheetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScratchSheetRequest"; + }; + + return SaveScratchSheetRequest; + })(); + + protobuf.SaveScratchSheetResponse = (function() { + + /** + * Properties of a SaveScratchSheetResponse. + * @memberof wm.protobuf + * @interface ISaveScratchSheetResponse + * @property {wm.protobuf.ErrorCode} error SaveScratchSheetResponse error + * @property {Array.|null} [scratchSheets] SaveScratchSheetResponse scratchSheets + * @property {number} currentSheet SaveScratchSheetResponse currentSheet + * @property {number} numOfScratched SaveScratchSheetResponse numOfScratched + * @property {wm.protobuf.IUserItem|null} [earnedItem] SaveScratchSheetResponse earnedItem + */ + + /** + * Constructs a new SaveScratchSheetResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveScratchSheetResponse. + * @implements ISaveScratchSheetResponse + * @constructor + * @param {wm.protobuf.ISaveScratchSheetResponse=} [properties] Properties to set + */ + function SaveScratchSheetResponse(properties) { + this.scratchSheets = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScratchSheetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.error = 0; + + /** + * SaveScratchSheetResponse scratchSheets. + * @member {Array.} scratchSheets + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.scratchSheets = $util.emptyArray; + + /** + * SaveScratchSheetResponse currentSheet. + * @member {number} currentSheet + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.currentSheet = 0; + + /** + * SaveScratchSheetResponse numOfScratched. + * @member {number} numOfScratched + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.numOfScratched = 0; + + /** + * SaveScratchSheetResponse earnedItem. + * @member {wm.protobuf.IUserItem|null|undefined} earnedItem + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.earnedItem = null; + + /** + * Creates a new SaveScratchSheetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.ISaveScratchSheetResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse instance + */ + SaveScratchSheetResponse.create = function create(properties) { + return new SaveScratchSheetResponse(properties); + }; + + /** + * Encodes the specified SaveScratchSheetResponse message. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.ISaveScratchSheetResponse} message SaveScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.scratchSheets != null && message.scratchSheets.length) + for (let i = 0; i < message.scratchSheets.length; ++i) + $root.wm.protobuf.ScratchSheet.encode(message.scratchSheets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.currentSheet); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.numOfScratched); + if (message.earnedItem != null && Object.hasOwnProperty.call(message, "earnedItem")) + $root.wm.protobuf.UserItem.encode(message.earnedItem, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.ISaveScratchSheetResponse} message SaveScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScratchSheetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.scratchSheets && message.scratchSheets.length)) + message.scratchSheets = []; + message.scratchSheets.push($root.wm.protobuf.ScratchSheet.decode(reader, reader.uint32())); + break; + } + case 3: { + message.currentSheet = reader.uint32(); + break; + } + case 4: { + message.numOfScratched = reader.uint32(); + break; + } + case 5: { + message.earnedItem = $root.wm.protobuf.UserItem.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("currentSheet")) + throw $util.ProtocolError("missing required 'currentSheet'", { instance: message }); + if (!message.hasOwnProperty("numOfScratched")) + throw $util.ProtocolError("missing required 'numOfScratched'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScratchSheetResponse message. + * @function verify + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScratchSheetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.scratchSheets != null && message.hasOwnProperty("scratchSheets")) { + if (!Array.isArray(message.scratchSheets)) + return "scratchSheets: array expected"; + for (let i = 0; i < message.scratchSheets.length; ++i) { + let error = $root.wm.protobuf.ScratchSheet.verify(message.scratchSheets[i]); + if (error) + return "scratchSheets." + error; + } + } + if (!$util.isInteger(message.currentSheet)) + return "currentSheet: integer expected"; + if (!$util.isInteger(message.numOfScratched)) + return "numOfScratched: integer expected"; + if (message.earnedItem != null && message.hasOwnProperty("earnedItem")) { + let error = $root.wm.protobuf.UserItem.verify(message.earnedItem); + if (error) + return "earnedItem." + error; + } + return null; + }; + + /** + * Creates a SaveScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse + */ + SaveScratchSheetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScratchSheetResponse) + return object; + let message = new $root.wm.protobuf.SaveScratchSheetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.scratchSheets) { + if (!Array.isArray(object.scratchSheets)) + throw TypeError(".wm.protobuf.SaveScratchSheetResponse.scratchSheets: array expected"); + message.scratchSheets = []; + for (let i = 0; i < object.scratchSheets.length; ++i) { + if (typeof object.scratchSheets[i] !== "object") + throw TypeError(".wm.protobuf.SaveScratchSheetResponse.scratchSheets: object expected"); + message.scratchSheets[i] = $root.wm.protobuf.ScratchSheet.fromObject(object.scratchSheets[i]); + } + } + if (object.currentSheet != null) + message.currentSheet = object.currentSheet >>> 0; + if (object.numOfScratched != null) + message.numOfScratched = object.numOfScratched >>> 0; + if (object.earnedItem != null) { + if (typeof object.earnedItem !== "object") + throw TypeError(".wm.protobuf.SaveScratchSheetResponse.earnedItem: object expected"); + message.earnedItem = $root.wm.protobuf.UserItem.fromObject(object.earnedItem); + } + return message; + }; + + /** + * Creates a plain object from a SaveScratchSheetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.SaveScratchSheetResponse} message SaveScratchSheetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScratchSheetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.scratchSheets = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.currentSheet = 0; + object.numOfScratched = 0; + object.earnedItem = null; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.scratchSheets && message.scratchSheets.length) { + object.scratchSheets = []; + for (let j = 0; j < message.scratchSheets.length; ++j) + object.scratchSheets[j] = $root.wm.protobuf.ScratchSheet.toObject(message.scratchSheets[j], options); + } + if (message.currentSheet != null && message.hasOwnProperty("currentSheet")) + object.currentSheet = message.currentSheet; + if (message.numOfScratched != null && message.hasOwnProperty("numOfScratched")) + object.numOfScratched = message.numOfScratched; + if (message.earnedItem != null && message.hasOwnProperty("earnedItem")) + object.earnedItem = $root.wm.protobuf.UserItem.toObject(message.earnedItem, options); + return object; + }; + + /** + * Converts this SaveScratchSheetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + * @returns {Object.} JSON object + */ + SaveScratchSheetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScratchSheetResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScratchSheetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScratchSheetResponse"; + }; + + return SaveScratchSheetResponse; + })(); + + protobuf.TurnScratchSheetRequest = (function() { + + /** + * Properties of a TurnScratchSheetRequest. + * @memberof wm.protobuf + * @interface ITurnScratchSheetRequest + * @property {number} userId TurnScratchSheetRequest userId + * @property {number} targetSheet TurnScratchSheetRequest targetSheet + */ + + /** + * Constructs a new TurnScratchSheetRequest. + * @memberof wm.protobuf + * @classdesc Represents a TurnScratchSheetRequest. + * @implements ITurnScratchSheetRequest + * @constructor + * @param {wm.protobuf.ITurnScratchSheetRequest=} [properties] Properties to set + */ + function TurnScratchSheetRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TurnScratchSheetRequest userId. + * @member {number} userId + * @memberof wm.protobuf.TurnScratchSheetRequest + * @instance + */ + TurnScratchSheetRequest.prototype.userId = 0; + + /** + * TurnScratchSheetRequest targetSheet. + * @member {number} targetSheet + * @memberof wm.protobuf.TurnScratchSheetRequest + * @instance + */ + TurnScratchSheetRequest.prototype.targetSheet = 0; + + /** + * Creates a new TurnScratchSheetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.ITurnScratchSheetRequest=} [properties] Properties to set + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest instance + */ + TurnScratchSheetRequest.create = function create(properties) { + return new TurnScratchSheetRequest(properties); + }; + + /** + * Encodes the specified TurnScratchSheetRequest message. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.ITurnScratchSheetRequest} message TurnScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetSheet); + return writer; + }; + + /** + * Encodes the specified TurnScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.ITurnScratchSheetRequest} message TurnScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TurnScratchSheetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.targetSheet = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("targetSheet")) + throw $util.ProtocolError("missing required 'targetSheet'", { instance: message }); + return message; + }; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TurnScratchSheetRequest message. + * @function verify + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TurnScratchSheetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.targetSheet)) + return "targetSheet: integer expected"; + return null; + }; + + /** + * Creates a TurnScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest + */ + TurnScratchSheetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TurnScratchSheetRequest) + return object; + let message = new $root.wm.protobuf.TurnScratchSheetRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.targetSheet != null) + message.targetSheet = object.targetSheet >>> 0; + return message; + }; + + /** + * Creates a plain object from a TurnScratchSheetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.TurnScratchSheetRequest} message TurnScratchSheetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TurnScratchSheetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.targetSheet = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.targetSheet != null && message.hasOwnProperty("targetSheet")) + object.targetSheet = message.targetSheet; + return object; + }; + + /** + * Converts this TurnScratchSheetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.TurnScratchSheetRequest + * @instance + * @returns {Object.} JSON object + */ + TurnScratchSheetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TurnScratchSheetRequest + * @function getTypeUrl + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TurnScratchSheetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TurnScratchSheetRequest"; + }; + + return TurnScratchSheetRequest; + })(); + + protobuf.TurnScratchSheetResponse = (function() { + + /** + * Properties of a TurnScratchSheetResponse. + * @memberof wm.protobuf + * @interface ITurnScratchSheetResponse + * @property {wm.protobuf.ErrorCode} error TurnScratchSheetResponse error + */ + + /** + * Constructs a new TurnScratchSheetResponse. + * @memberof wm.protobuf + * @classdesc Represents a TurnScratchSheetResponse. + * @implements ITurnScratchSheetResponse + * @constructor + * @param {wm.protobuf.ITurnScratchSheetResponse=} [properties] Properties to set + */ + function TurnScratchSheetResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TurnScratchSheetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.TurnScratchSheetResponse + * @instance + */ + TurnScratchSheetResponse.prototype.error = 0; + + /** + * Creates a new TurnScratchSheetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.ITurnScratchSheetResponse=} [properties] Properties to set + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse instance + */ + TurnScratchSheetResponse.create = function create(properties) { + return new TurnScratchSheetResponse(properties); + }; + + /** + * Encodes the specified TurnScratchSheetResponse message. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.ITurnScratchSheetResponse} message TurnScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified TurnScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.ITurnScratchSheetResponse} message TurnScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TurnScratchSheetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TurnScratchSheetResponse message. + * @function verify + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TurnScratchSheetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a TurnScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse + */ + TurnScratchSheetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TurnScratchSheetResponse) + return object; + let message = new $root.wm.protobuf.TurnScratchSheetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a TurnScratchSheetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.TurnScratchSheetResponse} message TurnScratchSheetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TurnScratchSheetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this TurnScratchSheetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.TurnScratchSheetResponse + * @instance + * @returns {Object.} JSON object + */ + TurnScratchSheetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TurnScratchSheetResponse + * @function getTypeUrl + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TurnScratchSheetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TurnScratchSheetResponse"; + }; + + return TurnScratchSheetResponse; + })(); + + protobuf.CheckItemReceivableCarsRequest = (function() { + + /** + * Properties of a CheckItemReceivableCarsRequest. + * @memberof wm.protobuf + * @interface ICheckItemReceivableCarsRequest + * @property {number} userId CheckItemReceivableCarsRequest userId + * @property {Array.|null} [itemsToBeEarned] CheckItemReceivableCarsRequest itemsToBeEarned + */ + + /** + * Constructs a new CheckItemReceivableCarsRequest. + * @memberof wm.protobuf + * @classdesc Represents a CheckItemReceivableCarsRequest. + * @implements ICheckItemReceivableCarsRequest + * @constructor + * @param {wm.protobuf.ICheckItemReceivableCarsRequest=} [properties] Properties to set + */ + function CheckItemReceivableCarsRequest(properties) { + this.itemsToBeEarned = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckItemReceivableCarsRequest userId. + * @member {number} userId + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @instance + */ + CheckItemReceivableCarsRequest.prototype.userId = 0; + + /** + * CheckItemReceivableCarsRequest itemsToBeEarned. + * @member {Array.} itemsToBeEarned + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @instance + */ + CheckItemReceivableCarsRequest.prototype.itemsToBeEarned = $util.emptyArray; + + /** + * Creates a new CheckItemReceivableCarsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsRequest=} [properties] Properties to set + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest instance + */ + CheckItemReceivableCarsRequest.create = function create(properties) { + return new CheckItemReceivableCarsRequest(properties); + }; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsRequest} message CheckItemReceivableCarsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.itemsToBeEarned != null && message.itemsToBeEarned.length) + for (let i = 0; i < message.itemsToBeEarned.length; ++i) + $root.wm.protobuf.UserItem.encode(message.itemsToBeEarned[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsRequest} message CheckItemReceivableCarsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CheckItemReceivableCarsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + if (!(message.itemsToBeEarned && message.itemsToBeEarned.length)) + message.itemsToBeEarned = []; + message.itemsToBeEarned.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckItemReceivableCarsRequest message. + * @function verify + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckItemReceivableCarsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.itemsToBeEarned != null && message.hasOwnProperty("itemsToBeEarned")) { + if (!Array.isArray(message.itemsToBeEarned)) + return "itemsToBeEarned: array expected"; + for (let i = 0; i < message.itemsToBeEarned.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.itemsToBeEarned[i]); + if (error) + return "itemsToBeEarned." + error; + } + } + return null; + }; + + /** + * Creates a CheckItemReceivableCarsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest + */ + CheckItemReceivableCarsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CheckItemReceivableCarsRequest) + return object; + let message = new $root.wm.protobuf.CheckItemReceivableCarsRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.itemsToBeEarned) { + if (!Array.isArray(object.itemsToBeEarned)) + throw TypeError(".wm.protobuf.CheckItemReceivableCarsRequest.itemsToBeEarned: array expected"); + message.itemsToBeEarned = []; + for (let i = 0; i < object.itemsToBeEarned.length; ++i) { + if (typeof object.itemsToBeEarned[i] !== "object") + throw TypeError(".wm.protobuf.CheckItemReceivableCarsRequest.itemsToBeEarned: object expected"); + message.itemsToBeEarned[i] = $root.wm.protobuf.UserItem.fromObject(object.itemsToBeEarned[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CheckItemReceivableCarsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.CheckItemReceivableCarsRequest} message CheckItemReceivableCarsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckItemReceivableCarsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.itemsToBeEarned = []; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.itemsToBeEarned && message.itemsToBeEarned.length) { + object.itemsToBeEarned = []; + for (let j = 0; j < message.itemsToBeEarned.length; ++j) + object.itemsToBeEarned[j] = $root.wm.protobuf.UserItem.toObject(message.itemsToBeEarned[j], options); + } + return object; + }; + + /** + * Converts this CheckItemReceivableCarsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @instance + * @returns {Object.} JSON object + */ + CheckItemReceivableCarsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckItemReceivableCarsRequest + * @function getTypeUrl + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckItemReceivableCarsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CheckItemReceivableCarsRequest"; + }; + + return CheckItemReceivableCarsRequest; + })(); + + protobuf.CheckItemReceivableCarsResponse = (function() { + + /** + * Properties of a CheckItemReceivableCarsResponse. + * @memberof wm.protobuf + * @interface ICheckItemReceivableCarsResponse + * @property {wm.protobuf.ErrorCode} error CheckItemReceivableCarsResponse error + * @property {Array.|null} [carIds] CheckItemReceivableCarsResponse carIds + */ + + /** + * Constructs a new CheckItemReceivableCarsResponse. + * @memberof wm.protobuf + * @classdesc Represents a CheckItemReceivableCarsResponse. + * @implements ICheckItemReceivableCarsResponse + * @constructor + * @param {wm.protobuf.ICheckItemReceivableCarsResponse=} [properties] Properties to set + */ + function CheckItemReceivableCarsResponse(properties) { + this.carIds = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckItemReceivableCarsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @instance + */ + CheckItemReceivableCarsResponse.prototype.error = 0; + + /** + * CheckItemReceivableCarsResponse carIds. + * @member {Array.} carIds + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @instance + */ + CheckItemReceivableCarsResponse.prototype.carIds = $util.emptyArray; + + /** + * Creates a new CheckItemReceivableCarsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsResponse=} [properties] Properties to set + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse instance + */ + CheckItemReceivableCarsResponse.create = function create(properties) { + return new CheckItemReceivableCarsResponse(properties); + }; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsResponse} message CheckItemReceivableCarsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.carIds != null && message.carIds.length) + for (let i = 0; i < message.carIds.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.carIds[i]); + return writer; + }; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsResponse} message CheckItemReceivableCarsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CheckItemReceivableCarsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.carIds && message.carIds.length)) + message.carIds = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.carIds.push(reader.uint32()); + } else + message.carIds.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckItemReceivableCarsResponse message. + * @function verify + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckItemReceivableCarsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.carIds != null && message.hasOwnProperty("carIds")) { + if (!Array.isArray(message.carIds)) + return "carIds: array expected"; + for (let i = 0; i < message.carIds.length; ++i) + if (!$util.isInteger(message.carIds[i])) + return "carIds: integer[] expected"; + } + return null; + }; + + /** + * Creates a CheckItemReceivableCarsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse + */ + CheckItemReceivableCarsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CheckItemReceivableCarsResponse) + return object; + let message = new $root.wm.protobuf.CheckItemReceivableCarsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.carIds) { + if (!Array.isArray(object.carIds)) + throw TypeError(".wm.protobuf.CheckItemReceivableCarsResponse.carIds: array expected"); + message.carIds = []; + for (let i = 0; i < object.carIds.length; ++i) + message.carIds[i] = object.carIds[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a CheckItemReceivableCarsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.CheckItemReceivableCarsResponse} message CheckItemReceivableCarsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckItemReceivableCarsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.carIds = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.carIds && message.carIds.length) { + object.carIds = []; + for (let j = 0; j < message.carIds.length; ++j) + object.carIds[j] = message.carIds[j]; + } + return object; + }; + + /** + * Converts this CheckItemReceivableCarsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @instance + * @returns {Object.} JSON object + */ + CheckItemReceivableCarsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckItemReceivableCarsResponse + * @function getTypeUrl + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckItemReceivableCarsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CheckItemReceivableCarsResponse"; + }; + + return CheckItemReceivableCarsResponse; + })(); + + protobuf.ReceiveUserItemsRequest = (function() { + + /** + * Properties of a ReceiveUserItemsRequest. + * @memberof wm.protobuf + * @interface IReceiveUserItemsRequest + * @property {number} carId ReceiveUserItemsRequest carId + * @property {Array.|null} [targetItemIds] ReceiveUserItemsRequest targetItemIds + */ + + /** + * Constructs a new ReceiveUserItemsRequest. + * @memberof wm.protobuf + * @classdesc Represents a ReceiveUserItemsRequest. + * @implements IReceiveUserItemsRequest + * @constructor + * @param {wm.protobuf.IReceiveUserItemsRequest=} [properties] Properties to set + */ + function ReceiveUserItemsRequest(properties) { + this.targetItemIds = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReceiveUserItemsRequest carId. + * @member {number} carId + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @instance + */ + ReceiveUserItemsRequest.prototype.carId = 0; + + /** + * ReceiveUserItemsRequest targetItemIds. + * @member {Array.} targetItemIds + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @instance + */ + ReceiveUserItemsRequest.prototype.targetItemIds = $util.emptyArray; + + /** + * Creates a new ReceiveUserItemsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.IReceiveUserItemsRequest=} [properties] Properties to set + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest instance + */ + ReceiveUserItemsRequest.create = function create(properties) { + return new ReceiveUserItemsRequest(properties); + }; + + /** + * Encodes the specified ReceiveUserItemsRequest message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.IReceiveUserItemsRequest} message ReceiveUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.targetItemIds != null && message.targetItemIds.length) + for (let i = 0; i < message.targetItemIds.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetItemIds[i]); + return writer; + }; + + /** + * Encodes the specified ReceiveUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.IReceiveUserItemsRequest} message ReceiveUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ReceiveUserItemsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + if (!(message.targetItemIds && message.targetItemIds.length)) + message.targetItemIds = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targetItemIds.push(reader.uint32()); + } else + message.targetItemIds.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReceiveUserItemsRequest message. + * @function verify + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReceiveUserItemsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.targetItemIds != null && message.hasOwnProperty("targetItemIds")) { + if (!Array.isArray(message.targetItemIds)) + return "targetItemIds: array expected"; + for (let i = 0; i < message.targetItemIds.length; ++i) + if (!$util.isInteger(message.targetItemIds[i])) + return "targetItemIds: integer[] expected"; + } + return null; + }; + + /** + * Creates a ReceiveUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest + */ + ReceiveUserItemsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ReceiveUserItemsRequest) + return object; + let message = new $root.wm.protobuf.ReceiveUserItemsRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.targetItemIds) { + if (!Array.isArray(object.targetItemIds)) + throw TypeError(".wm.protobuf.ReceiveUserItemsRequest.targetItemIds: array expected"); + message.targetItemIds = []; + for (let i = 0; i < object.targetItemIds.length; ++i) + message.targetItemIds[i] = object.targetItemIds[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a ReceiveUserItemsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.ReceiveUserItemsRequest} message ReceiveUserItemsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReceiveUserItemsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.targetItemIds = []; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.targetItemIds && message.targetItemIds.length) { + object.targetItemIds = []; + for (let j = 0; j < message.targetItemIds.length; ++j) + object.targetItemIds[j] = message.targetItemIds[j]; + } + return object; + }; + + /** + * Converts this ReceiveUserItemsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @instance + * @returns {Object.} JSON object + */ + ReceiveUserItemsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReceiveUserItemsRequest + * @function getTypeUrl + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReceiveUserItemsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ReceiveUserItemsRequest"; + }; + + return ReceiveUserItemsRequest; + })(); + + protobuf.ReceiveUserItemsResponse = (function() { + + /** + * Properties of a ReceiveUserItemsResponse. + * @memberof wm.protobuf + * @interface IReceiveUserItemsResponse + * @property {wm.protobuf.ErrorCode} error ReceiveUserItemsResponse error + */ + + /** + * Constructs a new ReceiveUserItemsResponse. + * @memberof wm.protobuf + * @classdesc Represents a ReceiveUserItemsResponse. + * @implements IReceiveUserItemsResponse + * @constructor + * @param {wm.protobuf.IReceiveUserItemsResponse=} [properties] Properties to set + */ + function ReceiveUserItemsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReceiveUserItemsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @instance + */ + ReceiveUserItemsResponse.prototype.error = 0; + + /** + * Creates a new ReceiveUserItemsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.IReceiveUserItemsResponse=} [properties] Properties to set + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse instance + */ + ReceiveUserItemsResponse.create = function create(properties) { + return new ReceiveUserItemsResponse(properties); + }; + + /** + * Encodes the specified ReceiveUserItemsResponse message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.IReceiveUserItemsResponse} message ReceiveUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified ReceiveUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.IReceiveUserItemsResponse} message ReceiveUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ReceiveUserItemsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReceiveUserItemsResponse message. + * @function verify + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReceiveUserItemsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a ReceiveUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse + */ + ReceiveUserItemsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ReceiveUserItemsResponse) + return object; + let message = new $root.wm.protobuf.ReceiveUserItemsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a ReceiveUserItemsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.ReceiveUserItemsResponse} message ReceiveUserItemsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReceiveUserItemsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this ReceiveUserItemsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @instance + * @returns {Object.} JSON object + */ + ReceiveUserItemsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReceiveUserItemsResponse + * @function getTypeUrl + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReceiveUserItemsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ReceiveUserItemsResponse"; + }; + + return ReceiveUserItemsResponse; + })(); + + protobuf.UpdateEventModeSerialRequest = (function() { + + /** + * Properties of an UpdateEventModeSerialRequest. + * @memberof wm.protobuf + * @interface IUpdateEventModeSerialRequest + * @property {string|null} [eventModeSerial] UpdateEventModeSerialRequest eventModeSerial + */ + + /** + * Constructs a new UpdateEventModeSerialRequest. + * @memberof wm.protobuf + * @classdesc Represents an UpdateEventModeSerialRequest. + * @implements IUpdateEventModeSerialRequest + * @constructor + * @param {wm.protobuf.IUpdateEventModeSerialRequest=} [properties] Properties to set + */ + function UpdateEventModeSerialRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEventModeSerialRequest eventModeSerial. + * @member {string} eventModeSerial + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @instance + */ + UpdateEventModeSerialRequest.prototype.eventModeSerial = ""; + + /** + * Creates a new UpdateEventModeSerialRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.IUpdateEventModeSerialRequest=} [properties] Properties to set + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest instance + */ + UpdateEventModeSerialRequest.create = function create(properties) { + return new UpdateEventModeSerialRequest(properties); + }; + + /** + * Encodes the specified UpdateEventModeSerialRequest message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.IUpdateEventModeSerialRequest} message UpdateEventModeSerialRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventModeSerial != null && Object.hasOwnProperty.call(message, "eventModeSerial")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventModeSerial); + return writer; + }; + + /** + * Encodes the specified UpdateEventModeSerialRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.IUpdateEventModeSerialRequest} message UpdateEventModeSerialRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateEventModeSerialRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.eventModeSerial = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEventModeSerialRequest message. + * @function verify + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEventModeSerialRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + if (!$util.isString(message.eventModeSerial)) + return "eventModeSerial: string expected"; + return null; + }; + + /** + * Creates an UpdateEventModeSerialRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest + */ + UpdateEventModeSerialRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateEventModeSerialRequest) + return object; + let message = new $root.wm.protobuf.UpdateEventModeSerialRequest(); + if (object.eventModeSerial != null) + message.eventModeSerial = String(object.eventModeSerial); + return message; + }; + + /** + * Creates a plain object from an UpdateEventModeSerialRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.UpdateEventModeSerialRequest} message UpdateEventModeSerialRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEventModeSerialRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.eventModeSerial = ""; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + object.eventModeSerial = message.eventModeSerial; + return object; + }; + + /** + * Converts this UpdateEventModeSerialRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEventModeSerialRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEventModeSerialRequest + * @function getTypeUrl + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEventModeSerialRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateEventModeSerialRequest"; + }; + + return UpdateEventModeSerialRequest; + })(); + + protobuf.UpdateEventModeSerialResponse = (function() { + + /** + * Properties of an UpdateEventModeSerialResponse. + * @memberof wm.protobuf + * @interface IUpdateEventModeSerialResponse + * @property {wm.protobuf.ErrorCode} error UpdateEventModeSerialResponse error + * @property {wm.protobuf.EventModeSerialErrorCode} serialError UpdateEventModeSerialResponse serialError + * @property {string|null} [eventModeSerial] UpdateEventModeSerialResponse eventModeSerial + * @property {number|null} [startAt] UpdateEventModeSerialResponse startAt + * @property {number|null} [endAt] UpdateEventModeSerialResponse endAt + */ + + /** + * Constructs a new UpdateEventModeSerialResponse. + * @memberof wm.protobuf + * @classdesc Represents an UpdateEventModeSerialResponse. + * @implements IUpdateEventModeSerialResponse + * @constructor + * @param {wm.protobuf.IUpdateEventModeSerialResponse=} [properties] Properties to set + */ + function UpdateEventModeSerialResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEventModeSerialResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.error = 0; + + /** + * UpdateEventModeSerialResponse serialError. + * @member {wm.protobuf.EventModeSerialErrorCode} serialError + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.serialError = 0; + + /** + * UpdateEventModeSerialResponse eventModeSerial. + * @member {string} eventModeSerial + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.eventModeSerial = ""; + + /** + * UpdateEventModeSerialResponse startAt. + * @member {number} startAt + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.startAt = 0; + + /** + * UpdateEventModeSerialResponse endAt. + * @member {number} endAt + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.endAt = 0; + + /** + * Creates a new UpdateEventModeSerialResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.IUpdateEventModeSerialResponse=} [properties] Properties to set + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse instance + */ + UpdateEventModeSerialResponse.create = function create(properties) { + return new UpdateEventModeSerialResponse(properties); + }; + + /** + * Encodes the specified UpdateEventModeSerialResponse message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.IUpdateEventModeSerialResponse} message UpdateEventModeSerialResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.eventModeSerial != null && Object.hasOwnProperty.call(message, "eventModeSerial")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.eventModeSerial); + if (message.endAt != null && Object.hasOwnProperty.call(message, "endAt")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.endAt); + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.serialError); + if (message.startAt != null && Object.hasOwnProperty.call(message, "startAt")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.startAt); + return writer; + }; + + /** + * Encodes the specified UpdateEventModeSerialResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.IUpdateEventModeSerialResponse} message UpdateEventModeSerialResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateEventModeSerialResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 4: { + message.serialError = reader.int32(); + break; + } + case 2: { + message.eventModeSerial = reader.string(); + break; + } + case 5: { + message.startAt = reader.uint32(); + break; + } + case 3: { + message.endAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("serialError")) + throw $util.ProtocolError("missing required 'serialError'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEventModeSerialResponse message. + * @function verify + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEventModeSerialResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + switch (message.serialError) { + default: + return "serialError: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + if (!$util.isString(message.eventModeSerial)) + return "eventModeSerial: string expected"; + if (message.startAt != null && message.hasOwnProperty("startAt")) + if (!$util.isInteger(message.startAt)) + return "startAt: integer expected"; + if (message.endAt != null && message.hasOwnProperty("endAt")) + if (!$util.isInteger(message.endAt)) + return "endAt: integer expected"; + return null; + }; + + /** + * Creates an UpdateEventModeSerialResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse + */ + UpdateEventModeSerialResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateEventModeSerialResponse) + return object; + let message = new $root.wm.protobuf.UpdateEventModeSerialResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + switch (object.serialError) { + case "SERIAL_SUCCESS": + case 0: + message.serialError = 0; + break; + case "SERIAL_ATTEMPT_TO_CHANGE": + case 1: + message.serialError = 1; + break; + case "SERIAL_NO_INPUT": + case 2: + message.serialError = 2; + break; + case "SERIAL_INVALID": + case 3: + message.serialError = 3; + break; + case "SERIAL_EXPIRED": + case 4: + message.serialError = 4; + break; + case "SERIAL_OTHER_PLACE": + case 5: + message.serialError = 5; + break; + } + if (object.eventModeSerial != null) + message.eventModeSerial = String(object.eventModeSerial); + if (object.startAt != null) + message.startAt = object.startAt >>> 0; + if (object.endAt != null) + message.endAt = object.endAt >>> 0; + return message; + }; + + /** + * Creates a plain object from an UpdateEventModeSerialResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.UpdateEventModeSerialResponse} message UpdateEventModeSerialResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEventModeSerialResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.eventModeSerial = ""; + object.endAt = 0; + object.serialError = options.enums === String ? "SERIAL_SUCCESS" : 0; + object.startAt = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + object.eventModeSerial = message.eventModeSerial; + if (message.endAt != null && message.hasOwnProperty("endAt")) + object.endAt = message.endAt; + if (message.serialError != null && message.hasOwnProperty("serialError")) + object.serialError = options.enums === String ? $root.wm.protobuf.EventModeSerialErrorCode[message.serialError] : message.serialError; + if (message.startAt != null && message.hasOwnProperty("startAt")) + object.startAt = message.startAt; + return object; + }; + + /** + * Converts this UpdateEventModeSerialResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + * @returns {Object.} JSON object + */ + UpdateEventModeSerialResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEventModeSerialResponse + * @function getTypeUrl + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEventModeSerialResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateEventModeSerialResponse"; + }; + + return UpdateEventModeSerialResponse; + })(); + + protobuf.ParticipateInInviteFriendCampaignRequest = (function() { + + /** + * Properties of a ParticipateInInviteFriendCampaignRequest. + * @memberof wm.protobuf + * @interface IParticipateInInviteFriendCampaignRequest + * @property {number} invitingUserId ParticipateInInviteFriendCampaignRequest invitingUserId + * @property {number} invitedUserId ParticipateInInviteFriendCampaignRequest invitedUserId + * @property {number} sourceCarId ParticipateInInviteFriendCampaignRequest sourceCarId + * @property {boolean} transmission ParticipateInInviteFriendCampaignRequest transmission + */ + + /** + * Constructs a new ParticipateInInviteFriendCampaignRequest. + * @memberof wm.protobuf + * @classdesc Represents a ParticipateInInviteFriendCampaignRequest. + * @implements IParticipateInInviteFriendCampaignRequest + * @constructor + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest=} [properties] Properties to set + */ + function ParticipateInInviteFriendCampaignRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParticipateInInviteFriendCampaignRequest invitingUserId. + * @member {number} invitingUserId + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.invitingUserId = 0; + + /** + * ParticipateInInviteFriendCampaignRequest invitedUserId. + * @member {number} invitedUserId + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.invitedUserId = 0; + + /** + * ParticipateInInviteFriendCampaignRequest sourceCarId. + * @member {number} sourceCarId + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.sourceCarId = 0; + + /** + * ParticipateInInviteFriendCampaignRequest transmission. + * @member {boolean} transmission + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.transmission = false; + + /** + * Creates a new ParticipateInInviteFriendCampaignRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest=} [properties] Properties to set + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest instance + */ + ParticipateInInviteFriendCampaignRequest.create = function create(properties) { + return new ParticipateInInviteFriendCampaignRequest(properties); + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest} message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.invitingUserId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.invitedUserId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.sourceCarId); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.transmission); + return writer; + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest} message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.invitingUserId = reader.uint32(); + break; + } + case 2: { + message.invitedUserId = reader.uint32(); + break; + } + case 3: { + message.sourceCarId = reader.uint32(); + break; + } + case 4: { + message.transmission = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("invitingUserId")) + throw $util.ProtocolError("missing required 'invitingUserId'", { instance: message }); + if (!message.hasOwnProperty("invitedUserId")) + throw $util.ProtocolError("missing required 'invitedUserId'", { instance: message }); + if (!message.hasOwnProperty("sourceCarId")) + throw $util.ProtocolError("missing required 'sourceCarId'", { instance: message }); + if (!message.hasOwnProperty("transmission")) + throw $util.ProtocolError("missing required 'transmission'", { instance: message }); + return message; + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParticipateInInviteFriendCampaignRequest message. + * @function verify + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParticipateInInviteFriendCampaignRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.invitingUserId)) + return "invitingUserId: integer expected"; + if (!$util.isInteger(message.invitedUserId)) + return "invitedUserId: integer expected"; + if (!$util.isInteger(message.sourceCarId)) + return "sourceCarId: integer expected"; + if (typeof message.transmission !== "boolean") + return "transmission: boolean expected"; + return null; + }; + + /** + * Creates a ParticipateInInviteFriendCampaignRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest + */ + ParticipateInInviteFriendCampaignRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ParticipateInInviteFriendCampaignRequest) + return object; + let message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignRequest(); + if (object.invitingUserId != null) + message.invitingUserId = object.invitingUserId >>> 0; + if (object.invitedUserId != null) + message.invitedUserId = object.invitedUserId >>> 0; + if (object.sourceCarId != null) + message.sourceCarId = object.sourceCarId >>> 0; + if (object.transmission != null) + message.transmission = Boolean(object.transmission); + return message; + }; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.ParticipateInInviteFriendCampaignRequest} message ParticipateInInviteFriendCampaignRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParticipateInInviteFriendCampaignRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.invitingUserId = 0; + object.invitedUserId = 0; + object.sourceCarId = 0; + object.transmission = false; + } + if (message.invitingUserId != null && message.hasOwnProperty("invitingUserId")) + object.invitingUserId = message.invitingUserId; + if (message.invitedUserId != null && message.hasOwnProperty("invitedUserId")) + object.invitedUserId = message.invitedUserId; + if (message.sourceCarId != null && message.hasOwnProperty("sourceCarId")) + object.sourceCarId = message.sourceCarId; + if (message.transmission != null && message.hasOwnProperty("transmission")) + object.transmission = message.transmission; + return object; + }; + + /** + * Converts this ParticipateInInviteFriendCampaignRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + * @returns {Object.} JSON object + */ + ParticipateInInviteFriendCampaignRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignRequest + * @function getTypeUrl + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParticipateInInviteFriendCampaignRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ParticipateInInviteFriendCampaignRequest"; + }; + + return ParticipateInInviteFriendCampaignRequest; + })(); + + protobuf.ParticipateInInviteFriendCampaignResponse = (function() { + + /** + * Properties of a ParticipateInInviteFriendCampaignResponse. + * @memberof wm.protobuf + * @interface IParticipateInInviteFriendCampaignResponse + * @property {wm.protobuf.ErrorCode} error ParticipateInInviteFriendCampaignResponse error + */ + + /** + * Constructs a new ParticipateInInviteFriendCampaignResponse. + * @memberof wm.protobuf + * @classdesc Represents a ParticipateInInviteFriendCampaignResponse. + * @implements IParticipateInInviteFriendCampaignResponse + * @constructor + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse=} [properties] Properties to set + */ + function ParticipateInInviteFriendCampaignResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParticipateInInviteFriendCampaignResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @instance + */ + ParticipateInInviteFriendCampaignResponse.prototype.error = 0; + + /** + * Creates a new ParticipateInInviteFriendCampaignResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse=} [properties] Properties to set + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse instance + */ + ParticipateInInviteFriendCampaignResponse.create = function create(properties) { + return new ParticipateInInviteFriendCampaignResponse(properties); + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse} message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse} message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParticipateInInviteFriendCampaignResponse message. + * @function verify + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParticipateInInviteFriendCampaignResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a ParticipateInInviteFriendCampaignResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse + */ + ParticipateInInviteFriendCampaignResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ParticipateInInviteFriendCampaignResponse) + return object; + let message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.ParticipateInInviteFriendCampaignResponse} message ParticipateInInviteFriendCampaignResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParticipateInInviteFriendCampaignResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this ParticipateInInviteFriendCampaignResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @instance + * @returns {Object.} JSON object + */ + ParticipateInInviteFriendCampaignResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignResponse + * @function getTypeUrl + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParticipateInInviteFriendCampaignResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ParticipateInInviteFriendCampaignResponse"; + }; + + return ParticipateInInviteFriendCampaignResponse; + })(); + + protobuf.ConsumeUserItemRequest = (function() { + + /** + * Properties of a ConsumeUserItemRequest. + * @memberof wm.protobuf + * @interface IConsumeUserItemRequest + * @property {number} userId ConsumeUserItemRequest userId + * @property {number} carId ConsumeUserItemRequest carId + * @property {number} userItemId ConsumeUserItemRequest userItemId + */ + + /** + * Constructs a new ConsumeUserItemRequest. + * @memberof wm.protobuf + * @classdesc Represents a ConsumeUserItemRequest. + * @implements IConsumeUserItemRequest + * @constructor + * @param {wm.protobuf.IConsumeUserItemRequest=} [properties] Properties to set + */ + function ConsumeUserItemRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsumeUserItemRequest userId. + * @member {number} userId + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + */ + ConsumeUserItemRequest.prototype.userId = 0; + + /** + * ConsumeUserItemRequest carId. + * @member {number} carId + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + */ + ConsumeUserItemRequest.prototype.carId = 0; + + /** + * ConsumeUserItemRequest userItemId. + * @member {number} userItemId + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + */ + ConsumeUserItemRequest.prototype.userItemId = 0; + + /** + * Creates a new ConsumeUserItemRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.IConsumeUserItemRequest=} [properties] Properties to set + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest instance + */ + ConsumeUserItemRequest.create = function create(properties) { + return new ConsumeUserItemRequest(properties); + }; + + /** + * Encodes the specified ConsumeUserItemRequest message. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.IConsumeUserItemRequest} message ConsumeUserItemRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.carId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.userItemId); + return writer; + }; + + /** + * Encodes the specified ConsumeUserItemRequest message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.IConsumeUserItemRequest} message ConsumeUserItemRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ConsumeUserItemRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.carId = reader.uint32(); + break; + } + case 3: { + message.userItemId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("userItemId")) + throw $util.ProtocolError("missing required 'userItemId'", { instance: message }); + return message; + }; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsumeUserItemRequest message. + * @function verify + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsumeUserItemRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.userItemId)) + return "userItemId: integer expected"; + return null; + }; + + /** + * Creates a ConsumeUserItemRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest + */ + ConsumeUserItemRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ConsumeUserItemRequest) + return object; + let message = new $root.wm.protobuf.ConsumeUserItemRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.userItemId != null) + message.userItemId = object.userItemId >>> 0; + return message; + }; + + /** + * Creates a plain object from a ConsumeUserItemRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.ConsumeUserItemRequest} message ConsumeUserItemRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsumeUserItemRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.carId = 0; + object.userItemId = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + object.userItemId = message.userItemId; + return object; + }; + + /** + * Converts this ConsumeUserItemRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + * @returns {Object.} JSON object + */ + ConsumeUserItemRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConsumeUserItemRequest + * @function getTypeUrl + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConsumeUserItemRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ConsumeUserItemRequest"; + }; + + return ConsumeUserItemRequest; + })(); + + protobuf.ConsumeUserItemResponse = (function() { + + /** + * Properties of a ConsumeUserItemResponse. + * @memberof wm.protobuf + * @interface IConsumeUserItemResponse + * @property {wm.protobuf.ErrorCode} error ConsumeUserItemResponse error + */ + + /** + * Constructs a new ConsumeUserItemResponse. + * @memberof wm.protobuf + * @classdesc Represents a ConsumeUserItemResponse. + * @implements IConsumeUserItemResponse + * @constructor + * @param {wm.protobuf.IConsumeUserItemResponse=} [properties] Properties to set + */ + function ConsumeUserItemResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsumeUserItemResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.ConsumeUserItemResponse + * @instance + */ + ConsumeUserItemResponse.prototype.error = 0; + + /** + * Creates a new ConsumeUserItemResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.IConsumeUserItemResponse=} [properties] Properties to set + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse instance + */ + ConsumeUserItemResponse.create = function create(properties) { + return new ConsumeUserItemResponse(properties); + }; + + /** + * Encodes the specified ConsumeUserItemResponse message. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.IConsumeUserItemResponse} message ConsumeUserItemResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified ConsumeUserItemResponse message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.IConsumeUserItemResponse} message ConsumeUserItemResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ConsumeUserItemResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsumeUserItemResponse message. + * @function verify + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsumeUserItemResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a ConsumeUserItemResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse + */ + ConsumeUserItemResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ConsumeUserItemResponse) + return object; + let message = new $root.wm.protobuf.ConsumeUserItemResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a ConsumeUserItemResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.ConsumeUserItemResponse} message ConsumeUserItemResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsumeUserItemResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this ConsumeUserItemResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.ConsumeUserItemResponse + * @instance + * @returns {Object.} JSON object + */ + ConsumeUserItemResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConsumeUserItemResponse + * @function getTypeUrl + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConsumeUserItemResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ConsumeUserItemResponse"; + }; + + return ConsumeUserItemResponse; + })(); + + protobuf.SearchCarsByLevelRequest = (function() { + + /** + * Properties of a SearchCarsByLevelRequest. + * @memberof wm.protobuf + * @interface ISearchCarsByLevelRequest + * @property {number} carId SearchCarsByLevelRequest carId + * @property {number} ghostLevel SearchCarsByLevelRequest ghostLevel + * @property {number} area SearchCarsByLevelRequest area + * @property {number|null} [regionId] SearchCarsByLevelRequest regionId + */ + + /** + * Constructs a new SearchCarsByLevelRequest. + * @memberof wm.protobuf + * @classdesc Represents a SearchCarsByLevelRequest. + * @implements ISearchCarsByLevelRequest + * @constructor + * @param {wm.protobuf.ISearchCarsByLevelRequest=} [properties] Properties to set + */ + function SearchCarsByLevelRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchCarsByLevelRequest carId. + * @member {number} carId + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.carId = 0; + + /** + * SearchCarsByLevelRequest ghostLevel. + * @member {number} ghostLevel + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.ghostLevel = 0; + + /** + * SearchCarsByLevelRequest area. + * @member {number} area + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.area = 0; + + /** + * SearchCarsByLevelRequest regionId. + * @member {number} regionId + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.regionId = 0; + + /** + * Creates a new SearchCarsByLevelRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.ISearchCarsByLevelRequest=} [properties] Properties to set + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest instance + */ + SearchCarsByLevelRequest.create = function create(properties) { + return new SearchCarsByLevelRequest(properties); + }; + + /** + * Encodes the specified SearchCarsByLevelRequest message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.ISearchCarsByLevelRequest} message SearchCarsByLevelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ghostLevel); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + if (message.regionId != null && Object.hasOwnProperty.call(message, "regionId")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.regionId); + return writer; + }; + + /** + * Encodes the specified SearchCarsByLevelRequest message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.ISearchCarsByLevelRequest} message SearchCarsByLevelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SearchCarsByLevelRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.ghostLevel = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + case 4: { + message.regionId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("ghostLevel")) + throw $util.ProtocolError("missing required 'ghostLevel'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchCarsByLevelRequest message. + * @function verify + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchCarsByLevelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.ghostLevel)) + return "ghostLevel: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (message.regionId != null && message.hasOwnProperty("regionId")) + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + return null; + }; + + /** + * Creates a SearchCarsByLevelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest + */ + SearchCarsByLevelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SearchCarsByLevelRequest) + return object; + let message = new $root.wm.protobuf.SearchCarsByLevelRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.ghostLevel != null) + message.ghostLevel = object.ghostLevel >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + return message; + }; + + /** + * Creates a plain object from a SearchCarsByLevelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.SearchCarsByLevelRequest} message SearchCarsByLevelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchCarsByLevelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.ghostLevel = 0; + object.area = 0; + object.regionId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.ghostLevel != null && message.hasOwnProperty("ghostLevel")) + object.ghostLevel = message.ghostLevel; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + return object; + }; + + /** + * Converts this SearchCarsByLevelRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + * @returns {Object.} JSON object + */ + SearchCarsByLevelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchCarsByLevelRequest + * @function getTypeUrl + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchCarsByLevelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SearchCarsByLevelRequest"; + }; + + return SearchCarsByLevelRequest; + })(); + + protobuf.SearchCarsByLevelResponse = (function() { + + /** + * Properties of a SearchCarsByLevelResponse. + * @memberof wm.protobuf + * @interface ISearchCarsByLevelResponse + * @property {wm.protobuf.ErrorCode} error SearchCarsByLevelResponse error + * @property {number} ramp SearchCarsByLevelResponse ramp + * @property {number} path SearchCarsByLevelResponse path + * @property {Array.|null} [ghosts] SearchCarsByLevelResponse ghosts + * @property {wm.protobuf.PathSelectionMethod} selectionMethod SearchCarsByLevelResponse selectionMethod + * @property {Array.|null} [rates] SearchCarsByLevelResponse rates + */ + + /** + * Constructs a new SearchCarsByLevelResponse. + * @memberof wm.protobuf + * @classdesc Represents a SearchCarsByLevelResponse. + * @implements ISearchCarsByLevelResponse + * @constructor + * @param {wm.protobuf.ISearchCarsByLevelResponse=} [properties] Properties to set + */ + function SearchCarsByLevelResponse(properties) { + this.ghosts = []; + this.rates = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchCarsByLevelResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.error = 0; + + /** + * SearchCarsByLevelResponse ramp. + * @member {number} ramp + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.ramp = 0; + + /** + * SearchCarsByLevelResponse path. + * @member {number} path + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.path = 0; + + /** + * SearchCarsByLevelResponse ghosts. + * @member {Array.} ghosts + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.ghosts = $util.emptyArray; + + /** + * SearchCarsByLevelResponse selectionMethod. + * @member {wm.protobuf.PathSelectionMethod} selectionMethod + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.selectionMethod = 1; + + /** + * SearchCarsByLevelResponse rates. + * @member {Array.} rates + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.rates = $util.emptyArray; + + /** + * Creates a new SearchCarsByLevelResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.ISearchCarsByLevelResponse=} [properties] Properties to set + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse instance + */ + SearchCarsByLevelResponse.create = function create(properties) { + return new SearchCarsByLevelResponse(properties); + }; + + /** + * Encodes the specified SearchCarsByLevelResponse message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.ISearchCarsByLevelResponse} message SearchCarsByLevelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ramp); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.path); + if (message.ghosts != null && message.ghosts.length) + for (let i = 0; i < message.ghosts.length; ++i) + $root.wm.protobuf.GhostCar.encode(message.ghosts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.selectionMethod); + if (message.rates != null && message.rates.length) + for (let i = 0; i < message.rates.length; ++i) + $root.wm.protobuf.SearchCarsByLevelResponse.Rate.encode(message.rates[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchCarsByLevelResponse message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.ISearchCarsByLevelResponse} message SearchCarsByLevelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SearchCarsByLevelResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.ramp = reader.uint32(); + break; + } + case 3: { + message.path = reader.uint32(); + break; + } + case 4: { + if (!(message.ghosts && message.ghosts.length)) + message.ghosts = []; + message.ghosts.push($root.wm.protobuf.GhostCar.decode(reader, reader.uint32())); + break; + } + case 5: { + message.selectionMethod = reader.int32(); + break; + } + case 6: { + if (!(message.rates && message.rates.length)) + message.rates = []; + message.rates.push($root.wm.protobuf.SearchCarsByLevelResponse.Rate.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("ramp")) + throw $util.ProtocolError("missing required 'ramp'", { instance: message }); + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("selectionMethod")) + throw $util.ProtocolError("missing required 'selectionMethod'", { instance: message }); + return message; + }; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchCarsByLevelResponse message. + * @function verify + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchCarsByLevelResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.ghosts != null && message.hasOwnProperty("ghosts")) { + if (!Array.isArray(message.ghosts)) + return "ghosts: array expected"; + for (let i = 0; i < message.ghosts.length; ++i) { + let error = $root.wm.protobuf.GhostCar.verify(message.ghosts[i]); + if (error) + return "ghosts." + error; + } + } + switch (message.selectionMethod) { + default: + return "selectionMethod: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.rates != null && message.hasOwnProperty("rates")) { + if (!Array.isArray(message.rates)) + return "rates: array expected"; + for (let i = 0; i < message.rates.length; ++i) { + let error = $root.wm.protobuf.SearchCarsByLevelResponse.Rate.verify(message.rates[i]); + if (error) + return "rates." + error; + } + } + return null; + }; + + /** + * Creates a SearchCarsByLevelResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse + */ + SearchCarsByLevelResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SearchCarsByLevelResponse) + return object; + let message = new $root.wm.protobuf.SearchCarsByLevelResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.ghosts) { + if (!Array.isArray(object.ghosts)) + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.ghosts: array expected"); + message.ghosts = []; + for (let i = 0; i < object.ghosts.length; ++i) { + if (typeof object.ghosts[i] !== "object") + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.ghosts: object expected"); + message.ghosts[i] = $root.wm.protobuf.GhostCar.fromObject(object.ghosts[i]); + } + } + switch (object.selectionMethod) { + case "PATH_NEW": + case 1: + message.selectionMethod = 1; + break; + case "PATH_PLAIN": + case 2: + message.selectionMethod = 2; + break; + case "PATH_FRIEND": + case 3: + message.selectionMethod = 3; + break; + case "PATH_NORMAL": + case 4: + message.selectionMethod = 4; + break; + case "PATH_CHALLENGER": + case 5: + message.selectionMethod = 5; + break; + } + if (object.rates) { + if (!Array.isArray(object.rates)) + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.rates: array expected"); + message.rates = []; + for (let i = 0; i < object.rates.length; ++i) { + if (typeof object.rates[i] !== "object") + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.rates: object expected"); + message.rates[i] = $root.wm.protobuf.SearchCarsByLevelResponse.Rate.fromObject(object.rates[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SearchCarsByLevelResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse} message SearchCarsByLevelResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchCarsByLevelResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.ghosts = []; + object.rates = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.ramp = 0; + object.path = 0; + object.selectionMethod = options.enums === String ? "PATH_NEW" : 1; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.ghosts && message.ghosts.length) { + object.ghosts = []; + for (let j = 0; j < message.ghosts.length; ++j) + object.ghosts[j] = $root.wm.protobuf.GhostCar.toObject(message.ghosts[j], options); + } + if (message.selectionMethod != null && message.hasOwnProperty("selectionMethod")) + object.selectionMethod = options.enums === String ? $root.wm.protobuf.PathSelectionMethod[message.selectionMethod] : message.selectionMethod; + if (message.rates && message.rates.length) { + object.rates = []; + for (let j = 0; j < message.rates.length; ++j) + object.rates[j] = $root.wm.protobuf.SearchCarsByLevelResponse.Rate.toObject(message.rates[j], options); + } + return object; + }; + + /** + * Converts this SearchCarsByLevelResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + * @returns {Object.} JSON object + */ + SearchCarsByLevelResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchCarsByLevelResponse + * @function getTypeUrl + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchCarsByLevelResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SearchCarsByLevelResponse"; + }; + + SearchCarsByLevelResponse.Rate = (function() { + + /** + * Properties of a Rate. + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @interface IRate + * @property {number} carId Rate carId + * @property {wm.protobuf.GhostRateType} type Rate type + * @property {number|null} [rate] Rate rate + */ + + /** + * Constructs a new Rate. + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @classdesc Represents a Rate. + * @implements IRate + * @constructor + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate=} [properties] Properties to set + */ + function Rate(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Rate carId. + * @member {number} carId + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + */ + Rate.prototype.carId = 0; + + /** + * Rate type. + * @member {wm.protobuf.GhostRateType} type + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + */ + Rate.prototype.type = 1; + + /** + * Rate rate. + * @member {number} rate + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + */ + Rate.prototype.rate = 0; + + /** + * Creates a new Rate instance using the specified properties. + * @function create + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate=} [properties] Properties to set + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate instance + */ + Rate.create = function create(properties) { + return new Rate(properties); + }; + + /** + * Encodes the specified Rate message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate} message Rate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.rate != null && Object.hasOwnProperty.call(message, "rate")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rate); + return writer; + }; + + /** + * Encodes the specified Rate message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate} message Rate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Rate message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SearchCarsByLevelResponse.Rate(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.rate = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("type")) + throw $util.ProtocolError("missing required 'type'", { instance: message }); + return message; + }; + + /** + * Decodes a Rate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Rate message. + * @function verify + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.rate != null && message.hasOwnProperty("rate")) + if (!$util.isInteger(message.rate)) + return "rate: integer expected"; + return null; + }; + + /** + * Creates a Rate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate + */ + Rate.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SearchCarsByLevelResponse.Rate) + return object; + let message = new $root.wm.protobuf.SearchCarsByLevelResponse.Rate(); + if (object.carId != null) + message.carId = object.carId >>> 0; + switch (object.type) { + case "GHOST_RATE_UNKNOWN": + case 1: + message.type = 1; + break; + case "GHOST_RATE_INVALID": + case 2: + message.type = 2; + break; + case "GHOST_RATE_VALID": + case 3: + message.type = 3; + break; + } + if (object.rate != null) + message.rate = object.rate >>> 0; + return message; + }; + + /** + * Creates a plain object from a Rate message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.Rate} message Rate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rate.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.type = options.enums === String ? "GHOST_RATE_UNKNOWN" : 1; + object.rate = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.wm.protobuf.GhostRateType[message.type] : message.type; + if (message.rate != null && message.hasOwnProperty("rate")) + object.rate = message.rate; + return object; + }; + + /** + * Converts this Rate to JSON. + * @function toJSON + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + * @returns {Object.} JSON object + */ + Rate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Rate + * @function getTypeUrl + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Rate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SearchCarsByLevelResponse.Rate"; + }; + + return Rate; + })(); + + return SearchCarsByLevelResponse; + })(); + + protobuf.LoadPathsAndTuningsRequest = (function() { + + /** + * Properties of a LoadPathsAndTuningsRequest. + * @memberof wm.protobuf + * @interface ILoadPathsAndTuningsRequest + * @property {number} carId LoadPathsAndTuningsRequest carId + * @property {Array.|null} [selectedCars] LoadPathsAndTuningsRequest selectedCars + * @property {boolean|null} [returnImmediately] LoadPathsAndTuningsRequest returnImmediately + * @property {number|null} [stampTargetArea] LoadPathsAndTuningsRequest stampTargetArea + */ + + /** + * Constructs a new LoadPathsAndTuningsRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadPathsAndTuningsRequest. + * @implements ILoadPathsAndTuningsRequest + * @constructor + * @param {wm.protobuf.ILoadPathsAndTuningsRequest=} [properties] Properties to set + */ + function LoadPathsAndTuningsRequest(properties) { + this.selectedCars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadPathsAndTuningsRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.carId = 0; + + /** + * LoadPathsAndTuningsRequest selectedCars. + * @member {Array.} selectedCars + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.selectedCars = $util.emptyArray; + + /** + * LoadPathsAndTuningsRequest returnImmediately. + * @member {boolean} returnImmediately + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.returnImmediately = false; + + /** + * LoadPathsAndTuningsRequest stampTargetArea. + * @member {number} stampTargetArea + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.stampTargetArea = 0; + + /** + * Creates a new LoadPathsAndTuningsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest instance + */ + LoadPathsAndTuningsRequest.create = function create(properties) { + return new LoadPathsAndTuningsRequest(properties); + }; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsRequest} message LoadPathsAndTuningsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.selectedCars != null && message.selectedCars.length) + for (let i = 0; i < message.selectedCars.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.selectedCars[i]); + if (message.returnImmediately != null && Object.hasOwnProperty.call(message, "returnImmediately")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.returnImmediately); + if (message.stampTargetArea != null && Object.hasOwnProperty.call(message, "stampTargetArea")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stampTargetArea); + return writer; + }; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsRequest} message LoadPathsAndTuningsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadPathsAndTuningsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + if (!(message.selectedCars && message.selectedCars.length)) + message.selectedCars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.selectedCars.push(reader.uint32()); + } else + message.selectedCars.push(reader.uint32()); + break; + } + case 3: { + message.returnImmediately = reader.bool(); + break; + } + case 4: { + message.stampTargetArea = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadPathsAndTuningsRequest message. + * @function verify + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadPathsAndTuningsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.selectedCars != null && message.hasOwnProperty("selectedCars")) { + if (!Array.isArray(message.selectedCars)) + return "selectedCars: array expected"; + for (let i = 0; i < message.selectedCars.length; ++i) + if (!$util.isInteger(message.selectedCars[i])) + return "selectedCars: integer[] expected"; + } + if (message.returnImmediately != null && message.hasOwnProperty("returnImmediately")) + if (typeof message.returnImmediately !== "boolean") + return "returnImmediately: boolean expected"; + if (message.stampTargetArea != null && message.hasOwnProperty("stampTargetArea")) + if (!$util.isInteger(message.stampTargetArea)) + return "stampTargetArea: integer expected"; + return null; + }; + + /** + * Creates a LoadPathsAndTuningsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest + */ + LoadPathsAndTuningsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadPathsAndTuningsRequest) + return object; + let message = new $root.wm.protobuf.LoadPathsAndTuningsRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.selectedCars) { + if (!Array.isArray(object.selectedCars)) + throw TypeError(".wm.protobuf.LoadPathsAndTuningsRequest.selectedCars: array expected"); + message.selectedCars = []; + for (let i = 0; i < object.selectedCars.length; ++i) + message.selectedCars[i] = object.selectedCars[i] >>> 0; + } + if (object.returnImmediately != null) + message.returnImmediately = Boolean(object.returnImmediately); + if (object.stampTargetArea != null) + message.stampTargetArea = object.stampTargetArea >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadPathsAndTuningsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.LoadPathsAndTuningsRequest} message LoadPathsAndTuningsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadPathsAndTuningsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.selectedCars = []; + if (options.defaults) { + object.carId = 0; + object.returnImmediately = false; + object.stampTargetArea = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.selectedCars && message.selectedCars.length) { + object.selectedCars = []; + for (let j = 0; j < message.selectedCars.length; ++j) + object.selectedCars[j] = message.selectedCars[j]; + } + if (message.returnImmediately != null && message.hasOwnProperty("returnImmediately")) + object.returnImmediately = message.returnImmediately; + if (message.stampTargetArea != null && message.hasOwnProperty("stampTargetArea")) + object.stampTargetArea = message.stampTargetArea; + return object; + }; + + /** + * Converts this LoadPathsAndTuningsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + * @returns {Object.} JSON object + */ + LoadPathsAndTuningsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadPathsAndTuningsRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadPathsAndTuningsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadPathsAndTuningsRequest"; + }; + + return LoadPathsAndTuningsRequest; + })(); + + protobuf.LoadPathsAndTuningsResponse = (function() { + + /** + * Properties of a LoadPathsAndTuningsResponse. + * @memberof wm.protobuf + * @interface ILoadPathsAndTuningsResponse + * @property {wm.protobuf.ErrorCode} error LoadPathsAndTuningsResponse error + * @property {Array.|null} [data] LoadPathsAndTuningsResponse data + */ + + /** + * Constructs a new LoadPathsAndTuningsResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadPathsAndTuningsResponse. + * @implements ILoadPathsAndTuningsResponse + * @constructor + * @param {wm.protobuf.ILoadPathsAndTuningsResponse=} [properties] Properties to set + */ + function LoadPathsAndTuningsResponse(properties) { + this.data = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadPathsAndTuningsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @instance + */ + LoadPathsAndTuningsResponse.prototype.error = 0; + + /** + * LoadPathsAndTuningsResponse data. + * @member {Array.} data + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @instance + */ + LoadPathsAndTuningsResponse.prototype.data = $util.emptyArray; + + /** + * Creates a new LoadPathsAndTuningsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse instance + */ + LoadPathsAndTuningsResponse.create = function create(properties) { + return new LoadPathsAndTuningsResponse(properties); + }; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsResponse} message LoadPathsAndTuningsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.data != null && message.data.length) + for (let i = 0; i < message.data.length; ++i) + $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.encode(message.data[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsResponse} message LoadPathsAndTuningsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadPathsAndTuningsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.data && message.data.length)) + message.data = []; + message.data.push($root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadPathsAndTuningsResponse message. + * @function verify + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadPathsAndTuningsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.data != null && message.hasOwnProperty("data")) { + if (!Array.isArray(message.data)) + return "data: array expected"; + for (let i = 0; i < message.data.length; ++i) { + let error = $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify(message.data[i]); + if (error) + return "data." + error; + } + } + return null; + }; + + /** + * Creates a LoadPathsAndTuningsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse + */ + LoadPathsAndTuningsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadPathsAndTuningsResponse) + return object; + let message = new $root.wm.protobuf.LoadPathsAndTuningsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.data) { + if (!Array.isArray(object.data)) + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.data: array expected"); + message.data = []; + for (let i = 0; i < object.data.length; ++i) { + if (typeof object.data[i] !== "object") + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.data: object expected"); + message.data[i] = $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.fromObject(object.data[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadPathsAndTuningsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse} message LoadPathsAndTuningsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadPathsAndTuningsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.data = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.data && message.data.length) { + object.data = []; + for (let j = 0; j < message.data.length; ++j) + object.data[j] = $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.toObject(message.data[j], options); + } + return object; + }; + + /** + * Converts this LoadPathsAndTuningsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @instance + * @returns {Object.} JSON object + */ + LoadPathsAndTuningsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadPathsAndTuningsResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadPathsAndTuningsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadPathsAndTuningsResponse"; + }; + + LoadPathsAndTuningsResponse.CarTuningsByPath = (function() { + + /** + * Properties of a CarTuningsByPath. + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @interface ICarTuningsByPath + * @property {number} area CarTuningsByPath area + * @property {number} ramp CarTuningsByPath ramp + * @property {number} path CarTuningsByPath path + * @property {Array.|null} [carTunings] CarTuningsByPath carTunings + * @property {wm.protobuf.PathSelectionMethod} selectionMethod CarTuningsByPath selectionMethod + */ + + /** + * Constructs a new CarTuningsByPath. + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @classdesc Represents a CarTuningsByPath. + * @implements ICarTuningsByPath + * @constructor + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath=} [properties] Properties to set + */ + function CarTuningsByPath(properties) { + this.carTunings = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarTuningsByPath area. + * @member {number} area + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.area = 0; + + /** + * CarTuningsByPath ramp. + * @member {number} ramp + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.ramp = 0; + + /** + * CarTuningsByPath path. + * @member {number} path + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.path = 0; + + /** + * CarTuningsByPath carTunings. + * @member {Array.} carTunings + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.carTunings = $util.emptyArray; + + /** + * CarTuningsByPath selectionMethod. + * @member {wm.protobuf.PathSelectionMethod} selectionMethod + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.selectionMethod = 1; + + /** + * Creates a new CarTuningsByPath instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath=} [properties] Properties to set + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath instance + */ + CarTuningsByPath.create = function create(properties) { + return new CarTuningsByPath(properties); + }; + + /** + * Encodes the specified CarTuningsByPath message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath} message CarTuningsByPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuningsByPath.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.area); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ramp); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.path); + if (message.carTunings != null && message.carTunings.length) + for (let i = 0; i < message.carTunings.length; ++i) + $root.wm.protobuf.CarTuning.encode(message.carTunings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.selectionMethod); + return writer; + }; + + /** + * Encodes the specified CarTuningsByPath message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath} message CarTuningsByPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuningsByPath.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuningsByPath.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.area = reader.uint32(); + break; + } + case 2: { + message.ramp = reader.uint32(); + break; + } + case 3: { + message.path = reader.uint32(); + break; + } + case 4: { + if (!(message.carTunings && message.carTunings.length)) + message.carTunings = []; + message.carTunings.push($root.wm.protobuf.CarTuning.decode(reader, reader.uint32())); + break; + } + case 5: { + message.selectionMethod = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("ramp")) + throw $util.ProtocolError("missing required 'ramp'", { instance: message }); + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("selectionMethod")) + throw $util.ProtocolError("missing required 'selectionMethod'", { instance: message }); + return message; + }; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuningsByPath.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarTuningsByPath message. + * @function verify + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarTuningsByPath.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.carTunings != null && message.hasOwnProperty("carTunings")) { + if (!Array.isArray(message.carTunings)) + return "carTunings: array expected"; + for (let i = 0; i < message.carTunings.length; ++i) { + let error = $root.wm.protobuf.CarTuning.verify(message.carTunings[i]); + if (error) + return "carTunings." + error; + } + } + switch (message.selectionMethod) { + default: + return "selectionMethod: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a CarTuningsByPath message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath + */ + CarTuningsByPath.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath) + return object; + let message = new $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath(); + if (object.area != null) + message.area = object.area >>> 0; + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.carTunings) { + if (!Array.isArray(object.carTunings)) + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.carTunings: array expected"); + message.carTunings = []; + for (let i = 0; i < object.carTunings.length; ++i) { + if (typeof object.carTunings[i] !== "object") + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.carTunings: object expected"); + message.carTunings[i] = $root.wm.protobuf.CarTuning.fromObject(object.carTunings[i]); + } + } + switch (object.selectionMethod) { + case "PATH_NEW": + case 1: + message.selectionMethod = 1; + break; + case "PATH_PLAIN": + case 2: + message.selectionMethod = 2; + break; + case "PATH_FRIEND": + case 3: + message.selectionMethod = 3; + break; + case "PATH_NORMAL": + case 4: + message.selectionMethod = 4; + break; + case "PATH_CHALLENGER": + case 5: + message.selectionMethod = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a CarTuningsByPath message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} message CarTuningsByPath + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarTuningsByPath.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.carTunings = []; + if (options.defaults) { + object.area = 0; + object.ramp = 0; + object.path = 0; + object.selectionMethod = options.enums === String ? "PATH_NEW" : 1; + } + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.carTunings && message.carTunings.length) { + object.carTunings = []; + for (let j = 0; j < message.carTunings.length; ++j) + object.carTunings[j] = $root.wm.protobuf.CarTuning.toObject(message.carTunings[j], options); + } + if (message.selectionMethod != null && message.hasOwnProperty("selectionMethod")) + object.selectionMethod = options.enums === String ? $root.wm.protobuf.PathSelectionMethod[message.selectionMethod] : message.selectionMethod; + return object; + }; + + /** + * Converts this CarTuningsByPath to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + * @returns {Object.} JSON object + */ + CarTuningsByPath.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarTuningsByPath + * @function getTypeUrl + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarTuningsByPath.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath"; + }; + + return CarTuningsByPath; + })(); + + return LoadPathsAndTuningsResponse; + })(); + + protobuf.LoadGhostDriveDataRequest = (function() { + + /** + * Properties of a LoadGhostDriveDataRequest. + * @memberof wm.protobuf + * @interface ILoadGhostDriveDataRequest + * @property {number} path LoadGhostDriveDataRequest path + * @property {Array.|null} [carTunings] LoadGhostDriveDataRequest carTunings + */ + + /** + * Constructs a new LoadGhostDriveDataRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostDriveDataRequest. + * @implements ILoadGhostDriveDataRequest + * @constructor + * @param {wm.protobuf.ILoadGhostDriveDataRequest=} [properties] Properties to set + */ + function LoadGhostDriveDataRequest(properties) { + this.carTunings = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostDriveDataRequest path. + * @member {number} path + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @instance + */ + LoadGhostDriveDataRequest.prototype.path = 0; + + /** + * LoadGhostDriveDataRequest carTunings. + * @member {Array.} carTunings + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @instance + */ + LoadGhostDriveDataRequest.prototype.carTunings = $util.emptyArray; + + /** + * Creates a new LoadGhostDriveDataRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.ILoadGhostDriveDataRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest instance + */ + LoadGhostDriveDataRequest.create = function create(properties) { + return new LoadGhostDriveDataRequest(properties); + }; + + /** + * Encodes the specified LoadGhostDriveDataRequest message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.ILoadGhostDriveDataRequest} message LoadGhostDriveDataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.path); + if (message.carTunings != null && message.carTunings.length) + for (let i = 0; i < message.carTunings.length; ++i) + $root.wm.protobuf.CarTuning.encode(message.carTunings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostDriveDataRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.ILoadGhostDriveDataRequest} message LoadGhostDriveDataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostDriveDataRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.path = reader.uint32(); + break; + } + case 2: { + if (!(message.carTunings && message.carTunings.length)) + message.carTunings = []; + message.carTunings.push($root.wm.protobuf.CarTuning.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostDriveDataRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostDriveDataRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.carTunings != null && message.hasOwnProperty("carTunings")) { + if (!Array.isArray(message.carTunings)) + return "carTunings: array expected"; + for (let i = 0; i < message.carTunings.length; ++i) { + let error = $root.wm.protobuf.CarTuning.verify(message.carTunings[i]); + if (error) + return "carTunings." + error; + } + } + return null; + }; + + /** + * Creates a LoadGhostDriveDataRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest + */ + LoadGhostDriveDataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostDriveDataRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostDriveDataRequest(); + if (object.path != null) + message.path = object.path >>> 0; + if (object.carTunings) { + if (!Array.isArray(object.carTunings)) + throw TypeError(".wm.protobuf.LoadGhostDriveDataRequest.carTunings: array expected"); + message.carTunings = []; + for (let i = 0; i < object.carTunings.length; ++i) { + if (typeof object.carTunings[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataRequest.carTunings: object expected"); + message.carTunings[i] = $root.wm.protobuf.CarTuning.fromObject(object.carTunings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostDriveDataRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.LoadGhostDriveDataRequest} message LoadGhostDriveDataRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostDriveDataRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.carTunings = []; + if (options.defaults) + object.path = 0; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.carTunings && message.carTunings.length) { + object.carTunings = []; + for (let j = 0; j < message.carTunings.length; ++j) + object.carTunings[j] = $root.wm.protobuf.CarTuning.toObject(message.carTunings[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostDriveDataRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostDriveDataRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostDriveDataRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostDriveDataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostDriveDataRequest"; + }; + + return LoadGhostDriveDataRequest; + })(); + + protobuf.LoadGhostDriveDataResponse = (function() { + + /** + * Properties of a LoadGhostDriveDataResponse. + * @memberof wm.protobuf + * @interface ILoadGhostDriveDataResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostDriveDataResponse error + * @property {Array.|null} [data] LoadGhostDriveDataResponse data + */ + + /** + * Constructs a new LoadGhostDriveDataResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostDriveDataResponse. + * @implements ILoadGhostDriveDataResponse + * @constructor + * @param {wm.protobuf.ILoadGhostDriveDataResponse=} [properties] Properties to set + */ + function LoadGhostDriveDataResponse(properties) { + this.data = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostDriveDataResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @instance + */ + LoadGhostDriveDataResponse.prototype.error = 0; + + /** + * LoadGhostDriveDataResponse data. + * @member {Array.} data + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @instance + */ + LoadGhostDriveDataResponse.prototype.data = $util.emptyArray; + + /** + * Creates a new LoadGhostDriveDataResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.ILoadGhostDriveDataResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse instance + */ + LoadGhostDriveDataResponse.create = function create(properties) { + return new LoadGhostDriveDataResponse(properties); + }; + + /** + * Encodes the specified LoadGhostDriveDataResponse message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.ILoadGhostDriveDataResponse} message LoadGhostDriveDataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.data != null && message.data.length) + for (let i = 0; i < message.data.length; ++i) + $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.encode(message.data[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostDriveDataResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.ILoadGhostDriveDataResponse} message LoadGhostDriveDataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostDriveDataResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.data && message.data.length)) + message.data = []; + message.data.push($root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostDriveDataResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostDriveDataResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.data != null && message.hasOwnProperty("data")) { + if (!Array.isArray(message.data)) + return "data: array expected"; + for (let i = 0; i < message.data.length; ++i) { + let error = $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify(message.data[i]); + if (error) + return "data." + error; + } + } + return null; + }; + + /** + * Creates a LoadGhostDriveDataResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse + */ + LoadGhostDriveDataResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostDriveDataResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostDriveDataResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.data) { + if (!Array.isArray(object.data)) + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.data: array expected"); + message.data = []; + for (let i = 0; i < object.data.length; ++i) { + if (typeof object.data[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.data: object expected"); + message.data[i] = $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.fromObject(object.data[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostDriveDataResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse} message LoadGhostDriveDataResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostDriveDataResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.data = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.data && message.data.length) { + object.data = []; + for (let j = 0; j < message.data.length; ++j) + object.data[j] = $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.toObject(message.data[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostDriveDataResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostDriveDataResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostDriveDataResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostDriveDataResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostDriveDataResponse"; + }; + + LoadGhostDriveDataResponse.GhostDriveData = (function() { + + /** + * Properties of a GhostDriveData. + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @interface IGhostDriveData + * @property {number} carId GhostDriveData carId + * @property {wm.protobuf.GhostType} type GhostDriveData type + * @property {wm.protobuf.IBinaryData|null} [driveData] GhostDriveData driveData + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByUser] GhostDriveData trendBinaryByUser + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByCar] GhostDriveData trendBinaryByCar + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByArea] GhostDriveData trendBinaryByArea + */ + + /** + * Constructs a new GhostDriveData. + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @classdesc Represents a GhostDriveData. + * @implements IGhostDriveData + * @constructor + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData=} [properties] Properties to set + */ + function GhostDriveData(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostDriveData carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.carId = 0; + + /** + * GhostDriveData type. + * @member {wm.protobuf.GhostType} type + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.type = 1; + + /** + * GhostDriveData driveData. + * @member {wm.protobuf.IBinaryData|null|undefined} driveData + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.driveData = null; + + /** + * GhostDriveData trendBinaryByUser. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByUser + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.trendBinaryByUser = null; + + /** + * GhostDriveData trendBinaryByCar. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByCar + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.trendBinaryByCar = null; + + /** + * GhostDriveData trendBinaryByArea. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByArea + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.trendBinaryByArea = null; + + /** + * Creates a new GhostDriveData instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData instance + */ + GhostDriveData.create = function create(properties) { + return new GhostDriveData(properties); + }; + + /** + * Encodes the specified GhostDriveData message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData} message GhostDriveData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostDriveData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.driveData != null && Object.hasOwnProperty.call(message, "driveData")) + $root.wm.protobuf.BinaryData.encode(message.driveData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.trendBinaryByUser != null && Object.hasOwnProperty.call(message, "trendBinaryByUser")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByUser, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.trendBinaryByCar != null && Object.hasOwnProperty.call(message, "trendBinaryByCar")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByCar, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.trendBinaryByArea != null && Object.hasOwnProperty.call(message, "trendBinaryByArea")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByArea, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostDriveData message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData} message GhostDriveData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostDriveData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostDriveData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.driveData = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 4: { + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 5: { + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 6: { + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("type")) + throw $util.ProtocolError("missing required 'type'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostDriveData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostDriveData message. + * @function verify + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostDriveData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.driveData != null && message.hasOwnProperty("driveData")) { + let error = $root.wm.protobuf.BinaryData.verify(message.driveData); + if (error) + return "driveData." + error; + } + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByUser); + if (error) + return "trendBinaryByUser." + error; + } + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByCar); + if (error) + return "trendBinaryByCar." + error; + } + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByArea); + if (error) + return "trendBinaryByArea." + error; + } + return null; + }; + + /** + * Creates a GhostDriveData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData + */ + GhostDriveData.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData) + return object; + let message = new $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData(); + if (object.carId != null) + message.carId = object.carId >>> 0; + switch (object.type) { + case "GHOST_NORMAL": + case 1: + message.type = 1; + break; + case "GHOST_PINCH_RUNNER": + case 2: + message.type = 2; + break; + case "GHOST_DEFAULT": + case 3: + message.type = 3; + break; + } + if (object.driveData != null) { + if (typeof object.driveData !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.driveData: object expected"); + message.driveData = $root.wm.protobuf.BinaryData.fromObject(object.driveData); + } + if (object.trendBinaryByUser != null) { + if (typeof object.trendBinaryByUser !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.trendBinaryByUser: object expected"); + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByUser); + } + if (object.trendBinaryByCar != null) { + if (typeof object.trendBinaryByCar !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.trendBinaryByCar: object expected"); + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByCar); + } + if (object.trendBinaryByArea != null) { + if (typeof object.trendBinaryByArea !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.trendBinaryByArea: object expected"); + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByArea); + } + return message; + }; + + /** + * Creates a plain object from a GhostDriveData message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} message GhostDriveData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostDriveData.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.type = options.enums === String ? "GHOST_NORMAL" : 1; + object.driveData = null; + object.trendBinaryByUser = null; + object.trendBinaryByCar = null; + object.trendBinaryByArea = null; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.wm.protobuf.GhostType[message.type] : message.type; + if (message.driveData != null && message.hasOwnProperty("driveData")) + object.driveData = $root.wm.protobuf.BinaryData.toObject(message.driveData, options); + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) + object.trendBinaryByUser = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByUser, options); + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) + object.trendBinaryByCar = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByCar, options); + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) + object.trendBinaryByArea = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByArea, options); + return object; + }; + + /** + * Converts this GhostDriveData to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + * @returns {Object.} JSON object + */ + GhostDriveData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostDriveData + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostDriveData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData"; + }; + + return GhostDriveData; + })(); + + return LoadGhostDriveDataResponse; + })(); + + protobuf.Car = (function() { + + /** + * Properties of a Car. + * @memberof wm.protobuf + * @interface ICar + * @property {number|null} [carId] Car carId + * @property {number|null} [userId] Car userId + * @property {number|null} [regionId] Car regionId + * @property {string|null} [name] Car name + * @property {number|null} [manufacturer] Car manufacturer + * @property {number|null} [model] Car model + * @property {number|null} [visualModel] Car visualModel + * @property {number|null} [defaultColor] Car defaultColor + * @property {number} customColor Car customColor + * @property {number} wheel Car wheel + * @property {number} wheelColor Car wheelColor + * @property {number} aero Car aero + * @property {number} bonnet Car bonnet + * @property {number} wing Car wing + * @property {wm.protobuf.IGTWing|null} [gtWing] Car gtWing + * @property {number} mirror Car mirror + * @property {number} neon Car neon + * @property {number} trunk Car trunk + * @property {number} plate Car plate + * @property {number} plateColor Car plateColor + * @property {number} plateNumber Car plateNumber + * @property {number} tunePower Car tunePower + * @property {number} tuneHandling Car tuneHandling + * @property {string} title Car title + * @property {number} level Car level + * @property {boolean|null} [windowSticker] Car windowSticker + * @property {string|null} [windowStickerString] Car windowStickerString + * @property {number|null} [windowStickerFont] Car windowStickerFont + * @property {number|null} [windowDecoration] Car windowDecoration + * @property {number|null} [rivalMarker] Car rivalMarker + * @property {number|null} [lastPlayedAt] Car lastPlayedAt + * @property {wm.protobuf.IPlace|null} [lastPlayedPlace] Car lastPlayedPlace + * @property {number|null} [aura] Car aura + * @property {number|null} [auraMotif] Car auraMotif + * @property {number|null} [ghostLevel] Car ghostLevel + * @property {string|null} [country] Car country + * @property {string|null} [searchCode] Car searchCode + */ + + /** + * Constructs a new Car. + * @memberof wm.protobuf + * @classdesc Represents a Car. + * @implements ICar + * @constructor + * @param {wm.protobuf.ICar=} [properties] Properties to set + */ + function Car(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Car carId. + * @member {number} carId + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.carId = 0; + + /** + * Car userId. + * @member {number} userId + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.userId = 0; + + /** + * Car regionId. + * @member {number} regionId + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.regionId = 0; + + /** + * Car name. + * @member {string} name + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.name = ""; + + /** + * Car manufacturer. + * @member {number} manufacturer + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.manufacturer = 0; + + /** + * Car model. + * @member {number} model + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.model = 0; + + /** + * Car visualModel. + * @member {number} visualModel + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.visualModel = 0; + + /** + * Car defaultColor. + * @member {number} defaultColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.defaultColor = 0; + + /** + * Car customColor. + * @member {number} customColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.customColor = 0; + + /** + * Car wheel. + * @member {number} wheel + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.wheel = 0; + + /** + * Car wheelColor. + * @member {number} wheelColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.wheelColor = 0; + + /** + * Car aero. + * @member {number} aero + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.aero = 0; + + /** + * Car bonnet. + * @member {number} bonnet + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.bonnet = 0; + + /** + * Car wing. + * @member {number} wing + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.wing = 0; + + /** + * Car gtWing. + * @member {wm.protobuf.IGTWing|null|undefined} gtWing + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.gtWing = null; + + /** + * Car mirror. + * @member {number} mirror + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.mirror = 0; + + /** + * Car neon. + * @member {number} neon + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.neon = 0; + + /** + * Car trunk. + * @member {number} trunk + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.trunk = 0; + + /** + * Car plate. + * @member {number} plate + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.plate = 0; + + /** + * Car plateColor. + * @member {number} plateColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.plateColor = 0; + + /** + * Car plateNumber. + * @member {number} plateNumber + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.plateNumber = 0; + + /** + * Car tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.tunePower = 0; + + /** + * Car tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.tuneHandling = 0; + + /** + * Car title. + * @member {string} title + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.title = ""; + + /** + * Car level. + * @member {number} level + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.level = 0; + + /** + * Car windowSticker. + * @member {boolean} windowSticker + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowSticker = false; + + /** + * Car windowStickerString. + * @member {string} windowStickerString + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowStickerString = ""; + + /** + * Car windowStickerFont. + * @member {number} windowStickerFont + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowStickerFont = 0; + + /** + * Car windowDecoration. + * @member {number} windowDecoration + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowDecoration = 0; + + /** + * Car rivalMarker. + * @member {number} rivalMarker + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.rivalMarker = 0; + + /** + * Car lastPlayedAt. + * @member {number} lastPlayedAt + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.lastPlayedAt = 0; + + /** + * Car lastPlayedPlace. + * @member {wm.protobuf.IPlace|null|undefined} lastPlayedPlace + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.lastPlayedPlace = null; + + /** + * Car aura. + * @member {number} aura + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.aura = 0; + + /** + * Car auraMotif. + * @member {number} auraMotif + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.auraMotif = 0; + + /** + * Car ghostLevel. + * @member {number} ghostLevel + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.ghostLevel = 0; + + /** + * Car country. + * @member {string} country + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.country = ""; + + /** + * Car searchCode. + * @member {string} searchCode + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.searchCode = ""; + + /** + * Creates a new Car instance using the specified properties. + * @function create + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.ICar=} [properties] Properties to set + * @returns {wm.protobuf.Car} Car instance + */ + Car.create = function create(properties) { + return new Car(properties); + }; + + /** + * Encodes the specified Car message. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.ICar} message Car message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Car.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.userId); + if (message.regionId != null && Object.hasOwnProperty.call(message, "regionId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.regionId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + if (message.manufacturer != null && Object.hasOwnProperty.call(message, "manufacturer")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.manufacturer); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.model); + if (message.visualModel != null && Object.hasOwnProperty.call(message, "visualModel")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.visualModel); + if (message.defaultColor != null && Object.hasOwnProperty.call(message, "defaultColor")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.defaultColor); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.customColor); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.wheel); + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.wheelColor); + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.aero); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.bonnet); + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.wing); + if (message.gtWing != null && Object.hasOwnProperty.call(message, "gtWing")) + $root.wm.protobuf.GTWing.encode(message.gtWing, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.mirror); + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.neon); + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.trunk); + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.plate); + writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.plateColor); + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.plateNumber); + writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.tunePower); + writer.uint32(/* id 32, wireType 0 =*/256).uint32(message.tuneHandling); + writer.uint32(/* id 33, wireType 2 =*/266).string(message.title); + writer.uint32(/* id 34, wireType 0 =*/272).uint32(message.level); + if (message.windowSticker != null && Object.hasOwnProperty.call(message, "windowSticker")) + writer.uint32(/* id 35, wireType 0 =*/280).bool(message.windowSticker); + if (message.windowStickerString != null && Object.hasOwnProperty.call(message, "windowStickerString")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.windowStickerString); + if (message.windowStickerFont != null && Object.hasOwnProperty.call(message, "windowStickerFont")) + writer.uint32(/* id 38, wireType 0 =*/304).uint32(message.windowStickerFont); + if (message.windowDecoration != null && Object.hasOwnProperty.call(message, "windowDecoration")) + writer.uint32(/* id 39, wireType 0 =*/312).uint32(message.windowDecoration); + if (message.rivalMarker != null && Object.hasOwnProperty.call(message, "rivalMarker")) + writer.uint32(/* id 41, wireType 0 =*/328).uint32(message.rivalMarker); + if (message.lastPlayedAt != null && Object.hasOwnProperty.call(message, "lastPlayedAt")) + writer.uint32(/* id 45, wireType 0 =*/360).uint32(message.lastPlayedAt); + if (message.lastPlayedPlace != null && Object.hasOwnProperty.call(message, "lastPlayedPlace")) + $root.wm.protobuf.Place.encode(message.lastPlayedPlace, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + if (message.aura != null && Object.hasOwnProperty.call(message, "aura")) + writer.uint32(/* id 47, wireType 0 =*/376).uint32(message.aura); + if (message.auraMotif != null && Object.hasOwnProperty.call(message, "auraMotif")) + writer.uint32(/* id 48, wireType 0 =*/384).uint32(message.auraMotif); + if (message.ghostLevel != null && Object.hasOwnProperty.call(message, "ghostLevel")) + writer.uint32(/* id 49, wireType 0 =*/392).uint32(message.ghostLevel); + if (message.country != null && Object.hasOwnProperty.call(message, "country")) + writer.uint32(/* id 50, wireType 2 =*/402).string(message.country); + if (message.searchCode != null && Object.hasOwnProperty.call(message, "searchCode")) + writer.uint32(/* id 51, wireType 2 =*/410).string(message.searchCode); + return writer; + }; + + /** + * Encodes the specified Car message, length delimited. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.ICar} message Car message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Car.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Car message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Car + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Car} Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Car.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Car(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.userId = reader.uint32(); + break; + } + case 3: { + message.regionId = reader.uint32(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + case 5: { + message.manufacturer = reader.uint32(); + break; + } + case 6: { + message.model = reader.uint32(); + break; + } + case 7: { + message.visualModel = reader.uint32(); + break; + } + case 8: { + message.defaultColor = reader.uint32(); + break; + } + case 9: { + message.customColor = reader.uint32(); + break; + } + case 10: { + message.wheel = reader.uint32(); + break; + } + case 11: { + message.wheelColor = reader.uint32(); + break; + } + case 12: { + message.aero = reader.uint32(); + break; + } + case 13: { + message.bonnet = reader.uint32(); + break; + } + case 14: { + message.wing = reader.uint32(); + break; + } + case 15: { + message.gtWing = $root.wm.protobuf.GTWing.decode(reader, reader.uint32()); + break; + } + case 16: { + message.mirror = reader.uint32(); + break; + } + case 24: { + message.neon = reader.uint32(); + break; + } + case 25: { + message.trunk = reader.uint32(); + break; + } + case 26: { + message.plate = reader.uint32(); + break; + } + case 27: { + message.plateColor = reader.uint32(); + break; + } + case 28: { + message.plateNumber = reader.uint32(); + break; + } + case 31: { + message.tunePower = reader.uint32(); + break; + } + case 32: { + message.tuneHandling = reader.uint32(); + break; + } + case 33: { + message.title = reader.string(); + break; + } + case 34: { + message.level = reader.uint32(); + break; + } + case 35: { + message.windowSticker = reader.bool(); + break; + } + case 37: { + message.windowStickerString = reader.string(); + break; + } + case 38: { + message.windowStickerFont = reader.uint32(); + break; + } + case 39: { + message.windowDecoration = reader.uint32(); + break; + } + case 41: { + message.rivalMarker = reader.uint32(); + break; + } + case 45: { + message.lastPlayedAt = reader.uint32(); + break; + } + case 46: { + message.lastPlayedPlace = $root.wm.protobuf.Place.decode(reader, reader.uint32()); + break; + } + case 47: { + message.aura = reader.uint32(); + break; + } + case 48: { + message.auraMotif = reader.uint32(); + break; + } + case 49: { + message.ghostLevel = reader.uint32(); + break; + } + case 50: { + message.country = reader.string(); + break; + } + case 51: { + message.searchCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("customColor")) + throw $util.ProtocolError("missing required 'customColor'", { instance: message }); + if (!message.hasOwnProperty("wheel")) + throw $util.ProtocolError("missing required 'wheel'", { instance: message }); + if (!message.hasOwnProperty("wheelColor")) + throw $util.ProtocolError("missing required 'wheelColor'", { instance: message }); + if (!message.hasOwnProperty("aero")) + throw $util.ProtocolError("missing required 'aero'", { instance: message }); + if (!message.hasOwnProperty("bonnet")) + throw $util.ProtocolError("missing required 'bonnet'", { instance: message }); + if (!message.hasOwnProperty("wing")) + throw $util.ProtocolError("missing required 'wing'", { instance: message }); + if (!message.hasOwnProperty("mirror")) + throw $util.ProtocolError("missing required 'mirror'", { instance: message }); + if (!message.hasOwnProperty("neon")) + throw $util.ProtocolError("missing required 'neon'", { instance: message }); + if (!message.hasOwnProperty("trunk")) + throw $util.ProtocolError("missing required 'trunk'", { instance: message }); + if (!message.hasOwnProperty("plate")) + throw $util.ProtocolError("missing required 'plate'", { instance: message }); + if (!message.hasOwnProperty("plateColor")) + throw $util.ProtocolError("missing required 'plateColor'", { instance: message }); + if (!message.hasOwnProperty("plateNumber")) + throw $util.ProtocolError("missing required 'plateNumber'", { instance: message }); + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("title")) + throw $util.ProtocolError("missing required 'title'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + return message; + }; + + /** + * Decodes a Car message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Car + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Car} Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Car.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Car message. + * @function verify + * @memberof wm.protobuf.Car + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Car.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.regionId != null && message.hasOwnProperty("regionId")) + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + if (!$util.isInteger(message.manufacturer)) + return "manufacturer: integer expected"; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isInteger(message.model)) + return "model: integer expected"; + if (message.visualModel != null && message.hasOwnProperty("visualModel")) + if (!$util.isInteger(message.visualModel)) + return "visualModel: integer expected"; + if (message.defaultColor != null && message.hasOwnProperty("defaultColor")) + if (!$util.isInteger(message.defaultColor)) + return "defaultColor: integer expected"; + if (!$util.isInteger(message.customColor)) + return "customColor: integer expected"; + if (!$util.isInteger(message.wheel)) + return "wheel: integer expected"; + if (!$util.isInteger(message.wheelColor)) + return "wheelColor: integer expected"; + if (!$util.isInteger(message.aero)) + return "aero: integer expected"; + if (!$util.isInteger(message.bonnet)) + return "bonnet: integer expected"; + if (!$util.isInteger(message.wing)) + return "wing: integer expected"; + if (message.gtWing != null && message.hasOwnProperty("gtWing")) { + let error = $root.wm.protobuf.GTWing.verify(message.gtWing); + if (error) + return "gtWing." + error; + } + if (!$util.isInteger(message.mirror)) + return "mirror: integer expected"; + if (!$util.isInteger(message.neon)) + return "neon: integer expected"; + if (!$util.isInteger(message.trunk)) + return "trunk: integer expected"; + if (!$util.isInteger(message.plate)) + return "plate: integer expected"; + if (!$util.isInteger(message.plateColor)) + return "plateColor: integer expected"; + if (!$util.isInteger(message.plateNumber)) + return "plateNumber: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isString(message.title)) + return "title: string expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + if (message.windowSticker != null && message.hasOwnProperty("windowSticker")) + if (typeof message.windowSticker !== "boolean") + return "windowSticker: boolean expected"; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + if (!$util.isString(message.windowStickerString)) + return "windowStickerString: string expected"; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + if (!$util.isInteger(message.windowStickerFont)) + return "windowStickerFont: integer expected"; + if (message.windowDecoration != null && message.hasOwnProperty("windowDecoration")) + if (!$util.isInteger(message.windowDecoration)) + return "windowDecoration: integer expected"; + if (message.rivalMarker != null && message.hasOwnProperty("rivalMarker")) + if (!$util.isInteger(message.rivalMarker)) + return "rivalMarker: integer expected"; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + if (!$util.isInteger(message.lastPlayedAt)) + return "lastPlayedAt: integer expected"; + if (message.lastPlayedPlace != null && message.hasOwnProperty("lastPlayedPlace")) { + let error = $root.wm.protobuf.Place.verify(message.lastPlayedPlace); + if (error) + return "lastPlayedPlace." + error; + } + if (message.aura != null && message.hasOwnProperty("aura")) + if (!$util.isInteger(message.aura)) + return "aura: integer expected"; + if (message.auraMotif != null && message.hasOwnProperty("auraMotif")) + if (!$util.isInteger(message.auraMotif)) + return "auraMotif: integer expected"; + if (message.ghostLevel != null && message.hasOwnProperty("ghostLevel")) + if (!$util.isInteger(message.ghostLevel)) + return "ghostLevel: integer expected"; + if (message.country != null && message.hasOwnProperty("country")) + if (!$util.isString(message.country)) + return "country: string expected"; + if (message.searchCode != null && message.hasOwnProperty("searchCode")) + if (!$util.isString(message.searchCode)) + return "searchCode: string expected"; + return null; + }; + + /** + * Creates a Car message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Car + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Car} Car + */ + Car.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Car) + return object; + let message = new $root.wm.protobuf.Car(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.manufacturer != null) + message.manufacturer = object.manufacturer >>> 0; + if (object.model != null) + message.model = object.model >>> 0; + if (object.visualModel != null) + message.visualModel = object.visualModel >>> 0; + if (object.defaultColor != null) + message.defaultColor = object.defaultColor >>> 0; + if (object.customColor != null) + message.customColor = object.customColor >>> 0; + if (object.wheel != null) + message.wheel = object.wheel >>> 0; + if (object.wheelColor != null) + message.wheelColor = object.wheelColor >>> 0; + if (object.aero != null) + message.aero = object.aero >>> 0; + if (object.bonnet != null) + message.bonnet = object.bonnet >>> 0; + if (object.wing != null) + message.wing = object.wing >>> 0; + if (object.gtWing != null) { + if (typeof object.gtWing !== "object") + throw TypeError(".wm.protobuf.Car.gtWing: object expected"); + message.gtWing = $root.wm.protobuf.GTWing.fromObject(object.gtWing); + } + if (object.mirror != null) + message.mirror = object.mirror >>> 0; + if (object.neon != null) + message.neon = object.neon >>> 0; + if (object.trunk != null) + message.trunk = object.trunk >>> 0; + if (object.plate != null) + message.plate = object.plate >>> 0; + if (object.plateColor != null) + message.plateColor = object.plateColor >>> 0; + if (object.plateNumber != null) + message.plateNumber = object.plateNumber >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.title != null) + message.title = String(object.title); + if (object.level != null) + message.level = object.level >>> 0; + if (object.windowSticker != null) + message.windowSticker = Boolean(object.windowSticker); + if (object.windowStickerString != null) + message.windowStickerString = String(object.windowStickerString); + if (object.windowStickerFont != null) + message.windowStickerFont = object.windowStickerFont >>> 0; + if (object.windowDecoration != null) + message.windowDecoration = object.windowDecoration >>> 0; + if (object.rivalMarker != null) + message.rivalMarker = object.rivalMarker >>> 0; + if (object.lastPlayedAt != null) + message.lastPlayedAt = object.lastPlayedAt >>> 0; + if (object.lastPlayedPlace != null) { + if (typeof object.lastPlayedPlace !== "object") + throw TypeError(".wm.protobuf.Car.lastPlayedPlace: object expected"); + message.lastPlayedPlace = $root.wm.protobuf.Place.fromObject(object.lastPlayedPlace); + } + if (object.aura != null) + message.aura = object.aura >>> 0; + if (object.auraMotif != null) + message.auraMotif = object.auraMotif >>> 0; + if (object.ghostLevel != null) + message.ghostLevel = object.ghostLevel >>> 0; + if (object.country != null) + message.country = String(object.country); + if (object.searchCode != null) + message.searchCode = String(object.searchCode); + return message; + }; + + /** + * Creates a plain object from a Car message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.Car} message Car + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Car.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.userId = 0; + object.regionId = 0; + object.name = ""; + object.manufacturer = 0; + object.model = 0; + object.visualModel = 0; + object.defaultColor = 0; + object.customColor = 0; + object.wheel = 0; + object.wheelColor = 0; + object.aero = 0; + object.bonnet = 0; + object.wing = 0; + object.gtWing = null; + object.mirror = 0; + object.neon = 0; + object.trunk = 0; + object.plate = 0; + object.plateColor = 0; + object.plateNumber = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.title = ""; + object.level = 0; + object.windowSticker = false; + object.windowStickerString = ""; + object.windowStickerFont = 0; + object.windowDecoration = 0; + object.rivalMarker = 0; + object.lastPlayedAt = 0; + object.lastPlayedPlace = null; + object.aura = 0; + object.auraMotif = 0; + object.ghostLevel = 0; + object.country = ""; + object.searchCode = ""; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + object.manufacturer = message.manufacturer; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.visualModel != null && message.hasOwnProperty("visualModel")) + object.visualModel = message.visualModel; + if (message.defaultColor != null && message.hasOwnProperty("defaultColor")) + object.defaultColor = message.defaultColor; + if (message.customColor != null && message.hasOwnProperty("customColor")) + object.customColor = message.customColor; + if (message.wheel != null && message.hasOwnProperty("wheel")) + object.wheel = message.wheel; + if (message.wheelColor != null && message.hasOwnProperty("wheelColor")) + object.wheelColor = message.wheelColor; + if (message.aero != null && message.hasOwnProperty("aero")) + object.aero = message.aero; + if (message.bonnet != null && message.hasOwnProperty("bonnet")) + object.bonnet = message.bonnet; + if (message.wing != null && message.hasOwnProperty("wing")) + object.wing = message.wing; + if (message.gtWing != null && message.hasOwnProperty("gtWing")) + object.gtWing = $root.wm.protobuf.GTWing.toObject(message.gtWing, options); + if (message.mirror != null && message.hasOwnProperty("mirror")) + object.mirror = message.mirror; + if (message.neon != null && message.hasOwnProperty("neon")) + object.neon = message.neon; + if (message.trunk != null && message.hasOwnProperty("trunk")) + object.trunk = message.trunk; + if (message.plate != null && message.hasOwnProperty("plate")) + object.plate = message.plate; + if (message.plateColor != null && message.hasOwnProperty("plateColor")) + object.plateColor = message.plateColor; + if (message.plateNumber != null && message.hasOwnProperty("plateNumber")) + object.plateNumber = message.plateNumber; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + if (message.windowSticker != null && message.hasOwnProperty("windowSticker")) + object.windowSticker = message.windowSticker; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + object.windowStickerString = message.windowStickerString; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + object.windowStickerFont = message.windowStickerFont; + if (message.windowDecoration != null && message.hasOwnProperty("windowDecoration")) + object.windowDecoration = message.windowDecoration; + if (message.rivalMarker != null && message.hasOwnProperty("rivalMarker")) + object.rivalMarker = message.rivalMarker; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + object.lastPlayedAt = message.lastPlayedAt; + if (message.lastPlayedPlace != null && message.hasOwnProperty("lastPlayedPlace")) + object.lastPlayedPlace = $root.wm.protobuf.Place.toObject(message.lastPlayedPlace, options); + if (message.aura != null && message.hasOwnProperty("aura")) + object.aura = message.aura; + if (message.auraMotif != null && message.hasOwnProperty("auraMotif")) + object.auraMotif = message.auraMotif; + if (message.ghostLevel != null && message.hasOwnProperty("ghostLevel")) + object.ghostLevel = message.ghostLevel; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + if (message.searchCode != null && message.hasOwnProperty("searchCode")) + object.searchCode = message.searchCode; + return object; + }; + + /** + * Converts this Car to JSON. + * @function toJSON + * @memberof wm.protobuf.Car + * @instance + * @returns {Object.} JSON object + */ + Car.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Car + * @function getTypeUrl + * @memberof wm.protobuf.Car + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Car.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Car"; + }; + + return Car; + })(); + + protobuf.CarSetting = (function() { + + /** + * Properties of a CarSetting. + * @memberof wm.protobuf + * @interface ICarSetting + * @property {number|null} [carId] CarSetting carId + * @property {boolean} view CarSetting view + * @property {boolean} transmission CarSetting transmission + * @property {boolean} retire CarSetting retire + * @property {number} meter CarSetting meter + * @property {boolean} navigationMap CarSetting navigationMap + * @property {number} volume CarSetting volume + * @property {number} bgm CarSetting bgm + * @property {number} nameplate CarSetting nameplate + * @property {number} nameplateColor CarSetting nameplateColor + * @property {number} terminalBackground CarSetting terminalBackground + */ + + /** + * Constructs a new CarSetting. + * @memberof wm.protobuf + * @classdesc Represents a CarSetting. + * @implements ICarSetting + * @constructor + * @param {wm.protobuf.ICarSetting=} [properties] Properties to set + */ + function CarSetting(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarSetting carId. + * @member {number} carId + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.carId = 0; + + /** + * CarSetting view. + * @member {boolean} view + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.view = false; + + /** + * CarSetting transmission. + * @member {boolean} transmission + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.transmission = false; + + /** + * CarSetting retire. + * @member {boolean} retire + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.retire = false; + + /** + * CarSetting meter. + * @member {number} meter + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.meter = 0; + + /** + * CarSetting navigationMap. + * @member {boolean} navigationMap + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.navigationMap = false; + + /** + * CarSetting volume. + * @member {number} volume + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.volume = 0; + + /** + * CarSetting bgm. + * @member {number} bgm + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.bgm = 0; + + /** + * CarSetting nameplate. + * @member {number} nameplate + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.nameplate = 0; + + /** + * CarSetting nameplateColor. + * @member {number} nameplateColor + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.nameplateColor = 0; + + /** + * CarSetting terminalBackground. + * @member {number} terminalBackground + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.terminalBackground = 0; + + /** + * Creates a new CarSetting instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.ICarSetting=} [properties] Properties to set + * @returns {wm.protobuf.CarSetting} CarSetting instance + */ + CarSetting.create = function create(properties) { + return new CarSetting(properties); + }; + + /** + * Encodes the specified CarSetting message. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.ICarSetting} message CarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.view); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.transmission); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.retire); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.meter); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.navigationMap); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.volume); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.bgm); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.nameplate); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.nameplateColor); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.terminalBackground); + return writer; + }; + + /** + * Encodes the specified CarSetting message, length delimited. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.ICarSetting} message CarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarSetting message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarSetting} CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarSetting(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.view = reader.bool(); + break; + } + case 3: { + message.transmission = reader.bool(); + break; + } + case 4: { + message.retire = reader.bool(); + break; + } + case 5: { + message.meter = reader.uint32(); + break; + } + case 6: { + message.navigationMap = reader.bool(); + break; + } + case 7: { + message.volume = reader.uint32(); + break; + } + case 8: { + message.bgm = reader.uint32(); + break; + } + case 9: { + message.nameplate = reader.uint32(); + break; + } + case 10: { + message.nameplateColor = reader.uint32(); + break; + } + case 13: { + message.terminalBackground = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("view")) + throw $util.ProtocolError("missing required 'view'", { instance: message }); + if (!message.hasOwnProperty("transmission")) + throw $util.ProtocolError("missing required 'transmission'", { instance: message }); + if (!message.hasOwnProperty("retire")) + throw $util.ProtocolError("missing required 'retire'", { instance: message }); + if (!message.hasOwnProperty("meter")) + throw $util.ProtocolError("missing required 'meter'", { instance: message }); + if (!message.hasOwnProperty("navigationMap")) + throw $util.ProtocolError("missing required 'navigationMap'", { instance: message }); + if (!message.hasOwnProperty("volume")) + throw $util.ProtocolError("missing required 'volume'", { instance: message }); + if (!message.hasOwnProperty("bgm")) + throw $util.ProtocolError("missing required 'bgm'", { instance: message }); + if (!message.hasOwnProperty("nameplate")) + throw $util.ProtocolError("missing required 'nameplate'", { instance: message }); + if (!message.hasOwnProperty("nameplateColor")) + throw $util.ProtocolError("missing required 'nameplateColor'", { instance: message }); + if (!message.hasOwnProperty("terminalBackground")) + throw $util.ProtocolError("missing required 'terminalBackground'", { instance: message }); + return message; + }; + + /** + * Decodes a CarSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarSetting} CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarSetting message. + * @function verify + * @memberof wm.protobuf.CarSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (typeof message.view !== "boolean") + return "view: boolean expected"; + if (typeof message.transmission !== "boolean") + return "transmission: boolean expected"; + if (typeof message.retire !== "boolean") + return "retire: boolean expected"; + if (!$util.isInteger(message.meter)) + return "meter: integer expected"; + if (typeof message.navigationMap !== "boolean") + return "navigationMap: boolean expected"; + if (!$util.isInteger(message.volume)) + return "volume: integer expected"; + if (!$util.isInteger(message.bgm)) + return "bgm: integer expected"; + if (!$util.isInteger(message.nameplate)) + return "nameplate: integer expected"; + if (!$util.isInteger(message.nameplateColor)) + return "nameplateColor: integer expected"; + if (!$util.isInteger(message.terminalBackground)) + return "terminalBackground: integer expected"; + return null; + }; + + /** + * Creates a CarSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarSetting + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarSetting} CarSetting + */ + CarSetting.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarSetting) + return object; + let message = new $root.wm.protobuf.CarSetting(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.view != null) + message.view = Boolean(object.view); + if (object.transmission != null) + message.transmission = Boolean(object.transmission); + if (object.retire != null) + message.retire = Boolean(object.retire); + if (object.meter != null) + message.meter = object.meter >>> 0; + if (object.navigationMap != null) + message.navigationMap = Boolean(object.navigationMap); + if (object.volume != null) + message.volume = object.volume >>> 0; + if (object.bgm != null) + message.bgm = object.bgm >>> 0; + if (object.nameplate != null) + message.nameplate = object.nameplate >>> 0; + if (object.nameplateColor != null) + message.nameplateColor = object.nameplateColor >>> 0; + if (object.terminalBackground != null) + message.terminalBackground = object.terminalBackground >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.CarSetting} message CarSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.view = false; + object.transmission = false; + object.retire = false; + object.meter = 0; + object.navigationMap = false; + object.volume = 0; + object.bgm = 0; + object.nameplate = 0; + object.nameplateColor = 0; + object.terminalBackground = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.view != null && message.hasOwnProperty("view")) + object.view = message.view; + if (message.transmission != null && message.hasOwnProperty("transmission")) + object.transmission = message.transmission; + if (message.retire != null && message.hasOwnProperty("retire")) + object.retire = message.retire; + if (message.meter != null && message.hasOwnProperty("meter")) + object.meter = message.meter; + if (message.navigationMap != null && message.hasOwnProperty("navigationMap")) + object.navigationMap = message.navigationMap; + if (message.volume != null && message.hasOwnProperty("volume")) + object.volume = message.volume; + if (message.bgm != null && message.hasOwnProperty("bgm")) + object.bgm = message.bgm; + if (message.nameplate != null && message.hasOwnProperty("nameplate")) + object.nameplate = message.nameplate; + if (message.nameplateColor != null && message.hasOwnProperty("nameplateColor")) + object.nameplateColor = message.nameplateColor; + if (message.terminalBackground != null && message.hasOwnProperty("terminalBackground")) + object.terminalBackground = message.terminalBackground; + return object; + }; + + /** + * Converts this CarSetting to JSON. + * @function toJSON + * @memberof wm.protobuf.CarSetting + * @instance + * @returns {Object.} JSON object + */ + CarSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarSetting + * @function getTypeUrl + * @memberof wm.protobuf.CarSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarSetting"; + }; + + return CarSetting; + })(); + + protobuf.GTWing = (function() { + + /** + * Properties of a GTWing. + * @memberof wm.protobuf + * @interface IGTWing + * @property {number} pillar GTWing pillar + * @property {number} pillarMaterial GTWing pillarMaterial + * @property {number} mainWing GTWing mainWing + * @property {number} mainWingColor GTWing mainWingColor + * @property {number} wingTip GTWing wingTip + * @property {number} material GTWing material + */ + + /** + * Constructs a new GTWing. + * @memberof wm.protobuf + * @classdesc Represents a GTWing. + * @implements IGTWing + * @constructor + * @param {wm.protobuf.IGTWing=} [properties] Properties to set + */ + function GTWing(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GTWing pillar. + * @member {number} pillar + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.pillar = 0; + + /** + * GTWing pillarMaterial. + * @member {number} pillarMaterial + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.pillarMaterial = 0; + + /** + * GTWing mainWing. + * @member {number} mainWing + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.mainWing = 0; + + /** + * GTWing mainWingColor. + * @member {number} mainWingColor + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.mainWingColor = 0; + + /** + * GTWing wingTip. + * @member {number} wingTip + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.wingTip = 0; + + /** + * GTWing material. + * @member {number} material + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.material = 0; + + /** + * Creates a new GTWing instance using the specified properties. + * @function create + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.IGTWing=} [properties] Properties to set + * @returns {wm.protobuf.GTWing} GTWing instance + */ + GTWing.create = function create(properties) { + return new GTWing(properties); + }; + + /** + * Encodes the specified GTWing message. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.IGTWing} message GTWing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GTWing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.pillar); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.pillarMaterial); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.mainWing); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mainWingColor); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.wingTip); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.material); + return writer; + }; + + /** + * Encodes the specified GTWing message, length delimited. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.IGTWing} message GTWing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GTWing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GTWing message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GTWing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GTWing} GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GTWing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GTWing(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pillar = reader.uint32(); + break; + } + case 2: { + message.pillarMaterial = reader.uint32(); + break; + } + case 3: { + message.mainWing = reader.uint32(); + break; + } + case 4: { + message.mainWingColor = reader.uint32(); + break; + } + case 5: { + message.wingTip = reader.uint32(); + break; + } + case 6: { + message.material = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("pillar")) + throw $util.ProtocolError("missing required 'pillar'", { instance: message }); + if (!message.hasOwnProperty("pillarMaterial")) + throw $util.ProtocolError("missing required 'pillarMaterial'", { instance: message }); + if (!message.hasOwnProperty("mainWing")) + throw $util.ProtocolError("missing required 'mainWing'", { instance: message }); + if (!message.hasOwnProperty("mainWingColor")) + throw $util.ProtocolError("missing required 'mainWingColor'", { instance: message }); + if (!message.hasOwnProperty("wingTip")) + throw $util.ProtocolError("missing required 'wingTip'", { instance: message }); + if (!message.hasOwnProperty("material")) + throw $util.ProtocolError("missing required 'material'", { instance: message }); + return message; + }; + + /** + * Decodes a GTWing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GTWing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GTWing} GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GTWing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GTWing message. + * @function verify + * @memberof wm.protobuf.GTWing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GTWing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.pillar)) + return "pillar: integer expected"; + if (!$util.isInteger(message.pillarMaterial)) + return "pillarMaterial: integer expected"; + if (!$util.isInteger(message.mainWing)) + return "mainWing: integer expected"; + if (!$util.isInteger(message.mainWingColor)) + return "mainWingColor: integer expected"; + if (!$util.isInteger(message.wingTip)) + return "wingTip: integer expected"; + if (!$util.isInteger(message.material)) + return "material: integer expected"; + return null; + }; + + /** + * Creates a GTWing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GTWing + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GTWing} GTWing + */ + GTWing.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GTWing) + return object; + let message = new $root.wm.protobuf.GTWing(); + if (object.pillar != null) + message.pillar = object.pillar >>> 0; + if (object.pillarMaterial != null) + message.pillarMaterial = object.pillarMaterial >>> 0; + if (object.mainWing != null) + message.mainWing = object.mainWing >>> 0; + if (object.mainWingColor != null) + message.mainWingColor = object.mainWingColor >>> 0; + if (object.wingTip != null) + message.wingTip = object.wingTip >>> 0; + if (object.material != null) + message.material = object.material >>> 0; + return message; + }; + + /** + * Creates a plain object from a GTWing message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.GTWing} message GTWing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GTWing.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.pillar = 0; + object.pillarMaterial = 0; + object.mainWing = 0; + object.mainWingColor = 0; + object.wingTip = 0; + object.material = 0; + } + if (message.pillar != null && message.hasOwnProperty("pillar")) + object.pillar = message.pillar; + if (message.pillarMaterial != null && message.hasOwnProperty("pillarMaterial")) + object.pillarMaterial = message.pillarMaterial; + if (message.mainWing != null && message.hasOwnProperty("mainWing")) + object.mainWing = message.mainWing; + if (message.mainWingColor != null && message.hasOwnProperty("mainWingColor")) + object.mainWingColor = message.mainWingColor; + if (message.wingTip != null && message.hasOwnProperty("wingTip")) + object.wingTip = message.wingTip; + if (message.material != null && message.hasOwnProperty("material")) + object.material = message.material; + return object; + }; + + /** + * Converts this GTWing to JSON. + * @function toJSON + * @memberof wm.protobuf.GTWing + * @instance + * @returns {Object.} JSON object + */ + GTWing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GTWing + * @function getTypeUrl + * @memberof wm.protobuf.GTWing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GTWing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GTWing"; + }; + + return GTWing; + })(); + + protobuf.CarItem = (function() { + + /** + * Properties of a CarItem. + * @memberof wm.protobuf + * @interface ICarItem + * @property {wm.protobuf.ItemCategory} category CarItem category + * @property {number} itemId CarItem itemId + * @property {number|null} [amount] CarItem amount + */ + + /** + * Constructs a new CarItem. + * @memberof wm.protobuf + * @classdesc Represents a CarItem. + * @implements ICarItem + * @constructor + * @param {wm.protobuf.ICarItem=} [properties] Properties to set + */ + function CarItem(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarItem category. + * @member {wm.protobuf.ItemCategory} category + * @memberof wm.protobuf.CarItem + * @instance + */ + CarItem.prototype.category = 1; + + /** + * CarItem itemId. + * @member {number} itemId + * @memberof wm.protobuf.CarItem + * @instance + */ + CarItem.prototype.itemId = 0; + + /** + * CarItem amount. + * @member {number} amount + * @memberof wm.protobuf.CarItem + * @instance + */ + CarItem.prototype.amount = 0; + + /** + * Creates a new CarItem instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.ICarItem=} [properties] Properties to set + * @returns {wm.protobuf.CarItem} CarItem instance + */ + CarItem.create = function create(properties) { + return new CarItem(properties); + }; + + /** + * Encodes the specified CarItem message. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.ICarItem} message CarItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.itemId); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.amount); + return writer; + }; + + /** + * Encodes the specified CarItem message, length delimited. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.ICarItem} message CarItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarItem message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarItem} CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarItem(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.itemId = reader.uint32(); + break; + } + case 3: { + message.amount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("category")) + throw $util.ProtocolError("missing required 'category'", { instance: message }); + if (!message.hasOwnProperty("itemId")) + throw $util.ProtocolError("missing required 'itemId'", { instance: message }); + return message; + }; + + /** + * Decodes a CarItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarItem} CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarItem message. + * @function verify + * @memberof wm.protobuf.CarItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.category) { + default: + return "category: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + case 10: + case 12: + case 14: + case 15: + case 16: + case 17: + case 19: + case 22: + case 24: + case 25: + case 26: + case 27: + case 28: + case 201: + case 202: + case 203: + case 300: + case 301: + break; + } + if (!$util.isInteger(message.itemId)) + return "itemId: integer expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isInteger(message.amount)) + return "amount: integer expected"; + return null; + }; + + /** + * Creates a CarItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarItem + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarItem} CarItem + */ + CarItem.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarItem) + return object; + let message = new $root.wm.protobuf.CarItem(); + switch (object.category) { + case "CAT_CUSTOM_COLOR": + case 1: + message.category = 1; + break; + case "CAT_WHEEL": + case 2: + message.category = 2; + break; + case "CAT_AERO": + case 3: + message.category = 3; + break; + case "CAT_BONNET": + case 4: + message.category = 4; + break; + case "CAT_WING": + case 5: + message.category = 5; + break; + case "CAT_MIRROR": + case 6: + message.category = 6; + break; + case "CAT_NEON": + case 8: + message.category = 8; + break; + case "CAT_TRUNK": + case 9: + message.category = 9; + break; + case "CAT_NUMBER_PLATE": + case 10: + message.category = 10; + break; + case "CAT_GT_WING": + case 12: + message.category = 12; + break; + case "CAT_AURA_MOTIF": + case 14: + message.category = 14; + break; + case "CAT_METER": + case 15: + message.category = 15; + break; + case "CAT_BGM": + case 16: + message.category = 16; + break; + case "CAT_NAME_PLATE": + case 17: + message.category = 17; + break; + case "CAT_NUMBER": + case 19: + message.category = 19; + break; + case "CAT_BGM_TRACK": + case 22: + message.category = 22; + break; + case "CAT_WINDOW_STICKER_FONT": + case 24: + message.category = 24; + break; + case "CAT_WINDOW_DECORATION": + case 25: + message.category = 25; + break; + case "CAT_RIVAL_MARKER": + case 26: + message.category = 26; + break; + case "CAT_STAMP": + case 27: + message.category = 27; + break; + case "CAT_TERMINAL_BACKGROUND": + case 28: + message.category = 28; + break; + case "CAT_CAR_TICKET": + case 201: + message.category = 201; + break; + case "CAT_CONSUMPTION_ITEM": + case 202: + message.category = 202; + break; + case "CAT_CAR_TICKET_FREE": + case 203: + message.category = 203; + break; + case "CAT_AERO_FULLSET": + case 300: + message.category = 300; + break; + case "CAT_AERO_LIMITED": + case 301: + message.category = 301; + break; + } + if (object.itemId != null) + message.itemId = object.itemId >>> 0; + if (object.amount != null) + message.amount = object.amount >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarItem message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.CarItem} message CarItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.category = options.enums === String ? "CAT_CUSTOM_COLOR" : 1; + object.itemId = 0; + object.amount = 0; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.wm.protobuf.ItemCategory[message.category] : message.category; + if (message.itemId != null && message.hasOwnProperty("itemId")) + object.itemId = message.itemId; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this CarItem to JSON. + * @function toJSON + * @memberof wm.protobuf.CarItem + * @instance + * @returns {Object.} JSON object + */ + CarItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarItem + * @function getTypeUrl + * @memberof wm.protobuf.CarItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarItem"; + }; + + return CarItem; + })(); + + protobuf.CopiedCar = (function() { + + /** + * Properties of a CopiedCar. + * @memberof wm.protobuf + * @interface ICopiedCar + * @property {wm.protobuf.ICar} car CopiedCar car + * @property {number} remainingPlayCounts CopiedCar remainingPlayCounts + */ + + /** + * Constructs a new CopiedCar. + * @memberof wm.protobuf + * @classdesc Represents a CopiedCar. + * @implements ICopiedCar + * @constructor + * @param {wm.protobuf.ICopiedCar=} [properties] Properties to set + */ + function CopiedCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CopiedCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.CopiedCar + * @instance + */ + CopiedCar.prototype.car = null; + + /** + * CopiedCar remainingPlayCounts. + * @member {number} remainingPlayCounts + * @memberof wm.protobuf.CopiedCar + * @instance + */ + CopiedCar.prototype.remainingPlayCounts = 0; + + /** + * Creates a new CopiedCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.ICopiedCar=} [properties] Properties to set + * @returns {wm.protobuf.CopiedCar} CopiedCar instance + */ + CopiedCar.create = function create(properties) { + return new CopiedCar(properties); + }; + + /** + * Encodes the specified CopiedCar message. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.ICopiedCar} message CopiedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopiedCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.remainingPlayCounts); + return writer; + }; + + /** + * Encodes the specified CopiedCar message, length delimited. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.ICopiedCar} message CopiedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopiedCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CopiedCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CopiedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CopiedCar} CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopiedCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CopiedCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.remainingPlayCounts = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("remainingPlayCounts")) + throw $util.ProtocolError("missing required 'remainingPlayCounts'", { instance: message }); + return message; + }; + + /** + * Decodes a CopiedCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CopiedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CopiedCar} CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopiedCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CopiedCar message. + * @function verify + * @memberof wm.protobuf.CopiedCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CopiedCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.remainingPlayCounts)) + return "remainingPlayCounts: integer expected"; + return null; + }; + + /** + * Creates a CopiedCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CopiedCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CopiedCar} CopiedCar + */ + CopiedCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CopiedCar) + return object; + let message = new $root.wm.protobuf.CopiedCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.CopiedCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.remainingPlayCounts != null) + message.remainingPlayCounts = object.remainingPlayCounts >>> 0; + return message; + }; + + /** + * Creates a plain object from a CopiedCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.CopiedCar} message CopiedCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CopiedCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.remainingPlayCounts = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.remainingPlayCounts != null && message.hasOwnProperty("remainingPlayCounts")) + object.remainingPlayCounts = message.remainingPlayCounts; + return object; + }; + + /** + * Converts this CopiedCar to JSON. + * @function toJSON + * @memberof wm.protobuf.CopiedCar + * @instance + * @returns {Object.} JSON object + */ + CopiedCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CopiedCar + * @function getTypeUrl + * @memberof wm.protobuf.CopiedCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CopiedCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CopiedCar"; + }; + + return CopiedCar; + })(); + + protobuf.FriendCar = (function() { + + /** + * Properties of a FriendCar. + * @memberof wm.protobuf + * @interface IFriendCar + * @property {wm.protobuf.ICar} car FriendCar car + * @property {number|null} [friendshipLevel] FriendCar friendshipLevel + * @property {boolean} nonhuman FriendCar nonhuman + */ + + /** + * Constructs a new FriendCar. + * @memberof wm.protobuf + * @classdesc Represents a FriendCar. + * @implements IFriendCar + * @constructor + * @param {wm.protobuf.IFriendCar=} [properties] Properties to set + */ + function FriendCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FriendCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.FriendCar + * @instance + */ + FriendCar.prototype.car = null; + + /** + * FriendCar friendshipLevel. + * @member {number} friendshipLevel + * @memberof wm.protobuf.FriendCar + * @instance + */ + FriendCar.prototype.friendshipLevel = 0; + + /** + * FriendCar nonhuman. + * @member {boolean} nonhuman + * @memberof wm.protobuf.FriendCar + * @instance + */ + FriendCar.prototype.nonhuman = false; + + /** + * Creates a new FriendCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.IFriendCar=} [properties] Properties to set + * @returns {wm.protobuf.FriendCar} FriendCar instance + */ + FriendCar.create = function create(properties) { + return new FriendCar(properties); + }; + + /** + * Encodes the specified FriendCar message. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.IFriendCar} message FriendCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FriendCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.friendshipLevel != null && Object.hasOwnProperty.call(message, "friendshipLevel")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.friendshipLevel); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.nonhuman); + return writer; + }; + + /** + * Encodes the specified FriendCar message, length delimited. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.IFriendCar} message FriendCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FriendCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FriendCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.FriendCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.FriendCar} FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FriendCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.FriendCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.friendshipLevel = reader.uint32(); + break; + } + case 3: { + message.nonhuman = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("nonhuman")) + throw $util.ProtocolError("missing required 'nonhuman'", { instance: message }); + return message; + }; + + /** + * Decodes a FriendCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.FriendCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.FriendCar} FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FriendCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FriendCar message. + * @function verify + * @memberof wm.protobuf.FriendCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FriendCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.friendshipLevel != null && message.hasOwnProperty("friendshipLevel")) + if (!$util.isInteger(message.friendshipLevel)) + return "friendshipLevel: integer expected"; + if (typeof message.nonhuman !== "boolean") + return "nonhuman: boolean expected"; + return null; + }; + + /** + * Creates a FriendCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.FriendCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.FriendCar} FriendCar + */ + FriendCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.FriendCar) + return object; + let message = new $root.wm.protobuf.FriendCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.FriendCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.friendshipLevel != null) + message.friendshipLevel = object.friendshipLevel >>> 0; + if (object.nonhuman != null) + message.nonhuman = Boolean(object.nonhuman); + return message; + }; + + /** + * Creates a plain object from a FriendCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.FriendCar} message FriendCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FriendCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.friendshipLevel = 0; + object.nonhuman = false; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.friendshipLevel != null && message.hasOwnProperty("friendshipLevel")) + object.friendshipLevel = message.friendshipLevel; + if (message.nonhuman != null && message.hasOwnProperty("nonhuman")) + object.nonhuman = message.nonhuman; + return object; + }; + + /** + * Converts this FriendCar to JSON. + * @function toJSON + * @memberof wm.protobuf.FriendCar + * @instance + * @returns {Object.} JSON object + */ + FriendCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FriendCar + * @function getTypeUrl + * @memberof wm.protobuf.FriendCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FriendCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.FriendCar"; + }; + + return FriendCar; + })(); + + protobuf.ChallengerCar = (function() { + + /** + * Properties of a ChallengerCar. + * @memberof wm.protobuf + * @interface IChallengerCar + * @property {wm.protobuf.ICar} car ChallengerCar car + * @property {number} stamp ChallengerCar stamp + * @property {number} result ChallengerCar result + * @property {number} area ChallengerCar area + */ + + /** + * Constructs a new ChallengerCar. + * @memberof wm.protobuf + * @classdesc Represents a ChallengerCar. + * @implements IChallengerCar + * @constructor + * @param {wm.protobuf.IChallengerCar=} [properties] Properties to set + */ + function ChallengerCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChallengerCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.car = null; + + /** + * ChallengerCar stamp. + * @member {number} stamp + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.stamp = 0; + + /** + * ChallengerCar result. + * @member {number} result + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.result = 0; + + /** + * ChallengerCar area. + * @member {number} area + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.area = 0; + + /** + * Creates a new ChallengerCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.IChallengerCar=} [properties] Properties to set + * @returns {wm.protobuf.ChallengerCar} ChallengerCar instance + */ + ChallengerCar.create = function create(properties) { + return new ChallengerCar(properties); + }; + + /** + * Encodes the specified ChallengerCar message. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.IChallengerCar} message ChallengerCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChallengerCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stamp); + writer.uint32(/* id 4, wireType 0 =*/32).sint32(message.result); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.area); + return writer; + }; + + /** + * Encodes the specified ChallengerCar message, length delimited. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.IChallengerCar} message ChallengerCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChallengerCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ChallengerCar} ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChallengerCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ChallengerCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 3: { + message.stamp = reader.uint32(); + break; + } + case 4: { + message.result = reader.sint32(); + break; + } + case 5: { + message.area = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("stamp")) + throw $util.ProtocolError("missing required 'stamp'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ChallengerCar} ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChallengerCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChallengerCar message. + * @function verify + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChallengerCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.stamp)) + return "stamp: integer expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + return null; + }; + + /** + * Creates a ChallengerCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ChallengerCar} ChallengerCar + */ + ChallengerCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ChallengerCar) + return object; + let message = new $root.wm.protobuf.ChallengerCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.ChallengerCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.stamp != null) + message.stamp = object.stamp >>> 0; + if (object.result != null) + message.result = object.result | 0; + if (object.area != null) + message.area = object.area >>> 0; + return message; + }; + + /** + * Creates a plain object from a ChallengerCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.ChallengerCar} message ChallengerCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChallengerCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.stamp = 0; + object.result = 0; + object.area = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.stamp != null && message.hasOwnProperty("stamp")) + object.stamp = message.stamp; + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + return object; + }; + + /** + * Converts this ChallengerCar to JSON. + * @function toJSON + * @memberof wm.protobuf.ChallengerCar + * @instance + * @returns {Object.} JSON object + */ + ChallengerCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChallengerCar + * @function getTypeUrl + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChallengerCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ChallengerCar"; + }; + + return ChallengerCar; + })(); + + protobuf.StampTargetCar = (function() { + + /** + * Properties of a StampTargetCar. + * @memberof wm.protobuf + * @interface IStampTargetCar + * @property {wm.protobuf.ICar} car StampTargetCar car + * @property {number} returnCount StampTargetCar returnCount + * @property {boolean} locked StampTargetCar locked + * @property {boolean} recommended StampTargetCar recommended + */ + + /** + * Constructs a new StampTargetCar. + * @memberof wm.protobuf + * @classdesc Represents a StampTargetCar. + * @implements IStampTargetCar + * @constructor + * @param {wm.protobuf.IStampTargetCar=} [properties] Properties to set + */ + function StampTargetCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StampTargetCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.car = null; + + /** + * StampTargetCar returnCount. + * @member {number} returnCount + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.returnCount = 0; + + /** + * StampTargetCar locked. + * @member {boolean} locked + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.locked = false; + + /** + * StampTargetCar recommended. + * @member {boolean} recommended + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.recommended = false; + + /** + * Creates a new StampTargetCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.IStampTargetCar=} [properties] Properties to set + * @returns {wm.protobuf.StampTargetCar} StampTargetCar instance + */ + StampTargetCar.create = function create(properties) { + return new StampTargetCar(properties); + }; + + /** + * Encodes the specified StampTargetCar message. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.IStampTargetCar} message StampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StampTargetCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.returnCount); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.locked); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.recommended); + return writer; + }; + + /** + * Encodes the specified StampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.IStampTargetCar} message StampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StampTargetCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.StampTargetCar} StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StampTargetCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.StampTargetCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.returnCount = reader.uint32(); + break; + } + case 3: { + message.locked = reader.bool(); + break; + } + case 4: { + message.recommended = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("returnCount")) + throw $util.ProtocolError("missing required 'returnCount'", { instance: message }); + if (!message.hasOwnProperty("locked")) + throw $util.ProtocolError("missing required 'locked'", { instance: message }); + if (!message.hasOwnProperty("recommended")) + throw $util.ProtocolError("missing required 'recommended'", { instance: message }); + return message; + }; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.StampTargetCar} StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StampTargetCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StampTargetCar message. + * @function verify + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StampTargetCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.returnCount)) + return "returnCount: integer expected"; + if (typeof message.locked !== "boolean") + return "locked: boolean expected"; + if (typeof message.recommended !== "boolean") + return "recommended: boolean expected"; + return null; + }; + + /** + * Creates a StampTargetCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.StampTargetCar} StampTargetCar + */ + StampTargetCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.StampTargetCar) + return object; + let message = new $root.wm.protobuf.StampTargetCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.StampTargetCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.returnCount != null) + message.returnCount = object.returnCount >>> 0; + if (object.locked != null) + message.locked = Boolean(object.locked); + if (object.recommended != null) + message.recommended = Boolean(object.recommended); + return message; + }; + + /** + * Creates a plain object from a StampTargetCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.StampTargetCar} message StampTargetCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StampTargetCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.returnCount = 0; + object.locked = false; + object.recommended = false; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.returnCount != null && message.hasOwnProperty("returnCount")) + object.returnCount = message.returnCount; + if (message.locked != null && message.hasOwnProperty("locked")) + object.locked = message.locked; + if (message.recommended != null && message.hasOwnProperty("recommended")) + object.recommended = message.recommended; + return object; + }; + + /** + * Converts this StampTargetCar to JSON. + * @function toJSON + * @memberof wm.protobuf.StampTargetCar + * @instance + * @returns {Object.} JSON object + */ + StampTargetCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StampTargetCar + * @function getTypeUrl + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StampTargetCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.StampTargetCar"; + }; + + return StampTargetCar; + })(); + + protobuf.BookmarkedCar = (function() { + + /** + * Properties of a BookmarkedCar. + * @memberof wm.protobuf + * @interface IBookmarkedCar + * @property {wm.protobuf.ICar} car BookmarkedCar car + * @property {number} returnCount BookmarkedCar returnCount + */ + + /** + * Constructs a new BookmarkedCar. + * @memberof wm.protobuf + * @classdesc Represents a BookmarkedCar. + * @implements IBookmarkedCar + * @constructor + * @param {wm.protobuf.IBookmarkedCar=} [properties] Properties to set + */ + function BookmarkedCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BookmarkedCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.BookmarkedCar + * @instance + */ + BookmarkedCar.prototype.car = null; + + /** + * BookmarkedCar returnCount. + * @member {number} returnCount + * @memberof wm.protobuf.BookmarkedCar + * @instance + */ + BookmarkedCar.prototype.returnCount = 0; + + /** + * Creates a new BookmarkedCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.IBookmarkedCar=} [properties] Properties to set + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar instance + */ + BookmarkedCar.create = function create(properties) { + return new BookmarkedCar(properties); + }; + + /** + * Encodes the specified BookmarkedCar message. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.IBookmarkedCar} message BookmarkedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BookmarkedCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.returnCount); + return writer; + }; + + /** + * Encodes the specified BookmarkedCar message, length delimited. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.IBookmarkedCar} message BookmarkedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BookmarkedCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BookmarkedCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.BookmarkedCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.returnCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("returnCount")) + throw $util.ProtocolError("missing required 'returnCount'", { instance: message }); + return message; + }; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BookmarkedCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BookmarkedCar message. + * @function verify + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BookmarkedCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.returnCount)) + return "returnCount: integer expected"; + return null; + }; + + /** + * Creates a BookmarkedCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar + */ + BookmarkedCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.BookmarkedCar) + return object; + let message = new $root.wm.protobuf.BookmarkedCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.BookmarkedCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.returnCount != null) + message.returnCount = object.returnCount >>> 0; + return message; + }; + + /** + * Creates a plain object from a BookmarkedCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.BookmarkedCar} message BookmarkedCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BookmarkedCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.returnCount = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.returnCount != null && message.hasOwnProperty("returnCount")) + object.returnCount = message.returnCount; + return object; + }; + + /** + * Converts this BookmarkedCar to JSON. + * @function toJSON + * @memberof wm.protobuf.BookmarkedCar + * @instance + * @returns {Object.} JSON object + */ + BookmarkedCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BookmarkedCar + * @function getTypeUrl + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BookmarkedCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.BookmarkedCar"; + }; + + return BookmarkedCar; + })(); + + protobuf.PreviousVersionStampTargetCar = (function() { + + /** + * Properties of a PreviousVersionStampTargetCar. + * @memberof wm.protobuf + * @interface IPreviousVersionStampTargetCar + * @property {wm.protobuf.ICar} car PreviousVersionStampTargetCar car + * @property {number} returnCount PreviousVersionStampTargetCar returnCount + * @property {number|null} [currentCarId] PreviousVersionStampTargetCar currentCarId + */ + + /** + * Constructs a new PreviousVersionStampTargetCar. + * @memberof wm.protobuf + * @classdesc Represents a PreviousVersionStampTargetCar. + * @implements IPreviousVersionStampTargetCar + * @constructor + * @param {wm.protobuf.IPreviousVersionStampTargetCar=} [properties] Properties to set + */ + function PreviousVersionStampTargetCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PreviousVersionStampTargetCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + */ + PreviousVersionStampTargetCar.prototype.car = null; + + /** + * PreviousVersionStampTargetCar returnCount. + * @member {number} returnCount + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + */ + PreviousVersionStampTargetCar.prototype.returnCount = 0; + + /** + * PreviousVersionStampTargetCar currentCarId. + * @member {number} currentCarId + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + */ + PreviousVersionStampTargetCar.prototype.currentCarId = 0; + + /** + * Creates a new PreviousVersionStampTargetCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.IPreviousVersionStampTargetCar=} [properties] Properties to set + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar instance + */ + PreviousVersionStampTargetCar.create = function create(properties) { + return new PreviousVersionStampTargetCar(properties); + }; + + /** + * Encodes the specified PreviousVersionStampTargetCar message. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.IPreviousVersionStampTargetCar} message PreviousVersionStampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviousVersionStampTargetCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.currentCarId != null && Object.hasOwnProperty.call(message, "currentCarId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.currentCarId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.returnCount); + return writer; + }; + + /** + * Encodes the specified PreviousVersionStampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.IPreviousVersionStampTargetCar} message PreviousVersionStampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviousVersionStampTargetCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviousVersionStampTargetCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PreviousVersionStampTargetCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 3: { + message.returnCount = reader.uint32(); + break; + } + case 2: { + message.currentCarId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("returnCount")) + throw $util.ProtocolError("missing required 'returnCount'", { instance: message }); + return message; + }; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviousVersionStampTargetCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PreviousVersionStampTargetCar message. + * @function verify + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreviousVersionStampTargetCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.returnCount)) + return "returnCount: integer expected"; + if (message.currentCarId != null && message.hasOwnProperty("currentCarId")) + if (!$util.isInteger(message.currentCarId)) + return "currentCarId: integer expected"; + return null; + }; + + /** + * Creates a PreviousVersionStampTargetCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar + */ + PreviousVersionStampTargetCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PreviousVersionStampTargetCar) + return object; + let message = new $root.wm.protobuf.PreviousVersionStampTargetCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.PreviousVersionStampTargetCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.returnCount != null) + message.returnCount = object.returnCount >>> 0; + if (object.currentCarId != null) + message.currentCarId = object.currentCarId >>> 0; + return message; + }; + + /** + * Creates a plain object from a PreviousVersionStampTargetCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.PreviousVersionStampTargetCar} message PreviousVersionStampTargetCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreviousVersionStampTargetCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.currentCarId = 0; + object.returnCount = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.currentCarId != null && message.hasOwnProperty("currentCarId")) + object.currentCarId = message.currentCarId; + if (message.returnCount != null && message.hasOwnProperty("returnCount")) + object.returnCount = message.returnCount; + return object; + }; + + /** + * Converts this PreviousVersionStampTargetCar to JSON. + * @function toJSON + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + * @returns {Object.} JSON object + */ + PreviousVersionStampTargetCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PreviousVersionStampTargetCar + * @function getTypeUrl + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PreviousVersionStampTargetCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PreviousVersionStampTargetCar"; + }; + + return PreviousVersionStampTargetCar; + })(); + + protobuf.GhostCar = (function() { + + /** + * Properties of a GhostCar. + * @memberof wm.protobuf + * @interface IGhostCar + * @property {wm.protobuf.ICar} car GhostCar car + * @property {number|null} [area] GhostCar area + * @property {number|null} [ramp] GhostCar ramp + * @property {number|null} [path] GhostCar path + * @property {boolean|null} [nonhuman] GhostCar nonhuman + * @property {wm.protobuf.GhostType|null} [type] GhostCar type + * @property {number|Long|null} [trailId] GhostCar trailId + */ + + /** + * Constructs a new GhostCar. + * @memberof wm.protobuf + * @classdesc Represents a GhostCar. + * @implements IGhostCar + * @constructor + * @param {wm.protobuf.IGhostCar=} [properties] Properties to set + */ + function GhostCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.car = null; + + /** + * GhostCar area. + * @member {number} area + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.area = 0; + + /** + * GhostCar ramp. + * @member {number} ramp + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.ramp = 0; + + /** + * GhostCar path. + * @member {number} path + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.path = 0; + + /** + * GhostCar nonhuman. + * @member {boolean} nonhuman + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.nonhuman = false; + + /** + * GhostCar type. + * @member {wm.protobuf.GhostType} type + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.type = 1; + + /** + * GhostCar trailId. + * @member {number|Long} trailId + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.trailId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new GhostCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.IGhostCar=} [properties] Properties to set + * @returns {wm.protobuf.GhostCar} GhostCar instance + */ + GhostCar.create = function create(properties) { + return new GhostCar(properties); + }; + + /** + * Encodes the specified GhostCar message. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.IGhostCar} message GhostCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.area != null && Object.hasOwnProperty.call(message, "area")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.area); + if (message.ramp != null && Object.hasOwnProperty.call(message, "ramp")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.ramp); + if (message.nonhuman != null && Object.hasOwnProperty.call(message, "nonhuman")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.nonhuman); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.type); + if (message.trailId != null && Object.hasOwnProperty.call(message, "trailId")) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.trailId); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.path); + return writer; + }; + + /** + * Encodes the specified GhostCar message, length delimited. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.IGhostCar} message GhostCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCar} GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.area = reader.uint32(); + break; + } + case 3: { + message.ramp = reader.uint32(); + break; + } + case 8: { + message.path = reader.uint32(); + break; + } + case 4: { + message.nonhuman = reader.bool(); + break; + } + case 6: { + message.type = reader.int32(); + break; + } + case 7: { + message.trailId = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCar} GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCar message. + * @function verify + * @memberof wm.protobuf.GhostCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.area != null && message.hasOwnProperty("area")) + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (message.ramp != null && message.hasOwnProperty("ramp")) + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.nonhuman != null && message.hasOwnProperty("nonhuman")) + if (typeof message.nonhuman !== "boolean") + return "nonhuman: boolean expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.trailId != null && message.hasOwnProperty("trailId")) + if (!$util.isInteger(message.trailId) && !(message.trailId && $util.isInteger(message.trailId.low) && $util.isInteger(message.trailId.high))) + return "trailId: integer|Long expected"; + return null; + }; + + /** + * Creates a GhostCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCar} GhostCar + */ + GhostCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCar) + return object; + let message = new $root.wm.protobuf.GhostCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.GhostCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.area != null) + message.area = object.area >>> 0; + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.nonhuman != null) + message.nonhuman = Boolean(object.nonhuman); + switch (object.type) { + case "GHOST_NORMAL": + case 1: + message.type = 1; + break; + case "GHOST_PINCH_RUNNER": + case 2: + message.type = 2; + break; + case "GHOST_DEFAULT": + case 3: + message.type = 3; + break; + } + if (object.trailId != null) + if ($util.Long) + (message.trailId = $util.Long.fromValue(object.trailId)).unsigned = true; + else if (typeof object.trailId === "string") + message.trailId = parseInt(object.trailId, 10); + else if (typeof object.trailId === "number") + message.trailId = object.trailId; + else if (typeof object.trailId === "object") + message.trailId = new $util.LongBits(object.trailId.low >>> 0, object.trailId.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a GhostCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.GhostCar} message GhostCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.area = 0; + object.ramp = 0; + object.nonhuman = false; + object.type = options.enums === String ? "GHOST_NORMAL" : 1; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.trailId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trailId = options.longs === String ? "0" : 0; + object.path = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.nonhuman != null && message.hasOwnProperty("nonhuman")) + object.nonhuman = message.nonhuman; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.wm.protobuf.GhostType[message.type] : message.type; + if (message.trailId != null && message.hasOwnProperty("trailId")) + if (typeof message.trailId === "number") + object.trailId = options.longs === String ? String(message.trailId) : message.trailId; + else + object.trailId = options.longs === String ? $util.Long.prototype.toString.call(message.trailId) : options.longs === Number ? new $util.LongBits(message.trailId.low >>> 0, message.trailId.high >>> 0).toNumber(true) : message.trailId; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this GhostCar to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCar + * @instance + * @returns {Object.} JSON object + */ + GhostCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCar + * @function getTypeUrl + * @memberof wm.protobuf.GhostCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCar"; + }; + + return GhostCar; + })(); + + protobuf.Place = (function() { + + /** + * Properties of a Place. + * @memberof wm.protobuf + * @interface IPlace + * @property {string} placeId Place placeId + * @property {string} shopName Place shopName + * @property {number} regionId Place regionId + * @property {string} country Place country + */ + + /** + * Constructs a new Place. + * @memberof wm.protobuf + * @classdesc Represents a Place. + * @implements IPlace + * @constructor + * @param {wm.protobuf.IPlace=} [properties] Properties to set + */ + function Place(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Place placeId. + * @member {string} placeId + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.placeId = ""; + + /** + * Place shopName. + * @member {string} shopName + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.shopName = ""; + + /** + * Place regionId. + * @member {number} regionId + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.regionId = 0; + + /** + * Place country. + * @member {string} country + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.country = ""; + + /** + * Creates a new Place instance using the specified properties. + * @function create + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.IPlace=} [properties] Properties to set + * @returns {wm.protobuf.Place} Place instance + */ + Place.create = function create(properties) { + return new Place(properties); + }; + + /** + * Encodes the specified Place message. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.IPlace} message Place message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Place.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.placeId); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shopName); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.regionId); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.country); + return writer; + }; + + /** + * Encodes the specified Place message, length delimited. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.IPlace} message Place message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Place.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Place message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Place + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Place} Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Place.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Place(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.placeId = reader.string(); + break; + } + case 2: { + message.shopName = reader.string(); + break; + } + case 3: { + message.regionId = reader.uint32(); + break; + } + case 4: { + message.country = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("placeId")) + throw $util.ProtocolError("missing required 'placeId'", { instance: message }); + if (!message.hasOwnProperty("shopName")) + throw $util.ProtocolError("missing required 'shopName'", { instance: message }); + if (!message.hasOwnProperty("regionId")) + throw $util.ProtocolError("missing required 'regionId'", { instance: message }); + if (!message.hasOwnProperty("country")) + throw $util.ProtocolError("missing required 'country'", { instance: message }); + return message; + }; + + /** + * Decodes a Place message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Place + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Place} Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Place.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Place message. + * @function verify + * @memberof wm.protobuf.Place + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Place.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.placeId)) + return "placeId: string expected"; + if (!$util.isString(message.shopName)) + return "shopName: string expected"; + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (!$util.isString(message.country)) + return "country: string expected"; + return null; + }; + + /** + * Creates a Place message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Place + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Place} Place + */ + Place.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Place) + return object; + let message = new $root.wm.protobuf.Place(); + if (object.placeId != null) + message.placeId = String(object.placeId); + if (object.shopName != null) + message.shopName = String(object.shopName); + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.country != null) + message.country = String(object.country); + return message; + }; + + /** + * Creates a plain object from a Place message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.Place} message Place + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Place.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.placeId = ""; + object.shopName = ""; + object.regionId = 0; + object.country = ""; + } + if (message.placeId != null && message.hasOwnProperty("placeId")) + object.placeId = message.placeId; + if (message.shopName != null && message.hasOwnProperty("shopName")) + object.shopName = message.shopName; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + return object; + }; + + /** + * Converts this Place to JSON. + * @function toJSON + * @memberof wm.protobuf.Place + * @instance + * @returns {Object.} JSON object + */ + Place.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Place + * @function getTypeUrl + * @memberof wm.protobuf.Place + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Place.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Place"; + }; + + return Place; + })(); + + protobuf.SystemSetting = (function() { + + /** + * Properties of a SystemSetting. + * @memberof wm.protobuf + * @interface ISystemSetting + * @property {number} mCoinChute SystemSetting mCoinChute + * @property {number} mBuyCardCost SystemSetting mBuyCardCost + * @property {number} mGameCost SystemSetting mGameCost + * @property {number} mContinueCost SystemSetting mContinueCost + * @property {number} mFullCourseCost SystemSetting mFullCourseCost + * @property {boolean} mFreePlay SystemSetting mFreePlay + * @property {number|null} [mPcbId] SystemSetting mPcbId + * @property {boolean} mIcCardRw SystemSetting mIcCardRw + * @property {boolean} mIcCardVender SystemSetting mIcCardVender + * @property {boolean|null} [mMgCardRw] SystemSetting mMgCardRw + * @property {boolean|null} [mForceFeedback] SystemSetting mForceFeedback + * @property {boolean} mWinsAndRemains SystemSetting mWinsAndRemains + * @property {number} mEventMode SystemSetting mEventMode + * @property {boolean} mEventModeDist SystemSetting mEventModeDist + * @property {number} mCloseType SystemSetting mCloseType + * @property {number} mCloseSun SystemSetting mCloseSun + * @property {number} mCloseMon SystemSetting mCloseMon + * @property {number} mCloseTue SystemSetting mCloseTue + * @property {number} mCloseWed SystemSetting mCloseWed + * @property {number} mCloseThu SystemSetting mCloseThu + * @property {number} mCloseFri SystemSetting mCloseFri + * @property {number} mCloseSat SystemSetting mCloseSat + * @property {number} mCloseDay SystemSetting mCloseDay + * @property {boolean|null} [mTouchPanel] SystemSetting mTouchPanel + * @property {number} mGameVol SystemSetting mGameVol + * @property {number} mAttractVol SystemSetting mAttractVol + * @property {number|null} [mCalibHandleCenter] SystemSetting mCalibHandleCenter + * @property {number|null} [mCalibAccelCenter] SystemSetting mCalibAccelCenter + * @property {number|null} [mCalibBrakeCenter] SystemSetting mCalibBrakeCenter + * @property {number|null} [mCalibTouchLeft] SystemSetting mCalibTouchLeft + * @property {number|null} [mCalibTouchRight] SystemSetting mCalibTouchRight + * @property {number|null} [mCalibTouchTop] SystemSetting mCalibTouchTop + * @property {number|null} [mCalibTouchBottom] SystemSetting mCalibTouchBottom + */ + + /** + * Constructs a new SystemSetting. + * @memberof wm.protobuf + * @classdesc Represents a SystemSetting. + * @implements ISystemSetting + * @constructor + * @param {wm.protobuf.ISystemSetting=} [properties] Properties to set + */ + function SystemSetting(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SystemSetting mCoinChute. + * @member {number} mCoinChute + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCoinChute = 0; + + /** + * SystemSetting mBuyCardCost. + * @member {number} mBuyCardCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mBuyCardCost = 0; + + /** + * SystemSetting mGameCost. + * @member {number} mGameCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mGameCost = 0; + + /** + * SystemSetting mContinueCost. + * @member {number} mContinueCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mContinueCost = 0; + + /** + * SystemSetting mFullCourseCost. + * @member {number} mFullCourseCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mFullCourseCost = 0; + + /** + * SystemSetting mFreePlay. + * @member {boolean} mFreePlay + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mFreePlay = false; + + /** + * SystemSetting mPcbId. + * @member {number} mPcbId + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mPcbId = 0; + + /** + * SystemSetting mIcCardRw. + * @member {boolean} mIcCardRw + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mIcCardRw = false; + + /** + * SystemSetting mIcCardVender. + * @member {boolean} mIcCardVender + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mIcCardVender = false; + + /** + * SystemSetting mMgCardRw. + * @member {boolean} mMgCardRw + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mMgCardRw = false; + + /** + * SystemSetting mForceFeedback. + * @member {boolean} mForceFeedback + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mForceFeedback = false; + + /** + * SystemSetting mWinsAndRemains. + * @member {boolean} mWinsAndRemains + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mWinsAndRemains = false; + + /** + * SystemSetting mEventMode. + * @member {number} mEventMode + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mEventMode = 0; + + /** + * SystemSetting mEventModeDist. + * @member {boolean} mEventModeDist + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mEventModeDist = false; + + /** + * SystemSetting mCloseType. + * @member {number} mCloseType + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseType = 0; + + /** + * SystemSetting mCloseSun. + * @member {number} mCloseSun + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseSun = 0; + + /** + * SystemSetting mCloseMon. + * @member {number} mCloseMon + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseMon = 0; + + /** + * SystemSetting mCloseTue. + * @member {number} mCloseTue + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseTue = 0; + + /** + * SystemSetting mCloseWed. + * @member {number} mCloseWed + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseWed = 0; + + /** + * SystemSetting mCloseThu. + * @member {number} mCloseThu + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseThu = 0; + + /** + * SystemSetting mCloseFri. + * @member {number} mCloseFri + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseFri = 0; + + /** + * SystemSetting mCloseSat. + * @member {number} mCloseSat + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseSat = 0; + + /** + * SystemSetting mCloseDay. + * @member {number} mCloseDay + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseDay = 0; + + /** + * SystemSetting mTouchPanel. + * @member {boolean} mTouchPanel + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mTouchPanel = false; + + /** + * SystemSetting mGameVol. + * @member {number} mGameVol + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mGameVol = 0; + + /** + * SystemSetting mAttractVol. + * @member {number} mAttractVol + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mAttractVol = 0; + + /** + * SystemSetting mCalibHandleCenter. + * @member {number} mCalibHandleCenter + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibHandleCenter = 0; + + /** + * SystemSetting mCalibAccelCenter. + * @member {number} mCalibAccelCenter + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibAccelCenter = 0; + + /** + * SystemSetting mCalibBrakeCenter. + * @member {number} mCalibBrakeCenter + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibBrakeCenter = 0; + + /** + * SystemSetting mCalibTouchLeft. + * @member {number} mCalibTouchLeft + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchLeft = 0; + + /** + * SystemSetting mCalibTouchRight. + * @member {number} mCalibTouchRight + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchRight = 0; + + /** + * SystemSetting mCalibTouchTop. + * @member {number} mCalibTouchTop + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchTop = 0; + + /** + * SystemSetting mCalibTouchBottom. + * @member {number} mCalibTouchBottom + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchBottom = 0; + + /** + * Creates a new SystemSetting instance using the specified properties. + * @function create + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.ISystemSetting=} [properties] Properties to set + * @returns {wm.protobuf.SystemSetting} SystemSetting instance + */ + SystemSetting.create = function create(properties) { + return new SystemSetting(properties); + }; + + /** + * Encodes the specified SystemSetting message. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.ISystemSetting} message SystemSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.mCoinChute); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.mBuyCardCost); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.mGameCost); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mContinueCost); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.mFullCourseCost); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.mFreePlay); + if (message.mPcbId != null && Object.hasOwnProperty.call(message, "mPcbId")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.mPcbId); + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.mIcCardRw); + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.mIcCardVender); + if (message.mMgCardRw != null && Object.hasOwnProperty.call(message, "mMgCardRw")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.mMgCardRw); + if (message.mForceFeedback != null && Object.hasOwnProperty.call(message, "mForceFeedback")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.mForceFeedback); + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.mWinsAndRemains); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.mEventMode); + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.mEventModeDist); + writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.mCloseType); + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.mCloseSun); + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.mCloseMon); + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.mCloseTue); + writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.mCloseWed); + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.mCloseThu); + writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.mCloseFri); + writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.mCloseSat); + writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.mCloseDay); + if (message.mTouchPanel != null && Object.hasOwnProperty.call(message, "mTouchPanel")) + writer.uint32(/* id 24, wireType 0 =*/192).bool(message.mTouchPanel); + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.mGameVol); + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.mAttractVol); + if (message.mCalibHandleCenter != null && Object.hasOwnProperty.call(message, "mCalibHandleCenter")) + writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.mCalibHandleCenter); + if (message.mCalibAccelCenter != null && Object.hasOwnProperty.call(message, "mCalibAccelCenter")) + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.mCalibAccelCenter); + if (message.mCalibBrakeCenter != null && Object.hasOwnProperty.call(message, "mCalibBrakeCenter")) + writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.mCalibBrakeCenter); + if (message.mCalibTouchLeft != null && Object.hasOwnProperty.call(message, "mCalibTouchLeft")) + writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.mCalibTouchLeft); + if (message.mCalibTouchRight != null && Object.hasOwnProperty.call(message, "mCalibTouchRight")) + writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.mCalibTouchRight); + if (message.mCalibTouchTop != null && Object.hasOwnProperty.call(message, "mCalibTouchTop")) + writer.uint32(/* id 32, wireType 0 =*/256).uint32(message.mCalibTouchTop); + if (message.mCalibTouchBottom != null && Object.hasOwnProperty.call(message, "mCalibTouchBottom")) + writer.uint32(/* id 33, wireType 0 =*/264).uint32(message.mCalibTouchBottom); + return writer; + }; + + /** + * Encodes the specified SystemSetting message, length delimited. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.ISystemSetting} message SystemSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SystemSetting message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SystemSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SystemSetting} SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SystemSetting(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mCoinChute = reader.uint32(); + break; + } + case 2: { + message.mBuyCardCost = reader.uint32(); + break; + } + case 3: { + message.mGameCost = reader.uint32(); + break; + } + case 4: { + message.mContinueCost = reader.uint32(); + break; + } + case 5: { + message.mFullCourseCost = reader.uint32(); + break; + } + case 6: { + message.mFreePlay = reader.bool(); + break; + } + case 7: { + message.mPcbId = reader.uint32(); + break; + } + case 8: { + message.mIcCardRw = reader.bool(); + break; + } + case 9: { + message.mIcCardVender = reader.bool(); + break; + } + case 10: { + message.mMgCardRw = reader.bool(); + break; + } + case 11: { + message.mForceFeedback = reader.bool(); + break; + } + case 12: { + message.mWinsAndRemains = reader.bool(); + break; + } + case 13: { + message.mEventMode = reader.uint32(); + break; + } + case 14: { + message.mEventModeDist = reader.bool(); + break; + } + case 15: { + message.mCloseType = reader.uint32(); + break; + } + case 16: { + message.mCloseSun = reader.uint32(); + break; + } + case 17: { + message.mCloseMon = reader.uint32(); + break; + } + case 18: { + message.mCloseTue = reader.uint32(); + break; + } + case 19: { + message.mCloseWed = reader.uint32(); + break; + } + case 20: { + message.mCloseThu = reader.uint32(); + break; + } + case 21: { + message.mCloseFri = reader.uint32(); + break; + } + case 22: { + message.mCloseSat = reader.uint32(); + break; + } + case 23: { + message.mCloseDay = reader.uint32(); + break; + } + case 24: { + message.mTouchPanel = reader.bool(); + break; + } + case 25: { + message.mGameVol = reader.uint32(); + break; + } + case 26: { + message.mAttractVol = reader.uint32(); + break; + } + case 27: { + message.mCalibHandleCenter = reader.uint32(); + break; + } + case 28: { + message.mCalibAccelCenter = reader.uint32(); + break; + } + case 29: { + message.mCalibBrakeCenter = reader.uint32(); + break; + } + case 30: { + message.mCalibTouchLeft = reader.uint32(); + break; + } + case 31: { + message.mCalibTouchRight = reader.uint32(); + break; + } + case 32: { + message.mCalibTouchTop = reader.uint32(); + break; + } + case 33: { + message.mCalibTouchBottom = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("mCoinChute")) + throw $util.ProtocolError("missing required 'mCoinChute'", { instance: message }); + if (!message.hasOwnProperty("mBuyCardCost")) + throw $util.ProtocolError("missing required 'mBuyCardCost'", { instance: message }); + if (!message.hasOwnProperty("mGameCost")) + throw $util.ProtocolError("missing required 'mGameCost'", { instance: message }); + if (!message.hasOwnProperty("mContinueCost")) + throw $util.ProtocolError("missing required 'mContinueCost'", { instance: message }); + if (!message.hasOwnProperty("mFullCourseCost")) + throw $util.ProtocolError("missing required 'mFullCourseCost'", { instance: message }); + if (!message.hasOwnProperty("mFreePlay")) + throw $util.ProtocolError("missing required 'mFreePlay'", { instance: message }); + if (!message.hasOwnProperty("mIcCardRw")) + throw $util.ProtocolError("missing required 'mIcCardRw'", { instance: message }); + if (!message.hasOwnProperty("mIcCardVender")) + throw $util.ProtocolError("missing required 'mIcCardVender'", { instance: message }); + if (!message.hasOwnProperty("mWinsAndRemains")) + throw $util.ProtocolError("missing required 'mWinsAndRemains'", { instance: message }); + if (!message.hasOwnProperty("mEventMode")) + throw $util.ProtocolError("missing required 'mEventMode'", { instance: message }); + if (!message.hasOwnProperty("mEventModeDist")) + throw $util.ProtocolError("missing required 'mEventModeDist'", { instance: message }); + if (!message.hasOwnProperty("mCloseType")) + throw $util.ProtocolError("missing required 'mCloseType'", { instance: message }); + if (!message.hasOwnProperty("mCloseSun")) + throw $util.ProtocolError("missing required 'mCloseSun'", { instance: message }); + if (!message.hasOwnProperty("mCloseMon")) + throw $util.ProtocolError("missing required 'mCloseMon'", { instance: message }); + if (!message.hasOwnProperty("mCloseTue")) + throw $util.ProtocolError("missing required 'mCloseTue'", { instance: message }); + if (!message.hasOwnProperty("mCloseWed")) + throw $util.ProtocolError("missing required 'mCloseWed'", { instance: message }); + if (!message.hasOwnProperty("mCloseThu")) + throw $util.ProtocolError("missing required 'mCloseThu'", { instance: message }); + if (!message.hasOwnProperty("mCloseFri")) + throw $util.ProtocolError("missing required 'mCloseFri'", { instance: message }); + if (!message.hasOwnProperty("mCloseSat")) + throw $util.ProtocolError("missing required 'mCloseSat'", { instance: message }); + if (!message.hasOwnProperty("mCloseDay")) + throw $util.ProtocolError("missing required 'mCloseDay'", { instance: message }); + if (!message.hasOwnProperty("mGameVol")) + throw $util.ProtocolError("missing required 'mGameVol'", { instance: message }); + if (!message.hasOwnProperty("mAttractVol")) + throw $util.ProtocolError("missing required 'mAttractVol'", { instance: message }); + return message; + }; + + /** + * Decodes a SystemSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SystemSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SystemSetting} SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SystemSetting message. + * @function verify + * @memberof wm.protobuf.SystemSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SystemSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.mCoinChute)) + return "mCoinChute: integer expected"; + if (!$util.isInteger(message.mBuyCardCost)) + return "mBuyCardCost: integer expected"; + if (!$util.isInteger(message.mGameCost)) + return "mGameCost: integer expected"; + if (!$util.isInteger(message.mContinueCost)) + return "mContinueCost: integer expected"; + if (!$util.isInteger(message.mFullCourseCost)) + return "mFullCourseCost: integer expected"; + if (typeof message.mFreePlay !== "boolean") + return "mFreePlay: boolean expected"; + if (message.mPcbId != null && message.hasOwnProperty("mPcbId")) + if (!$util.isInteger(message.mPcbId)) + return "mPcbId: integer expected"; + if (typeof message.mIcCardRw !== "boolean") + return "mIcCardRw: boolean expected"; + if (typeof message.mIcCardVender !== "boolean") + return "mIcCardVender: boolean expected"; + if (message.mMgCardRw != null && message.hasOwnProperty("mMgCardRw")) + if (typeof message.mMgCardRw !== "boolean") + return "mMgCardRw: boolean expected"; + if (message.mForceFeedback != null && message.hasOwnProperty("mForceFeedback")) + if (typeof message.mForceFeedback !== "boolean") + return "mForceFeedback: boolean expected"; + if (typeof message.mWinsAndRemains !== "boolean") + return "mWinsAndRemains: boolean expected"; + if (!$util.isInteger(message.mEventMode)) + return "mEventMode: integer expected"; + if (typeof message.mEventModeDist !== "boolean") + return "mEventModeDist: boolean expected"; + if (!$util.isInteger(message.mCloseType)) + return "mCloseType: integer expected"; + if (!$util.isInteger(message.mCloseSun)) + return "mCloseSun: integer expected"; + if (!$util.isInteger(message.mCloseMon)) + return "mCloseMon: integer expected"; + if (!$util.isInteger(message.mCloseTue)) + return "mCloseTue: integer expected"; + if (!$util.isInteger(message.mCloseWed)) + return "mCloseWed: integer expected"; + if (!$util.isInteger(message.mCloseThu)) + return "mCloseThu: integer expected"; + if (!$util.isInteger(message.mCloseFri)) + return "mCloseFri: integer expected"; + if (!$util.isInteger(message.mCloseSat)) + return "mCloseSat: integer expected"; + if (!$util.isInteger(message.mCloseDay)) + return "mCloseDay: integer expected"; + if (message.mTouchPanel != null && message.hasOwnProperty("mTouchPanel")) + if (typeof message.mTouchPanel !== "boolean") + return "mTouchPanel: boolean expected"; + if (!$util.isInteger(message.mGameVol)) + return "mGameVol: integer expected"; + if (!$util.isInteger(message.mAttractVol)) + return "mAttractVol: integer expected"; + if (message.mCalibHandleCenter != null && message.hasOwnProperty("mCalibHandleCenter")) + if (!$util.isInteger(message.mCalibHandleCenter)) + return "mCalibHandleCenter: integer expected"; + if (message.mCalibAccelCenter != null && message.hasOwnProperty("mCalibAccelCenter")) + if (!$util.isInteger(message.mCalibAccelCenter)) + return "mCalibAccelCenter: integer expected"; + if (message.mCalibBrakeCenter != null && message.hasOwnProperty("mCalibBrakeCenter")) + if (!$util.isInteger(message.mCalibBrakeCenter)) + return "mCalibBrakeCenter: integer expected"; + if (message.mCalibTouchLeft != null && message.hasOwnProperty("mCalibTouchLeft")) + if (!$util.isInteger(message.mCalibTouchLeft)) + return "mCalibTouchLeft: integer expected"; + if (message.mCalibTouchRight != null && message.hasOwnProperty("mCalibTouchRight")) + if (!$util.isInteger(message.mCalibTouchRight)) + return "mCalibTouchRight: integer expected"; + if (message.mCalibTouchTop != null && message.hasOwnProperty("mCalibTouchTop")) + if (!$util.isInteger(message.mCalibTouchTop)) + return "mCalibTouchTop: integer expected"; + if (message.mCalibTouchBottom != null && message.hasOwnProperty("mCalibTouchBottom")) + if (!$util.isInteger(message.mCalibTouchBottom)) + return "mCalibTouchBottom: integer expected"; + return null; + }; + + /** + * Creates a SystemSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SystemSetting + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SystemSetting} SystemSetting + */ + SystemSetting.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SystemSetting) + return object; + let message = new $root.wm.protobuf.SystemSetting(); + if (object.mCoinChute != null) + message.mCoinChute = object.mCoinChute >>> 0; + if (object.mBuyCardCost != null) + message.mBuyCardCost = object.mBuyCardCost >>> 0; + if (object.mGameCost != null) + message.mGameCost = object.mGameCost >>> 0; + if (object.mContinueCost != null) + message.mContinueCost = object.mContinueCost >>> 0; + if (object.mFullCourseCost != null) + message.mFullCourseCost = object.mFullCourseCost >>> 0; + if (object.mFreePlay != null) + message.mFreePlay = Boolean(object.mFreePlay); + if (object.mPcbId != null) + message.mPcbId = object.mPcbId >>> 0; + if (object.mIcCardRw != null) + message.mIcCardRw = Boolean(object.mIcCardRw); + if (object.mIcCardVender != null) + message.mIcCardVender = Boolean(object.mIcCardVender); + if (object.mMgCardRw != null) + message.mMgCardRw = Boolean(object.mMgCardRw); + if (object.mForceFeedback != null) + message.mForceFeedback = Boolean(object.mForceFeedback); + if (object.mWinsAndRemains != null) + message.mWinsAndRemains = Boolean(object.mWinsAndRemains); + if (object.mEventMode != null) + message.mEventMode = object.mEventMode >>> 0; + if (object.mEventModeDist != null) + message.mEventModeDist = Boolean(object.mEventModeDist); + if (object.mCloseType != null) + message.mCloseType = object.mCloseType >>> 0; + if (object.mCloseSun != null) + message.mCloseSun = object.mCloseSun >>> 0; + if (object.mCloseMon != null) + message.mCloseMon = object.mCloseMon >>> 0; + if (object.mCloseTue != null) + message.mCloseTue = object.mCloseTue >>> 0; + if (object.mCloseWed != null) + message.mCloseWed = object.mCloseWed >>> 0; + if (object.mCloseThu != null) + message.mCloseThu = object.mCloseThu >>> 0; + if (object.mCloseFri != null) + message.mCloseFri = object.mCloseFri >>> 0; + if (object.mCloseSat != null) + message.mCloseSat = object.mCloseSat >>> 0; + if (object.mCloseDay != null) + message.mCloseDay = object.mCloseDay >>> 0; + if (object.mTouchPanel != null) + message.mTouchPanel = Boolean(object.mTouchPanel); + if (object.mGameVol != null) + message.mGameVol = object.mGameVol >>> 0; + if (object.mAttractVol != null) + message.mAttractVol = object.mAttractVol >>> 0; + if (object.mCalibHandleCenter != null) + message.mCalibHandleCenter = object.mCalibHandleCenter >>> 0; + if (object.mCalibAccelCenter != null) + message.mCalibAccelCenter = object.mCalibAccelCenter >>> 0; + if (object.mCalibBrakeCenter != null) + message.mCalibBrakeCenter = object.mCalibBrakeCenter >>> 0; + if (object.mCalibTouchLeft != null) + message.mCalibTouchLeft = object.mCalibTouchLeft >>> 0; + if (object.mCalibTouchRight != null) + message.mCalibTouchRight = object.mCalibTouchRight >>> 0; + if (object.mCalibTouchTop != null) + message.mCalibTouchTop = object.mCalibTouchTop >>> 0; + if (object.mCalibTouchBottom != null) + message.mCalibTouchBottom = object.mCalibTouchBottom >>> 0; + return message; + }; + + /** + * Creates a plain object from a SystemSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.SystemSetting} message SystemSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SystemSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.mCoinChute = 0; + object.mBuyCardCost = 0; + object.mGameCost = 0; + object.mContinueCost = 0; + object.mFullCourseCost = 0; + object.mFreePlay = false; + object.mPcbId = 0; + object.mIcCardRw = false; + object.mIcCardVender = false; + object.mMgCardRw = false; + object.mForceFeedback = false; + object.mWinsAndRemains = false; + object.mEventMode = 0; + object.mEventModeDist = false; + object.mCloseType = 0; + object.mCloseSun = 0; + object.mCloseMon = 0; + object.mCloseTue = 0; + object.mCloseWed = 0; + object.mCloseThu = 0; + object.mCloseFri = 0; + object.mCloseSat = 0; + object.mCloseDay = 0; + object.mTouchPanel = false; + object.mGameVol = 0; + object.mAttractVol = 0; + object.mCalibHandleCenter = 0; + object.mCalibAccelCenter = 0; + object.mCalibBrakeCenter = 0; + object.mCalibTouchLeft = 0; + object.mCalibTouchRight = 0; + object.mCalibTouchTop = 0; + object.mCalibTouchBottom = 0; + } + if (message.mCoinChute != null && message.hasOwnProperty("mCoinChute")) + object.mCoinChute = message.mCoinChute; + if (message.mBuyCardCost != null && message.hasOwnProperty("mBuyCardCost")) + object.mBuyCardCost = message.mBuyCardCost; + if (message.mGameCost != null && message.hasOwnProperty("mGameCost")) + object.mGameCost = message.mGameCost; + if (message.mContinueCost != null && message.hasOwnProperty("mContinueCost")) + object.mContinueCost = message.mContinueCost; + if (message.mFullCourseCost != null && message.hasOwnProperty("mFullCourseCost")) + object.mFullCourseCost = message.mFullCourseCost; + if (message.mFreePlay != null && message.hasOwnProperty("mFreePlay")) + object.mFreePlay = message.mFreePlay; + if (message.mPcbId != null && message.hasOwnProperty("mPcbId")) + object.mPcbId = message.mPcbId; + if (message.mIcCardRw != null && message.hasOwnProperty("mIcCardRw")) + object.mIcCardRw = message.mIcCardRw; + if (message.mIcCardVender != null && message.hasOwnProperty("mIcCardVender")) + object.mIcCardVender = message.mIcCardVender; + if (message.mMgCardRw != null && message.hasOwnProperty("mMgCardRw")) + object.mMgCardRw = message.mMgCardRw; + if (message.mForceFeedback != null && message.hasOwnProperty("mForceFeedback")) + object.mForceFeedback = message.mForceFeedback; + if (message.mWinsAndRemains != null && message.hasOwnProperty("mWinsAndRemains")) + object.mWinsAndRemains = message.mWinsAndRemains; + if (message.mEventMode != null && message.hasOwnProperty("mEventMode")) + object.mEventMode = message.mEventMode; + if (message.mEventModeDist != null && message.hasOwnProperty("mEventModeDist")) + object.mEventModeDist = message.mEventModeDist; + if (message.mCloseType != null && message.hasOwnProperty("mCloseType")) + object.mCloseType = message.mCloseType; + if (message.mCloseSun != null && message.hasOwnProperty("mCloseSun")) + object.mCloseSun = message.mCloseSun; + if (message.mCloseMon != null && message.hasOwnProperty("mCloseMon")) + object.mCloseMon = message.mCloseMon; + if (message.mCloseTue != null && message.hasOwnProperty("mCloseTue")) + object.mCloseTue = message.mCloseTue; + if (message.mCloseWed != null && message.hasOwnProperty("mCloseWed")) + object.mCloseWed = message.mCloseWed; + if (message.mCloseThu != null && message.hasOwnProperty("mCloseThu")) + object.mCloseThu = message.mCloseThu; + if (message.mCloseFri != null && message.hasOwnProperty("mCloseFri")) + object.mCloseFri = message.mCloseFri; + if (message.mCloseSat != null && message.hasOwnProperty("mCloseSat")) + object.mCloseSat = message.mCloseSat; + if (message.mCloseDay != null && message.hasOwnProperty("mCloseDay")) + object.mCloseDay = message.mCloseDay; + if (message.mTouchPanel != null && message.hasOwnProperty("mTouchPanel")) + object.mTouchPanel = message.mTouchPanel; + if (message.mGameVol != null && message.hasOwnProperty("mGameVol")) + object.mGameVol = message.mGameVol; + if (message.mAttractVol != null && message.hasOwnProperty("mAttractVol")) + object.mAttractVol = message.mAttractVol; + if (message.mCalibHandleCenter != null && message.hasOwnProperty("mCalibHandleCenter")) + object.mCalibHandleCenter = message.mCalibHandleCenter; + if (message.mCalibAccelCenter != null && message.hasOwnProperty("mCalibAccelCenter")) + object.mCalibAccelCenter = message.mCalibAccelCenter; + if (message.mCalibBrakeCenter != null && message.hasOwnProperty("mCalibBrakeCenter")) + object.mCalibBrakeCenter = message.mCalibBrakeCenter; + if (message.mCalibTouchLeft != null && message.hasOwnProperty("mCalibTouchLeft")) + object.mCalibTouchLeft = message.mCalibTouchLeft; + if (message.mCalibTouchRight != null && message.hasOwnProperty("mCalibTouchRight")) + object.mCalibTouchRight = message.mCalibTouchRight; + if (message.mCalibTouchTop != null && message.hasOwnProperty("mCalibTouchTop")) + object.mCalibTouchTop = message.mCalibTouchTop; + if (message.mCalibTouchBottom != null && message.hasOwnProperty("mCalibTouchBottom")) + object.mCalibTouchBottom = message.mCalibTouchBottom; + return object; + }; + + /** + * Converts this SystemSetting to JSON. + * @function toJSON + * @memberof wm.protobuf.SystemSetting + * @instance + * @returns {Object.} JSON object + */ + SystemSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SystemSetting + * @function getTypeUrl + * @memberof wm.protobuf.SystemSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SystemSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SystemSetting"; + }; + + return SystemSetting; + })(); + + protobuf.GhostCompetitionSchedule = (function() { + + /** + * Properties of a GhostCompetitionSchedule. + * @memberof wm.protobuf + * @interface IGhostCompetitionSchedule + * @property {number} competitionId GhostCompetitionSchedule competitionId + * @property {number} qualifyingPeriodStartAt GhostCompetitionSchedule qualifyingPeriodStartAt + * @property {number} qualifyingPeriodCloseAt GhostCompetitionSchedule qualifyingPeriodCloseAt + * @property {number} competitionStartAt GhostCompetitionSchedule competitionStartAt + * @property {number} competitionCloseAt GhostCompetitionSchedule competitionCloseAt + * @property {number} competitionEndAt GhostCompetitionSchedule competitionEndAt + * @property {number} lengthOfPeriod GhostCompetitionSchedule lengthOfPeriod + * @property {number} lengthOfInterval GhostCompetitionSchedule lengthOfInterval + * @property {number} area GhostCompetitionSchedule area + * @property {number} minigamePatternId GhostCompetitionSchedule minigamePatternId + */ + + /** + * Constructs a new GhostCompetitionSchedule. + * @memberof wm.protobuf + * @classdesc Represents a GhostCompetitionSchedule. + * @implements IGhostCompetitionSchedule + * @constructor + * @param {wm.protobuf.IGhostCompetitionSchedule=} [properties] Properties to set + */ + function GhostCompetitionSchedule(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionSchedule competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionId = 0; + + /** + * GhostCompetitionSchedule qualifyingPeriodStartAt. + * @member {number} qualifyingPeriodStartAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.qualifyingPeriodStartAt = 0; + + /** + * GhostCompetitionSchedule qualifyingPeriodCloseAt. + * @member {number} qualifyingPeriodCloseAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.qualifyingPeriodCloseAt = 0; + + /** + * GhostCompetitionSchedule competitionStartAt. + * @member {number} competitionStartAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionStartAt = 0; + + /** + * GhostCompetitionSchedule competitionCloseAt. + * @member {number} competitionCloseAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionCloseAt = 0; + + /** + * GhostCompetitionSchedule competitionEndAt. + * @member {number} competitionEndAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionEndAt = 0; + + /** + * GhostCompetitionSchedule lengthOfPeriod. + * @member {number} lengthOfPeriod + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.lengthOfPeriod = 0; + + /** + * GhostCompetitionSchedule lengthOfInterval. + * @member {number} lengthOfInterval + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.lengthOfInterval = 0; + + /** + * GhostCompetitionSchedule area. + * @member {number} area + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.area = 0; + + /** + * GhostCompetitionSchedule minigamePatternId. + * @member {number} minigamePatternId + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.minigamePatternId = 0; + + /** + * Creates a new GhostCompetitionSchedule instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.IGhostCompetitionSchedule=} [properties] Properties to set + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule instance + */ + GhostCompetitionSchedule.create = function create(properties) { + return new GhostCompetitionSchedule(properties); + }; + + /** + * Encodes the specified GhostCompetitionSchedule message. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.IGhostCompetitionSchedule} message GhostCompetitionSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.competitionId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.qualifyingPeriodStartAt); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.qualifyingPeriodCloseAt); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.competitionStartAt); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.competitionCloseAt); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.competitionEndAt); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.lengthOfPeriod); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.lengthOfInterval); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.area); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.minigamePatternId); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionSchedule message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.IGhostCompetitionSchedule} message GhostCompetitionSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionSchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCompetitionSchedule(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.competitionId = reader.uint32(); + break; + } + case 2: { + message.qualifyingPeriodStartAt = reader.uint32(); + break; + } + case 3: { + message.qualifyingPeriodCloseAt = reader.uint32(); + break; + } + case 4: { + message.competitionStartAt = reader.uint32(); + break; + } + case 5: { + message.competitionCloseAt = reader.uint32(); + break; + } + case 6: { + message.competitionEndAt = reader.uint32(); + break; + } + case 7: { + message.lengthOfPeriod = reader.uint32(); + break; + } + case 8: { + message.lengthOfInterval = reader.uint32(); + break; + } + case 9: { + message.area = reader.uint32(); + break; + } + case 10: { + message.minigamePatternId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + if (!message.hasOwnProperty("qualifyingPeriodStartAt")) + throw $util.ProtocolError("missing required 'qualifyingPeriodStartAt'", { instance: message }); + if (!message.hasOwnProperty("qualifyingPeriodCloseAt")) + throw $util.ProtocolError("missing required 'qualifyingPeriodCloseAt'", { instance: message }); + if (!message.hasOwnProperty("competitionStartAt")) + throw $util.ProtocolError("missing required 'competitionStartAt'", { instance: message }); + if (!message.hasOwnProperty("competitionCloseAt")) + throw $util.ProtocolError("missing required 'competitionCloseAt'", { instance: message }); + if (!message.hasOwnProperty("competitionEndAt")) + throw $util.ProtocolError("missing required 'competitionEndAt'", { instance: message }); + if (!message.hasOwnProperty("lengthOfPeriod")) + throw $util.ProtocolError("missing required 'lengthOfPeriod'", { instance: message }); + if (!message.hasOwnProperty("lengthOfInterval")) + throw $util.ProtocolError("missing required 'lengthOfInterval'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("minigamePatternId")) + throw $util.ProtocolError("missing required 'minigamePatternId'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionSchedule message. + * @function verify + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + if (!$util.isInteger(message.qualifyingPeriodStartAt)) + return "qualifyingPeriodStartAt: integer expected"; + if (!$util.isInteger(message.qualifyingPeriodCloseAt)) + return "qualifyingPeriodCloseAt: integer expected"; + if (!$util.isInteger(message.competitionStartAt)) + return "competitionStartAt: integer expected"; + if (!$util.isInteger(message.competitionCloseAt)) + return "competitionCloseAt: integer expected"; + if (!$util.isInteger(message.competitionEndAt)) + return "competitionEndAt: integer expected"; + if (!$util.isInteger(message.lengthOfPeriod)) + return "lengthOfPeriod: integer expected"; + if (!$util.isInteger(message.lengthOfInterval)) + return "lengthOfInterval: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.minigamePatternId)) + return "minigamePatternId: integer expected"; + return null; + }; + + /** + * Creates a GhostCompetitionSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule + */ + GhostCompetitionSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCompetitionSchedule) + return object; + let message = new $root.wm.protobuf.GhostCompetitionSchedule(); + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + if (object.qualifyingPeriodStartAt != null) + message.qualifyingPeriodStartAt = object.qualifyingPeriodStartAt >>> 0; + if (object.qualifyingPeriodCloseAt != null) + message.qualifyingPeriodCloseAt = object.qualifyingPeriodCloseAt >>> 0; + if (object.competitionStartAt != null) + message.competitionStartAt = object.competitionStartAt >>> 0; + if (object.competitionCloseAt != null) + message.competitionCloseAt = object.competitionCloseAt >>> 0; + if (object.competitionEndAt != null) + message.competitionEndAt = object.competitionEndAt >>> 0; + if (object.lengthOfPeriod != null) + message.lengthOfPeriod = object.lengthOfPeriod >>> 0; + if (object.lengthOfInterval != null) + message.lengthOfInterval = object.lengthOfInterval >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.minigamePatternId != null) + message.minigamePatternId = object.minigamePatternId >>> 0; + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.GhostCompetitionSchedule} message GhostCompetitionSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.competitionId = 0; + object.qualifyingPeriodStartAt = 0; + object.qualifyingPeriodCloseAt = 0; + object.competitionStartAt = 0; + object.competitionCloseAt = 0; + object.competitionEndAt = 0; + object.lengthOfPeriod = 0; + object.lengthOfInterval = 0; + object.area = 0; + object.minigamePatternId = 0; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + if (message.qualifyingPeriodStartAt != null && message.hasOwnProperty("qualifyingPeriodStartAt")) + object.qualifyingPeriodStartAt = message.qualifyingPeriodStartAt; + if (message.qualifyingPeriodCloseAt != null && message.hasOwnProperty("qualifyingPeriodCloseAt")) + object.qualifyingPeriodCloseAt = message.qualifyingPeriodCloseAt; + if (message.competitionStartAt != null && message.hasOwnProperty("competitionStartAt")) + object.competitionStartAt = message.competitionStartAt; + if (message.competitionCloseAt != null && message.hasOwnProperty("competitionCloseAt")) + object.competitionCloseAt = message.competitionCloseAt; + if (message.competitionEndAt != null && message.hasOwnProperty("competitionEndAt")) + object.competitionEndAt = message.competitionEndAt; + if (message.lengthOfPeriod != null && message.hasOwnProperty("lengthOfPeriod")) + object.lengthOfPeriod = message.lengthOfPeriod; + if (message.lengthOfInterval != null && message.hasOwnProperty("lengthOfInterval")) + object.lengthOfInterval = message.lengthOfInterval; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.minigamePatternId != null && message.hasOwnProperty("minigamePatternId")) + object.minigamePatternId = message.minigamePatternId; + return object; + }; + + /** + * Converts this GhostCompetitionSchedule to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionSchedule + * @function getTypeUrl + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCompetitionSchedule"; + }; + + return GhostCompetitionSchedule; + })(); + + protobuf.GhostCompetitionParameter = (function() { + + /** + * Properties of a GhostCompetitionParameter. + * @memberof wm.protobuf + * @interface IGhostCompetitionParameter + * @property {Array.|null} [parameters1] GhostCompetitionParameter parameters1 + * @property {boolean} parameters2 GhostCompetitionParameter parameters2 + */ + + /** + * Constructs a new GhostCompetitionParameter. + * @memberof wm.protobuf + * @classdesc Represents a GhostCompetitionParameter. + * @implements IGhostCompetitionParameter + * @constructor + * @param {wm.protobuf.IGhostCompetitionParameter=} [properties] Properties to set + */ + function GhostCompetitionParameter(properties) { + this.parameters1 = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionParameter parameters1. + * @member {Array.} parameters1 + * @memberof wm.protobuf.GhostCompetitionParameter + * @instance + */ + GhostCompetitionParameter.prototype.parameters1 = $util.emptyArray; + + /** + * GhostCompetitionParameter parameters2. + * @member {boolean} parameters2 + * @memberof wm.protobuf.GhostCompetitionParameter + * @instance + */ + GhostCompetitionParameter.prototype.parameters2 = false; + + /** + * Creates a new GhostCompetitionParameter instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.IGhostCompetitionParameter=} [properties] Properties to set + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter instance + */ + GhostCompetitionParameter.create = function create(properties) { + return new GhostCompetitionParameter(properties); + }; + + /** + * Encodes the specified GhostCompetitionParameter message. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.IGhostCompetitionParameter} message GhostCompetitionParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionParameter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameters1 != null && message.parameters1.length) + for (let i = 0; i < message.parameters1.length; ++i) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.parameters1[i]); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.parameters2); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionParameter message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.IGhostCompetitionParameter} message GhostCompetitionParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionParameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionParameter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCompetitionParameter(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.parameters1 && message.parameters1.length)) + message.parameters1 = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.parameters1.push(reader.float()); + } else + message.parameters1.push(reader.float()); + break; + } + case 2: { + message.parameters2 = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("parameters2")) + throw $util.ProtocolError("missing required 'parameters2'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionParameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionParameter message. + * @function verify + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionParameter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameters1 != null && message.hasOwnProperty("parameters1")) { + if (!Array.isArray(message.parameters1)) + return "parameters1: array expected"; + for (let i = 0; i < message.parameters1.length; ++i) + if (typeof message.parameters1[i] !== "number") + return "parameters1: number[] expected"; + } + if (typeof message.parameters2 !== "boolean") + return "parameters2: boolean expected"; + return null; + }; + + /** + * Creates a GhostCompetitionParameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter + */ + GhostCompetitionParameter.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCompetitionParameter) + return object; + let message = new $root.wm.protobuf.GhostCompetitionParameter(); + if (object.parameters1) { + if (!Array.isArray(object.parameters1)) + throw TypeError(".wm.protobuf.GhostCompetitionParameter.parameters1: array expected"); + message.parameters1 = []; + for (let i = 0; i < object.parameters1.length; ++i) + message.parameters1[i] = Number(object.parameters1[i]); + } + if (object.parameters2 != null) + message.parameters2 = Boolean(object.parameters2); + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionParameter message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.GhostCompetitionParameter} message GhostCompetitionParameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionParameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.parameters1 = []; + if (options.defaults) + object.parameters2 = false; + if (message.parameters1 && message.parameters1.length) { + object.parameters1 = []; + for (let j = 0; j < message.parameters1.length; ++j) + object.parameters1[j] = options.json && !isFinite(message.parameters1[j]) ? String(message.parameters1[j]) : message.parameters1[j]; + } + if (message.parameters2 != null && message.hasOwnProperty("parameters2")) + object.parameters2 = message.parameters2; + return object; + }; + + /** + * Converts this GhostCompetitionParameter to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCompetitionParameter + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionParameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionParameter + * @function getTypeUrl + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCompetitionParameter"; + }; + + return GhostCompetitionParameter; + })(); + + protobuf.TransferNotice = (function() { + + /** + * Properties of a TransferNotice. + * @memberof wm.protobuf + * @interface ITransferNotice + * @property {boolean} needToSeeTransferred TransferNotice needToSeeTransferred + * @property {number|null} [totalMaxiGold] TransferNotice totalMaxiGold + * @property {number|null} [numOfPorscheCars] TransferNotice numOfPorscheCars + * @property {Array.|null} [porscheModels] TransferNotice porscheModels + * @property {boolean|null} [hasR35] TransferNotice hasR35 + */ + + /** + * Constructs a new TransferNotice. + * @memberof wm.protobuf + * @classdesc Represents a TransferNotice. + * @implements ITransferNotice + * @constructor + * @param {wm.protobuf.ITransferNotice=} [properties] Properties to set + */ + function TransferNotice(properties) { + this.porscheModels = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransferNotice needToSeeTransferred. + * @member {boolean} needToSeeTransferred + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.needToSeeTransferred = false; + + /** + * TransferNotice totalMaxiGold. + * @member {number} totalMaxiGold + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.totalMaxiGold = 0; + + /** + * TransferNotice numOfPorscheCars. + * @member {number} numOfPorscheCars + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.numOfPorscheCars = 0; + + /** + * TransferNotice porscheModels. + * @member {Array.} porscheModels + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.porscheModels = $util.emptyArray; + + /** + * TransferNotice hasR35. + * @member {boolean} hasR35 + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.hasR35 = false; + + /** + * Creates a new TransferNotice instance using the specified properties. + * @function create + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.ITransferNotice=} [properties] Properties to set + * @returns {wm.protobuf.TransferNotice} TransferNotice instance + */ + TransferNotice.create = function create(properties) { + return new TransferNotice(properties); + }; + + /** + * Encodes the specified TransferNotice message. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.ITransferNotice} message TransferNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferNotice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.needToSeeTransferred); + if (message.totalMaxiGold != null && Object.hasOwnProperty.call(message, "totalMaxiGold")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.totalMaxiGold); + if (message.numOfPorscheCars != null && Object.hasOwnProperty.call(message, "numOfPorscheCars")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.numOfPorscheCars); + if (message.porscheModels != null && message.porscheModels.length) + for (let i = 0; i < message.porscheModels.length; ++i) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.porscheModels[i]); + if (message.hasR35 != null && Object.hasOwnProperty.call(message, "hasR35")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.hasR35); + return writer; + }; + + /** + * Encodes the specified TransferNotice message, length delimited. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.ITransferNotice} message TransferNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferNotice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransferNotice message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TransferNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TransferNotice} TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferNotice.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TransferNotice(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.needToSeeTransferred = reader.bool(); + break; + } + case 2: { + message.totalMaxiGold = reader.uint32(); + break; + } + case 3: { + message.numOfPorscheCars = reader.uint32(); + break; + } + case 4: { + if (!(message.porscheModels && message.porscheModels.length)) + message.porscheModels = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.porscheModels.push(reader.uint32()); + } else + message.porscheModels.push(reader.uint32()); + break; + } + case 5: { + message.hasR35 = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("needToSeeTransferred")) + throw $util.ProtocolError("missing required 'needToSeeTransferred'", { instance: message }); + return message; + }; + + /** + * Decodes a TransferNotice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TransferNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TransferNotice} TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferNotice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransferNotice message. + * @function verify + * @memberof wm.protobuf.TransferNotice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransferNotice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (typeof message.needToSeeTransferred !== "boolean") + return "needToSeeTransferred: boolean expected"; + if (message.totalMaxiGold != null && message.hasOwnProperty("totalMaxiGold")) + if (!$util.isInteger(message.totalMaxiGold)) + return "totalMaxiGold: integer expected"; + if (message.numOfPorscheCars != null && message.hasOwnProperty("numOfPorscheCars")) + if (!$util.isInteger(message.numOfPorscheCars)) + return "numOfPorscheCars: integer expected"; + if (message.porscheModels != null && message.hasOwnProperty("porscheModels")) { + if (!Array.isArray(message.porscheModels)) + return "porscheModels: array expected"; + for (let i = 0; i < message.porscheModels.length; ++i) + if (!$util.isInteger(message.porscheModels[i])) + return "porscheModels: integer[] expected"; + } + if (message.hasR35 != null && message.hasOwnProperty("hasR35")) + if (typeof message.hasR35 !== "boolean") + return "hasR35: boolean expected"; + return null; + }; + + /** + * Creates a TransferNotice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TransferNotice + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TransferNotice} TransferNotice + */ + TransferNotice.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TransferNotice) + return object; + let message = new $root.wm.protobuf.TransferNotice(); + if (object.needToSeeTransferred != null) + message.needToSeeTransferred = Boolean(object.needToSeeTransferred); + if (object.totalMaxiGold != null) + message.totalMaxiGold = object.totalMaxiGold >>> 0; + if (object.numOfPorscheCars != null) + message.numOfPorscheCars = object.numOfPorscheCars >>> 0; + if (object.porscheModels) { + if (!Array.isArray(object.porscheModels)) + throw TypeError(".wm.protobuf.TransferNotice.porscheModels: array expected"); + message.porscheModels = []; + for (let i = 0; i < object.porscheModels.length; ++i) + message.porscheModels[i] = object.porscheModels[i] >>> 0; + } + if (object.hasR35 != null) + message.hasR35 = Boolean(object.hasR35); + return message; + }; + + /** + * Creates a plain object from a TransferNotice message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.TransferNotice} message TransferNotice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransferNotice.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.porscheModels = []; + if (options.defaults) { + object.needToSeeTransferred = false; + object.totalMaxiGold = 0; + object.numOfPorscheCars = 0; + object.hasR35 = false; + } + if (message.needToSeeTransferred != null && message.hasOwnProperty("needToSeeTransferred")) + object.needToSeeTransferred = message.needToSeeTransferred; + if (message.totalMaxiGold != null && message.hasOwnProperty("totalMaxiGold")) + object.totalMaxiGold = message.totalMaxiGold; + if (message.numOfPorscheCars != null && message.hasOwnProperty("numOfPorscheCars")) + object.numOfPorscheCars = message.numOfPorscheCars; + if (message.porscheModels && message.porscheModels.length) { + object.porscheModels = []; + for (let j = 0; j < message.porscheModels.length; ++j) + object.porscheModels[j] = message.porscheModels[j]; + } + if (message.hasR35 != null && message.hasOwnProperty("hasR35")) + object.hasR35 = message.hasR35; + return object; + }; + + /** + * Converts this TransferNotice to JSON. + * @function toJSON + * @memberof wm.protobuf.TransferNotice + * @instance + * @returns {Object.} JSON object + */ + TransferNotice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransferNotice + * @function getTypeUrl + * @memberof wm.protobuf.TransferNotice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransferNotice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TransferNotice"; + }; + + return TransferNotice; + })(); + + protobuf.GameFeatureVersion = (function() { + + /** + * Properties of a GameFeatureVersion. + * @memberof wm.protobuf + * @interface IGameFeatureVersion + * @property {number} version GameFeatureVersion version + * @property {number} year GameFeatureVersion year + * @property {number} month GameFeatureVersion month + * @property {number} pluses GameFeatureVersion pluses + * @property {number} releaseAt GameFeatureVersion releaseAt + */ + + /** + * Constructs a new GameFeatureVersion. + * @memberof wm.protobuf + * @classdesc Represents a GameFeatureVersion. + * @implements IGameFeatureVersion + * @constructor + * @param {wm.protobuf.IGameFeatureVersion=} [properties] Properties to set + */ + function GameFeatureVersion(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GameFeatureVersion version. + * @member {number} version + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.version = 0; + + /** + * GameFeatureVersion year. + * @member {number} year + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.year = 0; + + /** + * GameFeatureVersion month. + * @member {number} month + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.month = 0; + + /** + * GameFeatureVersion pluses. + * @member {number} pluses + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.pluses = 0; + + /** + * GameFeatureVersion releaseAt. + * @member {number} releaseAt + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.releaseAt = 0; + + /** + * Creates a new GameFeatureVersion instance using the specified properties. + * @function create + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.IGameFeatureVersion=} [properties] Properties to set + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion instance + */ + GameFeatureVersion.create = function create(properties) { + return new GameFeatureVersion(properties); + }; + + /** + * Encodes the specified GameFeatureVersion message. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.IGameFeatureVersion} message GameFeatureVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GameFeatureVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.version); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.year); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.month); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.pluses); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.releaseAt); + return writer; + }; + + /** + * Encodes the specified GameFeatureVersion message, length delimited. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.IGameFeatureVersion} message GameFeatureVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GameFeatureVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GameFeatureVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GameFeatureVersion(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.uint32(); + break; + } + case 2: { + message.year = reader.uint32(); + break; + } + case 3: { + message.month = reader.uint32(); + break; + } + case 4: { + message.pluses = reader.uint32(); + break; + } + case 5: { + message.releaseAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("version")) + throw $util.ProtocolError("missing required 'version'", { instance: message }); + if (!message.hasOwnProperty("year")) + throw $util.ProtocolError("missing required 'year'", { instance: message }); + if (!message.hasOwnProperty("month")) + throw $util.ProtocolError("missing required 'month'", { instance: message }); + if (!message.hasOwnProperty("pluses")) + throw $util.ProtocolError("missing required 'pluses'", { instance: message }); + if (!message.hasOwnProperty("releaseAt")) + throw $util.ProtocolError("missing required 'releaseAt'", { instance: message }); + return message; + }; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GameFeatureVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GameFeatureVersion message. + * @function verify + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GameFeatureVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (!$util.isInteger(message.pluses)) + return "pluses: integer expected"; + if (!$util.isInteger(message.releaseAt)) + return "releaseAt: integer expected"; + return null; + }; + + /** + * Creates a GameFeatureVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion + */ + GameFeatureVersion.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GameFeatureVersion) + return object; + let message = new $root.wm.protobuf.GameFeatureVersion(); + if (object.version != null) + message.version = object.version >>> 0; + if (object.year != null) + message.year = object.year >>> 0; + if (object.month != null) + message.month = object.month >>> 0; + if (object.pluses != null) + message.pluses = object.pluses >>> 0; + if (object.releaseAt != null) + message.releaseAt = object.releaseAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a GameFeatureVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.GameFeatureVersion} message GameFeatureVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GameFeatureVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.version = 0; + object.year = 0; + object.month = 0; + object.pluses = 0; + object.releaseAt = 0; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.pluses != null && message.hasOwnProperty("pluses")) + object.pluses = message.pluses; + if (message.releaseAt != null && message.hasOwnProperty("releaseAt")) + object.releaseAt = message.releaseAt; + return object; + }; + + /** + * Converts this GameFeatureVersion to JSON. + * @function toJSON + * @memberof wm.protobuf.GameFeatureVersion + * @instance + * @returns {Object.} JSON object + */ + GameFeatureVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GameFeatureVersion + * @function getTypeUrl + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GameFeatureVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GameFeatureVersion"; + }; + + return GameFeatureVersion; + })(); + + protobuf.ScratchSheet = (function() { + + /** + * Properties of a ScratchSheet. + * @memberof wm.protobuf + * @interface IScratchSheet + * @property {Array.|null} [squares] ScratchSheet squares + */ + + /** + * Constructs a new ScratchSheet. + * @memberof wm.protobuf + * @classdesc Represents a ScratchSheet. + * @implements IScratchSheet + * @constructor + * @param {wm.protobuf.IScratchSheet=} [properties] Properties to set + */ + function ScratchSheet(properties) { + this.squares = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ScratchSheet squares. + * @member {Array.} squares + * @memberof wm.protobuf.ScratchSheet + * @instance + */ + ScratchSheet.prototype.squares = $util.emptyArray; + + /** + * Creates a new ScratchSheet instance using the specified properties. + * @function create + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.IScratchSheet=} [properties] Properties to set + * @returns {wm.protobuf.ScratchSheet} ScratchSheet instance + */ + ScratchSheet.create = function create(properties) { + return new ScratchSheet(properties); + }; + + /** + * Encodes the specified ScratchSheet message. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.IScratchSheet} message ScratchSheet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSheet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.squares != null && message.squares.length) + for (let i = 0; i < message.squares.length; ++i) + $root.wm.protobuf.ScratchSheet.ScratchSquare.encode(message.squares[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ScratchSheet message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.IScratchSheet} message ScratchSheet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSheet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ScratchSheet} ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSheet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ScratchSheet(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.squares && message.squares.length)) + message.squares = []; + message.squares.push($root.wm.protobuf.ScratchSheet.ScratchSquare.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ScratchSheet} ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSheet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScratchSheet message. + * @function verify + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScratchSheet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.squares != null && message.hasOwnProperty("squares")) { + if (!Array.isArray(message.squares)) + return "squares: array expected"; + for (let i = 0; i < message.squares.length; ++i) { + let error = $root.wm.protobuf.ScratchSheet.ScratchSquare.verify(message.squares[i]); + if (error) + return "squares." + error; + } + } + return null; + }; + + /** + * Creates a ScratchSheet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ScratchSheet} ScratchSheet + */ + ScratchSheet.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ScratchSheet) + return object; + let message = new $root.wm.protobuf.ScratchSheet(); + if (object.squares) { + if (!Array.isArray(object.squares)) + throw TypeError(".wm.protobuf.ScratchSheet.squares: array expected"); + message.squares = []; + for (let i = 0; i < object.squares.length; ++i) { + if (typeof object.squares[i] !== "object") + throw TypeError(".wm.protobuf.ScratchSheet.squares: object expected"); + message.squares[i] = $root.wm.protobuf.ScratchSheet.ScratchSquare.fromObject(object.squares[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ScratchSheet message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.ScratchSheet} message ScratchSheet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScratchSheet.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.squares = []; + if (message.squares && message.squares.length) { + object.squares = []; + for (let j = 0; j < message.squares.length; ++j) + object.squares[j] = $root.wm.protobuf.ScratchSheet.ScratchSquare.toObject(message.squares[j], options); + } + return object; + }; + + /** + * Converts this ScratchSheet to JSON. + * @function toJSON + * @memberof wm.protobuf.ScratchSheet + * @instance + * @returns {Object.} JSON object + */ + ScratchSheet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScratchSheet + * @function getTypeUrl + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScratchSheet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ScratchSheet"; + }; + + ScratchSheet.ScratchSquare = (function() { + + /** + * Properties of a ScratchSquare. + * @memberof wm.protobuf.ScratchSheet + * @interface IScratchSquare + * @property {wm.protobuf.ItemCategory} category ScratchSquare category + * @property {number} itemId ScratchSquare itemId + * @property {boolean} earned ScratchSquare earned + */ + + /** + * Constructs a new ScratchSquare. + * @memberof wm.protobuf.ScratchSheet + * @classdesc Represents a ScratchSquare. + * @implements IScratchSquare + * @constructor + * @param {wm.protobuf.ScratchSheet.IScratchSquare=} [properties] Properties to set + */ + function ScratchSquare(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ScratchSquare category. + * @member {wm.protobuf.ItemCategory} category + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + */ + ScratchSquare.prototype.category = 1; + + /** + * ScratchSquare itemId. + * @member {number} itemId + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + */ + ScratchSquare.prototype.itemId = 0; + + /** + * ScratchSquare earned. + * @member {boolean} earned + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + */ + ScratchSquare.prototype.earned = false; + + /** + * Creates a new ScratchSquare instance using the specified properties. + * @function create + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.IScratchSquare=} [properties] Properties to set + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare instance + */ + ScratchSquare.create = function create(properties) { + return new ScratchSquare(properties); + }; + + /** + * Encodes the specified ScratchSquare message. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.IScratchSquare} message ScratchSquare message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSquare.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.itemId); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.earned); + return writer; + }; + + /** + * Encodes the specified ScratchSquare message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.IScratchSquare} message ScratchSquare message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSquare.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSquare.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ScratchSheet.ScratchSquare(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.itemId = reader.uint32(); + break; + } + case 3: { + message.earned = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("category")) + throw $util.ProtocolError("missing required 'category'", { instance: message }); + if (!message.hasOwnProperty("itemId")) + throw $util.ProtocolError("missing required 'itemId'", { instance: message }); + if (!message.hasOwnProperty("earned")) + throw $util.ProtocolError("missing required 'earned'", { instance: message }); + return message; + }; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSquare.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScratchSquare message. + * @function verify + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScratchSquare.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.category) { + default: + return "category: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + case 10: + case 12: + case 14: + case 15: + case 16: + case 17: + case 19: + case 22: + case 24: + case 25: + case 26: + case 27: + case 28: + case 201: + case 202: + case 203: + case 300: + case 301: + break; + } + if (!$util.isInteger(message.itemId)) + return "itemId: integer expected"; + if (typeof message.earned !== "boolean") + return "earned: boolean expected"; + return null; + }; + + /** + * Creates a ScratchSquare message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare + */ + ScratchSquare.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ScratchSheet.ScratchSquare) + return object; + let message = new $root.wm.protobuf.ScratchSheet.ScratchSquare(); + switch (object.category) { + case "CAT_CUSTOM_COLOR": + case 1: + message.category = 1; + break; + case "CAT_WHEEL": + case 2: + message.category = 2; + break; + case "CAT_AERO": + case 3: + message.category = 3; + break; + case "CAT_BONNET": + case 4: + message.category = 4; + break; + case "CAT_WING": + case 5: + message.category = 5; + break; + case "CAT_MIRROR": + case 6: + message.category = 6; + break; + case "CAT_NEON": + case 8: + message.category = 8; + break; + case "CAT_TRUNK": + case 9: + message.category = 9; + break; + case "CAT_NUMBER_PLATE": + case 10: + message.category = 10; + break; + case "CAT_GT_WING": + case 12: + message.category = 12; + break; + case "CAT_AURA_MOTIF": + case 14: + message.category = 14; + break; + case "CAT_METER": + case 15: + message.category = 15; + break; + case "CAT_BGM": + case 16: + message.category = 16; + break; + case "CAT_NAME_PLATE": + case 17: + message.category = 17; + break; + case "CAT_NUMBER": + case 19: + message.category = 19; + break; + case "CAT_BGM_TRACK": + case 22: + message.category = 22; + break; + case "CAT_WINDOW_STICKER_FONT": + case 24: + message.category = 24; + break; + case "CAT_WINDOW_DECORATION": + case 25: + message.category = 25; + break; + case "CAT_RIVAL_MARKER": + case 26: + message.category = 26; + break; + case "CAT_STAMP": + case 27: + message.category = 27; + break; + case "CAT_TERMINAL_BACKGROUND": + case 28: + message.category = 28; + break; + case "CAT_CAR_TICKET": + case 201: + message.category = 201; + break; + case "CAT_CONSUMPTION_ITEM": + case 202: + message.category = 202; + break; + case "CAT_CAR_TICKET_FREE": + case 203: + message.category = 203; + break; + case "CAT_AERO_FULLSET": + case 300: + message.category = 300; + break; + case "CAT_AERO_LIMITED": + case 301: + message.category = 301; + break; + } + if (object.itemId != null) + message.itemId = object.itemId >>> 0; + if (object.earned != null) + message.earned = Boolean(object.earned); + return message; + }; + + /** + * Creates a plain object from a ScratchSquare message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.ScratchSquare} message ScratchSquare + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScratchSquare.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.category = options.enums === String ? "CAT_CUSTOM_COLOR" : 1; + object.itemId = 0; + object.earned = false; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.wm.protobuf.ItemCategory[message.category] : message.category; + if (message.itemId != null && message.hasOwnProperty("itemId")) + object.itemId = message.itemId; + if (message.earned != null && message.hasOwnProperty("earned")) + object.earned = message.earned; + return object; + }; + + /** + * Converts this ScratchSquare to JSON. + * @function toJSON + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + * @returns {Object.} JSON object + */ + ScratchSquare.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScratchSquare + * @function getTypeUrl + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScratchSquare.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ScratchSheet.ScratchSquare"; + }; + + return ScratchSquare; + })(); + + return ScratchSheet; + })(); + + protobuf.UserItem = (function() { + + /** + * Properties of a UserItem. + * @memberof wm.protobuf + * @interface IUserItem + * @property {wm.protobuf.ItemCategory} category UserItem category + * @property {number} itemId UserItem itemId + * @property {number|null} [userItemId] UserItem userItemId + * @property {number|null} [earnedAt] UserItem earnedAt + * @property {number|null} [expireAt] UserItem expireAt + */ + + /** + * Constructs a new UserItem. + * @memberof wm.protobuf + * @classdesc Represents a UserItem. + * @implements IUserItem + * @constructor + * @param {wm.protobuf.IUserItem=} [properties] Properties to set + */ + function UserItem(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserItem category. + * @member {wm.protobuf.ItemCategory} category + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.category = 1; + + /** + * UserItem itemId. + * @member {number} itemId + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.itemId = 0; + + /** + * UserItem userItemId. + * @member {number} userItemId + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.userItemId = 0; + + /** + * UserItem earnedAt. + * @member {number} earnedAt + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.earnedAt = 0; + + /** + * UserItem expireAt. + * @member {number} expireAt + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.expireAt = 0; + + /** + * Creates a new UserItem instance using the specified properties. + * @function create + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.IUserItem=} [properties] Properties to set + * @returns {wm.protobuf.UserItem} UserItem instance + */ + UserItem.create = function create(properties) { + return new UserItem(properties); + }; + + /** + * Encodes the specified UserItem message. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.IUserItem} message UserItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.itemId); + if (message.userItemId != null && Object.hasOwnProperty.call(message, "userItemId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.userItemId); + if (message.earnedAt != null && Object.hasOwnProperty.call(message, "earnedAt")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.earnedAt); + if (message.expireAt != null && Object.hasOwnProperty.call(message, "expireAt")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.expireAt); + return writer; + }; + + /** + * Encodes the specified UserItem message, length delimited. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.IUserItem} message UserItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserItem message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UserItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UserItem} UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UserItem(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.itemId = reader.uint32(); + break; + } + case 3: { + message.userItemId = reader.uint32(); + break; + } + case 4: { + message.earnedAt = reader.uint32(); + break; + } + case 5: { + message.expireAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("category")) + throw $util.ProtocolError("missing required 'category'", { instance: message }); + if (!message.hasOwnProperty("itemId")) + throw $util.ProtocolError("missing required 'itemId'", { instance: message }); + return message; + }; + + /** + * Decodes a UserItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UserItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UserItem} UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserItem message. + * @function verify + * @memberof wm.protobuf.UserItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.category) { + default: + return "category: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + case 10: + case 12: + case 14: + case 15: + case 16: + case 17: + case 19: + case 22: + case 24: + case 25: + case 26: + case 27: + case 28: + case 201: + case 202: + case 203: + case 300: + case 301: + break; + } + if (!$util.isInteger(message.itemId)) + return "itemId: integer expected"; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + if (!$util.isInteger(message.userItemId)) + return "userItemId: integer expected"; + if (message.earnedAt != null && message.hasOwnProperty("earnedAt")) + if (!$util.isInteger(message.earnedAt)) + return "earnedAt: integer expected"; + if (message.expireAt != null && message.hasOwnProperty("expireAt")) + if (!$util.isInteger(message.expireAt)) + return "expireAt: integer expected"; + return null; + }; + + /** + * Creates a UserItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UserItem + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UserItem} UserItem + */ + UserItem.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UserItem) + return object; + let message = new $root.wm.protobuf.UserItem(); + switch (object.category) { + case "CAT_CUSTOM_COLOR": + case 1: + message.category = 1; + break; + case "CAT_WHEEL": + case 2: + message.category = 2; + break; + case "CAT_AERO": + case 3: + message.category = 3; + break; + case "CAT_BONNET": + case 4: + message.category = 4; + break; + case "CAT_WING": + case 5: + message.category = 5; + break; + case "CAT_MIRROR": + case 6: + message.category = 6; + break; + case "CAT_NEON": + case 8: + message.category = 8; + break; + case "CAT_TRUNK": + case 9: + message.category = 9; + break; + case "CAT_NUMBER_PLATE": + case 10: + message.category = 10; + break; + case "CAT_GT_WING": + case 12: + message.category = 12; + break; + case "CAT_AURA_MOTIF": + case 14: + message.category = 14; + break; + case "CAT_METER": + case 15: + message.category = 15; + break; + case "CAT_BGM": + case 16: + message.category = 16; + break; + case "CAT_NAME_PLATE": + case 17: + message.category = 17; + break; + case "CAT_NUMBER": + case 19: + message.category = 19; + break; + case "CAT_BGM_TRACK": + case 22: + message.category = 22; + break; + case "CAT_WINDOW_STICKER_FONT": + case 24: + message.category = 24; + break; + case "CAT_WINDOW_DECORATION": + case 25: + message.category = 25; + break; + case "CAT_RIVAL_MARKER": + case 26: + message.category = 26; + break; + case "CAT_STAMP": + case 27: + message.category = 27; + break; + case "CAT_TERMINAL_BACKGROUND": + case 28: + message.category = 28; + break; + case "CAT_CAR_TICKET": + case 201: + message.category = 201; + break; + case "CAT_CONSUMPTION_ITEM": + case 202: + message.category = 202; + break; + case "CAT_CAR_TICKET_FREE": + case 203: + message.category = 203; + break; + case "CAT_AERO_FULLSET": + case 300: + message.category = 300; + break; + case "CAT_AERO_LIMITED": + case 301: + message.category = 301; + break; + } + if (object.itemId != null) + message.itemId = object.itemId >>> 0; + if (object.userItemId != null) + message.userItemId = object.userItemId >>> 0; + if (object.earnedAt != null) + message.earnedAt = object.earnedAt >>> 0; + if (object.expireAt != null) + message.expireAt = object.expireAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a UserItem message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.UserItem} message UserItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.category = options.enums === String ? "CAT_CUSTOM_COLOR" : 1; + object.itemId = 0; + object.userItemId = 0; + object.earnedAt = 0; + object.expireAt = 0; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.wm.protobuf.ItemCategory[message.category] : message.category; + if (message.itemId != null && message.hasOwnProperty("itemId")) + object.itemId = message.itemId; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + object.userItemId = message.userItemId; + if (message.earnedAt != null && message.hasOwnProperty("earnedAt")) + object.earnedAt = message.earnedAt; + if (message.expireAt != null && message.hasOwnProperty("expireAt")) + object.expireAt = message.expireAt; + return object; + }; + + /** + * Converts this UserItem to JSON. + * @function toJSON + * @memberof wm.protobuf.UserItem + * @instance + * @returns {Object.} JSON object + */ + UserItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserItem + * @function getTypeUrl + * @memberof wm.protobuf.UserItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UserItem"; + }; + + return UserItem; + })(); + + protobuf.InviteFriendCampaignSchedule = (function() { + + /** + * Properties of an InviteFriendCampaignSchedule. + * @memberof wm.protobuf + * @interface IInviteFriendCampaignSchedule + * @property {number} campaignId InviteFriendCampaignSchedule campaignId + * @property {number} startAt InviteFriendCampaignSchedule startAt + * @property {number} endAt InviteFriendCampaignSchedule endAt + * @property {number} couponUnreceivableAt InviteFriendCampaignSchedule couponUnreceivableAt + */ + + /** + * Constructs a new InviteFriendCampaignSchedule. + * @memberof wm.protobuf + * @classdesc Represents an InviteFriendCampaignSchedule. + * @implements IInviteFriendCampaignSchedule + * @constructor + * @param {wm.protobuf.IInviteFriendCampaignSchedule=} [properties] Properties to set + */ + function InviteFriendCampaignSchedule(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InviteFriendCampaignSchedule campaignId. + * @member {number} campaignId + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.campaignId = 0; + + /** + * InviteFriendCampaignSchedule startAt. + * @member {number} startAt + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.startAt = 0; + + /** + * InviteFriendCampaignSchedule endAt. + * @member {number} endAt + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.endAt = 0; + + /** + * InviteFriendCampaignSchedule couponUnreceivableAt. + * @member {number} couponUnreceivableAt + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.couponUnreceivableAt = 0; + + /** + * Creates a new InviteFriendCampaignSchedule instance using the specified properties. + * @function create + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.IInviteFriendCampaignSchedule=} [properties] Properties to set + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule instance + */ + InviteFriendCampaignSchedule.create = function create(properties) { + return new InviteFriendCampaignSchedule(properties); + }; + + /** + * Encodes the specified InviteFriendCampaignSchedule message. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.IInviteFriendCampaignSchedule} message InviteFriendCampaignSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InviteFriendCampaignSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.campaignId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.startAt); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.endAt); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.couponUnreceivableAt); + return writer; + }; + + /** + * Encodes the specified InviteFriendCampaignSchedule message, length delimited. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.IInviteFriendCampaignSchedule} message InviteFriendCampaignSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InviteFriendCampaignSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InviteFriendCampaignSchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.InviteFriendCampaignSchedule(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.campaignId = reader.uint32(); + break; + } + case 2: { + message.startAt = reader.uint32(); + break; + } + case 3: { + message.endAt = reader.uint32(); + break; + } + case 4: { + message.couponUnreceivableAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("campaignId")) + throw $util.ProtocolError("missing required 'campaignId'", { instance: message }); + if (!message.hasOwnProperty("startAt")) + throw $util.ProtocolError("missing required 'startAt'", { instance: message }); + if (!message.hasOwnProperty("endAt")) + throw $util.ProtocolError("missing required 'endAt'", { instance: message }); + if (!message.hasOwnProperty("couponUnreceivableAt")) + throw $util.ProtocolError("missing required 'couponUnreceivableAt'", { instance: message }); + return message; + }; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InviteFriendCampaignSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InviteFriendCampaignSchedule message. + * @function verify + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InviteFriendCampaignSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.campaignId)) + return "campaignId: integer expected"; + if (!$util.isInteger(message.startAt)) + return "startAt: integer expected"; + if (!$util.isInteger(message.endAt)) + return "endAt: integer expected"; + if (!$util.isInteger(message.couponUnreceivableAt)) + return "couponUnreceivableAt: integer expected"; + return null; + }; + + /** + * Creates an InviteFriendCampaignSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule + */ + InviteFriendCampaignSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.InviteFriendCampaignSchedule) + return object; + let message = new $root.wm.protobuf.InviteFriendCampaignSchedule(); + if (object.campaignId != null) + message.campaignId = object.campaignId >>> 0; + if (object.startAt != null) + message.startAt = object.startAt >>> 0; + if (object.endAt != null) + message.endAt = object.endAt >>> 0; + if (object.couponUnreceivableAt != null) + message.couponUnreceivableAt = object.couponUnreceivableAt >>> 0; + return message; + }; + + /** + * Creates a plain object from an InviteFriendCampaignSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.InviteFriendCampaignSchedule} message InviteFriendCampaignSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InviteFriendCampaignSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.campaignId = 0; + object.startAt = 0; + object.endAt = 0; + object.couponUnreceivableAt = 0; + } + if (message.campaignId != null && message.hasOwnProperty("campaignId")) + object.campaignId = message.campaignId; + if (message.startAt != null && message.hasOwnProperty("startAt")) + object.startAt = message.startAt; + if (message.endAt != null && message.hasOwnProperty("endAt")) + object.endAt = message.endAt; + if (message.couponUnreceivableAt != null && message.hasOwnProperty("couponUnreceivableAt")) + object.couponUnreceivableAt = message.couponUnreceivableAt; + return object; + }; + + /** + * Converts this InviteFriendCampaignSchedule to JSON. + * @function toJSON + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + * @returns {Object.} JSON object + */ + InviteFriendCampaignSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InviteFriendCampaignSchedule + * @function getTypeUrl + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InviteFriendCampaignSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.InviteFriendCampaignSchedule"; + }; + + return InviteFriendCampaignSchedule; + })(); + + protobuf.CarTuning = (function() { + + /** + * Properties of a CarTuning. + * @memberof wm.protobuf + * @interface ICarTuning + * @property {number} carId CarTuning carId + * @property {number} tunePower CarTuning tunePower + * @property {number} tuneHandling CarTuning tuneHandling + * @property {number|null} [lastPlayedAt] CarTuning lastPlayedAt + */ + + /** + * Constructs a new CarTuning. + * @memberof wm.protobuf + * @classdesc Represents a CarTuning. + * @implements ICarTuning + * @constructor + * @param {wm.protobuf.ICarTuning=} [properties] Properties to set + */ + function CarTuning(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarTuning carId. + * @member {number} carId + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.carId = 0; + + /** + * CarTuning tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.tunePower = 0; + + /** + * CarTuning tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.tuneHandling = 0; + + /** + * CarTuning lastPlayedAt. + * @member {number} lastPlayedAt + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.lastPlayedAt = 0; + + /** + * Creates a new CarTuning instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.ICarTuning=} [properties] Properties to set + * @returns {wm.protobuf.CarTuning} CarTuning instance + */ + CarTuning.create = function create(properties) { + return new CarTuning(properties); + }; + + /** + * Encodes the specified CarTuning message. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.ICarTuning} message CarTuning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tunePower); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuneHandling); + if (message.lastPlayedAt != null && Object.hasOwnProperty.call(message, "lastPlayedAt")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.lastPlayedAt); + return writer; + }; + + /** + * Encodes the specified CarTuning message, length delimited. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.ICarTuning} message CarTuning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarTuning message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarTuning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarTuning} CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarTuning(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.tunePower = reader.uint32(); + break; + } + case 3: { + message.tuneHandling = reader.uint32(); + break; + } + case 4: { + message.lastPlayedAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes a CarTuning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarTuning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarTuning} CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarTuning message. + * @function verify + * @memberof wm.protobuf.CarTuning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarTuning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + if (!$util.isInteger(message.lastPlayedAt)) + return "lastPlayedAt: integer expected"; + return null; + }; + + /** + * Creates a CarTuning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarTuning + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarTuning} CarTuning + */ + CarTuning.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarTuning) + return object; + let message = new $root.wm.protobuf.CarTuning(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.lastPlayedAt != null) + message.lastPlayedAt = object.lastPlayedAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarTuning message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.CarTuning} message CarTuning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarTuning.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.lastPlayedAt = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + object.lastPlayedAt = message.lastPlayedAt; + return object; + }; + + /** + * Converts this CarTuning to JSON. + * @function toJSON + * @memberof wm.protobuf.CarTuning + * @instance + * @returns {Object.} JSON object + */ + CarTuning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarTuning + * @function getTypeUrl + * @memberof wm.protobuf.CarTuning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarTuning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarTuning"; + }; + + return CarTuning; + })(); + + protobuf.BinaryData = (function() { + + /** + * Properties of a BinaryData. + * @memberof wm.protobuf + * @interface IBinaryData + * @property {Uint8Array} data BinaryData data + * @property {number} mergeSerial BinaryData mergeSerial + */ + + /** + * Constructs a new BinaryData. + * @memberof wm.protobuf + * @classdesc Represents a BinaryData. + * @implements IBinaryData + * @constructor + * @param {wm.protobuf.IBinaryData=} [properties] Properties to set + */ + function BinaryData(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BinaryData data. + * @member {Uint8Array} data + * @memberof wm.protobuf.BinaryData + * @instance + */ + BinaryData.prototype.data = $util.newBuffer([]); + + /** + * BinaryData mergeSerial. + * @member {number} mergeSerial + * @memberof wm.protobuf.BinaryData + * @instance + */ + BinaryData.prototype.mergeSerial = 0; + + /** + * Creates a new BinaryData instance using the specified properties. + * @function create + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.IBinaryData=} [properties] Properties to set + * @returns {wm.protobuf.BinaryData} BinaryData instance + */ + BinaryData.create = function create(properties) { + return new BinaryData(properties); + }; + + /** + * Encodes the specified BinaryData message. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.IBinaryData} message BinaryData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + writer.uint32(/* id 2, wireType 0 =*/16).sint32(message.mergeSerial); + return writer; + }; + + /** + * Encodes the specified BinaryData message, length delimited. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.IBinaryData} message BinaryData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BinaryData message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.BinaryData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.BinaryData} BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.BinaryData(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.data = reader.bytes(); + break; + } + case 2: { + message.mergeSerial = reader.sint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("data")) + throw $util.ProtocolError("missing required 'data'", { instance: message }); + if (!message.hasOwnProperty("mergeSerial")) + throw $util.ProtocolError("missing required 'mergeSerial'", { instance: message }); + return message; + }; + + /** + * Decodes a BinaryData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.BinaryData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.BinaryData} BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BinaryData message. + * @function verify + * @memberof wm.protobuf.BinaryData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BinaryData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (!$util.isInteger(message.mergeSerial)) + return "mergeSerial: integer expected"; + return null; + }; + + /** + * Creates a BinaryData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.BinaryData + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.BinaryData} BinaryData + */ + BinaryData.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.BinaryData) + return object; + let message = new $root.wm.protobuf.BinaryData(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + if (object.mergeSerial != null) + message.mergeSerial = object.mergeSerial | 0; + return message; + }; + + /** + * Creates a plain object from a BinaryData message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.BinaryData} message BinaryData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BinaryData.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.mergeSerial = 0; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.mergeSerial != null && message.hasOwnProperty("mergeSerial")) + object.mergeSerial = message.mergeSerial; + return object; + }; + + /** + * Converts this BinaryData to JSON. + * @function toJSON + * @memberof wm.protobuf.BinaryData + * @instance + * @returns {Object.} JSON object + */ + BinaryData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BinaryData + * @function getTypeUrl + * @memberof wm.protobuf.BinaryData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BinaryData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.BinaryData"; + }; + + return BinaryData; + })(); + + protobuf.GhostTrail = (function() { + + /** + * Properties of a GhostTrail. + * @memberof wm.protobuf + * @interface IGhostTrail + * @property {number} carId GhostTrail carId + * @property {number} area GhostTrail area + * @property {number} ramp GhostTrail ramp + * @property {number} path GhostTrail path + * @property {number} playedAt GhostTrail playedAt + * @property {wm.protobuf.IPlace|null} [playedPlace] GhostTrail playedPlace + * @property {Uint8Array} trail GhostTrail trail + */ + + /** + * Constructs a new GhostTrail. + * @memberof wm.protobuf + * @classdesc Represents a GhostTrail. + * @implements IGhostTrail + * @constructor + * @param {wm.protobuf.IGhostTrail=} [properties] Properties to set + */ + function GhostTrail(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostTrail carId. + * @member {number} carId + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.carId = 0; + + /** + * GhostTrail area. + * @member {number} area + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.area = 0; + + /** + * GhostTrail ramp. + * @member {number} ramp + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.ramp = 0; + + /** + * GhostTrail path. + * @member {number} path + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.path = 0; + + /** + * GhostTrail playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.playedAt = 0; + + /** + * GhostTrail playedPlace. + * @member {wm.protobuf.IPlace|null|undefined} playedPlace + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.playedPlace = null; + + /** + * GhostTrail trail. + * @member {Uint8Array} trail + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.trail = $util.newBuffer([]); + + /** + * Creates a new GhostTrail instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.IGhostTrail=} [properties] Properties to set + * @returns {wm.protobuf.GhostTrail} GhostTrail instance + */ + GhostTrail.create = function create(properties) { + return new GhostTrail(properties); + }; + + /** + * Encodes the specified GhostTrail message. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.IGhostTrail} message GhostTrail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostTrail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.area); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.ramp); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.playedAt); + if (message.playedPlace != null && Object.hasOwnProperty.call(message, "playedPlace")) + $root.wm.protobuf.Place.encode(message.playedPlace, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.trail); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.path); + return writer; + }; + + /** + * Encodes the specified GhostTrail message, length delimited. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.IGhostTrail} message GhostTrail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostTrail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostTrail message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostTrail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostTrail} GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostTrail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostTrail(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.area = reader.uint32(); + break; + } + case 3: { + message.ramp = reader.uint32(); + break; + } + case 7: { + message.path = reader.uint32(); + break; + } + case 4: { + message.playedAt = reader.uint32(); + break; + } + case 5: { + message.playedPlace = $root.wm.protobuf.Place.decode(reader, reader.uint32()); + break; + } + case 6: { + message.trail = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("ramp")) + throw $util.ProtocolError("missing required 'ramp'", { instance: message }); + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + if (!message.hasOwnProperty("trail")) + throw $util.ProtocolError("missing required 'trail'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostTrail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostTrail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostTrail} GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostTrail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostTrail message. + * @function verify + * @memberof wm.protobuf.GhostTrail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostTrail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (message.playedPlace != null && message.hasOwnProperty("playedPlace")) { + let error = $root.wm.protobuf.Place.verify(message.playedPlace); + if (error) + return "playedPlace." + error; + } + if (!(message.trail && typeof message.trail.length === "number" || $util.isString(message.trail))) + return "trail: buffer expected"; + return null; + }; + + /** + * Creates a GhostTrail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostTrail + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostTrail} GhostTrail + */ + GhostTrail.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostTrail) + return object; + let message = new $root.wm.protobuf.GhostTrail(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.playedPlace != null) { + if (typeof object.playedPlace !== "object") + throw TypeError(".wm.protobuf.GhostTrail.playedPlace: object expected"); + message.playedPlace = $root.wm.protobuf.Place.fromObject(object.playedPlace); + } + if (object.trail != null) + if (typeof object.trail === "string") + $util.base64.decode(object.trail, message.trail = $util.newBuffer($util.base64.length(object.trail)), 0); + else if (object.trail.length >= 0) + message.trail = object.trail; + return message; + }; + + /** + * Creates a plain object from a GhostTrail message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.GhostTrail} message GhostTrail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostTrail.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.area = 0; + object.ramp = 0; + object.playedAt = 0; + object.playedPlace = null; + if (options.bytes === String) + object.trail = ""; + else { + object.trail = []; + if (options.bytes !== Array) + object.trail = $util.newBuffer(object.trail); + } + object.path = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.playedPlace != null && message.hasOwnProperty("playedPlace")) + object.playedPlace = $root.wm.protobuf.Place.toObject(message.playedPlace, options); + if (message.trail != null && message.hasOwnProperty("trail")) + object.trail = options.bytes === String ? $util.base64.encode(message.trail, 0, message.trail.length) : options.bytes === Array ? Array.prototype.slice.call(message.trail) : message.trail; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this GhostTrail to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostTrail + * @instance + * @returns {Object.} JSON object + */ + GhostTrail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostTrail + * @function getTypeUrl + * @memberof wm.protobuf.GhostTrail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostTrail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostTrail"; + }; + + return GhostTrail; + })(); + + protobuf.PlaceList = (function() { + + /** + * Properties of a PlaceList. + * @memberof wm.protobuf + * @interface IPlaceList + * @property {Array.|null} [places] PlaceList places + */ + + /** + * Constructs a new PlaceList. + * @memberof wm.protobuf + * @classdesc Represents a PlaceList. + * @implements IPlaceList + * @constructor + * @param {wm.protobuf.IPlaceList=} [properties] Properties to set + */ + function PlaceList(properties) { + this.places = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlaceList places. + * @member {Array.} places + * @memberof wm.protobuf.PlaceList + * @instance + */ + PlaceList.prototype.places = $util.emptyArray; + + /** + * Creates a new PlaceList instance using the specified properties. + * @function create + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.IPlaceList=} [properties] Properties to set + * @returns {wm.protobuf.PlaceList} PlaceList instance + */ + PlaceList.create = function create(properties) { + return new PlaceList(properties); + }; + + /** + * Encodes the specified PlaceList message. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.IPlaceList} message PlaceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.places != null && message.places.length) + for (let i = 0; i < message.places.length; ++i) + $root.wm.protobuf.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PlaceList message, length delimited. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.IPlaceList} message PlaceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlaceList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PlaceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PlaceList} PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PlaceList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.places && message.places.length)) + message.places = []; + message.places.push($root.wm.protobuf.Place.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlaceList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PlaceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PlaceList} PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlaceList message. + * @function verify + * @memberof wm.protobuf.PlaceList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlaceList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.places != null && message.hasOwnProperty("places")) { + if (!Array.isArray(message.places)) + return "places: array expected"; + for (let i = 0; i < message.places.length; ++i) { + let error = $root.wm.protobuf.Place.verify(message.places[i]); + if (error) + return "places." + error; + } + } + return null; + }; + + /** + * Creates a PlaceList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PlaceList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PlaceList} PlaceList + */ + PlaceList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PlaceList) + return object; + let message = new $root.wm.protobuf.PlaceList(); + if (object.places) { + if (!Array.isArray(object.places)) + throw TypeError(".wm.protobuf.PlaceList.places: array expected"); + message.places = []; + for (let i = 0; i < object.places.length; ++i) { + if (typeof object.places[i] !== "object") + throw TypeError(".wm.protobuf.PlaceList.places: object expected"); + message.places[i] = $root.wm.protobuf.Place.fromObject(object.places[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PlaceList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.PlaceList} message PlaceList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlaceList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.places = []; + if (message.places && message.places.length) { + object.places = []; + for (let j = 0; j < message.places.length; ++j) + object.places[j] = $root.wm.protobuf.Place.toObject(message.places[j], options); + } + return object; + }; + + /** + * Converts this PlaceList to JSON. + * @function toJSON + * @memberof wm.protobuf.PlaceList + * @instance + * @returns {Object.} JSON object + */ + PlaceList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlaceList + * @function getTypeUrl + * @memberof wm.protobuf.PlaceList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaceList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PlaceList"; + }; + + return PlaceList; + })(); + + protobuf.GhostList = (function() { + + /** + * Properties of a GhostList. + * @memberof wm.protobuf + * @interface IGhostList + * @property {Array.|null} [ghosts] GhostList ghosts + */ + + /** + * Constructs a new GhostList. + * @memberof wm.protobuf + * @classdesc Represents a GhostList. + * @implements IGhostList + * @constructor + * @param {wm.protobuf.IGhostList=} [properties] Properties to set + */ + function GhostList(properties) { + this.ghosts = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostList ghosts. + * @member {Array.} ghosts + * @memberof wm.protobuf.GhostList + * @instance + */ + GhostList.prototype.ghosts = $util.emptyArray; + + /** + * Creates a new GhostList instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.IGhostList=} [properties] Properties to set + * @returns {wm.protobuf.GhostList} GhostList instance + */ + GhostList.create = function create(properties) { + return new GhostList(properties); + }; + + /** + * Encodes the specified GhostList message. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.IGhostList} message GhostList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ghosts != null && message.ghosts.length) + for (let i = 0; i < message.ghosts.length; ++i) + $root.wm.protobuf.GhostCar.encode(message.ghosts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostList message, length delimited. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.IGhostList} message GhostList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostList} GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.ghosts && message.ghosts.length)) + message.ghosts = []; + message.ghosts.push($root.wm.protobuf.GhostCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GhostList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostList} GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostList message. + * @function verify + * @memberof wm.protobuf.GhostList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ghosts != null && message.hasOwnProperty("ghosts")) { + if (!Array.isArray(message.ghosts)) + return "ghosts: array expected"; + for (let i = 0; i < message.ghosts.length; ++i) { + let error = $root.wm.protobuf.GhostCar.verify(message.ghosts[i]); + if (error) + return "ghosts." + error; + } + } + return null; + }; + + /** + * Creates a GhostList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostList} GhostList + */ + GhostList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostList) + return object; + let message = new $root.wm.protobuf.GhostList(); + if (object.ghosts) { + if (!Array.isArray(object.ghosts)) + throw TypeError(".wm.protobuf.GhostList.ghosts: array expected"); + message.ghosts = []; + for (let i = 0; i < object.ghosts.length; ++i) { + if (typeof object.ghosts[i] !== "object") + throw TypeError(".wm.protobuf.GhostList.ghosts: object expected"); + message.ghosts[i] = $root.wm.protobuf.GhostCar.fromObject(object.ghosts[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GhostList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.GhostList} message GhostList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.ghosts = []; + if (message.ghosts && message.ghosts.length) { + object.ghosts = []; + for (let j = 0; j < message.ghosts.length; ++j) + object.ghosts[j] = $root.wm.protobuf.GhostCar.toObject(message.ghosts[j], options); + } + return object; + }; + + /** + * Converts this GhostList to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostList + * @instance + * @returns {Object.} JSON object + */ + GhostList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostList + * @function getTypeUrl + * @memberof wm.protobuf.GhostList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostList"; + }; + + return GhostList; + })(); + + protobuf.CarSummary = (function() { + + /** + * Properties of a CarSummary. + * @memberof wm.protobuf + * @interface ICarSummary + * @property {number} hitCount CarSummary hitCount + * @property {Array.|null} [cars] CarSummary cars + */ + + /** + * Constructs a new CarSummary. + * @memberof wm.protobuf + * @classdesc Represents a CarSummary. + * @implements ICarSummary + * @constructor + * @param {wm.protobuf.ICarSummary=} [properties] Properties to set + */ + function CarSummary(properties) { + this.cars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarSummary hitCount. + * @member {number} hitCount + * @memberof wm.protobuf.CarSummary + * @instance + */ + CarSummary.prototype.hitCount = 0; + + /** + * CarSummary cars. + * @member {Array.} cars + * @memberof wm.protobuf.CarSummary + * @instance + */ + CarSummary.prototype.cars = $util.emptyArray; + + /** + * Creates a new CarSummary instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.ICarSummary=} [properties] Properties to set + * @returns {wm.protobuf.CarSummary} CarSummary instance + */ + CarSummary.create = function create(properties) { + return new CarSummary(properties); + }; + + /** + * Encodes the specified CarSummary message. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.ICarSummary} message CarSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.hitCount); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.Car.encode(message.cars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CarSummary message, length delimited. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.ICarSummary} message CarSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarSummary message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarSummary} CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarSummary(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hitCount = reader.uint32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("hitCount")) + throw $util.ProtocolError("missing required 'hitCount'", { instance: message }); + return message; + }; + + /** + * Decodes a CarSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarSummary} CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarSummary message. + * @function verify + * @memberof wm.protobuf.CarSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.hitCount)) + return "hitCount: integer expected"; + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + return null; + }; + + /** + * Creates a CarSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarSummary + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarSummary} CarSummary + */ + CarSummary.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarSummary) + return object; + let message = new $root.wm.protobuf.CarSummary(); + if (object.hitCount != null) + message.hitCount = object.hitCount >>> 0; + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.CarSummary.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.CarSummary.cars: object expected"); + message.cars[i] = $root.wm.protobuf.Car.fromObject(object.cars[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CarSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.CarSummary} message CarSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cars = []; + if (options.defaults) + object.hitCount = 0; + if (message.hitCount != null && message.hasOwnProperty("hitCount")) + object.hitCount = message.hitCount; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.Car.toObject(message.cars[j], options); + } + return object; + }; + + /** + * Converts this CarSummary to JSON. + * @function toJSON + * @memberof wm.protobuf.CarSummary + * @instance + * @returns {Object.} JSON object + */ + CarSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarSummary + * @function getTypeUrl + * @memberof wm.protobuf.CarSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarSummary"; + }; + + return CarSummary; + })(); + + protobuf.FileList = (function() { + + /** + * Properties of a FileList. + * @memberof wm.protobuf + * @interface IFileList + * @property {Array.|null} [files] FileList files + * @property {number|null} [interval] FileList interval + */ + + /** + * Constructs a new FileList. + * @memberof wm.protobuf + * @classdesc Represents a FileList. + * @implements IFileList + * @constructor + * @param {wm.protobuf.IFileList=} [properties] Properties to set + */ + function FileList(properties) { + this.files = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileList files. + * @member {Array.} files + * @memberof wm.protobuf.FileList + * @instance + */ + FileList.prototype.files = $util.emptyArray; + + /** + * FileList interval. + * @member {number} interval + * @memberof wm.protobuf.FileList + * @instance + */ + FileList.prototype.interval = 0; + + /** + * Creates a new FileList instance using the specified properties. + * @function create + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.IFileList=} [properties] Properties to set + * @returns {wm.protobuf.FileList} FileList instance + */ + FileList.create = function create(properties) { + return new FileList(properties); + }; + + /** + * Encodes the specified FileList message. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.IFileList} message FileList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.files != null && message.files.length) + for (let i = 0; i < message.files.length; ++i) + $root.wm.protobuf.FileList.FileInfo.encode(message.files[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.interval); + return writer; + }; + + /** + * Encodes the specified FileList message, length delimited. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.IFileList} message FileList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.FileList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.FileList} FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.FileList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.files && message.files.length)) + message.files = []; + message.files.push($root.wm.protobuf.FileList.FileInfo.decode(reader, reader.uint32())); + break; + } + case 2: { + message.interval = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.FileList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.FileList} FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileList message. + * @function verify + * @memberof wm.protobuf.FileList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.files != null && message.hasOwnProperty("files")) { + if (!Array.isArray(message.files)) + return "files: array expected"; + for (let i = 0; i < message.files.length; ++i) { + let error = $root.wm.protobuf.FileList.FileInfo.verify(message.files[i]); + if (error) + return "files." + error; + } + } + if (message.interval != null && message.hasOwnProperty("interval")) + if (!$util.isInteger(message.interval)) + return "interval: integer expected"; + return null; + }; + + /** + * Creates a FileList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.FileList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.FileList} FileList + */ + FileList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.FileList) + return object; + let message = new $root.wm.protobuf.FileList(); + if (object.files) { + if (!Array.isArray(object.files)) + throw TypeError(".wm.protobuf.FileList.files: array expected"); + message.files = []; + for (let i = 0; i < object.files.length; ++i) { + if (typeof object.files[i] !== "object") + throw TypeError(".wm.protobuf.FileList.files: object expected"); + message.files[i] = $root.wm.protobuf.FileList.FileInfo.fromObject(object.files[i]); + } + } + if (object.interval != null) + message.interval = object.interval >>> 0; + return message; + }; + + /** + * Creates a plain object from a FileList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.FileList} message FileList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.files = []; + if (options.defaults) + object.interval = 0; + if (message.files && message.files.length) { + object.files = []; + for (let j = 0; j < message.files.length; ++j) + object.files[j] = $root.wm.protobuf.FileList.FileInfo.toObject(message.files[j], options); + } + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = message.interval; + return object; + }; + + /** + * Converts this FileList to JSON. + * @function toJSON + * @memberof wm.protobuf.FileList + * @instance + * @returns {Object.} JSON object + */ + FileList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileList + * @function getTypeUrl + * @memberof wm.protobuf.FileList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.FileList"; + }; + + FileList.FileInfo = (function() { + + /** + * Properties of a FileInfo. + * @memberof wm.protobuf.FileList + * @interface IFileInfo + * @property {number} fileId FileInfo fileId + * @property {wm.protobuf.FileType} fileType FileInfo fileType + * @property {number} fileSize FileInfo fileSize + * @property {string} url FileInfo url + * @property {Uint8Array} sha1sum FileInfo sha1sum + * @property {number} notBefore FileInfo notBefore + * @property {number} notAfter FileInfo notAfter + */ + + /** + * Constructs a new FileInfo. + * @memberof wm.protobuf.FileList + * @classdesc Represents a FileInfo. + * @implements IFileInfo + * @constructor + * @param {wm.protobuf.FileList.IFileInfo=} [properties] Properties to set + */ + function FileInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileInfo fileId. + * @member {number} fileId + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.fileId = 0; + + /** + * FileInfo fileType. + * @member {wm.protobuf.FileType} fileType + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.fileType = 1; + + /** + * FileInfo fileSize. + * @member {number} fileSize + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.fileSize = 0; + + /** + * FileInfo url. + * @member {string} url + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.url = ""; + + /** + * FileInfo sha1sum. + * @member {Uint8Array} sha1sum + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.sha1sum = $util.newBuffer([]); + + /** + * FileInfo notBefore. + * @member {number} notBefore + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.notBefore = 0; + + /** + * FileInfo notAfter. + * @member {number} notAfter + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.notAfter = 0; + + /** + * Creates a new FileInfo instance using the specified properties. + * @function create + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.IFileInfo=} [properties] Properties to set + * @returns {wm.protobuf.FileList.FileInfo} FileInfo instance + */ + FileInfo.create = function create(properties) { + return new FileInfo(properties); + }; + + /** + * Encodes the specified FileInfo message. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.IFileInfo} message FileInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.fileId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.fileType); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.fileSize); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.url); + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.sha1sum); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.notBefore); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.notAfter); + return writer; + }; + + /** + * Encodes the specified FileInfo message, length delimited. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.IFileInfo} message FileInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileInfo message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.FileList.FileInfo} FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.FileList.FileInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fileId = reader.uint32(); + break; + } + case 2: { + message.fileType = reader.int32(); + break; + } + case 3: { + message.fileSize = reader.uint32(); + break; + } + case 4: { + message.url = reader.string(); + break; + } + case 5: { + message.sha1sum = reader.bytes(); + break; + } + case 6: { + message.notBefore = reader.uint32(); + break; + } + case 7: { + message.notAfter = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("fileId")) + throw $util.ProtocolError("missing required 'fileId'", { instance: message }); + if (!message.hasOwnProperty("fileType")) + throw $util.ProtocolError("missing required 'fileType'", { instance: message }); + if (!message.hasOwnProperty("fileSize")) + throw $util.ProtocolError("missing required 'fileSize'", { instance: message }); + if (!message.hasOwnProperty("url")) + throw $util.ProtocolError("missing required 'url'", { instance: message }); + if (!message.hasOwnProperty("sha1sum")) + throw $util.ProtocolError("missing required 'sha1sum'", { instance: message }); + if (!message.hasOwnProperty("notBefore")) + throw $util.ProtocolError("missing required 'notBefore'", { instance: message }); + if (!message.hasOwnProperty("notAfter")) + throw $util.ProtocolError("missing required 'notAfter'", { instance: message }); + return message; + }; + + /** + * Decodes a FileInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.FileList.FileInfo} FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileInfo message. + * @function verify + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.fileId)) + return "fileId: integer expected"; + switch (message.fileType) { + default: + return "fileType: enum value expected"; + case 1: + case 4: + case 6: + break; + } + if (!$util.isInteger(message.fileSize)) + return "fileSize: integer expected"; + if (!$util.isString(message.url)) + return "url: string expected"; + if (!(message.sha1sum && typeof message.sha1sum.length === "number" || $util.isString(message.sha1sum))) + return "sha1sum: buffer expected"; + if (!$util.isInteger(message.notBefore)) + return "notBefore: integer expected"; + if (!$util.isInteger(message.notAfter)) + return "notAfter: integer expected"; + return null; + }; + + /** + * Creates a FileInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.FileList.FileInfo} FileInfo + */ + FileInfo.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.FileList.FileInfo) + return object; + let message = new $root.wm.protobuf.FileList.FileInfo(); + if (object.fileId != null) + message.fileId = object.fileId >>> 0; + switch (object.fileType) { + case "FILE_PROMOTION_ANNOUNCEMENT": + case 1: + message.fileType = 1; + break; + case "FILE_FEATURE_ANNOUNCEMENT": + case 4: + message.fileType = 4; + break; + case "FILE_SPAPP_ANNOUNCEMENT": + case 6: + message.fileType = 6; + break; + } + if (object.fileSize != null) + message.fileSize = object.fileSize >>> 0; + if (object.url != null) + message.url = String(object.url); + if (object.sha1sum != null) + if (typeof object.sha1sum === "string") + $util.base64.decode(object.sha1sum, message.sha1sum = $util.newBuffer($util.base64.length(object.sha1sum)), 0); + else if (object.sha1sum.length >= 0) + message.sha1sum = object.sha1sum; + if (object.notBefore != null) + message.notBefore = object.notBefore >>> 0; + if (object.notAfter != null) + message.notAfter = object.notAfter >>> 0; + return message; + }; + + /** + * Creates a plain object from a FileInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.FileInfo} message FileInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.fileId = 0; + object.fileType = options.enums === String ? "FILE_PROMOTION_ANNOUNCEMENT" : 1; + object.fileSize = 0; + object.url = ""; + if (options.bytes === String) + object.sha1sum = ""; + else { + object.sha1sum = []; + if (options.bytes !== Array) + object.sha1sum = $util.newBuffer(object.sha1sum); + } + object.notBefore = 0; + object.notAfter = 0; + } + if (message.fileId != null && message.hasOwnProperty("fileId")) + object.fileId = message.fileId; + if (message.fileType != null && message.hasOwnProperty("fileType")) + object.fileType = options.enums === String ? $root.wm.protobuf.FileType[message.fileType] : message.fileType; + if (message.fileSize != null && message.hasOwnProperty("fileSize")) + object.fileSize = message.fileSize; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.sha1sum != null && message.hasOwnProperty("sha1sum")) + object.sha1sum = options.bytes === String ? $util.base64.encode(message.sha1sum, 0, message.sha1sum.length) : options.bytes === Array ? Array.prototype.slice.call(message.sha1sum) : message.sha1sum; + if (message.notBefore != null && message.hasOwnProperty("notBefore")) + object.notBefore = message.notBefore; + if (message.notAfter != null && message.hasOwnProperty("notAfter")) + object.notAfter = message.notAfter; + return object; + }; + + /** + * Converts this FileInfo to JSON. + * @function toJSON + * @memberof wm.protobuf.FileList.FileInfo + * @instance + * @returns {Object.} JSON object + */ + FileInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileInfo + * @function getTypeUrl + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.FileList.FileInfo"; + }; + + return FileInfo; + })(); + + return FileList; + })(); + + protobuf.GhostCompetitionTarget = (function() { + + /** + * Properties of a GhostCompetitionTarget. + * @memberof wm.protobuf + * @interface IGhostCompetitionTarget + * @property {number} competitionId GhostCompetitionTarget competitionId + * @property {number|null} [specialGhostId] GhostCompetitionTarget specialGhostId + * @property {wm.protobuf.IGhostCar} ghostCar GhostCompetitionTarget ghostCar + * @property {number|Long} trailId GhostCompetitionTarget trailId + * @property {number} updatedAt GhostCompetitionTarget updatedAt + * @property {wm.protobuf.IGhostCompetitionSchedule|null} [competitionSchedule] GhostCompetitionTarget competitionSchedule + */ + + /** + * Constructs a new GhostCompetitionTarget. + * @memberof wm.protobuf + * @classdesc Represents a GhostCompetitionTarget. + * @implements IGhostCompetitionTarget + * @constructor + * @param {wm.protobuf.IGhostCompetitionTarget=} [properties] Properties to set + */ + function GhostCompetitionTarget(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionTarget competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.competitionId = 0; + + /** + * GhostCompetitionTarget specialGhostId. + * @member {number} specialGhostId + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.specialGhostId = 0; + + /** + * GhostCompetitionTarget ghostCar. + * @member {wm.protobuf.IGhostCar} ghostCar + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.ghostCar = null; + + /** + * GhostCompetitionTarget trailId. + * @member {number|Long} trailId + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.trailId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GhostCompetitionTarget updatedAt. + * @member {number} updatedAt + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.updatedAt = 0; + + /** + * GhostCompetitionTarget competitionSchedule. + * @member {wm.protobuf.IGhostCompetitionSchedule|null|undefined} competitionSchedule + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.competitionSchedule = null; + + /** + * Creates a new GhostCompetitionTarget instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.IGhostCompetitionTarget=} [properties] Properties to set + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget instance + */ + GhostCompetitionTarget.create = function create(properties) { + return new GhostCompetitionTarget(properties); + }; + + /** + * Encodes the specified GhostCompetitionTarget message. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.IGhostCompetitionTarget} message GhostCompetitionTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionTarget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.competitionId); + if (message.specialGhostId != null && Object.hasOwnProperty.call(message, "specialGhostId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.specialGhostId); + $root.wm.protobuf.GhostCar.encode(message.ghostCar, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.trailId); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.updatedAt); + if (message.competitionSchedule != null && Object.hasOwnProperty.call(message, "competitionSchedule")) + $root.wm.protobuf.GhostCompetitionSchedule.encode(message.competitionSchedule, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionTarget message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.IGhostCompetitionTarget} message GhostCompetitionTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionTarget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionTarget.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCompetitionTarget(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.competitionId = reader.uint32(); + break; + } + case 2: { + message.specialGhostId = reader.uint32(); + break; + } + case 3: { + message.ghostCar = $root.wm.protobuf.GhostCar.decode(reader, reader.uint32()); + break; + } + case 4: { + message.trailId = reader.uint64(); + break; + } + case 5: { + message.updatedAt = reader.uint32(); + break; + } + case 6: { + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + if (!message.hasOwnProperty("ghostCar")) + throw $util.ProtocolError("missing required 'ghostCar'", { instance: message }); + if (!message.hasOwnProperty("trailId")) + throw $util.ProtocolError("missing required 'trailId'", { instance: message }); + if (!message.hasOwnProperty("updatedAt")) + throw $util.ProtocolError("missing required 'updatedAt'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionTarget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionTarget message. + * @function verify + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionTarget.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + if (message.specialGhostId != null && message.hasOwnProperty("specialGhostId")) + if (!$util.isInteger(message.specialGhostId)) + return "specialGhostId: integer expected"; + { + let error = $root.wm.protobuf.GhostCar.verify(message.ghostCar); + if (error) + return "ghostCar." + error; + } + if (!$util.isInteger(message.trailId) && !(message.trailId && $util.isInteger(message.trailId.low) && $util.isInteger(message.trailId.high))) + return "trailId: integer|Long expected"; + if (!$util.isInteger(message.updatedAt)) + return "updatedAt: integer expected"; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) { + let error = $root.wm.protobuf.GhostCompetitionSchedule.verify(message.competitionSchedule); + if (error) + return "competitionSchedule." + error; + } + return null; + }; + + /** + * Creates a GhostCompetitionTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget + */ + GhostCompetitionTarget.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCompetitionTarget) + return object; + let message = new $root.wm.protobuf.GhostCompetitionTarget(); + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + if (object.specialGhostId != null) + message.specialGhostId = object.specialGhostId >>> 0; + if (object.ghostCar != null) { + if (typeof object.ghostCar !== "object") + throw TypeError(".wm.protobuf.GhostCompetitionTarget.ghostCar: object expected"); + message.ghostCar = $root.wm.protobuf.GhostCar.fromObject(object.ghostCar); + } + if (object.trailId != null) + if ($util.Long) + (message.trailId = $util.Long.fromValue(object.trailId)).unsigned = true; + else if (typeof object.trailId === "string") + message.trailId = parseInt(object.trailId, 10); + else if (typeof object.trailId === "number") + message.trailId = object.trailId; + else if (typeof object.trailId === "object") + message.trailId = new $util.LongBits(object.trailId.low >>> 0, object.trailId.high >>> 0).toNumber(true); + if (object.updatedAt != null) + message.updatedAt = object.updatedAt >>> 0; + if (object.competitionSchedule != null) { + if (typeof object.competitionSchedule !== "object") + throw TypeError(".wm.protobuf.GhostCompetitionTarget.competitionSchedule: object expected"); + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.fromObject(object.competitionSchedule); + } + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.GhostCompetitionTarget} message GhostCompetitionTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionTarget.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.competitionId = 0; + object.specialGhostId = 0; + object.ghostCar = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.trailId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trailId = options.longs === String ? "0" : 0; + object.updatedAt = 0; + object.competitionSchedule = null; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + if (message.specialGhostId != null && message.hasOwnProperty("specialGhostId")) + object.specialGhostId = message.specialGhostId; + if (message.ghostCar != null && message.hasOwnProperty("ghostCar")) + object.ghostCar = $root.wm.protobuf.GhostCar.toObject(message.ghostCar, options); + if (message.trailId != null && message.hasOwnProperty("trailId")) + if (typeof message.trailId === "number") + object.trailId = options.longs === String ? String(message.trailId) : message.trailId; + else + object.trailId = options.longs === String ? $util.Long.prototype.toString.call(message.trailId) : options.longs === Number ? new $util.LongBits(message.trailId.low >>> 0, message.trailId.high >>> 0).toNumber(true) : message.trailId; + if (message.updatedAt != null && message.hasOwnProperty("updatedAt")) + object.updatedAt = message.updatedAt; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) + object.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.toObject(message.competitionSchedule, options); + return object; + }; + + /** + * Converts this GhostCompetitionTarget to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionTarget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionTarget + * @function getTypeUrl + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCompetitionTarget"; + }; + + return GhostCompetitionTarget; + })(); + + /** + * SystemConstant enum. + * @name wm.protobuf.SystemConstant + * @enum {number} + * @property {number} PROTOBUF_MESSAGE_REVISION=8053 PROTOBUF_MESSAGE_REVISION value + */ + protobuf.SystemConstant = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[8053] = "PROTOBUF_MESSAGE_REVISION"] = 8053; + return values; + })(); + + /** + * ErrorCode enum. + * @name wm.protobuf.ErrorCode + * @enum {number} + * @property {number} ERR_SUCCESS=0 ERR_SUCCESS value + * @property {number} ERR_REQUEST=1 ERR_REQUEST value + * @property {number} ERR_NOT_FOUND=2 ERR_NOT_FOUND value + * @property {number} ERR_ID_SERVER=3 ERR_ID_SERVER value + * @property {number} ERR_ID_BANNED=4 ERR_ID_BANNED value + * @property {number} ERR_USER_LOCKED=5 ERR_USER_LOCKED value + * @property {number} ERR_USER_VERSION=6 ERR_USER_VERSION value + * @property {number} ERR_NAME_CONFLICTED=7 ERR_NAME_CONFLICTED value + * @property {number} ERR_FORBIDDEN=9 ERR_FORBIDDEN value + * @property {number} ERR_USER_SUCCEEDED=11 ERR_USER_SUCCEEDED value + * @property {number} ERR_BEING_TRANSFERRED=12 ERR_BEING_TRANSFERRED value + * @property {number} ERR_SCRATCH_LOCKED=13 ERR_SCRATCH_LOCKED value + */ + protobuf.ErrorCode = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ERR_SUCCESS"] = 0; + values[valuesById[1] = "ERR_REQUEST"] = 1; + values[valuesById[2] = "ERR_NOT_FOUND"] = 2; + values[valuesById[3] = "ERR_ID_SERVER"] = 3; + values[valuesById[4] = "ERR_ID_BANNED"] = 4; + values[valuesById[5] = "ERR_USER_LOCKED"] = 5; + values[valuesById[6] = "ERR_USER_VERSION"] = 6; + values[valuesById[7] = "ERR_NAME_CONFLICTED"] = 7; + values[valuesById[9] = "ERR_FORBIDDEN"] = 9; + values[valuesById[11] = "ERR_USER_SUCCEEDED"] = 11; + values[valuesById[12] = "ERR_BEING_TRANSFERRED"] = 12; + values[valuesById[13] = "ERR_SCRATCH_LOCKED"] = 13; + return values; + })(); + + /** + * LineType enum. + * @name wm.protobuf.LineType + * @enum {number} + * @property {number} L_UNKNOWN=0 L_UNKNOWN value + * @property {number} L_MOBILE=1 L_MOBILE value + * @property {number} L_ISDN=2 L_ISDN value + * @property {number} L_BFLETS=3 L_BFLETS value + * @property {number} L_ADSL=4 L_ADSL value + * @property {number} L_WIRED=5 L_WIRED value + */ + protobuf.LineType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "L_UNKNOWN"] = 0; + values[valuesById[1] = "L_MOBILE"] = 1; + values[valuesById[2] = "L_ISDN"] = 2; + values[valuesById[3] = "L_BFLETS"] = 3; + values[valuesById[4] = "L_ADSL"] = 4; + values[valuesById[5] = "L_WIRED"] = 5; + return values; + })(); + + /** + * TerminalType enum. + * @name wm.protobuf.TerminalType + * @enum {number} + * @property {number} T_DRIVE=0 T_DRIVE value + * @property {number} T_TERMINAL=1 T_TERMINAL value + */ + protobuf.TerminalType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "T_DRIVE"] = 0; + values[valuesById[1] = "T_TERMINAL"] = 1; + return values; + })(); + + /** + * DeviceType enum. + * @name wm.protobuf.DeviceType + * @enum {number} + * @property {number} DEVICE_CARD=0 DEVICE_CARD value + * @property {number} DEVICE_PHONE=1 DEVICE_PHONE value + */ + protobuf.DeviceType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEVICE_CARD"] = 0; + values[valuesById[1] = "DEVICE_PHONE"] = 1; + return values; + })(); + + /** + * ItemCategory enum. + * @name wm.protobuf.ItemCategory + * @enum {number} + * @property {number} CAT_CUSTOM_COLOR=1 CAT_CUSTOM_COLOR value + * @property {number} CAT_WHEEL=2 CAT_WHEEL value + * @property {number} CAT_AERO=3 CAT_AERO value + * @property {number} CAT_BONNET=4 CAT_BONNET value + * @property {number} CAT_WING=5 CAT_WING value + * @property {number} CAT_MIRROR=6 CAT_MIRROR value + * @property {number} CAT_NEON=8 CAT_NEON value + * @property {number} CAT_TRUNK=9 CAT_TRUNK value + * @property {number} CAT_NUMBER_PLATE=10 CAT_NUMBER_PLATE value + * @property {number} CAT_GT_WING=12 CAT_GT_WING value + * @property {number} CAT_AURA_MOTIF=14 CAT_AURA_MOTIF value + * @property {number} CAT_METER=15 CAT_METER value + * @property {number} CAT_BGM=16 CAT_BGM value + * @property {number} CAT_NAME_PLATE=17 CAT_NAME_PLATE value + * @property {number} CAT_NUMBER=19 CAT_NUMBER value + * @property {number} CAT_BGM_TRACK=22 CAT_BGM_TRACK value + * @property {number} CAT_WINDOW_STICKER_FONT=24 CAT_WINDOW_STICKER_FONT value + * @property {number} CAT_WINDOW_DECORATION=25 CAT_WINDOW_DECORATION value + * @property {number} CAT_RIVAL_MARKER=26 CAT_RIVAL_MARKER value + * @property {number} CAT_STAMP=27 CAT_STAMP value + * @property {number} CAT_TERMINAL_BACKGROUND=28 CAT_TERMINAL_BACKGROUND value + * @property {number} CAT_CAR_TICKET=201 CAT_CAR_TICKET value + * @property {number} CAT_CONSUMPTION_ITEM=202 CAT_CONSUMPTION_ITEM value + * @property {number} CAT_CAR_TICKET_FREE=203 CAT_CAR_TICKET_FREE value + * @property {number} CAT_AERO_FULLSET=300 CAT_AERO_FULLSET value + * @property {number} CAT_AERO_LIMITED=301 CAT_AERO_LIMITED value + */ + protobuf.ItemCategory = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "CAT_CUSTOM_COLOR"] = 1; + values[valuesById[2] = "CAT_WHEEL"] = 2; + values[valuesById[3] = "CAT_AERO"] = 3; + values[valuesById[4] = "CAT_BONNET"] = 4; + values[valuesById[5] = "CAT_WING"] = 5; + values[valuesById[6] = "CAT_MIRROR"] = 6; + values[valuesById[8] = "CAT_NEON"] = 8; + values[valuesById[9] = "CAT_TRUNK"] = 9; + values[valuesById[10] = "CAT_NUMBER_PLATE"] = 10; + values[valuesById[12] = "CAT_GT_WING"] = 12; + values[valuesById[14] = "CAT_AURA_MOTIF"] = 14; + values[valuesById[15] = "CAT_METER"] = 15; + values[valuesById[16] = "CAT_BGM"] = 16; + values[valuesById[17] = "CAT_NAME_PLATE"] = 17; + values[valuesById[19] = "CAT_NUMBER"] = 19; + values[valuesById[22] = "CAT_BGM_TRACK"] = 22; + values[valuesById[24] = "CAT_WINDOW_STICKER_FONT"] = 24; + values[valuesById[25] = "CAT_WINDOW_DECORATION"] = 25; + values[valuesById[26] = "CAT_RIVAL_MARKER"] = 26; + values[valuesById[27] = "CAT_STAMP"] = 27; + values[valuesById[28] = "CAT_TERMINAL_BACKGROUND"] = 28; + values[valuesById[201] = "CAT_CAR_TICKET"] = 201; + values[valuesById[202] = "CAT_CONSUMPTION_ITEM"] = 202; + values[valuesById[203] = "CAT_CAR_TICKET_FREE"] = 203; + values[valuesById[300] = "CAT_AERO_FULLSET"] = 300; + values[valuesById[301] = "CAT_AERO_LIMITED"] = 301; + return values; + })(); + + /** + * TutorialType enum. + * @name wm.protobuf.TutorialType + * @enum {number} + * @property {number} TUTORIAL_ID_STORY=0 TUTORIAL_ID_STORY value + * @property {number} TUTORIAL_ID_TIME_ATTACK=1 TUTORIAL_ID_TIME_ATTACK value + * @property {number} TUTORIAL_ID_GHOST=2 TUTORIAL_ID_GHOST value + * @property {number} TUTORIAL_ID_GHOST_CHALLENGE=3 TUTORIAL_ID_GHOST_CHALLENGE value + * @property {number} TUTORIAL_ID_GHOST_LEVEL=4 TUTORIAL_ID_GHOST_LEVEL value + * @property {number} TUTORIAL_ID_UNUSED_5=5 TUTORIAL_ID_UNUSED_5 value + * @property {number} TUTORIAL_ID_GHOST_SEARCH=6 TUTORIAL_ID_GHOST_SEARCH value + * @property {number} TUTORIAL_ID_GHOST_COMPETITION=7 TUTORIAL_ID_GHOST_COMPETITION value + * @property {number} TUTORIAL_ID_HP600_CARD=8 TUTORIAL_ID_HP600_CARD value + * @property {number} TUTORIAL_ID_UNUSED_9=9 TUTORIAL_ID_UNUSED_9 value + * @property {number} TUTORIAL_ID_COMPETITION_QUALIFIED=10 TUTORIAL_ID_COMPETITION_QUALIFIED value + * @property {number} TUTORIAL_ID_COMPETITION_TERMINAL=11 TUTORIAL_ID_COMPETITION_TERMINAL value + * @property {number} TUTORIAL_ID_COMPETITION_NOTICE=12 TUTORIAL_ID_COMPETITION_NOTICE value + * @property {number} TUTORIAL_ID_COMPETITION_FINISHED=13 TUTORIAL_ID_COMPETITION_FINISHED value + * @property {number} TUTORIAL_ID_UNUSED_14=14 TUTORIAL_ID_UNUSED_14 value + * @property {number} TUTORIAL_ID_UNUSED_15=15 TUTORIAL_ID_UNUSED_15 value + * @property {number} TUTORIAL_ID_UNUSED_16=16 TUTORIAL_ID_UNUSED_16 value + * @property {number} TUTORIAL_ID_UNUSED_17=17 TUTORIAL_ID_UNUSED_17 value + * @property {number} TUTORIAL_ID_UNUSED_18=18 TUTORIAL_ID_UNUSED_18 value + * @property {number} TUTORIAL_ID_UNUSED_19=19 TUTORIAL_ID_UNUSED_19 value + * @property {number} TUTORIAL_ID_GHOST_STAMP=20 TUTORIAL_ID_GHOST_STAMP value + * @property {number} TUTORIAL_ID_GHOST_STAMP_DECLINED=21 TUTORIAL_ID_GHOST_STAMP_DECLINED value + * @property {number} TUTORIAL_ID_GHOST_STAMP_FRIENDS=22 TUTORIAL_ID_GHOST_STAMP_FRIENDS value + * @property {number} TUTORIAL_ID_TERMINAL_SCRATCH=23 TUTORIAL_ID_TERMINAL_SCRATCH value + * @property {number} TUTORIAL_ID_TURN_SCRATCH_SHEET=24 TUTORIAL_ID_TURN_SCRATCH_SHEET value + * @property {number} TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN=25 TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN value + * @property {number} TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE=26 TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE value + * @property {number} TUTORIAL_ID_VS_CONTINUE_TICKET=27 TUTORIAL_ID_VS_CONTINUE_TICKET value + * @property {number} TUTORIAL_ID_UNUSED_28=28 TUTORIAL_ID_UNUSED_28 value + * @property {number} TUTORIAL_ID_UNUSED_29=29 TUTORIAL_ID_UNUSED_29 value + * @property {number} TUTORIAL_ID_UNUSED_30=30 TUTORIAL_ID_UNUSED_30 value + * @property {number} TUTORIAL_ID_DRESS_UP=31 TUTORIAL_ID_DRESS_UP value + * @property {number} TUTORIAL_ID_MULTI_GHOST=32 TUTORIAL_ID_MULTI_GHOST value + * @property {number} TUTORIAL_ID_STORY_NEW_FEATURE=33 TUTORIAL_ID_STORY_NEW_FEATURE value + * @property {number} TUTORIAL_ID_GHOST_NEW_FEATURE=34 TUTORIAL_ID_GHOST_NEW_FEATURE value + * @property {number} TUTORIAL_ID_GHOST_REGION_MAP=35 TUTORIAL_ID_GHOST_REGION_MAP value + */ + protobuf.TutorialType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TUTORIAL_ID_STORY"] = 0; + values[valuesById[1] = "TUTORIAL_ID_TIME_ATTACK"] = 1; + values[valuesById[2] = "TUTORIAL_ID_GHOST"] = 2; + values[valuesById[3] = "TUTORIAL_ID_GHOST_CHALLENGE"] = 3; + values[valuesById[4] = "TUTORIAL_ID_GHOST_LEVEL"] = 4; + values[valuesById[5] = "TUTORIAL_ID_UNUSED_5"] = 5; + values[valuesById[6] = "TUTORIAL_ID_GHOST_SEARCH"] = 6; + values[valuesById[7] = "TUTORIAL_ID_GHOST_COMPETITION"] = 7; + values[valuesById[8] = "TUTORIAL_ID_HP600_CARD"] = 8; + values[valuesById[9] = "TUTORIAL_ID_UNUSED_9"] = 9; + values[valuesById[10] = "TUTORIAL_ID_COMPETITION_QUALIFIED"] = 10; + values[valuesById[11] = "TUTORIAL_ID_COMPETITION_TERMINAL"] = 11; + values[valuesById[12] = "TUTORIAL_ID_COMPETITION_NOTICE"] = 12; + values[valuesById[13] = "TUTORIAL_ID_COMPETITION_FINISHED"] = 13; + values[valuesById[14] = "TUTORIAL_ID_UNUSED_14"] = 14; + values[valuesById[15] = "TUTORIAL_ID_UNUSED_15"] = 15; + values[valuesById[16] = "TUTORIAL_ID_UNUSED_16"] = 16; + values[valuesById[17] = "TUTORIAL_ID_UNUSED_17"] = 17; + values[valuesById[18] = "TUTORIAL_ID_UNUSED_18"] = 18; + values[valuesById[19] = "TUTORIAL_ID_UNUSED_19"] = 19; + values[valuesById[20] = "TUTORIAL_ID_GHOST_STAMP"] = 20; + values[valuesById[21] = "TUTORIAL_ID_GHOST_STAMP_DECLINED"] = 21; + values[valuesById[22] = "TUTORIAL_ID_GHOST_STAMP_FRIENDS"] = 22; + values[valuesById[23] = "TUTORIAL_ID_TERMINAL_SCRATCH"] = 23; + values[valuesById[24] = "TUTORIAL_ID_TURN_SCRATCH_SHEET"] = 24; + values[valuesById[25] = "TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN"] = 25; + values[valuesById[26] = "TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE"] = 26; + values[valuesById[27] = "TUTORIAL_ID_VS_CONTINUE_TICKET"] = 27; + values[valuesById[28] = "TUTORIAL_ID_UNUSED_28"] = 28; + values[valuesById[29] = "TUTORIAL_ID_UNUSED_29"] = 29; + values[valuesById[30] = "TUTORIAL_ID_UNUSED_30"] = 30; + values[valuesById[31] = "TUTORIAL_ID_DRESS_UP"] = 31; + values[valuesById[32] = "TUTORIAL_ID_MULTI_GHOST"] = 32; + values[valuesById[33] = "TUTORIAL_ID_STORY_NEW_FEATURE"] = 33; + values[valuesById[34] = "TUTORIAL_ID_GHOST_NEW_FEATURE"] = 34; + values[valuesById[35] = "TUTORIAL_ID_GHOST_REGION_MAP"] = 35; + return values; + })(); + + /** + * GameMode enum. + * @name wm.protobuf.GameMode + * @enum {number} + * @property {number} MODE_STORY=1 MODE_STORY value + * @property {number} MODE_TIME_ATTACK=2 MODE_TIME_ATTACK value + * @property {number} MODE_VS_BATTLE=3 MODE_VS_BATTLE value + * @property {number} MODE_GHOST_BATTLE=4 MODE_GHOST_BATTLE value + * @property {number} MODE_EVENT=5 MODE_EVENT value + */ + protobuf.GameMode = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "MODE_STORY"] = 1; + values[valuesById[2] = "MODE_TIME_ATTACK"] = 2; + values[valuesById[3] = "MODE_VS_BATTLE"] = 3; + values[valuesById[4] = "MODE_GHOST_BATTLE"] = 4; + values[valuesById[5] = "MODE_EVENT"] = 5; + return values; + })(); + + /** + * GhostType enum. + * @name wm.protobuf.GhostType + * @enum {number} + * @property {number} GHOST_NORMAL=1 GHOST_NORMAL value + * @property {number} GHOST_PINCH_RUNNER=2 GHOST_PINCH_RUNNER value + * @property {number} GHOST_DEFAULT=3 GHOST_DEFAULT value + */ + protobuf.GhostType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "GHOST_NORMAL"] = 1; + values[valuesById[2] = "GHOST_PINCH_RUNNER"] = 2; + values[valuesById[3] = "GHOST_DEFAULT"] = 3; + return values; + })(); + + /** + * GhostSelectionMethod enum. + * @name wm.protobuf.GhostSelectionMethod + * @enum {number} + * @property {number} GHOST_SEARCH_BY_REGION=1 GHOST_SEARCH_BY_REGION value + * @property {number} GHOST_SELECT_BY_LEVEL=2 GHOST_SELECT_BY_LEVEL value + * @property {number} GHOST_SELECT_CROWN_MATCH=3 GHOST_SELECT_CROWN_MATCH value + * @property {number} GHOST_SELECT_STAMP_MATCH=4 GHOST_SELECT_STAMP_MATCH value + * @property {number} GHOST_SELECT_FROM_HISTORY=5 GHOST_SELECT_FROM_HISTORY value + * @property {number} GHOST_SEARCH_BY_SHOP=6 GHOST_SEARCH_BY_SHOP value + * @property {number} GHOST_SEARCH_BY_NAME=7 GHOST_SEARCH_BY_NAME value + * @property {number} GHOST_ACCEPT_CHALLENGER=8 GHOST_ACCEPT_CHALLENGER value + * @property {number} GHOST_APPOINTMENT=9 GHOST_APPOINTMENT value + * @property {number} GHOST_DEFAULT_OPPONENT=10 GHOST_DEFAULT_OPPONENT value + * @property {number} GHOST_COMPETITION=11 GHOST_COMPETITION value + * @property {number} GHOST_SELECT_FROM_BOOKMARKS=12 GHOST_SELECT_FROM_BOOKMARKS value + */ + protobuf.GhostSelectionMethod = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "GHOST_SEARCH_BY_REGION"] = 1; + values[valuesById[2] = "GHOST_SELECT_BY_LEVEL"] = 2; + values[valuesById[3] = "GHOST_SELECT_CROWN_MATCH"] = 3; + values[valuesById[4] = "GHOST_SELECT_STAMP_MATCH"] = 4; + values[valuesById[5] = "GHOST_SELECT_FROM_HISTORY"] = 5; + values[valuesById[6] = "GHOST_SEARCH_BY_SHOP"] = 6; + values[valuesById[7] = "GHOST_SEARCH_BY_NAME"] = 7; + values[valuesById[8] = "GHOST_ACCEPT_CHALLENGER"] = 8; + values[valuesById[9] = "GHOST_APPOINTMENT"] = 9; + values[valuesById[10] = "GHOST_DEFAULT_OPPONENT"] = 10; + values[valuesById[11] = "GHOST_COMPETITION"] = 11; + values[valuesById[12] = "GHOST_SELECT_FROM_BOOKMARKS"] = 12; + return values; + })(); + + /** + * GhostRateType enum. + * @name wm.protobuf.GhostRateType + * @enum {number} + * @property {number} GHOST_RATE_UNKNOWN=1 GHOST_RATE_UNKNOWN value + * @property {number} GHOST_RATE_INVALID=2 GHOST_RATE_INVALID value + * @property {number} GHOST_RATE_VALID=3 GHOST_RATE_VALID value + */ + protobuf.GhostRateType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "GHOST_RATE_UNKNOWN"] = 1; + values[valuesById[2] = "GHOST_RATE_INVALID"] = 2; + values[valuesById[3] = "GHOST_RATE_VALID"] = 3; + return values; + })(); + + /** + * PathSelectionMethod enum. + * @name wm.protobuf.PathSelectionMethod + * @enum {number} + * @property {number} PATH_NEW=1 PATH_NEW value + * @property {number} PATH_PLAIN=2 PATH_PLAIN value + * @property {number} PATH_FRIEND=3 PATH_FRIEND value + * @property {number} PATH_NORMAL=4 PATH_NORMAL value + * @property {number} PATH_CHALLENGER=5 PATH_CHALLENGER value + */ + protobuf.PathSelectionMethod = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "PATH_NEW"] = 1; + values[valuesById[2] = "PATH_PLAIN"] = 2; + values[valuesById[3] = "PATH_FRIEND"] = 3; + values[valuesById[4] = "PATH_NORMAL"] = 4; + values[valuesById[5] = "PATH_CHALLENGER"] = 5; + return values; + })(); + + /** + * NoticeEntry enum. + * @name wm.protobuf.NoticeEntry + * @enum {number} + * @property {number} NOTICE_UNUSED_1=1 NOTICE_UNUSED_1 value + * @property {number} NOTICE_UNUSED_2=2 NOTICE_UNUSED_2 value + * @property {number} NOTICE_UNUSED_3=3 NOTICE_UNUSED_3 value + * @property {number} NOTICE_UNUSED_4=4 NOTICE_UNUSED_4 value + * @property {number} NOTICE_UNUSED_5=5 NOTICE_UNUSED_5 value + * @property {number} NOTICE_UNUSED_6=6 NOTICE_UNUSED_6 value + * @property {number} NOTICE_UNUSED_7=7 NOTICE_UNUSED_7 value + * @property {number} NOTICE_UNUSED_8=8 NOTICE_UNUSED_8 value + * @property {number} NOTICE_UNUSED_9=9 NOTICE_UNUSED_9 value + * @property {number} NOTICE_UNUSED_10=10 NOTICE_UNUSED_10 value + * @property {number} NOTICE_UNUSED_11=11 NOTICE_UNUSED_11 value + * @property {number} NOTICE_UNUSED_12=12 NOTICE_UNUSED_12 value + */ + protobuf.NoticeEntry = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "NOTICE_UNUSED_1"] = 1; + values[valuesById[2] = "NOTICE_UNUSED_2"] = 2; + values[valuesById[3] = "NOTICE_UNUSED_3"] = 3; + values[valuesById[4] = "NOTICE_UNUSED_4"] = 4; + values[valuesById[5] = "NOTICE_UNUSED_5"] = 5; + values[valuesById[6] = "NOTICE_UNUSED_6"] = 6; + values[valuesById[7] = "NOTICE_UNUSED_7"] = 7; + values[valuesById[8] = "NOTICE_UNUSED_8"] = 8; + values[valuesById[9] = "NOTICE_UNUSED_9"] = 9; + values[valuesById[10] = "NOTICE_UNUSED_10"] = 10; + values[valuesById[11] = "NOTICE_UNUSED_11"] = 11; + values[valuesById[12] = "NOTICE_UNUSED_12"] = 12; + return values; + })(); + + /** + * FileType enum. + * @name wm.protobuf.FileType + * @enum {number} + * @property {number} FILE_PROMOTION_ANNOUNCEMENT=1 FILE_PROMOTION_ANNOUNCEMENT value + * @property {number} FILE_FEATURE_ANNOUNCEMENT=4 FILE_FEATURE_ANNOUNCEMENT value + * @property {number} FILE_SPAPP_ANNOUNCEMENT=6 FILE_SPAPP_ANNOUNCEMENT value + */ + protobuf.FileType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "FILE_PROMOTION_ANNOUNCEMENT"] = 1; + values[valuesById[4] = "FILE_FEATURE_ANNOUNCEMENT"] = 4; + values[valuesById[6] = "FILE_SPAPP_ANNOUNCEMENT"] = 6; + return values; + })(); + + /** + * GhostCompetitionParticipantState enum. + * @name wm.protobuf.GhostCompetitionParticipantState + * @enum {number} + * @property {number} COMPETITION_NOT_PARTICIPATED=1 COMPETITION_NOT_PARTICIPATED value + * @property {number} COMPETITION_QUALIFIED=2 COMPETITION_QUALIFIED value + * @property {number} COMPETITION_PARTICIPATED=3 COMPETITION_PARTICIPATED value + * @property {number} COMPETITION_WON=4 COMPETITION_WON value + */ + protobuf.GhostCompetitionParticipantState = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "COMPETITION_NOT_PARTICIPATED"] = 1; + values[valuesById[2] = "COMPETITION_QUALIFIED"] = 2; + values[valuesById[3] = "COMPETITION_PARTICIPATED"] = 3; + values[valuesById[4] = "COMPETITION_WON"] = 4; + return values; + })(); + + /** + * ScreenshotType enum. + * @name wm.protobuf.ScreenshotType + * @enum {number} + * @property {number} SS_GHOST_BATTLE=1 SS_GHOST_BATTLE value + * @property {number} SS_VERSUS_BATTLE=2 SS_VERSUS_BATTLE value + * @property {number} SS_TERMINAL=3 SS_TERMINAL value + * @property {number} SS_ACQUIRING_VERSUS_STAR=4 SS_ACQUIRING_VERSUS_STAR value + * @property {number} SS_ACQUIRING_AURA_MOTIF=5 SS_ACQUIRING_AURA_MOTIF value + * @property {number} SS_GHOST_REGION_MAP=6 SS_GHOST_REGION_MAP value + * @property {number} SS_ACQUIRING_CROWN=7 SS_ACQUIRING_CROWN value + * @property {number} SS_GHOST_COMPETITION_RESULT=8 SS_GHOST_COMPETITION_RESULT value + * @property {number} SS_TIME_ATTACK_RESULT=9 SS_TIME_ATTACK_RESULT value + * @property {number} SS_LEVEL_UP=10 SS_LEVEL_UP value + */ + protobuf.ScreenshotType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SS_GHOST_BATTLE"] = 1; + values[valuesById[2] = "SS_VERSUS_BATTLE"] = 2; + values[valuesById[3] = "SS_TERMINAL"] = 3; + values[valuesById[4] = "SS_ACQUIRING_VERSUS_STAR"] = 4; + values[valuesById[5] = "SS_ACQUIRING_AURA_MOTIF"] = 5; + values[valuesById[6] = "SS_GHOST_REGION_MAP"] = 6; + values[valuesById[7] = "SS_ACQUIRING_CROWN"] = 7; + values[valuesById[8] = "SS_GHOST_COMPETITION_RESULT"] = 8; + values[valuesById[9] = "SS_TIME_ATTACK_RESULT"] = 9; + values[valuesById[10] = "SS_LEVEL_UP"] = 10; + return values; + })(); + + /** + * TransferState enum. + * @name wm.protobuf.TransferState + * @enum {number} + * @property {number} NOT_REGISTERED=0 NOT_REGISTERED value + * @property {number} NEW_REGISTRATION=1 NEW_REGISTRATION value + * @property {number} TRANSFER_REQUIRED=2 TRANSFER_REQUIRED value + * @property {number} TRANSFERRING=3 TRANSFERRING value + * @property {number} TRANSFERRED=4 TRANSFERRED value + */ + protobuf.TransferState = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NOT_REGISTERED"] = 0; + values[valuesById[1] = "NEW_REGISTRATION"] = 1; + values[valuesById[2] = "TRANSFER_REQUIRED"] = 2; + values[valuesById[3] = "TRANSFERRING"] = 3; + values[valuesById[4] = "TRANSFERRED"] = 4; + return values; + })(); + + /** + * EventModeSerialErrorCode enum. + * @name wm.protobuf.EventModeSerialErrorCode + * @enum {number} + * @property {number} SERIAL_SUCCESS=0 SERIAL_SUCCESS value + * @property {number} SERIAL_ATTEMPT_TO_CHANGE=1 SERIAL_ATTEMPT_TO_CHANGE value + * @property {number} SERIAL_NO_INPUT=2 SERIAL_NO_INPUT value + * @property {number} SERIAL_INVALID=3 SERIAL_INVALID value + * @property {number} SERIAL_EXPIRED=4 SERIAL_EXPIRED value + * @property {number} SERIAL_OTHER_PLACE=5 SERIAL_OTHER_PLACE value + */ + protobuf.EventModeSerialErrorCode = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERIAL_SUCCESS"] = 0; + values[valuesById[1] = "SERIAL_ATTEMPT_TO_CHANGE"] = 1; + values[valuesById[2] = "SERIAL_NO_INPUT"] = 2; + values[valuesById[3] = "SERIAL_INVALID"] = 3; + values[valuesById[4] = "SERIAL_EXPIRED"] = 4; + values[valuesById[5] = "SERIAL_OTHER_PLACE"] = 5; + return values; + })(); + + /** + * ClientLogType enum. + * @name wm.protobuf.ClientLogType + * @enum {number} + * @property {number} LOG_LOAD_REPORT=0 LOG_LOAD_REPORT value + * @property {number} LOG_ERROR=1 LOG_ERROR value + */ + protobuf.ClientLogType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_LOAD_REPORT"] = 0; + values[valuesById[1] = "LOG_ERROR"] = 1; + return values; + })(); + + /** + * SmartphoneAppState enum. + * @name wm.protobuf.SmartphoneAppState + * @enum {number} + * @property {number} SPAPP_UNREGISTERED=0 SPAPP_UNREGISTERED value + * @property {number} SPAPP_KTID=1 SPAPP_KTID value + * @property {number} SPAPP_BNID=2 SPAPP_BNID value + */ + protobuf.SmartphoneAppState = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPAPP_UNREGISTERED"] = 0; + values[valuesById[1] = "SPAPP_KTID"] = 1; + values[valuesById[2] = "SPAPP_BNID"] = 2; + return values; + })(); + + return protobuf; + })(); + + return wm; +})(); + +export { $root as default }; diff --git a/src/wmmt/wm.proto.d.ts b/src/wmmt/wm.proto.d.ts new file mode 100644 index 0000000..8fb893b --- /dev/null +++ b/src/wmmt/wm.proto.d.ts @@ -0,0 +1,18146 @@ +import * as $protobuf from "protobufjs"; +/** Namespace wm. */ +export namespace wm { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a RegisterSystemInfoRequest. */ + interface IRegisterSystemInfoRequest { + + /** RegisterSystemInfoRequest pcbSerial */ + pcbSerial: string; + + /** RegisterSystemInfoRequest terminalType */ + terminalType: wm.protobuf.TerminalType; + + /** RegisterSystemInfoRequest romVersion */ + romVersion: number; + + /** RegisterSystemInfoRequest country */ + country: string; + + /** RegisterSystemInfoRequest lineType */ + lineType: wm.protobuf.LineType; + + /** RegisterSystemInfoRequest shopName */ + shopName: string; + + /** RegisterSystemInfoRequest shopNickname */ + shopNickname: string; + + /** RegisterSystemInfoRequest allnetPlaceId */ + allnetPlaceId?: (number|null); + + /** RegisterSystemInfoRequest allnetRegion0 */ + allnetRegion0?: (number|null); + + /** RegisterSystemInfoRequest muchaPlaceId */ + muchaPlaceId?: (string|null); + + /** RegisterSystemInfoRequest muchaPrefectureId */ + muchaPrefectureId?: (number|null); + + /** RegisterSystemInfoRequest regionName0 */ + regionName0: string; + + /** RegisterSystemInfoRequest regionName1 */ + regionName1: string; + + /** RegisterSystemInfoRequest regionName2 */ + regionName2: string; + + /** RegisterSystemInfoRequest regionName3 */ + regionName3: string; + + /** RegisterSystemInfoRequest timezoneOffset */ + timezoneOffset: number; + + /** RegisterSystemInfoRequest systemSetting */ + systemSetting: wm.protobuf.ISystemSetting; + + /** RegisterSystemInfoRequest errorLogs */ + errorLogs?: (wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry[]|null); + } + + /** Represents a RegisterSystemInfoRequest. */ + class RegisterSystemInfoRequest implements IRegisterSystemInfoRequest { + + /** + * Constructs a new RegisterSystemInfoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemInfoRequest); + + /** RegisterSystemInfoRequest pcbSerial. */ + public pcbSerial: string; + + /** RegisterSystemInfoRequest terminalType. */ + public terminalType: wm.protobuf.TerminalType; + + /** RegisterSystemInfoRequest romVersion. */ + public romVersion: number; + + /** RegisterSystemInfoRequest country. */ + public country: string; + + /** RegisterSystemInfoRequest lineType. */ + public lineType: wm.protobuf.LineType; + + /** RegisterSystemInfoRequest shopName. */ + public shopName: string; + + /** RegisterSystemInfoRequest shopNickname. */ + public shopNickname: string; + + /** RegisterSystemInfoRequest allnetPlaceId. */ + public allnetPlaceId: number; + + /** RegisterSystemInfoRequest allnetRegion0. */ + public allnetRegion0: number; + + /** RegisterSystemInfoRequest muchaPlaceId. */ + public muchaPlaceId: string; + + /** RegisterSystemInfoRequest muchaPrefectureId. */ + public muchaPrefectureId: number; + + /** RegisterSystemInfoRequest regionName0. */ + public regionName0: string; + + /** RegisterSystemInfoRequest regionName1. */ + public regionName1: string; + + /** RegisterSystemInfoRequest regionName2. */ + public regionName2: string; + + /** RegisterSystemInfoRequest regionName3. */ + public regionName3: string; + + /** RegisterSystemInfoRequest timezoneOffset. */ + public timezoneOffset: number; + + /** RegisterSystemInfoRequest systemSetting. */ + public systemSetting: wm.protobuf.ISystemSetting; + + /** RegisterSystemInfoRequest errorLogs. */ + public errorLogs: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry[]; + + /** + * Creates a new RegisterSystemInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemInfoRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemInfoRequest): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Encodes the specified RegisterSystemInfoRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @param message RegisterSystemInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @param message RegisterSystemInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Verifies a RegisterSystemInfoRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemInfoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemInfoRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemInfoRequest; + + /** + * Creates a plain object from a RegisterSystemInfoRequest message. Also converts values to other types if specified. + * @param message RegisterSystemInfoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemInfoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemInfoRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RegisterSystemInfoRequest { + + /** Properties of an ErrorLogEntry. */ + interface IErrorLogEntry { + + /** ErrorLogEntry datetime */ + datetime: number; + + /** ErrorLogEntry message */ + message: string; + } + + /** Represents an ErrorLogEntry. */ + class ErrorLogEntry implements IErrorLogEntry { + + /** + * Constructs a new ErrorLogEntry. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry); + + /** ErrorLogEntry datetime. */ + public datetime: number; + + /** ErrorLogEntry message. */ + public message: string; + + /** + * Creates a new ErrorLogEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorLogEntry instance + */ + public static create(properties?: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Encodes the specified ErrorLogEntry message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @param message ErrorLogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorLogEntry message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @param message ErrorLogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Verifies an ErrorLogEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ErrorLogEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorLogEntry + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry; + + /** + * Creates a plain object from an ErrorLogEntry message. Also converts values to other types if specified. + * @param message ErrorLogEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorLogEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorLogEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RegisterSystemInfoResponse. */ + interface IRegisterSystemInfoResponse { + + /** RegisterSystemInfoResponse error */ + error: wm.protobuf.ErrorCode; + + /** RegisterSystemInfoResponse regionId */ + regionId: number; + + /** RegisterSystemInfoResponse placeId */ + placeId: string; + + /** RegisterSystemInfoResponse allowedClientLogTypes */ + allowedClientLogTypes?: (wm.protobuf.ClientLogType[]|null); + + /** RegisterSystemInfoResponse featureVersion */ + featureVersion: wm.protobuf.IGameFeatureVersion; + + /** RegisterSystemInfoResponse latestCompetitionId */ + latestCompetitionId?: (number|null); + + /** RegisterSystemInfoResponse competitionSchedule */ + competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** RegisterSystemInfoResponse scratchNotes */ + scratchNotes?: (string|null); + + /** RegisterSystemInfoResponse inviteFriendCampaignSchedule */ + inviteFriendCampaignSchedule?: (wm.protobuf.IInviteFriendCampaignSchedule|null); + + /** RegisterSystemInfoResponse ghostSelectionMinRedoWait */ + ghostSelectionMinRedoWait: number; + + /** RegisterSystemInfoResponse ghostSelectionMaxRedoWait */ + ghostSelectionMaxRedoWait: number; + } + + /** Represents a RegisterSystemInfoResponse. */ + class RegisterSystemInfoResponse implements IRegisterSystemInfoResponse { + + /** + * Constructs a new RegisterSystemInfoResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemInfoResponse); + + /** RegisterSystemInfoResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** RegisterSystemInfoResponse regionId. */ + public regionId: number; + + /** RegisterSystemInfoResponse placeId. */ + public placeId: string; + + /** RegisterSystemInfoResponse allowedClientLogTypes. */ + public allowedClientLogTypes: wm.protobuf.ClientLogType[]; + + /** RegisterSystemInfoResponse featureVersion. */ + public featureVersion: wm.protobuf.IGameFeatureVersion; + + /** RegisterSystemInfoResponse latestCompetitionId. */ + public latestCompetitionId: number; + + /** RegisterSystemInfoResponse competitionSchedule. */ + public competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** RegisterSystemInfoResponse scratchNotes. */ + public scratchNotes: string; + + /** RegisterSystemInfoResponse inviteFriendCampaignSchedule. */ + public inviteFriendCampaignSchedule?: (wm.protobuf.IInviteFriendCampaignSchedule|null); + + /** RegisterSystemInfoResponse ghostSelectionMinRedoWait. */ + public ghostSelectionMinRedoWait: number; + + /** RegisterSystemInfoResponse ghostSelectionMaxRedoWait. */ + public ghostSelectionMaxRedoWait: number; + + /** + * Creates a new RegisterSystemInfoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemInfoResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemInfoResponse): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Encodes the specified RegisterSystemInfoResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @param message RegisterSystemInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @param message RegisterSystemInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Verifies a RegisterSystemInfoResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemInfoResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemInfoResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemInfoResponse; + + /** + * Creates a plain object from a RegisterSystemInfoResponse message. Also converts values to other types if specified. + * @param message RegisterSystemInfoResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemInfoResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemInfoResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterSystemStatsRequest. */ + interface IRegisterSystemStatsRequest { + + /** RegisterSystemStatsRequest pcbSerial */ + pcbSerial: string; + + /** RegisterSystemStatsRequest driveStats */ + driveStats?: (wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null); + + /** RegisterSystemStatsRequest terminalStats */ + terminalStats?: (wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null); + } + + /** Represents a RegisterSystemStatsRequest. */ + class RegisterSystemStatsRequest implements IRegisterSystemStatsRequest { + + /** + * Constructs a new RegisterSystemStatsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemStatsRequest); + + /** RegisterSystemStatsRequest pcbSerial. */ + public pcbSerial: string; + + /** RegisterSystemStatsRequest driveStats. */ + public driveStats?: (wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null); + + /** RegisterSystemStatsRequest terminalStats. */ + public terminalStats?: (wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null); + + /** + * Creates a new RegisterSystemStatsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemStatsRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemStatsRequest): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Encodes the specified RegisterSystemStatsRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @param message RegisterSystemStatsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemStatsRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @param message RegisterSystemStatsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Verifies a RegisterSystemStatsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemStatsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemStatsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsRequest; + + /** + * Creates a plain object from a RegisterSystemStatsRequest message. Also converts values to other types if specified. + * @param message RegisterSystemStatsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemStatsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemStatsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RegisterSystemStatsRequest { + + /** Properties of a DriveStats. */ + interface IDriveStats { + + /** DriveStats operation */ + operation?: (number[]|null); + + /** DriveStats story */ + story?: (number[]|null); + + /** DriveStats versus */ + versus?: (number[]|null); + + /** DriveStats ghost */ + ghost?: (number[]|null); + + /** DriveStats timeAttack */ + timeAttack?: (number[]|null); + + /** DriveStats event */ + event?: (number[]|null); + } + + /** Represents a DriveStats. */ + class DriveStats implements IDriveStats { + + /** + * Constructs a new DriveStats. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.RegisterSystemStatsRequest.IDriveStats); + + /** DriveStats operation. */ + public operation: number[]; + + /** DriveStats story. */ + public story: number[]; + + /** DriveStats versus. */ + public versus: number[]; + + /** DriveStats ghost. */ + public ghost: number[]; + + /** DriveStats timeAttack. */ + public timeAttack: number[]; + + /** DriveStats event. */ + public event: number[]; + + /** + * Creates a new DriveStats instance using the specified properties. + * @param [properties] Properties to set + * @returns DriveStats instance + */ + public static create(properties?: wm.protobuf.RegisterSystemStatsRequest.IDriveStats): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Encodes the specified DriveStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @param message DriveStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.RegisterSystemStatsRequest.IDriveStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DriveStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @param message DriveStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.RegisterSystemStatsRequest.IDriveStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DriveStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Decodes a DriveStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Verifies a DriveStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DriveStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DriveStats + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsRequest.DriveStats; + + /** + * Creates a plain object from a DriveStats message. Also converts values to other types if specified. + * @param message DriveStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsRequest.DriveStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DriveStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DriveStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TerminalStats. */ + interface ITerminalStats { + + /** TerminalStats operation */ + operation?: (number[]|null); + } + + /** Represents a TerminalStats. */ + class TerminalStats implements ITerminalStats { + + /** + * Constructs a new TerminalStats. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats); + + /** TerminalStats operation. */ + public operation: number[]; + + /** + * Creates a new TerminalStats instance using the specified properties. + * @param [properties] Properties to set + * @returns TerminalStats instance + */ + public static create(properties?: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Encodes the specified TerminalStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @param message TerminalStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerminalStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @param message TerminalStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.RegisterSystemStatsRequest.ITerminalStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerminalStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Decodes a TerminalStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Verifies a TerminalStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerminalStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerminalStats + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsRequest.TerminalStats; + + /** + * Creates a plain object from a TerminalStats message. Also converts values to other types if specified. + * @param message TerminalStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsRequest.TerminalStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerminalStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerminalStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RegisterSystemStatsResponse. */ + interface IRegisterSystemStatsResponse { + + /** RegisterSystemStatsResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a RegisterSystemStatsResponse. */ + class RegisterSystemStatsResponse implements IRegisterSystemStatsResponse { + + /** + * Constructs a new RegisterSystemStatsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterSystemStatsResponse); + + /** RegisterSystemStatsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new RegisterSystemStatsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterSystemStatsResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterSystemStatsResponse): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Encodes the specified RegisterSystemStatsResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @param message RegisterSystemStatsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterSystemStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterSystemStatsResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @param message RegisterSystemStatsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterSystemStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Verifies a RegisterSystemStatsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterSystemStatsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterSystemStatsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterSystemStatsResponse; + + /** + * Creates a plain object from a RegisterSystemStatsResponse message. Also converts values to other types if specified. + * @param message RegisterSystemStatsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterSystemStatsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterSystemStatsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterSystemStatsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterGhostTrailRequest. */ + interface IRegisterGhostTrailRequest { + + /** RegisterGhostTrailRequest ghostSessionId */ + ghostSessionId: (number|Long); + + /** RegisterGhostTrailRequest ghost */ + ghost: wm.protobuf.IGhostCar; + + /** RegisterGhostTrailRequest trail */ + trail: Uint8Array; + + /** RegisterGhostTrailRequest time */ + time?: (number|null); + + /** RegisterGhostTrailRequest driveData */ + driveData?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByArea */ + trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByCar */ + trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByUser */ + trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + } + + /** Represents a RegisterGhostTrailRequest. */ + class RegisterGhostTrailRequest implements IRegisterGhostTrailRequest { + + /** + * Constructs a new RegisterGhostTrailRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterGhostTrailRequest); + + /** RegisterGhostTrailRequest ghostSessionId. */ + public ghostSessionId: (number|Long); + + /** RegisterGhostTrailRequest ghost. */ + public ghost: wm.protobuf.IGhostCar; + + /** RegisterGhostTrailRequest trail. */ + public trail: Uint8Array; + + /** RegisterGhostTrailRequest time. */ + public time: number; + + /** RegisterGhostTrailRequest driveData. */ + public driveData?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByArea. */ + public trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByCar. */ + public trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** RegisterGhostTrailRequest trendBinaryByUser. */ + public trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + + /** + * Creates a new RegisterGhostTrailRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterGhostTrailRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterGhostTrailRequest): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Encodes the specified RegisterGhostTrailRequest message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @param message RegisterGhostTrailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterGhostTrailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterGhostTrailRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @param message RegisterGhostTrailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterGhostTrailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Verifies a RegisterGhostTrailRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterGhostTrailRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterGhostTrailRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterGhostTrailRequest; + + /** + * Creates a plain object from a RegisterGhostTrailRequest message. Also converts values to other types if specified. + * @param message RegisterGhostTrailRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterGhostTrailRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterGhostTrailRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterGhostTrailRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterGhostTrailResponse. */ + interface IRegisterGhostTrailResponse { + + /** RegisterGhostTrailResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a RegisterGhostTrailResponse. */ + class RegisterGhostTrailResponse implements IRegisterGhostTrailResponse { + + /** + * Constructs a new RegisterGhostTrailResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterGhostTrailResponse); + + /** RegisterGhostTrailResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new RegisterGhostTrailResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterGhostTrailResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterGhostTrailResponse): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Encodes the specified RegisterGhostTrailResponse message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @param message RegisterGhostTrailResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterGhostTrailResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterGhostTrailResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @param message RegisterGhostTrailResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterGhostTrailResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Verifies a RegisterGhostTrailResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterGhostTrailResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterGhostTrailResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterGhostTrailResponse; + + /** + * Creates a plain object from a RegisterGhostTrailResponse message. Also converts values to other types if specified. + * @param message RegisterGhostTrailResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterGhostTrailResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterGhostTrailResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterGhostTrailResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadUserRequest. */ + interface ILoadUserRequest { + + /** LoadUserRequest cardChipId */ + cardChipId?: (string|null); + + /** LoadUserRequest accessCode */ + accessCode?: (string|null); + + /** LoadUserRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** LoadUserRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** LoadUserRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** LoadUserRequest userId */ + userId?: (number|null); + + /** LoadUserRequest romVersion */ + romVersion: number; + + /** LoadUserRequest maxCars */ + maxCars: number; + + /** LoadUserRequest createUser */ + createUser?: (boolean|null); + } + + /** Represents a LoadUserRequest. */ + class LoadUserRequest implements ILoadUserRequest { + + /** + * Constructs a new LoadUserRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUserRequest); + + /** LoadUserRequest cardChipId. */ + public cardChipId: string; + + /** LoadUserRequest accessCode. */ + public accessCode: string; + + /** LoadUserRequest cardTypeCode. */ + public cardTypeCode: number; + + /** LoadUserRequest cardRegionCode. */ + public cardRegionCode: number; + + /** LoadUserRequest device. */ + public device: wm.protobuf.DeviceType; + + /** LoadUserRequest userId. */ + public userId: number; + + /** LoadUserRequest romVersion. */ + public romVersion: number; + + /** LoadUserRequest maxCars. */ + public maxCars: number; + + /** LoadUserRequest createUser. */ + public createUser: boolean; + + /** + * Creates a new LoadUserRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUserRequest instance + */ + public static create(properties?: wm.protobuf.ILoadUserRequest): wm.protobuf.LoadUserRequest; + + /** + * Encodes the specified LoadUserRequest message. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @param message LoadUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @param message LoadUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUserRequest; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUserRequest; + + /** + * Verifies a LoadUserRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUserRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUserRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUserRequest; + + /** + * Creates a plain object from a LoadUserRequest message. Also converts values to other types if specified. + * @param message LoadUserRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUserRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUserRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUserRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadUserResponse. */ + interface ILoadUserResponse { + + /** LoadUserResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadUserResponse unlockAt */ + unlockAt?: (number|null); + + /** LoadUserResponse accessCode */ + accessCode?: (string|null); + + /** LoadUserResponse banapassportAmId */ + banapassportAmId?: (number|null); + + /** LoadUserResponse mbid */ + mbid?: (number|null); + + /** LoadUserResponse userId */ + userId?: (number|null); + + /** LoadUserResponse numOfOwnedCars */ + numOfOwnedCars: number; + + /** LoadUserResponse cars */ + cars?: (wm.protobuf.ICar[]|null); + + /** LoadUserResponse carStates */ + carStates?: (wm.protobuf.LoadUserResponse.ICarState[]|null); + + /** LoadUserResponse unusedCarTickets */ + unusedCarTickets?: (wm.protobuf.IUserItem[]|null); + + /** LoadUserResponse tutorials */ + tutorials?: (boolean[]|null); + + /** LoadUserResponse competitionUserState */ + competitionUserState?: (wm.protobuf.GhostCompetitionParticipantState|null); + + /** LoadUserResponse windowStickerString */ + windowStickerString?: (string|null); + + /** LoadUserResponse windowStickerFont */ + windowStickerFont?: (number|null); + + /** LoadUserResponse spappState */ + spappState: wm.protobuf.SmartphoneAppState; + + /** LoadUserResponse transferState */ + transferState: wm.protobuf.TransferState; + + /** LoadUserResponse totalVsStarCount */ + totalVsStarCount?: (number|null); + + /** LoadUserResponse totalVsMedalPoint */ + totalVsMedalPoint?: (number|null); + + /** LoadUserResponse copiedCar */ + copiedCar?: (wm.protobuf.ICopiedCar|null); + + /** LoadUserResponse wasCreatedToday */ + wasCreatedToday?: (boolean|null); + + /** LoadUserResponse participatedInInviteFriendCampaign */ + participatedInInviteFriendCampaign?: (boolean|null); + } + + /** Represents a LoadUserResponse. */ + class LoadUserResponse implements ILoadUserResponse { + + /** + * Constructs a new LoadUserResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUserResponse); + + /** LoadUserResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadUserResponse unlockAt. */ + public unlockAt: number; + + /** LoadUserResponse accessCode. */ + public accessCode: string; + + /** LoadUserResponse banapassportAmId. */ + public banapassportAmId: number; + + /** LoadUserResponse mbid. */ + public mbid: number; + + /** LoadUserResponse userId. */ + public userId: number; + + /** LoadUserResponse numOfOwnedCars. */ + public numOfOwnedCars: number; + + /** LoadUserResponse cars. */ + public cars: wm.protobuf.ICar[]; + + /** LoadUserResponse carStates. */ + public carStates: wm.protobuf.LoadUserResponse.ICarState[]; + + /** LoadUserResponse unusedCarTickets. */ + public unusedCarTickets: wm.protobuf.IUserItem[]; + + /** LoadUserResponse tutorials. */ + public tutorials: boolean[]; + + /** LoadUserResponse competitionUserState. */ + public competitionUserState: wm.protobuf.GhostCompetitionParticipantState; + + /** LoadUserResponse windowStickerString. */ + public windowStickerString: string; + + /** LoadUserResponse windowStickerFont. */ + public windowStickerFont: number; + + /** LoadUserResponse spappState. */ + public spappState: wm.protobuf.SmartphoneAppState; + + /** LoadUserResponse transferState. */ + public transferState: wm.protobuf.TransferState; + + /** LoadUserResponse totalVsStarCount. */ + public totalVsStarCount: number; + + /** LoadUserResponse totalVsMedalPoint. */ + public totalVsMedalPoint: number; + + /** LoadUserResponse copiedCar. */ + public copiedCar?: (wm.protobuf.ICopiedCar|null); + + /** LoadUserResponse wasCreatedToday. */ + public wasCreatedToday: boolean; + + /** LoadUserResponse participatedInInviteFriendCampaign. */ + public participatedInInviteFriendCampaign: boolean; + + /** + * Creates a new LoadUserResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUserResponse instance + */ + public static create(properties?: wm.protobuf.ILoadUserResponse): wm.protobuf.LoadUserResponse; + + /** + * Encodes the specified LoadUserResponse message. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @param message LoadUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @param message LoadUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUserResponse; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUserResponse; + + /** + * Verifies a LoadUserResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUserResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUserResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUserResponse; + + /** + * Creates a plain object from a LoadUserResponse message. Also converts values to other types if specified. + * @param message LoadUserResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUserResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUserResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUserResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadUserResponse { + + /** Properties of a CarState. */ + interface ICarState { + + /** CarState hasOpponentGhost */ + hasOpponentGhost: boolean; + + /** CarState competitionState */ + competitionState?: (wm.protobuf.GhostCompetitionParticipantState|null); + + /** CarState toBeDeleted */ + toBeDeleted: boolean; + + /** CarState eventJoined */ + eventJoined: boolean; + + /** CarState transferred */ + transferred: boolean; + + /** CarState driveLastPlayedAt */ + driveLastPlayedAt?: (number|null); + } + + /** Represents a CarState. */ + class CarState implements ICarState { + + /** + * Constructs a new CarState. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadUserResponse.ICarState); + + /** CarState hasOpponentGhost. */ + public hasOpponentGhost: boolean; + + /** CarState competitionState. */ + public competitionState: wm.protobuf.GhostCompetitionParticipantState; + + /** CarState toBeDeleted. */ + public toBeDeleted: boolean; + + /** CarState eventJoined. */ + public eventJoined: boolean; + + /** CarState transferred. */ + public transferred: boolean; + + /** CarState driveLastPlayedAt. */ + public driveLastPlayedAt: number; + + /** + * Creates a new CarState instance using the specified properties. + * @param [properties] Properties to set + * @returns CarState instance + */ + public static create(properties?: wm.protobuf.LoadUserResponse.ICarState): wm.protobuf.LoadUserResponse.CarState; + + /** + * Encodes the specified CarState message. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @param message CarState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadUserResponse.ICarState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarState message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @param message CarState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadUserResponse.ICarState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUserResponse.CarState; + + /** + * Decodes a CarState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUserResponse.CarState; + + /** + * Verifies a CarState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarState + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUserResponse.CarState; + + /** + * Creates a plain object from a CarState message. Also converts values to other types if specified. + * @param message CarState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUserResponse.CarState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an UpdateUserSessionRequest. */ + interface IUpdateUserSessionRequest { + + /** UpdateUserSessionRequest userId */ + userId?: (number|null); + + /** UpdateUserSessionRequest cardChipId */ + cardChipId?: (string|null); + + /** UpdateUserSessionRequest accessCode */ + accessCode?: (string|null); + + /** UpdateUserSessionRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** UpdateUserSessionRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** UpdateUserSessionRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** UpdateUserSessionRequest unlockAt */ + unlockAt: number; + + /** UpdateUserSessionRequest acceptVs */ + acceptVs?: (boolean|null); + } + + /** Represents an UpdateUserSessionRequest. */ + class UpdateUserSessionRequest implements IUpdateUserSessionRequest { + + /** + * Constructs a new UpdateUserSessionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateUserSessionRequest); + + /** UpdateUserSessionRequest userId. */ + public userId: number; + + /** UpdateUserSessionRequest cardChipId. */ + public cardChipId: string; + + /** UpdateUserSessionRequest accessCode. */ + public accessCode: string; + + /** UpdateUserSessionRequest cardTypeCode. */ + public cardTypeCode: number; + + /** UpdateUserSessionRequest cardRegionCode. */ + public cardRegionCode: number; + + /** UpdateUserSessionRequest device. */ + public device: wm.protobuf.DeviceType; + + /** UpdateUserSessionRequest unlockAt. */ + public unlockAt: number; + + /** UpdateUserSessionRequest acceptVs. */ + public acceptVs: boolean; + + /** + * Creates a new UpdateUserSessionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserSessionRequest instance + */ + public static create(properties?: wm.protobuf.IUpdateUserSessionRequest): wm.protobuf.UpdateUserSessionRequest; + + /** + * Encodes the specified UpdateUserSessionRequest message. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @param message UpdateUserSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateUserSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserSessionRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @param message UpdateUserSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateUserSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateUserSessionRequest; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateUserSessionRequest; + + /** + * Verifies an UpdateUserSessionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateUserSessionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserSessionRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateUserSessionRequest; + + /** + * Creates a plain object from an UpdateUserSessionRequest message. Also converts values to other types if specified. + * @param message UpdateUserSessionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateUserSessionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserSessionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserSessionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateUserSessionResponse. */ + interface IUpdateUserSessionResponse { + + /** UpdateUserSessionResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents an UpdateUserSessionResponse. */ + class UpdateUserSessionResponse implements IUpdateUserSessionResponse { + + /** + * Constructs a new UpdateUserSessionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateUserSessionResponse); + + /** UpdateUserSessionResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new UpdateUserSessionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserSessionResponse instance + */ + public static create(properties?: wm.protobuf.IUpdateUserSessionResponse): wm.protobuf.UpdateUserSessionResponse; + + /** + * Encodes the specified UpdateUserSessionResponse message. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @param message UpdateUserSessionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateUserSessionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserSessionResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @param message UpdateUserSessionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateUserSessionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateUserSessionResponse; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateUserSessionResponse; + + /** + * Verifies an UpdateUserSessionResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateUserSessionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserSessionResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateUserSessionResponse; + + /** + * Creates a plain object from an UpdateUserSessionResponse message. Also converts values to other types if specified. + * @param message UpdateUserSessionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateUserSessionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserSessionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserSessionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadDriveInformationRequest. */ + interface ILoadDriveInformationRequest { + + /** LoadDriveInformationRequest userId */ + userId?: (number|null); + } + + /** Represents a LoadDriveInformationRequest. */ + class LoadDriveInformationRequest implements ILoadDriveInformationRequest { + + /** + * Constructs a new LoadDriveInformationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadDriveInformationRequest); + + /** LoadDriveInformationRequest userId. */ + public userId: number; + + /** + * Creates a new LoadDriveInformationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadDriveInformationRequest instance + */ + public static create(properties?: wm.protobuf.ILoadDriveInformationRequest): wm.protobuf.LoadDriveInformationRequest; + + /** + * Encodes the specified LoadDriveInformationRequest message. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @param message LoadDriveInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadDriveInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadDriveInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @param message LoadDriveInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadDriveInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadDriveInformationRequest; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadDriveInformationRequest; + + /** + * Verifies a LoadDriveInformationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadDriveInformationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadDriveInformationRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadDriveInformationRequest; + + /** + * Creates a plain object from a LoadDriveInformationRequest message. Also converts values to other types if specified. + * @param message LoadDriveInformationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadDriveInformationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadDriveInformationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadDriveInformationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadDriveInformationResponse. */ + interface ILoadDriveInformationResponse { + + /** LoadDriveInformationResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadDriveInformationResponse noticeWindow */ + noticeWindow?: (wm.protobuf.NoticeEntry[]|null); + + /** LoadDriveInformationResponse noticeWindowMessage */ + noticeWindowMessage?: (string[]|null); + + /** LoadDriveInformationResponse transferNotice */ + transferNotice?: (wm.protobuf.ITransferNotice|null); + + /** LoadDriveInformationResponse restrictedModels */ + restrictedModels?: (number[]|null); + + /** LoadDriveInformationResponse announceFeature */ + announceFeature?: (boolean|null); + + /** LoadDriveInformationResponse announceMobile */ + announceMobile?: (boolean|null); + + /** LoadDriveInformationResponse availableTickets */ + availableTickets?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a LoadDriveInformationResponse. */ + class LoadDriveInformationResponse implements ILoadDriveInformationResponse { + + /** + * Constructs a new LoadDriveInformationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadDriveInformationResponse); + + /** LoadDriveInformationResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadDriveInformationResponse noticeWindow. */ + public noticeWindow: wm.protobuf.NoticeEntry[]; + + /** LoadDriveInformationResponse noticeWindowMessage. */ + public noticeWindowMessage: string[]; + + /** LoadDriveInformationResponse transferNotice. */ + public transferNotice?: (wm.protobuf.ITransferNotice|null); + + /** LoadDriveInformationResponse restrictedModels. */ + public restrictedModels: number[]; + + /** LoadDriveInformationResponse announceFeature. */ + public announceFeature: boolean; + + /** LoadDriveInformationResponse announceMobile. */ + public announceMobile: boolean; + + /** LoadDriveInformationResponse availableTickets. */ + public availableTickets: wm.protobuf.IUserItem[]; + + /** + * Creates a new LoadDriveInformationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadDriveInformationResponse instance + */ + public static create(properties?: wm.protobuf.ILoadDriveInformationResponse): wm.protobuf.LoadDriveInformationResponse; + + /** + * Encodes the specified LoadDriveInformationResponse message. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @param message LoadDriveInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadDriveInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadDriveInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @param message LoadDriveInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadDriveInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadDriveInformationResponse; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadDriveInformationResponse; + + /** + * Verifies a LoadDriveInformationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadDriveInformationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadDriveInformationResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadDriveInformationResponse; + + /** + * Creates a plain object from a LoadDriveInformationResponse message. Also converts values to other types if specified. + * @param message LoadDriveInformationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadDriveInformationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadDriveInformationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadDriveInformationResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadCarRequest. */ + interface ILoadCarRequest { + + /** LoadCarRequest carId */ + carId: number; + + /** LoadCarRequest eventMode */ + eventMode?: (boolean|null); + + /** LoadCarRequest eventModeSerial */ + eventModeSerial?: (string|null); + } + + /** Represents a LoadCarRequest. */ + class LoadCarRequest implements ILoadCarRequest { + + /** + * Constructs a new LoadCarRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadCarRequest); + + /** LoadCarRequest carId. */ + public carId: number; + + /** LoadCarRequest eventMode. */ + public eventMode: boolean; + + /** LoadCarRequest eventModeSerial. */ + public eventModeSerial: string; + + /** + * Creates a new LoadCarRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadCarRequest instance + */ + public static create(properties?: wm.protobuf.ILoadCarRequest): wm.protobuf.LoadCarRequest; + + /** + * Encodes the specified LoadCarRequest message. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @param message LoadCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @param message LoadCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadCarRequest; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadCarRequest; + + /** + * Verifies a LoadCarRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadCarRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadCarRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadCarRequest; + + /** + * Creates a plain object from a LoadCarRequest message. Also converts values to other types if specified. + * @param message LoadCarRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadCarRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadCarRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadCarRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadCarResponse. */ + interface ILoadCarResponse { + + /** LoadCarResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadCarResponse car */ + car: wm.protobuf.ICar; + + /** LoadCarResponse tuningPoint */ + tuningPoint: number; + + /** LoadCarResponse odometer */ + odometer: number; + + /** LoadCarResponse playCount */ + playCount: number; + + /** LoadCarResponse earnedCustomColor */ + earnedCustomColor: boolean; + + /** LoadCarResponse setting */ + setting: wm.protobuf.ICarSetting; + + /** LoadCarResponse vsPlayCount */ + vsPlayCount: number; + + /** LoadCarResponse vsBurstCount */ + vsBurstCount: number; + + /** LoadCarResponse vsStarCount */ + vsStarCount: number; + + /** LoadCarResponse vsStarCountMax */ + vsStarCountMax: number; + + /** LoadCarResponse vsCoolOrWild */ + vsCoolOrWild: number; + + /** LoadCarResponse vsSmoothOrRough */ + vsSmoothOrRough: number; + + /** LoadCarResponse vsTripleStarMedals */ + vsTripleStarMedals: number; + + /** LoadCarResponse vsDoubleStarMedals */ + vsDoubleStarMedals: number; + + /** LoadCarResponse vsSingleStarMedals */ + vsSingleStarMedals: number; + + /** LoadCarResponse vsPlainMedals */ + vsPlainMedals: number; + + /** LoadCarResponse rgPlayCount */ + rgPlayCount: number; + + /** LoadCarResponse rgWinCount */ + rgWinCount: number; + + /** LoadCarResponse rgTrophy */ + rgTrophy: number; + + /** LoadCarResponse rgPreviousVersionPlayCount */ + rgPreviousVersionPlayCount: number; + + /** LoadCarResponse rgScore */ + rgScore: number; + + /** LoadCarResponse rgRegionMapScore */ + rgRegionMapScore?: (number[]|null); + + /** LoadCarResponse rgRegions */ + rgRegions?: (number[]|null); + + /** LoadCarResponse rgStamp */ + rgStamp: number; + + /** LoadCarResponse rgAcquireAllCrowns */ + rgAcquireAllCrowns: boolean; + + /** LoadCarResponse dressupLevel */ + dressupLevel: number; + + /** LoadCarResponse dressupPoint */ + dressupPoint: number; + + /** LoadCarResponse stPlayCount */ + stPlayCount: number; + + /** LoadCarResponse stClearBits */ + stClearBits: number; + + /** LoadCarResponse stClearDivCount */ + stClearDivCount: number; + + /** LoadCarResponse stClearCount */ + stClearCount: number; + + /** LoadCarResponse stLoseBits */ + stLoseBits: (number|Long); + + /** LoadCarResponse stConsecutiveWins */ + stConsecutiveWins: number; + + /** LoadCarResponse stConsecutiveWinsMax */ + stConsecutiveWinsMax: number; + + /** LoadCarResponse stCompleted_100Episodes */ + stCompleted_100Episodes: boolean; + + /** LoadCarResponse challenger */ + challenger?: (wm.protobuf.IChallengerCar|null); + + /** LoadCarResponse challengerReturnCount */ + challengerReturnCount?: (number|null); + + /** LoadCarResponse numOfChallengers */ + numOfChallengers?: (number|null); + + /** LoadCarResponse opponentGhost */ + opponentGhost?: (wm.protobuf.IGhostCar|null); + + /** LoadCarResponse opponentTrailId */ + opponentTrailId?: (number|Long|null); + + /** LoadCarResponse opponentCompetitionId */ + opponentCompetitionId?: (number|null); + + /** LoadCarResponse competitionParameter */ + competitionParameter?: (wm.protobuf.IGhostCompetitionParameter|null); + + /** LoadCarResponse specialTitles */ + specialTitles?: (string[]|null); + + /** LoadCarResponse earnedTitles */ + earnedTitles?: (string[]|null); + + /** LoadCarResponse ownedItems */ + ownedItems?: (wm.protobuf.ICarItem[]|null); + + /** LoadCarResponse auraMotifAutoChange */ + auraMotifAutoChange: boolean; + + /** LoadCarResponse screenshotCount */ + screenshotCount: number; + + /** LoadCarResponse announceEventModePrize */ + announceEventModePrize?: (boolean|null); + + /** LoadCarResponse transferred */ + transferred: boolean; + + /** LoadCarResponse driveLastPlayedAt */ + driveLastPlayedAt?: (number|null); + + /** LoadCarResponse insurance */ + insurance?: (wm.protobuf.LoadCarResponse.IStoryInsurance|null); + } + + /** Represents a LoadCarResponse. */ + class LoadCarResponse implements ILoadCarResponse { + + /** + * Constructs a new LoadCarResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadCarResponse); + + /** LoadCarResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadCarResponse car. */ + public car: wm.protobuf.ICar; + + /** LoadCarResponse tuningPoint. */ + public tuningPoint: number; + + /** LoadCarResponse odometer. */ + public odometer: number; + + /** LoadCarResponse playCount. */ + public playCount: number; + + /** LoadCarResponse earnedCustomColor. */ + public earnedCustomColor: boolean; + + /** LoadCarResponse setting. */ + public setting: wm.protobuf.ICarSetting; + + /** LoadCarResponse vsPlayCount. */ + public vsPlayCount: number; + + /** LoadCarResponse vsBurstCount. */ + public vsBurstCount: number; + + /** LoadCarResponse vsStarCount. */ + public vsStarCount: number; + + /** LoadCarResponse vsStarCountMax. */ + public vsStarCountMax: number; + + /** LoadCarResponse vsCoolOrWild. */ + public vsCoolOrWild: number; + + /** LoadCarResponse vsSmoothOrRough. */ + public vsSmoothOrRough: number; + + /** LoadCarResponse vsTripleStarMedals. */ + public vsTripleStarMedals: number; + + /** LoadCarResponse vsDoubleStarMedals. */ + public vsDoubleStarMedals: number; + + /** LoadCarResponse vsSingleStarMedals. */ + public vsSingleStarMedals: number; + + /** LoadCarResponse vsPlainMedals. */ + public vsPlainMedals: number; + + /** LoadCarResponse rgPlayCount. */ + public rgPlayCount: number; + + /** LoadCarResponse rgWinCount. */ + public rgWinCount: number; + + /** LoadCarResponse rgTrophy. */ + public rgTrophy: number; + + /** LoadCarResponse rgPreviousVersionPlayCount. */ + public rgPreviousVersionPlayCount: number; + + /** LoadCarResponse rgScore. */ + public rgScore: number; + + /** LoadCarResponse rgRegionMapScore. */ + public rgRegionMapScore: number[]; + + /** LoadCarResponse rgRegions. */ + public rgRegions: number[]; + + /** LoadCarResponse rgStamp. */ + public rgStamp: number; + + /** LoadCarResponse rgAcquireAllCrowns. */ + public rgAcquireAllCrowns: boolean; + + /** LoadCarResponse dressupLevel. */ + public dressupLevel: number; + + /** LoadCarResponse dressupPoint. */ + public dressupPoint: number; + + /** LoadCarResponse stPlayCount. */ + public stPlayCount: number; + + /** LoadCarResponse stClearBits. */ + public stClearBits: number; + + /** LoadCarResponse stClearDivCount. */ + public stClearDivCount: number; + + /** LoadCarResponse stClearCount. */ + public stClearCount: number; + + /** LoadCarResponse stLoseBits. */ + public stLoseBits: (number|Long); + + /** LoadCarResponse stConsecutiveWins. */ + public stConsecutiveWins: number; + + /** LoadCarResponse stConsecutiveWinsMax. */ + public stConsecutiveWinsMax: number; + + /** LoadCarResponse stCompleted_100Episodes. */ + public stCompleted_100Episodes: boolean; + + /** LoadCarResponse challenger. */ + public challenger?: (wm.protobuf.IChallengerCar|null); + + /** LoadCarResponse challengerReturnCount. */ + public challengerReturnCount: number; + + /** LoadCarResponse numOfChallengers. */ + public numOfChallengers: number; + + /** LoadCarResponse opponentGhost. */ + public opponentGhost?: (wm.protobuf.IGhostCar|null); + + /** LoadCarResponse opponentTrailId. */ + public opponentTrailId: (number|Long); + + /** LoadCarResponse opponentCompetitionId. */ + public opponentCompetitionId: number; + + /** LoadCarResponse competitionParameter. */ + public competitionParameter?: (wm.protobuf.IGhostCompetitionParameter|null); + + /** LoadCarResponse specialTitles. */ + public specialTitles: string[]; + + /** LoadCarResponse earnedTitles. */ + public earnedTitles: string[]; + + /** LoadCarResponse ownedItems. */ + public ownedItems: wm.protobuf.ICarItem[]; + + /** LoadCarResponse auraMotifAutoChange. */ + public auraMotifAutoChange: boolean; + + /** LoadCarResponse screenshotCount. */ + public screenshotCount: number; + + /** LoadCarResponse announceEventModePrize. */ + public announceEventModePrize: boolean; + + /** LoadCarResponse transferred. */ + public transferred: boolean; + + /** LoadCarResponse driveLastPlayedAt. */ + public driveLastPlayedAt: number; + + /** LoadCarResponse insurance. */ + public insurance?: (wm.protobuf.LoadCarResponse.IStoryInsurance|null); + + /** + * Creates a new LoadCarResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadCarResponse instance + */ + public static create(properties?: wm.protobuf.ILoadCarResponse): wm.protobuf.LoadCarResponse; + + /** + * Encodes the specified LoadCarResponse message. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @param message LoadCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @param message LoadCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadCarResponse; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadCarResponse; + + /** + * Verifies a LoadCarResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadCarResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadCarResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadCarResponse; + + /** + * Creates a plain object from a LoadCarResponse message. Also converts values to other types if specified. + * @param message LoadCarResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadCarResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadCarResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadCarResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadCarResponse { + + /** Properties of a StoryInsurance. */ + interface IStoryInsurance { + + /** StoryInsurance numOfRemains */ + numOfRemains: number; + } + + /** Represents a StoryInsurance. */ + class StoryInsurance implements IStoryInsurance { + + /** + * Constructs a new StoryInsurance. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadCarResponse.IStoryInsurance); + + /** StoryInsurance numOfRemains. */ + public numOfRemains: number; + + /** + * Creates a new StoryInsurance instance using the specified properties. + * @param [properties] Properties to set + * @returns StoryInsurance instance + */ + public static create(properties?: wm.protobuf.LoadCarResponse.IStoryInsurance): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Encodes the specified StoryInsurance message. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @param message StoryInsurance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadCarResponse.IStoryInsurance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoryInsurance message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @param message StoryInsurance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadCarResponse.IStoryInsurance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Verifies a StoryInsurance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StoryInsurance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoryInsurance + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadCarResponse.StoryInsurance; + + /** + * Creates a plain object from a StoryInsurance message. Also converts values to other types if specified. + * @param message StoryInsurance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadCarResponse.StoryInsurance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoryInsurance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoryInsurance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateCarRequest. */ + interface ICreateCarRequest { + + /** CreateCarRequest userId */ + userId?: (number|null); + + /** CreateCarRequest banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateCarRequest cardChipId */ + cardChipId?: (string|null); + + /** CreateCarRequest accessCode */ + accessCode?: (string|null); + + /** CreateCarRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** CreateCarRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** CreateCarRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** CreateCarRequest car */ + car: wm.protobuf.ICar; + + /** CreateCarRequest transmission */ + transmission: boolean; + + /** CreateCarRequest timestamp */ + timestamp: number; + + /** CreateCarRequest userItemId */ + userItemId?: (number|null); + + /** CreateCarRequest deletedCarId */ + deletedCarId?: (number|null); + } + + /** Represents a CreateCarRequest. */ + class CreateCarRequest implements ICreateCarRequest { + + /** + * Constructs a new CreateCarRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateCarRequest); + + /** CreateCarRequest userId. */ + public userId: number; + + /** CreateCarRequest banapassportAmId. */ + public banapassportAmId: number; + + /** CreateCarRequest cardChipId. */ + public cardChipId: string; + + /** CreateCarRequest accessCode. */ + public accessCode: string; + + /** CreateCarRequest cardTypeCode. */ + public cardTypeCode: number; + + /** CreateCarRequest cardRegionCode. */ + public cardRegionCode: number; + + /** CreateCarRequest device. */ + public device: wm.protobuf.DeviceType; + + /** CreateCarRequest car. */ + public car: wm.protobuf.ICar; + + /** CreateCarRequest transmission. */ + public transmission: boolean; + + /** CreateCarRequest timestamp. */ + public timestamp: number; + + /** CreateCarRequest userItemId. */ + public userItemId: number; + + /** CreateCarRequest deletedCarId. */ + public deletedCarId: number; + + /** + * Creates a new CreateCarRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCarRequest instance + */ + public static create(properties?: wm.protobuf.ICreateCarRequest): wm.protobuf.CreateCarRequest; + + /** + * Encodes the specified CreateCarRequest message. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @param message CreateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @param message CreateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateCarRequest; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateCarRequest; + + /** + * Verifies a CreateCarRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCarRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCarRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateCarRequest; + + /** + * Creates a plain object from a CreateCarRequest message. Also converts values to other types if specified. + * @param message CreateCarRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateCarRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCarRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCarRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateCarResponse. */ + interface ICreateCarResponse { + + /** CreateCarResponse error */ + error: wm.protobuf.ErrorCode; + + /** CreateCarResponse accessCode */ + accessCode?: (string|null); + + /** CreateCarResponse banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateCarResponse mbid */ + mbid?: (number|null); + + /** CreateCarResponse userId */ + userId: number; + + /** CreateCarResponse carId */ + carId: number; + + /** CreateCarResponse stClearBits */ + stClearBits?: (number|null); + + /** CreateCarResponse stClearDivCount */ + stClearDivCount?: (number|null); + + /** CreateCarResponse stClearCount */ + stClearCount?: (number|null); + + /** CreateCarResponse stLoseBits */ + stLoseBits?: (number|Long|null); + + /** CreateCarResponse stConsecutiveWins */ + stConsecutiveWins?: (number|null); + + /** CreateCarResponse stConsecutiveWinsMax */ + stConsecutiveWinsMax?: (number|null); + + /** CreateCarResponse fullTunedCarCouponUnreceivableAt */ + fullTunedCarCouponUnreceivableAt?: (number|null); + } + + /** Represents a CreateCarResponse. */ + class CreateCarResponse implements ICreateCarResponse { + + /** + * Constructs a new CreateCarResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateCarResponse); + + /** CreateCarResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** CreateCarResponse accessCode. */ + public accessCode: string; + + /** CreateCarResponse banapassportAmId. */ + public banapassportAmId: number; + + /** CreateCarResponse mbid. */ + public mbid: number; + + /** CreateCarResponse userId. */ + public userId: number; + + /** CreateCarResponse carId. */ + public carId: number; + + /** CreateCarResponse stClearBits. */ + public stClearBits: number; + + /** CreateCarResponse stClearDivCount. */ + public stClearDivCount: number; + + /** CreateCarResponse stClearCount. */ + public stClearCount: number; + + /** CreateCarResponse stLoseBits. */ + public stLoseBits: (number|Long); + + /** CreateCarResponse stConsecutiveWins. */ + public stConsecutiveWins: number; + + /** CreateCarResponse stConsecutiveWinsMax. */ + public stConsecutiveWinsMax: number; + + /** CreateCarResponse fullTunedCarCouponUnreceivableAt. */ + public fullTunedCarCouponUnreceivableAt: number; + + /** + * Creates a new CreateCarResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCarResponse instance + */ + public static create(properties?: wm.protobuf.ICreateCarResponse): wm.protobuf.CreateCarResponse; + + /** + * Encodes the specified CreateCarResponse message. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @param message CreateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @param message CreateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateCarResponse; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateCarResponse; + + /** + * Verifies a CreateCarResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCarResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCarResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateCarResponse; + + /** + * Creates a plain object from a CreateCarResponse message. Also converts values to other types if specified. + * @param message CreateCarResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateCarResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCarResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCarResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGameHistoryRequest. */ + interface ILoadGameHistoryRequest { + + /** LoadGameHistoryRequest carId */ + carId: number; + } + + /** Represents a LoadGameHistoryRequest. */ + class LoadGameHistoryRequest implements ILoadGameHistoryRequest { + + /** + * Constructs a new LoadGameHistoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGameHistoryRequest); + + /** LoadGameHistoryRequest carId. */ + public carId: number; + + /** + * Creates a new LoadGameHistoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGameHistoryRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGameHistoryRequest): wm.protobuf.LoadGameHistoryRequest; + + /** + * Encodes the specified LoadGameHistoryRequest message. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @param message LoadGameHistoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGameHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGameHistoryRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @param message LoadGameHistoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGameHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryRequest; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryRequest; + + /** + * Verifies a LoadGameHistoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGameHistoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGameHistoryRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryRequest; + + /** + * Creates a plain object from a LoadGameHistoryRequest message. Also converts values to other types if specified. + * @param message LoadGameHistoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGameHistoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGameHistoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGameHistoryResponse. */ + interface ILoadGameHistoryResponse { + + /** LoadGameHistoryResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGameHistoryResponse taRecords */ + taRecords?: (wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord[]|null); + + /** LoadGameHistoryResponse taRankingUpdatedAt */ + taRankingUpdatedAt: number; + + /** LoadGameHistoryResponse ghostHistory */ + ghostHistory?: (wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord[]|null); + + /** LoadGameHistoryResponse ghostBattleCount */ + ghostBattleCount: number; + + /** LoadGameHistoryResponse ghostBattleWinCount */ + ghostBattleWinCount: number; + + /** LoadGameHistoryResponse stampSheetCount */ + stampSheetCount: number; + + /** LoadGameHistoryResponse stampSheet */ + stampSheet?: (number[]|null); + } + + /** Represents a LoadGameHistoryResponse. */ + class LoadGameHistoryResponse implements ILoadGameHistoryResponse { + + /** + * Constructs a new LoadGameHistoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGameHistoryResponse); + + /** LoadGameHistoryResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGameHistoryResponse taRecords. */ + public taRecords: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord[]; + + /** LoadGameHistoryResponse taRankingUpdatedAt. */ + public taRankingUpdatedAt: number; + + /** LoadGameHistoryResponse ghostHistory. */ + public ghostHistory: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord[]; + + /** LoadGameHistoryResponse ghostBattleCount. */ + public ghostBattleCount: number; + + /** LoadGameHistoryResponse ghostBattleWinCount. */ + public ghostBattleWinCount: number; + + /** LoadGameHistoryResponse stampSheetCount. */ + public stampSheetCount: number; + + /** LoadGameHistoryResponse stampSheet. */ + public stampSheet: number[]; + + /** + * Creates a new LoadGameHistoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGameHistoryResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGameHistoryResponse): wm.protobuf.LoadGameHistoryResponse; + + /** + * Encodes the specified LoadGameHistoryResponse message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @param message LoadGameHistoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGameHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGameHistoryResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @param message LoadGameHistoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGameHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse; + + /** + * Verifies a LoadGameHistoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGameHistoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGameHistoryResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse; + + /** + * Creates a plain object from a LoadGameHistoryResponse message. Also converts values to other types if specified. + * @param message LoadGameHistoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGameHistoryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGameHistoryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGameHistoryResponse { + + /** Properties of a TimeAttackRecord. */ + interface ITimeAttackRecord { + + /** TimeAttackRecord course */ + course: number; + + /** TimeAttackRecord time */ + time?: (number|null); + + /** TimeAttackRecord tunePower */ + tunePower?: (number|null); + + /** TimeAttackRecord tuneHandling */ + tuneHandling?: (number|null); + + /** TimeAttackRecord wholeRank */ + wholeRank?: (number|null); + + /** TimeAttackRecord wholeParticipants */ + wholeParticipants: number; + + /** TimeAttackRecord modelRank */ + modelRank?: (number|null); + + /** TimeAttackRecord modelParticipants */ + modelParticipants: number; + } + + /** Represents a TimeAttackRecord. */ + class TimeAttackRecord implements ITimeAttackRecord { + + /** + * Constructs a new TimeAttackRecord. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord); + + /** TimeAttackRecord course. */ + public course: number; + + /** TimeAttackRecord time. */ + public time: number; + + /** TimeAttackRecord tunePower. */ + public tunePower: number; + + /** TimeAttackRecord tuneHandling. */ + public tuneHandling: number; + + /** TimeAttackRecord wholeRank. */ + public wholeRank: number; + + /** TimeAttackRecord wholeParticipants. */ + public wholeParticipants: number; + + /** TimeAttackRecord modelRank. */ + public modelRank: number; + + /** TimeAttackRecord modelParticipants. */ + public modelParticipants: number; + + /** + * Creates a new TimeAttackRecord instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeAttackRecord instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Encodes the specified TimeAttackRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @param message TimeAttackRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeAttackRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @param message TimeAttackRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Verifies a TimeAttackRecord message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeAttackRecord message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeAttackRecord + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord; + + /** + * Creates a plain object from a TimeAttackRecord message. Also converts values to other types if specified. + * @param message TimeAttackRecord + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeAttackRecord to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeAttackRecord + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostBattleRecord. */ + interface IGhostBattleRecord { + + /** GhostBattleRecord carSetting */ + carSetting: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting; + + /** GhostBattleRecord opponent */ + opponent: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar; + + /** GhostBattleRecord mobs */ + mobs?: (wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar[]|null); + + /** GhostBattleRecord area */ + area: number; + + /** GhostBattleRecord playedAt */ + playedAt: number; + + /** GhostBattleRecord playedShopName */ + playedShopName: string; + } + + /** Represents a GhostBattleRecord. */ + class GhostBattleRecord implements IGhostBattleRecord { + + /** + * Constructs a new GhostBattleRecord. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord); + + /** GhostBattleRecord carSetting. */ + public carSetting: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting; + + /** GhostBattleRecord opponent. */ + public opponent: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar; + + /** GhostBattleRecord mobs. */ + public mobs: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar[]; + + /** GhostBattleRecord area. */ + public area: number; + + /** GhostBattleRecord playedAt. */ + public playedAt: number; + + /** GhostBattleRecord playedShopName. */ + public playedShopName: string; + + /** + * Creates a new GhostBattleRecord instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleRecord instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Encodes the specified GhostBattleRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @param message GhostBattleRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @param message GhostBattleRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Verifies a GhostBattleRecord message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleRecord message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleRecord + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord; + + /** + * Creates a plain object from a GhostBattleRecord message. Also converts values to other types if specified. + * @param message GhostBattleRecord + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleRecord to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleRecord + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GhostBattleRecord { + + /** Properties of a GhostCarSetting. */ + interface IGhostCarSetting { + + /** GhostCarSetting tunePower */ + tunePower: number; + + /** GhostCarSetting tuneHandling */ + tuneHandling: number; + } + + /** Represents a GhostCarSetting. */ + class GhostCarSetting implements IGhostCarSetting { + + /** + * Constructs a new GhostCarSetting. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting); + + /** GhostCarSetting tunePower. */ + public tunePower: number; + + /** GhostCarSetting tuneHandling. */ + public tuneHandling: number; + + /** + * Creates a new GhostCarSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCarSetting instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Encodes the specified GhostCarSetting message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @param message GhostCarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCarSetting message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @param message GhostCarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Verifies a GhostCarSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCarSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCarSetting + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting; + + /** + * Creates a plain object from a GhostCarSetting message. Also converts values to other types if specified. + * @param message GhostCarSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCarSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCarSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostBattleRecordCar. */ + interface IGhostBattleRecordCar { + + /** GhostBattleRecordCar car */ + car: wm.protobuf.ICar; + + /** GhostBattleRecordCar result */ + result: number; + } + + /** Represents a GhostBattleRecordCar. */ + class GhostBattleRecordCar implements IGhostBattleRecordCar { + + /** + * Constructs a new GhostBattleRecordCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar); + + /** GhostBattleRecordCar car. */ + public car: wm.protobuf.ICar; + + /** GhostBattleRecordCar result. */ + public result: number; + + /** + * Creates a new GhostBattleRecordCar instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleRecordCar instance + */ + public static create(properties?: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Encodes the specified GhostBattleRecordCar message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @param message GhostBattleRecordCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleRecordCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @param message GhostBattleRecordCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Verifies a GhostBattleRecordCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleRecordCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleRecordCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar; + + /** + * Creates a plain object from a GhostBattleRecordCar message. Also converts values to other types if specified. + * @param message GhostBattleRecordCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleRecordCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleRecordCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of an UpdateCarRequest. */ + interface IUpdateCarRequest { + + /** UpdateCarRequest carId */ + carId: number; + + /** UpdateCarRequest car */ + car?: (wm.protobuf.ICar|null); + + /** UpdateCarRequest earnedItems */ + earnedItems?: (wm.protobuf.ICarItem[]|null); + + /** UpdateCarRequest setting */ + setting?: (wm.protobuf.ICarSetting|null); + + /** UpdateCarRequest toBeDeleted */ + toBeDeleted?: (boolean|null); + + /** UpdateCarRequest auraMotifAutoChange */ + auraMotifAutoChange?: (boolean|null); + + /** UpdateCarRequest rgStamp */ + rgStamp?: (number|null); + + /** UpdateCarRequest timestamp */ + timestamp: number; + } + + /** Represents an UpdateCarRequest. */ + class UpdateCarRequest implements IUpdateCarRequest { + + /** + * Constructs a new UpdateCarRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateCarRequest); + + /** UpdateCarRequest carId. */ + public carId: number; + + /** UpdateCarRequest car. */ + public car?: (wm.protobuf.ICar|null); + + /** UpdateCarRequest earnedItems. */ + public earnedItems: wm.protobuf.ICarItem[]; + + /** UpdateCarRequest setting. */ + public setting?: (wm.protobuf.ICarSetting|null); + + /** UpdateCarRequest toBeDeleted. */ + public toBeDeleted: boolean; + + /** UpdateCarRequest auraMotifAutoChange. */ + public auraMotifAutoChange: boolean; + + /** UpdateCarRequest rgStamp. */ + public rgStamp: number; + + /** UpdateCarRequest timestamp. */ + public timestamp: number; + + /** + * Creates a new UpdateCarRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCarRequest instance + */ + public static create(properties?: wm.protobuf.IUpdateCarRequest): wm.protobuf.UpdateCarRequest; + + /** + * Encodes the specified UpdateCarRequest message. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @param message UpdateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @param message UpdateCarRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateCarRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateCarRequest; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateCarRequest; + + /** + * Verifies an UpdateCarRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateCarRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCarRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateCarRequest; + + /** + * Creates a plain object from an UpdateCarRequest message. Also converts values to other types if specified. + * @param message UpdateCarRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateCarRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCarRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCarRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateCarResponse. */ + interface IUpdateCarResponse { + + /** UpdateCarResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents an UpdateCarResponse. */ + class UpdateCarResponse implements IUpdateCarResponse { + + /** + * Constructs a new UpdateCarResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateCarResponse); + + /** UpdateCarResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new UpdateCarResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCarResponse instance + */ + public static create(properties?: wm.protobuf.IUpdateCarResponse): wm.protobuf.UpdateCarResponse; + + /** + * Encodes the specified UpdateCarResponse message. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @param message UpdateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @param message UpdateCarResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateCarResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateCarResponse; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateCarResponse; + + /** + * Verifies an UpdateCarResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateCarResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCarResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateCarResponse; + + /** + * Creates a plain object from an UpdateCarResponse message. Also converts values to other types if specified. + * @param message UpdateCarResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateCarResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCarResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCarResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveGameResultRequest. */ + interface ISaveGameResultRequest { + + /** SaveGameResultRequest carId */ + carId: number; + + /** SaveGameResultRequest gameMode */ + gameMode: wm.protobuf.GameMode; + + /** SaveGameResultRequest playedAt */ + playedAt: number; + + /** SaveGameResultRequest playCount */ + playCount: number; + + /** SaveGameResultRequest retired */ + retired: boolean; + + /** SaveGameResultRequest timeup */ + timeup: boolean; + + /** SaveGameResultRequest car */ + car?: (wm.protobuf.ICar|null); + + /** SaveGameResultRequest setting */ + setting?: (wm.protobuf.ICarSetting|null); + + /** SaveGameResultRequest odometer */ + odometer?: (number|null); + + /** SaveGameResultRequest earnedCustomColor */ + earnedCustomColor?: (boolean|null); + + /** SaveGameResultRequest confirmedTutorials */ + confirmedTutorials?: (wm.protobuf.TutorialType[]|null); + + /** SaveGameResultRequest earnedItems */ + earnedItems?: (wm.protobuf.ICarItem[]|null); + + /** SaveGameResultRequest earnedUserItems */ + earnedUserItems?: (wm.protobuf.IUserItem[]|null); + + /** SaveGameResultRequest preservedTitles */ + preservedTitles?: (string[]|null); + + /** SaveGameResultRequest neighborCars */ + neighborCars?: (number[]|null); + + /** SaveGameResultRequest stResult */ + stResult?: (wm.protobuf.SaveGameResultRequest.IStoryResult|null); + + /** SaveGameResultRequest taResult */ + taResult?: (wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null); + + /** SaveGameResultRequest vsResult */ + vsResult?: (wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null); + + /** SaveGameResultRequest rgResult */ + rgResult?: (wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null); + } + + /** Represents a SaveGameResultRequest. */ + class SaveGameResultRequest implements ISaveGameResultRequest { + + /** + * Constructs a new SaveGameResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveGameResultRequest); + + /** SaveGameResultRequest carId. */ + public carId: number; + + /** SaveGameResultRequest gameMode. */ + public gameMode: wm.protobuf.GameMode; + + /** SaveGameResultRequest playedAt. */ + public playedAt: number; + + /** SaveGameResultRequest playCount. */ + public playCount: number; + + /** SaveGameResultRequest retired. */ + public retired: boolean; + + /** SaveGameResultRequest timeup. */ + public timeup: boolean; + + /** SaveGameResultRequest car. */ + public car?: (wm.protobuf.ICar|null); + + /** SaveGameResultRequest setting. */ + public setting?: (wm.protobuf.ICarSetting|null); + + /** SaveGameResultRequest odometer. */ + public odometer: number; + + /** SaveGameResultRequest earnedCustomColor. */ + public earnedCustomColor: boolean; + + /** SaveGameResultRequest confirmedTutorials. */ + public confirmedTutorials: wm.protobuf.TutorialType[]; + + /** SaveGameResultRequest earnedItems. */ + public earnedItems: wm.protobuf.ICarItem[]; + + /** SaveGameResultRequest earnedUserItems. */ + public earnedUserItems: wm.protobuf.IUserItem[]; + + /** SaveGameResultRequest preservedTitles. */ + public preservedTitles: string[]; + + /** SaveGameResultRequest neighborCars. */ + public neighborCars: number[]; + + /** SaveGameResultRequest stResult. */ + public stResult?: (wm.protobuf.SaveGameResultRequest.IStoryResult|null); + + /** SaveGameResultRequest taResult. */ + public taResult?: (wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null); + + /** SaveGameResultRequest vsResult. */ + public vsResult?: (wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null); + + /** SaveGameResultRequest rgResult. */ + public rgResult?: (wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null); + + /** + * Creates a new SaveGameResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveGameResultRequest instance + */ + public static create(properties?: wm.protobuf.ISaveGameResultRequest): wm.protobuf.SaveGameResultRequest; + + /** + * Encodes the specified SaveGameResultRequest message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @param message SaveGameResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveGameResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveGameResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @param message SaveGameResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveGameResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest; + + /** + * Verifies a SaveGameResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveGameResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveGameResultRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest; + + /** + * Creates a plain object from a SaveGameResultRequest message. Also converts values to other types if specified. + * @param message SaveGameResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveGameResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveGameResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SaveGameResultRequest { + + /** Properties of a StoryResult. */ + interface IStoryResult { + + /** StoryResult stPlayCount */ + stPlayCount: number; + + /** StoryResult stPlayedStory */ + stPlayedStory: number; + + /** StoryResult tuningPoint */ + tuningPoint?: (number|null); + + /** StoryResult stClearBits */ + stClearBits?: (number|null); + + /** StoryResult stClearDivCount */ + stClearDivCount?: (number|null); + + /** StoryResult stClearCount */ + stClearCount?: (number|null); + + /** StoryResult stLoseBits */ + stLoseBits?: (number|Long|null); + + /** StoryResult stConsecutiveWins */ + stConsecutiveWins?: (number|null); + + /** StoryResult stCompleted_100Episodes */ + stCompleted_100Episodes?: (boolean|null); + + /** StoryResult isInsuranceUsed */ + isInsuranceUsed?: (boolean|null); + } + + /** Represents a StoryResult. */ + class StoryResult implements IStoryResult { + + /** + * Constructs a new StoryResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.IStoryResult); + + /** StoryResult stPlayCount. */ + public stPlayCount: number; + + /** StoryResult stPlayedStory. */ + public stPlayedStory: number; + + /** StoryResult tuningPoint. */ + public tuningPoint: number; + + /** StoryResult stClearBits. */ + public stClearBits: number; + + /** StoryResult stClearDivCount. */ + public stClearDivCount: number; + + /** StoryResult stClearCount. */ + public stClearCount: number; + + /** StoryResult stLoseBits. */ + public stLoseBits: (number|Long); + + /** StoryResult stConsecutiveWins. */ + public stConsecutiveWins: number; + + /** StoryResult stCompleted_100Episodes. */ + public stCompleted_100Episodes: boolean; + + /** StoryResult isInsuranceUsed. */ + public isInsuranceUsed: boolean; + + /** + * Creates a new StoryResult instance using the specified properties. + * @param [properties] Properties to set + * @returns StoryResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.IStoryResult): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Encodes the specified StoryResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @param message StoryResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.IStoryResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoryResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @param message StoryResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.IStoryResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoryResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Decodes a StoryResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Verifies a StoryResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StoryResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoryResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.StoryResult; + + /** + * Creates a plain object from a StoryResult message. Also converts values to other types if specified. + * @param message StoryResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.StoryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoryResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoryResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeAttackResult. */ + interface ITimeAttackResult { + + /** TimeAttackResult time */ + time: number; + + /** TimeAttackResult course */ + course: number; + + /** TimeAttackResult isMorning */ + isMorning: boolean; + + /** TimeAttackResult section_1Time */ + section_1Time: number; + + /** TimeAttackResult section_2Time */ + section_2Time: number; + + /** TimeAttackResult section_3Time */ + section_3Time: number; + + /** TimeAttackResult section_4Time */ + section_4Time: number; + + /** TimeAttackResult section_5Time */ + section_5Time?: (number|null); + + /** TimeAttackResult section_6Time */ + section_6Time?: (number|null); + + /** TimeAttackResult section_7Time */ + section_7Time?: (number|null); + + /** TimeAttackResult wholeRank */ + wholeRank?: (number|null); + + /** TimeAttackResult modelRank */ + modelRank?: (number|null); + } + + /** Represents a TimeAttackResult. */ + class TimeAttackResult implements ITimeAttackResult { + + /** + * Constructs a new TimeAttackResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.ITimeAttackResult); + + /** TimeAttackResult time. */ + public time: number; + + /** TimeAttackResult course. */ + public course: number; + + /** TimeAttackResult isMorning. */ + public isMorning: boolean; + + /** TimeAttackResult section_1Time. */ + public section_1Time: number; + + /** TimeAttackResult section_2Time. */ + public section_2Time: number; + + /** TimeAttackResult section_3Time. */ + public section_3Time: number; + + /** TimeAttackResult section_4Time. */ + public section_4Time: number; + + /** TimeAttackResult section_5Time. */ + public section_5Time: number; + + /** TimeAttackResult section_6Time. */ + public section_6Time: number; + + /** TimeAttackResult section_7Time. */ + public section_7Time: number; + + /** TimeAttackResult wholeRank. */ + public wholeRank: number; + + /** TimeAttackResult modelRank. */ + public modelRank: number; + + /** + * Creates a new TimeAttackResult instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeAttackResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.ITimeAttackResult): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Encodes the specified TimeAttackResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @param message TimeAttackResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.ITimeAttackResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeAttackResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @param message TimeAttackResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.ITimeAttackResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Verifies a TimeAttackResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeAttackResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeAttackResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.TimeAttackResult; + + /** + * Creates a plain object from a TimeAttackResult message. Also converts values to other types if specified. + * @param message TimeAttackResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.TimeAttackResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeAttackResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeAttackResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VersusBattleResult. */ + interface IVersusBattleResult { + + /** VersusBattleResult result */ + result: number; + + /** VersusBattleResult survived */ + survived: boolean; + + /** VersusBattleResult opponentCarId */ + opponentCarId?: (number[]|null); + + /** VersusBattleResult numOfPlayers */ + numOfPlayers: number; + + /** VersusBattleResult area */ + area: number; + + /** VersusBattleResult isMorning */ + isMorning: boolean; + + /** VersusBattleResult vsPlayCount */ + vsPlayCount: number; + + /** VersusBattleResult vsBurstCount */ + vsBurstCount?: (number|null); + + /** VersusBattleResult vsStarCount */ + vsStarCount?: (number|null); + + /** VersusBattleResult vsCoolOrWild */ + vsCoolOrWild?: (number|null); + + /** VersusBattleResult vsSmoothOrRough */ + vsSmoothOrRough?: (number|null); + + /** VersusBattleResult vsTripleStarMedals */ + vsTripleStarMedals?: (number|null); + + /** VersusBattleResult vsDoubleStarMedals */ + vsDoubleStarMedals?: (number|null); + + /** VersusBattleResult vsSingleStarMedals */ + vsSingleStarMedals?: (number|null); + + /** VersusBattleResult vsPlainMedals */ + vsPlainMedals?: (number|null); + } + + /** Represents a VersusBattleResult. */ + class VersusBattleResult implements IVersusBattleResult { + + /** + * Constructs a new VersusBattleResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.IVersusBattleResult); + + /** VersusBattleResult result. */ + public result: number; + + /** VersusBattleResult survived. */ + public survived: boolean; + + /** VersusBattleResult opponentCarId. */ + public opponentCarId: number[]; + + /** VersusBattleResult numOfPlayers. */ + public numOfPlayers: number; + + /** VersusBattleResult area. */ + public area: number; + + /** VersusBattleResult isMorning. */ + public isMorning: boolean; + + /** VersusBattleResult vsPlayCount. */ + public vsPlayCount: number; + + /** VersusBattleResult vsBurstCount. */ + public vsBurstCount: number; + + /** VersusBattleResult vsStarCount. */ + public vsStarCount: number; + + /** VersusBattleResult vsCoolOrWild. */ + public vsCoolOrWild: number; + + /** VersusBattleResult vsSmoothOrRough. */ + public vsSmoothOrRough: number; + + /** VersusBattleResult vsTripleStarMedals. */ + public vsTripleStarMedals: number; + + /** VersusBattleResult vsDoubleStarMedals. */ + public vsDoubleStarMedals: number; + + /** VersusBattleResult vsSingleStarMedals. */ + public vsSingleStarMedals: number; + + /** VersusBattleResult vsPlainMedals. */ + public vsPlainMedals: number; + + /** + * Creates a new VersusBattleResult instance using the specified properties. + * @param [properties] Properties to set + * @returns VersusBattleResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.IVersusBattleResult): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Encodes the specified VersusBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @param message VersusBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.IVersusBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VersusBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @param message VersusBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.IVersusBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Verifies a VersusBattleResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VersusBattleResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersusBattleResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.VersusBattleResult; + + /** + * Creates a plain object from a VersusBattleResult message. Also converts values to other types if specified. + * @param message VersusBattleResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.VersusBattleResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VersusBattleResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VersusBattleResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostBattleResult. */ + interface IGhostBattleResult { + + /** GhostBattleResult opponents */ + opponents?: (wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent[]|null); + + /** GhostBattleResult path */ + path: number; + + /** GhostBattleResult isMorning */ + isMorning: boolean; + + /** GhostBattleResult selectionMethod */ + selectionMethod: wm.protobuf.GhostSelectionMethod; + + /** GhostBattleResult stampSheetCount */ + stampSheetCount?: (number|null); + + /** GhostBattleResult stampSheet */ + stampSheet?: (number[]|null); + + /** GhostBattleResult rgStamp */ + rgStamp?: (number|null); + + /** GhostBattleResult confirmedTransferredStampTargetCarIds */ + confirmedTransferredStampTargetCarIds?: (number[]|null); + + /** GhostBattleResult rgPlayCount */ + rgPlayCount: number; + + /** GhostBattleResult dressupLevel */ + dressupLevel?: (number|null); + + /** GhostBattleResult dressupPoint */ + dressupPoint?: (number|null); + + /** GhostBattleResult rgRegionMapScore */ + rgRegionMapScore?: (number[]|null); + + /** GhostBattleResult competitionId */ + competitionId?: (number|null); + + /** GhostBattleResult periodId */ + periodId?: (number|null); + + /** GhostBattleResult brakingPoint */ + brakingPoint?: (number|null); + + /** GhostBattleResult acquireCrown */ + acquireCrown?: (boolean|null); + + /** GhostBattleResult acquireAllCrowns */ + acquireAllCrowns?: (boolean|null); + } + + /** Represents a GhostBattleResult. */ + class GhostBattleResult implements IGhostBattleResult { + + /** + * Constructs a new GhostBattleResult. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.IGhostBattleResult); + + /** GhostBattleResult opponents. */ + public opponents: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent[]; + + /** GhostBattleResult path. */ + public path: number; + + /** GhostBattleResult isMorning. */ + public isMorning: boolean; + + /** GhostBattleResult selectionMethod. */ + public selectionMethod: wm.protobuf.GhostSelectionMethod; + + /** GhostBattleResult stampSheetCount. */ + public stampSheetCount: number; + + /** GhostBattleResult stampSheet. */ + public stampSheet: number[]; + + /** GhostBattleResult rgStamp. */ + public rgStamp: number; + + /** GhostBattleResult confirmedTransferredStampTargetCarIds. */ + public confirmedTransferredStampTargetCarIds: number[]; + + /** GhostBattleResult rgPlayCount. */ + public rgPlayCount: number; + + /** GhostBattleResult dressupLevel. */ + public dressupLevel: number; + + /** GhostBattleResult dressupPoint. */ + public dressupPoint: number; + + /** GhostBattleResult rgRegionMapScore. */ + public rgRegionMapScore: number[]; + + /** GhostBattleResult competitionId. */ + public competitionId: number; + + /** GhostBattleResult periodId. */ + public periodId: number; + + /** GhostBattleResult brakingPoint. */ + public brakingPoint: number; + + /** GhostBattleResult acquireCrown. */ + public acquireCrown: boolean; + + /** GhostBattleResult acquireAllCrowns. */ + public acquireAllCrowns: boolean; + + /** + * Creates a new GhostBattleResult instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleResult instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.IGhostBattleResult): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Encodes the specified GhostBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @param message GhostBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.IGhostBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @param message GhostBattleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.IGhostBattleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Verifies a GhostBattleResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleResult + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.GhostBattleResult; + + /** + * Creates a plain object from a GhostBattleResult message. Also converts values to other types if specified. + * @param message GhostBattleResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GhostBattleResult { + + /** Properties of a GhostBattleOpponent. */ + interface IGhostBattleOpponent { + + /** GhostBattleOpponent result */ + result: number; + + /** GhostBattleOpponent carId */ + carId: number; + + /** GhostBattleOpponent tunePower */ + tunePower: number; + + /** GhostBattleOpponent tuneHandling */ + tuneHandling: number; + + /** GhostBattleOpponent receiveStamp */ + receiveStamp?: (boolean|null); + } + + /** Represents a GhostBattleOpponent. */ + class GhostBattleOpponent implements IGhostBattleOpponent { + + /** + * Constructs a new GhostBattleOpponent. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent); + + /** GhostBattleOpponent result. */ + public result: number; + + /** GhostBattleOpponent carId. */ + public carId: number; + + /** GhostBattleOpponent tunePower. */ + public tunePower: number; + + /** GhostBattleOpponent tuneHandling. */ + public tuneHandling: number; + + /** GhostBattleOpponent receiveStamp. */ + public receiveStamp: boolean; + + /** + * Creates a new GhostBattleOpponent instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleOpponent instance + */ + public static create(properties?: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Encodes the specified GhostBattleOpponent message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @param message GhostBattleOpponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleOpponent message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @param message GhostBattleOpponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Verifies a GhostBattleOpponent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleOpponent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleOpponent + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent; + + /** + * Creates a plain object from a GhostBattleOpponent message. Also converts values to other types if specified. + * @param message GhostBattleOpponent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleOpponent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleOpponent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a SaveGameResultResponse. */ + interface ISaveGameResultResponse { + + /** SaveGameResultResponse error */ + error: wm.protobuf.ErrorCode; + + /** SaveGameResultResponse ghostSessionId */ + ghostSessionId?: (number|Long|null); + + /** SaveGameResultResponse availableTickets */ + availableTickets?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a SaveGameResultResponse. */ + class SaveGameResultResponse implements ISaveGameResultResponse { + + /** + * Constructs a new SaveGameResultResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveGameResultResponse); + + /** SaveGameResultResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** SaveGameResultResponse ghostSessionId. */ + public ghostSessionId: (number|Long); + + /** SaveGameResultResponse availableTickets. */ + public availableTickets: wm.protobuf.IUserItem[]; + + /** + * Creates a new SaveGameResultResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveGameResultResponse instance + */ + public static create(properties?: wm.protobuf.ISaveGameResultResponse): wm.protobuf.SaveGameResultResponse; + + /** + * Encodes the specified SaveGameResultResponse message. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @param message SaveGameResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveGameResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveGameResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @param message SaveGameResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveGameResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveGameResultResponse; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveGameResultResponse; + + /** + * Verifies a SaveGameResultResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveGameResultResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveGameResultResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveGameResultResponse; + + /** + * Creates a plain object from a SaveGameResultResponse message. Also converts values to other types if specified. + * @param message SaveGameResultResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveGameResultResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveGameResultResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveGameResultResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveChargeRequest. */ + interface ISaveChargeRequest { + + /** SaveChargeRequest chargeLogs */ + chargeLogs?: (wm.protobuf.SaveChargeRequest.IChargeLog[]|null); + } + + /** Represents a SaveChargeRequest. */ + class SaveChargeRequest implements ISaveChargeRequest { + + /** + * Constructs a new SaveChargeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveChargeRequest); + + /** SaveChargeRequest chargeLogs. */ + public chargeLogs: wm.protobuf.SaveChargeRequest.IChargeLog[]; + + /** + * Creates a new SaveChargeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveChargeRequest instance + */ + public static create(properties?: wm.protobuf.ISaveChargeRequest): wm.protobuf.SaveChargeRequest; + + /** + * Encodes the specified SaveChargeRequest message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @param message SaveChargeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveChargeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveChargeRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @param message SaveChargeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveChargeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveChargeRequest; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveChargeRequest; + + /** + * Verifies a SaveChargeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveChargeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveChargeRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveChargeRequest; + + /** + * Creates a plain object from a SaveChargeRequest message. Also converts values to other types if specified. + * @param message SaveChargeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveChargeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveChargeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveChargeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SaveChargeRequest { + + /** Properties of a ChargeLog. */ + interface IChargeLog { + + /** ChargeLog datetime */ + datetime: number; + + /** ChargeLog pcbSerial */ + pcbSerial: string; + + /** ChargeLog placeId */ + placeId: string; + + /** ChargeLog userId */ + userId?: (number|null); + } + + /** Represents a ChargeLog. */ + class ChargeLog implements IChargeLog { + + /** + * Constructs a new ChargeLog. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveChargeRequest.IChargeLog); + + /** ChargeLog datetime. */ + public datetime: number; + + /** ChargeLog pcbSerial. */ + public pcbSerial: string; + + /** ChargeLog placeId. */ + public placeId: string; + + /** ChargeLog userId. */ + public userId: number; + + /** + * Creates a new ChargeLog instance using the specified properties. + * @param [properties] Properties to set + * @returns ChargeLog instance + */ + public static create(properties?: wm.protobuf.SaveChargeRequest.IChargeLog): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Encodes the specified ChargeLog message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @param message ChargeLog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveChargeRequest.IChargeLog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChargeLog message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @param message ChargeLog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveChargeRequest.IChargeLog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChargeLog message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Decodes a ChargeLog message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Verifies a ChargeLog message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChargeLog message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChargeLog + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveChargeRequest.ChargeLog; + + /** + * Creates a plain object from a ChargeLog message. Also converts values to other types if specified. + * @param message ChargeLog + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveChargeRequest.ChargeLog, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChargeLog to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChargeLog + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SaveChargeResponse. */ + interface ISaveChargeResponse { + + /** SaveChargeResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveChargeResponse. */ + class SaveChargeResponse implements ISaveChargeResponse { + + /** + * Constructs a new SaveChargeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveChargeResponse); + + /** SaveChargeResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveChargeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveChargeResponse instance + */ + public static create(properties?: wm.protobuf.ISaveChargeResponse): wm.protobuf.SaveChargeResponse; + + /** + * Encodes the specified SaveChargeResponse message. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @param message SaveChargeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveChargeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveChargeResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @param message SaveChargeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveChargeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveChargeResponse; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveChargeResponse; + + /** + * Verifies a SaveChargeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveChargeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveChargeResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveChargeResponse; + + /** + * Creates a plain object from a SaveChargeResponse message. Also converts values to other types if specified. + * @param message SaveChargeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveChargeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveChargeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveChargeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostBattleInfoRequest. */ + interface ILoadGhostBattleInfoRequest { + + /** LoadGhostBattleInfoRequest carId */ + carId: number; + } + + /** Represents a LoadGhostBattleInfoRequest. */ + class LoadGhostBattleInfoRequest implements ILoadGhostBattleInfoRequest { + + /** + * Constructs a new LoadGhostBattleInfoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostBattleInfoRequest); + + /** LoadGhostBattleInfoRequest carId. */ + public carId: number; + + /** + * Creates a new LoadGhostBattleInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostBattleInfoRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostBattleInfoRequest): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @param message LoadGhostBattleInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostBattleInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @param message LoadGhostBattleInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostBattleInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Verifies a LoadGhostBattleInfoRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostBattleInfoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostBattleInfoRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostBattleInfoRequest; + + /** + * Creates a plain object from a LoadGhostBattleInfoRequest message. Also converts values to other types if specified. + * @param message LoadGhostBattleInfoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostBattleInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostBattleInfoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostBattleInfoRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostBattleInfoResponse. */ + interface ILoadGhostBattleInfoResponse { + + /** LoadGhostBattleInfoResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostBattleInfoResponse friendCars */ + friendCars?: (wm.protobuf.IFriendCar[]|null); + + /** LoadGhostBattleInfoResponse challengers */ + challengers?: (wm.protobuf.IChallengerCar[]|null); + + /** LoadGhostBattleInfoResponse stampTargetCars */ + stampTargetCars?: (wm.protobuf.IStampTargetCar[]|null); + + /** LoadGhostBattleInfoResponse previousVersionStampTargetCars */ + previousVersionStampTargetCars?: (wm.protobuf.IPreviousVersionStampTargetCar[]|null); + + /** LoadGhostBattleInfoResponse bookmarkedCars */ + bookmarkedCars?: (wm.protobuf.IBookmarkedCar[]|null); + + /** LoadGhostBattleInfoResponse history */ + history?: (wm.protobuf.ICar[]|null); + + /** LoadGhostBattleInfoResponse weakenedCars */ + weakenedCars?: (wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar[]|null); + + /** LoadGhostBattleInfoResponse stampSheetCount */ + stampSheetCount: number; + + /** LoadGhostBattleInfoResponse stampSheet */ + stampSheet?: (number[]|null); + + /** LoadGhostBattleInfoResponse stampReturnStats */ + stampReturnStats?: (number[]|null); + } + + /** Represents a LoadGhostBattleInfoResponse. */ + class LoadGhostBattleInfoResponse implements ILoadGhostBattleInfoResponse { + + /** + * Constructs a new LoadGhostBattleInfoResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostBattleInfoResponse); + + /** LoadGhostBattleInfoResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostBattleInfoResponse friendCars. */ + public friendCars: wm.protobuf.IFriendCar[]; + + /** LoadGhostBattleInfoResponse challengers. */ + public challengers: wm.protobuf.IChallengerCar[]; + + /** LoadGhostBattleInfoResponse stampTargetCars. */ + public stampTargetCars: wm.protobuf.IStampTargetCar[]; + + /** LoadGhostBattleInfoResponse previousVersionStampTargetCars. */ + public previousVersionStampTargetCars: wm.protobuf.IPreviousVersionStampTargetCar[]; + + /** LoadGhostBattleInfoResponse bookmarkedCars. */ + public bookmarkedCars: wm.protobuf.IBookmarkedCar[]; + + /** LoadGhostBattleInfoResponse history. */ + public history: wm.protobuf.ICar[]; + + /** LoadGhostBattleInfoResponse weakenedCars. */ + public weakenedCars: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar[]; + + /** LoadGhostBattleInfoResponse stampSheetCount. */ + public stampSheetCount: number; + + /** LoadGhostBattleInfoResponse stampSheet. */ + public stampSheet: number[]; + + /** LoadGhostBattleInfoResponse stampReturnStats. */ + public stampReturnStats: number[]; + + /** + * Creates a new LoadGhostBattleInfoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostBattleInfoResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostBattleInfoResponse): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @param message LoadGhostBattleInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostBattleInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @param message LoadGhostBattleInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostBattleInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Verifies a LoadGhostBattleInfoResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostBattleInfoResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostBattleInfoResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostBattleInfoResponse; + + /** + * Creates a plain object from a LoadGhostBattleInfoResponse message. Also converts values to other types if specified. + * @param message LoadGhostBattleInfoResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostBattleInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostBattleInfoResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostBattleInfoResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGhostBattleInfoResponse { + + /** Properties of a WeakenedCar. */ + interface IWeakenedCar { + + /** WeakenedCar carId */ + carId: number; + + /** WeakenedCar consecutiveLosses */ + consecutiveLosses: number; + } + + /** Represents a WeakenedCar. */ + class WeakenedCar implements IWeakenedCar { + + /** + * Constructs a new WeakenedCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar); + + /** WeakenedCar carId. */ + public carId: number; + + /** WeakenedCar consecutiveLosses. */ + public consecutiveLosses: number; + + /** + * Creates a new WeakenedCar instance using the specified properties. + * @param [properties] Properties to set + * @returns WeakenedCar instance + */ + public static create(properties?: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Encodes the specified WeakenedCar message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @param message WeakenedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeakenedCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @param message WeakenedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Verifies a WeakenedCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WeakenedCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeakenedCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar; + + /** + * Creates a plain object from a WeakenedCar message. Also converts values to other types if specified. + * @param message WeakenedCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeakenedCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WeakenedCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadStampTargetRequest. */ + interface ILoadStampTargetRequest { + + /** LoadStampTargetRequest carId */ + carId: number; + + /** LoadStampTargetRequest needToPromote */ + needToPromote: boolean; + } + + /** Represents a LoadStampTargetRequest. */ + class LoadStampTargetRequest implements ILoadStampTargetRequest { + + /** + * Constructs a new LoadStampTargetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadStampTargetRequest); + + /** LoadStampTargetRequest carId. */ + public carId: number; + + /** LoadStampTargetRequest needToPromote. */ + public needToPromote: boolean; + + /** + * Creates a new LoadStampTargetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadStampTargetRequest instance + */ + public static create(properties?: wm.protobuf.ILoadStampTargetRequest): wm.protobuf.LoadStampTargetRequest; + + /** + * Encodes the specified LoadStampTargetRequest message. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @param message LoadStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @param message LoadStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadStampTargetRequest; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadStampTargetRequest; + + /** + * Verifies a LoadStampTargetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadStampTargetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadStampTargetRequest; + + /** + * Creates a plain object from a LoadStampTargetRequest message. Also converts values to other types if specified. + * @param message LoadStampTargetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadStampTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadStampTargetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadStampTargetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadStampTargetResponse. */ + interface ILoadStampTargetResponse { + + /** LoadStampTargetResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadStampTargetResponse cars */ + cars?: (wm.protobuf.IStampTargetCar[]|null); + + /** LoadStampTargetResponse challengers */ + challengers?: (wm.protobuf.IChallengerCar[]|null); + } + + /** Represents a LoadStampTargetResponse. */ + class LoadStampTargetResponse implements ILoadStampTargetResponse { + + /** + * Constructs a new LoadStampTargetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadStampTargetResponse); + + /** LoadStampTargetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadStampTargetResponse cars. */ + public cars: wm.protobuf.IStampTargetCar[]; + + /** LoadStampTargetResponse challengers. */ + public challengers: wm.protobuf.IChallengerCar[]; + + /** + * Creates a new LoadStampTargetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadStampTargetResponse instance + */ + public static create(properties?: wm.protobuf.ILoadStampTargetResponse): wm.protobuf.LoadStampTargetResponse; + + /** + * Encodes the specified LoadStampTargetResponse message. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @param message LoadStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @param message LoadStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadStampTargetResponse; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadStampTargetResponse; + + /** + * Verifies a LoadStampTargetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadStampTargetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadStampTargetResponse; + + /** + * Creates a plain object from a LoadStampTargetResponse message. Also converts values to other types if specified. + * @param message LoadStampTargetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadStampTargetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadStampTargetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadStampTargetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LockStampTargetRequest. */ + interface ILockStampTargetRequest { + + /** LockStampTargetRequest carId */ + carId: number; + + /** LockStampTargetRequest targetCars */ + targetCars?: (number[]|null); + } + + /** Represents a LockStampTargetRequest. */ + class LockStampTargetRequest implements ILockStampTargetRequest { + + /** + * Constructs a new LockStampTargetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILockStampTargetRequest); + + /** LockStampTargetRequest carId. */ + public carId: number; + + /** LockStampTargetRequest targetCars. */ + public targetCars: number[]; + + /** + * Creates a new LockStampTargetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LockStampTargetRequest instance + */ + public static create(properties?: wm.protobuf.ILockStampTargetRequest): wm.protobuf.LockStampTargetRequest; + + /** + * Encodes the specified LockStampTargetRequest message. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @param message LockStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILockStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LockStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @param message LockStampTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILockStampTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LockStampTargetRequest; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LockStampTargetRequest; + + /** + * Verifies a LockStampTargetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LockStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LockStampTargetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LockStampTargetRequest; + + /** + * Creates a plain object from a LockStampTargetRequest message. Also converts values to other types if specified. + * @param message LockStampTargetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LockStampTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LockStampTargetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LockStampTargetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LockStampTargetResponse. */ + interface ILockStampTargetResponse { + + /** LockStampTargetResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a LockStampTargetResponse. */ + class LockStampTargetResponse implements ILockStampTargetResponse { + + /** + * Constructs a new LockStampTargetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILockStampTargetResponse); + + /** LockStampTargetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new LockStampTargetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LockStampTargetResponse instance + */ + public static create(properties?: wm.protobuf.ILockStampTargetResponse): wm.protobuf.LockStampTargetResponse; + + /** + * Encodes the specified LockStampTargetResponse message. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @param message LockStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILockStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LockStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @param message LockStampTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILockStampTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LockStampTargetResponse; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LockStampTargetResponse; + + /** + * Verifies a LockStampTargetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LockStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LockStampTargetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LockStampTargetResponse; + + /** + * Creates a plain object from a LockStampTargetResponse message. Also converts values to other types if specified. + * @param message LockStampTargetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LockStampTargetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LockStampTargetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LockStampTargetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionInfoRequest. */ + interface ILoadGhostCompetitionInfoRequest { + + /** LoadGhostCompetitionInfoRequest carId */ + carId: number; + + /** LoadGhostCompetitionInfoRequest competitionId */ + competitionId: number; + } + + /** Represents a LoadGhostCompetitionInfoRequest. */ + class LoadGhostCompetitionInfoRequest implements ILoadGhostCompetitionInfoRequest { + + /** + * Constructs a new LoadGhostCompetitionInfoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionInfoRequest); + + /** LoadGhostCompetitionInfoRequest carId. */ + public carId: number; + + /** LoadGhostCompetitionInfoRequest competitionId. */ + public competitionId: number; + + /** + * Creates a new LoadGhostCompetitionInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionInfoRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionInfoRequest): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @param message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @param message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Verifies a LoadGhostCompetitionInfoRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionInfoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionInfoRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionInfoRequest; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoRequest message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionInfoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionInfoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionInfoResponse. */ + interface ILoadGhostCompetitionInfoResponse { + + /** LoadGhostCompetitionInfoResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionInfoResponse periodId */ + periodId?: (number|null); + + /** LoadGhostCompetitionInfoResponse closed */ + closed: boolean; + + /** LoadGhostCompetitionInfoResponse brakingPoint */ + brakingPoint?: (number|null); + + /** LoadGhostCompetitionInfoResponse qualified */ + qualified?: (boolean|null); + + /** LoadGhostCompetitionInfoResponse topResults */ + topResults?: (number[]|null); + + /** LoadGhostCompetitionInfoResponse result */ + result?: (number|null); + + /** LoadGhostCompetitionInfoResponse rank */ + rank?: (number|null); + + /** LoadGhostCompetitionInfoResponse parameters1 */ + parameters1?: (number[]|null); + + /** LoadGhostCompetitionInfoResponse parameters2 */ + parameters2?: (boolean|null); + } + + /** Represents a LoadGhostCompetitionInfoResponse. */ + class LoadGhostCompetitionInfoResponse implements ILoadGhostCompetitionInfoResponse { + + /** + * Constructs a new LoadGhostCompetitionInfoResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionInfoResponse); + + /** LoadGhostCompetitionInfoResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionInfoResponse periodId. */ + public periodId: number; + + /** LoadGhostCompetitionInfoResponse closed. */ + public closed: boolean; + + /** LoadGhostCompetitionInfoResponse brakingPoint. */ + public brakingPoint: number; + + /** LoadGhostCompetitionInfoResponse qualified. */ + public qualified: boolean; + + /** LoadGhostCompetitionInfoResponse topResults. */ + public topResults: number[]; + + /** LoadGhostCompetitionInfoResponse result. */ + public result: number; + + /** LoadGhostCompetitionInfoResponse rank. */ + public rank: number; + + /** LoadGhostCompetitionInfoResponse parameters1. */ + public parameters1: number[]; + + /** LoadGhostCompetitionInfoResponse parameters2. */ + public parameters2: boolean; + + /** + * Creates a new LoadGhostCompetitionInfoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionInfoResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionInfoResponse): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @param message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @param message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Verifies a LoadGhostCompetitionInfoResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionInfoResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionInfoResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionInfoResponse; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoResponse message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionInfoResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionInfoResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTimeAttackRecordRequest. */ + interface ILoadTimeAttackRecordRequest { + + /** LoadTimeAttackRecordRequest carId */ + carId?: (number|null); + + /** LoadTimeAttackRecordRequest model */ + model: number; + + /** LoadTimeAttackRecordRequest course */ + course: number; + } + + /** Represents a LoadTimeAttackRecordRequest. */ + class LoadTimeAttackRecordRequest implements ILoadTimeAttackRecordRequest { + + /** + * Constructs a new LoadTimeAttackRecordRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTimeAttackRecordRequest); + + /** LoadTimeAttackRecordRequest carId. */ + public carId: number; + + /** LoadTimeAttackRecordRequest model. */ + public model: number; + + /** LoadTimeAttackRecordRequest course. */ + public course: number; + + /** + * Creates a new LoadTimeAttackRecordRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTimeAttackRecordRequest instance + */ + public static create(properties?: wm.protobuf.ILoadTimeAttackRecordRequest): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @param message LoadTimeAttackRecordRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTimeAttackRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @param message LoadTimeAttackRecordRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTimeAttackRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Verifies a LoadTimeAttackRecordRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTimeAttackRecordRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTimeAttackRecordRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTimeAttackRecordRequest; + + /** + * Creates a plain object from a LoadTimeAttackRecordRequest message. Also converts values to other types if specified. + * @param message LoadTimeAttackRecordRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTimeAttackRecordRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTimeAttackRecordRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTimeAttackRecordRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTimeAttackRecordResponse. */ + interface ILoadTimeAttackRecordResponse { + + /** LoadTimeAttackRecordResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadTimeAttackRecordResponse wholeRanking */ + wholeRanking?: (number[]|null); + + /** LoadTimeAttackRecordResponse modelRanking */ + modelRanking?: (number[]|null); + + /** LoadTimeAttackRecordResponse personalBestTime */ + personalBestTime?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_1Time */ + pbSection_1Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_2Time */ + pbSection_2Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_3Time */ + pbSection_3Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_4Time */ + pbSection_4Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_5Time */ + pbSection_5Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_6Time */ + pbSection_6Time?: (number|null); + + /** LoadTimeAttackRecordResponse pbSection_7Time */ + pbSection_7Time?: (number|null); + } + + /** Represents a LoadTimeAttackRecordResponse. */ + class LoadTimeAttackRecordResponse implements ILoadTimeAttackRecordResponse { + + /** + * Constructs a new LoadTimeAttackRecordResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTimeAttackRecordResponse); + + /** LoadTimeAttackRecordResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadTimeAttackRecordResponse wholeRanking. */ + public wholeRanking: number[]; + + /** LoadTimeAttackRecordResponse modelRanking. */ + public modelRanking: number[]; + + /** LoadTimeAttackRecordResponse personalBestTime. */ + public personalBestTime: number; + + /** LoadTimeAttackRecordResponse pbSection_1Time. */ + public pbSection_1Time: number; + + /** LoadTimeAttackRecordResponse pbSection_2Time. */ + public pbSection_2Time: number; + + /** LoadTimeAttackRecordResponse pbSection_3Time. */ + public pbSection_3Time: number; + + /** LoadTimeAttackRecordResponse pbSection_4Time. */ + public pbSection_4Time: number; + + /** LoadTimeAttackRecordResponse pbSection_5Time. */ + public pbSection_5Time: number; + + /** LoadTimeAttackRecordResponse pbSection_6Time. */ + public pbSection_6Time: number; + + /** LoadTimeAttackRecordResponse pbSection_7Time. */ + public pbSection_7Time: number; + + /** + * Creates a new LoadTimeAttackRecordResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTimeAttackRecordResponse instance + */ + public static create(properties?: wm.protobuf.ILoadTimeAttackRecordResponse): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @param message LoadTimeAttackRecordResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTimeAttackRecordResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @param message LoadTimeAttackRecordResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTimeAttackRecordResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Verifies a LoadTimeAttackRecordResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTimeAttackRecordResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTimeAttackRecordResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTimeAttackRecordResponse; + + /** + * Creates a plain object from a LoadTimeAttackRecordResponse message. Also converts values to other types if specified. + * @param message LoadTimeAttackRecordResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTimeAttackRecordResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTimeAttackRecordResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTimeAttackRecordResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveTerminalResultRequest. */ + interface ISaveTerminalResultRequest { + + /** SaveTerminalResultRequest userId */ + userId: number; + + /** SaveTerminalResultRequest timestamp */ + timestamp: number; + + /** SaveTerminalResultRequest carOrder */ + carOrder?: (number[]|null); + + /** SaveTerminalResultRequest confirmedTutorials */ + confirmedTutorials?: (wm.protobuf.TutorialType[]|null); + + /** SaveTerminalResultRequest garageMenuEntered */ + garageMenuEntered?: (boolean|null); + } + + /** Represents a SaveTerminalResultRequest. */ + class SaveTerminalResultRequest implements ISaveTerminalResultRequest { + + /** + * Constructs a new SaveTerminalResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveTerminalResultRequest); + + /** SaveTerminalResultRequest userId. */ + public userId: number; + + /** SaveTerminalResultRequest timestamp. */ + public timestamp: number; + + /** SaveTerminalResultRequest carOrder. */ + public carOrder: number[]; + + /** SaveTerminalResultRequest confirmedTutorials. */ + public confirmedTutorials: wm.protobuf.TutorialType[]; + + /** SaveTerminalResultRequest garageMenuEntered. */ + public garageMenuEntered: boolean; + + /** + * Creates a new SaveTerminalResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveTerminalResultRequest instance + */ + public static create(properties?: wm.protobuf.ISaveTerminalResultRequest): wm.protobuf.SaveTerminalResultRequest; + + /** + * Encodes the specified SaveTerminalResultRequest message. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @param message SaveTerminalResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveTerminalResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveTerminalResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @param message SaveTerminalResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveTerminalResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveTerminalResultRequest; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveTerminalResultRequest; + + /** + * Verifies a SaveTerminalResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveTerminalResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveTerminalResultRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveTerminalResultRequest; + + /** + * Creates a plain object from a SaveTerminalResultRequest message. Also converts values to other types if specified. + * @param message SaveTerminalResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveTerminalResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveTerminalResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveTerminalResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveTerminalResultResponse. */ + interface ISaveTerminalResultResponse { + + /** SaveTerminalResultResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveTerminalResultResponse. */ + class SaveTerminalResultResponse implements ISaveTerminalResultResponse { + + /** + * Constructs a new SaveTerminalResultResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveTerminalResultResponse); + + /** SaveTerminalResultResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveTerminalResultResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveTerminalResultResponse instance + */ + public static create(properties?: wm.protobuf.ISaveTerminalResultResponse): wm.protobuf.SaveTerminalResultResponse; + + /** + * Encodes the specified SaveTerminalResultResponse message. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @param message SaveTerminalResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveTerminalResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveTerminalResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @param message SaveTerminalResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveTerminalResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveTerminalResultResponse; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveTerminalResultResponse; + + /** + * Verifies a SaveTerminalResultResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveTerminalResultResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveTerminalResultResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveTerminalResultResponse; + + /** + * Creates a plain object from a SaveTerminalResultResponse message. Also converts values to other types if specified. + * @param message SaveTerminalResultResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveTerminalResultResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveTerminalResultResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveTerminalResultResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PingRequest. */ + interface IPingRequest { + + /** PingRequest ping */ + ping?: (number|null); + } + + /** Represents a PingRequest. */ + class PingRequest implements IPingRequest { + + /** + * Constructs a new PingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPingRequest); + + /** PingRequest ping. */ + public ping: number; + + /** + * Creates a new PingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PingRequest instance + */ + public static create(properties?: wm.protobuf.IPingRequest): wm.protobuf.PingRequest; + + /** + * Encodes the specified PingRequest message. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @param message PingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PingRequest message, length delimited. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @param message PingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PingRequest; + + /** + * Decodes a PingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PingRequest; + + /** + * Verifies a PingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PingRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PingRequest; + + /** + * Creates a plain object from a PingRequest message. Also converts values to other types if specified. + * @param message PingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PingResponse. */ + interface IPingResponse { + + /** PingResponse error */ + error: wm.protobuf.ErrorCode; + + /** PingResponse pong */ + pong: number; + } + + /** Represents a PingResponse. */ + class PingResponse implements IPingResponse { + + /** + * Constructs a new PingResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPingResponse); + + /** PingResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** PingResponse pong. */ + public pong: number; + + /** + * Creates a new PingResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PingResponse instance + */ + public static create(properties?: wm.protobuf.IPingResponse): wm.protobuf.PingResponse; + + /** + * Encodes the specified PingResponse message. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @param message PingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PingResponse message, length delimited. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @param message PingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PingResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PingResponse; + + /** + * Decodes a PingResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PingResponse; + + /** + * Verifies a PingResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PingResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PingResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PingResponse; + + /** + * Creates a plain object from a PingResponse message. Also converts values to other types if specified. + * @param message PingResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PingResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PingResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PingResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTerminalInformationRequest. */ + interface ILoadTerminalInformationRequest { + + /** LoadTerminalInformationRequest userId */ + userId: number; + } + + /** Represents a LoadTerminalInformationRequest. */ + class LoadTerminalInformationRequest implements ILoadTerminalInformationRequest { + + /** + * Constructs a new LoadTerminalInformationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTerminalInformationRequest); + + /** LoadTerminalInformationRequest userId. */ + public userId: number; + + /** + * Creates a new LoadTerminalInformationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTerminalInformationRequest instance + */ + public static create(properties?: wm.protobuf.ILoadTerminalInformationRequest): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Encodes the specified LoadTerminalInformationRequest message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @param message LoadTerminalInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTerminalInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTerminalInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @param message LoadTerminalInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTerminalInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Verifies a LoadTerminalInformationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTerminalInformationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTerminalInformationRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTerminalInformationRequest; + + /** + * Creates a plain object from a LoadTerminalInformationRequest message. Also converts values to other types if specified. + * @param message LoadTerminalInformationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTerminalInformationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTerminalInformationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTerminalInformationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadTerminalInformationResponse. */ + interface ILoadTerminalInformationResponse { + + /** LoadTerminalInformationResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadTerminalInformationResponse prizeReceivable */ + prizeReceivable: boolean; + + /** LoadTerminalInformationResponse noticeEntries */ + noticeEntries?: (wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice[]|null); + + /** LoadTerminalInformationResponse noticeMessage */ + noticeMessage?: (string[]|null); + + /** LoadTerminalInformationResponse noticeWindow */ + noticeWindow?: (wm.protobuf.NoticeEntry[]|null); + + /** LoadTerminalInformationResponse noticeWindowMessage */ + noticeWindowMessage?: (string[]|null); + + /** LoadTerminalInformationResponse transferNotice */ + transferNotice: wm.protobuf.ITransferNotice; + + /** LoadTerminalInformationResponse announceFeature */ + announceFeature: boolean; + + /** LoadTerminalInformationResponse freeScratched */ + freeScratched: boolean; + + /** LoadTerminalInformationResponse restrictedModels */ + restrictedModels?: (number[]|null); + } + + /** Represents a LoadTerminalInformationResponse. */ + class LoadTerminalInformationResponse implements ILoadTerminalInformationResponse { + + /** + * Constructs a new LoadTerminalInformationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadTerminalInformationResponse); + + /** LoadTerminalInformationResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadTerminalInformationResponse prizeReceivable. */ + public prizeReceivable: boolean; + + /** LoadTerminalInformationResponse noticeEntries. */ + public noticeEntries: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice[]; + + /** LoadTerminalInformationResponse noticeMessage. */ + public noticeMessage: string[]; + + /** LoadTerminalInformationResponse noticeWindow. */ + public noticeWindow: wm.protobuf.NoticeEntry[]; + + /** LoadTerminalInformationResponse noticeWindowMessage. */ + public noticeWindowMessage: string[]; + + /** LoadTerminalInformationResponse transferNotice. */ + public transferNotice: wm.protobuf.ITransferNotice; + + /** LoadTerminalInformationResponse announceFeature. */ + public announceFeature: boolean; + + /** LoadTerminalInformationResponse freeScratched. */ + public freeScratched: boolean; + + /** LoadTerminalInformationResponse restrictedModels. */ + public restrictedModels: number[]; + + /** + * Creates a new LoadTerminalInformationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadTerminalInformationResponse instance + */ + public static create(properties?: wm.protobuf.ILoadTerminalInformationResponse): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Encodes the specified LoadTerminalInformationResponse message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @param message LoadTerminalInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadTerminalInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadTerminalInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @param message LoadTerminalInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadTerminalInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Verifies a LoadTerminalInformationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadTerminalInformationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadTerminalInformationResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTerminalInformationResponse; + + /** + * Creates a plain object from a LoadTerminalInformationResponse message. Also converts values to other types if specified. + * @param message LoadTerminalInformationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTerminalInformationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadTerminalInformationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadTerminalInformationResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadTerminalInformationResponse { + + /** Properties of a TerminalNotice. */ + interface ITerminalNotice { + + /** TerminalNotice noticeType */ + noticeType: wm.protobuf.NoticeEntry; + + /** TerminalNotice field_1 */ + field_1?: (string|null); + + /** TerminalNotice field_2 */ + field_2?: (number|null); + + /** TerminalNotice field_3 */ + field_3?: (number|null); + } + + /** Represents a TerminalNotice. */ + class TerminalNotice implements ITerminalNotice { + + /** + * Constructs a new TerminalNotice. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice); + + /** TerminalNotice noticeType. */ + public noticeType: wm.protobuf.NoticeEntry; + + /** TerminalNotice field_1. */ + public field_1: string; + + /** TerminalNotice field_2. */ + public field_2: number; + + /** TerminalNotice field_3. */ + public field_3: number; + + /** + * Creates a new TerminalNotice instance using the specified properties. + * @param [properties] Properties to set + * @returns TerminalNotice instance + */ + public static create(properties?: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Encodes the specified TerminalNotice message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @param message TerminalNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerminalNotice message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @param message TerminalNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Verifies a TerminalNotice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerminalNotice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerminalNotice + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadTerminalInformationResponse.TerminalNotice; + + /** + * Creates a plain object from a TerminalNotice message. Also converts values to other types if specified. + * @param message TerminalNotice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadTerminalInformationResponse.TerminalNotice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerminalNotice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerminalNotice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateUserRequest. */ + interface ICreateUserRequest { + + /** CreateUserRequest banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateUserRequest cardChipId */ + cardChipId?: (string|null); + + /** CreateUserRequest accessCode */ + accessCode?: (string|null); + + /** CreateUserRequest cardTypeCode */ + cardTypeCode?: (number|null); + + /** CreateUserRequest cardRegionCode */ + cardRegionCode?: (number|null); + + /** CreateUserRequest device */ + device?: (wm.protobuf.DeviceType|null); + + /** CreateUserRequest timestamp */ + timestamp: number; + } + + /** Represents a CreateUserRequest. */ + class CreateUserRequest implements ICreateUserRequest { + + /** + * Constructs a new CreateUserRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateUserRequest); + + /** CreateUserRequest banapassportAmId. */ + public banapassportAmId: number; + + /** CreateUserRequest cardChipId. */ + public cardChipId: string; + + /** CreateUserRequest accessCode. */ + public accessCode: string; + + /** CreateUserRequest cardTypeCode. */ + public cardTypeCode: number; + + /** CreateUserRequest cardRegionCode. */ + public cardRegionCode: number; + + /** CreateUserRequest device. */ + public device: wm.protobuf.DeviceType; + + /** CreateUserRequest timestamp. */ + public timestamp: number; + + /** + * Creates a new CreateUserRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserRequest instance + */ + public static create(properties?: wm.protobuf.ICreateUserRequest): wm.protobuf.CreateUserRequest; + + /** + * Encodes the specified CreateUserRequest message. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @param message CreateUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @param message CreateUserRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateUserRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateUserRequest; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateUserRequest; + + /** + * Verifies a CreateUserRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateUserRequest; + + /** + * Creates a plain object from a CreateUserRequest message. Also converts values to other types if specified. + * @param message CreateUserRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateUserRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateUserResponse. */ + interface ICreateUserResponse { + + /** CreateUserResponse error */ + error: wm.protobuf.ErrorCode; + + /** CreateUserResponse accessCode */ + accessCode?: (string|null); + + /** CreateUserResponse banapassportAmId */ + banapassportAmId?: (number|null); + + /** CreateUserResponse mbid */ + mbid?: (number|null); + + /** CreateUserResponse userId */ + userId: number; + } + + /** Represents a CreateUserResponse. */ + class CreateUserResponse implements ICreateUserResponse { + + /** + * Constructs a new CreateUserResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICreateUserResponse); + + /** CreateUserResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** CreateUserResponse accessCode. */ + public accessCode: string; + + /** CreateUserResponse banapassportAmId. */ + public banapassportAmId: number; + + /** CreateUserResponse mbid. */ + public mbid: number; + + /** CreateUserResponse userId. */ + public userId: number; + + /** + * Creates a new CreateUserResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserResponse instance + */ + public static create(properties?: wm.protobuf.ICreateUserResponse): wm.protobuf.CreateUserResponse; + + /** + * Encodes the specified CreateUserResponse message. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @param message CreateUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICreateUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @param message CreateUserResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICreateUserResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CreateUserResponse; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CreateUserResponse; + + /** + * Verifies a CreateUserResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CreateUserResponse; + + /** + * Creates a plain object from a CreateUserResponse message. Also converts values to other types if specified. + * @param message CreateUserResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CreateUserResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AskAccessCodeRequest. */ + interface IAskAccessCodeRequest { + + /** AskAccessCodeRequest cardChipId */ + cardChipId: string; + } + + /** Represents an AskAccessCodeRequest. */ + class AskAccessCodeRequest implements IAskAccessCodeRequest { + + /** + * Constructs a new AskAccessCodeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IAskAccessCodeRequest); + + /** AskAccessCodeRequest cardChipId. */ + public cardChipId: string; + + /** + * Creates a new AskAccessCodeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AskAccessCodeRequest instance + */ + public static create(properties?: wm.protobuf.IAskAccessCodeRequest): wm.protobuf.AskAccessCodeRequest; + + /** + * Encodes the specified AskAccessCodeRequest message. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @param message AskAccessCodeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IAskAccessCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AskAccessCodeRequest message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @param message AskAccessCodeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IAskAccessCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.AskAccessCodeRequest; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.AskAccessCodeRequest; + + /** + * Verifies an AskAccessCodeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AskAccessCodeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AskAccessCodeRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.AskAccessCodeRequest; + + /** + * Creates a plain object from an AskAccessCodeRequest message. Also converts values to other types if specified. + * @param message AskAccessCodeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.AskAccessCodeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AskAccessCodeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AskAccessCodeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AskAccessCodeResponse. */ + interface IAskAccessCodeResponse { + + /** AskAccessCodeResponse error */ + error: wm.protobuf.ErrorCode; + + /** AskAccessCodeResponse accessCode */ + accessCode: string; + } + + /** Represents an AskAccessCodeResponse. */ + class AskAccessCodeResponse implements IAskAccessCodeResponse { + + /** + * Constructs a new AskAccessCodeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IAskAccessCodeResponse); + + /** AskAccessCodeResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** AskAccessCodeResponse accessCode. */ + public accessCode: string; + + /** + * Creates a new AskAccessCodeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AskAccessCodeResponse instance + */ + public static create(properties?: wm.protobuf.IAskAccessCodeResponse): wm.protobuf.AskAccessCodeResponse; + + /** + * Encodes the specified AskAccessCodeResponse message. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @param message AskAccessCodeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IAskAccessCodeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AskAccessCodeResponse message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @param message AskAccessCodeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IAskAccessCodeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.AskAccessCodeResponse; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.AskAccessCodeResponse; + + /** + * Verifies an AskAccessCodeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AskAccessCodeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AskAccessCodeResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.AskAccessCodeResponse; + + /** + * Creates a plain object from an AskAccessCodeResponse message. Also converts values to other types if specified. + * @param message AskAccessCodeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.AskAccessCodeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AskAccessCodeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AskAccessCodeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterOpponentGhostRequest. */ + interface IRegisterOpponentGhostRequest { + + /** RegisterOpponentGhostRequest carId */ + carId: number; + + /** RegisterOpponentGhostRequest specialGhostId */ + specialGhostId: number; + } + + /** Represents a RegisterOpponentGhostRequest. */ + class RegisterOpponentGhostRequest implements IRegisterOpponentGhostRequest { + + /** + * Constructs a new RegisterOpponentGhostRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterOpponentGhostRequest); + + /** RegisterOpponentGhostRequest carId. */ + public carId: number; + + /** RegisterOpponentGhostRequest specialGhostId. */ + public specialGhostId: number; + + /** + * Creates a new RegisterOpponentGhostRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterOpponentGhostRequest instance + */ + public static create(properties?: wm.protobuf.IRegisterOpponentGhostRequest): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Encodes the specified RegisterOpponentGhostRequest message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @param message RegisterOpponentGhostRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterOpponentGhostRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterOpponentGhostRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @param message RegisterOpponentGhostRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterOpponentGhostRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Verifies a RegisterOpponentGhostRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterOpponentGhostRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterOpponentGhostRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterOpponentGhostRequest; + + /** + * Creates a plain object from a RegisterOpponentGhostRequest message. Also converts values to other types if specified. + * @param message RegisterOpponentGhostRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterOpponentGhostRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterOpponentGhostRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterOpponentGhostRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegisterOpponentGhostResponse. */ + interface IRegisterOpponentGhostResponse { + + /** RegisterOpponentGhostResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a RegisterOpponentGhostResponse. */ + class RegisterOpponentGhostResponse implements IRegisterOpponentGhostResponse { + + /** + * Constructs a new RegisterOpponentGhostResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IRegisterOpponentGhostResponse); + + /** RegisterOpponentGhostResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new RegisterOpponentGhostResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RegisterOpponentGhostResponse instance + */ + public static create(properties?: wm.protobuf.IRegisterOpponentGhostResponse): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Encodes the specified RegisterOpponentGhostResponse message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @param message RegisterOpponentGhostResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IRegisterOpponentGhostResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegisterOpponentGhostResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @param message RegisterOpponentGhostResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IRegisterOpponentGhostResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Verifies a RegisterOpponentGhostResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegisterOpponentGhostResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegisterOpponentGhostResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.RegisterOpponentGhostResponse; + + /** + * Creates a plain object from a RegisterOpponentGhostResponse message. Also converts values to other types if specified. + * @param message RegisterOpponentGhostResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.RegisterOpponentGhostResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegisterOpponentGhostResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegisterOpponentGhostResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GrantCarRightRequest. */ + interface IGrantCarRightRequest { + + /** GrantCarRightRequest userId */ + userId: number; + + /** GrantCarRightRequest targetUserId */ + targetUserId: number; + + /** GrantCarRightRequest timestamp */ + timestamp: number; + } + + /** Represents a GrantCarRightRequest. */ + class GrantCarRightRequest implements IGrantCarRightRequest { + + /** + * Constructs a new GrantCarRightRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGrantCarRightRequest); + + /** GrantCarRightRequest userId. */ + public userId: number; + + /** GrantCarRightRequest targetUserId. */ + public targetUserId: number; + + /** GrantCarRightRequest timestamp. */ + public timestamp: number; + + /** + * Creates a new GrantCarRightRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GrantCarRightRequest instance + */ + public static create(properties?: wm.protobuf.IGrantCarRightRequest): wm.protobuf.GrantCarRightRequest; + + /** + * Encodes the specified GrantCarRightRequest message. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @param message GrantCarRightRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGrantCarRightRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GrantCarRightRequest message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @param message GrantCarRightRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGrantCarRightRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GrantCarRightRequest; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GrantCarRightRequest; + + /** + * Verifies a GrantCarRightRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GrantCarRightRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GrantCarRightRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GrantCarRightRequest; + + /** + * Creates a plain object from a GrantCarRightRequest message. Also converts values to other types if specified. + * @param message GrantCarRightRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GrantCarRightRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GrantCarRightRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GrantCarRightRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GrantCarRightResponse. */ + interface IGrantCarRightResponse { + + /** GrantCarRightResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a GrantCarRightResponse. */ + class GrantCarRightResponse implements IGrantCarRightResponse { + + /** + * Constructs a new GrantCarRightResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGrantCarRightResponse); + + /** GrantCarRightResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new GrantCarRightResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GrantCarRightResponse instance + */ + public static create(properties?: wm.protobuf.IGrantCarRightResponse): wm.protobuf.GrantCarRightResponse; + + /** + * Encodes the specified GrantCarRightResponse message. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @param message GrantCarRightResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGrantCarRightResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GrantCarRightResponse message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @param message GrantCarRightResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGrantCarRightResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GrantCarRightResponse; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GrantCarRightResponse; + + /** + * Verifies a GrantCarRightResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GrantCarRightResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GrantCarRightResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GrantCarRightResponse; + + /** + * Creates a plain object from a GrantCarRightResponse message. Also converts values to other types if specified. + * @param message GrantCarRightResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GrantCarRightResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GrantCarRightResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GrantCarRightResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionRankingRequest. */ + interface ILoadGhostCompetitionRankingRequest { + + /** LoadGhostCompetitionRankingRequest carId */ + carId: number; + + /** LoadGhostCompetitionRankingRequest competitionId */ + competitionId: number; + } + + /** Represents a LoadGhostCompetitionRankingRequest. */ + class LoadGhostCompetitionRankingRequest implements ILoadGhostCompetitionRankingRequest { + + /** + * Constructs a new LoadGhostCompetitionRankingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionRankingRequest); + + /** LoadGhostCompetitionRankingRequest carId. */ + public carId: number; + + /** LoadGhostCompetitionRankingRequest competitionId. */ + public competitionId: number; + + /** + * Creates a new LoadGhostCompetitionRankingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionRankingRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionRankingRequest): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @param message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionRankingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @param message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionRankingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Verifies a LoadGhostCompetitionRankingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionRankingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionRankingRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionRankingRequest; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingRequest message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionRankingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionRankingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionRankingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostCompetitionRankingResponse. */ + interface ILoadGhostCompetitionRankingResponse { + + /** LoadGhostCompetitionRankingResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionRankingResponse periodId */ + periodId?: (number|null); + + /** LoadGhostCompetitionRankingResponse numOfParticipants */ + numOfParticipants: number; + + /** LoadGhostCompetitionRankingResponse competitionSchedule */ + competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** LoadGhostCompetitionRankingResponse ownRecord */ + ownRecord?: (wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null); + + /** LoadGhostCompetitionRankingResponse topRecords */ + topRecords?: (wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry[]|null); + } + + /** Represents a LoadGhostCompetitionRankingResponse. */ + class LoadGhostCompetitionRankingResponse implements ILoadGhostCompetitionRankingResponse { + + /** + * Constructs a new LoadGhostCompetitionRankingResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostCompetitionRankingResponse); + + /** LoadGhostCompetitionRankingResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostCompetitionRankingResponse periodId. */ + public periodId: number; + + /** LoadGhostCompetitionRankingResponse numOfParticipants. */ + public numOfParticipants: number; + + /** LoadGhostCompetitionRankingResponse competitionSchedule. */ + public competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** LoadGhostCompetitionRankingResponse ownRecord. */ + public ownRecord?: (wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null); + + /** LoadGhostCompetitionRankingResponse topRecords. */ + public topRecords: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry[]; + + /** + * Creates a new LoadGhostCompetitionRankingResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostCompetitionRankingResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostCompetitionRankingResponse): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @param message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostCompetitionRankingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @param message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostCompetitionRankingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Verifies a LoadGhostCompetitionRankingResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostCompetitionRankingResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostCompetitionRankingResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionRankingResponse; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingResponse message. Also converts values to other types if specified. + * @param message LoadGhostCompetitionRankingResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionRankingResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostCompetitionRankingResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGhostCompetitionRankingResponse { + + /** Properties of an Entry. */ + interface IEntry { + + /** Entry rank */ + rank: number; + + /** Entry result */ + result: number; + + /** Entry carId */ + carId: number; + + /** Entry name */ + name: string; + + /** Entry regionId */ + regionId: number; + + /** Entry model */ + model: number; + + /** Entry visualModel */ + visualModel: number; + + /** Entry defaultColor */ + defaultColor: number; + + /** Entry title */ + title: string; + + /** Entry level */ + level: number; + + /** Entry windowStickerString */ + windowStickerString?: (string|null); + + /** Entry playedShopName */ + playedShopName: string; + + /** Entry playedAt */ + playedAt: number; + } + + /** Represents an Entry. */ + class Entry implements IEntry { + + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry); + + /** Entry rank. */ + public rank: number; + + /** Entry result. */ + public result: number; + + /** Entry carId. */ + public carId: number; + + /** Entry name. */ + public name: string; + + /** Entry regionId. */ + public regionId: number; + + /** Entry model. */ + public model: number; + + /** Entry visualModel. */ + public visualModel: number; + + /** Entry defaultColor. */ + public defaultColor: number; + + /** Entry title. */ + public title: string; + + /** Entry level. */ + public level: number; + + /** Entry windowStickerString. */ + public windowStickerString: string; + + /** Entry playedShopName. */ + public playedShopName: string; + + /** Entry playedAt. */ + public playedAt: number; + + /** + * Creates a new Entry instance using the specified properties. + * @param [properties] Properties to set + * @returns Entry instance + */ + public static create(properties?: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Encodes the specified Entry message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Verifies an Entry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entry + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostCompetitionRankingResponse.Entry; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostCompetitionRankingResponse.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadUnreceivedUserItemsRequest. */ + interface ILoadUnreceivedUserItemsRequest { + + /** LoadUnreceivedUserItemsRequest userId */ + userId: number; + } + + /** Represents a LoadUnreceivedUserItemsRequest. */ + class LoadUnreceivedUserItemsRequest implements ILoadUnreceivedUserItemsRequest { + + /** + * Constructs a new LoadUnreceivedUserItemsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUnreceivedUserItemsRequest); + + /** LoadUnreceivedUserItemsRequest userId. */ + public userId: number; + + /** + * Creates a new LoadUnreceivedUserItemsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUnreceivedUserItemsRequest instance + */ + public static create(properties?: wm.protobuf.ILoadUnreceivedUserItemsRequest): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @param message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUnreceivedUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @param message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUnreceivedUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Verifies a LoadUnreceivedUserItemsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUnreceivedUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUnreceivedUserItemsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUnreceivedUserItemsRequest; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsRequest message. Also converts values to other types if specified. + * @param message LoadUnreceivedUserItemsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUnreceivedUserItemsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUnreceivedUserItemsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadUnreceivedUserItemsResponse. */ + interface ILoadUnreceivedUserItemsResponse { + + /** LoadUnreceivedUserItemsResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadUnreceivedUserItemsResponse ownedUserItems */ + ownedUserItems?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a LoadUnreceivedUserItemsResponse. */ + class LoadUnreceivedUserItemsResponse implements ILoadUnreceivedUserItemsResponse { + + /** + * Constructs a new LoadUnreceivedUserItemsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadUnreceivedUserItemsResponse); + + /** LoadUnreceivedUserItemsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadUnreceivedUserItemsResponse ownedUserItems. */ + public ownedUserItems: wm.protobuf.IUserItem[]; + + /** + * Creates a new LoadUnreceivedUserItemsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadUnreceivedUserItemsResponse instance + */ + public static create(properties?: wm.protobuf.ILoadUnreceivedUserItemsResponse): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @param message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadUnreceivedUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @param message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadUnreceivedUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Verifies a LoadUnreceivedUserItemsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadUnreceivedUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadUnreceivedUserItemsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadUnreceivedUserItemsResponse; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsResponse message. Also converts values to other types if specified. + * @param message LoadUnreceivedUserItemsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadUnreceivedUserItemsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadUnreceivedUserItemsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBookmarksRequest. */ + interface ILoadBookmarksRequest { + + /** LoadBookmarksRequest userId */ + userId: number; + } + + /** Represents a LoadBookmarksRequest. */ + class LoadBookmarksRequest implements ILoadBookmarksRequest { + + /** + * Constructs a new LoadBookmarksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadBookmarksRequest); + + /** LoadBookmarksRequest userId. */ + public userId: number; + + /** + * Creates a new LoadBookmarksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBookmarksRequest instance + */ + public static create(properties?: wm.protobuf.ILoadBookmarksRequest): wm.protobuf.LoadBookmarksRequest; + + /** + * Encodes the specified LoadBookmarksRequest message. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @param message LoadBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @param message LoadBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadBookmarksRequest; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadBookmarksRequest; + + /** + * Verifies a LoadBookmarksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBookmarksRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadBookmarksRequest; + + /** + * Creates a plain object from a LoadBookmarksRequest message. Also converts values to other types if specified. + * @param message LoadBookmarksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadBookmarksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBookmarksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBookmarksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBookmarksResponse. */ + interface ILoadBookmarksResponse { + + /** LoadBookmarksResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadBookmarksResponse cars */ + cars?: (wm.protobuf.ICar[]|null); + } + + /** Represents a LoadBookmarksResponse. */ + class LoadBookmarksResponse implements ILoadBookmarksResponse { + + /** + * Constructs a new LoadBookmarksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadBookmarksResponse); + + /** LoadBookmarksResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadBookmarksResponse cars. */ + public cars: wm.protobuf.ICar[]; + + /** + * Creates a new LoadBookmarksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBookmarksResponse instance + */ + public static create(properties?: wm.protobuf.ILoadBookmarksResponse): wm.protobuf.LoadBookmarksResponse; + + /** + * Encodes the specified LoadBookmarksResponse message. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @param message LoadBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @param message LoadBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadBookmarksResponse; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadBookmarksResponse; + + /** + * Verifies a LoadBookmarksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBookmarksResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadBookmarksResponse; + + /** + * Creates a plain object from a LoadBookmarksResponse message. Also converts values to other types if specified. + * @param message LoadBookmarksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadBookmarksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBookmarksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBookmarksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveBookmarksRequest. */ + interface ISaveBookmarksRequest { + + /** SaveBookmarksRequest userId */ + userId: number; + + /** SaveBookmarksRequest cars */ + cars?: (number[]|null); + } + + /** Represents a SaveBookmarksRequest. */ + class SaveBookmarksRequest implements ISaveBookmarksRequest { + + /** + * Constructs a new SaveBookmarksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveBookmarksRequest); + + /** SaveBookmarksRequest userId. */ + public userId: number; + + /** SaveBookmarksRequest cars. */ + public cars: number[]; + + /** + * Creates a new SaveBookmarksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveBookmarksRequest instance + */ + public static create(properties?: wm.protobuf.ISaveBookmarksRequest): wm.protobuf.SaveBookmarksRequest; + + /** + * Encodes the specified SaveBookmarksRequest message. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @param message SaveBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @param message SaveBookmarksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveBookmarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveBookmarksRequest; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveBookmarksRequest; + + /** + * Verifies a SaveBookmarksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveBookmarksRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveBookmarksRequest; + + /** + * Creates a plain object from a SaveBookmarksRequest message. Also converts values to other types if specified. + * @param message SaveBookmarksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveBookmarksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveBookmarksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveBookmarksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveBookmarksResponse. */ + interface ISaveBookmarksResponse { + + /** SaveBookmarksResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveBookmarksResponse. */ + class SaveBookmarksResponse implements ISaveBookmarksResponse { + + /** + * Constructs a new SaveBookmarksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveBookmarksResponse); + + /** SaveBookmarksResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveBookmarksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveBookmarksResponse instance + */ + public static create(properties?: wm.protobuf.ISaveBookmarksResponse): wm.protobuf.SaveBookmarksResponse; + + /** + * Encodes the specified SaveBookmarksResponse message. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @param message SaveBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @param message SaveBookmarksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveBookmarksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveBookmarksResponse; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveBookmarksResponse; + + /** + * Verifies a SaveBookmarksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveBookmarksResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveBookmarksResponse; + + /** + * Creates a plain object from a SaveBookmarksResponse message. Also converts values to other types if specified. + * @param message SaveBookmarksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveBookmarksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveBookmarksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveBookmarksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StartTransferRequest. */ + interface IStartTransferRequest { + + /** StartTransferRequest banapassportAmId */ + banapassportAmId: number; + } + + /** Represents a StartTransferRequest. */ + class StartTransferRequest implements IStartTransferRequest { + + /** + * Constructs a new StartTransferRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IStartTransferRequest); + + /** StartTransferRequest banapassportAmId. */ + public banapassportAmId: number; + + /** + * Creates a new StartTransferRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StartTransferRequest instance + */ + public static create(properties?: wm.protobuf.IStartTransferRequest): wm.protobuf.StartTransferRequest; + + /** + * Encodes the specified StartTransferRequest message. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @param message StartTransferRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IStartTransferRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartTransferRequest message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @param message StartTransferRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IStartTransferRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.StartTransferRequest; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.StartTransferRequest; + + /** + * Verifies a StartTransferRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartTransferRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartTransferRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.StartTransferRequest; + + /** + * Creates a plain object from a StartTransferRequest message. Also converts values to other types if specified. + * @param message StartTransferRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.StartTransferRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartTransferRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartTransferRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StartTransferResponse. */ + interface IStartTransferResponse { + + /** StartTransferResponse error */ + error: wm.protobuf.ErrorCode; + + /** StartTransferResponse userId */ + userId: number; + + /** StartTransferResponse pollingInterval */ + pollingInterval?: (number|null); + } + + /** Represents a StartTransferResponse. */ + class StartTransferResponse implements IStartTransferResponse { + + /** + * Constructs a new StartTransferResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IStartTransferResponse); + + /** StartTransferResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** StartTransferResponse userId. */ + public userId: number; + + /** StartTransferResponse pollingInterval. */ + public pollingInterval: number; + + /** + * Creates a new StartTransferResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns StartTransferResponse instance + */ + public static create(properties?: wm.protobuf.IStartTransferResponse): wm.protobuf.StartTransferResponse; + + /** + * Encodes the specified StartTransferResponse message. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @param message StartTransferResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IStartTransferResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartTransferResponse message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @param message StartTransferResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IStartTransferResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.StartTransferResponse; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.StartTransferResponse; + + /** + * Verifies a StartTransferResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartTransferResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartTransferResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.StartTransferResponse; + + /** + * Creates a plain object from a StartTransferResponse message. Also converts values to other types if specified. + * @param message StartTransferResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.StartTransferResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartTransferResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartTransferResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveScreenshotRequest. */ + interface ISaveScreenshotRequest { + + /** SaveScreenshotRequest carId */ + carId: number; + + /** SaveScreenshotRequest timestamp */ + timestamp: number; + + /** SaveScreenshotRequest playedAt */ + playedAt?: (number|null); + + /** SaveScreenshotRequest transparent */ + transparent?: (boolean|null); + + /** SaveScreenshotRequest imageType */ + imageType: wm.protobuf.ScreenshotType; + + /** SaveScreenshotRequest image */ + image?: (Uint8Array|null); + + /** SaveScreenshotRequest ghostMetadata */ + ghostMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null); + + /** SaveScreenshotRequest versusMetadata */ + versusMetadata?: (wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null); + + /** SaveScreenshotRequest terminalMetadata */ + terminalMetadata?: (wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null); + + /** SaveScreenshotRequest acquiringVsStarMetadata */ + acquiringVsStarMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null); + + /** SaveScreenshotRequest acquiringAuraMotifMetadata */ + acquiringAuraMotifMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null); + + /** SaveScreenshotRequest ghostRegionMapMetadata */ + ghostRegionMapMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null); + + /** SaveScreenshotRequest acquiringCrownMetadata */ + acquiringCrownMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null); + + /** SaveScreenshotRequest competitionResultMetadata */ + competitionResultMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null); + + /** SaveScreenshotRequest timeAttackResultMetadata */ + timeAttackResultMetadata?: (wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null); + + /** SaveScreenshotRequest levelUpMetadata */ + levelUpMetadata?: (wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null); + } + + /** Represents a SaveScreenshotRequest. */ + class SaveScreenshotRequest implements ISaveScreenshotRequest { + + /** + * Constructs a new SaveScreenshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScreenshotRequest); + + /** SaveScreenshotRequest carId. */ + public carId: number; + + /** SaveScreenshotRequest timestamp. */ + public timestamp: number; + + /** SaveScreenshotRequest playedAt. */ + public playedAt: number; + + /** SaveScreenshotRequest transparent. */ + public transparent: boolean; + + /** SaveScreenshotRequest imageType. */ + public imageType: wm.protobuf.ScreenshotType; + + /** SaveScreenshotRequest image. */ + public image: Uint8Array; + + /** SaveScreenshotRequest ghostMetadata. */ + public ghostMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null); + + /** SaveScreenshotRequest versusMetadata. */ + public versusMetadata?: (wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null); + + /** SaveScreenshotRequest terminalMetadata. */ + public terminalMetadata?: (wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null); + + /** SaveScreenshotRequest acquiringVsStarMetadata. */ + public acquiringVsStarMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null); + + /** SaveScreenshotRequest acquiringAuraMotifMetadata. */ + public acquiringAuraMotifMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null); + + /** SaveScreenshotRequest ghostRegionMapMetadata. */ + public ghostRegionMapMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null); + + /** SaveScreenshotRequest acquiringCrownMetadata. */ + public acquiringCrownMetadata?: (wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null); + + /** SaveScreenshotRequest competitionResultMetadata. */ + public competitionResultMetadata?: (wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null); + + /** SaveScreenshotRequest timeAttackResultMetadata. */ + public timeAttackResultMetadata?: (wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null); + + /** SaveScreenshotRequest levelUpMetadata. */ + public levelUpMetadata?: (wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null); + + /** + * Creates a new SaveScreenshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScreenshotRequest instance + */ + public static create(properties?: wm.protobuf.ISaveScreenshotRequest): wm.protobuf.SaveScreenshotRequest; + + /** + * Encodes the specified SaveScreenshotRequest message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @param message SaveScreenshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScreenshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScreenshotRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @param message SaveScreenshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScreenshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest; + + /** + * Verifies a SaveScreenshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScreenshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScreenshotRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest; + + /** + * Creates a plain object from a SaveScreenshotRequest message. Also converts values to other types if specified. + * @param message SaveScreenshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScreenshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScreenshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SaveScreenshotRequest { + + /** Properties of a GhostBattleMetadata. */ + interface IGhostBattleMetadata { + + /** GhostBattleMetadata tunePower */ + tunePower: number; + + /** GhostBattleMetadata tuneHandling */ + tuneHandling: number; + + /** GhostBattleMetadata area */ + area: number; + + /** GhostBattleMetadata stampReturnCount */ + stampReturnCount: number; + + /** GhostBattleMetadata opponents */ + opponents?: (wm.protobuf.SaveScreenshotRequest.IOpponentCar[]|null); + } + + /** Represents a GhostBattleMetadata. */ + class GhostBattleMetadata implements IGhostBattleMetadata { + + /** + * Constructs a new GhostBattleMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata); + + /** GhostBattleMetadata tunePower. */ + public tunePower: number; + + /** GhostBattleMetadata tuneHandling. */ + public tuneHandling: number; + + /** GhostBattleMetadata area. */ + public area: number; + + /** GhostBattleMetadata stampReturnCount. */ + public stampReturnCount: number; + + /** GhostBattleMetadata opponents. */ + public opponents: wm.protobuf.SaveScreenshotRequest.IOpponentCar[]; + + /** + * Creates a new GhostBattleMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostBattleMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Encodes the specified GhostBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @param message GhostBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @param message GhostBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Verifies a GhostBattleMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostBattleMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata; + + /** + * Creates a plain object from a GhostBattleMetadata message. Also converts values to other types if specified. + * @param message GhostBattleMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostBattleMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostBattleMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VersusBattleMetadata. */ + interface IVersusBattleMetadata { + + /** VersusBattleMetadata tunePower */ + tunePower: number; + + /** VersusBattleMetadata tuneHandling */ + tuneHandling: number; + + /** VersusBattleMetadata area */ + area: number; + + /** VersusBattleMetadata opponents */ + opponents?: (wm.protobuf.SaveScreenshotRequest.IOpponentCar[]|null); + } + + /** Represents a VersusBattleMetadata. */ + class VersusBattleMetadata implements IVersusBattleMetadata { + + /** + * Constructs a new VersusBattleMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata); + + /** VersusBattleMetadata tunePower. */ + public tunePower: number; + + /** VersusBattleMetadata tuneHandling. */ + public tuneHandling: number; + + /** VersusBattleMetadata area. */ + public area: number; + + /** VersusBattleMetadata opponents. */ + public opponents: wm.protobuf.SaveScreenshotRequest.IOpponentCar[]; + + /** + * Creates a new VersusBattleMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns VersusBattleMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Encodes the specified VersusBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @param message VersusBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VersusBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @param message VersusBattleMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Verifies a VersusBattleMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VersusBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersusBattleMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata; + + /** + * Creates a plain object from a VersusBattleMetadata message. Also converts values to other types if specified. + * @param message VersusBattleMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VersusBattleMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VersusBattleMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TerminalMetadata. */ + interface ITerminalMetadata { + + /** TerminalMetadata tunePower */ + tunePower: number; + + /** TerminalMetadata tuneHandling */ + tuneHandling: number; + + /** TerminalMetadata name */ + name: string; + + /** TerminalMetadata title */ + title: string; + + /** TerminalMetadata level */ + level: number; + } + + /** Represents a TerminalMetadata. */ + class TerminalMetadata implements ITerminalMetadata { + + /** + * Constructs a new TerminalMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata); + + /** TerminalMetadata tunePower. */ + public tunePower: number; + + /** TerminalMetadata tuneHandling. */ + public tuneHandling: number; + + /** TerminalMetadata name. */ + public name: string; + + /** TerminalMetadata title. */ + public title: string; + + /** TerminalMetadata level. */ + public level: number; + + /** + * Creates a new TerminalMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns TerminalMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Encodes the specified TerminalMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @param message TerminalMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerminalMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @param message TerminalMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.ITerminalMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Verifies a TerminalMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerminalMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerminalMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.TerminalMetadata; + + /** + * Creates a plain object from a TerminalMetadata message. Also converts values to other types if specified. + * @param message TerminalMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.TerminalMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerminalMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerminalMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcquiringVersusStarMetadata. */ + interface IAcquiringVersusStarMetadata { + + /** AcquiringVersusStarMetadata tunePower */ + tunePower: number; + + /** AcquiringVersusStarMetadata tuneHandling */ + tuneHandling: number; + + /** AcquiringVersusStarMetadata vsStarCount */ + vsStarCount: number; + } + + /** Represents an AcquiringVersusStarMetadata. */ + class AcquiringVersusStarMetadata implements IAcquiringVersusStarMetadata { + + /** + * Constructs a new AcquiringVersusStarMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata); + + /** AcquiringVersusStarMetadata tunePower. */ + public tunePower: number; + + /** AcquiringVersusStarMetadata tuneHandling. */ + public tuneHandling: number; + + /** AcquiringVersusStarMetadata vsStarCount. */ + public vsStarCount: number; + + /** + * Creates a new AcquiringVersusStarMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AcquiringVersusStarMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Encodes the specified AcquiringVersusStarMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @param message AcquiringVersusStarMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcquiringVersusStarMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @param message AcquiringVersusStarMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Verifies an AcquiringVersusStarMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcquiringVersusStarMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcquiringVersusStarMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata; + + /** + * Creates a plain object from an AcquiringVersusStarMetadata message. Also converts values to other types if specified. + * @param message AcquiringVersusStarMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcquiringVersusStarMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcquiringVersusStarMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcquiringAuraMotifMetadata. */ + interface IAcquiringAuraMotifMetadata { + + /** AcquiringAuraMotifMetadata tunePower */ + tunePower: number; + + /** AcquiringAuraMotifMetadata tuneHandling */ + tuneHandling: number; + + /** AcquiringAuraMotifMetadata auraMotif */ + auraMotif: number; + } + + /** Represents an AcquiringAuraMotifMetadata. */ + class AcquiringAuraMotifMetadata implements IAcquiringAuraMotifMetadata { + + /** + * Constructs a new AcquiringAuraMotifMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata); + + /** AcquiringAuraMotifMetadata tunePower. */ + public tunePower: number; + + /** AcquiringAuraMotifMetadata tuneHandling. */ + public tuneHandling: number; + + /** AcquiringAuraMotifMetadata auraMotif. */ + public auraMotif: number; + + /** + * Creates a new AcquiringAuraMotifMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AcquiringAuraMotifMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @param message AcquiringAuraMotifMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @param message AcquiringAuraMotifMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Verifies an AcquiringAuraMotifMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcquiringAuraMotifMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcquiringAuraMotifMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata; + + /** + * Creates a plain object from an AcquiringAuraMotifMetadata message. Also converts values to other types if specified. + * @param message AcquiringAuraMotifMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcquiringAuraMotifMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcquiringAuraMotifMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostRegionMapMetadata. */ + interface IGhostRegionMapMetadata { + + /** GhostRegionMapMetadata tunePower */ + tunePower: number; + + /** GhostRegionMapMetadata tuneHandling */ + tuneHandling: number; + + /** GhostRegionMapMetadata rgScore */ + rgScore: number; + + /** GhostRegionMapMetadata rgRegionMapScore */ + rgRegionMapScore?: (number[]|null); + } + + /** Represents a GhostRegionMapMetadata. */ + class GhostRegionMapMetadata implements IGhostRegionMapMetadata { + + /** + * Constructs a new GhostRegionMapMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata); + + /** GhostRegionMapMetadata tunePower. */ + public tunePower: number; + + /** GhostRegionMapMetadata tuneHandling. */ + public tuneHandling: number; + + /** GhostRegionMapMetadata rgScore. */ + public rgScore: number; + + /** GhostRegionMapMetadata rgRegionMapScore. */ + public rgRegionMapScore: number[]; + + /** + * Creates a new GhostRegionMapMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostRegionMapMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Encodes the specified GhostRegionMapMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @param message GhostRegionMapMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostRegionMapMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @param message GhostRegionMapMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Verifies a GhostRegionMapMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostRegionMapMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostRegionMapMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata; + + /** + * Creates a plain object from a GhostRegionMapMetadata message. Also converts values to other types if specified. + * @param message GhostRegionMapMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostRegionMapMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostRegionMapMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcquiringCrownMetadata. */ + interface IAcquiringCrownMetadata { + + /** AcquiringCrownMetadata tunePower */ + tunePower: number; + + /** AcquiringCrownMetadata tuneHandling */ + tuneHandling: number; + + /** AcquiringCrownMetadata area */ + area: number; + } + + /** Represents an AcquiringCrownMetadata. */ + class AcquiringCrownMetadata implements IAcquiringCrownMetadata { + + /** + * Constructs a new AcquiringCrownMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata); + + /** AcquiringCrownMetadata tunePower. */ + public tunePower: number; + + /** AcquiringCrownMetadata tuneHandling. */ + public tuneHandling: number; + + /** AcquiringCrownMetadata area. */ + public area: number; + + /** + * Creates a new AcquiringCrownMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AcquiringCrownMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Encodes the specified AcquiringCrownMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @param message AcquiringCrownMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcquiringCrownMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @param message AcquiringCrownMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Verifies an AcquiringCrownMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcquiringCrownMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcquiringCrownMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata; + + /** + * Creates a plain object from an AcquiringCrownMetadata message. Also converts values to other types if specified. + * @param message AcquiringCrownMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcquiringCrownMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcquiringCrownMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCompetitionResultMetadata. */ + interface IGhostCompetitionResultMetadata { + + /** GhostCompetitionResultMetadata tunePower */ + tunePower: number; + + /** GhostCompetitionResultMetadata tuneHandling */ + tuneHandling: number; + + /** GhostCompetitionResultMetadata rank */ + rank?: (number|null); + + /** GhostCompetitionResultMetadata result */ + result: number; + } + + /** Represents a GhostCompetitionResultMetadata. */ + class GhostCompetitionResultMetadata implements IGhostCompetitionResultMetadata { + + /** + * Constructs a new GhostCompetitionResultMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata); + + /** GhostCompetitionResultMetadata tunePower. */ + public tunePower: number; + + /** GhostCompetitionResultMetadata tuneHandling. */ + public tuneHandling: number; + + /** GhostCompetitionResultMetadata rank. */ + public rank: number; + + /** GhostCompetitionResultMetadata result. */ + public result: number; + + /** + * Creates a new GhostCompetitionResultMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionResultMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Encodes the specified GhostCompetitionResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @param message GhostCompetitionResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @param message GhostCompetitionResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Verifies a GhostCompetitionResultMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionResultMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionResultMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata; + + /** + * Creates a plain object from a GhostCompetitionResultMetadata message. Also converts values to other types if specified. + * @param message GhostCompetitionResultMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionResultMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionResultMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeAttackResultMetadata. */ + interface ITimeAttackResultMetadata { + + /** TimeAttackResultMetadata tunePower */ + tunePower: number; + + /** TimeAttackResultMetadata tuneHandling */ + tuneHandling: number; + + /** TimeAttackResultMetadata course */ + course: number; + + /** TimeAttackResultMetadata wholeRank */ + wholeRank?: (number|null); + + /** TimeAttackResultMetadata modelRank */ + modelRank?: (number|null); + } + + /** Represents a TimeAttackResultMetadata. */ + class TimeAttackResultMetadata implements ITimeAttackResultMetadata { + + /** + * Constructs a new TimeAttackResultMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata); + + /** TimeAttackResultMetadata tunePower. */ + public tunePower: number; + + /** TimeAttackResultMetadata tuneHandling. */ + public tuneHandling: number; + + /** TimeAttackResultMetadata course. */ + public course: number; + + /** TimeAttackResultMetadata wholeRank. */ + public wholeRank: number; + + /** TimeAttackResultMetadata modelRank. */ + public modelRank: number; + + /** + * Creates a new TimeAttackResultMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeAttackResultMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Encodes the specified TimeAttackResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @param message TimeAttackResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeAttackResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @param message TimeAttackResultMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Verifies a TimeAttackResultMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeAttackResultMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeAttackResultMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata; + + /** + * Creates a plain object from a TimeAttackResultMetadata message. Also converts values to other types if specified. + * @param message TimeAttackResultMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeAttackResultMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeAttackResultMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LevelUpMetadata. */ + interface ILevelUpMetadata { + + /** LevelUpMetadata tunePower */ + tunePower: number; + + /** LevelUpMetadata tuneHandling */ + tuneHandling: number; + + /** LevelUpMetadata level */ + level: number; + } + + /** Represents a LevelUpMetadata. */ + class LevelUpMetadata implements ILevelUpMetadata { + + /** + * Constructs a new LevelUpMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata); + + /** LevelUpMetadata tunePower. */ + public tunePower: number; + + /** LevelUpMetadata tuneHandling. */ + public tuneHandling: number; + + /** LevelUpMetadata level. */ + public level: number; + + /** + * Creates a new LevelUpMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns LevelUpMetadata instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Encodes the specified LevelUpMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @param message LevelUpMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LevelUpMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @param message LevelUpMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Verifies a LevelUpMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LevelUpMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LevelUpMetadata + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.LevelUpMetadata; + + /** + * Creates a plain object from a LevelUpMetadata message. Also converts values to other types if specified. + * @param message LevelUpMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.LevelUpMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LevelUpMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LevelUpMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OpponentCar. */ + interface IOpponentCar { + + /** OpponentCar carId */ + carId?: (number|null); + + /** OpponentCar tunePower */ + tunePower: number; + + /** OpponentCar tuneHandling */ + tuneHandling: number; + } + + /** Represents an OpponentCar. */ + class OpponentCar implements IOpponentCar { + + /** + * Constructs a new OpponentCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SaveScreenshotRequest.IOpponentCar); + + /** OpponentCar carId. */ + public carId: number; + + /** OpponentCar tunePower. */ + public tunePower: number; + + /** OpponentCar tuneHandling. */ + public tuneHandling: number; + + /** + * Creates a new OpponentCar instance using the specified properties. + * @param [properties] Properties to set + * @returns OpponentCar instance + */ + public static create(properties?: wm.protobuf.SaveScreenshotRequest.IOpponentCar): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Encodes the specified OpponentCar message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @param message OpponentCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SaveScreenshotRequest.IOpponentCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpponentCar message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @param message OpponentCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SaveScreenshotRequest.IOpponentCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpponentCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Decodes an OpponentCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Verifies an OpponentCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OpponentCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpponentCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotRequest.OpponentCar; + + /** + * Creates a plain object from an OpponentCar message. Also converts values to other types if specified. + * @param message OpponentCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotRequest.OpponentCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpponentCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpponentCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SaveScreenshotResponse. */ + interface ISaveScreenshotResponse { + + /** SaveScreenshotResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SaveScreenshotResponse. */ + class SaveScreenshotResponse implements ISaveScreenshotResponse { + + /** + * Constructs a new SaveScreenshotResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScreenshotResponse); + + /** SaveScreenshotResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SaveScreenshotResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScreenshotResponse instance + */ + public static create(properties?: wm.protobuf.ISaveScreenshotResponse): wm.protobuf.SaveScreenshotResponse; + + /** + * Encodes the specified SaveScreenshotResponse message. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @param message SaveScreenshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScreenshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScreenshotResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @param message SaveScreenshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScreenshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScreenshotResponse; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScreenshotResponse; + + /** + * Verifies a SaveScreenshotResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScreenshotResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScreenshotResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScreenshotResponse; + + /** + * Creates a plain object from a SaveScreenshotResponse message. Also converts values to other types if specified. + * @param message SaveScreenshotResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScreenshotResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScreenshotResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScreenshotResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SubmitClientLogRequest. */ + interface ISubmitClientLogRequest { + + /** SubmitClientLogRequest data */ + data: Uint8Array; + + /** SubmitClientLogRequest modifiedAt */ + modifiedAt: number; + + /** SubmitClientLogRequest logType */ + logType: wm.protobuf.ClientLogType; + } + + /** Represents a SubmitClientLogRequest. */ + class SubmitClientLogRequest implements ISubmitClientLogRequest { + + /** + * Constructs a new SubmitClientLogRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISubmitClientLogRequest); + + /** SubmitClientLogRequest data. */ + public data: Uint8Array; + + /** SubmitClientLogRequest modifiedAt. */ + public modifiedAt: number; + + /** SubmitClientLogRequest logType. */ + public logType: wm.protobuf.ClientLogType; + + /** + * Creates a new SubmitClientLogRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SubmitClientLogRequest instance + */ + public static create(properties?: wm.protobuf.ISubmitClientLogRequest): wm.protobuf.SubmitClientLogRequest; + + /** + * Encodes the specified SubmitClientLogRequest message. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @param message SubmitClientLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISubmitClientLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubmitClientLogRequest message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @param message SubmitClientLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISubmitClientLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SubmitClientLogRequest; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SubmitClientLogRequest; + + /** + * Verifies a SubmitClientLogRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubmitClientLogRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubmitClientLogRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SubmitClientLogRequest; + + /** + * Creates a plain object from a SubmitClientLogRequest message. Also converts values to other types if specified. + * @param message SubmitClientLogRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SubmitClientLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubmitClientLogRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubmitClientLogRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SubmitClientLogResponse. */ + interface ISubmitClientLogResponse { + + /** SubmitClientLogResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a SubmitClientLogResponse. */ + class SubmitClientLogResponse implements ISubmitClientLogResponse { + + /** + * Constructs a new SubmitClientLogResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISubmitClientLogResponse); + + /** SubmitClientLogResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new SubmitClientLogResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SubmitClientLogResponse instance + */ + public static create(properties?: wm.protobuf.ISubmitClientLogResponse): wm.protobuf.SubmitClientLogResponse; + + /** + * Encodes the specified SubmitClientLogResponse message. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @param message SubmitClientLogResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISubmitClientLogResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubmitClientLogResponse message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @param message SubmitClientLogResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISubmitClientLogResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SubmitClientLogResponse; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SubmitClientLogResponse; + + /** + * Verifies a SubmitClientLogResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubmitClientLogResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubmitClientLogResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SubmitClientLogResponse; + + /** + * Creates a plain object from a SubmitClientLogResponse message. Also converts values to other types if specified. + * @param message SubmitClientLogResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SubmitClientLogResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubmitClientLogResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubmitClientLogResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadScratchInformationRequest. */ + interface ILoadScratchInformationRequest { + + /** LoadScratchInformationRequest userId */ + userId: number; + } + + /** Represents a LoadScratchInformationRequest. */ + class LoadScratchInformationRequest implements ILoadScratchInformationRequest { + + /** + * Constructs a new LoadScratchInformationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadScratchInformationRequest); + + /** LoadScratchInformationRequest userId. */ + public userId: number; + + /** + * Creates a new LoadScratchInformationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadScratchInformationRequest instance + */ + public static create(properties?: wm.protobuf.ILoadScratchInformationRequest): wm.protobuf.LoadScratchInformationRequest; + + /** + * Encodes the specified LoadScratchInformationRequest message. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @param message LoadScratchInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadScratchInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadScratchInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @param message LoadScratchInformationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadScratchInformationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadScratchInformationRequest; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadScratchInformationRequest; + + /** + * Verifies a LoadScratchInformationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadScratchInformationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadScratchInformationRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadScratchInformationRequest; + + /** + * Creates a plain object from a LoadScratchInformationRequest message. Also converts values to other types if specified. + * @param message LoadScratchInformationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadScratchInformationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadScratchInformationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadScratchInformationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadScratchInformationResponse. */ + interface ILoadScratchInformationResponse { + + /** LoadScratchInformationResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadScratchInformationResponse scratchSheets */ + scratchSheets?: (wm.protobuf.IScratchSheet[]|null); + + /** LoadScratchInformationResponse currentSheet */ + currentSheet: number; + + /** LoadScratchInformationResponse numOfScratched */ + numOfScratched: number; + + /** LoadScratchInformationResponse ownedUserItems */ + ownedUserItems?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a LoadScratchInformationResponse. */ + class LoadScratchInformationResponse implements ILoadScratchInformationResponse { + + /** + * Constructs a new LoadScratchInformationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadScratchInformationResponse); + + /** LoadScratchInformationResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadScratchInformationResponse scratchSheets. */ + public scratchSheets: wm.protobuf.IScratchSheet[]; + + /** LoadScratchInformationResponse currentSheet. */ + public currentSheet: number; + + /** LoadScratchInformationResponse numOfScratched. */ + public numOfScratched: number; + + /** LoadScratchInformationResponse ownedUserItems. */ + public ownedUserItems: wm.protobuf.IUserItem[]; + + /** + * Creates a new LoadScratchInformationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadScratchInformationResponse instance + */ + public static create(properties?: wm.protobuf.ILoadScratchInformationResponse): wm.protobuf.LoadScratchInformationResponse; + + /** + * Encodes the specified LoadScratchInformationResponse message. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @param message LoadScratchInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadScratchInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadScratchInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @param message LoadScratchInformationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadScratchInformationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadScratchInformationResponse; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadScratchInformationResponse; + + /** + * Verifies a LoadScratchInformationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadScratchInformationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadScratchInformationResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadScratchInformationResponse; + + /** + * Creates a plain object from a LoadScratchInformationResponse message. Also converts values to other types if specified. + * @param message LoadScratchInformationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadScratchInformationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadScratchInformationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadScratchInformationResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveScratchSheetRequest. */ + interface ISaveScratchSheetRequest { + + /** SaveScratchSheetRequest timestamp */ + timestamp: number; + + /** SaveScratchSheetRequest targetSheet */ + targetSheet: number; + + /** SaveScratchSheetRequest targetSquare */ + targetSquare: number; + + /** SaveScratchSheetRequest userId */ + userId: number; + } + + /** Represents a SaveScratchSheetRequest. */ + class SaveScratchSheetRequest implements ISaveScratchSheetRequest { + + /** + * Constructs a new SaveScratchSheetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScratchSheetRequest); + + /** SaveScratchSheetRequest timestamp. */ + public timestamp: number; + + /** SaveScratchSheetRequest targetSheet. */ + public targetSheet: number; + + /** SaveScratchSheetRequest targetSquare. */ + public targetSquare: number; + + /** SaveScratchSheetRequest userId. */ + public userId: number; + + /** + * Creates a new SaveScratchSheetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScratchSheetRequest instance + */ + public static create(properties?: wm.protobuf.ISaveScratchSheetRequest): wm.protobuf.SaveScratchSheetRequest; + + /** + * Encodes the specified SaveScratchSheetRequest message. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @param message SaveScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @param message SaveScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScratchSheetRequest; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScratchSheetRequest; + + /** + * Verifies a SaveScratchSheetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScratchSheetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScratchSheetRequest; + + /** + * Creates a plain object from a SaveScratchSheetRequest message. Also converts values to other types if specified. + * @param message SaveScratchSheetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScratchSheetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScratchSheetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScratchSheetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveScratchSheetResponse. */ + interface ISaveScratchSheetResponse { + + /** SaveScratchSheetResponse error */ + error: wm.protobuf.ErrorCode; + + /** SaveScratchSheetResponse scratchSheets */ + scratchSheets?: (wm.protobuf.IScratchSheet[]|null); + + /** SaveScratchSheetResponse currentSheet */ + currentSheet: number; + + /** SaveScratchSheetResponse numOfScratched */ + numOfScratched: number; + + /** SaveScratchSheetResponse earnedItem */ + earnedItem?: (wm.protobuf.IUserItem|null); + } + + /** Represents a SaveScratchSheetResponse. */ + class SaveScratchSheetResponse implements ISaveScratchSheetResponse { + + /** + * Constructs a new SaveScratchSheetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISaveScratchSheetResponse); + + /** SaveScratchSheetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** SaveScratchSheetResponse scratchSheets. */ + public scratchSheets: wm.protobuf.IScratchSheet[]; + + /** SaveScratchSheetResponse currentSheet. */ + public currentSheet: number; + + /** SaveScratchSheetResponse numOfScratched. */ + public numOfScratched: number; + + /** SaveScratchSheetResponse earnedItem. */ + public earnedItem?: (wm.protobuf.IUserItem|null); + + /** + * Creates a new SaveScratchSheetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveScratchSheetResponse instance + */ + public static create(properties?: wm.protobuf.ISaveScratchSheetResponse): wm.protobuf.SaveScratchSheetResponse; + + /** + * Encodes the specified SaveScratchSheetResponse message. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @param message SaveScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISaveScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @param message SaveScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISaveScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SaveScratchSheetResponse; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SaveScratchSheetResponse; + + /** + * Verifies a SaveScratchSheetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveScratchSheetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SaveScratchSheetResponse; + + /** + * Creates a plain object from a SaveScratchSheetResponse message. Also converts values to other types if specified. + * @param message SaveScratchSheetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SaveScratchSheetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveScratchSheetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveScratchSheetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TurnScratchSheetRequest. */ + interface ITurnScratchSheetRequest { + + /** TurnScratchSheetRequest userId */ + userId: number; + + /** TurnScratchSheetRequest targetSheet */ + targetSheet: number; + } + + /** Represents a TurnScratchSheetRequest. */ + class TurnScratchSheetRequest implements ITurnScratchSheetRequest { + + /** + * Constructs a new TurnScratchSheetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITurnScratchSheetRequest); + + /** TurnScratchSheetRequest userId. */ + public userId: number; + + /** TurnScratchSheetRequest targetSheet. */ + public targetSheet: number; + + /** + * Creates a new TurnScratchSheetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TurnScratchSheetRequest instance + */ + public static create(properties?: wm.protobuf.ITurnScratchSheetRequest): wm.protobuf.TurnScratchSheetRequest; + + /** + * Encodes the specified TurnScratchSheetRequest message. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @param message TurnScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITurnScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TurnScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @param message TurnScratchSheetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITurnScratchSheetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TurnScratchSheetRequest; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TurnScratchSheetRequest; + + /** + * Verifies a TurnScratchSheetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TurnScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TurnScratchSheetRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TurnScratchSheetRequest; + + /** + * Creates a plain object from a TurnScratchSheetRequest message. Also converts values to other types if specified. + * @param message TurnScratchSheetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TurnScratchSheetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TurnScratchSheetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TurnScratchSheetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TurnScratchSheetResponse. */ + interface ITurnScratchSheetResponse { + + /** TurnScratchSheetResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a TurnScratchSheetResponse. */ + class TurnScratchSheetResponse implements ITurnScratchSheetResponse { + + /** + * Constructs a new TurnScratchSheetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITurnScratchSheetResponse); + + /** TurnScratchSheetResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new TurnScratchSheetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TurnScratchSheetResponse instance + */ + public static create(properties?: wm.protobuf.ITurnScratchSheetResponse): wm.protobuf.TurnScratchSheetResponse; + + /** + * Encodes the specified TurnScratchSheetResponse message. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @param message TurnScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITurnScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TurnScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @param message TurnScratchSheetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITurnScratchSheetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TurnScratchSheetResponse; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TurnScratchSheetResponse; + + /** + * Verifies a TurnScratchSheetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TurnScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TurnScratchSheetResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TurnScratchSheetResponse; + + /** + * Creates a plain object from a TurnScratchSheetResponse message. Also converts values to other types if specified. + * @param message TurnScratchSheetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TurnScratchSheetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TurnScratchSheetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TurnScratchSheetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckItemReceivableCarsRequest. */ + interface ICheckItemReceivableCarsRequest { + + /** CheckItemReceivableCarsRequest userId */ + userId: number; + + /** CheckItemReceivableCarsRequest itemsToBeEarned */ + itemsToBeEarned?: (wm.protobuf.IUserItem[]|null); + } + + /** Represents a CheckItemReceivableCarsRequest. */ + class CheckItemReceivableCarsRequest implements ICheckItemReceivableCarsRequest { + + /** + * Constructs a new CheckItemReceivableCarsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICheckItemReceivableCarsRequest); + + /** CheckItemReceivableCarsRequest userId. */ + public userId: number; + + /** CheckItemReceivableCarsRequest itemsToBeEarned. */ + public itemsToBeEarned: wm.protobuf.IUserItem[]; + + /** + * Creates a new CheckItemReceivableCarsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckItemReceivableCarsRequest instance + */ + public static create(properties?: wm.protobuf.ICheckItemReceivableCarsRequest): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @param message CheckItemReceivableCarsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICheckItemReceivableCarsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @param message CheckItemReceivableCarsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICheckItemReceivableCarsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Verifies a CheckItemReceivableCarsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckItemReceivableCarsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckItemReceivableCarsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CheckItemReceivableCarsRequest; + + /** + * Creates a plain object from a CheckItemReceivableCarsRequest message. Also converts values to other types if specified. + * @param message CheckItemReceivableCarsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CheckItemReceivableCarsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckItemReceivableCarsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckItemReceivableCarsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckItemReceivableCarsResponse. */ + interface ICheckItemReceivableCarsResponse { + + /** CheckItemReceivableCarsResponse error */ + error: wm.protobuf.ErrorCode; + + /** CheckItemReceivableCarsResponse carIds */ + carIds?: (number[]|null); + } + + /** Represents a CheckItemReceivableCarsResponse. */ + class CheckItemReceivableCarsResponse implements ICheckItemReceivableCarsResponse { + + /** + * Constructs a new CheckItemReceivableCarsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICheckItemReceivableCarsResponse); + + /** CheckItemReceivableCarsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** CheckItemReceivableCarsResponse carIds. */ + public carIds: number[]; + + /** + * Creates a new CheckItemReceivableCarsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckItemReceivableCarsResponse instance + */ + public static create(properties?: wm.protobuf.ICheckItemReceivableCarsResponse): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @param message CheckItemReceivableCarsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICheckItemReceivableCarsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @param message CheckItemReceivableCarsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICheckItemReceivableCarsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Verifies a CheckItemReceivableCarsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckItemReceivableCarsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckItemReceivableCarsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CheckItemReceivableCarsResponse; + + /** + * Creates a plain object from a CheckItemReceivableCarsResponse message. Also converts values to other types if specified. + * @param message CheckItemReceivableCarsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CheckItemReceivableCarsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckItemReceivableCarsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckItemReceivableCarsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReceiveUserItemsRequest. */ + interface IReceiveUserItemsRequest { + + /** ReceiveUserItemsRequest carId */ + carId: number; + + /** ReceiveUserItemsRequest targetItemIds */ + targetItemIds?: (number[]|null); + } + + /** Represents a ReceiveUserItemsRequest. */ + class ReceiveUserItemsRequest implements IReceiveUserItemsRequest { + + /** + * Constructs a new ReceiveUserItemsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IReceiveUserItemsRequest); + + /** ReceiveUserItemsRequest carId. */ + public carId: number; + + /** ReceiveUserItemsRequest targetItemIds. */ + public targetItemIds: number[]; + + /** + * Creates a new ReceiveUserItemsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReceiveUserItemsRequest instance + */ + public static create(properties?: wm.protobuf.IReceiveUserItemsRequest): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Encodes the specified ReceiveUserItemsRequest message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @param message ReceiveUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IReceiveUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReceiveUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @param message ReceiveUserItemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IReceiveUserItemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Verifies a ReceiveUserItemsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReceiveUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReceiveUserItemsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ReceiveUserItemsRequest; + + /** + * Creates a plain object from a ReceiveUserItemsRequest message. Also converts values to other types if specified. + * @param message ReceiveUserItemsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ReceiveUserItemsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReceiveUserItemsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReceiveUserItemsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReceiveUserItemsResponse. */ + interface IReceiveUserItemsResponse { + + /** ReceiveUserItemsResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a ReceiveUserItemsResponse. */ + class ReceiveUserItemsResponse implements IReceiveUserItemsResponse { + + /** + * Constructs a new ReceiveUserItemsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IReceiveUserItemsResponse); + + /** ReceiveUserItemsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new ReceiveUserItemsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReceiveUserItemsResponse instance + */ + public static create(properties?: wm.protobuf.IReceiveUserItemsResponse): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Encodes the specified ReceiveUserItemsResponse message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @param message ReceiveUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IReceiveUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReceiveUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @param message ReceiveUserItemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IReceiveUserItemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Verifies a ReceiveUserItemsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReceiveUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReceiveUserItemsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ReceiveUserItemsResponse; + + /** + * Creates a plain object from a ReceiveUserItemsResponse message. Also converts values to other types if specified. + * @param message ReceiveUserItemsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ReceiveUserItemsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReceiveUserItemsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReceiveUserItemsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEventModeSerialRequest. */ + interface IUpdateEventModeSerialRequest { + + /** UpdateEventModeSerialRequest eventModeSerial */ + eventModeSerial?: (string|null); + } + + /** Represents an UpdateEventModeSerialRequest. */ + class UpdateEventModeSerialRequest implements IUpdateEventModeSerialRequest { + + /** + * Constructs a new UpdateEventModeSerialRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateEventModeSerialRequest); + + /** UpdateEventModeSerialRequest eventModeSerial. */ + public eventModeSerial: string; + + /** + * Creates a new UpdateEventModeSerialRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEventModeSerialRequest instance + */ + public static create(properties?: wm.protobuf.IUpdateEventModeSerialRequest): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Encodes the specified UpdateEventModeSerialRequest message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @param message UpdateEventModeSerialRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateEventModeSerialRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEventModeSerialRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @param message UpdateEventModeSerialRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateEventModeSerialRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Verifies an UpdateEventModeSerialRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEventModeSerialRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEventModeSerialRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateEventModeSerialRequest; + + /** + * Creates a plain object from an UpdateEventModeSerialRequest message. Also converts values to other types if specified. + * @param message UpdateEventModeSerialRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateEventModeSerialRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEventModeSerialRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEventModeSerialRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEventModeSerialResponse. */ + interface IUpdateEventModeSerialResponse { + + /** UpdateEventModeSerialResponse error */ + error: wm.protobuf.ErrorCode; + + /** UpdateEventModeSerialResponse serialError */ + serialError: wm.protobuf.EventModeSerialErrorCode; + + /** UpdateEventModeSerialResponse eventModeSerial */ + eventModeSerial?: (string|null); + + /** UpdateEventModeSerialResponse startAt */ + startAt?: (number|null); + + /** UpdateEventModeSerialResponse endAt */ + endAt?: (number|null); + } + + /** Represents an UpdateEventModeSerialResponse. */ + class UpdateEventModeSerialResponse implements IUpdateEventModeSerialResponse { + + /** + * Constructs a new UpdateEventModeSerialResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUpdateEventModeSerialResponse); + + /** UpdateEventModeSerialResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** UpdateEventModeSerialResponse serialError. */ + public serialError: wm.protobuf.EventModeSerialErrorCode; + + /** UpdateEventModeSerialResponse eventModeSerial. */ + public eventModeSerial: string; + + /** UpdateEventModeSerialResponse startAt. */ + public startAt: number; + + /** UpdateEventModeSerialResponse endAt. */ + public endAt: number; + + /** + * Creates a new UpdateEventModeSerialResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEventModeSerialResponse instance + */ + public static create(properties?: wm.protobuf.IUpdateEventModeSerialResponse): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Encodes the specified UpdateEventModeSerialResponse message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @param message UpdateEventModeSerialResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUpdateEventModeSerialResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEventModeSerialResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @param message UpdateEventModeSerialResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUpdateEventModeSerialResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Verifies an UpdateEventModeSerialResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEventModeSerialResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEventModeSerialResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UpdateEventModeSerialResponse; + + /** + * Creates a plain object from an UpdateEventModeSerialResponse message. Also converts values to other types if specified. + * @param message UpdateEventModeSerialResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UpdateEventModeSerialResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEventModeSerialResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEventModeSerialResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParticipateInInviteFriendCampaignRequest. */ + interface IParticipateInInviteFriendCampaignRequest { + + /** ParticipateInInviteFriendCampaignRequest invitingUserId */ + invitingUserId: number; + + /** ParticipateInInviteFriendCampaignRequest invitedUserId */ + invitedUserId: number; + + /** ParticipateInInviteFriendCampaignRequest sourceCarId */ + sourceCarId: number; + + /** ParticipateInInviteFriendCampaignRequest transmission */ + transmission: boolean; + } + + /** Represents a ParticipateInInviteFriendCampaignRequest. */ + class ParticipateInInviteFriendCampaignRequest implements IParticipateInInviteFriendCampaignRequest { + + /** + * Constructs a new ParticipateInInviteFriendCampaignRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IParticipateInInviteFriendCampaignRequest); + + /** ParticipateInInviteFriendCampaignRequest invitingUserId. */ + public invitingUserId: number; + + /** ParticipateInInviteFriendCampaignRequest invitedUserId. */ + public invitedUserId: number; + + /** ParticipateInInviteFriendCampaignRequest sourceCarId. */ + public sourceCarId: number; + + /** ParticipateInInviteFriendCampaignRequest transmission. */ + public transmission: boolean; + + /** + * Creates a new ParticipateInInviteFriendCampaignRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ParticipateInInviteFriendCampaignRequest instance + */ + public static create(properties?: wm.protobuf.IParticipateInInviteFriendCampaignRequest): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IParticipateInInviteFriendCampaignRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IParticipateInInviteFriendCampaignRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Verifies a ParticipateInInviteFriendCampaignRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParticipateInInviteFriendCampaignRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParticipateInInviteFriendCampaignRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ParticipateInInviteFriendCampaignRequest; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignRequest message. Also converts values to other types if specified. + * @param message ParticipateInInviteFriendCampaignRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ParticipateInInviteFriendCampaignRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParticipateInInviteFriendCampaignRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParticipateInInviteFriendCampaignResponse. */ + interface IParticipateInInviteFriendCampaignResponse { + + /** ParticipateInInviteFriendCampaignResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a ParticipateInInviteFriendCampaignResponse. */ + class ParticipateInInviteFriendCampaignResponse implements IParticipateInInviteFriendCampaignResponse { + + /** + * Constructs a new ParticipateInInviteFriendCampaignResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IParticipateInInviteFriendCampaignResponse); + + /** ParticipateInInviteFriendCampaignResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new ParticipateInInviteFriendCampaignResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ParticipateInInviteFriendCampaignResponse instance + */ + public static create(properties?: wm.protobuf.IParticipateInInviteFriendCampaignResponse): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IParticipateInInviteFriendCampaignResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @param message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IParticipateInInviteFriendCampaignResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Verifies a ParticipateInInviteFriendCampaignResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParticipateInInviteFriendCampaignResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParticipateInInviteFriendCampaignResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ParticipateInInviteFriendCampaignResponse; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignResponse message. Also converts values to other types if specified. + * @param message ParticipateInInviteFriendCampaignResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ParticipateInInviteFriendCampaignResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParticipateInInviteFriendCampaignResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConsumeUserItemRequest. */ + interface IConsumeUserItemRequest { + + /** ConsumeUserItemRequest userId */ + userId: number; + + /** ConsumeUserItemRequest carId */ + carId: number; + + /** ConsumeUserItemRequest userItemId */ + userItemId: number; + } + + /** Represents a ConsumeUserItemRequest. */ + class ConsumeUserItemRequest implements IConsumeUserItemRequest { + + /** + * Constructs a new ConsumeUserItemRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IConsumeUserItemRequest); + + /** ConsumeUserItemRequest userId. */ + public userId: number; + + /** ConsumeUserItemRequest carId. */ + public carId: number; + + /** ConsumeUserItemRequest userItemId. */ + public userItemId: number; + + /** + * Creates a new ConsumeUserItemRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ConsumeUserItemRequest instance + */ + public static create(properties?: wm.protobuf.IConsumeUserItemRequest): wm.protobuf.ConsumeUserItemRequest; + + /** + * Encodes the specified ConsumeUserItemRequest message. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @param message ConsumeUserItemRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IConsumeUserItemRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConsumeUserItemRequest message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @param message ConsumeUserItemRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IConsumeUserItemRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ConsumeUserItemRequest; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ConsumeUserItemRequest; + + /** + * Verifies a ConsumeUserItemRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConsumeUserItemRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConsumeUserItemRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ConsumeUserItemRequest; + + /** + * Creates a plain object from a ConsumeUserItemRequest message. Also converts values to other types if specified. + * @param message ConsumeUserItemRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ConsumeUserItemRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConsumeUserItemRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConsumeUserItemRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConsumeUserItemResponse. */ + interface IConsumeUserItemResponse { + + /** ConsumeUserItemResponse error */ + error: wm.protobuf.ErrorCode; + } + + /** Represents a ConsumeUserItemResponse. */ + class ConsumeUserItemResponse implements IConsumeUserItemResponse { + + /** + * Constructs a new ConsumeUserItemResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IConsumeUserItemResponse); + + /** ConsumeUserItemResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** + * Creates a new ConsumeUserItemResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ConsumeUserItemResponse instance + */ + public static create(properties?: wm.protobuf.IConsumeUserItemResponse): wm.protobuf.ConsumeUserItemResponse; + + /** + * Encodes the specified ConsumeUserItemResponse message. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @param message ConsumeUserItemResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IConsumeUserItemResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConsumeUserItemResponse message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @param message ConsumeUserItemResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IConsumeUserItemResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ConsumeUserItemResponse; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ConsumeUserItemResponse; + + /** + * Verifies a ConsumeUserItemResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConsumeUserItemResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConsumeUserItemResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ConsumeUserItemResponse; + + /** + * Creates a plain object from a ConsumeUserItemResponse message. Also converts values to other types if specified. + * @param message ConsumeUserItemResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ConsumeUserItemResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConsumeUserItemResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConsumeUserItemResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchCarsByLevelRequest. */ + interface ISearchCarsByLevelRequest { + + /** SearchCarsByLevelRequest carId */ + carId: number; + + /** SearchCarsByLevelRequest ghostLevel */ + ghostLevel: number; + + /** SearchCarsByLevelRequest area */ + area: number; + + /** SearchCarsByLevelRequest regionId */ + regionId?: (number|null); + } + + /** Represents a SearchCarsByLevelRequest. */ + class SearchCarsByLevelRequest implements ISearchCarsByLevelRequest { + + /** + * Constructs a new SearchCarsByLevelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISearchCarsByLevelRequest); + + /** SearchCarsByLevelRequest carId. */ + public carId: number; + + /** SearchCarsByLevelRequest ghostLevel. */ + public ghostLevel: number; + + /** SearchCarsByLevelRequest area. */ + public area: number; + + /** SearchCarsByLevelRequest regionId. */ + public regionId: number; + + /** + * Creates a new SearchCarsByLevelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchCarsByLevelRequest instance + */ + public static create(properties?: wm.protobuf.ISearchCarsByLevelRequest): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Encodes the specified SearchCarsByLevelRequest message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @param message SearchCarsByLevelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISearchCarsByLevelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchCarsByLevelRequest message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @param message SearchCarsByLevelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISearchCarsByLevelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Verifies a SearchCarsByLevelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchCarsByLevelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchCarsByLevelRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SearchCarsByLevelRequest; + + /** + * Creates a plain object from a SearchCarsByLevelRequest message. Also converts values to other types if specified. + * @param message SearchCarsByLevelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SearchCarsByLevelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchCarsByLevelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchCarsByLevelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchCarsByLevelResponse. */ + interface ISearchCarsByLevelResponse { + + /** SearchCarsByLevelResponse error */ + error: wm.protobuf.ErrorCode; + + /** SearchCarsByLevelResponse ramp */ + ramp: number; + + /** SearchCarsByLevelResponse path */ + path: number; + + /** SearchCarsByLevelResponse ghosts */ + ghosts?: (wm.protobuf.IGhostCar[]|null); + + /** SearchCarsByLevelResponse selectionMethod */ + selectionMethod: wm.protobuf.PathSelectionMethod; + + /** SearchCarsByLevelResponse rates */ + rates?: (wm.protobuf.SearchCarsByLevelResponse.IRate[]|null); + } + + /** Represents a SearchCarsByLevelResponse. */ + class SearchCarsByLevelResponse implements ISearchCarsByLevelResponse { + + /** + * Constructs a new SearchCarsByLevelResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISearchCarsByLevelResponse); + + /** SearchCarsByLevelResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** SearchCarsByLevelResponse ramp. */ + public ramp: number; + + /** SearchCarsByLevelResponse path. */ + public path: number; + + /** SearchCarsByLevelResponse ghosts. */ + public ghosts: wm.protobuf.IGhostCar[]; + + /** SearchCarsByLevelResponse selectionMethod. */ + public selectionMethod: wm.protobuf.PathSelectionMethod; + + /** SearchCarsByLevelResponse rates. */ + public rates: wm.protobuf.SearchCarsByLevelResponse.IRate[]; + + /** + * Creates a new SearchCarsByLevelResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchCarsByLevelResponse instance + */ + public static create(properties?: wm.protobuf.ISearchCarsByLevelResponse): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Encodes the specified SearchCarsByLevelResponse message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @param message SearchCarsByLevelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISearchCarsByLevelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchCarsByLevelResponse message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @param message SearchCarsByLevelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISearchCarsByLevelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Verifies a SearchCarsByLevelResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchCarsByLevelResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchCarsByLevelResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SearchCarsByLevelResponse; + + /** + * Creates a plain object from a SearchCarsByLevelResponse message. Also converts values to other types if specified. + * @param message SearchCarsByLevelResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SearchCarsByLevelResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchCarsByLevelResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchCarsByLevelResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SearchCarsByLevelResponse { + + /** Properties of a Rate. */ + interface IRate { + + /** Rate carId */ + carId: number; + + /** Rate type */ + type: wm.protobuf.GhostRateType; + + /** Rate rate */ + rate?: (number|null); + } + + /** Represents a Rate. */ + class Rate implements IRate { + + /** + * Constructs a new Rate. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.SearchCarsByLevelResponse.IRate); + + /** Rate carId. */ + public carId: number; + + /** Rate type. */ + public type: wm.protobuf.GhostRateType; + + /** Rate rate. */ + public rate: number; + + /** + * Creates a new Rate instance using the specified properties. + * @param [properties] Properties to set + * @returns Rate instance + */ + public static create(properties?: wm.protobuf.SearchCarsByLevelResponse.IRate): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Encodes the specified Rate message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @param message Rate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.SearchCarsByLevelResponse.IRate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Rate message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @param message Rate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.SearchCarsByLevelResponse.IRate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Rate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Decodes a Rate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Verifies a Rate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Rate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Rate + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SearchCarsByLevelResponse.Rate; + + /** + * Creates a plain object from a Rate message. Also converts values to other types if specified. + * @param message Rate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SearchCarsByLevelResponse.Rate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Rate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Rate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadPathsAndTuningsRequest. */ + interface ILoadPathsAndTuningsRequest { + + /** LoadPathsAndTuningsRequest carId */ + carId: number; + + /** LoadPathsAndTuningsRequest selectedCars */ + selectedCars?: (number[]|null); + + /** LoadPathsAndTuningsRequest returnImmediately */ + returnImmediately?: (boolean|null); + + /** LoadPathsAndTuningsRequest stampTargetArea */ + stampTargetArea?: (number|null); + } + + /** Represents a LoadPathsAndTuningsRequest. */ + class LoadPathsAndTuningsRequest implements ILoadPathsAndTuningsRequest { + + /** + * Constructs a new LoadPathsAndTuningsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadPathsAndTuningsRequest); + + /** LoadPathsAndTuningsRequest carId. */ + public carId: number; + + /** LoadPathsAndTuningsRequest selectedCars. */ + public selectedCars: number[]; + + /** LoadPathsAndTuningsRequest returnImmediately. */ + public returnImmediately: boolean; + + /** LoadPathsAndTuningsRequest stampTargetArea. */ + public stampTargetArea: number; + + /** + * Creates a new LoadPathsAndTuningsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadPathsAndTuningsRequest instance + */ + public static create(properties?: wm.protobuf.ILoadPathsAndTuningsRequest): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @param message LoadPathsAndTuningsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadPathsAndTuningsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @param message LoadPathsAndTuningsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadPathsAndTuningsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Verifies a LoadPathsAndTuningsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadPathsAndTuningsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadPathsAndTuningsRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadPathsAndTuningsRequest; + + /** + * Creates a plain object from a LoadPathsAndTuningsRequest message. Also converts values to other types if specified. + * @param message LoadPathsAndTuningsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadPathsAndTuningsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadPathsAndTuningsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadPathsAndTuningsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadPathsAndTuningsResponse. */ + interface ILoadPathsAndTuningsResponse { + + /** LoadPathsAndTuningsResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadPathsAndTuningsResponse data */ + data?: (wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath[]|null); + } + + /** Represents a LoadPathsAndTuningsResponse. */ + class LoadPathsAndTuningsResponse implements ILoadPathsAndTuningsResponse { + + /** + * Constructs a new LoadPathsAndTuningsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadPathsAndTuningsResponse); + + /** LoadPathsAndTuningsResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadPathsAndTuningsResponse data. */ + public data: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath[]; + + /** + * Creates a new LoadPathsAndTuningsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadPathsAndTuningsResponse instance + */ + public static create(properties?: wm.protobuf.ILoadPathsAndTuningsResponse): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @param message LoadPathsAndTuningsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadPathsAndTuningsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @param message LoadPathsAndTuningsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadPathsAndTuningsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Verifies a LoadPathsAndTuningsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadPathsAndTuningsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadPathsAndTuningsResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadPathsAndTuningsResponse; + + /** + * Creates a plain object from a LoadPathsAndTuningsResponse message. Also converts values to other types if specified. + * @param message LoadPathsAndTuningsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadPathsAndTuningsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadPathsAndTuningsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadPathsAndTuningsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadPathsAndTuningsResponse { + + /** Properties of a CarTuningsByPath. */ + interface ICarTuningsByPath { + + /** CarTuningsByPath area */ + area: number; + + /** CarTuningsByPath ramp */ + ramp: number; + + /** CarTuningsByPath path */ + path: number; + + /** CarTuningsByPath carTunings */ + carTunings?: (wm.protobuf.ICarTuning[]|null); + + /** CarTuningsByPath selectionMethod */ + selectionMethod: wm.protobuf.PathSelectionMethod; + } + + /** Represents a CarTuningsByPath. */ + class CarTuningsByPath implements ICarTuningsByPath { + + /** + * Constructs a new CarTuningsByPath. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath); + + /** CarTuningsByPath area. */ + public area: number; + + /** CarTuningsByPath ramp. */ + public ramp: number; + + /** CarTuningsByPath path. */ + public path: number; + + /** CarTuningsByPath carTunings. */ + public carTunings: wm.protobuf.ICarTuning[]; + + /** CarTuningsByPath selectionMethod. */ + public selectionMethod: wm.protobuf.PathSelectionMethod; + + /** + * Creates a new CarTuningsByPath instance using the specified properties. + * @param [properties] Properties to set + * @returns CarTuningsByPath instance + */ + public static create(properties?: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Encodes the specified CarTuningsByPath message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @param message CarTuningsByPath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarTuningsByPath message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @param message CarTuningsByPath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Verifies a CarTuningsByPath message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarTuningsByPath message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarTuningsByPath + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath; + + /** + * Creates a plain object from a CarTuningsByPath message. Also converts values to other types if specified. + * @param message CarTuningsByPath + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarTuningsByPath to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarTuningsByPath + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadGhostDriveDataRequest. */ + interface ILoadGhostDriveDataRequest { + + /** LoadGhostDriveDataRequest path */ + path: number; + + /** LoadGhostDriveDataRequest carTunings */ + carTunings?: (wm.protobuf.ICarTuning[]|null); + } + + /** Represents a LoadGhostDriveDataRequest. */ + class LoadGhostDriveDataRequest implements ILoadGhostDriveDataRequest { + + /** + * Constructs a new LoadGhostDriveDataRequest. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostDriveDataRequest); + + /** LoadGhostDriveDataRequest path. */ + public path: number; + + /** LoadGhostDriveDataRequest carTunings. */ + public carTunings: wm.protobuf.ICarTuning[]; + + /** + * Creates a new LoadGhostDriveDataRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostDriveDataRequest instance + */ + public static create(properties?: wm.protobuf.ILoadGhostDriveDataRequest): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Encodes the specified LoadGhostDriveDataRequest message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @param message LoadGhostDriveDataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostDriveDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostDriveDataRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @param message LoadGhostDriveDataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostDriveDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Verifies a LoadGhostDriveDataRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostDriveDataRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostDriveDataRequest + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostDriveDataRequest; + + /** + * Creates a plain object from a LoadGhostDriveDataRequest message. Also converts values to other types if specified. + * @param message LoadGhostDriveDataRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostDriveDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostDriveDataRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostDriveDataRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadGhostDriveDataResponse. */ + interface ILoadGhostDriveDataResponse { + + /** LoadGhostDriveDataResponse error */ + error: wm.protobuf.ErrorCode; + + /** LoadGhostDriveDataResponse data */ + data?: (wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData[]|null); + } + + /** Represents a LoadGhostDriveDataResponse. */ + class LoadGhostDriveDataResponse implements ILoadGhostDriveDataResponse { + + /** + * Constructs a new LoadGhostDriveDataResponse. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ILoadGhostDriveDataResponse); + + /** LoadGhostDriveDataResponse error. */ + public error: wm.protobuf.ErrorCode; + + /** LoadGhostDriveDataResponse data. */ + public data: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData[]; + + /** + * Creates a new LoadGhostDriveDataResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadGhostDriveDataResponse instance + */ + public static create(properties?: wm.protobuf.ILoadGhostDriveDataResponse): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Encodes the specified LoadGhostDriveDataResponse message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @param message LoadGhostDriveDataResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ILoadGhostDriveDataResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadGhostDriveDataResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @param message LoadGhostDriveDataResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ILoadGhostDriveDataResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Verifies a LoadGhostDriveDataResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadGhostDriveDataResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadGhostDriveDataResponse + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostDriveDataResponse; + + /** + * Creates a plain object from a LoadGhostDriveDataResponse message. Also converts values to other types if specified. + * @param message LoadGhostDriveDataResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostDriveDataResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadGhostDriveDataResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadGhostDriveDataResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadGhostDriveDataResponse { + + /** Properties of a GhostDriveData. */ + interface IGhostDriveData { + + /** GhostDriveData carId */ + carId: number; + + /** GhostDriveData type */ + type: wm.protobuf.GhostType; + + /** GhostDriveData driveData */ + driveData?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByUser */ + trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByCar */ + trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByArea */ + trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + } + + /** Represents a GhostDriveData. */ + class GhostDriveData implements IGhostDriveData { + + /** + * Constructs a new GhostDriveData. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData); + + /** GhostDriveData carId. */ + public carId: number; + + /** GhostDriveData type. */ + public type: wm.protobuf.GhostType; + + /** GhostDriveData driveData. */ + public driveData?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByUser. */ + public trendBinaryByUser?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByCar. */ + public trendBinaryByCar?: (wm.protobuf.IBinaryData|null); + + /** GhostDriveData trendBinaryByArea. */ + public trendBinaryByArea?: (wm.protobuf.IBinaryData|null); + + /** + * Creates a new GhostDriveData instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostDriveData instance + */ + public static create(properties?: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Encodes the specified GhostDriveData message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @param message GhostDriveData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostDriveData message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @param message GhostDriveData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Verifies a GhostDriveData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostDriveData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostDriveData + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData; + + /** + * Creates a plain object from a GhostDriveData message. Also converts values to other types if specified. + * @param message GhostDriveData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostDriveData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostDriveData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Car. */ + interface ICar { + + /** Car carId */ + carId?: (number|null); + + /** Car userId */ + userId?: (number|null); + + /** Car regionId */ + regionId?: (number|null); + + /** Car name */ + name?: (string|null); + + /** Car manufacturer */ + manufacturer?: (number|null); + + /** Car model */ + model?: (number|null); + + /** Car visualModel */ + visualModel?: (number|null); + + /** Car defaultColor */ + defaultColor?: (number|null); + + /** Car customColor */ + customColor: number; + + /** Car wheel */ + wheel: number; + + /** Car wheelColor */ + wheelColor: number; + + /** Car aero */ + aero: number; + + /** Car bonnet */ + bonnet: number; + + /** Car wing */ + wing: number; + + /** Car gtWing */ + gtWing?: (wm.protobuf.IGTWing|null); + + /** Car mirror */ + mirror: number; + + /** Car neon */ + neon: number; + + /** Car trunk */ + trunk: number; + + /** Car plate */ + plate: number; + + /** Car plateColor */ + plateColor: number; + + /** Car plateNumber */ + plateNumber: number; + + /** Car tunePower */ + tunePower: number; + + /** Car tuneHandling */ + tuneHandling: number; + + /** Car title */ + title: string; + + /** Car level */ + level: number; + + /** Car windowSticker */ + windowSticker?: (boolean|null); + + /** Car windowStickerString */ + windowStickerString?: (string|null); + + /** Car windowStickerFont */ + windowStickerFont?: (number|null); + + /** Car windowDecoration */ + windowDecoration?: (number|null); + + /** Car rivalMarker */ + rivalMarker?: (number|null); + + /** Car lastPlayedAt */ + lastPlayedAt?: (number|null); + + /** Car lastPlayedPlace */ + lastPlayedPlace?: (wm.protobuf.IPlace|null); + + /** Car aura */ + aura?: (number|null); + + /** Car auraMotif */ + auraMotif?: (number|null); + + /** Car ghostLevel */ + ghostLevel?: (number|null); + + /** Car country */ + country?: (string|null); + + /** Car searchCode */ + searchCode?: (string|null); + } + + /** Represents a Car. */ + class Car implements ICar { + + /** + * Constructs a new Car. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICar); + + /** Car carId. */ + public carId: number; + + /** Car userId. */ + public userId: number; + + /** Car regionId. */ + public regionId: number; + + /** Car name. */ + public name: string; + + /** Car manufacturer. */ + public manufacturer: number; + + /** Car model. */ + public model: number; + + /** Car visualModel. */ + public visualModel: number; + + /** Car defaultColor. */ + public defaultColor: number; + + /** Car customColor. */ + public customColor: number; + + /** Car wheel. */ + public wheel: number; + + /** Car wheelColor. */ + public wheelColor: number; + + /** Car aero. */ + public aero: number; + + /** Car bonnet. */ + public bonnet: number; + + /** Car wing. */ + public wing: number; + + /** Car gtWing. */ + public gtWing?: (wm.protobuf.IGTWing|null); + + /** Car mirror. */ + public mirror: number; + + /** Car neon. */ + public neon: number; + + /** Car trunk. */ + public trunk: number; + + /** Car plate. */ + public plate: number; + + /** Car plateColor. */ + public plateColor: number; + + /** Car plateNumber. */ + public plateNumber: number; + + /** Car tunePower. */ + public tunePower: number; + + /** Car tuneHandling. */ + public tuneHandling: number; + + /** Car title. */ + public title: string; + + /** Car level. */ + public level: number; + + /** Car windowSticker. */ + public windowSticker: boolean; + + /** Car windowStickerString. */ + public windowStickerString: string; + + /** Car windowStickerFont. */ + public windowStickerFont: number; + + /** Car windowDecoration. */ + public windowDecoration: number; + + /** Car rivalMarker. */ + public rivalMarker: number; + + /** Car lastPlayedAt. */ + public lastPlayedAt: number; + + /** Car lastPlayedPlace. */ + public lastPlayedPlace?: (wm.protobuf.IPlace|null); + + /** Car aura. */ + public aura: number; + + /** Car auraMotif. */ + public auraMotif: number; + + /** Car ghostLevel. */ + public ghostLevel: number; + + /** Car country. */ + public country: string; + + /** Car searchCode. */ + public searchCode: string; + + /** + * Creates a new Car instance using the specified properties. + * @param [properties] Properties to set + * @returns Car instance + */ + public static create(properties?: wm.protobuf.ICar): wm.protobuf.Car; + + /** + * Encodes the specified Car message. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @param message Car message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Car message, length delimited. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @param message Car message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Car message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Car; + + /** + * Decodes a Car message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Car; + + /** + * Verifies a Car message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Car message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Car + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Car; + + /** + * Creates a plain object from a Car message. Also converts values to other types if specified. + * @param message Car + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Car, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Car to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Car + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarSetting. */ + interface ICarSetting { + + /** CarSetting carId */ + carId?: (number|null); + + /** CarSetting view */ + view: boolean; + + /** CarSetting transmission */ + transmission: boolean; + + /** CarSetting retire */ + retire: boolean; + + /** CarSetting meter */ + meter: number; + + /** CarSetting navigationMap */ + navigationMap: boolean; + + /** CarSetting volume */ + volume: number; + + /** CarSetting bgm */ + bgm: number; + + /** CarSetting nameplate */ + nameplate: number; + + /** CarSetting nameplateColor */ + nameplateColor: number; + + /** CarSetting terminalBackground */ + terminalBackground: number; + } + + /** Represents a CarSetting. */ + class CarSetting implements ICarSetting { + + /** + * Constructs a new CarSetting. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarSetting); + + /** CarSetting carId. */ + public carId: number; + + /** CarSetting view. */ + public view: boolean; + + /** CarSetting transmission. */ + public transmission: boolean; + + /** CarSetting retire. */ + public retire: boolean; + + /** CarSetting meter. */ + public meter: number; + + /** CarSetting navigationMap. */ + public navigationMap: boolean; + + /** CarSetting volume. */ + public volume: number; + + /** CarSetting bgm. */ + public bgm: number; + + /** CarSetting nameplate. */ + public nameplate: number; + + /** CarSetting nameplateColor. */ + public nameplateColor: number; + + /** CarSetting terminalBackground. */ + public terminalBackground: number; + + /** + * Creates a new CarSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns CarSetting instance + */ + public static create(properties?: wm.protobuf.ICarSetting): wm.protobuf.CarSetting; + + /** + * Encodes the specified CarSetting message. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @param message CarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarSetting message, length delimited. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @param message CarSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarSetting; + + /** + * Decodes a CarSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarSetting; + + /** + * Verifies a CarSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarSetting + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarSetting; + + /** + * Creates a plain object from a CarSetting message. Also converts values to other types if specified. + * @param message CarSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GTWing. */ + interface IGTWing { + + /** GTWing pillar */ + pillar: number; + + /** GTWing pillarMaterial */ + pillarMaterial: number; + + /** GTWing mainWing */ + mainWing: number; + + /** GTWing mainWingColor */ + mainWingColor: number; + + /** GTWing wingTip */ + wingTip: number; + + /** GTWing material */ + material: number; + } + + /** Represents a GTWing. */ + class GTWing implements IGTWing { + + /** + * Constructs a new GTWing. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGTWing); + + /** GTWing pillar. */ + public pillar: number; + + /** GTWing pillarMaterial. */ + public pillarMaterial: number; + + /** GTWing mainWing. */ + public mainWing: number; + + /** GTWing mainWingColor. */ + public mainWingColor: number; + + /** GTWing wingTip. */ + public wingTip: number; + + /** GTWing material. */ + public material: number; + + /** + * Creates a new GTWing instance using the specified properties. + * @param [properties] Properties to set + * @returns GTWing instance + */ + public static create(properties?: wm.protobuf.IGTWing): wm.protobuf.GTWing; + + /** + * Encodes the specified GTWing message. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @param message GTWing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGTWing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GTWing message, length delimited. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @param message GTWing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGTWing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GTWing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GTWing; + + /** + * Decodes a GTWing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GTWing; + + /** + * Verifies a GTWing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GTWing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GTWing + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GTWing; + + /** + * Creates a plain object from a GTWing message. Also converts values to other types if specified. + * @param message GTWing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GTWing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GTWing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GTWing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarItem. */ + interface ICarItem { + + /** CarItem category */ + category: wm.protobuf.ItemCategory; + + /** CarItem itemId */ + itemId: number; + + /** CarItem amount */ + amount?: (number|null); + } + + /** Represents a CarItem. */ + class CarItem implements ICarItem { + + /** + * Constructs a new CarItem. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarItem); + + /** CarItem category. */ + public category: wm.protobuf.ItemCategory; + + /** CarItem itemId. */ + public itemId: number; + + /** CarItem amount. */ + public amount: number; + + /** + * Creates a new CarItem instance using the specified properties. + * @param [properties] Properties to set + * @returns CarItem instance + */ + public static create(properties?: wm.protobuf.ICarItem): wm.protobuf.CarItem; + + /** + * Encodes the specified CarItem message. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @param message CarItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarItem message, length delimited. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @param message CarItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarItem; + + /** + * Decodes a CarItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarItem; + + /** + * Verifies a CarItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarItem + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarItem; + + /** + * Creates a plain object from a CarItem message. Also converts values to other types if specified. + * @param message CarItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CopiedCar. */ + interface ICopiedCar { + + /** CopiedCar car */ + car: wm.protobuf.ICar; + + /** CopiedCar remainingPlayCounts */ + remainingPlayCounts: number; + } + + /** Represents a CopiedCar. */ + class CopiedCar implements ICopiedCar { + + /** + * Constructs a new CopiedCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICopiedCar); + + /** CopiedCar car. */ + public car: wm.protobuf.ICar; + + /** CopiedCar remainingPlayCounts. */ + public remainingPlayCounts: number; + + /** + * Creates a new CopiedCar instance using the specified properties. + * @param [properties] Properties to set + * @returns CopiedCar instance + */ + public static create(properties?: wm.protobuf.ICopiedCar): wm.protobuf.CopiedCar; + + /** + * Encodes the specified CopiedCar message. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @param message CopiedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICopiedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CopiedCar message, length delimited. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @param message CopiedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICopiedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CopiedCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CopiedCar; + + /** + * Decodes a CopiedCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CopiedCar; + + /** + * Verifies a CopiedCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CopiedCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CopiedCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CopiedCar; + + /** + * Creates a plain object from a CopiedCar message. Also converts values to other types if specified. + * @param message CopiedCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CopiedCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CopiedCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CopiedCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FriendCar. */ + interface IFriendCar { + + /** FriendCar car */ + car: wm.protobuf.ICar; + + /** FriendCar friendshipLevel */ + friendshipLevel?: (number|null); + + /** FriendCar nonhuman */ + nonhuman: boolean; + } + + /** Represents a FriendCar. */ + class FriendCar implements IFriendCar { + + /** + * Constructs a new FriendCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IFriendCar); + + /** FriendCar car. */ + public car: wm.protobuf.ICar; + + /** FriendCar friendshipLevel. */ + public friendshipLevel: number; + + /** FriendCar nonhuman. */ + public nonhuman: boolean; + + /** + * Creates a new FriendCar instance using the specified properties. + * @param [properties] Properties to set + * @returns FriendCar instance + */ + public static create(properties?: wm.protobuf.IFriendCar): wm.protobuf.FriendCar; + + /** + * Encodes the specified FriendCar message. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @param message FriendCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IFriendCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FriendCar message, length delimited. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @param message FriendCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IFriendCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FriendCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.FriendCar; + + /** + * Decodes a FriendCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.FriendCar; + + /** + * Verifies a FriendCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FriendCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FriendCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.FriendCar; + + /** + * Creates a plain object from a FriendCar message. Also converts values to other types if specified. + * @param message FriendCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.FriendCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FriendCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FriendCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChallengerCar. */ + interface IChallengerCar { + + /** ChallengerCar car */ + car: wm.protobuf.ICar; + + /** ChallengerCar stamp */ + stamp: number; + + /** ChallengerCar result */ + result: number; + + /** ChallengerCar area */ + area: number; + } + + /** Represents a ChallengerCar. */ + class ChallengerCar implements IChallengerCar { + + /** + * Constructs a new ChallengerCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IChallengerCar); + + /** ChallengerCar car. */ + public car: wm.protobuf.ICar; + + /** ChallengerCar stamp. */ + public stamp: number; + + /** ChallengerCar result. */ + public result: number; + + /** ChallengerCar area. */ + public area: number; + + /** + * Creates a new ChallengerCar instance using the specified properties. + * @param [properties] Properties to set + * @returns ChallengerCar instance + */ + public static create(properties?: wm.protobuf.IChallengerCar): wm.protobuf.ChallengerCar; + + /** + * Encodes the specified ChallengerCar message. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @param message ChallengerCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IChallengerCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChallengerCar message, length delimited. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @param message ChallengerCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IChallengerCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ChallengerCar; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ChallengerCar; + + /** + * Verifies a ChallengerCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChallengerCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChallengerCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ChallengerCar; + + /** + * Creates a plain object from a ChallengerCar message. Also converts values to other types if specified. + * @param message ChallengerCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ChallengerCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChallengerCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChallengerCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StampTargetCar. */ + interface IStampTargetCar { + + /** StampTargetCar car */ + car: wm.protobuf.ICar; + + /** StampTargetCar returnCount */ + returnCount: number; + + /** StampTargetCar locked */ + locked: boolean; + + /** StampTargetCar recommended */ + recommended: boolean; + } + + /** Represents a StampTargetCar. */ + class StampTargetCar implements IStampTargetCar { + + /** + * Constructs a new StampTargetCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IStampTargetCar); + + /** StampTargetCar car. */ + public car: wm.protobuf.ICar; + + /** StampTargetCar returnCount. */ + public returnCount: number; + + /** StampTargetCar locked. */ + public locked: boolean; + + /** StampTargetCar recommended. */ + public recommended: boolean; + + /** + * Creates a new StampTargetCar instance using the specified properties. + * @param [properties] Properties to set + * @returns StampTargetCar instance + */ + public static create(properties?: wm.protobuf.IStampTargetCar): wm.protobuf.StampTargetCar; + + /** + * Encodes the specified StampTargetCar message. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @param message StampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @param message StampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.StampTargetCar; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.StampTargetCar; + + /** + * Verifies a StampTargetCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StampTargetCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StampTargetCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.StampTargetCar; + + /** + * Creates a plain object from a StampTargetCar message. Also converts values to other types if specified. + * @param message StampTargetCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.StampTargetCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StampTargetCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StampTargetCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BookmarkedCar. */ + interface IBookmarkedCar { + + /** BookmarkedCar car */ + car: wm.protobuf.ICar; + + /** BookmarkedCar returnCount */ + returnCount: number; + } + + /** Represents a BookmarkedCar. */ + class BookmarkedCar implements IBookmarkedCar { + + /** + * Constructs a new BookmarkedCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IBookmarkedCar); + + /** BookmarkedCar car. */ + public car: wm.protobuf.ICar; + + /** BookmarkedCar returnCount. */ + public returnCount: number; + + /** + * Creates a new BookmarkedCar instance using the specified properties. + * @param [properties] Properties to set + * @returns BookmarkedCar instance + */ + public static create(properties?: wm.protobuf.IBookmarkedCar): wm.protobuf.BookmarkedCar; + + /** + * Encodes the specified BookmarkedCar message. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @param message BookmarkedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IBookmarkedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BookmarkedCar message, length delimited. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @param message BookmarkedCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IBookmarkedCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.BookmarkedCar; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.BookmarkedCar; + + /** + * Verifies a BookmarkedCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BookmarkedCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BookmarkedCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.BookmarkedCar; + + /** + * Creates a plain object from a BookmarkedCar message. Also converts values to other types if specified. + * @param message BookmarkedCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.BookmarkedCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BookmarkedCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BookmarkedCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PreviousVersionStampTargetCar. */ + interface IPreviousVersionStampTargetCar { + + /** PreviousVersionStampTargetCar car */ + car: wm.protobuf.ICar; + + /** PreviousVersionStampTargetCar returnCount */ + returnCount: number; + + /** PreviousVersionStampTargetCar currentCarId */ + currentCarId?: (number|null); + } + + /** Represents a PreviousVersionStampTargetCar. */ + class PreviousVersionStampTargetCar implements IPreviousVersionStampTargetCar { + + /** + * Constructs a new PreviousVersionStampTargetCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPreviousVersionStampTargetCar); + + /** PreviousVersionStampTargetCar car. */ + public car: wm.protobuf.ICar; + + /** PreviousVersionStampTargetCar returnCount. */ + public returnCount: number; + + /** PreviousVersionStampTargetCar currentCarId. */ + public currentCarId: number; + + /** + * Creates a new PreviousVersionStampTargetCar instance using the specified properties. + * @param [properties] Properties to set + * @returns PreviousVersionStampTargetCar instance + */ + public static create(properties?: wm.protobuf.IPreviousVersionStampTargetCar): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Encodes the specified PreviousVersionStampTargetCar message. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @param message PreviousVersionStampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPreviousVersionStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreviousVersionStampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @param message PreviousVersionStampTargetCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPreviousVersionStampTargetCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Verifies a PreviousVersionStampTargetCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PreviousVersionStampTargetCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreviousVersionStampTargetCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PreviousVersionStampTargetCar; + + /** + * Creates a plain object from a PreviousVersionStampTargetCar message. Also converts values to other types if specified. + * @param message PreviousVersionStampTargetCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PreviousVersionStampTargetCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreviousVersionStampTargetCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PreviousVersionStampTargetCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCar. */ + interface IGhostCar { + + /** GhostCar car */ + car: wm.protobuf.ICar; + + /** GhostCar area */ + area?: (number|null); + + /** GhostCar ramp */ + ramp?: (number|null); + + /** GhostCar path */ + path?: (number|null); + + /** GhostCar nonhuman */ + nonhuman?: (boolean|null); + + /** GhostCar type */ + type?: (wm.protobuf.GhostType|null); + + /** GhostCar trailId */ + trailId?: (number|Long|null); + } + + /** Represents a GhostCar. */ + class GhostCar implements IGhostCar { + + /** + * Constructs a new GhostCar. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCar); + + /** GhostCar car. */ + public car: wm.protobuf.ICar; + + /** GhostCar area. */ + public area: number; + + /** GhostCar ramp. */ + public ramp: number; + + /** GhostCar path. */ + public path: number; + + /** GhostCar nonhuman. */ + public nonhuman: boolean; + + /** GhostCar type. */ + public type: wm.protobuf.GhostType; + + /** GhostCar trailId. */ + public trailId: (number|Long); + + /** + * Creates a new GhostCar instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCar instance + */ + public static create(properties?: wm.protobuf.IGhostCar): wm.protobuf.GhostCar; + + /** + * Encodes the specified GhostCar message. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @param message GhostCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCar message, length delimited. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @param message GhostCar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCar; + + /** + * Decodes a GhostCar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCar; + + /** + * Verifies a GhostCar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCar + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCar; + + /** + * Creates a plain object from a GhostCar message. Also converts values to other types if specified. + * @param message GhostCar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Place. */ + interface IPlace { + + /** Place placeId */ + placeId: string; + + /** Place shopName */ + shopName: string; + + /** Place regionId */ + regionId: number; + + /** Place country */ + country: string; + } + + /** Represents a Place. */ + class Place implements IPlace { + + /** + * Constructs a new Place. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPlace); + + /** Place placeId. */ + public placeId: string; + + /** Place shopName. */ + public shopName: string; + + /** Place regionId. */ + public regionId: number; + + /** Place country. */ + public country: string; + + /** + * Creates a new Place instance using the specified properties. + * @param [properties] Properties to set + * @returns Place instance + */ + public static create(properties?: wm.protobuf.IPlace): wm.protobuf.Place; + + /** + * Encodes the specified Place message. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @param message Place message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Place message, length delimited. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @param message Place message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Place message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.Place; + + /** + * Decodes a Place message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.Place; + + /** + * Verifies a Place message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Place message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Place + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.Place; + + /** + * Creates a plain object from a Place message. Also converts values to other types if specified. + * @param message Place + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.Place, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Place to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Place + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SystemSetting. */ + interface ISystemSetting { + + /** SystemSetting mCoinChute */ + mCoinChute: number; + + /** SystemSetting mBuyCardCost */ + mBuyCardCost: number; + + /** SystemSetting mGameCost */ + mGameCost: number; + + /** SystemSetting mContinueCost */ + mContinueCost: number; + + /** SystemSetting mFullCourseCost */ + mFullCourseCost: number; + + /** SystemSetting mFreePlay */ + mFreePlay: boolean; + + /** SystemSetting mPcbId */ + mPcbId?: (number|null); + + /** SystemSetting mIcCardRw */ + mIcCardRw: boolean; + + /** SystemSetting mIcCardVender */ + mIcCardVender: boolean; + + /** SystemSetting mMgCardRw */ + mMgCardRw?: (boolean|null); + + /** SystemSetting mForceFeedback */ + mForceFeedback?: (boolean|null); + + /** SystemSetting mWinsAndRemains */ + mWinsAndRemains: boolean; + + /** SystemSetting mEventMode */ + mEventMode: number; + + /** SystemSetting mEventModeDist */ + mEventModeDist: boolean; + + /** SystemSetting mCloseType */ + mCloseType: number; + + /** SystemSetting mCloseSun */ + mCloseSun: number; + + /** SystemSetting mCloseMon */ + mCloseMon: number; + + /** SystemSetting mCloseTue */ + mCloseTue: number; + + /** SystemSetting mCloseWed */ + mCloseWed: number; + + /** SystemSetting mCloseThu */ + mCloseThu: number; + + /** SystemSetting mCloseFri */ + mCloseFri: number; + + /** SystemSetting mCloseSat */ + mCloseSat: number; + + /** SystemSetting mCloseDay */ + mCloseDay: number; + + /** SystemSetting mTouchPanel */ + mTouchPanel?: (boolean|null); + + /** SystemSetting mGameVol */ + mGameVol: number; + + /** SystemSetting mAttractVol */ + mAttractVol: number; + + /** SystemSetting mCalibHandleCenter */ + mCalibHandleCenter?: (number|null); + + /** SystemSetting mCalibAccelCenter */ + mCalibAccelCenter?: (number|null); + + /** SystemSetting mCalibBrakeCenter */ + mCalibBrakeCenter?: (number|null); + + /** SystemSetting mCalibTouchLeft */ + mCalibTouchLeft?: (number|null); + + /** SystemSetting mCalibTouchRight */ + mCalibTouchRight?: (number|null); + + /** SystemSetting mCalibTouchTop */ + mCalibTouchTop?: (number|null); + + /** SystemSetting mCalibTouchBottom */ + mCalibTouchBottom?: (number|null); + } + + /** Represents a SystemSetting. */ + class SystemSetting implements ISystemSetting { + + /** + * Constructs a new SystemSetting. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ISystemSetting); + + /** SystemSetting mCoinChute. */ + public mCoinChute: number; + + /** SystemSetting mBuyCardCost. */ + public mBuyCardCost: number; + + /** SystemSetting mGameCost. */ + public mGameCost: number; + + /** SystemSetting mContinueCost. */ + public mContinueCost: number; + + /** SystemSetting mFullCourseCost. */ + public mFullCourseCost: number; + + /** SystemSetting mFreePlay. */ + public mFreePlay: boolean; + + /** SystemSetting mPcbId. */ + public mPcbId: number; + + /** SystemSetting mIcCardRw. */ + public mIcCardRw: boolean; + + /** SystemSetting mIcCardVender. */ + public mIcCardVender: boolean; + + /** SystemSetting mMgCardRw. */ + public mMgCardRw: boolean; + + /** SystemSetting mForceFeedback. */ + public mForceFeedback: boolean; + + /** SystemSetting mWinsAndRemains. */ + public mWinsAndRemains: boolean; + + /** SystemSetting mEventMode. */ + public mEventMode: number; + + /** SystemSetting mEventModeDist. */ + public mEventModeDist: boolean; + + /** SystemSetting mCloseType. */ + public mCloseType: number; + + /** SystemSetting mCloseSun. */ + public mCloseSun: number; + + /** SystemSetting mCloseMon. */ + public mCloseMon: number; + + /** SystemSetting mCloseTue. */ + public mCloseTue: number; + + /** SystemSetting mCloseWed. */ + public mCloseWed: number; + + /** SystemSetting mCloseThu. */ + public mCloseThu: number; + + /** SystemSetting mCloseFri. */ + public mCloseFri: number; + + /** SystemSetting mCloseSat. */ + public mCloseSat: number; + + /** SystemSetting mCloseDay. */ + public mCloseDay: number; + + /** SystemSetting mTouchPanel. */ + public mTouchPanel: boolean; + + /** SystemSetting mGameVol. */ + public mGameVol: number; + + /** SystemSetting mAttractVol. */ + public mAttractVol: number; + + /** SystemSetting mCalibHandleCenter. */ + public mCalibHandleCenter: number; + + /** SystemSetting mCalibAccelCenter. */ + public mCalibAccelCenter: number; + + /** SystemSetting mCalibBrakeCenter. */ + public mCalibBrakeCenter: number; + + /** SystemSetting mCalibTouchLeft. */ + public mCalibTouchLeft: number; + + /** SystemSetting mCalibTouchRight. */ + public mCalibTouchRight: number; + + /** SystemSetting mCalibTouchTop. */ + public mCalibTouchTop: number; + + /** SystemSetting mCalibTouchBottom. */ + public mCalibTouchBottom: number; + + /** + * Creates a new SystemSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns SystemSetting instance + */ + public static create(properties?: wm.protobuf.ISystemSetting): wm.protobuf.SystemSetting; + + /** + * Encodes the specified SystemSetting message. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @param message SystemSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ISystemSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SystemSetting message, length delimited. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @param message SystemSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ISystemSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SystemSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.SystemSetting; + + /** + * Decodes a SystemSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.SystemSetting; + + /** + * Verifies a SystemSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SystemSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SystemSetting + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.SystemSetting; + + /** + * Creates a plain object from a SystemSetting message. Also converts values to other types if specified. + * @param message SystemSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.SystemSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SystemSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SystemSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCompetitionSchedule. */ + interface IGhostCompetitionSchedule { + + /** GhostCompetitionSchedule competitionId */ + competitionId: number; + + /** GhostCompetitionSchedule qualifyingPeriodStartAt */ + qualifyingPeriodStartAt: number; + + /** GhostCompetitionSchedule qualifyingPeriodCloseAt */ + qualifyingPeriodCloseAt: number; + + /** GhostCompetitionSchedule competitionStartAt */ + competitionStartAt: number; + + /** GhostCompetitionSchedule competitionCloseAt */ + competitionCloseAt: number; + + /** GhostCompetitionSchedule competitionEndAt */ + competitionEndAt: number; + + /** GhostCompetitionSchedule lengthOfPeriod */ + lengthOfPeriod: number; + + /** GhostCompetitionSchedule lengthOfInterval */ + lengthOfInterval: number; + + /** GhostCompetitionSchedule area */ + area: number; + + /** GhostCompetitionSchedule minigamePatternId */ + minigamePatternId: number; + } + + /** Represents a GhostCompetitionSchedule. */ + class GhostCompetitionSchedule implements IGhostCompetitionSchedule { + + /** + * Constructs a new GhostCompetitionSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCompetitionSchedule); + + /** GhostCompetitionSchedule competitionId. */ + public competitionId: number; + + /** GhostCompetitionSchedule qualifyingPeriodStartAt. */ + public qualifyingPeriodStartAt: number; + + /** GhostCompetitionSchedule qualifyingPeriodCloseAt. */ + public qualifyingPeriodCloseAt: number; + + /** GhostCompetitionSchedule competitionStartAt. */ + public competitionStartAt: number; + + /** GhostCompetitionSchedule competitionCloseAt. */ + public competitionCloseAt: number; + + /** GhostCompetitionSchedule competitionEndAt. */ + public competitionEndAt: number; + + /** GhostCompetitionSchedule lengthOfPeriod. */ + public lengthOfPeriod: number; + + /** GhostCompetitionSchedule lengthOfInterval. */ + public lengthOfInterval: number; + + /** GhostCompetitionSchedule area. */ + public area: number; + + /** GhostCompetitionSchedule minigamePatternId. */ + public minigamePatternId: number; + + /** + * Creates a new GhostCompetitionSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionSchedule instance + */ + public static create(properties?: wm.protobuf.IGhostCompetitionSchedule): wm.protobuf.GhostCompetitionSchedule; + + /** + * Encodes the specified GhostCompetitionSchedule message. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @param message GhostCompetitionSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCompetitionSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionSchedule message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @param message GhostCompetitionSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCompetitionSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCompetitionSchedule; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCompetitionSchedule; + + /** + * Verifies a GhostCompetitionSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionSchedule + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCompetitionSchedule; + + /** + * Creates a plain object from a GhostCompetitionSchedule message. Also converts values to other types if specified. + * @param message GhostCompetitionSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCompetitionSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostCompetitionParameter. */ + interface IGhostCompetitionParameter { + + /** GhostCompetitionParameter parameters1 */ + parameters1?: (number[]|null); + + /** GhostCompetitionParameter parameters2 */ + parameters2: boolean; + } + + /** Represents a GhostCompetitionParameter. */ + class GhostCompetitionParameter implements IGhostCompetitionParameter { + + /** + * Constructs a new GhostCompetitionParameter. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCompetitionParameter); + + /** GhostCompetitionParameter parameters1. */ + public parameters1: number[]; + + /** GhostCompetitionParameter parameters2. */ + public parameters2: boolean; + + /** + * Creates a new GhostCompetitionParameter instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionParameter instance + */ + public static create(properties?: wm.protobuf.IGhostCompetitionParameter): wm.protobuf.GhostCompetitionParameter; + + /** + * Encodes the specified GhostCompetitionParameter message. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @param message GhostCompetitionParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCompetitionParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionParameter message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @param message GhostCompetitionParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCompetitionParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCompetitionParameter; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCompetitionParameter; + + /** + * Verifies a GhostCompetitionParameter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionParameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionParameter + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCompetitionParameter; + + /** + * Creates a plain object from a GhostCompetitionParameter message. Also converts values to other types if specified. + * @param message GhostCompetitionParameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCompetitionParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionParameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionParameter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TransferNotice. */ + interface ITransferNotice { + + /** TransferNotice needToSeeTransferred */ + needToSeeTransferred: boolean; + + /** TransferNotice totalMaxiGold */ + totalMaxiGold?: (number|null); + + /** TransferNotice numOfPorscheCars */ + numOfPorscheCars?: (number|null); + + /** TransferNotice porscheModels */ + porscheModels?: (number[]|null); + + /** TransferNotice hasR35 */ + hasR35?: (boolean|null); + } + + /** Represents a TransferNotice. */ + class TransferNotice implements ITransferNotice { + + /** + * Constructs a new TransferNotice. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ITransferNotice); + + /** TransferNotice needToSeeTransferred. */ + public needToSeeTransferred: boolean; + + /** TransferNotice totalMaxiGold. */ + public totalMaxiGold: number; + + /** TransferNotice numOfPorscheCars. */ + public numOfPorscheCars: number; + + /** TransferNotice porscheModels. */ + public porscheModels: number[]; + + /** TransferNotice hasR35. */ + public hasR35: boolean; + + /** + * Creates a new TransferNotice instance using the specified properties. + * @param [properties] Properties to set + * @returns TransferNotice instance + */ + public static create(properties?: wm.protobuf.ITransferNotice): wm.protobuf.TransferNotice; + + /** + * Encodes the specified TransferNotice message. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @param message TransferNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ITransferNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransferNotice message, length delimited. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @param message TransferNotice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ITransferNotice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransferNotice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.TransferNotice; + + /** + * Decodes a TransferNotice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.TransferNotice; + + /** + * Verifies a TransferNotice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransferNotice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransferNotice + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.TransferNotice; + + /** + * Creates a plain object from a TransferNotice message. Also converts values to other types if specified. + * @param message TransferNotice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.TransferNotice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransferNotice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransferNotice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GameFeatureVersion. */ + interface IGameFeatureVersion { + + /** GameFeatureVersion version */ + version: number; + + /** GameFeatureVersion year */ + year: number; + + /** GameFeatureVersion month */ + month: number; + + /** GameFeatureVersion pluses */ + pluses: number; + + /** GameFeatureVersion releaseAt */ + releaseAt: number; + } + + /** Represents a GameFeatureVersion. */ + class GameFeatureVersion implements IGameFeatureVersion { + + /** + * Constructs a new GameFeatureVersion. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGameFeatureVersion); + + /** GameFeatureVersion version. */ + public version: number; + + /** GameFeatureVersion year. */ + public year: number; + + /** GameFeatureVersion month. */ + public month: number; + + /** GameFeatureVersion pluses. */ + public pluses: number; + + /** GameFeatureVersion releaseAt. */ + public releaseAt: number; + + /** + * Creates a new GameFeatureVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns GameFeatureVersion instance + */ + public static create(properties?: wm.protobuf.IGameFeatureVersion): wm.protobuf.GameFeatureVersion; + + /** + * Encodes the specified GameFeatureVersion message. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @param message GameFeatureVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGameFeatureVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GameFeatureVersion message, length delimited. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @param message GameFeatureVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGameFeatureVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GameFeatureVersion; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GameFeatureVersion; + + /** + * Verifies a GameFeatureVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GameFeatureVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GameFeatureVersion + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GameFeatureVersion; + + /** + * Creates a plain object from a GameFeatureVersion message. Also converts values to other types if specified. + * @param message GameFeatureVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GameFeatureVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GameFeatureVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GameFeatureVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ScratchSheet. */ + interface IScratchSheet { + + /** ScratchSheet squares */ + squares?: (wm.protobuf.ScratchSheet.IScratchSquare[]|null); + } + + /** Represents a ScratchSheet. */ + class ScratchSheet implements IScratchSheet { + + /** + * Constructs a new ScratchSheet. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IScratchSheet); + + /** ScratchSheet squares. */ + public squares: wm.protobuf.ScratchSheet.IScratchSquare[]; + + /** + * Creates a new ScratchSheet instance using the specified properties. + * @param [properties] Properties to set + * @returns ScratchSheet instance + */ + public static create(properties?: wm.protobuf.IScratchSheet): wm.protobuf.ScratchSheet; + + /** + * Encodes the specified ScratchSheet message. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @param message ScratchSheet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IScratchSheet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScratchSheet message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @param message ScratchSheet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IScratchSheet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ScratchSheet; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ScratchSheet; + + /** + * Verifies a ScratchSheet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScratchSheet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScratchSheet + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ScratchSheet; + + /** + * Creates a plain object from a ScratchSheet message. Also converts values to other types if specified. + * @param message ScratchSheet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ScratchSheet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScratchSheet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScratchSheet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ScratchSheet { + + /** Properties of a ScratchSquare. */ + interface IScratchSquare { + + /** ScratchSquare category */ + category: wm.protobuf.ItemCategory; + + /** ScratchSquare itemId */ + itemId: number; + + /** ScratchSquare earned */ + earned: boolean; + } + + /** Represents a ScratchSquare. */ + class ScratchSquare implements IScratchSquare { + + /** + * Constructs a new ScratchSquare. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ScratchSheet.IScratchSquare); + + /** ScratchSquare category. */ + public category: wm.protobuf.ItemCategory; + + /** ScratchSquare itemId. */ + public itemId: number; + + /** ScratchSquare earned. */ + public earned: boolean; + + /** + * Creates a new ScratchSquare instance using the specified properties. + * @param [properties] Properties to set + * @returns ScratchSquare instance + */ + public static create(properties?: wm.protobuf.ScratchSheet.IScratchSquare): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Encodes the specified ScratchSquare message. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @param message ScratchSquare message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ScratchSheet.IScratchSquare, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScratchSquare message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @param message ScratchSquare message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ScratchSheet.IScratchSquare, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Verifies a ScratchSquare message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScratchSquare message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScratchSquare + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.ScratchSheet.ScratchSquare; + + /** + * Creates a plain object from a ScratchSquare message. Also converts values to other types if specified. + * @param message ScratchSquare + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.ScratchSheet.ScratchSquare, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScratchSquare to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScratchSquare + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a UserItem. */ + interface IUserItem { + + /** UserItem category */ + category: wm.protobuf.ItemCategory; + + /** UserItem itemId */ + itemId: number; + + /** UserItem userItemId */ + userItemId?: (number|null); + + /** UserItem earnedAt */ + earnedAt?: (number|null); + + /** UserItem expireAt */ + expireAt?: (number|null); + } + + /** Represents a UserItem. */ + class UserItem implements IUserItem { + + /** + * Constructs a new UserItem. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IUserItem); + + /** UserItem category. */ + public category: wm.protobuf.ItemCategory; + + /** UserItem itemId. */ + public itemId: number; + + /** UserItem userItemId. */ + public userItemId: number; + + /** UserItem earnedAt. */ + public earnedAt: number; + + /** UserItem expireAt. */ + public expireAt: number; + + /** + * Creates a new UserItem instance using the specified properties. + * @param [properties] Properties to set + * @returns UserItem instance + */ + public static create(properties?: wm.protobuf.IUserItem): wm.protobuf.UserItem; + + /** + * Encodes the specified UserItem message. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @param message UserItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IUserItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserItem message, length delimited. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @param message UserItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IUserItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.UserItem; + + /** + * Decodes a UserItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.UserItem; + + /** + * Verifies a UserItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserItem + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.UserItem; + + /** + * Creates a plain object from a UserItem message. Also converts values to other types if specified. + * @param message UserItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.UserItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InviteFriendCampaignSchedule. */ + interface IInviteFriendCampaignSchedule { + + /** InviteFriendCampaignSchedule campaignId */ + campaignId: number; + + /** InviteFriendCampaignSchedule startAt */ + startAt: number; + + /** InviteFriendCampaignSchedule endAt */ + endAt: number; + + /** InviteFriendCampaignSchedule couponUnreceivableAt */ + couponUnreceivableAt: number; + } + + /** Represents an InviteFriendCampaignSchedule. */ + class InviteFriendCampaignSchedule implements IInviteFriendCampaignSchedule { + + /** + * Constructs a new InviteFriendCampaignSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IInviteFriendCampaignSchedule); + + /** InviteFriendCampaignSchedule campaignId. */ + public campaignId: number; + + /** InviteFriendCampaignSchedule startAt. */ + public startAt: number; + + /** InviteFriendCampaignSchedule endAt. */ + public endAt: number; + + /** InviteFriendCampaignSchedule couponUnreceivableAt. */ + public couponUnreceivableAt: number; + + /** + * Creates a new InviteFriendCampaignSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns InviteFriendCampaignSchedule instance + */ + public static create(properties?: wm.protobuf.IInviteFriendCampaignSchedule): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Encodes the specified InviteFriendCampaignSchedule message. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @param message InviteFriendCampaignSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IInviteFriendCampaignSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InviteFriendCampaignSchedule message, length delimited. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @param message InviteFriendCampaignSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IInviteFriendCampaignSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Verifies an InviteFriendCampaignSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InviteFriendCampaignSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InviteFriendCampaignSchedule + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.InviteFriendCampaignSchedule; + + /** + * Creates a plain object from an InviteFriendCampaignSchedule message. Also converts values to other types if specified. + * @param message InviteFriendCampaignSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.InviteFriendCampaignSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InviteFriendCampaignSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InviteFriendCampaignSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarTuning. */ + interface ICarTuning { + + /** CarTuning carId */ + carId: number; + + /** CarTuning tunePower */ + tunePower: number; + + /** CarTuning tuneHandling */ + tuneHandling: number; + + /** CarTuning lastPlayedAt */ + lastPlayedAt?: (number|null); + } + + /** Represents a CarTuning. */ + class CarTuning implements ICarTuning { + + /** + * Constructs a new CarTuning. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarTuning); + + /** CarTuning carId. */ + public carId: number; + + /** CarTuning tunePower. */ + public tunePower: number; + + /** CarTuning tuneHandling. */ + public tuneHandling: number; + + /** CarTuning lastPlayedAt. */ + public lastPlayedAt: number; + + /** + * Creates a new CarTuning instance using the specified properties. + * @param [properties] Properties to set + * @returns CarTuning instance + */ + public static create(properties?: wm.protobuf.ICarTuning): wm.protobuf.CarTuning; + + /** + * Encodes the specified CarTuning message. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @param message CarTuning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarTuning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarTuning message, length delimited. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @param message CarTuning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarTuning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarTuning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarTuning; + + /** + * Decodes a CarTuning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarTuning; + + /** + * Verifies a CarTuning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarTuning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarTuning + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarTuning; + + /** + * Creates a plain object from a CarTuning message. Also converts values to other types if specified. + * @param message CarTuning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarTuning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarTuning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarTuning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BinaryData. */ + interface IBinaryData { + + /** BinaryData data */ + data: Uint8Array; + + /** BinaryData mergeSerial */ + mergeSerial: number; + } + + /** Represents a BinaryData. */ + class BinaryData implements IBinaryData { + + /** + * Constructs a new BinaryData. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IBinaryData); + + /** BinaryData data. */ + public data: Uint8Array; + + /** BinaryData mergeSerial. */ + public mergeSerial: number; + + /** + * Creates a new BinaryData instance using the specified properties. + * @param [properties] Properties to set + * @returns BinaryData instance + */ + public static create(properties?: wm.protobuf.IBinaryData): wm.protobuf.BinaryData; + + /** + * Encodes the specified BinaryData message. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @param message BinaryData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IBinaryData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BinaryData message, length delimited. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @param message BinaryData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IBinaryData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BinaryData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.BinaryData; + + /** + * Decodes a BinaryData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.BinaryData; + + /** + * Verifies a BinaryData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BinaryData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BinaryData + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.BinaryData; + + /** + * Creates a plain object from a BinaryData message. Also converts values to other types if specified. + * @param message BinaryData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.BinaryData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BinaryData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BinaryData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostTrail. */ + interface IGhostTrail { + + /** GhostTrail carId */ + carId: number; + + /** GhostTrail area */ + area: number; + + /** GhostTrail ramp */ + ramp: number; + + /** GhostTrail path */ + path: number; + + /** GhostTrail playedAt */ + playedAt: number; + + /** GhostTrail playedPlace */ + playedPlace?: (wm.protobuf.IPlace|null); + + /** GhostTrail trail */ + trail: Uint8Array; + } + + /** Represents a GhostTrail. */ + class GhostTrail implements IGhostTrail { + + /** + * Constructs a new GhostTrail. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostTrail); + + /** GhostTrail carId. */ + public carId: number; + + /** GhostTrail area. */ + public area: number; + + /** GhostTrail ramp. */ + public ramp: number; + + /** GhostTrail path. */ + public path: number; + + /** GhostTrail playedAt. */ + public playedAt: number; + + /** GhostTrail playedPlace. */ + public playedPlace?: (wm.protobuf.IPlace|null); + + /** GhostTrail trail. */ + public trail: Uint8Array; + + /** + * Creates a new GhostTrail instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostTrail instance + */ + public static create(properties?: wm.protobuf.IGhostTrail): wm.protobuf.GhostTrail; + + /** + * Encodes the specified GhostTrail message. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @param message GhostTrail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostTrail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostTrail message, length delimited. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @param message GhostTrail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostTrail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostTrail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostTrail; + + /** + * Decodes a GhostTrail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostTrail; + + /** + * Verifies a GhostTrail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostTrail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostTrail + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostTrail; + + /** + * Creates a plain object from a GhostTrail message. Also converts values to other types if specified. + * @param message GhostTrail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostTrail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostTrail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostTrail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PlaceList. */ + interface IPlaceList { + + /** PlaceList places */ + places?: (wm.protobuf.IPlace[]|null); + } + + /** Represents a PlaceList. */ + class PlaceList implements IPlaceList { + + /** + * Constructs a new PlaceList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IPlaceList); + + /** PlaceList places. */ + public places: wm.protobuf.IPlace[]; + + /** + * Creates a new PlaceList instance using the specified properties. + * @param [properties] Properties to set + * @returns PlaceList instance + */ + public static create(properties?: wm.protobuf.IPlaceList): wm.protobuf.PlaceList; + + /** + * Encodes the specified PlaceList message. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @param message PlaceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IPlaceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlaceList message, length delimited. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @param message PlaceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IPlaceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlaceList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.PlaceList; + + /** + * Decodes a PlaceList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.PlaceList; + + /** + * Verifies a PlaceList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlaceList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlaceList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.PlaceList; + + /** + * Creates a plain object from a PlaceList message. Also converts values to other types if specified. + * @param message PlaceList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.PlaceList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlaceList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlaceList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GhostList. */ + interface IGhostList { + + /** GhostList ghosts */ + ghosts?: (wm.protobuf.IGhostCar[]|null); + } + + /** Represents a GhostList. */ + class GhostList implements IGhostList { + + /** + * Constructs a new GhostList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostList); + + /** GhostList ghosts. */ + public ghosts: wm.protobuf.IGhostCar[]; + + /** + * Creates a new GhostList instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostList instance + */ + public static create(properties?: wm.protobuf.IGhostList): wm.protobuf.GhostList; + + /** + * Encodes the specified GhostList message. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @param message GhostList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostList message, length delimited. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @param message GhostList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostList; + + /** + * Decodes a GhostList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostList; + + /** + * Verifies a GhostList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostList; + + /** + * Creates a plain object from a GhostList message. Also converts values to other types if specified. + * @param message GhostList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CarSummary. */ + interface ICarSummary { + + /** CarSummary hitCount */ + hitCount: number; + + /** CarSummary cars */ + cars?: (wm.protobuf.ICar[]|null); + } + + /** Represents a CarSummary. */ + class CarSummary implements ICarSummary { + + /** + * Constructs a new CarSummary. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.ICarSummary); + + /** CarSummary hitCount. */ + public hitCount: number; + + /** CarSummary cars. */ + public cars: wm.protobuf.ICar[]; + + /** + * Creates a new CarSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns CarSummary instance + */ + public static create(properties?: wm.protobuf.ICarSummary): wm.protobuf.CarSummary; + + /** + * Encodes the specified CarSummary message. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @param message CarSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.ICarSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarSummary message, length delimited. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @param message CarSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.ICarSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.CarSummary; + + /** + * Decodes a CarSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.CarSummary; + + /** + * Verifies a CarSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CarSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarSummary + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.CarSummary; + + /** + * Creates a plain object from a CarSummary message. Also converts values to other types if specified. + * @param message CarSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.CarSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileList. */ + interface IFileList { + + /** FileList files */ + files?: (wm.protobuf.FileList.IFileInfo[]|null); + + /** FileList interval */ + interval?: (number|null); + } + + /** Represents a FileList. */ + class FileList implements IFileList { + + /** + * Constructs a new FileList. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IFileList); + + /** FileList files. */ + public files: wm.protobuf.FileList.IFileInfo[]; + + /** FileList interval. */ + public interval: number; + + /** + * Creates a new FileList instance using the specified properties. + * @param [properties] Properties to set + * @returns FileList instance + */ + public static create(properties?: wm.protobuf.IFileList): wm.protobuf.FileList; + + /** + * Encodes the specified FileList message. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @param message FileList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IFileList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileList message, length delimited. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @param message FileList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IFileList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.FileList; + + /** + * Decodes a FileList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.FileList; + + /** + * Verifies a FileList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileList + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.FileList; + + /** + * Creates a plain object from a FileList message. Also converts values to other types if specified. + * @param message FileList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.FileList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileList { + + /** Properties of a FileInfo. */ + interface IFileInfo { + + /** FileInfo fileId */ + fileId: number; + + /** FileInfo fileType */ + fileType: wm.protobuf.FileType; + + /** FileInfo fileSize */ + fileSize: number; + + /** FileInfo url */ + url: string; + + /** FileInfo sha1sum */ + sha1sum: Uint8Array; + + /** FileInfo notBefore */ + notBefore: number; + + /** FileInfo notAfter */ + notAfter: number; + } + + /** Represents a FileInfo. */ + class FileInfo implements IFileInfo { + + /** + * Constructs a new FileInfo. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.FileList.IFileInfo); + + /** FileInfo fileId. */ + public fileId: number; + + /** FileInfo fileType. */ + public fileType: wm.protobuf.FileType; + + /** FileInfo fileSize. */ + public fileSize: number; + + /** FileInfo url. */ + public url: string; + + /** FileInfo sha1sum. */ + public sha1sum: Uint8Array; + + /** FileInfo notBefore. */ + public notBefore: number; + + /** FileInfo notAfter. */ + public notAfter: number; + + /** + * Creates a new FileInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FileInfo instance + */ + public static create(properties?: wm.protobuf.FileList.IFileInfo): wm.protobuf.FileList.FileInfo; + + /** + * Encodes the specified FileInfo message. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @param message FileInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.FileList.IFileInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileInfo message, length delimited. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @param message FileInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.FileList.IFileInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.FileList.FileInfo; + + /** + * Decodes a FileInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.FileList.FileInfo; + + /** + * Verifies a FileInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileInfo + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.FileList.FileInfo; + + /** + * Creates a plain object from a FileInfo message. Also converts values to other types if specified. + * @param message FileInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.FileList.FileInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GhostCompetitionTarget. */ + interface IGhostCompetitionTarget { + + /** GhostCompetitionTarget competitionId */ + competitionId: number; + + /** GhostCompetitionTarget specialGhostId */ + specialGhostId?: (number|null); + + /** GhostCompetitionTarget ghostCar */ + ghostCar: wm.protobuf.IGhostCar; + + /** GhostCompetitionTarget trailId */ + trailId: (number|Long); + + /** GhostCompetitionTarget updatedAt */ + updatedAt: number; + + /** GhostCompetitionTarget competitionSchedule */ + competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + } + + /** Represents a GhostCompetitionTarget. */ + class GhostCompetitionTarget implements IGhostCompetitionTarget { + + /** + * Constructs a new GhostCompetitionTarget. + * @param [properties] Properties to set + */ + constructor(properties?: wm.protobuf.IGhostCompetitionTarget); + + /** GhostCompetitionTarget competitionId. */ + public competitionId: number; + + /** GhostCompetitionTarget specialGhostId. */ + public specialGhostId: number; + + /** GhostCompetitionTarget ghostCar. */ + public ghostCar: wm.protobuf.IGhostCar; + + /** GhostCompetitionTarget trailId. */ + public trailId: (number|Long); + + /** GhostCompetitionTarget updatedAt. */ + public updatedAt: number; + + /** GhostCompetitionTarget competitionSchedule. */ + public competitionSchedule?: (wm.protobuf.IGhostCompetitionSchedule|null); + + /** + * Creates a new GhostCompetitionTarget instance using the specified properties. + * @param [properties] Properties to set + * @returns GhostCompetitionTarget instance + */ + public static create(properties?: wm.protobuf.IGhostCompetitionTarget): wm.protobuf.GhostCompetitionTarget; + + /** + * Encodes the specified GhostCompetitionTarget message. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @param message GhostCompetitionTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: wm.protobuf.IGhostCompetitionTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GhostCompetitionTarget message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @param message GhostCompetitionTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: wm.protobuf.IGhostCompetitionTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): wm.protobuf.GhostCompetitionTarget; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): wm.protobuf.GhostCompetitionTarget; + + /** + * Verifies a GhostCompetitionTarget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GhostCompetitionTarget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GhostCompetitionTarget + */ + public static fromObject(object: { [k: string]: any }): wm.protobuf.GhostCompetitionTarget; + + /** + * Creates a plain object from a GhostCompetitionTarget message. Also converts values to other types if specified. + * @param message GhostCompetitionTarget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: wm.protobuf.GhostCompetitionTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GhostCompetitionTarget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GhostCompetitionTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** SystemConstant enum. */ + enum SystemConstant { + PROTOBUF_MESSAGE_REVISION = 8053 + } + + /** ErrorCode enum. */ + enum ErrorCode { + ERR_SUCCESS = 0, + ERR_REQUEST = 1, + ERR_NOT_FOUND = 2, + ERR_ID_SERVER = 3, + ERR_ID_BANNED = 4, + ERR_USER_LOCKED = 5, + ERR_USER_VERSION = 6, + ERR_NAME_CONFLICTED = 7, + ERR_FORBIDDEN = 9, + ERR_USER_SUCCEEDED = 11, + ERR_BEING_TRANSFERRED = 12, + ERR_SCRATCH_LOCKED = 13 + } + + /** LineType enum. */ + enum LineType { + L_UNKNOWN = 0, + L_MOBILE = 1, + L_ISDN = 2, + L_BFLETS = 3, + L_ADSL = 4, + L_WIRED = 5 + } + + /** TerminalType enum. */ + enum TerminalType { + T_DRIVE = 0, + T_TERMINAL = 1 + } + + /** DeviceType enum. */ + enum DeviceType { + DEVICE_CARD = 0, + DEVICE_PHONE = 1 + } + + /** ItemCategory enum. */ + enum ItemCategory { + CAT_CUSTOM_COLOR = 1, + CAT_WHEEL = 2, + CAT_AERO = 3, + CAT_BONNET = 4, + CAT_WING = 5, + CAT_MIRROR = 6, + CAT_NEON = 8, + CAT_TRUNK = 9, + CAT_NUMBER_PLATE = 10, + CAT_GT_WING = 12, + CAT_AURA_MOTIF = 14, + CAT_METER = 15, + CAT_BGM = 16, + CAT_NAME_PLATE = 17, + CAT_NUMBER = 19, + CAT_BGM_TRACK = 22, + CAT_WINDOW_STICKER_FONT = 24, + CAT_WINDOW_DECORATION = 25, + CAT_RIVAL_MARKER = 26, + CAT_STAMP = 27, + CAT_TERMINAL_BACKGROUND = 28, + CAT_CAR_TICKET = 201, + CAT_CONSUMPTION_ITEM = 202, + CAT_CAR_TICKET_FREE = 203, + CAT_AERO_FULLSET = 300, + CAT_AERO_LIMITED = 301 + } + + /** TutorialType enum. */ + enum TutorialType { + TUTORIAL_ID_STORY = 0, + TUTORIAL_ID_TIME_ATTACK = 1, + TUTORIAL_ID_GHOST = 2, + TUTORIAL_ID_GHOST_CHALLENGE = 3, + TUTORIAL_ID_GHOST_LEVEL = 4, + TUTORIAL_ID_UNUSED_5 = 5, + TUTORIAL_ID_GHOST_SEARCH = 6, + TUTORIAL_ID_GHOST_COMPETITION = 7, + TUTORIAL_ID_HP600_CARD = 8, + TUTORIAL_ID_UNUSED_9 = 9, + TUTORIAL_ID_COMPETITION_QUALIFIED = 10, + TUTORIAL_ID_COMPETITION_TERMINAL = 11, + TUTORIAL_ID_COMPETITION_NOTICE = 12, + TUTORIAL_ID_COMPETITION_FINISHED = 13, + TUTORIAL_ID_UNUSED_14 = 14, + TUTORIAL_ID_UNUSED_15 = 15, + TUTORIAL_ID_UNUSED_16 = 16, + TUTORIAL_ID_UNUSED_17 = 17, + TUTORIAL_ID_UNUSED_18 = 18, + TUTORIAL_ID_UNUSED_19 = 19, + TUTORIAL_ID_GHOST_STAMP = 20, + TUTORIAL_ID_GHOST_STAMP_DECLINED = 21, + TUTORIAL_ID_GHOST_STAMP_FRIENDS = 22, + TUTORIAL_ID_TERMINAL_SCRATCH = 23, + TUTORIAL_ID_TURN_SCRATCH_SHEET = 24, + TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN = 25, + TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE = 26, + TUTORIAL_ID_VS_CONTINUE_TICKET = 27, + TUTORIAL_ID_UNUSED_28 = 28, + TUTORIAL_ID_UNUSED_29 = 29, + TUTORIAL_ID_UNUSED_30 = 30, + TUTORIAL_ID_DRESS_UP = 31, + TUTORIAL_ID_MULTI_GHOST = 32, + TUTORIAL_ID_STORY_NEW_FEATURE = 33, + TUTORIAL_ID_GHOST_NEW_FEATURE = 34, + TUTORIAL_ID_GHOST_REGION_MAP = 35 + } + + /** GameMode enum. */ + enum GameMode { + MODE_STORY = 1, + MODE_TIME_ATTACK = 2, + MODE_VS_BATTLE = 3, + MODE_GHOST_BATTLE = 4, + MODE_EVENT = 5 + } + + /** GhostType enum. */ + enum GhostType { + GHOST_NORMAL = 1, + GHOST_PINCH_RUNNER = 2, + GHOST_DEFAULT = 3 + } + + /** GhostSelectionMethod enum. */ + enum GhostSelectionMethod { + GHOST_SEARCH_BY_REGION = 1, + GHOST_SELECT_BY_LEVEL = 2, + GHOST_SELECT_CROWN_MATCH = 3, + GHOST_SELECT_STAMP_MATCH = 4, + GHOST_SELECT_FROM_HISTORY = 5, + GHOST_SEARCH_BY_SHOP = 6, + GHOST_SEARCH_BY_NAME = 7, + GHOST_ACCEPT_CHALLENGER = 8, + GHOST_APPOINTMENT = 9, + GHOST_DEFAULT_OPPONENT = 10, + GHOST_COMPETITION = 11, + GHOST_SELECT_FROM_BOOKMARKS = 12 + } + + /** GhostRateType enum. */ + enum GhostRateType { + GHOST_RATE_UNKNOWN = 1, + GHOST_RATE_INVALID = 2, + GHOST_RATE_VALID = 3 + } + + /** PathSelectionMethod enum. */ + enum PathSelectionMethod { + PATH_NEW = 1, + PATH_PLAIN = 2, + PATH_FRIEND = 3, + PATH_NORMAL = 4, + PATH_CHALLENGER = 5 + } + + /** NoticeEntry enum. */ + enum NoticeEntry { + NOTICE_UNUSED_1 = 1, + NOTICE_UNUSED_2 = 2, + NOTICE_UNUSED_3 = 3, + NOTICE_UNUSED_4 = 4, + NOTICE_UNUSED_5 = 5, + NOTICE_UNUSED_6 = 6, + NOTICE_UNUSED_7 = 7, + NOTICE_UNUSED_8 = 8, + NOTICE_UNUSED_9 = 9, + NOTICE_UNUSED_10 = 10, + NOTICE_UNUSED_11 = 11, + NOTICE_UNUSED_12 = 12 + } + + /** FileType enum. */ + enum FileType { + FILE_PROMOTION_ANNOUNCEMENT = 1, + FILE_FEATURE_ANNOUNCEMENT = 4, + FILE_SPAPP_ANNOUNCEMENT = 6 + } + + /** GhostCompetitionParticipantState enum. */ + enum GhostCompetitionParticipantState { + COMPETITION_NOT_PARTICIPATED = 1, + COMPETITION_QUALIFIED = 2, + COMPETITION_PARTICIPATED = 3, + COMPETITION_WON = 4 + } + + /** ScreenshotType enum. */ + enum ScreenshotType { + SS_GHOST_BATTLE = 1, + SS_VERSUS_BATTLE = 2, + SS_TERMINAL = 3, + SS_ACQUIRING_VERSUS_STAR = 4, + SS_ACQUIRING_AURA_MOTIF = 5, + SS_GHOST_REGION_MAP = 6, + SS_ACQUIRING_CROWN = 7, + SS_GHOST_COMPETITION_RESULT = 8, + SS_TIME_ATTACK_RESULT = 9, + SS_LEVEL_UP = 10 + } + + /** TransferState enum. */ + enum TransferState { + NOT_REGISTERED = 0, + NEW_REGISTRATION = 1, + TRANSFER_REQUIRED = 2, + TRANSFERRING = 3, + TRANSFERRED = 4 + } + + /** EventModeSerialErrorCode enum. */ + enum EventModeSerialErrorCode { + SERIAL_SUCCESS = 0, + SERIAL_ATTEMPT_TO_CHANGE = 1, + SERIAL_NO_INPUT = 2, + SERIAL_INVALID = 3, + SERIAL_EXPIRED = 4, + SERIAL_OTHER_PLACE = 5 + } + + /** ClientLogType enum. */ + enum ClientLogType { + LOG_LOAD_REPORT = 0, + LOG_ERROR = 1 + } + + /** SmartphoneAppState enum. */ + enum SmartphoneAppState { + SPAPP_UNREGISTERED = 0, + SPAPP_KTID = 1, + SPAPP_BNID = 2 + } + } +} diff --git a/src/wmmt/wm.proto.js b/src/wmmt/wm.proto.js new file mode 100644 index 0000000..f380414 --- /dev/null +++ b/src/wmmt/wm.proto.js @@ -0,0 +1,50956 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +import * as $protobuf from "protobufjs/minimal"; + +// Common aliases +const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +export const wm = $root.wm = (() => { + + /** + * Namespace wm. + * @exports wm + * @namespace + */ + const wm = {}; + + wm.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof wm + * @namespace + */ + const protobuf = {}; + + protobuf.RegisterSystemInfoRequest = (function() { + + /** + * Properties of a RegisterSystemInfoRequest. + * @memberof wm.protobuf + * @interface IRegisterSystemInfoRequest + * @property {string} pcbSerial RegisterSystemInfoRequest pcbSerial + * @property {wm.protobuf.TerminalType} terminalType RegisterSystemInfoRequest terminalType + * @property {number} romVersion RegisterSystemInfoRequest romVersion + * @property {string} country RegisterSystemInfoRequest country + * @property {wm.protobuf.LineType} lineType RegisterSystemInfoRequest lineType + * @property {string} shopName RegisterSystemInfoRequest shopName + * @property {string} shopNickname RegisterSystemInfoRequest shopNickname + * @property {number|null} [allnetPlaceId] RegisterSystemInfoRequest allnetPlaceId + * @property {number|null} [allnetRegion0] RegisterSystemInfoRequest allnetRegion0 + * @property {string|null} [muchaPlaceId] RegisterSystemInfoRequest muchaPlaceId + * @property {number|null} [muchaPrefectureId] RegisterSystemInfoRequest muchaPrefectureId + * @property {string} regionName0 RegisterSystemInfoRequest regionName0 + * @property {string} regionName1 RegisterSystemInfoRequest regionName1 + * @property {string} regionName2 RegisterSystemInfoRequest regionName2 + * @property {string} regionName3 RegisterSystemInfoRequest regionName3 + * @property {number} timezoneOffset RegisterSystemInfoRequest timezoneOffset + * @property {wm.protobuf.ISystemSetting} systemSetting RegisterSystemInfoRequest systemSetting + * @property {Array.|null} [errorLogs] RegisterSystemInfoRequest errorLogs + */ + + /** + * Constructs a new RegisterSystemInfoRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemInfoRequest. + * @implements IRegisterSystemInfoRequest + * @constructor + * @param {wm.protobuf.IRegisterSystemInfoRequest=} [properties] Properties to set + */ + function RegisterSystemInfoRequest(properties) { + this.errorLogs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemInfoRequest pcbSerial. + * @member {string} pcbSerial + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.pcbSerial = ""; + + /** + * RegisterSystemInfoRequest terminalType. + * @member {wm.protobuf.TerminalType} terminalType + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.terminalType = 0; + + /** + * RegisterSystemInfoRequest romVersion. + * @member {number} romVersion + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.romVersion = 0; + + /** + * RegisterSystemInfoRequest country. + * @member {string} country + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.country = ""; + + /** + * RegisterSystemInfoRequest lineType. + * @member {wm.protobuf.LineType} lineType + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.lineType = 0; + + /** + * RegisterSystemInfoRequest shopName. + * @member {string} shopName + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.shopName = ""; + + /** + * RegisterSystemInfoRequest shopNickname. + * @member {string} shopNickname + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.shopNickname = ""; + + /** + * RegisterSystemInfoRequest allnetPlaceId. + * @member {number} allnetPlaceId + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.allnetPlaceId = 0; + + /** + * RegisterSystemInfoRequest allnetRegion0. + * @member {number} allnetRegion0 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.allnetRegion0 = 0; + + /** + * RegisterSystemInfoRequest muchaPlaceId. + * @member {string} muchaPlaceId + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.muchaPlaceId = ""; + + /** + * RegisterSystemInfoRequest muchaPrefectureId. + * @member {number} muchaPrefectureId + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.muchaPrefectureId = 0; + + /** + * RegisterSystemInfoRequest regionName0. + * @member {string} regionName0 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName0 = ""; + + /** + * RegisterSystemInfoRequest regionName1. + * @member {string} regionName1 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName1 = ""; + + /** + * RegisterSystemInfoRequest regionName2. + * @member {string} regionName2 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName2 = ""; + + /** + * RegisterSystemInfoRequest regionName3. + * @member {string} regionName3 + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.regionName3 = ""; + + /** + * RegisterSystemInfoRequest timezoneOffset. + * @member {number} timezoneOffset + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.timezoneOffset = 0; + + /** + * RegisterSystemInfoRequest systemSetting. + * @member {wm.protobuf.ISystemSetting} systemSetting + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.systemSetting = null; + + /** + * RegisterSystemInfoRequest errorLogs. + * @member {Array.} errorLogs + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + */ + RegisterSystemInfoRequest.prototype.errorLogs = $util.emptyArray; + + /** + * Creates a new RegisterSystemInfoRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.IRegisterSystemInfoRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest instance + */ + RegisterSystemInfoRequest.create = function create(properties) { + return new RegisterSystemInfoRequest(properties); + }; + + /** + * Encodes the specified RegisterSystemInfoRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.IRegisterSystemInfoRequest} message RegisterSystemInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pcbSerial); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.terminalType); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.romVersion); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.country); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.lineType); + writer.uint32(/* id 6, wireType 2 =*/50).string(message.shopName); + writer.uint32(/* id 7, wireType 2 =*/58).string(message.shopNickname); + if (message.allnetPlaceId != null && Object.hasOwnProperty.call(message, "allnetPlaceId")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.allnetPlaceId); + if (message.allnetRegion0 != null && Object.hasOwnProperty.call(message, "allnetRegion0")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.allnetRegion0); + if (message.muchaPlaceId != null && Object.hasOwnProperty.call(message, "muchaPlaceId")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.muchaPlaceId); + if (message.muchaPrefectureId != null && Object.hasOwnProperty.call(message, "muchaPrefectureId")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.muchaPrefectureId); + writer.uint32(/* id 12, wireType 2 =*/98).string(message.regionName0); + writer.uint32(/* id 13, wireType 2 =*/106).string(message.regionName1); + writer.uint32(/* id 14, wireType 2 =*/114).string(message.regionName2); + writer.uint32(/* id 15, wireType 2 =*/122).string(message.regionName3); + writer.uint32(/* id 16, wireType 0 =*/128).sint32(message.timezoneOffset); + $root.wm.protobuf.SystemSetting.encode(message.systemSetting, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.errorLogs != null && message.errorLogs.length) + for (let i = 0; i < message.errorLogs.length; ++i) + $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.encode(message.errorLogs[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RegisterSystemInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.IRegisterSystemInfoRequest} message RegisterSystemInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pcbSerial = reader.string(); + break; + } + case 2: { + message.terminalType = reader.int32(); + break; + } + case 3: { + message.romVersion = reader.uint32(); + break; + } + case 4: { + message.country = reader.string(); + break; + } + case 5: { + message.lineType = reader.int32(); + break; + } + case 6: { + message.shopName = reader.string(); + break; + } + case 7: { + message.shopNickname = reader.string(); + break; + } + case 8: { + message.allnetPlaceId = reader.uint32(); + break; + } + case 9: { + message.allnetRegion0 = reader.uint32(); + break; + } + case 10: { + message.muchaPlaceId = reader.string(); + break; + } + case 11: { + message.muchaPrefectureId = reader.uint32(); + break; + } + case 12: { + message.regionName0 = reader.string(); + break; + } + case 13: { + message.regionName1 = reader.string(); + break; + } + case 14: { + message.regionName2 = reader.string(); + break; + } + case 15: { + message.regionName3 = reader.string(); + break; + } + case 16: { + message.timezoneOffset = reader.sint32(); + break; + } + case 17: { + message.systemSetting = $root.wm.protobuf.SystemSetting.decode(reader, reader.uint32()); + break; + } + case 18: { + if (!(message.errorLogs && message.errorLogs.length)) + message.errorLogs = []; + message.errorLogs.push($root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("pcbSerial")) + throw $util.ProtocolError("missing required 'pcbSerial'", { instance: message }); + if (!message.hasOwnProperty("terminalType")) + throw $util.ProtocolError("missing required 'terminalType'", { instance: message }); + if (!message.hasOwnProperty("romVersion")) + throw $util.ProtocolError("missing required 'romVersion'", { instance: message }); + if (!message.hasOwnProperty("country")) + throw $util.ProtocolError("missing required 'country'", { instance: message }); + if (!message.hasOwnProperty("lineType")) + throw $util.ProtocolError("missing required 'lineType'", { instance: message }); + if (!message.hasOwnProperty("shopName")) + throw $util.ProtocolError("missing required 'shopName'", { instance: message }); + if (!message.hasOwnProperty("shopNickname")) + throw $util.ProtocolError("missing required 'shopNickname'", { instance: message }); + if (!message.hasOwnProperty("regionName0")) + throw $util.ProtocolError("missing required 'regionName0'", { instance: message }); + if (!message.hasOwnProperty("regionName1")) + throw $util.ProtocolError("missing required 'regionName1'", { instance: message }); + if (!message.hasOwnProperty("regionName2")) + throw $util.ProtocolError("missing required 'regionName2'", { instance: message }); + if (!message.hasOwnProperty("regionName3")) + throw $util.ProtocolError("missing required 'regionName3'", { instance: message }); + if (!message.hasOwnProperty("timezoneOffset")) + throw $util.ProtocolError("missing required 'timezoneOffset'", { instance: message }); + if (!message.hasOwnProperty("systemSetting")) + throw $util.ProtocolError("missing required 'systemSetting'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemInfoRequest message. + * @function verify + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.pcbSerial)) + return "pcbSerial: string expected"; + switch (message.terminalType) { + default: + return "terminalType: enum value expected"; + case 0: + case 1: + break; + } + if (!$util.isInteger(message.romVersion)) + return "romVersion: integer expected"; + if (!$util.isString(message.country)) + return "country: string expected"; + switch (message.lineType) { + default: + return "lineType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (!$util.isString(message.shopName)) + return "shopName: string expected"; + if (!$util.isString(message.shopNickname)) + return "shopNickname: string expected"; + if (message.allnetPlaceId != null && message.hasOwnProperty("allnetPlaceId")) + if (!$util.isInteger(message.allnetPlaceId)) + return "allnetPlaceId: integer expected"; + if (message.allnetRegion0 != null && message.hasOwnProperty("allnetRegion0")) + if (!$util.isInteger(message.allnetRegion0)) + return "allnetRegion0: integer expected"; + if (message.muchaPlaceId != null && message.hasOwnProperty("muchaPlaceId")) + if (!$util.isString(message.muchaPlaceId)) + return "muchaPlaceId: string expected"; + if (message.muchaPrefectureId != null && message.hasOwnProperty("muchaPrefectureId")) + if (!$util.isInteger(message.muchaPrefectureId)) + return "muchaPrefectureId: integer expected"; + if (!$util.isString(message.regionName0)) + return "regionName0: string expected"; + if (!$util.isString(message.regionName1)) + return "regionName1: string expected"; + if (!$util.isString(message.regionName2)) + return "regionName2: string expected"; + if (!$util.isString(message.regionName3)) + return "regionName3: string expected"; + if (!$util.isInteger(message.timezoneOffset)) + return "timezoneOffset: integer expected"; + { + let error = $root.wm.protobuf.SystemSetting.verify(message.systemSetting); + if (error) + return "systemSetting." + error; + } + if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) { + if (!Array.isArray(message.errorLogs)) + return "errorLogs: array expected"; + for (let i = 0; i < message.errorLogs.length; ++i) { + let error = $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify(message.errorLogs[i]); + if (error) + return "errorLogs." + error; + } + } + return null; + }; + + /** + * Creates a RegisterSystemInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemInfoRequest} RegisterSystemInfoRequest + */ + RegisterSystemInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemInfoRequest) + return object; + let message = new $root.wm.protobuf.RegisterSystemInfoRequest(); + if (object.pcbSerial != null) + message.pcbSerial = String(object.pcbSerial); + switch (object.terminalType) { + case "T_DRIVE": + case 0: + message.terminalType = 0; + break; + case "T_TERMINAL": + case 1: + message.terminalType = 1; + break; + } + if (object.romVersion != null) + message.romVersion = object.romVersion >>> 0; + if (object.country != null) + message.country = String(object.country); + switch (object.lineType) { + case "L_UNKNOWN": + case 0: + message.lineType = 0; + break; + case "L_MOBILE": + case 1: + message.lineType = 1; + break; + case "L_ISDN": + case 2: + message.lineType = 2; + break; + case "L_BFLETS": + case 3: + message.lineType = 3; + break; + case "L_ADSL": + case 4: + message.lineType = 4; + break; + case "L_WIRED": + case 5: + message.lineType = 5; + break; + } + if (object.shopName != null) + message.shopName = String(object.shopName); + if (object.shopNickname != null) + message.shopNickname = String(object.shopNickname); + if (object.allnetPlaceId != null) + message.allnetPlaceId = object.allnetPlaceId >>> 0; + if (object.allnetRegion0 != null) + message.allnetRegion0 = object.allnetRegion0 >>> 0; + if (object.muchaPlaceId != null) + message.muchaPlaceId = String(object.muchaPlaceId); + if (object.muchaPrefectureId != null) + message.muchaPrefectureId = object.muchaPrefectureId >>> 0; + if (object.regionName0 != null) + message.regionName0 = String(object.regionName0); + if (object.regionName1 != null) + message.regionName1 = String(object.regionName1); + if (object.regionName2 != null) + message.regionName2 = String(object.regionName2); + if (object.regionName3 != null) + message.regionName3 = String(object.regionName3); + if (object.timezoneOffset != null) + message.timezoneOffset = object.timezoneOffset | 0; + if (object.systemSetting != null) { + if (typeof object.systemSetting !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoRequest.systemSetting: object expected"); + message.systemSetting = $root.wm.protobuf.SystemSetting.fromObject(object.systemSetting); + } + if (object.errorLogs) { + if (!Array.isArray(object.errorLogs)) + throw TypeError(".wm.protobuf.RegisterSystemInfoRequest.errorLogs: array expected"); + message.errorLogs = []; + for (let i = 0; i < object.errorLogs.length; ++i) { + if (typeof object.errorLogs[i] !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoRequest.errorLogs: object expected"); + message.errorLogs[i] = $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.fromObject(object.errorLogs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RegisterSystemInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest} message RegisterSystemInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.errorLogs = []; + if (options.defaults) { + object.pcbSerial = ""; + object.terminalType = options.enums === String ? "T_DRIVE" : 0; + object.romVersion = 0; + object.country = ""; + object.lineType = options.enums === String ? "L_UNKNOWN" : 0; + object.shopName = ""; + object.shopNickname = ""; + object.allnetPlaceId = 0; + object.allnetRegion0 = 0; + object.muchaPlaceId = ""; + object.muchaPrefectureId = 0; + object.regionName0 = ""; + object.regionName1 = ""; + object.regionName2 = ""; + object.regionName3 = ""; + object.timezoneOffset = 0; + object.systemSetting = null; + } + if (message.pcbSerial != null && message.hasOwnProperty("pcbSerial")) + object.pcbSerial = message.pcbSerial; + if (message.terminalType != null && message.hasOwnProperty("terminalType")) + object.terminalType = options.enums === String ? $root.wm.protobuf.TerminalType[message.terminalType] : message.terminalType; + if (message.romVersion != null && message.hasOwnProperty("romVersion")) + object.romVersion = message.romVersion; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + if (message.lineType != null && message.hasOwnProperty("lineType")) + object.lineType = options.enums === String ? $root.wm.protobuf.LineType[message.lineType] : message.lineType; + if (message.shopName != null && message.hasOwnProperty("shopName")) + object.shopName = message.shopName; + if (message.shopNickname != null && message.hasOwnProperty("shopNickname")) + object.shopNickname = message.shopNickname; + if (message.allnetPlaceId != null && message.hasOwnProperty("allnetPlaceId")) + object.allnetPlaceId = message.allnetPlaceId; + if (message.allnetRegion0 != null && message.hasOwnProperty("allnetRegion0")) + object.allnetRegion0 = message.allnetRegion0; + if (message.muchaPlaceId != null && message.hasOwnProperty("muchaPlaceId")) + object.muchaPlaceId = message.muchaPlaceId; + if (message.muchaPrefectureId != null && message.hasOwnProperty("muchaPrefectureId")) + object.muchaPrefectureId = message.muchaPrefectureId; + if (message.regionName0 != null && message.hasOwnProperty("regionName0")) + object.regionName0 = message.regionName0; + if (message.regionName1 != null && message.hasOwnProperty("regionName1")) + object.regionName1 = message.regionName1; + if (message.regionName2 != null && message.hasOwnProperty("regionName2")) + object.regionName2 = message.regionName2; + if (message.regionName3 != null && message.hasOwnProperty("regionName3")) + object.regionName3 = message.regionName3; + if (message.timezoneOffset != null && message.hasOwnProperty("timezoneOffset")) + object.timezoneOffset = message.timezoneOffset; + if (message.systemSetting != null && message.hasOwnProperty("systemSetting")) + object.systemSetting = $root.wm.protobuf.SystemSetting.toObject(message.systemSetting, options); + if (message.errorLogs && message.errorLogs.length) { + object.errorLogs = []; + for (let j = 0; j < message.errorLogs.length; ++j) + object.errorLogs[j] = $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.toObject(message.errorLogs[j], options); + } + return object; + }; + + /** + * Converts this RegisterSystemInfoRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemInfoRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemInfoRequest"; + }; + + RegisterSystemInfoRequest.ErrorLogEntry = (function() { + + /** + * Properties of an ErrorLogEntry. + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @interface IErrorLogEntry + * @property {number} datetime ErrorLogEntry datetime + * @property {string} message ErrorLogEntry message + */ + + /** + * Constructs a new ErrorLogEntry. + * @memberof wm.protobuf.RegisterSystemInfoRequest + * @classdesc Represents an ErrorLogEntry. + * @implements IErrorLogEntry + * @constructor + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry=} [properties] Properties to set + */ + function ErrorLogEntry(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorLogEntry datetime. + * @member {number} datetime + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @instance + */ + ErrorLogEntry.prototype.datetime = 0; + + /** + * ErrorLogEntry message. + * @member {string} message + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @instance + */ + ErrorLogEntry.prototype.message = ""; + + /** + * Creates a new ErrorLogEntry instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry instance + */ + ErrorLogEntry.create = function create(properties) { + return new ErrorLogEntry(properties); + }; + + /** + * Encodes the specified ErrorLogEntry message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry} message ErrorLogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorLogEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.datetime); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + return writer; + }; + + /** + * Encodes the specified ErrorLogEntry message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.IErrorLogEntry} message ErrorLogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorLogEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorLogEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datetime = reader.uint32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("datetime")) + throw $util.ProtocolError("missing required 'datetime'", { instance: message }); + if (!message.hasOwnProperty("message")) + throw $util.ProtocolError("missing required 'message'", { instance: message }); + return message; + }; + + /** + * Decodes an ErrorLogEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorLogEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorLogEntry message. + * @function verify + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorLogEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.datetime)) + return "datetime: integer expected"; + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates an ErrorLogEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} ErrorLogEntry + */ + ErrorLogEntry.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry) + return object; + let message = new $root.wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry(); + if (object.datetime != null) + message.datetime = object.datetime >>> 0; + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from an ErrorLogEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry} message ErrorLogEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorLogEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.datetime = 0; + object.message = ""; + } + if (message.datetime != null && message.hasOwnProperty("datetime")) + object.datetime = message.datetime; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this ErrorLogEntry to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @instance + * @returns {Object.} JSON object + */ + ErrorLogEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorLogEntry + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorLogEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemInfoRequest.ErrorLogEntry"; + }; + + return ErrorLogEntry; + })(); + + return RegisterSystemInfoRequest; + })(); + + protobuf.RegisterSystemInfoResponse = (function() { + + /** + * Properties of a RegisterSystemInfoResponse. + * @memberof wm.protobuf + * @interface IRegisterSystemInfoResponse + * @property {wm.protobuf.ErrorCode} error RegisterSystemInfoResponse error + * @property {number} regionId RegisterSystemInfoResponse regionId + * @property {string} placeId RegisterSystemInfoResponse placeId + * @property {Array.|null} [allowedClientLogTypes] RegisterSystemInfoResponse allowedClientLogTypes + * @property {wm.protobuf.IGameFeatureVersion} featureVersion RegisterSystemInfoResponse featureVersion + * @property {number|null} [latestCompetitionId] RegisterSystemInfoResponse latestCompetitionId + * @property {wm.protobuf.IGhostCompetitionSchedule|null} [competitionSchedule] RegisterSystemInfoResponse competitionSchedule + * @property {string|null} [scratchNotes] RegisterSystemInfoResponse scratchNotes + * @property {wm.protobuf.IInviteFriendCampaignSchedule|null} [inviteFriendCampaignSchedule] RegisterSystemInfoResponse inviteFriendCampaignSchedule + * @property {number} ghostSelectionMinRedoWait RegisterSystemInfoResponse ghostSelectionMinRedoWait + * @property {number} ghostSelectionMaxRedoWait RegisterSystemInfoResponse ghostSelectionMaxRedoWait + */ + + /** + * Constructs a new RegisterSystemInfoResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemInfoResponse. + * @implements IRegisterSystemInfoResponse + * @constructor + * @param {wm.protobuf.IRegisterSystemInfoResponse=} [properties] Properties to set + */ + function RegisterSystemInfoResponse(properties) { + this.allowedClientLogTypes = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemInfoResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.error = 0; + + /** + * RegisterSystemInfoResponse regionId. + * @member {number} regionId + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.regionId = 0; + + /** + * RegisterSystemInfoResponse placeId. + * @member {string} placeId + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.placeId = ""; + + /** + * RegisterSystemInfoResponse allowedClientLogTypes. + * @member {Array.} allowedClientLogTypes + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.allowedClientLogTypes = $util.emptyArray; + + /** + * RegisterSystemInfoResponse featureVersion. + * @member {wm.protobuf.IGameFeatureVersion} featureVersion + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.featureVersion = null; + + /** + * RegisterSystemInfoResponse latestCompetitionId. + * @member {number} latestCompetitionId + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.latestCompetitionId = 0; + + /** + * RegisterSystemInfoResponse competitionSchedule. + * @member {wm.protobuf.IGhostCompetitionSchedule|null|undefined} competitionSchedule + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.competitionSchedule = null; + + /** + * RegisterSystemInfoResponse scratchNotes. + * @member {string} scratchNotes + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.scratchNotes = ""; + + /** + * RegisterSystemInfoResponse inviteFriendCampaignSchedule. + * @member {wm.protobuf.IInviteFriendCampaignSchedule|null|undefined} inviteFriendCampaignSchedule + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.inviteFriendCampaignSchedule = null; + + /** + * RegisterSystemInfoResponse ghostSelectionMinRedoWait. + * @member {number} ghostSelectionMinRedoWait + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.ghostSelectionMinRedoWait = 0; + + /** + * RegisterSystemInfoResponse ghostSelectionMaxRedoWait. + * @member {number} ghostSelectionMaxRedoWait + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + */ + RegisterSystemInfoResponse.prototype.ghostSelectionMaxRedoWait = 0; + + /** + * Creates a new RegisterSystemInfoResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.IRegisterSystemInfoResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse instance + */ + RegisterSystemInfoResponse.create = function create(properties) { + return new RegisterSystemInfoResponse(properties); + }; + + /** + * Encodes the specified RegisterSystemInfoResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.IRegisterSystemInfoResponse} message RegisterSystemInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.regionId); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.placeId); + if (message.allowedClientLogTypes != null && message.allowedClientLogTypes.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (let i = 0; i < message.allowedClientLogTypes.length; ++i) + writer.int32(message.allowedClientLogTypes[i]); + writer.ldelim(); + } + $root.wm.protobuf.GameFeatureVersion.encode(message.featureVersion, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.latestCompetitionId != null && Object.hasOwnProperty.call(message, "latestCompetitionId")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.latestCompetitionId); + if (message.competitionSchedule != null && Object.hasOwnProperty.call(message, "competitionSchedule")) + $root.wm.protobuf.GhostCompetitionSchedule.encode(message.competitionSchedule, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.scratchNotes != null && Object.hasOwnProperty.call(message, "scratchNotes")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.scratchNotes); + if (message.inviteFriendCampaignSchedule != null && Object.hasOwnProperty.call(message, "inviteFriendCampaignSchedule")) + $root.wm.protobuf.InviteFriendCampaignSchedule.encode(message.inviteFriendCampaignSchedule, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.ghostSelectionMinRedoWait); + writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.ghostSelectionMaxRedoWait); + return writer; + }; + + /** + * Encodes the specified RegisterSystemInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.IRegisterSystemInfoResponse} message RegisterSystemInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.regionId = reader.uint32(); + break; + } + case 3: { + message.placeId = reader.string(); + break; + } + case 4: { + if (!(message.allowedClientLogTypes && message.allowedClientLogTypes.length)) + message.allowedClientLogTypes = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.allowedClientLogTypes.push(reader.int32()); + } else + message.allowedClientLogTypes.push(reader.int32()); + break; + } + case 10: { + message.featureVersion = $root.wm.protobuf.GameFeatureVersion.decode(reader, reader.uint32()); + break; + } + case 11: { + message.latestCompetitionId = reader.uint32(); + break; + } + case 12: { + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.decode(reader, reader.uint32()); + break; + } + case 19: { + message.scratchNotes = reader.string(); + break; + } + case 27: { + message.inviteFriendCampaignSchedule = $root.wm.protobuf.InviteFriendCampaignSchedule.decode(reader, reader.uint32()); + break; + } + case 28: { + message.ghostSelectionMinRedoWait = reader.uint32(); + break; + } + case 29: { + message.ghostSelectionMaxRedoWait = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("regionId")) + throw $util.ProtocolError("missing required 'regionId'", { instance: message }); + if (!message.hasOwnProperty("placeId")) + throw $util.ProtocolError("missing required 'placeId'", { instance: message }); + if (!message.hasOwnProperty("featureVersion")) + throw $util.ProtocolError("missing required 'featureVersion'", { instance: message }); + if (!message.hasOwnProperty("ghostSelectionMinRedoWait")) + throw $util.ProtocolError("missing required 'ghostSelectionMinRedoWait'", { instance: message }); + if (!message.hasOwnProperty("ghostSelectionMaxRedoWait")) + throw $util.ProtocolError("missing required 'ghostSelectionMaxRedoWait'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemInfoResponse message. + * @function verify + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (!$util.isString(message.placeId)) + return "placeId: string expected"; + if (message.allowedClientLogTypes != null && message.hasOwnProperty("allowedClientLogTypes")) { + if (!Array.isArray(message.allowedClientLogTypes)) + return "allowedClientLogTypes: array expected"; + for (let i = 0; i < message.allowedClientLogTypes.length; ++i) + switch (message.allowedClientLogTypes[i]) { + default: + return "allowedClientLogTypes: enum value[] expected"; + case 0: + case 1: + break; + } + } + { + let error = $root.wm.protobuf.GameFeatureVersion.verify(message.featureVersion); + if (error) + return "featureVersion." + error; + } + if (message.latestCompetitionId != null && message.hasOwnProperty("latestCompetitionId")) + if (!$util.isInteger(message.latestCompetitionId)) + return "latestCompetitionId: integer expected"; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) { + let error = $root.wm.protobuf.GhostCompetitionSchedule.verify(message.competitionSchedule); + if (error) + return "competitionSchedule." + error; + } + if (message.scratchNotes != null && message.hasOwnProperty("scratchNotes")) + if (!$util.isString(message.scratchNotes)) + return "scratchNotes: string expected"; + if (message.inviteFriendCampaignSchedule != null && message.hasOwnProperty("inviteFriendCampaignSchedule")) { + let error = $root.wm.protobuf.InviteFriendCampaignSchedule.verify(message.inviteFriendCampaignSchedule); + if (error) + return "inviteFriendCampaignSchedule." + error; + } + if (!$util.isInteger(message.ghostSelectionMinRedoWait)) + return "ghostSelectionMinRedoWait: integer expected"; + if (!$util.isInteger(message.ghostSelectionMaxRedoWait)) + return "ghostSelectionMaxRedoWait: integer expected"; + return null; + }; + + /** + * Creates a RegisterSystemInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemInfoResponse} RegisterSystemInfoResponse + */ + RegisterSystemInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemInfoResponse) + return object; + let message = new $root.wm.protobuf.RegisterSystemInfoResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.placeId != null) + message.placeId = String(object.placeId); + if (object.allowedClientLogTypes) { + if (!Array.isArray(object.allowedClientLogTypes)) + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.allowedClientLogTypes: array expected"); + message.allowedClientLogTypes = []; + for (let i = 0; i < object.allowedClientLogTypes.length; ++i) + switch (object.allowedClientLogTypes[i]) { + default: + case "LOG_LOAD_REPORT": + case 0: + message.allowedClientLogTypes[i] = 0; + break; + case "LOG_ERROR": + case 1: + message.allowedClientLogTypes[i] = 1; + break; + } + } + if (object.featureVersion != null) { + if (typeof object.featureVersion !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.featureVersion: object expected"); + message.featureVersion = $root.wm.protobuf.GameFeatureVersion.fromObject(object.featureVersion); + } + if (object.latestCompetitionId != null) + message.latestCompetitionId = object.latestCompetitionId >>> 0; + if (object.competitionSchedule != null) { + if (typeof object.competitionSchedule !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.competitionSchedule: object expected"); + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.fromObject(object.competitionSchedule); + } + if (object.scratchNotes != null) + message.scratchNotes = String(object.scratchNotes); + if (object.inviteFriendCampaignSchedule != null) { + if (typeof object.inviteFriendCampaignSchedule !== "object") + throw TypeError(".wm.protobuf.RegisterSystemInfoResponse.inviteFriendCampaignSchedule: object expected"); + message.inviteFriendCampaignSchedule = $root.wm.protobuf.InviteFriendCampaignSchedule.fromObject(object.inviteFriendCampaignSchedule); + } + if (object.ghostSelectionMinRedoWait != null) + message.ghostSelectionMinRedoWait = object.ghostSelectionMinRedoWait >>> 0; + if (object.ghostSelectionMaxRedoWait != null) + message.ghostSelectionMaxRedoWait = object.ghostSelectionMaxRedoWait >>> 0; + return message; + }; + + /** + * Creates a plain object from a RegisterSystemInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {wm.protobuf.RegisterSystemInfoResponse} message RegisterSystemInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.allowedClientLogTypes = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.regionId = 0; + object.placeId = ""; + object.featureVersion = null; + object.latestCompetitionId = 0; + object.competitionSchedule = null; + object.scratchNotes = ""; + object.inviteFriendCampaignSchedule = null; + object.ghostSelectionMinRedoWait = 0; + object.ghostSelectionMaxRedoWait = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.placeId != null && message.hasOwnProperty("placeId")) + object.placeId = message.placeId; + if (message.allowedClientLogTypes && message.allowedClientLogTypes.length) { + object.allowedClientLogTypes = []; + for (let j = 0; j < message.allowedClientLogTypes.length; ++j) + object.allowedClientLogTypes[j] = options.enums === String ? $root.wm.protobuf.ClientLogType[message.allowedClientLogTypes[j]] : message.allowedClientLogTypes[j]; + } + if (message.featureVersion != null && message.hasOwnProperty("featureVersion")) + object.featureVersion = $root.wm.protobuf.GameFeatureVersion.toObject(message.featureVersion, options); + if (message.latestCompetitionId != null && message.hasOwnProperty("latestCompetitionId")) + object.latestCompetitionId = message.latestCompetitionId; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) + object.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.toObject(message.competitionSchedule, options); + if (message.scratchNotes != null && message.hasOwnProperty("scratchNotes")) + object.scratchNotes = message.scratchNotes; + if (message.inviteFriendCampaignSchedule != null && message.hasOwnProperty("inviteFriendCampaignSchedule")) + object.inviteFriendCampaignSchedule = $root.wm.protobuf.InviteFriendCampaignSchedule.toObject(message.inviteFriendCampaignSchedule, options); + if (message.ghostSelectionMinRedoWait != null && message.hasOwnProperty("ghostSelectionMinRedoWait")) + object.ghostSelectionMinRedoWait = message.ghostSelectionMinRedoWait; + if (message.ghostSelectionMaxRedoWait != null && message.hasOwnProperty("ghostSelectionMaxRedoWait")) + object.ghostSelectionMaxRedoWait = message.ghostSelectionMaxRedoWait; + return object; + }; + + /** + * Converts this RegisterSystemInfoResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemInfoResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemInfoResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemInfoResponse"; + }; + + return RegisterSystemInfoResponse; + })(); + + protobuf.RegisterSystemStatsRequest = (function() { + + /** + * Properties of a RegisterSystemStatsRequest. + * @memberof wm.protobuf + * @interface IRegisterSystemStatsRequest + * @property {string} pcbSerial RegisterSystemStatsRequest pcbSerial + * @property {wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null} [driveStats] RegisterSystemStatsRequest driveStats + * @property {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null} [terminalStats] RegisterSystemStatsRequest terminalStats + */ + + /** + * Constructs a new RegisterSystemStatsRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemStatsRequest. + * @implements IRegisterSystemStatsRequest + * @constructor + * @param {wm.protobuf.IRegisterSystemStatsRequest=} [properties] Properties to set + */ + function RegisterSystemStatsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemStatsRequest pcbSerial. + * @member {string} pcbSerial + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + */ + RegisterSystemStatsRequest.prototype.pcbSerial = ""; + + /** + * RegisterSystemStatsRequest driveStats. + * @member {wm.protobuf.RegisterSystemStatsRequest.IDriveStats|null|undefined} driveStats + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + */ + RegisterSystemStatsRequest.prototype.driveStats = null; + + /** + * RegisterSystemStatsRequest terminalStats. + * @member {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats|null|undefined} terminalStats + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + */ + RegisterSystemStatsRequest.prototype.terminalStats = null; + + /** + * Creates a new RegisterSystemStatsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.IRegisterSystemStatsRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest instance + */ + RegisterSystemStatsRequest.create = function create(properties) { + return new RegisterSystemStatsRequest(properties); + }; + + /** + * Encodes the specified RegisterSystemStatsRequest message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.IRegisterSystemStatsRequest} message RegisterSystemStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pcbSerial); + if (message.driveStats != null && Object.hasOwnProperty.call(message, "driveStats")) + $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.encode(message.driveStats, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.terminalStats != null && Object.hasOwnProperty.call(message, "terminalStats")) + $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.encode(message.terminalStats, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RegisterSystemStatsRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.IRegisterSystemStatsRequest} message RegisterSystemStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pcbSerial = reader.string(); + break; + } + case 2: { + message.driveStats = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.decode(reader, reader.uint32()); + break; + } + case 3: { + message.terminalStats = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("pcbSerial")) + throw $util.ProtocolError("missing required 'pcbSerial'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemStatsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemStatsRequest message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemStatsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.pcbSerial)) + return "pcbSerial: string expected"; + if (message.driveStats != null && message.hasOwnProperty("driveStats")) { + let error = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify(message.driveStats); + if (error) + return "driveStats." + error; + } + if (message.terminalStats != null && message.hasOwnProperty("terminalStats")) { + let error = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify(message.terminalStats); + if (error) + return "terminalStats." + error; + } + return null; + }; + + /** + * Creates a RegisterSystemStatsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsRequest} RegisterSystemStatsRequest + */ + RegisterSystemStatsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsRequest) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsRequest(); + if (object.pcbSerial != null) + message.pcbSerial = String(object.pcbSerial); + if (object.driveStats != null) { + if (typeof object.driveStats !== "object") + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.driveStats: object expected"); + message.driveStats = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.fromObject(object.driveStats); + } + if (object.terminalStats != null) { + if (typeof object.terminalStats !== "object") + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.terminalStats: object expected"); + message.terminalStats = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.fromObject(object.terminalStats); + } + return message; + }; + + /** + * Creates a plain object from a RegisterSystemStatsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest} message RegisterSystemStatsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemStatsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.pcbSerial = ""; + object.driveStats = null; + object.terminalStats = null; + } + if (message.pcbSerial != null && message.hasOwnProperty("pcbSerial")) + object.pcbSerial = message.pcbSerial; + if (message.driveStats != null && message.hasOwnProperty("driveStats")) + object.driveStats = $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats.toObject(message.driveStats, options); + if (message.terminalStats != null && message.hasOwnProperty("terminalStats")) + object.terminalStats = $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats.toObject(message.terminalStats, options); + return object; + }; + + /** + * Converts this RegisterSystemStatsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemStatsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemStatsRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemStatsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsRequest"; + }; + + RegisterSystemStatsRequest.DriveStats = (function() { + + /** + * Properties of a DriveStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @interface IDriveStats + * @property {Array.|null} [operation] DriveStats operation + * @property {Array.|null} [story] DriveStats story + * @property {Array.|null} [versus] DriveStats versus + * @property {Array.|null} [ghost] DriveStats ghost + * @property {Array.|null} [timeAttack] DriveStats timeAttack + * @property {Array.|null} [event] DriveStats event + */ + + /** + * Constructs a new DriveStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @classdesc Represents a DriveStats. + * @implements IDriveStats + * @constructor + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats=} [properties] Properties to set + */ + function DriveStats(properties) { + this.operation = []; + this.story = []; + this.versus = []; + this.ghost = []; + this.timeAttack = []; + this.event = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DriveStats operation. + * @member {Array.} operation + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.operation = $util.emptyArray; + + /** + * DriveStats story. + * @member {Array.} story + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.story = $util.emptyArray; + + /** + * DriveStats versus. + * @member {Array.} versus + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.versus = $util.emptyArray; + + /** + * DriveStats ghost. + * @member {Array.} ghost + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.ghost = $util.emptyArray; + + /** + * DriveStats timeAttack. + * @member {Array.} timeAttack + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.timeAttack = $util.emptyArray; + + /** + * DriveStats event. + * @member {Array.} event + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + */ + DriveStats.prototype.event = $util.emptyArray; + + /** + * Creates a new DriveStats instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats instance + */ + DriveStats.create = function create(properties) { + return new DriveStats(properties); + }; + + /** + * Encodes the specified DriveStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats} message DriveStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DriveStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && message.operation.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (let i = 0; i < message.operation.length; ++i) + writer.uint32(message.operation[i]); + writer.ldelim(); + } + if (message.story != null && message.story.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (let i = 0; i < message.story.length; ++i) + writer.uint32(message.story[i]); + writer.ldelim(); + } + if (message.versus != null && message.versus.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (let i = 0; i < message.versus.length; ++i) + writer.uint32(message.versus[i]); + writer.ldelim(); + } + if (message.ghost != null && message.ghost.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (let i = 0; i < message.ghost.length; ++i) + writer.uint32(message.ghost[i]); + writer.ldelim(); + } + if (message.timeAttack != null && message.timeAttack.length) { + writer.uint32(/* id 5, wireType 2 =*/42).fork(); + for (let i = 0; i < message.timeAttack.length; ++i) + writer.uint32(message.timeAttack[i]); + writer.ldelim(); + } + if (message.event != null && message.event.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (let i = 0; i < message.event.length; ++i) + writer.uint32(message.event[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified DriveStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.DriveStats.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.IDriveStats} message DriveStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DriveStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DriveStats message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DriveStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operation && message.operation.length)) + message.operation = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.operation.push(reader.uint32()); + } else + message.operation.push(reader.uint32()); + break; + } + case 2: { + if (!(message.story && message.story.length)) + message.story = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.story.push(reader.uint32()); + } else + message.story.push(reader.uint32()); + break; + } + case 3: { + if (!(message.versus && message.versus.length)) + message.versus = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.versus.push(reader.uint32()); + } else + message.versus.push(reader.uint32()); + break; + } + case 4: { + if (!(message.ghost && message.ghost.length)) + message.ghost = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.ghost.push(reader.uint32()); + } else + message.ghost.push(reader.uint32()); + break; + } + case 5: { + if (!(message.timeAttack && message.timeAttack.length)) + message.timeAttack = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.timeAttack.push(reader.uint32()); + } else + message.timeAttack.push(reader.uint32()); + break; + } + case 6: { + if (!(message.event && message.event.length)) + message.event = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.event.push(reader.uint32()); + } else + message.event.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DriveStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DriveStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DriveStats message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DriveStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) { + if (!Array.isArray(message.operation)) + return "operation: array expected"; + for (let i = 0; i < message.operation.length; ++i) + if (!$util.isInteger(message.operation[i])) + return "operation: integer[] expected"; + } + if (message.story != null && message.hasOwnProperty("story")) { + if (!Array.isArray(message.story)) + return "story: array expected"; + for (let i = 0; i < message.story.length; ++i) + if (!$util.isInteger(message.story[i])) + return "story: integer[] expected"; + } + if (message.versus != null && message.hasOwnProperty("versus")) { + if (!Array.isArray(message.versus)) + return "versus: array expected"; + for (let i = 0; i < message.versus.length; ++i) + if (!$util.isInteger(message.versus[i])) + return "versus: integer[] expected"; + } + if (message.ghost != null && message.hasOwnProperty("ghost")) { + if (!Array.isArray(message.ghost)) + return "ghost: array expected"; + for (let i = 0; i < message.ghost.length; ++i) + if (!$util.isInteger(message.ghost[i])) + return "ghost: integer[] expected"; + } + if (message.timeAttack != null && message.hasOwnProperty("timeAttack")) { + if (!Array.isArray(message.timeAttack)) + return "timeAttack: array expected"; + for (let i = 0; i < message.timeAttack.length; ++i) + if (!$util.isInteger(message.timeAttack[i])) + return "timeAttack: integer[] expected"; + } + if (message.event != null && message.hasOwnProperty("event")) { + if (!Array.isArray(message.event)) + return "event: array expected"; + for (let i = 0; i < message.event.length; ++i) + if (!$util.isInteger(message.event[i])) + return "event: integer[] expected"; + } + return null; + }; + + /** + * Creates a DriveStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsRequest.DriveStats} DriveStats + */ + DriveStats.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsRequest.DriveStats(); + if (object.operation) { + if (!Array.isArray(object.operation)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.operation: array expected"); + message.operation = []; + for (let i = 0; i < object.operation.length; ++i) + message.operation[i] = object.operation[i] >>> 0; + } + if (object.story) { + if (!Array.isArray(object.story)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.story: array expected"); + message.story = []; + for (let i = 0; i < object.story.length; ++i) + message.story[i] = object.story[i] >>> 0; + } + if (object.versus) { + if (!Array.isArray(object.versus)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.versus: array expected"); + message.versus = []; + for (let i = 0; i < object.versus.length; ++i) + message.versus[i] = object.versus[i] >>> 0; + } + if (object.ghost) { + if (!Array.isArray(object.ghost)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.ghost: array expected"); + message.ghost = []; + for (let i = 0; i < object.ghost.length; ++i) + message.ghost[i] = object.ghost[i] >>> 0; + } + if (object.timeAttack) { + if (!Array.isArray(object.timeAttack)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.timeAttack: array expected"); + message.timeAttack = []; + for (let i = 0; i < object.timeAttack.length; ++i) + message.timeAttack[i] = object.timeAttack[i] >>> 0; + } + if (object.event) { + if (!Array.isArray(object.event)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.DriveStats.event: array expected"); + message.event = []; + for (let i = 0; i < object.event.length; ++i) + message.event[i] = object.event[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a DriveStats message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.DriveStats} message DriveStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DriveStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.operation = []; + object.story = []; + object.versus = []; + object.ghost = []; + object.timeAttack = []; + object.event = []; + } + if (message.operation && message.operation.length) { + object.operation = []; + for (let j = 0; j < message.operation.length; ++j) + object.operation[j] = message.operation[j]; + } + if (message.story && message.story.length) { + object.story = []; + for (let j = 0; j < message.story.length; ++j) + object.story[j] = message.story[j]; + } + if (message.versus && message.versus.length) { + object.versus = []; + for (let j = 0; j < message.versus.length; ++j) + object.versus[j] = message.versus[j]; + } + if (message.ghost && message.ghost.length) { + object.ghost = []; + for (let j = 0; j < message.ghost.length; ++j) + object.ghost[j] = message.ghost[j]; + } + if (message.timeAttack && message.timeAttack.length) { + object.timeAttack = []; + for (let j = 0; j < message.timeAttack.length; ++j) + object.timeAttack[j] = message.timeAttack[j]; + } + if (message.event && message.event.length) { + object.event = []; + for (let j = 0; j < message.event.length; ++j) + object.event[j] = message.event[j]; + } + return object; + }; + + /** + * Converts this DriveStats to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @instance + * @returns {Object.} JSON object + */ + DriveStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DriveStats + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsRequest.DriveStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DriveStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsRequest.DriveStats"; + }; + + return DriveStats; + })(); + + RegisterSystemStatsRequest.TerminalStats = (function() { + + /** + * Properties of a TerminalStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @interface ITerminalStats + * @property {Array.|null} [operation] TerminalStats operation + */ + + /** + * Constructs a new TerminalStats. + * @memberof wm.protobuf.RegisterSystemStatsRequest + * @classdesc Represents a TerminalStats. + * @implements ITerminalStats + * @constructor + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats=} [properties] Properties to set + */ + function TerminalStats(properties) { + this.operation = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerminalStats operation. + * @member {Array.} operation + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @instance + */ + TerminalStats.prototype.operation = $util.emptyArray; + + /** + * Creates a new TerminalStats instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats instance + */ + TerminalStats.create = function create(properties) { + return new TerminalStats(properties); + }; + + /** + * Encodes the specified TerminalStats message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats} message TerminalStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && message.operation.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (let i = 0; i < message.operation.length; ++i) + writer.uint32(message.operation[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified TerminalStats message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsRequest.TerminalStats.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.ITerminalStats} message TerminalStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerminalStats message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operation && message.operation.length)) + message.operation = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.operation.push(reader.uint32()); + } else + message.operation.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TerminalStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerminalStats message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerminalStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) { + if (!Array.isArray(message.operation)) + return "operation: array expected"; + for (let i = 0; i < message.operation.length; ++i) + if (!$util.isInteger(message.operation[i])) + return "operation: integer[] expected"; + } + return null; + }; + + /** + * Creates a TerminalStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} TerminalStats + */ + TerminalStats.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsRequest.TerminalStats(); + if (object.operation) { + if (!Array.isArray(object.operation)) + throw TypeError(".wm.protobuf.RegisterSystemStatsRequest.TerminalStats.operation: array expected"); + message.operation = []; + for (let i = 0; i < object.operation.length; ++i) + message.operation[i] = object.operation[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a TerminalStats message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {wm.protobuf.RegisterSystemStatsRequest.TerminalStats} message TerminalStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerminalStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.operation = []; + if (message.operation && message.operation.length) { + object.operation = []; + for (let j = 0; j < message.operation.length; ++j) + object.operation[j] = message.operation[j]; + } + return object; + }; + + /** + * Converts this TerminalStats to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @instance + * @returns {Object.} JSON object + */ + TerminalStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerminalStats + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsRequest.TerminalStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerminalStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsRequest.TerminalStats"; + }; + + return TerminalStats; + })(); + + return RegisterSystemStatsRequest; + })(); + + protobuf.RegisterSystemStatsResponse = (function() { + + /** + * Properties of a RegisterSystemStatsResponse. + * @memberof wm.protobuf + * @interface IRegisterSystemStatsResponse + * @property {wm.protobuf.ErrorCode} error RegisterSystemStatsResponse error + */ + + /** + * Constructs a new RegisterSystemStatsResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterSystemStatsResponse. + * @implements IRegisterSystemStatsResponse + * @constructor + * @param {wm.protobuf.IRegisterSystemStatsResponse=} [properties] Properties to set + */ + function RegisterSystemStatsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterSystemStatsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @instance + */ + RegisterSystemStatsResponse.prototype.error = 0; + + /** + * Creates a new RegisterSystemStatsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.IRegisterSystemStatsResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse instance + */ + RegisterSystemStatsResponse.create = function create(properties) { + return new RegisterSystemStatsResponse(properties); + }; + + /** + * Encodes the specified RegisterSystemStatsResponse message. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.IRegisterSystemStatsResponse} message RegisterSystemStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified RegisterSystemStatsResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterSystemStatsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.IRegisterSystemStatsResponse} message RegisterSystemStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterSystemStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterSystemStatsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterSystemStatsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterSystemStatsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterSystemStatsResponse message. + * @function verify + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterSystemStatsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a RegisterSystemStatsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterSystemStatsResponse} RegisterSystemStatsResponse + */ + RegisterSystemStatsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterSystemStatsResponse) + return object; + let message = new $root.wm.protobuf.RegisterSystemStatsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a RegisterSystemStatsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {wm.protobuf.RegisterSystemStatsResponse} message RegisterSystemStatsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterSystemStatsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this RegisterSystemStatsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterSystemStatsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterSystemStatsResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterSystemStatsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterSystemStatsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterSystemStatsResponse"; + }; + + return RegisterSystemStatsResponse; + })(); + + protobuf.RegisterGhostTrailRequest = (function() { + + /** + * Properties of a RegisterGhostTrailRequest. + * @memberof wm.protobuf + * @interface IRegisterGhostTrailRequest + * @property {number|Long} ghostSessionId RegisterGhostTrailRequest ghostSessionId + * @property {wm.protobuf.IGhostCar} ghost RegisterGhostTrailRequest ghost + * @property {Uint8Array} trail RegisterGhostTrailRequest trail + * @property {number|null} [time] RegisterGhostTrailRequest time + * @property {wm.protobuf.IBinaryData|null} [driveData] RegisterGhostTrailRequest driveData + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByArea] RegisterGhostTrailRequest trendBinaryByArea + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByCar] RegisterGhostTrailRequest trendBinaryByCar + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByUser] RegisterGhostTrailRequest trendBinaryByUser + */ + + /** + * Constructs a new RegisterGhostTrailRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterGhostTrailRequest. + * @implements IRegisterGhostTrailRequest + * @constructor + * @param {wm.protobuf.IRegisterGhostTrailRequest=} [properties] Properties to set + */ + function RegisterGhostTrailRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterGhostTrailRequest ghostSessionId. + * @member {number|Long} ghostSessionId + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.ghostSessionId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * RegisterGhostTrailRequest ghost. + * @member {wm.protobuf.IGhostCar} ghost + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.ghost = null; + + /** + * RegisterGhostTrailRequest trail. + * @member {Uint8Array} trail + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trail = $util.newBuffer([]); + + /** + * RegisterGhostTrailRequest time. + * @member {number} time + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.time = 0; + + /** + * RegisterGhostTrailRequest driveData. + * @member {wm.protobuf.IBinaryData|null|undefined} driveData + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.driveData = null; + + /** + * RegisterGhostTrailRequest trendBinaryByArea. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByArea + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trendBinaryByArea = null; + + /** + * RegisterGhostTrailRequest trendBinaryByCar. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByCar + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trendBinaryByCar = null; + + /** + * RegisterGhostTrailRequest trendBinaryByUser. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByUser + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + */ + RegisterGhostTrailRequest.prototype.trendBinaryByUser = null; + + /** + * Creates a new RegisterGhostTrailRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.IRegisterGhostTrailRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest instance + */ + RegisterGhostTrailRequest.create = function create(properties) { + return new RegisterGhostTrailRequest(properties); + }; + + /** + * Encodes the specified RegisterGhostTrailRequest message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.IRegisterGhostTrailRequest} message RegisterGhostTrailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.ghostSessionId); + $root.wm.protobuf.GhostCar.encode(message.ghost, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.trail); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time); + if (message.driveData != null && Object.hasOwnProperty.call(message, "driveData")) + $root.wm.protobuf.BinaryData.encode(message.driveData, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.trendBinaryByArea != null && Object.hasOwnProperty.call(message, "trendBinaryByArea")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByArea, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.trendBinaryByCar != null && Object.hasOwnProperty.call(message, "trendBinaryByCar")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByCar, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.trendBinaryByUser != null && Object.hasOwnProperty.call(message, "trendBinaryByUser")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByUser, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RegisterGhostTrailRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.IRegisterGhostTrailRequest} message RegisterGhostTrailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterGhostTrailRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ghostSessionId = reader.uint64(); + break; + } + case 2: { + message.ghost = $root.wm.protobuf.GhostCar.decode(reader, reader.uint32()); + break; + } + case 3: { + message.trail = reader.bytes(); + break; + } + case 4: { + message.time = reader.uint32(); + break; + } + case 5: { + message.driveData = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 6: { + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 7: { + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 8: { + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("ghostSessionId")) + throw $util.ProtocolError("missing required 'ghostSessionId'", { instance: message }); + if (!message.hasOwnProperty("ghost")) + throw $util.ProtocolError("missing required 'ghost'", { instance: message }); + if (!message.hasOwnProperty("trail")) + throw $util.ProtocolError("missing required 'trail'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterGhostTrailRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterGhostTrailRequest message. + * @function verify + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterGhostTrailRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.ghostSessionId) && !(message.ghostSessionId && $util.isInteger(message.ghostSessionId.low) && $util.isInteger(message.ghostSessionId.high))) + return "ghostSessionId: integer|Long expected"; + { + let error = $root.wm.protobuf.GhostCar.verify(message.ghost); + if (error) + return "ghost." + error; + } + if (!(message.trail && typeof message.trail.length === "number" || $util.isString(message.trail))) + return "trail: buffer expected"; + if (message.time != null && message.hasOwnProperty("time")) + if (!$util.isInteger(message.time)) + return "time: integer expected"; + if (message.driveData != null && message.hasOwnProperty("driveData")) { + let error = $root.wm.protobuf.BinaryData.verify(message.driveData); + if (error) + return "driveData." + error; + } + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByArea); + if (error) + return "trendBinaryByArea." + error; + } + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByCar); + if (error) + return "trendBinaryByCar." + error; + } + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByUser); + if (error) + return "trendBinaryByUser." + error; + } + return null; + }; + + /** + * Creates a RegisterGhostTrailRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterGhostTrailRequest} RegisterGhostTrailRequest + */ + RegisterGhostTrailRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterGhostTrailRequest) + return object; + let message = new $root.wm.protobuf.RegisterGhostTrailRequest(); + if (object.ghostSessionId != null) + if ($util.Long) + (message.ghostSessionId = $util.Long.fromValue(object.ghostSessionId)).unsigned = true; + else if (typeof object.ghostSessionId === "string") + message.ghostSessionId = parseInt(object.ghostSessionId, 10); + else if (typeof object.ghostSessionId === "number") + message.ghostSessionId = object.ghostSessionId; + else if (typeof object.ghostSessionId === "object") + message.ghostSessionId = new $util.LongBits(object.ghostSessionId.low >>> 0, object.ghostSessionId.high >>> 0).toNumber(true); + if (object.ghost != null) { + if (typeof object.ghost !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.ghost: object expected"); + message.ghost = $root.wm.protobuf.GhostCar.fromObject(object.ghost); + } + if (object.trail != null) + if (typeof object.trail === "string") + $util.base64.decode(object.trail, message.trail = $util.newBuffer($util.base64.length(object.trail)), 0); + else if (object.trail.length >= 0) + message.trail = object.trail; + if (object.time != null) + message.time = object.time >>> 0; + if (object.driveData != null) { + if (typeof object.driveData !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.driveData: object expected"); + message.driveData = $root.wm.protobuf.BinaryData.fromObject(object.driveData); + } + if (object.trendBinaryByArea != null) { + if (typeof object.trendBinaryByArea !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.trendBinaryByArea: object expected"); + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByArea); + } + if (object.trendBinaryByCar != null) { + if (typeof object.trendBinaryByCar !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.trendBinaryByCar: object expected"); + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByCar); + } + if (object.trendBinaryByUser != null) { + if (typeof object.trendBinaryByUser !== "object") + throw TypeError(".wm.protobuf.RegisterGhostTrailRequest.trendBinaryByUser: object expected"); + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByUser); + } + return message; + }; + + /** + * Creates a plain object from a RegisterGhostTrailRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {wm.protobuf.RegisterGhostTrailRequest} message RegisterGhostTrailRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterGhostTrailRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.ghostSessionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ghostSessionId = options.longs === String ? "0" : 0; + object.ghost = null; + if (options.bytes === String) + object.trail = ""; + else { + object.trail = []; + if (options.bytes !== Array) + object.trail = $util.newBuffer(object.trail); + } + object.time = 0; + object.driveData = null; + object.trendBinaryByArea = null; + object.trendBinaryByCar = null; + object.trendBinaryByUser = null; + } + if (message.ghostSessionId != null && message.hasOwnProperty("ghostSessionId")) + if (typeof message.ghostSessionId === "number") + object.ghostSessionId = options.longs === String ? String(message.ghostSessionId) : message.ghostSessionId; + else + object.ghostSessionId = options.longs === String ? $util.Long.prototype.toString.call(message.ghostSessionId) : options.longs === Number ? new $util.LongBits(message.ghostSessionId.low >>> 0, message.ghostSessionId.high >>> 0).toNumber(true) : message.ghostSessionId; + if (message.ghost != null && message.hasOwnProperty("ghost")) + object.ghost = $root.wm.protobuf.GhostCar.toObject(message.ghost, options); + if (message.trail != null && message.hasOwnProperty("trail")) + object.trail = options.bytes === String ? $util.base64.encode(message.trail, 0, message.trail.length) : options.bytes === Array ? Array.prototype.slice.call(message.trail) : message.trail; + if (message.time != null && message.hasOwnProperty("time")) + object.time = message.time; + if (message.driveData != null && message.hasOwnProperty("driveData")) + object.driveData = $root.wm.protobuf.BinaryData.toObject(message.driveData, options); + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) + object.trendBinaryByArea = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByArea, options); + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) + object.trendBinaryByCar = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByCar, options); + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) + object.trendBinaryByUser = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByUser, options); + return object; + }; + + /** + * Converts this RegisterGhostTrailRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterGhostTrailRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterGhostTrailRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterGhostTrailRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterGhostTrailRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterGhostTrailRequest"; + }; + + return RegisterGhostTrailRequest; + })(); + + protobuf.RegisterGhostTrailResponse = (function() { + + /** + * Properties of a RegisterGhostTrailResponse. + * @memberof wm.protobuf + * @interface IRegisterGhostTrailResponse + * @property {wm.protobuf.ErrorCode} error RegisterGhostTrailResponse error + */ + + /** + * Constructs a new RegisterGhostTrailResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterGhostTrailResponse. + * @implements IRegisterGhostTrailResponse + * @constructor + * @param {wm.protobuf.IRegisterGhostTrailResponse=} [properties] Properties to set + */ + function RegisterGhostTrailResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterGhostTrailResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @instance + */ + RegisterGhostTrailResponse.prototype.error = 0; + + /** + * Creates a new RegisterGhostTrailResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.IRegisterGhostTrailResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse instance + */ + RegisterGhostTrailResponse.create = function create(properties) { + return new RegisterGhostTrailResponse(properties); + }; + + /** + * Encodes the specified RegisterGhostTrailResponse message. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.IRegisterGhostTrailResponse} message RegisterGhostTrailResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified RegisterGhostTrailResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterGhostTrailResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.IRegisterGhostTrailResponse} message RegisterGhostTrailResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterGhostTrailResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterGhostTrailResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterGhostTrailResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterGhostTrailResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterGhostTrailResponse message. + * @function verify + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterGhostTrailResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a RegisterGhostTrailResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterGhostTrailResponse} RegisterGhostTrailResponse + */ + RegisterGhostTrailResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterGhostTrailResponse) + return object; + let message = new $root.wm.protobuf.RegisterGhostTrailResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a RegisterGhostTrailResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {wm.protobuf.RegisterGhostTrailResponse} message RegisterGhostTrailResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterGhostTrailResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this RegisterGhostTrailResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterGhostTrailResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterGhostTrailResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterGhostTrailResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterGhostTrailResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterGhostTrailResponse"; + }; + + return RegisterGhostTrailResponse; + })(); + + protobuf.LoadUserRequest = (function() { + + /** + * Properties of a LoadUserRequest. + * @memberof wm.protobuf + * @interface ILoadUserRequest + * @property {string|null} [cardChipId] LoadUserRequest cardChipId + * @property {string|null} [accessCode] LoadUserRequest accessCode + * @property {number|null} [cardTypeCode] LoadUserRequest cardTypeCode + * @property {number|null} [cardRegionCode] LoadUserRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] LoadUserRequest device + * @property {number|null} [userId] LoadUserRequest userId + * @property {number} romVersion LoadUserRequest romVersion + * @property {number} maxCars LoadUserRequest maxCars + * @property {boolean|null} [createUser] LoadUserRequest createUser + */ + + /** + * Constructs a new LoadUserRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadUserRequest. + * @implements ILoadUserRequest + * @constructor + * @param {wm.protobuf.ILoadUserRequest=} [properties] Properties to set + */ + function LoadUserRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUserRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.cardChipId = ""; + + /** + * LoadUserRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.accessCode = ""; + + /** + * LoadUserRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.cardTypeCode = 0; + + /** + * LoadUserRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.cardRegionCode = 0; + + /** + * LoadUserRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.device = 0; + + /** + * LoadUserRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.userId = 0; + + /** + * LoadUserRequest romVersion. + * @member {number} romVersion + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.romVersion = 0; + + /** + * LoadUserRequest maxCars. + * @member {number} maxCars + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.maxCars = 0; + + /** + * LoadUserRequest createUser. + * @member {boolean} createUser + * @memberof wm.protobuf.LoadUserRequest + * @instance + */ + LoadUserRequest.prototype.createUser = false; + + /** + * Creates a new LoadUserRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.ILoadUserRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest instance + */ + LoadUserRequest.create = function create(properties) { + return new LoadUserRequest(properties); + }; + + /** + * Encodes the specified LoadUserRequest message. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.ILoadUserRequest} message LoadUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.device); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.userId); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.romVersion); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.maxCars); + if (message.createUser != null && Object.hasOwnProperty.call(message, "createUser")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.createUser); + return writer; + }; + + /** + * Encodes the specified LoadUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.ILoadUserRequest} message LoadUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUserRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cardChipId = reader.string(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + case 3: { + message.cardTypeCode = reader.uint32(); + break; + } + case 4: { + message.cardRegionCode = reader.uint32(); + break; + } + case 5: { + message.device = reader.int32(); + break; + } + case 6: { + message.userId = reader.uint32(); + break; + } + case 7: { + message.romVersion = reader.uint32(); + break; + } + case 8: { + message.maxCars = reader.uint32(); + break; + } + case 9: { + message.createUser = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("romVersion")) + throw $util.ProtocolError("missing required 'romVersion'", { instance: message }); + if (!message.hasOwnProperty("maxCars")) + throw $util.ProtocolError("missing required 'maxCars'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUserRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUserRequest message. + * @function verify + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUserRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.romVersion)) + return "romVersion: integer expected"; + if (!$util.isInteger(message.maxCars)) + return "maxCars: integer expected"; + if (message.createUser != null && message.hasOwnProperty("createUser")) + if (typeof message.createUser !== "boolean") + return "createUser: boolean expected"; + return null; + }; + + /** + * Creates a LoadUserRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUserRequest} LoadUserRequest + */ + LoadUserRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUserRequest) + return object; + let message = new $root.wm.protobuf.LoadUserRequest(); + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.romVersion != null) + message.romVersion = object.romVersion >>> 0; + if (object.maxCars != null) + message.maxCars = object.maxCars >>> 0; + if (object.createUser != null) + message.createUser = Boolean(object.createUser); + return message; + }; + + /** + * Creates a plain object from a LoadUserRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {wm.protobuf.LoadUserRequest} message LoadUserRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUserRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.userId = 0; + object.romVersion = 0; + object.maxCars = 0; + object.createUser = false; + } + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.romVersion != null && message.hasOwnProperty("romVersion")) + object.romVersion = message.romVersion; + if (message.maxCars != null && message.hasOwnProperty("maxCars")) + object.maxCars = message.maxCars; + if (message.createUser != null && message.hasOwnProperty("createUser")) + object.createUser = message.createUser; + return object; + }; + + /** + * Converts this LoadUserRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUserRequest + * @instance + * @returns {Object.} JSON object + */ + LoadUserRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUserRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadUserRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUserRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUserRequest"; + }; + + return LoadUserRequest; + })(); + + protobuf.LoadUserResponse = (function() { + + /** + * Properties of a LoadUserResponse. + * @memberof wm.protobuf + * @interface ILoadUserResponse + * @property {wm.protobuf.ErrorCode} error LoadUserResponse error + * @property {number|null} [unlockAt] LoadUserResponse unlockAt + * @property {string|null} [accessCode] LoadUserResponse accessCode + * @property {number|null} [banapassportAmId] LoadUserResponse banapassportAmId + * @property {number|null} [mbid] LoadUserResponse mbid + * @property {number|null} [userId] LoadUserResponse userId + * @property {number} numOfOwnedCars LoadUserResponse numOfOwnedCars + * @property {Array.|null} [cars] LoadUserResponse cars + * @property {Array.|null} [carStates] LoadUserResponse carStates + * @property {Array.|null} [unusedCarTickets] LoadUserResponse unusedCarTickets + * @property {Array.|null} [tutorials] LoadUserResponse tutorials + * @property {wm.protobuf.GhostCompetitionParticipantState|null} [competitionUserState] LoadUserResponse competitionUserState + * @property {string|null} [windowStickerString] LoadUserResponse windowStickerString + * @property {number|null} [windowStickerFont] LoadUserResponse windowStickerFont + * @property {wm.protobuf.SmartphoneAppState} spappState LoadUserResponse spappState + * @property {wm.protobuf.TransferState} transferState LoadUserResponse transferState + * @property {number|null} [totalVsStarCount] LoadUserResponse totalVsStarCount + * @property {number|null} [totalVsMedalPoint] LoadUserResponse totalVsMedalPoint + * @property {wm.protobuf.ICopiedCar|null} [copiedCar] LoadUserResponse copiedCar + * @property {boolean|null} [wasCreatedToday] LoadUserResponse wasCreatedToday + * @property {boolean|null} [participatedInInviteFriendCampaign] LoadUserResponse participatedInInviteFriendCampaign + */ + + /** + * Constructs a new LoadUserResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadUserResponse. + * @implements ILoadUserResponse + * @constructor + * @param {wm.protobuf.ILoadUserResponse=} [properties] Properties to set + */ + function LoadUserResponse(properties) { + this.cars = []; + this.carStates = []; + this.unusedCarTickets = []; + this.tutorials = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUserResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.error = 0; + + /** + * LoadUserResponse unlockAt. + * @member {number} unlockAt + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.unlockAt = 0; + + /** + * LoadUserResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.accessCode = ""; + + /** + * LoadUserResponse banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.banapassportAmId = 0; + + /** + * LoadUserResponse mbid. + * @member {number} mbid + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.mbid = 0; + + /** + * LoadUserResponse userId. + * @member {number} userId + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.userId = 0; + + /** + * LoadUserResponse numOfOwnedCars. + * @member {number} numOfOwnedCars + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.numOfOwnedCars = 0; + + /** + * LoadUserResponse cars. + * @member {Array.} cars + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.cars = $util.emptyArray; + + /** + * LoadUserResponse carStates. + * @member {Array.} carStates + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.carStates = $util.emptyArray; + + /** + * LoadUserResponse unusedCarTickets. + * @member {Array.} unusedCarTickets + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.unusedCarTickets = $util.emptyArray; + + /** + * LoadUserResponse tutorials. + * @member {Array.} tutorials + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.tutorials = $util.emptyArray; + + /** + * LoadUserResponse competitionUserState. + * @member {wm.protobuf.GhostCompetitionParticipantState} competitionUserState + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.competitionUserState = 1; + + /** + * LoadUserResponse windowStickerString. + * @member {string} windowStickerString + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.windowStickerString = ""; + + /** + * LoadUserResponse windowStickerFont. + * @member {number} windowStickerFont + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.windowStickerFont = 0; + + /** + * LoadUserResponse spappState. + * @member {wm.protobuf.SmartphoneAppState} spappState + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.spappState = 0; + + /** + * LoadUserResponse transferState. + * @member {wm.protobuf.TransferState} transferState + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.transferState = 0; + + /** + * LoadUserResponse totalVsStarCount. + * @member {number} totalVsStarCount + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.totalVsStarCount = 0; + + /** + * LoadUserResponse totalVsMedalPoint. + * @member {number} totalVsMedalPoint + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.totalVsMedalPoint = 0; + + /** + * LoadUserResponse copiedCar. + * @member {wm.protobuf.ICopiedCar|null|undefined} copiedCar + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.copiedCar = null; + + /** + * LoadUserResponse wasCreatedToday. + * @member {boolean} wasCreatedToday + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.wasCreatedToday = false; + + /** + * LoadUserResponse participatedInInviteFriendCampaign. + * @member {boolean} participatedInInviteFriendCampaign + * @memberof wm.protobuf.LoadUserResponse + * @instance + */ + LoadUserResponse.prototype.participatedInInviteFriendCampaign = false; + + /** + * Creates a new LoadUserResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.ILoadUserResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse instance + */ + LoadUserResponse.create = function create(properties) { + return new LoadUserResponse(properties); + }; + + /** + * Encodes the specified LoadUserResponse message. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.ILoadUserResponse} message LoadUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.unlockAt != null && Object.hasOwnProperty.call(message, "unlockAt")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.unlockAt); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.accessCode); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.banapassportAmId); + if (message.mbid != null && Object.hasOwnProperty.call(message, "mbid")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.mbid); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.userId); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.numOfOwnedCars); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.Car.encode(message.cars[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.carStates != null && message.carStates.length) + for (let i = 0; i < message.carStates.length; ++i) + $root.wm.protobuf.LoadUserResponse.CarState.encode(message.carStates[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.unusedCarTickets != null && message.unusedCarTickets.length) + for (let i = 0; i < message.unusedCarTickets.length; ++i) + $root.wm.protobuf.UserItem.encode(message.unusedCarTickets[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.tutorials != null && message.tutorials.length) + for (let i = 0; i < message.tutorials.length; ++i) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.tutorials[i]); + if (message.competitionUserState != null && Object.hasOwnProperty.call(message, "competitionUserState")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.competitionUserState); + if (message.windowStickerString != null && Object.hasOwnProperty.call(message, "windowStickerString")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.windowStickerString); + if (message.windowStickerFont != null && Object.hasOwnProperty.call(message, "windowStickerFont")) + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.windowStickerFont); + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.spappState); + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.transferState); + if (message.totalVsStarCount != null && Object.hasOwnProperty.call(message, "totalVsStarCount")) + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.totalVsStarCount); + if (message.totalVsMedalPoint != null && Object.hasOwnProperty.call(message, "totalVsMedalPoint")) + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.totalVsMedalPoint); + if (message.copiedCar != null && Object.hasOwnProperty.call(message, "copiedCar")) + $root.wm.protobuf.CopiedCar.encode(message.copiedCar, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.wasCreatedToday != null && Object.hasOwnProperty.call(message, "wasCreatedToday")) + writer.uint32(/* id 28, wireType 0 =*/224).bool(message.wasCreatedToday); + if (message.participatedInInviteFriendCampaign != null && Object.hasOwnProperty.call(message, "participatedInInviteFriendCampaign")) + writer.uint32(/* id 29, wireType 0 =*/232).bool(message.participatedInInviteFriendCampaign); + return writer; + }; + + /** + * Encodes the specified LoadUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.ILoadUserResponse} message LoadUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUserResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUserResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.unlockAt = reader.uint32(); + break; + } + case 3: { + message.accessCode = reader.string(); + break; + } + case 4: { + message.banapassportAmId = reader.uint32(); + break; + } + case 5: { + message.mbid = reader.uint32(); + break; + } + case 6: { + message.userId = reader.uint32(); + break; + } + case 10: { + message.numOfOwnedCars = reader.uint32(); + break; + } + case 11: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + case 12: { + if (!(message.carStates && message.carStates.length)) + message.carStates = []; + message.carStates.push($root.wm.protobuf.LoadUserResponse.CarState.decode(reader, reader.uint32())); + break; + } + case 13: { + if (!(message.unusedCarTickets && message.unusedCarTickets.length)) + message.unusedCarTickets = []; + message.unusedCarTickets.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + case 15: { + if (!(message.tutorials && message.tutorials.length)) + message.tutorials = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.tutorials.push(reader.bool()); + } else + message.tutorials.push(reader.bool()); + break; + } + case 17: { + message.competitionUserState = reader.int32(); + break; + } + case 19: { + message.windowStickerString = reader.string(); + break; + } + case 20: { + message.windowStickerFont = reader.uint32(); + break; + } + case 21: { + message.spappState = reader.int32(); + break; + } + case 22: { + message.transferState = reader.int32(); + break; + } + case 25: { + message.totalVsStarCount = reader.uint32(); + break; + } + case 26: { + message.totalVsMedalPoint = reader.uint32(); + break; + } + case 27: { + message.copiedCar = $root.wm.protobuf.CopiedCar.decode(reader, reader.uint32()); + break; + } + case 28: { + message.wasCreatedToday = reader.bool(); + break; + } + case 29: { + message.participatedInInviteFriendCampaign = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("numOfOwnedCars")) + throw $util.ProtocolError("missing required 'numOfOwnedCars'", { instance: message }); + if (!message.hasOwnProperty("spappState")) + throw $util.ProtocolError("missing required 'spappState'", { instance: message }); + if (!message.hasOwnProperty("transferState")) + throw $util.ProtocolError("missing required 'transferState'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUserResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUserResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUserResponse message. + * @function verify + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUserResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.unlockAt != null && message.hasOwnProperty("unlockAt")) + if (!$util.isInteger(message.unlockAt)) + return "unlockAt: integer expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.mbid != null && message.hasOwnProperty("mbid")) + if (!$util.isInteger(message.mbid)) + return "mbid: integer expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.numOfOwnedCars)) + return "numOfOwnedCars: integer expected"; + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + if (message.carStates != null && message.hasOwnProperty("carStates")) { + if (!Array.isArray(message.carStates)) + return "carStates: array expected"; + for (let i = 0; i < message.carStates.length; ++i) { + let error = $root.wm.protobuf.LoadUserResponse.CarState.verify(message.carStates[i]); + if (error) + return "carStates." + error; + } + } + if (message.unusedCarTickets != null && message.hasOwnProperty("unusedCarTickets")) { + if (!Array.isArray(message.unusedCarTickets)) + return "unusedCarTickets: array expected"; + for (let i = 0; i < message.unusedCarTickets.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.unusedCarTickets[i]); + if (error) + return "unusedCarTickets." + error; + } + } + if (message.tutorials != null && message.hasOwnProperty("tutorials")) { + if (!Array.isArray(message.tutorials)) + return "tutorials: array expected"; + for (let i = 0; i < message.tutorials.length; ++i) + if (typeof message.tutorials[i] !== "boolean") + return "tutorials: boolean[] expected"; + } + if (message.competitionUserState != null && message.hasOwnProperty("competitionUserState")) + switch (message.competitionUserState) { + default: + return "competitionUserState: enum value expected"; + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + if (!$util.isString(message.windowStickerString)) + return "windowStickerString: string expected"; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + if (!$util.isInteger(message.windowStickerFont)) + return "windowStickerFont: integer expected"; + switch (message.spappState) { + default: + return "spappState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + switch (message.transferState) { + default: + return "transferState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.totalVsStarCount != null && message.hasOwnProperty("totalVsStarCount")) + if (!$util.isInteger(message.totalVsStarCount)) + return "totalVsStarCount: integer expected"; + if (message.totalVsMedalPoint != null && message.hasOwnProperty("totalVsMedalPoint")) + if (!$util.isInteger(message.totalVsMedalPoint)) + return "totalVsMedalPoint: integer expected"; + if (message.copiedCar != null && message.hasOwnProperty("copiedCar")) { + let error = $root.wm.protobuf.CopiedCar.verify(message.copiedCar); + if (error) + return "copiedCar." + error; + } + if (message.wasCreatedToday != null && message.hasOwnProperty("wasCreatedToday")) + if (typeof message.wasCreatedToday !== "boolean") + return "wasCreatedToday: boolean expected"; + if (message.participatedInInviteFriendCampaign != null && message.hasOwnProperty("participatedInInviteFriendCampaign")) + if (typeof message.participatedInInviteFriendCampaign !== "boolean") + return "participatedInInviteFriendCampaign: boolean expected"; + return null; + }; + + /** + * Creates a LoadUserResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUserResponse} LoadUserResponse + */ + LoadUserResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUserResponse) + return object; + let message = new $root.wm.protobuf.LoadUserResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.unlockAt != null) + message.unlockAt = object.unlockAt >>> 0; + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.mbid != null) + message.mbid = object.mbid >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.numOfOwnedCars != null) + message.numOfOwnedCars = object.numOfOwnedCars >>> 0; + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.LoadUserResponse.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.cars: object expected"); + message.cars[i] = $root.wm.protobuf.Car.fromObject(object.cars[i]); + } + } + if (object.carStates) { + if (!Array.isArray(object.carStates)) + throw TypeError(".wm.protobuf.LoadUserResponse.carStates: array expected"); + message.carStates = []; + for (let i = 0; i < object.carStates.length; ++i) { + if (typeof object.carStates[i] !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.carStates: object expected"); + message.carStates[i] = $root.wm.protobuf.LoadUserResponse.CarState.fromObject(object.carStates[i]); + } + } + if (object.unusedCarTickets) { + if (!Array.isArray(object.unusedCarTickets)) + throw TypeError(".wm.protobuf.LoadUserResponse.unusedCarTickets: array expected"); + message.unusedCarTickets = []; + for (let i = 0; i < object.unusedCarTickets.length; ++i) { + if (typeof object.unusedCarTickets[i] !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.unusedCarTickets: object expected"); + message.unusedCarTickets[i] = $root.wm.protobuf.UserItem.fromObject(object.unusedCarTickets[i]); + } + } + if (object.tutorials) { + if (!Array.isArray(object.tutorials)) + throw TypeError(".wm.protobuf.LoadUserResponse.tutorials: array expected"); + message.tutorials = []; + for (let i = 0; i < object.tutorials.length; ++i) + message.tutorials[i] = Boolean(object.tutorials[i]); + } + switch (object.competitionUserState) { + case "COMPETITION_NOT_PARTICIPATED": + case 1: + message.competitionUserState = 1; + break; + case "COMPETITION_QUALIFIED": + case 2: + message.competitionUserState = 2; + break; + case "COMPETITION_PARTICIPATED": + case 3: + message.competitionUserState = 3; + break; + case "COMPETITION_WON": + case 4: + message.competitionUserState = 4; + break; + } + if (object.windowStickerString != null) + message.windowStickerString = String(object.windowStickerString); + if (object.windowStickerFont != null) + message.windowStickerFont = object.windowStickerFont >>> 0; + switch (object.spappState) { + case "SPAPP_UNREGISTERED": + case 0: + message.spappState = 0; + break; + case "SPAPP_KTID": + case 1: + message.spappState = 1; + break; + case "SPAPP_BNID": + case 2: + message.spappState = 2; + break; + } + switch (object.transferState) { + case "NOT_REGISTERED": + case 0: + message.transferState = 0; + break; + case "NEW_REGISTRATION": + case 1: + message.transferState = 1; + break; + case "TRANSFER_REQUIRED": + case 2: + message.transferState = 2; + break; + case "TRANSFERRING": + case 3: + message.transferState = 3; + break; + case "TRANSFERRED": + case 4: + message.transferState = 4; + break; + } + if (object.totalVsStarCount != null) + message.totalVsStarCount = object.totalVsStarCount >>> 0; + if (object.totalVsMedalPoint != null) + message.totalVsMedalPoint = object.totalVsMedalPoint >>> 0; + if (object.copiedCar != null) { + if (typeof object.copiedCar !== "object") + throw TypeError(".wm.protobuf.LoadUserResponse.copiedCar: object expected"); + message.copiedCar = $root.wm.protobuf.CopiedCar.fromObject(object.copiedCar); + } + if (object.wasCreatedToday != null) + message.wasCreatedToday = Boolean(object.wasCreatedToday); + if (object.participatedInInviteFriendCampaign != null) + message.participatedInInviteFriendCampaign = Boolean(object.participatedInInviteFriendCampaign); + return message; + }; + + /** + * Creates a plain object from a LoadUserResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {wm.protobuf.LoadUserResponse} message LoadUserResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUserResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.cars = []; + object.carStates = []; + object.unusedCarTickets = []; + object.tutorials = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.unlockAt = 0; + object.accessCode = ""; + object.banapassportAmId = 0; + object.mbid = 0; + object.userId = 0; + object.numOfOwnedCars = 0; + object.competitionUserState = options.enums === String ? "COMPETITION_NOT_PARTICIPATED" : 1; + object.windowStickerString = ""; + object.windowStickerFont = 0; + object.spappState = options.enums === String ? "SPAPP_UNREGISTERED" : 0; + object.transferState = options.enums === String ? "NOT_REGISTERED" : 0; + object.totalVsStarCount = 0; + object.totalVsMedalPoint = 0; + object.copiedCar = null; + object.wasCreatedToday = false; + object.participatedInInviteFriendCampaign = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.unlockAt != null && message.hasOwnProperty("unlockAt")) + object.unlockAt = message.unlockAt; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.mbid != null && message.hasOwnProperty("mbid")) + object.mbid = message.mbid; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.numOfOwnedCars != null && message.hasOwnProperty("numOfOwnedCars")) + object.numOfOwnedCars = message.numOfOwnedCars; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.Car.toObject(message.cars[j], options); + } + if (message.carStates && message.carStates.length) { + object.carStates = []; + for (let j = 0; j < message.carStates.length; ++j) + object.carStates[j] = $root.wm.protobuf.LoadUserResponse.CarState.toObject(message.carStates[j], options); + } + if (message.unusedCarTickets && message.unusedCarTickets.length) { + object.unusedCarTickets = []; + for (let j = 0; j < message.unusedCarTickets.length; ++j) + object.unusedCarTickets[j] = $root.wm.protobuf.UserItem.toObject(message.unusedCarTickets[j], options); + } + if (message.tutorials && message.tutorials.length) { + object.tutorials = []; + for (let j = 0; j < message.tutorials.length; ++j) + object.tutorials[j] = message.tutorials[j]; + } + if (message.competitionUserState != null && message.hasOwnProperty("competitionUserState")) + object.competitionUserState = options.enums === String ? $root.wm.protobuf.GhostCompetitionParticipantState[message.competitionUserState] : message.competitionUserState; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + object.windowStickerString = message.windowStickerString; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + object.windowStickerFont = message.windowStickerFont; + if (message.spappState != null && message.hasOwnProperty("spappState")) + object.spappState = options.enums === String ? $root.wm.protobuf.SmartphoneAppState[message.spappState] : message.spappState; + if (message.transferState != null && message.hasOwnProperty("transferState")) + object.transferState = options.enums === String ? $root.wm.protobuf.TransferState[message.transferState] : message.transferState; + if (message.totalVsStarCount != null && message.hasOwnProperty("totalVsStarCount")) + object.totalVsStarCount = message.totalVsStarCount; + if (message.totalVsMedalPoint != null && message.hasOwnProperty("totalVsMedalPoint")) + object.totalVsMedalPoint = message.totalVsMedalPoint; + if (message.copiedCar != null && message.hasOwnProperty("copiedCar")) + object.copiedCar = $root.wm.protobuf.CopiedCar.toObject(message.copiedCar, options); + if (message.wasCreatedToday != null && message.hasOwnProperty("wasCreatedToday")) + object.wasCreatedToday = message.wasCreatedToday; + if (message.participatedInInviteFriendCampaign != null && message.hasOwnProperty("participatedInInviteFriendCampaign")) + object.participatedInInviteFriendCampaign = message.participatedInInviteFriendCampaign; + return object; + }; + + /** + * Converts this LoadUserResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUserResponse + * @instance + * @returns {Object.} JSON object + */ + LoadUserResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUserResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadUserResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUserResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUserResponse"; + }; + + LoadUserResponse.CarState = (function() { + + /** + * Properties of a CarState. + * @memberof wm.protobuf.LoadUserResponse + * @interface ICarState + * @property {boolean} hasOpponentGhost CarState hasOpponentGhost + * @property {wm.protobuf.GhostCompetitionParticipantState|null} [competitionState] CarState competitionState + * @property {boolean} toBeDeleted CarState toBeDeleted + * @property {boolean} eventJoined CarState eventJoined + * @property {boolean} transferred CarState transferred + * @property {number|null} [driveLastPlayedAt] CarState driveLastPlayedAt + */ + + /** + * Constructs a new CarState. + * @memberof wm.protobuf.LoadUserResponse + * @classdesc Represents a CarState. + * @implements ICarState + * @constructor + * @param {wm.protobuf.LoadUserResponse.ICarState=} [properties] Properties to set + */ + function CarState(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarState hasOpponentGhost. + * @member {boolean} hasOpponentGhost + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.hasOpponentGhost = false; + + /** + * CarState competitionState. + * @member {wm.protobuf.GhostCompetitionParticipantState} competitionState + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.competitionState = 1; + + /** + * CarState toBeDeleted. + * @member {boolean} toBeDeleted + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.toBeDeleted = false; + + /** + * CarState eventJoined. + * @member {boolean} eventJoined + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.eventJoined = false; + + /** + * CarState transferred. + * @member {boolean} transferred + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.transferred = false; + + /** + * CarState driveLastPlayedAt. + * @member {number} driveLastPlayedAt + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + */ + CarState.prototype.driveLastPlayedAt = 0; + + /** + * Creates a new CarState instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.ICarState=} [properties] Properties to set + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState instance + */ + CarState.create = function create(properties) { + return new CarState(properties); + }; + + /** + * Encodes the specified CarState message. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.ICarState} message CarState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.hasOpponentGhost); + if (message.competitionState != null && Object.hasOwnProperty.call(message, "competitionState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.competitionState); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.toBeDeleted); + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.eventJoined); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.transferred); + if (message.driveLastPlayedAt != null && Object.hasOwnProperty.call(message, "driveLastPlayedAt")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.driveLastPlayedAt); + return writer; + }; + + /** + * Encodes the specified CarState message, length delimited. Does not implicitly {@link wm.protobuf.LoadUserResponse.CarState.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.ICarState} message CarState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarState message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUserResponse.CarState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hasOpponentGhost = reader.bool(); + break; + } + case 2: { + message.competitionState = reader.int32(); + break; + } + case 4: { + message.toBeDeleted = reader.bool(); + break; + } + case 5: { + message.eventJoined = reader.bool(); + break; + } + case 6: { + message.transferred = reader.bool(); + break; + } + case 7: { + message.driveLastPlayedAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("hasOpponentGhost")) + throw $util.ProtocolError("missing required 'hasOpponentGhost'", { instance: message }); + if (!message.hasOwnProperty("toBeDeleted")) + throw $util.ProtocolError("missing required 'toBeDeleted'", { instance: message }); + if (!message.hasOwnProperty("eventJoined")) + throw $util.ProtocolError("missing required 'eventJoined'", { instance: message }); + if (!message.hasOwnProperty("transferred")) + throw $util.ProtocolError("missing required 'transferred'", { instance: message }); + return message; + }; + + /** + * Decodes a CarState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarState message. + * @function verify + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (typeof message.hasOpponentGhost !== "boolean") + return "hasOpponentGhost: boolean expected"; + if (message.competitionState != null && message.hasOwnProperty("competitionState")) + switch (message.competitionState) { + default: + return "competitionState: enum value expected"; + case 1: + case 2: + case 3: + case 4: + break; + } + if (typeof message.toBeDeleted !== "boolean") + return "toBeDeleted: boolean expected"; + if (typeof message.eventJoined !== "boolean") + return "eventJoined: boolean expected"; + if (typeof message.transferred !== "boolean") + return "transferred: boolean expected"; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + if (!$util.isInteger(message.driveLastPlayedAt)) + return "driveLastPlayedAt: integer expected"; + return null; + }; + + /** + * Creates a CarState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUserResponse.CarState} CarState + */ + CarState.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUserResponse.CarState) + return object; + let message = new $root.wm.protobuf.LoadUserResponse.CarState(); + if (object.hasOpponentGhost != null) + message.hasOpponentGhost = Boolean(object.hasOpponentGhost); + switch (object.competitionState) { + case "COMPETITION_NOT_PARTICIPATED": + case 1: + message.competitionState = 1; + break; + case "COMPETITION_QUALIFIED": + case 2: + message.competitionState = 2; + break; + case "COMPETITION_PARTICIPATED": + case 3: + message.competitionState = 3; + break; + case "COMPETITION_WON": + case 4: + message.competitionState = 4; + break; + } + if (object.toBeDeleted != null) + message.toBeDeleted = Boolean(object.toBeDeleted); + if (object.eventJoined != null) + message.eventJoined = Boolean(object.eventJoined); + if (object.transferred != null) + message.transferred = Boolean(object.transferred); + if (object.driveLastPlayedAt != null) + message.driveLastPlayedAt = object.driveLastPlayedAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarState message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {wm.protobuf.LoadUserResponse.CarState} message CarState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.hasOpponentGhost = false; + object.competitionState = options.enums === String ? "COMPETITION_NOT_PARTICIPATED" : 1; + object.toBeDeleted = false; + object.eventJoined = false; + object.transferred = false; + object.driveLastPlayedAt = 0; + } + if (message.hasOpponentGhost != null && message.hasOwnProperty("hasOpponentGhost")) + object.hasOpponentGhost = message.hasOpponentGhost; + if (message.competitionState != null && message.hasOwnProperty("competitionState")) + object.competitionState = options.enums === String ? $root.wm.protobuf.GhostCompetitionParticipantState[message.competitionState] : message.competitionState; + if (message.toBeDeleted != null && message.hasOwnProperty("toBeDeleted")) + object.toBeDeleted = message.toBeDeleted; + if (message.eventJoined != null && message.hasOwnProperty("eventJoined")) + object.eventJoined = message.eventJoined; + if (message.transferred != null && message.hasOwnProperty("transferred")) + object.transferred = message.transferred; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + object.driveLastPlayedAt = message.driveLastPlayedAt; + return object; + }; + + /** + * Converts this CarState to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUserResponse.CarState + * @instance + * @returns {Object.} JSON object + */ + CarState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarState + * @function getTypeUrl + * @memberof wm.protobuf.LoadUserResponse.CarState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUserResponse.CarState"; + }; + + return CarState; + })(); + + return LoadUserResponse; + })(); + + protobuf.UpdateUserSessionRequest = (function() { + + /** + * Properties of an UpdateUserSessionRequest. + * @memberof wm.protobuf + * @interface IUpdateUserSessionRequest + * @property {number|null} [userId] UpdateUserSessionRequest userId + * @property {string|null} [cardChipId] UpdateUserSessionRequest cardChipId + * @property {string|null} [accessCode] UpdateUserSessionRequest accessCode + * @property {number|null} [cardTypeCode] UpdateUserSessionRequest cardTypeCode + * @property {number|null} [cardRegionCode] UpdateUserSessionRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] UpdateUserSessionRequest device + * @property {number} unlockAt UpdateUserSessionRequest unlockAt + * @property {boolean|null} [acceptVs] UpdateUserSessionRequest acceptVs + */ + + /** + * Constructs a new UpdateUserSessionRequest. + * @memberof wm.protobuf + * @classdesc Represents an UpdateUserSessionRequest. + * @implements IUpdateUserSessionRequest + * @constructor + * @param {wm.protobuf.IUpdateUserSessionRequest=} [properties] Properties to set + */ + function UpdateUserSessionRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserSessionRequest userId. + * @member {number} userId + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.userId = 0; + + /** + * UpdateUserSessionRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.cardChipId = ""; + + /** + * UpdateUserSessionRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.accessCode = ""; + + /** + * UpdateUserSessionRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.cardTypeCode = 0; + + /** + * UpdateUserSessionRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.cardRegionCode = 0; + + /** + * UpdateUserSessionRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.device = 0; + + /** + * UpdateUserSessionRequest unlockAt. + * @member {number} unlockAt + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.unlockAt = 0; + + /** + * UpdateUserSessionRequest acceptVs. + * @member {boolean} acceptVs + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + */ + UpdateUserSessionRequest.prototype.acceptVs = false; + + /** + * Creates a new UpdateUserSessionRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.IUpdateUserSessionRequest=} [properties] Properties to set + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest instance + */ + UpdateUserSessionRequest.create = function create(properties) { + return new UpdateUserSessionRequest(properties); + }; + + /** + * Encodes the specified UpdateUserSessionRequest message. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.IUpdateUserSessionRequest} message UpdateUserSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.device); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.unlockAt); + if (message.acceptVs != null && Object.hasOwnProperty.call(message, "acceptVs")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.acceptVs); + return writer; + }; + + /** + * Encodes the specified UpdateUserSessionRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.IUpdateUserSessionRequest} message UpdateUserSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateUserSessionRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.cardChipId = reader.string(); + break; + } + case 3: { + message.accessCode = reader.string(); + break; + } + case 4: { + message.cardTypeCode = reader.uint32(); + break; + } + case 5: { + message.cardRegionCode = reader.uint32(); + break; + } + case 6: { + message.device = reader.int32(); + break; + } + case 7: { + message.unlockAt = reader.uint32(); + break; + } + case 8: { + message.acceptVs = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("unlockAt")) + throw $util.ProtocolError("missing required 'unlockAt'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateUserSessionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserSessionRequest message. + * @function verify + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserSessionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + if (!$util.isInteger(message.unlockAt)) + return "unlockAt: integer expected"; + if (message.acceptVs != null && message.hasOwnProperty("acceptVs")) + if (typeof message.acceptVs !== "boolean") + return "acceptVs: boolean expected"; + return null; + }; + + /** + * Creates an UpdateUserSessionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateUserSessionRequest} UpdateUserSessionRequest + */ + UpdateUserSessionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateUserSessionRequest) + return object; + let message = new $root.wm.protobuf.UpdateUserSessionRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.unlockAt != null) + message.unlockAt = object.unlockAt >>> 0; + if (object.acceptVs != null) + message.acceptVs = Boolean(object.acceptVs); + return message; + }; + + /** + * Creates a plain object from an UpdateUserSessionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {wm.protobuf.UpdateUserSessionRequest} message UpdateUserSessionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserSessionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.unlockAt = 0; + object.acceptVs = false; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.unlockAt != null && message.hasOwnProperty("unlockAt")) + object.unlockAt = message.unlockAt; + if (message.acceptVs != null && message.hasOwnProperty("acceptVs")) + object.acceptVs = message.acceptVs; + return object; + }; + + /** + * Converts this UpdateUserSessionRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateUserSessionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUserSessionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserSessionRequest + * @function getTypeUrl + * @memberof wm.protobuf.UpdateUserSessionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateUserSessionRequest"; + }; + + return UpdateUserSessionRequest; + })(); + + protobuf.UpdateUserSessionResponse = (function() { + + /** + * Properties of an UpdateUserSessionResponse. + * @memberof wm.protobuf + * @interface IUpdateUserSessionResponse + * @property {wm.protobuf.ErrorCode} error UpdateUserSessionResponse error + */ + + /** + * Constructs a new UpdateUserSessionResponse. + * @memberof wm.protobuf + * @classdesc Represents an UpdateUserSessionResponse. + * @implements IUpdateUserSessionResponse + * @constructor + * @param {wm.protobuf.IUpdateUserSessionResponse=} [properties] Properties to set + */ + function UpdateUserSessionResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserSessionResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.UpdateUserSessionResponse + * @instance + */ + UpdateUserSessionResponse.prototype.error = 0; + + /** + * Creates a new UpdateUserSessionResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.IUpdateUserSessionResponse=} [properties] Properties to set + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse instance + */ + UpdateUserSessionResponse.create = function create(properties) { + return new UpdateUserSessionResponse(properties); + }; + + /** + * Encodes the specified UpdateUserSessionResponse message. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.IUpdateUserSessionResponse} message UpdateUserSessionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified UpdateUserSessionResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateUserSessionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.IUpdateUserSessionResponse} message UpdateUserSessionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserSessionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateUserSessionResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateUserSessionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserSessionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserSessionResponse message. + * @function verify + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserSessionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates an UpdateUserSessionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateUserSessionResponse} UpdateUserSessionResponse + */ + UpdateUserSessionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateUserSessionResponse) + return object; + let message = new $root.wm.protobuf.UpdateUserSessionResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from an UpdateUserSessionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {wm.protobuf.UpdateUserSessionResponse} message UpdateUserSessionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserSessionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this UpdateUserSessionResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateUserSessionResponse + * @instance + * @returns {Object.} JSON object + */ + UpdateUserSessionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserSessionResponse + * @function getTypeUrl + * @memberof wm.protobuf.UpdateUserSessionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserSessionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateUserSessionResponse"; + }; + + return UpdateUserSessionResponse; + })(); + + protobuf.LoadDriveInformationRequest = (function() { + + /** + * Properties of a LoadDriveInformationRequest. + * @memberof wm.protobuf + * @interface ILoadDriveInformationRequest + * @property {number|null} [userId] LoadDriveInformationRequest userId + */ + + /** + * Constructs a new LoadDriveInformationRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadDriveInformationRequest. + * @implements ILoadDriveInformationRequest + * @constructor + * @param {wm.protobuf.ILoadDriveInformationRequest=} [properties] Properties to set + */ + function LoadDriveInformationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadDriveInformationRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadDriveInformationRequest + * @instance + */ + LoadDriveInformationRequest.prototype.userId = 0; + + /** + * Creates a new LoadDriveInformationRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.ILoadDriveInformationRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest instance + */ + LoadDriveInformationRequest.create = function create(properties) { + return new LoadDriveInformationRequest(properties); + }; + + /** + * Encodes the specified LoadDriveInformationRequest message. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.ILoadDriveInformationRequest} message LoadDriveInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadDriveInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.ILoadDriveInformationRequest} message LoadDriveInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadDriveInformationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadDriveInformationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadDriveInformationRequest message. + * @function verify + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadDriveInformationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadDriveInformationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadDriveInformationRequest} LoadDriveInformationRequest + */ + LoadDriveInformationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadDriveInformationRequest) + return object; + let message = new $root.wm.protobuf.LoadDriveInformationRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadDriveInformationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {wm.protobuf.LoadDriveInformationRequest} message LoadDriveInformationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadDriveInformationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadDriveInformationRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadDriveInformationRequest + * @instance + * @returns {Object.} JSON object + */ + LoadDriveInformationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadDriveInformationRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadDriveInformationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadDriveInformationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadDriveInformationRequest"; + }; + + return LoadDriveInformationRequest; + })(); + + protobuf.LoadDriveInformationResponse = (function() { + + /** + * Properties of a LoadDriveInformationResponse. + * @memberof wm.protobuf + * @interface ILoadDriveInformationResponse + * @property {wm.protobuf.ErrorCode} error LoadDriveInformationResponse error + * @property {Array.|null} [noticeWindow] LoadDriveInformationResponse noticeWindow + * @property {Array.|null} [noticeWindowMessage] LoadDriveInformationResponse noticeWindowMessage + * @property {wm.protobuf.ITransferNotice|null} [transferNotice] LoadDriveInformationResponse transferNotice + * @property {Array.|null} [restrictedModels] LoadDriveInformationResponse restrictedModels + * @property {boolean|null} [announceFeature] LoadDriveInformationResponse announceFeature + * @property {boolean|null} [announceMobile] LoadDriveInformationResponse announceMobile + * @property {Array.|null} [availableTickets] LoadDriveInformationResponse availableTickets + */ + + /** + * Constructs a new LoadDriveInformationResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadDriveInformationResponse. + * @implements ILoadDriveInformationResponse + * @constructor + * @param {wm.protobuf.ILoadDriveInformationResponse=} [properties] Properties to set + */ + function LoadDriveInformationResponse(properties) { + this.noticeWindow = []; + this.noticeWindowMessage = []; + this.restrictedModels = []; + this.availableTickets = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadDriveInformationResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.error = 0; + + /** + * LoadDriveInformationResponse noticeWindow. + * @member {Array.} noticeWindow + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.noticeWindow = $util.emptyArray; + + /** + * LoadDriveInformationResponse noticeWindowMessage. + * @member {Array.} noticeWindowMessage + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.noticeWindowMessage = $util.emptyArray; + + /** + * LoadDriveInformationResponse transferNotice. + * @member {wm.protobuf.ITransferNotice|null|undefined} transferNotice + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.transferNotice = null; + + /** + * LoadDriveInformationResponse restrictedModels. + * @member {Array.} restrictedModels + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.restrictedModels = $util.emptyArray; + + /** + * LoadDriveInformationResponse announceFeature. + * @member {boolean} announceFeature + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.announceFeature = false; + + /** + * LoadDriveInformationResponse announceMobile. + * @member {boolean} announceMobile + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.announceMobile = false; + + /** + * LoadDriveInformationResponse availableTickets. + * @member {Array.} availableTickets + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + */ + LoadDriveInformationResponse.prototype.availableTickets = $util.emptyArray; + + /** + * Creates a new LoadDriveInformationResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.ILoadDriveInformationResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse instance + */ + LoadDriveInformationResponse.create = function create(properties) { + return new LoadDriveInformationResponse(properties); + }; + + /** + * Encodes the specified LoadDriveInformationResponse message. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.ILoadDriveInformationResponse} message LoadDriveInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.noticeWindow != null && message.noticeWindow.length) + for (let i = 0; i < message.noticeWindow.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.noticeWindow[i]); + if (message.noticeWindowMessage != null && message.noticeWindowMessage.length) + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.noticeWindowMessage[i]); + if (message.transferNotice != null && Object.hasOwnProperty.call(message, "transferNotice")) + $root.wm.protobuf.TransferNotice.encode(message.transferNotice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.restrictedModels != null && message.restrictedModels.length) + for (let i = 0; i < message.restrictedModels.length; ++i) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.restrictedModels[i]); + if (message.announceFeature != null && Object.hasOwnProperty.call(message, "announceFeature")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.announceFeature); + if (message.announceMobile != null && Object.hasOwnProperty.call(message, "announceMobile")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.announceMobile); + if (message.availableTickets != null && message.availableTickets.length) + for (let i = 0; i < message.availableTickets.length; ++i) + $root.wm.protobuf.UserItem.encode(message.availableTickets[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadDriveInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadDriveInformationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.ILoadDriveInformationResponse} message LoadDriveInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadDriveInformationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadDriveInformationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.noticeWindow && message.noticeWindow.length)) + message.noticeWindow = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.noticeWindow.push(reader.int32()); + } else + message.noticeWindow.push(reader.int32()); + break; + } + case 3: { + if (!(message.noticeWindowMessage && message.noticeWindowMessage.length)) + message.noticeWindowMessage = []; + message.noticeWindowMessage.push(reader.string()); + break; + } + case 4: { + message.transferNotice = $root.wm.protobuf.TransferNotice.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.restrictedModels && message.restrictedModels.length)) + message.restrictedModels = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedModels.push(reader.uint32()); + } else + message.restrictedModels.push(reader.uint32()); + break; + } + case 7: { + message.announceFeature = reader.bool(); + break; + } + case 8: { + message.announceMobile = reader.bool(); + break; + } + case 9: { + if (!(message.availableTickets && message.availableTickets.length)) + message.availableTickets = []; + message.availableTickets.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadDriveInformationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadDriveInformationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadDriveInformationResponse message. + * @function verify + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadDriveInformationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.noticeWindow != null && message.hasOwnProperty("noticeWindow")) { + if (!Array.isArray(message.noticeWindow)) + return "noticeWindow: array expected"; + for (let i = 0; i < message.noticeWindow.length; ++i) + switch (message.noticeWindow[i]) { + default: + return "noticeWindow: enum value[] expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + } + if (message.noticeWindowMessage != null && message.hasOwnProperty("noticeWindowMessage")) { + if (!Array.isArray(message.noticeWindowMessage)) + return "noticeWindowMessage: array expected"; + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + if (!$util.isString(message.noticeWindowMessage[i])) + return "noticeWindowMessage: string[] expected"; + } + if (message.transferNotice != null && message.hasOwnProperty("transferNotice")) { + let error = $root.wm.protobuf.TransferNotice.verify(message.transferNotice); + if (error) + return "transferNotice." + error; + } + if (message.restrictedModels != null && message.hasOwnProperty("restrictedModels")) { + if (!Array.isArray(message.restrictedModels)) + return "restrictedModels: array expected"; + for (let i = 0; i < message.restrictedModels.length; ++i) + if (!$util.isInteger(message.restrictedModels[i])) + return "restrictedModels: integer[] expected"; + } + if (message.announceFeature != null && message.hasOwnProperty("announceFeature")) + if (typeof message.announceFeature !== "boolean") + return "announceFeature: boolean expected"; + if (message.announceMobile != null && message.hasOwnProperty("announceMobile")) + if (typeof message.announceMobile !== "boolean") + return "announceMobile: boolean expected"; + if (message.availableTickets != null && message.hasOwnProperty("availableTickets")) { + if (!Array.isArray(message.availableTickets)) + return "availableTickets: array expected"; + for (let i = 0; i < message.availableTickets.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.availableTickets[i]); + if (error) + return "availableTickets." + error; + } + } + return null; + }; + + /** + * Creates a LoadDriveInformationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadDriveInformationResponse} LoadDriveInformationResponse + */ + LoadDriveInformationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadDriveInformationResponse) + return object; + let message = new $root.wm.protobuf.LoadDriveInformationResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.noticeWindow) { + if (!Array.isArray(object.noticeWindow)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.noticeWindow: array expected"); + message.noticeWindow = []; + for (let i = 0; i < object.noticeWindow.length; ++i) + switch (object.noticeWindow[i]) { + default: + case "NOTICE_UNUSED_1": + case 1: + message.noticeWindow[i] = 1; + break; + case "NOTICE_UNUSED_2": + case 2: + message.noticeWindow[i] = 2; + break; + case "NOTICE_UNUSED_3": + case 3: + message.noticeWindow[i] = 3; + break; + case "NOTICE_UNUSED_4": + case 4: + message.noticeWindow[i] = 4; + break; + case "NOTICE_UNUSED_5": + case 5: + message.noticeWindow[i] = 5; + break; + case "NOTICE_UNUSED_6": + case 6: + message.noticeWindow[i] = 6; + break; + case "NOTICE_UNUSED_7": + case 7: + message.noticeWindow[i] = 7; + break; + case "NOTICE_UNUSED_8": + case 8: + message.noticeWindow[i] = 8; + break; + case "NOTICE_UNUSED_9": + case 9: + message.noticeWindow[i] = 9; + break; + case "NOTICE_UNUSED_10": + case 10: + message.noticeWindow[i] = 10; + break; + case "NOTICE_UNUSED_11": + case 11: + message.noticeWindow[i] = 11; + break; + case "NOTICE_UNUSED_12": + case 12: + message.noticeWindow[i] = 12; + break; + } + } + if (object.noticeWindowMessage) { + if (!Array.isArray(object.noticeWindowMessage)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.noticeWindowMessage: array expected"); + message.noticeWindowMessage = []; + for (let i = 0; i < object.noticeWindowMessage.length; ++i) + message.noticeWindowMessage[i] = String(object.noticeWindowMessage[i]); + } + if (object.transferNotice != null) { + if (typeof object.transferNotice !== "object") + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.transferNotice: object expected"); + message.transferNotice = $root.wm.protobuf.TransferNotice.fromObject(object.transferNotice); + } + if (object.restrictedModels) { + if (!Array.isArray(object.restrictedModels)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.restrictedModels: array expected"); + message.restrictedModels = []; + for (let i = 0; i < object.restrictedModels.length; ++i) + message.restrictedModels[i] = object.restrictedModels[i] >>> 0; + } + if (object.announceFeature != null) + message.announceFeature = Boolean(object.announceFeature); + if (object.announceMobile != null) + message.announceMobile = Boolean(object.announceMobile); + if (object.availableTickets) { + if (!Array.isArray(object.availableTickets)) + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.availableTickets: array expected"); + message.availableTickets = []; + for (let i = 0; i < object.availableTickets.length; ++i) { + if (typeof object.availableTickets[i] !== "object") + throw TypeError(".wm.protobuf.LoadDriveInformationResponse.availableTickets: object expected"); + message.availableTickets[i] = $root.wm.protobuf.UserItem.fromObject(object.availableTickets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadDriveInformationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {wm.protobuf.LoadDriveInformationResponse} message LoadDriveInformationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadDriveInformationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.noticeWindow = []; + object.noticeWindowMessage = []; + object.restrictedModels = []; + object.availableTickets = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.transferNotice = null; + object.announceFeature = false; + object.announceMobile = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.noticeWindow && message.noticeWindow.length) { + object.noticeWindow = []; + for (let j = 0; j < message.noticeWindow.length; ++j) + object.noticeWindow[j] = options.enums === String ? $root.wm.protobuf.NoticeEntry[message.noticeWindow[j]] : message.noticeWindow[j]; + } + if (message.noticeWindowMessage && message.noticeWindowMessage.length) { + object.noticeWindowMessage = []; + for (let j = 0; j < message.noticeWindowMessage.length; ++j) + object.noticeWindowMessage[j] = message.noticeWindowMessage[j]; + } + if (message.transferNotice != null && message.hasOwnProperty("transferNotice")) + object.transferNotice = $root.wm.protobuf.TransferNotice.toObject(message.transferNotice, options); + if (message.restrictedModels && message.restrictedModels.length) { + object.restrictedModels = []; + for (let j = 0; j < message.restrictedModels.length; ++j) + object.restrictedModels[j] = message.restrictedModels[j]; + } + if (message.announceFeature != null && message.hasOwnProperty("announceFeature")) + object.announceFeature = message.announceFeature; + if (message.announceMobile != null && message.hasOwnProperty("announceMobile")) + object.announceMobile = message.announceMobile; + if (message.availableTickets && message.availableTickets.length) { + object.availableTickets = []; + for (let j = 0; j < message.availableTickets.length; ++j) + object.availableTickets[j] = $root.wm.protobuf.UserItem.toObject(message.availableTickets[j], options); + } + return object; + }; + + /** + * Converts this LoadDriveInformationResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadDriveInformationResponse + * @instance + * @returns {Object.} JSON object + */ + LoadDriveInformationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadDriveInformationResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadDriveInformationResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadDriveInformationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadDriveInformationResponse"; + }; + + return LoadDriveInformationResponse; + })(); + + protobuf.LoadCarRequest = (function() { + + /** + * Properties of a LoadCarRequest. + * @memberof wm.protobuf + * @interface ILoadCarRequest + * @property {number} carId LoadCarRequest carId + * @property {boolean|null} [eventMode] LoadCarRequest eventMode + * @property {string|null} [eventModeSerial] LoadCarRequest eventModeSerial + */ + + /** + * Constructs a new LoadCarRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadCarRequest. + * @implements ILoadCarRequest + * @constructor + * @param {wm.protobuf.ILoadCarRequest=} [properties] Properties to set + */ + function LoadCarRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadCarRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadCarRequest + * @instance + */ + LoadCarRequest.prototype.carId = 0; + + /** + * LoadCarRequest eventMode. + * @member {boolean} eventMode + * @memberof wm.protobuf.LoadCarRequest + * @instance + */ + LoadCarRequest.prototype.eventMode = false; + + /** + * LoadCarRequest eventModeSerial. + * @member {string} eventModeSerial + * @memberof wm.protobuf.LoadCarRequest + * @instance + */ + LoadCarRequest.prototype.eventModeSerial = ""; + + /** + * Creates a new LoadCarRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.ILoadCarRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest instance + */ + LoadCarRequest.create = function create(properties) { + return new LoadCarRequest(properties); + }; + + /** + * Encodes the specified LoadCarRequest message. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.ILoadCarRequest} message LoadCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.eventMode != null && Object.hasOwnProperty.call(message, "eventMode")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.eventMode); + if (message.eventModeSerial != null && Object.hasOwnProperty.call(message, "eventModeSerial")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.eventModeSerial); + return writer; + }; + + /** + * Encodes the specified LoadCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.ILoadCarRequest} message LoadCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadCarRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.eventMode = reader.bool(); + break; + } + case 3: { + message.eventModeSerial = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadCarRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadCarRequest message. + * @function verify + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadCarRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.eventMode != null && message.hasOwnProperty("eventMode")) + if (typeof message.eventMode !== "boolean") + return "eventMode: boolean expected"; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + if (!$util.isString(message.eventModeSerial)) + return "eventModeSerial: string expected"; + return null; + }; + + /** + * Creates a LoadCarRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadCarRequest} LoadCarRequest + */ + LoadCarRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadCarRequest) + return object; + let message = new $root.wm.protobuf.LoadCarRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.eventMode != null) + message.eventMode = Boolean(object.eventMode); + if (object.eventModeSerial != null) + message.eventModeSerial = String(object.eventModeSerial); + return message; + }; + + /** + * Creates a plain object from a LoadCarRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {wm.protobuf.LoadCarRequest} message LoadCarRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadCarRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.eventMode = false; + object.eventModeSerial = ""; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.eventMode != null && message.hasOwnProperty("eventMode")) + object.eventMode = message.eventMode; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + object.eventModeSerial = message.eventModeSerial; + return object; + }; + + /** + * Converts this LoadCarRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadCarRequest + * @instance + * @returns {Object.} JSON object + */ + LoadCarRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadCarRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadCarRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadCarRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadCarRequest"; + }; + + return LoadCarRequest; + })(); + + protobuf.LoadCarResponse = (function() { + + /** + * Properties of a LoadCarResponse. + * @memberof wm.protobuf + * @interface ILoadCarResponse + * @property {wm.protobuf.ErrorCode} error LoadCarResponse error + * @property {wm.protobuf.ICar} car LoadCarResponse car + * @property {number} tuningPoint LoadCarResponse tuningPoint + * @property {number} odometer LoadCarResponse odometer + * @property {number} playCount LoadCarResponse playCount + * @property {boolean} earnedCustomColor LoadCarResponse earnedCustomColor + * @property {wm.protobuf.ICarSetting} setting LoadCarResponse setting + * @property {number} vsPlayCount LoadCarResponse vsPlayCount + * @property {number} vsBurstCount LoadCarResponse vsBurstCount + * @property {number} vsStarCount LoadCarResponse vsStarCount + * @property {number} vsStarCountMax LoadCarResponse vsStarCountMax + * @property {number} vsCoolOrWild LoadCarResponse vsCoolOrWild + * @property {number} vsSmoothOrRough LoadCarResponse vsSmoothOrRough + * @property {number} vsTripleStarMedals LoadCarResponse vsTripleStarMedals + * @property {number} vsDoubleStarMedals LoadCarResponse vsDoubleStarMedals + * @property {number} vsSingleStarMedals LoadCarResponse vsSingleStarMedals + * @property {number} vsPlainMedals LoadCarResponse vsPlainMedals + * @property {number} rgPlayCount LoadCarResponse rgPlayCount + * @property {number} rgWinCount LoadCarResponse rgWinCount + * @property {number} rgTrophy LoadCarResponse rgTrophy + * @property {number} rgPreviousVersionPlayCount LoadCarResponse rgPreviousVersionPlayCount + * @property {number} rgScore LoadCarResponse rgScore + * @property {Array.|null} [rgRegionMapScore] LoadCarResponse rgRegionMapScore + * @property {Array.|null} [rgRegions] LoadCarResponse rgRegions + * @property {number} rgStamp LoadCarResponse rgStamp + * @property {boolean} rgAcquireAllCrowns LoadCarResponse rgAcquireAllCrowns + * @property {number} dressupLevel LoadCarResponse dressupLevel + * @property {number} dressupPoint LoadCarResponse dressupPoint + * @property {number} stPlayCount LoadCarResponse stPlayCount + * @property {number} stClearBits LoadCarResponse stClearBits + * @property {number} stClearDivCount LoadCarResponse stClearDivCount + * @property {number} stClearCount LoadCarResponse stClearCount + * @property {number|Long} stLoseBits LoadCarResponse stLoseBits + * @property {number} stConsecutiveWins LoadCarResponse stConsecutiveWins + * @property {number} stConsecutiveWinsMax LoadCarResponse stConsecutiveWinsMax + * @property {boolean} stCompleted_100Episodes LoadCarResponse stCompleted_100Episodes + * @property {wm.protobuf.IChallengerCar|null} [challenger] LoadCarResponse challenger + * @property {number|null} [challengerReturnCount] LoadCarResponse challengerReturnCount + * @property {number|null} [numOfChallengers] LoadCarResponse numOfChallengers + * @property {wm.protobuf.IGhostCar|null} [opponentGhost] LoadCarResponse opponentGhost + * @property {number|Long|null} [opponentTrailId] LoadCarResponse opponentTrailId + * @property {number|null} [opponentCompetitionId] LoadCarResponse opponentCompetitionId + * @property {wm.protobuf.IGhostCompetitionParameter|null} [competitionParameter] LoadCarResponse competitionParameter + * @property {Array.|null} [specialTitles] LoadCarResponse specialTitles + * @property {Array.|null} [earnedTitles] LoadCarResponse earnedTitles + * @property {Array.|null} [ownedItems] LoadCarResponse ownedItems + * @property {boolean} auraMotifAutoChange LoadCarResponse auraMotifAutoChange + * @property {number} screenshotCount LoadCarResponse screenshotCount + * @property {boolean|null} [announceEventModePrize] LoadCarResponse announceEventModePrize + * @property {boolean} transferred LoadCarResponse transferred + * @property {number|null} [driveLastPlayedAt] LoadCarResponse driveLastPlayedAt + * @property {wm.protobuf.LoadCarResponse.IStoryInsurance|null} [insurance] LoadCarResponse insurance + */ + + /** + * Constructs a new LoadCarResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadCarResponse. + * @implements ILoadCarResponse + * @constructor + * @param {wm.protobuf.ILoadCarResponse=} [properties] Properties to set + */ + function LoadCarResponse(properties) { + this.rgRegionMapScore = []; + this.rgRegions = []; + this.specialTitles = []; + this.earnedTitles = []; + this.ownedItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadCarResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.error = 0; + + /** + * LoadCarResponse car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.car = null; + + /** + * LoadCarResponse tuningPoint. + * @member {number} tuningPoint + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.tuningPoint = 0; + + /** + * LoadCarResponse odometer. + * @member {number} odometer + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.odometer = 0; + + /** + * LoadCarResponse playCount. + * @member {number} playCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.playCount = 0; + + /** + * LoadCarResponse earnedCustomColor. + * @member {boolean} earnedCustomColor + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.earnedCustomColor = false; + + /** + * LoadCarResponse setting. + * @member {wm.protobuf.ICarSetting} setting + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.setting = null; + + /** + * LoadCarResponse vsPlayCount. + * @member {number} vsPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsPlayCount = 0; + + /** + * LoadCarResponse vsBurstCount. + * @member {number} vsBurstCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsBurstCount = 0; + + /** + * LoadCarResponse vsStarCount. + * @member {number} vsStarCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsStarCount = 0; + + /** + * LoadCarResponse vsStarCountMax. + * @member {number} vsStarCountMax + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsStarCountMax = 0; + + /** + * LoadCarResponse vsCoolOrWild. + * @member {number} vsCoolOrWild + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsCoolOrWild = 0; + + /** + * LoadCarResponse vsSmoothOrRough. + * @member {number} vsSmoothOrRough + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsSmoothOrRough = 0; + + /** + * LoadCarResponse vsTripleStarMedals. + * @member {number} vsTripleStarMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsTripleStarMedals = 0; + + /** + * LoadCarResponse vsDoubleStarMedals. + * @member {number} vsDoubleStarMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsDoubleStarMedals = 0; + + /** + * LoadCarResponse vsSingleStarMedals. + * @member {number} vsSingleStarMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsSingleStarMedals = 0; + + /** + * LoadCarResponse vsPlainMedals. + * @member {number} vsPlainMedals + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.vsPlainMedals = 0; + + /** + * LoadCarResponse rgPlayCount. + * @member {number} rgPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgPlayCount = 0; + + /** + * LoadCarResponse rgWinCount. + * @member {number} rgWinCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgWinCount = 0; + + /** + * LoadCarResponse rgTrophy. + * @member {number} rgTrophy + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgTrophy = 0; + + /** + * LoadCarResponse rgPreviousVersionPlayCount. + * @member {number} rgPreviousVersionPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgPreviousVersionPlayCount = 0; + + /** + * LoadCarResponse rgScore. + * @member {number} rgScore + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgScore = 0; + + /** + * LoadCarResponse rgRegionMapScore. + * @member {Array.} rgRegionMapScore + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgRegionMapScore = $util.emptyArray; + + /** + * LoadCarResponse rgRegions. + * @member {Array.} rgRegions + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgRegions = $util.emptyArray; + + /** + * LoadCarResponse rgStamp. + * @member {number} rgStamp + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgStamp = 0; + + /** + * LoadCarResponse rgAcquireAllCrowns. + * @member {boolean} rgAcquireAllCrowns + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.rgAcquireAllCrowns = false; + + /** + * LoadCarResponse dressupLevel. + * @member {number} dressupLevel + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.dressupLevel = 0; + + /** + * LoadCarResponse dressupPoint. + * @member {number} dressupPoint + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.dressupPoint = 0; + + /** + * LoadCarResponse stPlayCount. + * @member {number} stPlayCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stPlayCount = 0; + + /** + * LoadCarResponse stClearBits. + * @member {number} stClearBits + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stClearBits = 0; + + /** + * LoadCarResponse stClearDivCount. + * @member {number} stClearDivCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stClearDivCount = 0; + + /** + * LoadCarResponse stClearCount. + * @member {number} stClearCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stClearCount = 0; + + /** + * LoadCarResponse stLoseBits. + * @member {number|Long} stLoseBits + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stLoseBits = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * LoadCarResponse stConsecutiveWins. + * @member {number} stConsecutiveWins + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stConsecutiveWins = 0; + + /** + * LoadCarResponse stConsecutiveWinsMax. + * @member {number} stConsecutiveWinsMax + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stConsecutiveWinsMax = 0; + + /** + * LoadCarResponse stCompleted_100Episodes. + * @member {boolean} stCompleted_100Episodes + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.stCompleted_100Episodes = false; + + /** + * LoadCarResponse challenger. + * @member {wm.protobuf.IChallengerCar|null|undefined} challenger + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.challenger = null; + + /** + * LoadCarResponse challengerReturnCount. + * @member {number} challengerReturnCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.challengerReturnCount = 0; + + /** + * LoadCarResponse numOfChallengers. + * @member {number} numOfChallengers + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.numOfChallengers = 0; + + /** + * LoadCarResponse opponentGhost. + * @member {wm.protobuf.IGhostCar|null|undefined} opponentGhost + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.opponentGhost = null; + + /** + * LoadCarResponse opponentTrailId. + * @member {number|Long} opponentTrailId + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.opponentTrailId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * LoadCarResponse opponentCompetitionId. + * @member {number} opponentCompetitionId + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.opponentCompetitionId = 0; + + /** + * LoadCarResponse competitionParameter. + * @member {wm.protobuf.IGhostCompetitionParameter|null|undefined} competitionParameter + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.competitionParameter = null; + + /** + * LoadCarResponse specialTitles. + * @member {Array.} specialTitles + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.specialTitles = $util.emptyArray; + + /** + * LoadCarResponse earnedTitles. + * @member {Array.} earnedTitles + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.earnedTitles = $util.emptyArray; + + /** + * LoadCarResponse ownedItems. + * @member {Array.} ownedItems + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.ownedItems = $util.emptyArray; + + /** + * LoadCarResponse auraMotifAutoChange. + * @member {boolean} auraMotifAutoChange + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.auraMotifAutoChange = false; + + /** + * LoadCarResponse screenshotCount. + * @member {number} screenshotCount + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.screenshotCount = 0; + + /** + * LoadCarResponse announceEventModePrize. + * @member {boolean} announceEventModePrize + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.announceEventModePrize = false; + + /** + * LoadCarResponse transferred. + * @member {boolean} transferred + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.transferred = false; + + /** + * LoadCarResponse driveLastPlayedAt. + * @member {number} driveLastPlayedAt + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.driveLastPlayedAt = 0; + + /** + * LoadCarResponse insurance. + * @member {wm.protobuf.LoadCarResponse.IStoryInsurance|null|undefined} insurance + * @memberof wm.protobuf.LoadCarResponse + * @instance + */ + LoadCarResponse.prototype.insurance = null; + + /** + * Creates a new LoadCarResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.ILoadCarResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse instance + */ + LoadCarResponse.create = function create(properties) { + return new LoadCarResponse(properties); + }; + + /** + * Encodes the specified LoadCarResponse message. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.ILoadCarResponse} message LoadCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuningPoint); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.odometer); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.playCount); + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.earnedCustomColor); + $root.wm.protobuf.CarSetting.encode(message.setting, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.vsPlayCount); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.vsBurstCount); + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.vsStarCount); + writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.vsStarCountMax); + writer.uint32(/* id 16, wireType 0 =*/128).sint32(message.vsCoolOrWild); + writer.uint32(/* id 17, wireType 0 =*/136).sint32(message.vsSmoothOrRough); + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.vsTripleStarMedals); + writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.vsDoubleStarMedals); + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.vsSingleStarMedals); + writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.vsPlainMedals); + writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.rgPlayCount); + writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.rgWinCount); + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.rgTrophy); + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.rgScore); + if (message.rgRegionMapScore != null && message.rgRegionMapScore.length) + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.rgRegionMapScore[i]); + writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.rgStamp); + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.dressupLevel); + writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.dressupPoint); + if (message.rgRegions != null && message.rgRegions.length) + for (let i = 0; i < message.rgRegions.length; ++i) + writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.rgRegions[i]); + writer.uint32(/* id 34, wireType 0 =*/272).uint32(message.stPlayCount); + writer.uint32(/* id 35, wireType 0 =*/280).uint32(message.stClearBits); + writer.uint32(/* id 36, wireType 0 =*/288).uint32(message.stClearDivCount); + writer.uint32(/* id 37, wireType 0 =*/296).uint32(message.stClearCount); + writer.uint32(/* id 38, wireType 0 =*/304).uint64(message.stLoseBits); + writer.uint32(/* id 40, wireType 0 =*/320).uint32(message.stConsecutiveWins); + writer.uint32(/* id 41, wireType 0 =*/328).uint32(message.stConsecutiveWinsMax); + if (message.challenger != null && Object.hasOwnProperty.call(message, "challenger")) + $root.wm.protobuf.ChallengerCar.encode(message.challenger, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.challengerReturnCount != null && Object.hasOwnProperty.call(message, "challengerReturnCount")) + writer.uint32(/* id 43, wireType 0 =*/344).uint32(message.challengerReturnCount); + if (message.opponentGhost != null && Object.hasOwnProperty.call(message, "opponentGhost")) + $root.wm.protobuf.GhostCar.encode(message.opponentGhost, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); + if (message.opponentTrailId != null && Object.hasOwnProperty.call(message, "opponentTrailId")) + writer.uint32(/* id 45, wireType 0 =*/360).uint64(message.opponentTrailId); + if (message.opponentCompetitionId != null && Object.hasOwnProperty.call(message, "opponentCompetitionId")) + writer.uint32(/* id 46, wireType 0 =*/368).uint32(message.opponentCompetitionId); + if (message.competitionParameter != null && Object.hasOwnProperty.call(message, "competitionParameter")) + $root.wm.protobuf.GhostCompetitionParameter.encode(message.competitionParameter, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.specialTitles != null && message.specialTitles.length) + for (let i = 0; i < message.specialTitles.length; ++i) + writer.uint32(/* id 48, wireType 2 =*/386).string(message.specialTitles[i]); + if (message.earnedTitles != null && message.earnedTitles.length) + for (let i = 0; i < message.earnedTitles.length; ++i) + writer.uint32(/* id 49, wireType 2 =*/394).string(message.earnedTitles[i]); + if (message.ownedItems != null && message.ownedItems.length) + for (let i = 0; i < message.ownedItems.length; ++i) + $root.wm.protobuf.CarItem.encode(message.ownedItems[i], writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + writer.uint32(/* id 51, wireType 0 =*/408).bool(message.auraMotifAutoChange); + writer.uint32(/* id 53, wireType 0 =*/424).uint32(message.screenshotCount); + if (message.numOfChallengers != null && Object.hasOwnProperty.call(message, "numOfChallengers")) + writer.uint32(/* id 55, wireType 0 =*/440).uint32(message.numOfChallengers); + if (message.announceEventModePrize != null && Object.hasOwnProperty.call(message, "announceEventModePrize")) + writer.uint32(/* id 58, wireType 0 =*/464).bool(message.announceEventModePrize); + writer.uint32(/* id 59, wireType 0 =*/472).bool(message.rgAcquireAllCrowns); + writer.uint32(/* id 60, wireType 0 =*/480).bool(message.transferred); + if (message.driveLastPlayedAt != null && Object.hasOwnProperty.call(message, "driveLastPlayedAt")) + writer.uint32(/* id 61, wireType 0 =*/488).uint32(message.driveLastPlayedAt); + if (message.insurance != null && Object.hasOwnProperty.call(message, "insurance")) + $root.wm.protobuf.LoadCarResponse.StoryInsurance.encode(message.insurance, writer.uint32(/* id 62, wireType 2 =*/498).fork()).ldelim(); + writer.uint32(/* id 63, wireType 0 =*/504).bool(message.stCompleted_100Episodes); + writer.uint32(/* id 64, wireType 0 =*/512).uint32(message.rgPreviousVersionPlayCount); + return writer; + }; + + /** + * Encodes the specified LoadCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.ILoadCarResponse} message LoadCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadCarResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadCarResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 3: { + message.tuningPoint = reader.uint32(); + break; + } + case 6: { + message.odometer = reader.uint32(); + break; + } + case 7: { + message.playCount = reader.uint32(); + break; + } + case 8: { + message.earnedCustomColor = reader.bool(); + break; + } + case 10: { + message.setting = $root.wm.protobuf.CarSetting.decode(reader, reader.uint32()); + break; + } + case 12: { + message.vsPlayCount = reader.uint32(); + break; + } + case 13: { + message.vsBurstCount = reader.uint32(); + break; + } + case 14: { + message.vsStarCount = reader.uint32(); + break; + } + case 15: { + message.vsStarCountMax = reader.uint32(); + break; + } + case 16: { + message.vsCoolOrWild = reader.sint32(); + break; + } + case 17: { + message.vsSmoothOrRough = reader.sint32(); + break; + } + case 18: { + message.vsTripleStarMedals = reader.uint32(); + break; + } + case 19: { + message.vsDoubleStarMedals = reader.uint32(); + break; + } + case 20: { + message.vsSingleStarMedals = reader.uint32(); + break; + } + case 21: { + message.vsPlainMedals = reader.uint32(); + break; + } + case 22: { + message.rgPlayCount = reader.uint32(); + break; + } + case 23: { + message.rgWinCount = reader.uint32(); + break; + } + case 24: { + message.rgTrophy = reader.uint32(); + break; + } + case 64: { + message.rgPreviousVersionPlayCount = reader.uint32(); + break; + } + case 25: { + message.rgScore = reader.uint32(); + break; + } + case 26: { + if (!(message.rgRegionMapScore && message.rgRegionMapScore.length)) + message.rgRegionMapScore = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegionMapScore.push(reader.uint32()); + } else + message.rgRegionMapScore.push(reader.uint32()); + break; + } + case 30: { + if (!(message.rgRegions && message.rgRegions.length)) + message.rgRegions = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegions.push(reader.uint32()); + } else + message.rgRegions.push(reader.uint32()); + break; + } + case 27: { + message.rgStamp = reader.uint32(); + break; + } + case 59: { + message.rgAcquireAllCrowns = reader.bool(); + break; + } + case 28: { + message.dressupLevel = reader.uint32(); + break; + } + case 29: { + message.dressupPoint = reader.uint32(); + break; + } + case 34: { + message.stPlayCount = reader.uint32(); + break; + } + case 35: { + message.stClearBits = reader.uint32(); + break; + } + case 36: { + message.stClearDivCount = reader.uint32(); + break; + } + case 37: { + message.stClearCount = reader.uint32(); + break; + } + case 38: { + message.stLoseBits = reader.uint64(); + break; + } + case 40: { + message.stConsecutiveWins = reader.uint32(); + break; + } + case 41: { + message.stConsecutiveWinsMax = reader.uint32(); + break; + } + case 63: { + message.stCompleted_100Episodes = reader.bool(); + break; + } + case 42: { + message.challenger = $root.wm.protobuf.ChallengerCar.decode(reader, reader.uint32()); + break; + } + case 43: { + message.challengerReturnCount = reader.uint32(); + break; + } + case 55: { + message.numOfChallengers = reader.uint32(); + break; + } + case 44: { + message.opponentGhost = $root.wm.protobuf.GhostCar.decode(reader, reader.uint32()); + break; + } + case 45: { + message.opponentTrailId = reader.uint64(); + break; + } + case 46: { + message.opponentCompetitionId = reader.uint32(); + break; + } + case 47: { + message.competitionParameter = $root.wm.protobuf.GhostCompetitionParameter.decode(reader, reader.uint32()); + break; + } + case 48: { + if (!(message.specialTitles && message.specialTitles.length)) + message.specialTitles = []; + message.specialTitles.push(reader.string()); + break; + } + case 49: { + if (!(message.earnedTitles && message.earnedTitles.length)) + message.earnedTitles = []; + message.earnedTitles.push(reader.string()); + break; + } + case 50: { + if (!(message.ownedItems && message.ownedItems.length)) + message.ownedItems = []; + message.ownedItems.push($root.wm.protobuf.CarItem.decode(reader, reader.uint32())); + break; + } + case 51: { + message.auraMotifAutoChange = reader.bool(); + break; + } + case 53: { + message.screenshotCount = reader.uint32(); + break; + } + case 58: { + message.announceEventModePrize = reader.bool(); + break; + } + case 60: { + message.transferred = reader.bool(); + break; + } + case 61: { + message.driveLastPlayedAt = reader.uint32(); + break; + } + case 62: { + message.insurance = $root.wm.protobuf.LoadCarResponse.StoryInsurance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("tuningPoint")) + throw $util.ProtocolError("missing required 'tuningPoint'", { instance: message }); + if (!message.hasOwnProperty("odometer")) + throw $util.ProtocolError("missing required 'odometer'", { instance: message }); + if (!message.hasOwnProperty("playCount")) + throw $util.ProtocolError("missing required 'playCount'", { instance: message }); + if (!message.hasOwnProperty("earnedCustomColor")) + throw $util.ProtocolError("missing required 'earnedCustomColor'", { instance: message }); + if (!message.hasOwnProperty("setting")) + throw $util.ProtocolError("missing required 'setting'", { instance: message }); + if (!message.hasOwnProperty("vsPlayCount")) + throw $util.ProtocolError("missing required 'vsPlayCount'", { instance: message }); + if (!message.hasOwnProperty("vsBurstCount")) + throw $util.ProtocolError("missing required 'vsBurstCount'", { instance: message }); + if (!message.hasOwnProperty("vsStarCount")) + throw $util.ProtocolError("missing required 'vsStarCount'", { instance: message }); + if (!message.hasOwnProperty("vsStarCountMax")) + throw $util.ProtocolError("missing required 'vsStarCountMax'", { instance: message }); + if (!message.hasOwnProperty("vsCoolOrWild")) + throw $util.ProtocolError("missing required 'vsCoolOrWild'", { instance: message }); + if (!message.hasOwnProperty("vsSmoothOrRough")) + throw $util.ProtocolError("missing required 'vsSmoothOrRough'", { instance: message }); + if (!message.hasOwnProperty("vsTripleStarMedals")) + throw $util.ProtocolError("missing required 'vsTripleStarMedals'", { instance: message }); + if (!message.hasOwnProperty("vsDoubleStarMedals")) + throw $util.ProtocolError("missing required 'vsDoubleStarMedals'", { instance: message }); + if (!message.hasOwnProperty("vsSingleStarMedals")) + throw $util.ProtocolError("missing required 'vsSingleStarMedals'", { instance: message }); + if (!message.hasOwnProperty("vsPlainMedals")) + throw $util.ProtocolError("missing required 'vsPlainMedals'", { instance: message }); + if (!message.hasOwnProperty("rgPlayCount")) + throw $util.ProtocolError("missing required 'rgPlayCount'", { instance: message }); + if (!message.hasOwnProperty("rgWinCount")) + throw $util.ProtocolError("missing required 'rgWinCount'", { instance: message }); + if (!message.hasOwnProperty("rgTrophy")) + throw $util.ProtocolError("missing required 'rgTrophy'", { instance: message }); + if (!message.hasOwnProperty("rgPreviousVersionPlayCount")) + throw $util.ProtocolError("missing required 'rgPreviousVersionPlayCount'", { instance: message }); + if (!message.hasOwnProperty("rgScore")) + throw $util.ProtocolError("missing required 'rgScore'", { instance: message }); + if (!message.hasOwnProperty("rgStamp")) + throw $util.ProtocolError("missing required 'rgStamp'", { instance: message }); + if (!message.hasOwnProperty("rgAcquireAllCrowns")) + throw $util.ProtocolError("missing required 'rgAcquireAllCrowns'", { instance: message }); + if (!message.hasOwnProperty("dressupLevel")) + throw $util.ProtocolError("missing required 'dressupLevel'", { instance: message }); + if (!message.hasOwnProperty("dressupPoint")) + throw $util.ProtocolError("missing required 'dressupPoint'", { instance: message }); + if (!message.hasOwnProperty("stPlayCount")) + throw $util.ProtocolError("missing required 'stPlayCount'", { instance: message }); + if (!message.hasOwnProperty("stClearBits")) + throw $util.ProtocolError("missing required 'stClearBits'", { instance: message }); + if (!message.hasOwnProperty("stClearDivCount")) + throw $util.ProtocolError("missing required 'stClearDivCount'", { instance: message }); + if (!message.hasOwnProperty("stClearCount")) + throw $util.ProtocolError("missing required 'stClearCount'", { instance: message }); + if (!message.hasOwnProperty("stLoseBits")) + throw $util.ProtocolError("missing required 'stLoseBits'", { instance: message }); + if (!message.hasOwnProperty("stConsecutiveWins")) + throw $util.ProtocolError("missing required 'stConsecutiveWins'", { instance: message }); + if (!message.hasOwnProperty("stConsecutiveWinsMax")) + throw $util.ProtocolError("missing required 'stConsecutiveWinsMax'", { instance: message }); + if (!message.hasOwnProperty("stCompleted_100Episodes")) + throw $util.ProtocolError("missing required 'stCompleted_100Episodes'", { instance: message }); + if (!message.hasOwnProperty("auraMotifAutoChange")) + throw $util.ProtocolError("missing required 'auraMotifAutoChange'", { instance: message }); + if (!message.hasOwnProperty("screenshotCount")) + throw $util.ProtocolError("missing required 'screenshotCount'", { instance: message }); + if (!message.hasOwnProperty("transferred")) + throw $util.ProtocolError("missing required 'transferred'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadCarResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadCarResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadCarResponse message. + * @function verify + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadCarResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.tuningPoint)) + return "tuningPoint: integer expected"; + if (!$util.isInteger(message.odometer)) + return "odometer: integer expected"; + if (!$util.isInteger(message.playCount)) + return "playCount: integer expected"; + if (typeof message.earnedCustomColor !== "boolean") + return "earnedCustomColor: boolean expected"; + { + let error = $root.wm.protobuf.CarSetting.verify(message.setting); + if (error) + return "setting." + error; + } + if (!$util.isInteger(message.vsPlayCount)) + return "vsPlayCount: integer expected"; + if (!$util.isInteger(message.vsBurstCount)) + return "vsBurstCount: integer expected"; + if (!$util.isInteger(message.vsStarCount)) + return "vsStarCount: integer expected"; + if (!$util.isInteger(message.vsStarCountMax)) + return "vsStarCountMax: integer expected"; + if (!$util.isInteger(message.vsCoolOrWild)) + return "vsCoolOrWild: integer expected"; + if (!$util.isInteger(message.vsSmoothOrRough)) + return "vsSmoothOrRough: integer expected"; + if (!$util.isInteger(message.vsTripleStarMedals)) + return "vsTripleStarMedals: integer expected"; + if (!$util.isInteger(message.vsDoubleStarMedals)) + return "vsDoubleStarMedals: integer expected"; + if (!$util.isInteger(message.vsSingleStarMedals)) + return "vsSingleStarMedals: integer expected"; + if (!$util.isInteger(message.vsPlainMedals)) + return "vsPlainMedals: integer expected"; + if (!$util.isInteger(message.rgPlayCount)) + return "rgPlayCount: integer expected"; + if (!$util.isInteger(message.rgWinCount)) + return "rgWinCount: integer expected"; + if (!$util.isInteger(message.rgTrophy)) + return "rgTrophy: integer expected"; + if (!$util.isInteger(message.rgPreviousVersionPlayCount)) + return "rgPreviousVersionPlayCount: integer expected"; + if (!$util.isInteger(message.rgScore)) + return "rgScore: integer expected"; + if (message.rgRegionMapScore != null && message.hasOwnProperty("rgRegionMapScore")) { + if (!Array.isArray(message.rgRegionMapScore)) + return "rgRegionMapScore: array expected"; + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + if (!$util.isInteger(message.rgRegionMapScore[i])) + return "rgRegionMapScore: integer[] expected"; + } + if (message.rgRegions != null && message.hasOwnProperty("rgRegions")) { + if (!Array.isArray(message.rgRegions)) + return "rgRegions: array expected"; + for (let i = 0; i < message.rgRegions.length; ++i) + if (!$util.isInteger(message.rgRegions[i])) + return "rgRegions: integer[] expected"; + } + if (!$util.isInteger(message.rgStamp)) + return "rgStamp: integer expected"; + if (typeof message.rgAcquireAllCrowns !== "boolean") + return "rgAcquireAllCrowns: boolean expected"; + if (!$util.isInteger(message.dressupLevel)) + return "dressupLevel: integer expected"; + if (!$util.isInteger(message.dressupPoint)) + return "dressupPoint: integer expected"; + if (!$util.isInteger(message.stPlayCount)) + return "stPlayCount: integer expected"; + if (!$util.isInteger(message.stClearBits)) + return "stClearBits: integer expected"; + if (!$util.isInteger(message.stClearDivCount)) + return "stClearDivCount: integer expected"; + if (!$util.isInteger(message.stClearCount)) + return "stClearCount: integer expected"; + if (!$util.isInteger(message.stLoseBits) && !(message.stLoseBits && $util.isInteger(message.stLoseBits.low) && $util.isInteger(message.stLoseBits.high))) + return "stLoseBits: integer|Long expected"; + if (!$util.isInteger(message.stConsecutiveWins)) + return "stConsecutiveWins: integer expected"; + if (!$util.isInteger(message.stConsecutiveWinsMax)) + return "stConsecutiveWinsMax: integer expected"; + if (typeof message.stCompleted_100Episodes !== "boolean") + return "stCompleted_100Episodes: boolean expected"; + if (message.challenger != null && message.hasOwnProperty("challenger")) { + let error = $root.wm.protobuf.ChallengerCar.verify(message.challenger); + if (error) + return "challenger." + error; + } + if (message.challengerReturnCount != null && message.hasOwnProperty("challengerReturnCount")) + if (!$util.isInteger(message.challengerReturnCount)) + return "challengerReturnCount: integer expected"; + if (message.numOfChallengers != null && message.hasOwnProperty("numOfChallengers")) + if (!$util.isInteger(message.numOfChallengers)) + return "numOfChallengers: integer expected"; + if (message.opponentGhost != null && message.hasOwnProperty("opponentGhost")) { + let error = $root.wm.protobuf.GhostCar.verify(message.opponentGhost); + if (error) + return "opponentGhost." + error; + } + if (message.opponentTrailId != null && message.hasOwnProperty("opponentTrailId")) + if (!$util.isInteger(message.opponentTrailId) && !(message.opponentTrailId && $util.isInteger(message.opponentTrailId.low) && $util.isInteger(message.opponentTrailId.high))) + return "opponentTrailId: integer|Long expected"; + if (message.opponentCompetitionId != null && message.hasOwnProperty("opponentCompetitionId")) + if (!$util.isInteger(message.opponentCompetitionId)) + return "opponentCompetitionId: integer expected"; + if (message.competitionParameter != null && message.hasOwnProperty("competitionParameter")) { + let error = $root.wm.protobuf.GhostCompetitionParameter.verify(message.competitionParameter); + if (error) + return "competitionParameter." + error; + } + if (message.specialTitles != null && message.hasOwnProperty("specialTitles")) { + if (!Array.isArray(message.specialTitles)) + return "specialTitles: array expected"; + for (let i = 0; i < message.specialTitles.length; ++i) + if (!$util.isString(message.specialTitles[i])) + return "specialTitles: string[] expected"; + } + if (message.earnedTitles != null && message.hasOwnProperty("earnedTitles")) { + if (!Array.isArray(message.earnedTitles)) + return "earnedTitles: array expected"; + for (let i = 0; i < message.earnedTitles.length; ++i) + if (!$util.isString(message.earnedTitles[i])) + return "earnedTitles: string[] expected"; + } + if (message.ownedItems != null && message.hasOwnProperty("ownedItems")) { + if (!Array.isArray(message.ownedItems)) + return "ownedItems: array expected"; + for (let i = 0; i < message.ownedItems.length; ++i) { + let error = $root.wm.protobuf.CarItem.verify(message.ownedItems[i]); + if (error) + return "ownedItems." + error; + } + } + if (typeof message.auraMotifAutoChange !== "boolean") + return "auraMotifAutoChange: boolean expected"; + if (!$util.isInteger(message.screenshotCount)) + return "screenshotCount: integer expected"; + if (message.announceEventModePrize != null && message.hasOwnProperty("announceEventModePrize")) + if (typeof message.announceEventModePrize !== "boolean") + return "announceEventModePrize: boolean expected"; + if (typeof message.transferred !== "boolean") + return "transferred: boolean expected"; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + if (!$util.isInteger(message.driveLastPlayedAt)) + return "driveLastPlayedAt: integer expected"; + if (message.insurance != null && message.hasOwnProperty("insurance")) { + let error = $root.wm.protobuf.LoadCarResponse.StoryInsurance.verify(message.insurance); + if (error) + return "insurance." + error; + } + return null; + }; + + /** + * Creates a LoadCarResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadCarResponse} LoadCarResponse + */ + LoadCarResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadCarResponse) + return object; + let message = new $root.wm.protobuf.LoadCarResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.tuningPoint != null) + message.tuningPoint = object.tuningPoint >>> 0; + if (object.odometer != null) + message.odometer = object.odometer >>> 0; + if (object.playCount != null) + message.playCount = object.playCount >>> 0; + if (object.earnedCustomColor != null) + message.earnedCustomColor = Boolean(object.earnedCustomColor); + if (object.setting != null) { + if (typeof object.setting !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.setting: object expected"); + message.setting = $root.wm.protobuf.CarSetting.fromObject(object.setting); + } + if (object.vsPlayCount != null) + message.vsPlayCount = object.vsPlayCount >>> 0; + if (object.vsBurstCount != null) + message.vsBurstCount = object.vsBurstCount >>> 0; + if (object.vsStarCount != null) + message.vsStarCount = object.vsStarCount >>> 0; + if (object.vsStarCountMax != null) + message.vsStarCountMax = object.vsStarCountMax >>> 0; + if (object.vsCoolOrWild != null) + message.vsCoolOrWild = object.vsCoolOrWild | 0; + if (object.vsSmoothOrRough != null) + message.vsSmoothOrRough = object.vsSmoothOrRough | 0; + if (object.vsTripleStarMedals != null) + message.vsTripleStarMedals = object.vsTripleStarMedals >>> 0; + if (object.vsDoubleStarMedals != null) + message.vsDoubleStarMedals = object.vsDoubleStarMedals >>> 0; + if (object.vsSingleStarMedals != null) + message.vsSingleStarMedals = object.vsSingleStarMedals >>> 0; + if (object.vsPlainMedals != null) + message.vsPlainMedals = object.vsPlainMedals >>> 0; + if (object.rgPlayCount != null) + message.rgPlayCount = object.rgPlayCount >>> 0; + if (object.rgWinCount != null) + message.rgWinCount = object.rgWinCount >>> 0; + if (object.rgTrophy != null) + message.rgTrophy = object.rgTrophy >>> 0; + if (object.rgPreviousVersionPlayCount != null) + message.rgPreviousVersionPlayCount = object.rgPreviousVersionPlayCount >>> 0; + if (object.rgScore != null) + message.rgScore = object.rgScore >>> 0; + if (object.rgRegionMapScore) { + if (!Array.isArray(object.rgRegionMapScore)) + throw TypeError(".wm.protobuf.LoadCarResponse.rgRegionMapScore: array expected"); + message.rgRegionMapScore = []; + for (let i = 0; i < object.rgRegionMapScore.length; ++i) + message.rgRegionMapScore[i] = object.rgRegionMapScore[i] >>> 0; + } + if (object.rgRegions) { + if (!Array.isArray(object.rgRegions)) + throw TypeError(".wm.protobuf.LoadCarResponse.rgRegions: array expected"); + message.rgRegions = []; + for (let i = 0; i < object.rgRegions.length; ++i) + message.rgRegions[i] = object.rgRegions[i] >>> 0; + } + if (object.rgStamp != null) + message.rgStamp = object.rgStamp >>> 0; + if (object.rgAcquireAllCrowns != null) + message.rgAcquireAllCrowns = Boolean(object.rgAcquireAllCrowns); + if (object.dressupLevel != null) + message.dressupLevel = object.dressupLevel >>> 0; + if (object.dressupPoint != null) + message.dressupPoint = object.dressupPoint >>> 0; + if (object.stPlayCount != null) + message.stPlayCount = object.stPlayCount >>> 0; + if (object.stClearBits != null) + message.stClearBits = object.stClearBits >>> 0; + if (object.stClearDivCount != null) + message.stClearDivCount = object.stClearDivCount >>> 0; + if (object.stClearCount != null) + message.stClearCount = object.stClearCount >>> 0; + if (object.stLoseBits != null) + if ($util.Long) + (message.stLoseBits = $util.Long.fromValue(object.stLoseBits)).unsigned = true; + else if (typeof object.stLoseBits === "string") + message.stLoseBits = parseInt(object.stLoseBits, 10); + else if (typeof object.stLoseBits === "number") + message.stLoseBits = object.stLoseBits; + else if (typeof object.stLoseBits === "object") + message.stLoseBits = new $util.LongBits(object.stLoseBits.low >>> 0, object.stLoseBits.high >>> 0).toNumber(true); + if (object.stConsecutiveWins != null) + message.stConsecutiveWins = object.stConsecutiveWins >>> 0; + if (object.stConsecutiveWinsMax != null) + message.stConsecutiveWinsMax = object.stConsecutiveWinsMax >>> 0; + if (object.stCompleted_100Episodes != null) + message.stCompleted_100Episodes = Boolean(object.stCompleted_100Episodes); + if (object.challenger != null) { + if (typeof object.challenger !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.challenger: object expected"); + message.challenger = $root.wm.protobuf.ChallengerCar.fromObject(object.challenger); + } + if (object.challengerReturnCount != null) + message.challengerReturnCount = object.challengerReturnCount >>> 0; + if (object.numOfChallengers != null) + message.numOfChallengers = object.numOfChallengers >>> 0; + if (object.opponentGhost != null) { + if (typeof object.opponentGhost !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.opponentGhost: object expected"); + message.opponentGhost = $root.wm.protobuf.GhostCar.fromObject(object.opponentGhost); + } + if (object.opponentTrailId != null) + if ($util.Long) + (message.opponentTrailId = $util.Long.fromValue(object.opponentTrailId)).unsigned = true; + else if (typeof object.opponentTrailId === "string") + message.opponentTrailId = parseInt(object.opponentTrailId, 10); + else if (typeof object.opponentTrailId === "number") + message.opponentTrailId = object.opponentTrailId; + else if (typeof object.opponentTrailId === "object") + message.opponentTrailId = new $util.LongBits(object.opponentTrailId.low >>> 0, object.opponentTrailId.high >>> 0).toNumber(true); + if (object.opponentCompetitionId != null) + message.opponentCompetitionId = object.opponentCompetitionId >>> 0; + if (object.competitionParameter != null) { + if (typeof object.competitionParameter !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.competitionParameter: object expected"); + message.competitionParameter = $root.wm.protobuf.GhostCompetitionParameter.fromObject(object.competitionParameter); + } + if (object.specialTitles) { + if (!Array.isArray(object.specialTitles)) + throw TypeError(".wm.protobuf.LoadCarResponse.specialTitles: array expected"); + message.specialTitles = []; + for (let i = 0; i < object.specialTitles.length; ++i) + message.specialTitles[i] = String(object.specialTitles[i]); + } + if (object.earnedTitles) { + if (!Array.isArray(object.earnedTitles)) + throw TypeError(".wm.protobuf.LoadCarResponse.earnedTitles: array expected"); + message.earnedTitles = []; + for (let i = 0; i < object.earnedTitles.length; ++i) + message.earnedTitles[i] = String(object.earnedTitles[i]); + } + if (object.ownedItems) { + if (!Array.isArray(object.ownedItems)) + throw TypeError(".wm.protobuf.LoadCarResponse.ownedItems: array expected"); + message.ownedItems = []; + for (let i = 0; i < object.ownedItems.length; ++i) { + if (typeof object.ownedItems[i] !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.ownedItems: object expected"); + message.ownedItems[i] = $root.wm.protobuf.CarItem.fromObject(object.ownedItems[i]); + } + } + if (object.auraMotifAutoChange != null) + message.auraMotifAutoChange = Boolean(object.auraMotifAutoChange); + if (object.screenshotCount != null) + message.screenshotCount = object.screenshotCount >>> 0; + if (object.announceEventModePrize != null) + message.announceEventModePrize = Boolean(object.announceEventModePrize); + if (object.transferred != null) + message.transferred = Boolean(object.transferred); + if (object.driveLastPlayedAt != null) + message.driveLastPlayedAt = object.driveLastPlayedAt >>> 0; + if (object.insurance != null) { + if (typeof object.insurance !== "object") + throw TypeError(".wm.protobuf.LoadCarResponse.insurance: object expected"); + message.insurance = $root.wm.protobuf.LoadCarResponse.StoryInsurance.fromObject(object.insurance); + } + return message; + }; + + /** + * Creates a plain object from a LoadCarResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {wm.protobuf.LoadCarResponse} message LoadCarResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadCarResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.rgRegionMapScore = []; + object.rgRegions = []; + object.specialTitles = []; + object.earnedTitles = []; + object.ownedItems = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.car = null; + object.tuningPoint = 0; + object.odometer = 0; + object.playCount = 0; + object.earnedCustomColor = false; + object.setting = null; + object.vsPlayCount = 0; + object.vsBurstCount = 0; + object.vsStarCount = 0; + object.vsStarCountMax = 0; + object.vsCoolOrWild = 0; + object.vsSmoothOrRough = 0; + object.vsTripleStarMedals = 0; + object.vsDoubleStarMedals = 0; + object.vsSingleStarMedals = 0; + object.vsPlainMedals = 0; + object.rgPlayCount = 0; + object.rgWinCount = 0; + object.rgTrophy = 0; + object.rgScore = 0; + object.rgStamp = 0; + object.dressupLevel = 0; + object.dressupPoint = 0; + object.stPlayCount = 0; + object.stClearBits = 0; + object.stClearDivCount = 0; + object.stClearCount = 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.stLoseBits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.stLoseBits = options.longs === String ? "0" : 0; + object.stConsecutiveWins = 0; + object.stConsecutiveWinsMax = 0; + object.challenger = null; + object.challengerReturnCount = 0; + object.opponentGhost = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.opponentTrailId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.opponentTrailId = options.longs === String ? "0" : 0; + object.opponentCompetitionId = 0; + object.competitionParameter = null; + object.auraMotifAutoChange = false; + object.screenshotCount = 0; + object.numOfChallengers = 0; + object.announceEventModePrize = false; + object.rgAcquireAllCrowns = false; + object.transferred = false; + object.driveLastPlayedAt = 0; + object.insurance = null; + object.stCompleted_100Episodes = false; + object.rgPreviousVersionPlayCount = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.tuningPoint != null && message.hasOwnProperty("tuningPoint")) + object.tuningPoint = message.tuningPoint; + if (message.odometer != null && message.hasOwnProperty("odometer")) + object.odometer = message.odometer; + if (message.playCount != null && message.hasOwnProperty("playCount")) + object.playCount = message.playCount; + if (message.earnedCustomColor != null && message.hasOwnProperty("earnedCustomColor")) + object.earnedCustomColor = message.earnedCustomColor; + if (message.setting != null && message.hasOwnProperty("setting")) + object.setting = $root.wm.protobuf.CarSetting.toObject(message.setting, options); + if (message.vsPlayCount != null && message.hasOwnProperty("vsPlayCount")) + object.vsPlayCount = message.vsPlayCount; + if (message.vsBurstCount != null && message.hasOwnProperty("vsBurstCount")) + object.vsBurstCount = message.vsBurstCount; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + object.vsStarCount = message.vsStarCount; + if (message.vsStarCountMax != null && message.hasOwnProperty("vsStarCountMax")) + object.vsStarCountMax = message.vsStarCountMax; + if (message.vsCoolOrWild != null && message.hasOwnProperty("vsCoolOrWild")) + object.vsCoolOrWild = message.vsCoolOrWild; + if (message.vsSmoothOrRough != null && message.hasOwnProperty("vsSmoothOrRough")) + object.vsSmoothOrRough = message.vsSmoothOrRough; + if (message.vsTripleStarMedals != null && message.hasOwnProperty("vsTripleStarMedals")) + object.vsTripleStarMedals = message.vsTripleStarMedals; + if (message.vsDoubleStarMedals != null && message.hasOwnProperty("vsDoubleStarMedals")) + object.vsDoubleStarMedals = message.vsDoubleStarMedals; + if (message.vsSingleStarMedals != null && message.hasOwnProperty("vsSingleStarMedals")) + object.vsSingleStarMedals = message.vsSingleStarMedals; + if (message.vsPlainMedals != null && message.hasOwnProperty("vsPlainMedals")) + object.vsPlainMedals = message.vsPlainMedals; + if (message.rgPlayCount != null && message.hasOwnProperty("rgPlayCount")) + object.rgPlayCount = message.rgPlayCount; + if (message.rgWinCount != null && message.hasOwnProperty("rgWinCount")) + object.rgWinCount = message.rgWinCount; + if (message.rgTrophy != null && message.hasOwnProperty("rgTrophy")) + object.rgTrophy = message.rgTrophy; + if (message.rgScore != null && message.hasOwnProperty("rgScore")) + object.rgScore = message.rgScore; + if (message.rgRegionMapScore && message.rgRegionMapScore.length) { + object.rgRegionMapScore = []; + for (let j = 0; j < message.rgRegionMapScore.length; ++j) + object.rgRegionMapScore[j] = message.rgRegionMapScore[j]; + } + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + object.rgStamp = message.rgStamp; + if (message.dressupLevel != null && message.hasOwnProperty("dressupLevel")) + object.dressupLevel = message.dressupLevel; + if (message.dressupPoint != null && message.hasOwnProperty("dressupPoint")) + object.dressupPoint = message.dressupPoint; + if (message.rgRegions && message.rgRegions.length) { + object.rgRegions = []; + for (let j = 0; j < message.rgRegions.length; ++j) + object.rgRegions[j] = message.rgRegions[j]; + } + if (message.stPlayCount != null && message.hasOwnProperty("stPlayCount")) + object.stPlayCount = message.stPlayCount; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + object.stClearBits = message.stClearBits; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + object.stClearDivCount = message.stClearDivCount; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + object.stClearCount = message.stClearCount; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (typeof message.stLoseBits === "number") + object.stLoseBits = options.longs === String ? String(message.stLoseBits) : message.stLoseBits; + else + object.stLoseBits = options.longs === String ? $util.Long.prototype.toString.call(message.stLoseBits) : options.longs === Number ? new $util.LongBits(message.stLoseBits.low >>> 0, message.stLoseBits.high >>> 0).toNumber(true) : message.stLoseBits; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + object.stConsecutiveWins = message.stConsecutiveWins; + if (message.stConsecutiveWinsMax != null && message.hasOwnProperty("stConsecutiveWinsMax")) + object.stConsecutiveWinsMax = message.stConsecutiveWinsMax; + if (message.challenger != null && message.hasOwnProperty("challenger")) + object.challenger = $root.wm.protobuf.ChallengerCar.toObject(message.challenger, options); + if (message.challengerReturnCount != null && message.hasOwnProperty("challengerReturnCount")) + object.challengerReturnCount = message.challengerReturnCount; + if (message.opponentGhost != null && message.hasOwnProperty("opponentGhost")) + object.opponentGhost = $root.wm.protobuf.GhostCar.toObject(message.opponentGhost, options); + if (message.opponentTrailId != null && message.hasOwnProperty("opponentTrailId")) + if (typeof message.opponentTrailId === "number") + object.opponentTrailId = options.longs === String ? String(message.opponentTrailId) : message.opponentTrailId; + else + object.opponentTrailId = options.longs === String ? $util.Long.prototype.toString.call(message.opponentTrailId) : options.longs === Number ? new $util.LongBits(message.opponentTrailId.low >>> 0, message.opponentTrailId.high >>> 0).toNumber(true) : message.opponentTrailId; + if (message.opponentCompetitionId != null && message.hasOwnProperty("opponentCompetitionId")) + object.opponentCompetitionId = message.opponentCompetitionId; + if (message.competitionParameter != null && message.hasOwnProperty("competitionParameter")) + object.competitionParameter = $root.wm.protobuf.GhostCompetitionParameter.toObject(message.competitionParameter, options); + if (message.specialTitles && message.specialTitles.length) { + object.specialTitles = []; + for (let j = 0; j < message.specialTitles.length; ++j) + object.specialTitles[j] = message.specialTitles[j]; + } + if (message.earnedTitles && message.earnedTitles.length) { + object.earnedTitles = []; + for (let j = 0; j < message.earnedTitles.length; ++j) + object.earnedTitles[j] = message.earnedTitles[j]; + } + if (message.ownedItems && message.ownedItems.length) { + object.ownedItems = []; + for (let j = 0; j < message.ownedItems.length; ++j) + object.ownedItems[j] = $root.wm.protobuf.CarItem.toObject(message.ownedItems[j], options); + } + if (message.auraMotifAutoChange != null && message.hasOwnProperty("auraMotifAutoChange")) + object.auraMotifAutoChange = message.auraMotifAutoChange; + if (message.screenshotCount != null && message.hasOwnProperty("screenshotCount")) + object.screenshotCount = message.screenshotCount; + if (message.numOfChallengers != null && message.hasOwnProperty("numOfChallengers")) + object.numOfChallengers = message.numOfChallengers; + if (message.announceEventModePrize != null && message.hasOwnProperty("announceEventModePrize")) + object.announceEventModePrize = message.announceEventModePrize; + if (message.rgAcquireAllCrowns != null && message.hasOwnProperty("rgAcquireAllCrowns")) + object.rgAcquireAllCrowns = message.rgAcquireAllCrowns; + if (message.transferred != null && message.hasOwnProperty("transferred")) + object.transferred = message.transferred; + if (message.driveLastPlayedAt != null && message.hasOwnProperty("driveLastPlayedAt")) + object.driveLastPlayedAt = message.driveLastPlayedAt; + if (message.insurance != null && message.hasOwnProperty("insurance")) + object.insurance = $root.wm.protobuf.LoadCarResponse.StoryInsurance.toObject(message.insurance, options); + if (message.stCompleted_100Episodes != null && message.hasOwnProperty("stCompleted_100Episodes")) + object.stCompleted_100Episodes = message.stCompleted_100Episodes; + if (message.rgPreviousVersionPlayCount != null && message.hasOwnProperty("rgPreviousVersionPlayCount")) + object.rgPreviousVersionPlayCount = message.rgPreviousVersionPlayCount; + return object; + }; + + /** + * Converts this LoadCarResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadCarResponse + * @instance + * @returns {Object.} JSON object + */ + LoadCarResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadCarResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadCarResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadCarResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadCarResponse"; + }; + + LoadCarResponse.StoryInsurance = (function() { + + /** + * Properties of a StoryInsurance. + * @memberof wm.protobuf.LoadCarResponse + * @interface IStoryInsurance + * @property {number} numOfRemains StoryInsurance numOfRemains + */ + + /** + * Constructs a new StoryInsurance. + * @memberof wm.protobuf.LoadCarResponse + * @classdesc Represents a StoryInsurance. + * @implements IStoryInsurance + * @constructor + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance=} [properties] Properties to set + */ + function StoryInsurance(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoryInsurance numOfRemains. + * @member {number} numOfRemains + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @instance + */ + StoryInsurance.prototype.numOfRemains = 0; + + /** + * Creates a new StoryInsurance instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance=} [properties] Properties to set + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance instance + */ + StoryInsurance.create = function create(properties) { + return new StoryInsurance(properties); + }; + + /** + * Encodes the specified StoryInsurance message. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance} message StoryInsurance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryInsurance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.numOfRemains); + return writer; + }; + + /** + * Encodes the specified StoryInsurance message, length delimited. Does not implicitly {@link wm.protobuf.LoadCarResponse.StoryInsurance.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.IStoryInsurance} message StoryInsurance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryInsurance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryInsurance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadCarResponse.StoryInsurance(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.numOfRemains = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("numOfRemains")) + throw $util.ProtocolError("missing required 'numOfRemains'", { instance: message }); + return message; + }; + + /** + * Decodes a StoryInsurance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryInsurance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoryInsurance message. + * @function verify + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoryInsurance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.numOfRemains)) + return "numOfRemains: integer expected"; + return null; + }; + + /** + * Creates a StoryInsurance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadCarResponse.StoryInsurance} StoryInsurance + */ + StoryInsurance.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadCarResponse.StoryInsurance) + return object; + let message = new $root.wm.protobuf.LoadCarResponse.StoryInsurance(); + if (object.numOfRemains != null) + message.numOfRemains = object.numOfRemains >>> 0; + return message; + }; + + /** + * Creates a plain object from a StoryInsurance message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {wm.protobuf.LoadCarResponse.StoryInsurance} message StoryInsurance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoryInsurance.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.numOfRemains = 0; + if (message.numOfRemains != null && message.hasOwnProperty("numOfRemains")) + object.numOfRemains = message.numOfRemains; + return object; + }; + + /** + * Converts this StoryInsurance to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @instance + * @returns {Object.} JSON object + */ + StoryInsurance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoryInsurance + * @function getTypeUrl + * @memberof wm.protobuf.LoadCarResponse.StoryInsurance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoryInsurance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadCarResponse.StoryInsurance"; + }; + + return StoryInsurance; + })(); + + return LoadCarResponse; + })(); + + protobuf.CreateCarRequest = (function() { + + /** + * Properties of a CreateCarRequest. + * @memberof wm.protobuf + * @interface ICreateCarRequest + * @property {number|null} [userId] CreateCarRequest userId + * @property {number|null} [banapassportAmId] CreateCarRequest banapassportAmId + * @property {string|null} [cardChipId] CreateCarRequest cardChipId + * @property {string|null} [accessCode] CreateCarRequest accessCode + * @property {number|null} [cardTypeCode] CreateCarRequest cardTypeCode + * @property {number|null} [cardRegionCode] CreateCarRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] CreateCarRequest device + * @property {wm.protobuf.ICar} car CreateCarRequest car + * @property {boolean} transmission CreateCarRequest transmission + * @property {number} timestamp CreateCarRequest timestamp + * @property {number|null} [userItemId] CreateCarRequest userItemId + * @property {number|null} [deletedCarId] CreateCarRequest deletedCarId + */ + + /** + * Constructs a new CreateCarRequest. + * @memberof wm.protobuf + * @classdesc Represents a CreateCarRequest. + * @implements ICreateCarRequest + * @constructor + * @param {wm.protobuf.ICreateCarRequest=} [properties] Properties to set + */ + function CreateCarRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCarRequest userId. + * @member {number} userId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.userId = 0; + + /** + * CreateCarRequest banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.banapassportAmId = 0; + + /** + * CreateCarRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.cardChipId = ""; + + /** + * CreateCarRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.accessCode = ""; + + /** + * CreateCarRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.cardTypeCode = 0; + + /** + * CreateCarRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.cardRegionCode = 0; + + /** + * CreateCarRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.device = 0; + + /** + * CreateCarRequest car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.car = null; + + /** + * CreateCarRequest transmission. + * @member {boolean} transmission + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.transmission = false; + + /** + * CreateCarRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.timestamp = 0; + + /** + * CreateCarRequest userItemId. + * @member {number} userItemId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.userItemId = 0; + + /** + * CreateCarRequest deletedCarId. + * @member {number} deletedCarId + * @memberof wm.protobuf.CreateCarRequest + * @instance + */ + CreateCarRequest.prototype.deletedCarId = 0; + + /** + * Creates a new CreateCarRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.ICreateCarRequest=} [properties] Properties to set + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest instance + */ + CreateCarRequest.create = function create(properties) { + return new CreateCarRequest(properties); + }; + + /** + * Encodes the specified CreateCarRequest message. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.ICreateCarRequest} message CreateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.banapassportAmId); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.device); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.transmission); + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.timestamp); + if (message.userItemId != null && Object.hasOwnProperty.call(message, "userItemId")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.userItemId); + if (message.deletedCarId != null && Object.hasOwnProperty.call(message, "deletedCarId")) + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.deletedCarId); + return writer; + }; + + /** + * Encodes the specified CreateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.ICreateCarRequest} message CreateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateCarRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.banapassportAmId = reader.uint32(); + break; + } + case 3: { + message.cardChipId = reader.string(); + break; + } + case 4: { + message.accessCode = reader.string(); + break; + } + case 5: { + message.cardTypeCode = reader.uint32(); + break; + } + case 6: { + message.cardRegionCode = reader.uint32(); + break; + } + case 7: { + message.device = reader.int32(); + break; + } + case 8: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 9: { + message.transmission = reader.bool(); + break; + } + case 11: { + message.timestamp = reader.uint32(); + break; + } + case 12: { + message.userItemId = reader.uint32(); + break; + } + case 13: { + message.deletedCarId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("transmission")) + throw $util.ProtocolError("missing required 'transmission'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateCarRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCarRequest message. + * @function verify + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCarRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (typeof message.transmission !== "boolean") + return "transmission: boolean expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + if (!$util.isInteger(message.userItemId)) + return "userItemId: integer expected"; + if (message.deletedCarId != null && message.hasOwnProperty("deletedCarId")) + if (!$util.isInteger(message.deletedCarId)) + return "deletedCarId: integer expected"; + return null; + }; + + /** + * Creates a CreateCarRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateCarRequest} CreateCarRequest + */ + CreateCarRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateCarRequest) + return object; + let message = new $root.wm.protobuf.CreateCarRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.CreateCarRequest.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.transmission != null) + message.transmission = Boolean(object.transmission); + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.userItemId != null) + message.userItemId = object.userItemId >>> 0; + if (object.deletedCarId != null) + message.deletedCarId = object.deletedCarId >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateCarRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {wm.protobuf.CreateCarRequest} message CreateCarRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCarRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.banapassportAmId = 0; + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.car = null; + object.transmission = false; + object.timestamp = 0; + object.userItemId = 0; + object.deletedCarId = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.transmission != null && message.hasOwnProperty("transmission")) + object.transmission = message.transmission; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + object.userItemId = message.userItemId; + if (message.deletedCarId != null && message.hasOwnProperty("deletedCarId")) + object.deletedCarId = message.deletedCarId; + return object; + }; + + /** + * Converts this CreateCarRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateCarRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCarRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCarRequest + * @function getTypeUrl + * @memberof wm.protobuf.CreateCarRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCarRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateCarRequest"; + }; + + return CreateCarRequest; + })(); + + protobuf.CreateCarResponse = (function() { + + /** + * Properties of a CreateCarResponse. + * @memberof wm.protobuf + * @interface ICreateCarResponse + * @property {wm.protobuf.ErrorCode} error CreateCarResponse error + * @property {string|null} [accessCode] CreateCarResponse accessCode + * @property {number|null} [banapassportAmId] CreateCarResponse banapassportAmId + * @property {number|null} [mbid] CreateCarResponse mbid + * @property {number} userId CreateCarResponse userId + * @property {number} carId CreateCarResponse carId + * @property {number|null} [stClearBits] CreateCarResponse stClearBits + * @property {number|null} [stClearDivCount] CreateCarResponse stClearDivCount + * @property {number|null} [stClearCount] CreateCarResponse stClearCount + * @property {number|Long|null} [stLoseBits] CreateCarResponse stLoseBits + * @property {number|null} [stConsecutiveWins] CreateCarResponse stConsecutiveWins + * @property {number|null} [stConsecutiveWinsMax] CreateCarResponse stConsecutiveWinsMax + * @property {number|null} [fullTunedCarCouponUnreceivableAt] CreateCarResponse fullTunedCarCouponUnreceivableAt + */ + + /** + * Constructs a new CreateCarResponse. + * @memberof wm.protobuf + * @classdesc Represents a CreateCarResponse. + * @implements ICreateCarResponse + * @constructor + * @param {wm.protobuf.ICreateCarResponse=} [properties] Properties to set + */ + function CreateCarResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCarResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.error = 0; + + /** + * CreateCarResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.accessCode = ""; + + /** + * CreateCarResponse banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.banapassportAmId = 0; + + /** + * CreateCarResponse mbid. + * @member {number} mbid + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.mbid = 0; + + /** + * CreateCarResponse userId. + * @member {number} userId + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.userId = 0; + + /** + * CreateCarResponse carId. + * @member {number} carId + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.carId = 0; + + /** + * CreateCarResponse stClearBits. + * @member {number} stClearBits + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stClearBits = 0; + + /** + * CreateCarResponse stClearDivCount. + * @member {number} stClearDivCount + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stClearDivCount = 0; + + /** + * CreateCarResponse stClearCount. + * @member {number} stClearCount + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stClearCount = 0; + + /** + * CreateCarResponse stLoseBits. + * @member {number|Long} stLoseBits + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stLoseBits = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * CreateCarResponse stConsecutiveWins. + * @member {number} stConsecutiveWins + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stConsecutiveWins = 0; + + /** + * CreateCarResponse stConsecutiveWinsMax. + * @member {number} stConsecutiveWinsMax + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.stConsecutiveWinsMax = 0; + + /** + * CreateCarResponse fullTunedCarCouponUnreceivableAt. + * @member {number} fullTunedCarCouponUnreceivableAt + * @memberof wm.protobuf.CreateCarResponse + * @instance + */ + CreateCarResponse.prototype.fullTunedCarCouponUnreceivableAt = 0; + + /** + * Creates a new CreateCarResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.ICreateCarResponse=} [properties] Properties to set + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse instance + */ + CreateCarResponse.create = function create(properties) { + return new CreateCarResponse(properties); + }; + + /** + * Encodes the specified CreateCarResponse message. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.ICreateCarResponse} message CreateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.banapassportAmId); + if (message.mbid != null && Object.hasOwnProperty.call(message, "mbid")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mbid); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.userId); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.carId); + if (message.stClearBits != null && Object.hasOwnProperty.call(message, "stClearBits")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stClearBits); + if (message.stClearDivCount != null && Object.hasOwnProperty.call(message, "stClearDivCount")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.stClearDivCount); + if (message.stClearCount != null && Object.hasOwnProperty.call(message, "stClearCount")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.stClearCount); + if (message.stLoseBits != null && Object.hasOwnProperty.call(message, "stLoseBits")) + writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.stLoseBits); + if (message.stConsecutiveWins != null && Object.hasOwnProperty.call(message, "stConsecutiveWins")) + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.stConsecutiveWins); + if (message.stConsecutiveWinsMax != null && Object.hasOwnProperty.call(message, "stConsecutiveWinsMax")) + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.stConsecutiveWinsMax); + if (message.fullTunedCarCouponUnreceivableAt != null && Object.hasOwnProperty.call(message, "fullTunedCarCouponUnreceivableAt")) + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.fullTunedCarCouponUnreceivableAt); + return writer; + }; + + /** + * Encodes the specified CreateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateCarResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.ICreateCarResponse} message CreateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCarResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateCarResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + case 3: { + message.banapassportAmId = reader.uint32(); + break; + } + case 4: { + message.mbid = reader.uint32(); + break; + } + case 5: { + message.userId = reader.uint32(); + break; + } + case 6: { + message.carId = reader.uint32(); + break; + } + case 8: { + message.stClearBits = reader.uint32(); + break; + } + case 9: { + message.stClearDivCount = reader.uint32(); + break; + } + case 10: { + message.stClearCount = reader.uint32(); + break; + } + case 11: { + message.stLoseBits = reader.uint64(); + break; + } + case 13: { + message.stConsecutiveWins = reader.uint32(); + break; + } + case 14: { + message.stConsecutiveWinsMax = reader.uint32(); + break; + } + case 17: { + message.fullTunedCarCouponUnreceivableAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateCarResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCarResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCarResponse message. + * @function verify + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCarResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.mbid != null && message.hasOwnProperty("mbid")) + if (!$util.isInteger(message.mbid)) + return "mbid: integer expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + if (!$util.isInteger(message.stClearBits)) + return "stClearBits: integer expected"; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + if (!$util.isInteger(message.stClearDivCount)) + return "stClearDivCount: integer expected"; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + if (!$util.isInteger(message.stClearCount)) + return "stClearCount: integer expected"; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (!$util.isInteger(message.stLoseBits) && !(message.stLoseBits && $util.isInteger(message.stLoseBits.low) && $util.isInteger(message.stLoseBits.high))) + return "stLoseBits: integer|Long expected"; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + if (!$util.isInteger(message.stConsecutiveWins)) + return "stConsecutiveWins: integer expected"; + if (message.stConsecutiveWinsMax != null && message.hasOwnProperty("stConsecutiveWinsMax")) + if (!$util.isInteger(message.stConsecutiveWinsMax)) + return "stConsecutiveWinsMax: integer expected"; + if (message.fullTunedCarCouponUnreceivableAt != null && message.hasOwnProperty("fullTunedCarCouponUnreceivableAt")) + if (!$util.isInteger(message.fullTunedCarCouponUnreceivableAt)) + return "fullTunedCarCouponUnreceivableAt: integer expected"; + return null; + }; + + /** + * Creates a CreateCarResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateCarResponse} CreateCarResponse + */ + CreateCarResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateCarResponse) + return object; + let message = new $root.wm.protobuf.CreateCarResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.mbid != null) + message.mbid = object.mbid >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.stClearBits != null) + message.stClearBits = object.stClearBits >>> 0; + if (object.stClearDivCount != null) + message.stClearDivCount = object.stClearDivCount >>> 0; + if (object.stClearCount != null) + message.stClearCount = object.stClearCount >>> 0; + if (object.stLoseBits != null) + if ($util.Long) + (message.stLoseBits = $util.Long.fromValue(object.stLoseBits)).unsigned = true; + else if (typeof object.stLoseBits === "string") + message.stLoseBits = parseInt(object.stLoseBits, 10); + else if (typeof object.stLoseBits === "number") + message.stLoseBits = object.stLoseBits; + else if (typeof object.stLoseBits === "object") + message.stLoseBits = new $util.LongBits(object.stLoseBits.low >>> 0, object.stLoseBits.high >>> 0).toNumber(true); + if (object.stConsecutiveWins != null) + message.stConsecutiveWins = object.stConsecutiveWins >>> 0; + if (object.stConsecutiveWinsMax != null) + message.stConsecutiveWinsMax = object.stConsecutiveWinsMax >>> 0; + if (object.fullTunedCarCouponUnreceivableAt != null) + message.fullTunedCarCouponUnreceivableAt = object.fullTunedCarCouponUnreceivableAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateCarResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {wm.protobuf.CreateCarResponse} message CreateCarResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCarResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.accessCode = ""; + object.banapassportAmId = 0; + object.mbid = 0; + object.userId = 0; + object.carId = 0; + object.stClearBits = 0; + object.stClearDivCount = 0; + object.stClearCount = 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.stLoseBits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.stLoseBits = options.longs === String ? "0" : 0; + object.stConsecutiveWins = 0; + object.stConsecutiveWinsMax = 0; + object.fullTunedCarCouponUnreceivableAt = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.mbid != null && message.hasOwnProperty("mbid")) + object.mbid = message.mbid; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + object.stClearBits = message.stClearBits; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + object.stClearDivCount = message.stClearDivCount; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + object.stClearCount = message.stClearCount; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (typeof message.stLoseBits === "number") + object.stLoseBits = options.longs === String ? String(message.stLoseBits) : message.stLoseBits; + else + object.stLoseBits = options.longs === String ? $util.Long.prototype.toString.call(message.stLoseBits) : options.longs === Number ? new $util.LongBits(message.stLoseBits.low >>> 0, message.stLoseBits.high >>> 0).toNumber(true) : message.stLoseBits; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + object.stConsecutiveWins = message.stConsecutiveWins; + if (message.stConsecutiveWinsMax != null && message.hasOwnProperty("stConsecutiveWinsMax")) + object.stConsecutiveWinsMax = message.stConsecutiveWinsMax; + if (message.fullTunedCarCouponUnreceivableAt != null && message.hasOwnProperty("fullTunedCarCouponUnreceivableAt")) + object.fullTunedCarCouponUnreceivableAt = message.fullTunedCarCouponUnreceivableAt; + return object; + }; + + /** + * Converts this CreateCarResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateCarResponse + * @instance + * @returns {Object.} JSON object + */ + CreateCarResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCarResponse + * @function getTypeUrl + * @memberof wm.protobuf.CreateCarResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCarResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateCarResponse"; + }; + + return CreateCarResponse; + })(); + + protobuf.LoadGameHistoryRequest = (function() { + + /** + * Properties of a LoadGameHistoryRequest. + * @memberof wm.protobuf + * @interface ILoadGameHistoryRequest + * @property {number} carId LoadGameHistoryRequest carId + */ + + /** + * Constructs a new LoadGameHistoryRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGameHistoryRequest. + * @implements ILoadGameHistoryRequest + * @constructor + * @param {wm.protobuf.ILoadGameHistoryRequest=} [properties] Properties to set + */ + function LoadGameHistoryRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGameHistoryRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGameHistoryRequest + * @instance + */ + LoadGameHistoryRequest.prototype.carId = 0; + + /** + * Creates a new LoadGameHistoryRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.ILoadGameHistoryRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest instance + */ + LoadGameHistoryRequest.create = function create(properties) { + return new LoadGameHistoryRequest(properties); + }; + + /** + * Encodes the specified LoadGameHistoryRequest message. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.ILoadGameHistoryRequest} message LoadGameHistoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + return writer; + }; + + /** + * Encodes the specified LoadGameHistoryRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.ILoadGameHistoryRequest} message LoadGameHistoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGameHistoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGameHistoryRequest message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGameHistoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + return null; + }; + + /** + * Creates a LoadGameHistoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryRequest} LoadGameHistoryRequest + */ + LoadGameHistoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryRequest) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGameHistoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {wm.protobuf.LoadGameHistoryRequest} message LoadGameHistoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGameHistoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + return object; + }; + + /** + * Converts this LoadGameHistoryRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGameHistoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGameHistoryRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGameHistoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryRequest"; + }; + + return LoadGameHistoryRequest; + })(); + + protobuf.LoadGameHistoryResponse = (function() { + + /** + * Properties of a LoadGameHistoryResponse. + * @memberof wm.protobuf + * @interface ILoadGameHistoryResponse + * @property {wm.protobuf.ErrorCode} error LoadGameHistoryResponse error + * @property {Array.|null} [taRecords] LoadGameHistoryResponse taRecords + * @property {number} taRankingUpdatedAt LoadGameHistoryResponse taRankingUpdatedAt + * @property {Array.|null} [ghostHistory] LoadGameHistoryResponse ghostHistory + * @property {number} ghostBattleCount LoadGameHistoryResponse ghostBattleCount + * @property {number} ghostBattleWinCount LoadGameHistoryResponse ghostBattleWinCount + * @property {number} stampSheetCount LoadGameHistoryResponse stampSheetCount + * @property {Array.|null} [stampSheet] LoadGameHistoryResponse stampSheet + */ + + /** + * Constructs a new LoadGameHistoryResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGameHistoryResponse. + * @implements ILoadGameHistoryResponse + * @constructor + * @param {wm.protobuf.ILoadGameHistoryResponse=} [properties] Properties to set + */ + function LoadGameHistoryResponse(properties) { + this.taRecords = []; + this.ghostHistory = []; + this.stampSheet = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGameHistoryResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.error = 0; + + /** + * LoadGameHistoryResponse taRecords. + * @member {Array.} taRecords + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.taRecords = $util.emptyArray; + + /** + * LoadGameHistoryResponse taRankingUpdatedAt. + * @member {number} taRankingUpdatedAt + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.taRankingUpdatedAt = 0; + + /** + * LoadGameHistoryResponse ghostHistory. + * @member {Array.} ghostHistory + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.ghostHistory = $util.emptyArray; + + /** + * LoadGameHistoryResponse ghostBattleCount. + * @member {number} ghostBattleCount + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.ghostBattleCount = 0; + + /** + * LoadGameHistoryResponse ghostBattleWinCount. + * @member {number} ghostBattleWinCount + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.ghostBattleWinCount = 0; + + /** + * LoadGameHistoryResponse stampSheetCount. + * @member {number} stampSheetCount + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.stampSheetCount = 0; + + /** + * LoadGameHistoryResponse stampSheet. + * @member {Array.} stampSheet + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + */ + LoadGameHistoryResponse.prototype.stampSheet = $util.emptyArray; + + /** + * Creates a new LoadGameHistoryResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.ILoadGameHistoryResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse instance + */ + LoadGameHistoryResponse.create = function create(properties) { + return new LoadGameHistoryResponse(properties); + }; + + /** + * Encodes the specified LoadGameHistoryResponse message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.ILoadGameHistoryResponse} message LoadGameHistoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.taRecords != null && message.taRecords.length) + for (let i = 0; i < message.taRecords.length; ++i) + $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.encode(message.taRecords[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.taRankingUpdatedAt); + if (message.ghostHistory != null && message.ghostHistory.length) + for (let i = 0; i < message.ghostHistory.length; ++i) + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.encode(message.ghostHistory[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.ghostBattleCount); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.ghostBattleWinCount); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.stampSheetCount); + if (message.stampSheet != null && message.stampSheet.length) + for (let i = 0; i < message.stampSheet.length; ++i) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stampSheet[i]); + return writer; + }; + + /** + * Encodes the specified LoadGameHistoryResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.ILoadGameHistoryResponse} message LoadGameHistoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGameHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.taRecords && message.taRecords.length)) + message.taRecords = []; + message.taRecords.push($root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.decode(reader, reader.uint32())); + break; + } + case 3: { + message.taRankingUpdatedAt = reader.uint32(); + break; + } + case 4: { + if (!(message.ghostHistory && message.ghostHistory.length)) + message.ghostHistory = []; + message.ghostHistory.push($root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.decode(reader, reader.uint32())); + break; + } + case 5: { + message.ghostBattleCount = reader.uint32(); + break; + } + case 6: { + message.ghostBattleWinCount = reader.uint32(); + break; + } + case 7: { + message.stampSheetCount = reader.uint32(); + break; + } + case 8: { + if (!(message.stampSheet && message.stampSheet.length)) + message.stampSheet = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampSheet.push(reader.uint32()); + } else + message.stampSheet.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("taRankingUpdatedAt")) + throw $util.ProtocolError("missing required 'taRankingUpdatedAt'", { instance: message }); + if (!message.hasOwnProperty("ghostBattleCount")) + throw $util.ProtocolError("missing required 'ghostBattleCount'", { instance: message }); + if (!message.hasOwnProperty("ghostBattleWinCount")) + throw $util.ProtocolError("missing required 'ghostBattleWinCount'", { instance: message }); + if (!message.hasOwnProperty("stampSheetCount")) + throw $util.ProtocolError("missing required 'stampSheetCount'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGameHistoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGameHistoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGameHistoryResponse message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGameHistoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.taRecords != null && message.hasOwnProperty("taRecords")) { + if (!Array.isArray(message.taRecords)) + return "taRecords: array expected"; + for (let i = 0; i < message.taRecords.length; ++i) { + let error = $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify(message.taRecords[i]); + if (error) + return "taRecords." + error; + } + } + if (!$util.isInteger(message.taRankingUpdatedAt)) + return "taRankingUpdatedAt: integer expected"; + if (message.ghostHistory != null && message.hasOwnProperty("ghostHistory")) { + if (!Array.isArray(message.ghostHistory)) + return "ghostHistory: array expected"; + for (let i = 0; i < message.ghostHistory.length; ++i) { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify(message.ghostHistory[i]); + if (error) + return "ghostHistory." + error; + } + } + if (!$util.isInteger(message.ghostBattleCount)) + return "ghostBattleCount: integer expected"; + if (!$util.isInteger(message.ghostBattleWinCount)) + return "ghostBattleWinCount: integer expected"; + if (!$util.isInteger(message.stampSheetCount)) + return "stampSheetCount: integer expected"; + if (message.stampSheet != null && message.hasOwnProperty("stampSheet")) { + if (!Array.isArray(message.stampSheet)) + return "stampSheet: array expected"; + for (let i = 0; i < message.stampSheet.length; ++i) + if (!$util.isInteger(message.stampSheet[i])) + return "stampSheet: integer[] expected"; + } + return null; + }; + + /** + * Creates a LoadGameHistoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse} LoadGameHistoryResponse + */ + LoadGameHistoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.taRecords) { + if (!Array.isArray(object.taRecords)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.taRecords: array expected"); + message.taRecords = []; + for (let i = 0; i < object.taRecords.length; ++i) { + if (typeof object.taRecords[i] !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.taRecords: object expected"); + message.taRecords[i] = $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.fromObject(object.taRecords[i]); + } + } + if (object.taRankingUpdatedAt != null) + message.taRankingUpdatedAt = object.taRankingUpdatedAt >>> 0; + if (object.ghostHistory) { + if (!Array.isArray(object.ghostHistory)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.ghostHistory: array expected"); + message.ghostHistory = []; + for (let i = 0; i < object.ghostHistory.length; ++i) { + if (typeof object.ghostHistory[i] !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.ghostHistory: object expected"); + message.ghostHistory[i] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.fromObject(object.ghostHistory[i]); + } + } + if (object.ghostBattleCount != null) + message.ghostBattleCount = object.ghostBattleCount >>> 0; + if (object.ghostBattleWinCount != null) + message.ghostBattleWinCount = object.ghostBattleWinCount >>> 0; + if (object.stampSheetCount != null) + message.stampSheetCount = object.stampSheetCount >>> 0; + if (object.stampSheet) { + if (!Array.isArray(object.stampSheet)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.stampSheet: array expected"); + message.stampSheet = []; + for (let i = 0; i < object.stampSheet.length; ++i) + message.stampSheet[i] = object.stampSheet[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LoadGameHistoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {wm.protobuf.LoadGameHistoryResponse} message LoadGameHistoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGameHistoryResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.taRecords = []; + object.ghostHistory = []; + object.stampSheet = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.taRankingUpdatedAt = 0; + object.ghostBattleCount = 0; + object.ghostBattleWinCount = 0; + object.stampSheetCount = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.taRecords && message.taRecords.length) { + object.taRecords = []; + for (let j = 0; j < message.taRecords.length; ++j) + object.taRecords[j] = $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.toObject(message.taRecords[j], options); + } + if (message.taRankingUpdatedAt != null && message.hasOwnProperty("taRankingUpdatedAt")) + object.taRankingUpdatedAt = message.taRankingUpdatedAt; + if (message.ghostHistory && message.ghostHistory.length) { + object.ghostHistory = []; + for (let j = 0; j < message.ghostHistory.length; ++j) + object.ghostHistory[j] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.toObject(message.ghostHistory[j], options); + } + if (message.ghostBattleCount != null && message.hasOwnProperty("ghostBattleCount")) + object.ghostBattleCount = message.ghostBattleCount; + if (message.ghostBattleWinCount != null && message.hasOwnProperty("ghostBattleWinCount")) + object.ghostBattleWinCount = message.ghostBattleWinCount; + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + object.stampSheetCount = message.stampSheetCount; + if (message.stampSheet && message.stampSheet.length) { + object.stampSheet = []; + for (let j = 0; j < message.stampSheet.length; ++j) + object.stampSheet[j] = message.stampSheet[j]; + } + return object; + }; + + /** + * Converts this LoadGameHistoryResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGameHistoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGameHistoryResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGameHistoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse"; + }; + + LoadGameHistoryResponse.TimeAttackRecord = (function() { + + /** + * Properties of a TimeAttackRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @interface ITimeAttackRecord + * @property {number} course TimeAttackRecord course + * @property {number|null} [time] TimeAttackRecord time + * @property {number|null} [tunePower] TimeAttackRecord tunePower + * @property {number|null} [tuneHandling] TimeAttackRecord tuneHandling + * @property {number|null} [wholeRank] TimeAttackRecord wholeRank + * @property {number} wholeParticipants TimeAttackRecord wholeParticipants + * @property {number|null} [modelRank] TimeAttackRecord modelRank + * @property {number} modelParticipants TimeAttackRecord modelParticipants + */ + + /** + * Constructs a new TimeAttackRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @classdesc Represents a TimeAttackRecord. + * @implements ITimeAttackRecord + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord=} [properties] Properties to set + */ + function TimeAttackRecord(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeAttackRecord course. + * @member {number} course + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.course = 0; + + /** + * TimeAttackRecord time. + * @member {number} time + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.time = 0; + + /** + * TimeAttackRecord tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.tunePower = 0; + + /** + * TimeAttackRecord tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.tuneHandling = 0; + + /** + * TimeAttackRecord wholeRank. + * @member {number} wholeRank + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.wholeRank = 0; + + /** + * TimeAttackRecord wholeParticipants. + * @member {number} wholeParticipants + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.wholeParticipants = 0; + + /** + * TimeAttackRecord modelRank. + * @member {number} modelRank + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.modelRank = 0; + + /** + * TimeAttackRecord modelParticipants. + * @member {number} modelParticipants + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + */ + TimeAttackRecord.prototype.modelParticipants = 0; + + /** + * Creates a new TimeAttackRecord instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord instance + */ + TimeAttackRecord.create = function create(properties) { + return new TimeAttackRecord(properties); + }; + + /** + * Encodes the specified TimeAttackRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord} message TimeAttackRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.course); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.time); + if (message.tunePower != null && Object.hasOwnProperty.call(message, "tunePower")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tunePower); + if (message.tuneHandling != null && Object.hasOwnProperty.call(message, "tuneHandling")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.tuneHandling); + if (message.wholeRank != null && Object.hasOwnProperty.call(message, "wholeRank")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.wholeRank); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.wholeParticipants); + if (message.modelRank != null && Object.hasOwnProperty.call(message, "modelRank")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.modelRank); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.modelParticipants); + return writer; + }; + + /** + * Encodes the specified TimeAttackRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.ITimeAttackRecord} message TimeAttackRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.course = reader.uint32(); + break; + } + case 2: { + message.time = reader.uint32(); + break; + } + case 3: { + message.tunePower = reader.uint32(); + break; + } + case 4: { + message.tuneHandling = reader.uint32(); + break; + } + case 5: { + message.wholeRank = reader.uint32(); + break; + } + case 6: { + message.wholeParticipants = reader.uint32(); + break; + } + case 7: { + message.modelRank = reader.uint32(); + break; + } + case 8: { + message.modelParticipants = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + if (!message.hasOwnProperty("wholeParticipants")) + throw $util.ProtocolError("missing required 'wholeParticipants'", { instance: message }); + if (!message.hasOwnProperty("modelParticipants")) + throw $util.ProtocolError("missing required 'modelParticipants'", { instance: message }); + return message; + }; + + /** + * Decodes a TimeAttackRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeAttackRecord message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeAttackRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + if (message.time != null && message.hasOwnProperty("time")) + if (!$util.isInteger(message.time)) + return "time: integer expected"; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + if (!$util.isInteger(message.wholeRank)) + return "wholeRank: integer expected"; + if (!$util.isInteger(message.wholeParticipants)) + return "wholeParticipants: integer expected"; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + if (!$util.isInteger(message.modelRank)) + return "modelRank: integer expected"; + if (!$util.isInteger(message.modelParticipants)) + return "modelParticipants: integer expected"; + return null; + }; + + /** + * Creates a TimeAttackRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} TimeAttackRecord + */ + TimeAttackRecord.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord(); + if (object.course != null) + message.course = object.course >>> 0; + if (object.time != null) + message.time = object.time >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.wholeRank != null) + message.wholeRank = object.wholeRank >>> 0; + if (object.wholeParticipants != null) + message.wholeParticipants = object.wholeParticipants >>> 0; + if (object.modelRank != null) + message.modelRank = object.modelRank >>> 0; + if (object.modelParticipants != null) + message.modelParticipants = object.modelParticipants >>> 0; + return message; + }; + + /** + * Creates a plain object from a TimeAttackRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord} message TimeAttackRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeAttackRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.course = 0; + object.time = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.wholeRank = 0; + object.wholeParticipants = 0; + object.modelRank = 0; + object.modelParticipants = 0; + } + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + if (message.time != null && message.hasOwnProperty("time")) + object.time = message.time; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + object.wholeRank = message.wholeRank; + if (message.wholeParticipants != null && message.hasOwnProperty("wholeParticipants")) + object.wholeParticipants = message.wholeParticipants; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + object.modelRank = message.modelRank; + if (message.modelParticipants != null && message.hasOwnProperty("modelParticipants")) + object.modelParticipants = message.modelParticipants; + return object; + }; + + /** + * Converts this TimeAttackRecord to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @instance + * @returns {Object.} JSON object + */ + TimeAttackRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeAttackRecord + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeAttackRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.TimeAttackRecord"; + }; + + return TimeAttackRecord; + })(); + + LoadGameHistoryResponse.GhostBattleRecord = (function() { + + /** + * Properties of a GhostBattleRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @interface IGhostBattleRecord + * @property {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} carSetting GhostBattleRecord carSetting + * @property {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} opponent GhostBattleRecord opponent + * @property {Array.|null} [mobs] GhostBattleRecord mobs + * @property {number} area GhostBattleRecord area + * @property {number} playedAt GhostBattleRecord playedAt + * @property {string} playedShopName GhostBattleRecord playedShopName + */ + + /** + * Constructs a new GhostBattleRecord. + * @memberof wm.protobuf.LoadGameHistoryResponse + * @classdesc Represents a GhostBattleRecord. + * @implements IGhostBattleRecord + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord=} [properties] Properties to set + */ + function GhostBattleRecord(properties) { + this.mobs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleRecord carSetting. + * @member {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} carSetting + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.carSetting = null; + + /** + * GhostBattleRecord opponent. + * @member {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} opponent + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.opponent = null; + + /** + * GhostBattleRecord mobs. + * @member {Array.} mobs + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.mobs = $util.emptyArray; + + /** + * GhostBattleRecord area. + * @member {number} area + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.area = 0; + + /** + * GhostBattleRecord playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.playedAt = 0; + + /** + * GhostBattleRecord playedShopName. + * @member {string} playedShopName + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + */ + GhostBattleRecord.prototype.playedShopName = ""; + + /** + * Creates a new GhostBattleRecord instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord instance + */ + GhostBattleRecord.create = function create(properties) { + return new GhostBattleRecord(properties); + }; + + /** + * Encodes the specified GhostBattleRecord message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord} message GhostBattleRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.encode(message.carSetting, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.encode(message.opponent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.mobs != null && message.mobs.length) + for (let i = 0; i < message.mobs.length; ++i) + $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.encode(message.mobs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.area); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.playedAt); + writer.uint32(/* id 6, wireType 2 =*/50).string(message.playedShopName); + return writer; + }; + + /** + * Encodes the specified GhostBattleRecord message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.IGhostBattleRecord} message GhostBattleRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carSetting = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.decode(reader, reader.uint32()); + break; + } + case 2: { + message.opponent = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.mobs && message.mobs.length)) + message.mobs = []; + message.mobs.push($root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.decode(reader, reader.uint32())); + break; + } + case 4: { + message.area = reader.uint32(); + break; + } + case 5: { + message.playedAt = reader.uint32(); + break; + } + case 6: { + message.playedShopName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carSetting")) + throw $util.ProtocolError("missing required 'carSetting'", { instance: message }); + if (!message.hasOwnProperty("opponent")) + throw $util.ProtocolError("missing required 'opponent'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + if (!message.hasOwnProperty("playedShopName")) + throw $util.ProtocolError("missing required 'playedShopName'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleRecord message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify(message.carSetting); + if (error) + return "carSetting." + error; + } + { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify(message.opponent); + if (error) + return "opponent." + error; + } + if (message.mobs != null && message.hasOwnProperty("mobs")) { + if (!Array.isArray(message.mobs)) + return "mobs: array expected"; + for (let i = 0; i < message.mobs.length; ++i) { + let error = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify(message.mobs[i]); + if (error) + return "mobs." + error; + } + } + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (!$util.isString(message.playedShopName)) + return "playedShopName: string expected"; + return null; + }; + + /** + * Creates a GhostBattleRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} GhostBattleRecord + */ + GhostBattleRecord.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord(); + if (object.carSetting != null) { + if (typeof object.carSetting !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.carSetting: object expected"); + message.carSetting = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.fromObject(object.carSetting); + } + if (object.opponent != null) { + if (typeof object.opponent !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.opponent: object expected"); + message.opponent = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.fromObject(object.opponent); + } + if (object.mobs) { + if (!Array.isArray(object.mobs)) + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.mobs: array expected"); + message.mobs = []; + for (let i = 0; i < object.mobs.length; ++i) { + if (typeof object.mobs[i] !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.mobs: object expected"); + message.mobs[i] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.fromObject(object.mobs[i]); + } + } + if (object.area != null) + message.area = object.area >>> 0; + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.playedShopName != null) + message.playedShopName = String(object.playedShopName); + return message; + }; + + /** + * Creates a plain object from a GhostBattleRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord} message GhostBattleRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.mobs = []; + if (options.defaults) { + object.carSetting = null; + object.opponent = null; + object.area = 0; + object.playedAt = 0; + object.playedShopName = ""; + } + if (message.carSetting != null && message.hasOwnProperty("carSetting")) + object.carSetting = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.toObject(message.carSetting, options); + if (message.opponent != null && message.hasOwnProperty("opponent")) + object.opponent = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.toObject(message.opponent, options); + if (message.mobs && message.mobs.length) { + object.mobs = []; + for (let j = 0; j < message.mobs.length; ++j) + object.mobs[j] = $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.toObject(message.mobs[j], options); + } + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.playedShopName != null && message.hasOwnProperty("playedShopName")) + object.playedShopName = message.playedShopName; + return object; + }; + + /** + * Converts this GhostBattleRecord to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @instance + * @returns {Object.} JSON object + */ + GhostBattleRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleRecord + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord"; + }; + + GhostBattleRecord.GhostCarSetting = (function() { + + /** + * Properties of a GhostCarSetting. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @interface IGhostCarSetting + * @property {number} tunePower GhostCarSetting tunePower + * @property {number} tuneHandling GhostCarSetting tuneHandling + */ + + /** + * Constructs a new GhostCarSetting. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @classdesc Represents a GhostCarSetting. + * @implements IGhostCarSetting + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting=} [properties] Properties to set + */ + function GhostCarSetting(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCarSetting tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @instance + */ + GhostCarSetting.prototype.tunePower = 0; + + /** + * GhostCarSetting tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @instance + */ + GhostCarSetting.prototype.tuneHandling = 0; + + /** + * Creates a new GhostCarSetting instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting instance + */ + GhostCarSetting.create = function create(properties) { + return new GhostCarSetting(properties); + }; + + /** + * Encodes the specified GhostCarSetting message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} message GhostCarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCarSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + return writer; + }; + + /** + * Encodes the specified GhostCarSetting message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostCarSetting} message GhostCarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCarSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCarSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCarSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCarSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCarSetting message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCarSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + return null; + }; + + /** + * Creates a GhostCarSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} GhostCarSetting + */ + GhostCarSetting.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + return message; + }; + + /** + * Creates a plain object from a GhostCarSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting} message GhostCarSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCarSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + return object; + }; + + /** + * Converts this GhostCarSetting to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @instance + * @returns {Object.} JSON object + */ + GhostCarSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCarSetting + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCarSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostCarSetting"; + }; + + return GhostCarSetting; + })(); + + GhostBattleRecord.GhostBattleRecordCar = (function() { + + /** + * Properties of a GhostBattleRecordCar. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @interface IGhostBattleRecordCar + * @property {wm.protobuf.ICar} car GhostBattleRecordCar car + * @property {number} result GhostBattleRecordCar result + */ + + /** + * Constructs a new GhostBattleRecordCar. + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord + * @classdesc Represents a GhostBattleRecordCar. + * @implements IGhostBattleRecordCar + * @constructor + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar=} [properties] Properties to set + */ + function GhostBattleRecordCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleRecordCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @instance + */ + GhostBattleRecordCar.prototype.car = null; + + /** + * GhostBattleRecordCar result. + * @member {number} result + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @instance + */ + GhostBattleRecordCar.prototype.result = 0; + + /** + * Creates a new GhostBattleRecordCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar=} [properties] Properties to set + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar instance + */ + GhostBattleRecordCar.create = function create(properties) { + return new GhostBattleRecordCar(properties); + }; + + /** + * Encodes the specified GhostBattleRecordCar message. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} message GhostBattleRecordCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecordCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.result); + return writer; + }; + + /** + * Encodes the specified GhostBattleRecordCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.IGhostBattleRecordCar} message GhostBattleRecordCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleRecordCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecordCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.result = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleRecordCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleRecordCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleRecordCar message. + * @function verify + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleRecordCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.result)) + return "result: integer expected"; + return null; + }; + + /** + * Creates a GhostBattleRecordCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} GhostBattleRecordCar + */ + GhostBattleRecordCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar) + return object; + let message = new $root.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.result != null) + message.result = object.result | 0; + return message; + }; + + /** + * Creates a plain object from a GhostBattleRecordCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar} message GhostBattleRecordCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleRecordCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.result = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + return object; + }; + + /** + * Converts this GhostBattleRecordCar to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @instance + * @returns {Object.} JSON object + */ + GhostBattleRecordCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleRecordCar + * @function getTypeUrl + * @memberof wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleRecordCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar"; + }; + + return GhostBattleRecordCar; + })(); + + return GhostBattleRecord; + })(); + + return LoadGameHistoryResponse; + })(); + + protobuf.UpdateCarRequest = (function() { + + /** + * Properties of an UpdateCarRequest. + * @memberof wm.protobuf + * @interface IUpdateCarRequest + * @property {number} carId UpdateCarRequest carId + * @property {wm.protobuf.ICar|null} [car] UpdateCarRequest car + * @property {Array.|null} [earnedItems] UpdateCarRequest earnedItems + * @property {wm.protobuf.ICarSetting|null} [setting] UpdateCarRequest setting + * @property {boolean|null} [toBeDeleted] UpdateCarRequest toBeDeleted + * @property {boolean|null} [auraMotifAutoChange] UpdateCarRequest auraMotifAutoChange + * @property {number|null} [rgStamp] UpdateCarRequest rgStamp + * @property {number} timestamp UpdateCarRequest timestamp + */ + + /** + * Constructs a new UpdateCarRequest. + * @memberof wm.protobuf + * @classdesc Represents an UpdateCarRequest. + * @implements IUpdateCarRequest + * @constructor + * @param {wm.protobuf.IUpdateCarRequest=} [properties] Properties to set + */ + function UpdateCarRequest(properties) { + this.earnedItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCarRequest carId. + * @member {number} carId + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.carId = 0; + + /** + * UpdateCarRequest car. + * @member {wm.protobuf.ICar|null|undefined} car + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.car = null; + + /** + * UpdateCarRequest earnedItems. + * @member {Array.} earnedItems + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.earnedItems = $util.emptyArray; + + /** + * UpdateCarRequest setting. + * @member {wm.protobuf.ICarSetting|null|undefined} setting + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.setting = null; + + /** + * UpdateCarRequest toBeDeleted. + * @member {boolean} toBeDeleted + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.toBeDeleted = false; + + /** + * UpdateCarRequest auraMotifAutoChange. + * @member {boolean} auraMotifAutoChange + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.auraMotifAutoChange = false; + + /** + * UpdateCarRequest rgStamp. + * @member {number} rgStamp + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.rgStamp = 0; + + /** + * UpdateCarRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.UpdateCarRequest + * @instance + */ + UpdateCarRequest.prototype.timestamp = 0; + + /** + * Creates a new UpdateCarRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.IUpdateCarRequest=} [properties] Properties to set + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest instance + */ + UpdateCarRequest.create = function create(properties) { + return new UpdateCarRequest(properties); + }; + + /** + * Encodes the specified UpdateCarRequest message. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.IUpdateCarRequest} message UpdateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.car != null && Object.hasOwnProperty.call(message, "car")) + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.earnedItems != null && message.earnedItems.length) + for (let i = 0; i < message.earnedItems.length; ++i) + $root.wm.protobuf.CarItem.encode(message.earnedItems[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.setting != null && Object.hasOwnProperty.call(message, "setting")) + $root.wm.protobuf.CarSetting.encode(message.setting, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.toBeDeleted != null && Object.hasOwnProperty.call(message, "toBeDeleted")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.toBeDeleted); + if (message.auraMotifAutoChange != null && Object.hasOwnProperty.call(message, "auraMotifAutoChange")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.auraMotifAutoChange); + if (message.rgStamp != null && Object.hasOwnProperty.call(message, "rgStamp")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.rgStamp); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified UpdateCarRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.IUpdateCarRequest} message UpdateCarRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateCarRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.earnedItems && message.earnedItems.length)) + message.earnedItems = []; + message.earnedItems.push($root.wm.protobuf.CarItem.decode(reader, reader.uint32())); + break; + } + case 5: { + message.setting = $root.wm.protobuf.CarSetting.decode(reader, reader.uint32()); + break; + } + case 9: { + message.toBeDeleted = reader.bool(); + break; + } + case 10: { + message.auraMotifAutoChange = reader.bool(); + break; + } + case 12: { + message.rgStamp = reader.uint32(); + break; + } + case 13: { + message.timestamp = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateCarRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCarRequest message. + * @function verify + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCarRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.car != null && message.hasOwnProperty("car")) { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.earnedItems != null && message.hasOwnProperty("earnedItems")) { + if (!Array.isArray(message.earnedItems)) + return "earnedItems: array expected"; + for (let i = 0; i < message.earnedItems.length; ++i) { + let error = $root.wm.protobuf.CarItem.verify(message.earnedItems[i]); + if (error) + return "earnedItems." + error; + } + } + if (message.setting != null && message.hasOwnProperty("setting")) { + let error = $root.wm.protobuf.CarSetting.verify(message.setting); + if (error) + return "setting." + error; + } + if (message.toBeDeleted != null && message.hasOwnProperty("toBeDeleted")) + if (typeof message.toBeDeleted !== "boolean") + return "toBeDeleted: boolean expected"; + if (message.auraMotifAutoChange != null && message.hasOwnProperty("auraMotifAutoChange")) + if (typeof message.auraMotifAutoChange !== "boolean") + return "auraMotifAutoChange: boolean expected"; + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + if (!$util.isInteger(message.rgStamp)) + return "rgStamp: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + return null; + }; + + /** + * Creates an UpdateCarRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateCarRequest} UpdateCarRequest + */ + UpdateCarRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateCarRequest) + return object; + let message = new $root.wm.protobuf.UpdateCarRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.UpdateCarRequest.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.earnedItems) { + if (!Array.isArray(object.earnedItems)) + throw TypeError(".wm.protobuf.UpdateCarRequest.earnedItems: array expected"); + message.earnedItems = []; + for (let i = 0; i < object.earnedItems.length; ++i) { + if (typeof object.earnedItems[i] !== "object") + throw TypeError(".wm.protobuf.UpdateCarRequest.earnedItems: object expected"); + message.earnedItems[i] = $root.wm.protobuf.CarItem.fromObject(object.earnedItems[i]); + } + } + if (object.setting != null) { + if (typeof object.setting !== "object") + throw TypeError(".wm.protobuf.UpdateCarRequest.setting: object expected"); + message.setting = $root.wm.protobuf.CarSetting.fromObject(object.setting); + } + if (object.toBeDeleted != null) + message.toBeDeleted = Boolean(object.toBeDeleted); + if (object.auraMotifAutoChange != null) + message.auraMotifAutoChange = Boolean(object.auraMotifAutoChange); + if (object.rgStamp != null) + message.rgStamp = object.rgStamp >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + return message; + }; + + /** + * Creates a plain object from an UpdateCarRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {wm.protobuf.UpdateCarRequest} message UpdateCarRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCarRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.earnedItems = []; + if (options.defaults) { + object.carId = 0; + object.car = null; + object.setting = null; + object.toBeDeleted = false; + object.auraMotifAutoChange = false; + object.rgStamp = 0; + object.timestamp = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.earnedItems && message.earnedItems.length) { + object.earnedItems = []; + for (let j = 0; j < message.earnedItems.length; ++j) + object.earnedItems[j] = $root.wm.protobuf.CarItem.toObject(message.earnedItems[j], options); + } + if (message.setting != null && message.hasOwnProperty("setting")) + object.setting = $root.wm.protobuf.CarSetting.toObject(message.setting, options); + if (message.toBeDeleted != null && message.hasOwnProperty("toBeDeleted")) + object.toBeDeleted = message.toBeDeleted; + if (message.auraMotifAutoChange != null && message.hasOwnProperty("auraMotifAutoChange")) + object.auraMotifAutoChange = message.auraMotifAutoChange; + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + object.rgStamp = message.rgStamp; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this UpdateCarRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateCarRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCarRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCarRequest + * @function getTypeUrl + * @memberof wm.protobuf.UpdateCarRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCarRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateCarRequest"; + }; + + return UpdateCarRequest; + })(); + + protobuf.UpdateCarResponse = (function() { + + /** + * Properties of an UpdateCarResponse. + * @memberof wm.protobuf + * @interface IUpdateCarResponse + * @property {wm.protobuf.ErrorCode} error UpdateCarResponse error + */ + + /** + * Constructs a new UpdateCarResponse. + * @memberof wm.protobuf + * @classdesc Represents an UpdateCarResponse. + * @implements IUpdateCarResponse + * @constructor + * @param {wm.protobuf.IUpdateCarResponse=} [properties] Properties to set + */ + function UpdateCarResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCarResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.UpdateCarResponse + * @instance + */ + UpdateCarResponse.prototype.error = 0; + + /** + * Creates a new UpdateCarResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.IUpdateCarResponse=} [properties] Properties to set + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse instance + */ + UpdateCarResponse.create = function create(properties) { + return new UpdateCarResponse(properties); + }; + + /** + * Encodes the specified UpdateCarResponse message. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.IUpdateCarResponse} message UpdateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified UpdateCarResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateCarResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.IUpdateCarResponse} message UpdateCarResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCarResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateCarResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateCarResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCarResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCarResponse message. + * @function verify + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCarResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates an UpdateCarResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateCarResponse} UpdateCarResponse + */ + UpdateCarResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateCarResponse) + return object; + let message = new $root.wm.protobuf.UpdateCarResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from an UpdateCarResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {wm.protobuf.UpdateCarResponse} message UpdateCarResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCarResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this UpdateCarResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateCarResponse + * @instance + * @returns {Object.} JSON object + */ + UpdateCarResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCarResponse + * @function getTypeUrl + * @memberof wm.protobuf.UpdateCarResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCarResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateCarResponse"; + }; + + return UpdateCarResponse; + })(); + + protobuf.SaveGameResultRequest = (function() { + + /** + * Properties of a SaveGameResultRequest. + * @memberof wm.protobuf + * @interface ISaveGameResultRequest + * @property {number} carId SaveGameResultRequest carId + * @property {wm.protobuf.GameMode} gameMode SaveGameResultRequest gameMode + * @property {number} playedAt SaveGameResultRequest playedAt + * @property {number} playCount SaveGameResultRequest playCount + * @property {boolean} retired SaveGameResultRequest retired + * @property {boolean} timeup SaveGameResultRequest timeup + * @property {wm.protobuf.ICar|null} [car] SaveGameResultRequest car + * @property {wm.protobuf.ICarSetting|null} [setting] SaveGameResultRequest setting + * @property {number|null} [odometer] SaveGameResultRequest odometer + * @property {boolean|null} [earnedCustomColor] SaveGameResultRequest earnedCustomColor + * @property {Array.|null} [confirmedTutorials] SaveGameResultRequest confirmedTutorials + * @property {Array.|null} [earnedItems] SaveGameResultRequest earnedItems + * @property {Array.|null} [earnedUserItems] SaveGameResultRequest earnedUserItems + * @property {Array.|null} [preservedTitles] SaveGameResultRequest preservedTitles + * @property {Array.|null} [neighborCars] SaveGameResultRequest neighborCars + * @property {wm.protobuf.SaveGameResultRequest.IStoryResult|null} [stResult] SaveGameResultRequest stResult + * @property {wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null} [taResult] SaveGameResultRequest taResult + * @property {wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null} [vsResult] SaveGameResultRequest vsResult + * @property {wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null} [rgResult] SaveGameResultRequest rgResult + */ + + /** + * Constructs a new SaveGameResultRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveGameResultRequest. + * @implements ISaveGameResultRequest + * @constructor + * @param {wm.protobuf.ISaveGameResultRequest=} [properties] Properties to set + */ + function SaveGameResultRequest(properties) { + this.confirmedTutorials = []; + this.earnedItems = []; + this.earnedUserItems = []; + this.preservedTitles = []; + this.neighborCars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveGameResultRequest carId. + * @member {number} carId + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.carId = 0; + + /** + * SaveGameResultRequest gameMode. + * @member {wm.protobuf.GameMode} gameMode + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.gameMode = 1; + + /** + * SaveGameResultRequest playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.playedAt = 0; + + /** + * SaveGameResultRequest playCount. + * @member {number} playCount + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.playCount = 0; + + /** + * SaveGameResultRequest retired. + * @member {boolean} retired + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.retired = false; + + /** + * SaveGameResultRequest timeup. + * @member {boolean} timeup + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.timeup = false; + + /** + * SaveGameResultRequest car. + * @member {wm.protobuf.ICar|null|undefined} car + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.car = null; + + /** + * SaveGameResultRequest setting. + * @member {wm.protobuf.ICarSetting|null|undefined} setting + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.setting = null; + + /** + * SaveGameResultRequest odometer. + * @member {number} odometer + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.odometer = 0; + + /** + * SaveGameResultRequest earnedCustomColor. + * @member {boolean} earnedCustomColor + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.earnedCustomColor = false; + + /** + * SaveGameResultRequest confirmedTutorials. + * @member {Array.} confirmedTutorials + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.confirmedTutorials = $util.emptyArray; + + /** + * SaveGameResultRequest earnedItems. + * @member {Array.} earnedItems + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.earnedItems = $util.emptyArray; + + /** + * SaveGameResultRequest earnedUserItems. + * @member {Array.} earnedUserItems + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.earnedUserItems = $util.emptyArray; + + /** + * SaveGameResultRequest preservedTitles. + * @member {Array.} preservedTitles + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.preservedTitles = $util.emptyArray; + + /** + * SaveGameResultRequest neighborCars. + * @member {Array.} neighborCars + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.neighborCars = $util.emptyArray; + + /** + * SaveGameResultRequest stResult. + * @member {wm.protobuf.SaveGameResultRequest.IStoryResult|null|undefined} stResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.stResult = null; + + /** + * SaveGameResultRequest taResult. + * @member {wm.protobuf.SaveGameResultRequest.ITimeAttackResult|null|undefined} taResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.taResult = null; + + /** + * SaveGameResultRequest vsResult. + * @member {wm.protobuf.SaveGameResultRequest.IVersusBattleResult|null|undefined} vsResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.vsResult = null; + + /** + * SaveGameResultRequest rgResult. + * @member {wm.protobuf.SaveGameResultRequest.IGhostBattleResult|null|undefined} rgResult + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + */ + SaveGameResultRequest.prototype.rgResult = null; + + /** + * Creates a new SaveGameResultRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.ISaveGameResultRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest instance + */ + SaveGameResultRequest.create = function create(properties) { + return new SaveGameResultRequest(properties); + }; + + /** + * Encodes the specified SaveGameResultRequest message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.ISaveGameResultRequest} message SaveGameResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gameMode); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.playedAt); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.playCount); + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.retired); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.timeup); + if (message.car != null && Object.hasOwnProperty.call(message, "car")) + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.setting != null && Object.hasOwnProperty.call(message, "setting")) + $root.wm.protobuf.CarSetting.encode(message.setting, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.odometer != null && Object.hasOwnProperty.call(message, "odometer")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.odometer); + if (message.earnedCustomColor != null && Object.hasOwnProperty.call(message, "earnedCustomColor")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.earnedCustomColor); + if (message.confirmedTutorials != null && message.confirmedTutorials.length) + for (let i = 0; i < message.confirmedTutorials.length; ++i) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.confirmedTutorials[i]); + if (message.earnedItems != null && message.earnedItems.length) + for (let i = 0; i < message.earnedItems.length; ++i) + $root.wm.protobuf.CarItem.encode(message.earnedItems[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.earnedUserItems != null && message.earnedUserItems.length) + for (let i = 0; i < message.earnedUserItems.length; ++i) + $root.wm.protobuf.UserItem.encode(message.earnedUserItems[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.preservedTitles != null && message.preservedTitles.length) + for (let i = 0; i < message.preservedTitles.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.preservedTitles[i]); + if (message.neighborCars != null && message.neighborCars.length) + for (let i = 0; i < message.neighborCars.length; ++i) + writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.neighborCars[i]); + if (message.stResult != null && Object.hasOwnProperty.call(message, "stResult")) + $root.wm.protobuf.SaveGameResultRequest.StoryResult.encode(message.stResult, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.taResult != null && Object.hasOwnProperty.call(message, "taResult")) + $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.encode(message.taResult, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.vsResult != null && Object.hasOwnProperty.call(message, "vsResult")) + $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.encode(message.vsResult, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.rgResult != null && Object.hasOwnProperty.call(message, "rgResult")) + $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.encode(message.rgResult, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveGameResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.ISaveGameResultRequest} message SaveGameResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.gameMode = reader.int32(); + break; + } + case 3: { + message.playedAt = reader.uint32(); + break; + } + case 4: { + message.playCount = reader.uint32(); + break; + } + case 5: { + message.retired = reader.bool(); + break; + } + case 6: { + message.timeup = reader.bool(); + break; + } + case 7: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 8: { + message.setting = $root.wm.protobuf.CarSetting.decode(reader, reader.uint32()); + break; + } + case 9: { + message.odometer = reader.uint32(); + break; + } + case 11: { + message.earnedCustomColor = reader.bool(); + break; + } + case 12: { + if (!(message.confirmedTutorials && message.confirmedTutorials.length)) + message.confirmedTutorials = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.confirmedTutorials.push(reader.int32()); + } else + message.confirmedTutorials.push(reader.int32()); + break; + } + case 13: { + if (!(message.earnedItems && message.earnedItems.length)) + message.earnedItems = []; + message.earnedItems.push($root.wm.protobuf.CarItem.decode(reader, reader.uint32())); + break; + } + case 14: { + if (!(message.earnedUserItems && message.earnedUserItems.length)) + message.earnedUserItems = []; + message.earnedUserItems.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + case 15: { + if (!(message.preservedTitles && message.preservedTitles.length)) + message.preservedTitles = []; + message.preservedTitles.push(reader.string()); + break; + } + case 21: { + if (!(message.neighborCars && message.neighborCars.length)) + message.neighborCars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.neighborCars.push(reader.uint32()); + } else + message.neighborCars.push(reader.uint32()); + break; + } + case 22: { + message.stResult = $root.wm.protobuf.SaveGameResultRequest.StoryResult.decode(reader, reader.uint32()); + break; + } + case 23: { + message.taResult = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.decode(reader, reader.uint32()); + break; + } + case 24: { + message.vsResult = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.decode(reader, reader.uint32()); + break; + } + case 25: { + message.rgResult = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("gameMode")) + throw $util.ProtocolError("missing required 'gameMode'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + if (!message.hasOwnProperty("playCount")) + throw $util.ProtocolError("missing required 'playCount'", { instance: message }); + if (!message.hasOwnProperty("retired")) + throw $util.ProtocolError("missing required 'retired'", { instance: message }); + if (!message.hasOwnProperty("timeup")) + throw $util.ProtocolError("missing required 'timeup'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveGameResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveGameResultRequest message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveGameResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + switch (message.gameMode) { + default: + return "gameMode: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (!$util.isInteger(message.playCount)) + return "playCount: integer expected"; + if (typeof message.retired !== "boolean") + return "retired: boolean expected"; + if (typeof message.timeup !== "boolean") + return "timeup: boolean expected"; + if (message.car != null && message.hasOwnProperty("car")) { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.setting != null && message.hasOwnProperty("setting")) { + let error = $root.wm.protobuf.CarSetting.verify(message.setting); + if (error) + return "setting." + error; + } + if (message.odometer != null && message.hasOwnProperty("odometer")) + if (!$util.isInteger(message.odometer)) + return "odometer: integer expected"; + if (message.earnedCustomColor != null && message.hasOwnProperty("earnedCustomColor")) + if (typeof message.earnedCustomColor !== "boolean") + return "earnedCustomColor: boolean expected"; + if (message.confirmedTutorials != null && message.hasOwnProperty("confirmedTutorials")) { + if (!Array.isArray(message.confirmedTutorials)) + return "confirmedTutorials: array expected"; + for (let i = 0; i < message.confirmedTutorials.length; ++i) + switch (message.confirmedTutorials[i]) { + default: + return "confirmedTutorials: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + break; + } + } + if (message.earnedItems != null && message.hasOwnProperty("earnedItems")) { + if (!Array.isArray(message.earnedItems)) + return "earnedItems: array expected"; + for (let i = 0; i < message.earnedItems.length; ++i) { + let error = $root.wm.protobuf.CarItem.verify(message.earnedItems[i]); + if (error) + return "earnedItems." + error; + } + } + if (message.earnedUserItems != null && message.hasOwnProperty("earnedUserItems")) { + if (!Array.isArray(message.earnedUserItems)) + return "earnedUserItems: array expected"; + for (let i = 0; i < message.earnedUserItems.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.earnedUserItems[i]); + if (error) + return "earnedUserItems." + error; + } + } + if (message.preservedTitles != null && message.hasOwnProperty("preservedTitles")) { + if (!Array.isArray(message.preservedTitles)) + return "preservedTitles: array expected"; + for (let i = 0; i < message.preservedTitles.length; ++i) + if (!$util.isString(message.preservedTitles[i])) + return "preservedTitles: string[] expected"; + } + if (message.neighborCars != null && message.hasOwnProperty("neighborCars")) { + if (!Array.isArray(message.neighborCars)) + return "neighborCars: array expected"; + for (let i = 0; i < message.neighborCars.length; ++i) + if (!$util.isInteger(message.neighborCars[i])) + return "neighborCars: integer[] expected"; + } + if (message.stResult != null && message.hasOwnProperty("stResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.StoryResult.verify(message.stResult); + if (error) + return "stResult." + error; + } + if (message.taResult != null && message.hasOwnProperty("taResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify(message.taResult); + if (error) + return "taResult." + error; + } + if (message.vsResult != null && message.hasOwnProperty("vsResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify(message.vsResult); + if (error) + return "vsResult." + error; + } + if (message.rgResult != null && message.hasOwnProperty("rgResult")) { + let error = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify(message.rgResult); + if (error) + return "rgResult." + error; + } + return null; + }; + + /** + * Creates a SaveGameResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest} SaveGameResultRequest + */ + SaveGameResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + switch (object.gameMode) { + case "MODE_STORY": + case 1: + message.gameMode = 1; + break; + case "MODE_TIME_ATTACK": + case 2: + message.gameMode = 2; + break; + case "MODE_VS_BATTLE": + case 3: + message.gameMode = 3; + break; + case "MODE_GHOST_BATTLE": + case 4: + message.gameMode = 4; + break; + case "MODE_EVENT": + case 5: + message.gameMode = 5; + break; + } + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.playCount != null) + message.playCount = object.playCount >>> 0; + if (object.retired != null) + message.retired = Boolean(object.retired); + if (object.timeup != null) + message.timeup = Boolean(object.timeup); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.setting != null) { + if (typeof object.setting !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.setting: object expected"); + message.setting = $root.wm.protobuf.CarSetting.fromObject(object.setting); + } + if (object.odometer != null) + message.odometer = object.odometer >>> 0; + if (object.earnedCustomColor != null) + message.earnedCustomColor = Boolean(object.earnedCustomColor); + if (object.confirmedTutorials) { + if (!Array.isArray(object.confirmedTutorials)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.confirmedTutorials: array expected"); + message.confirmedTutorials = []; + for (let i = 0; i < object.confirmedTutorials.length; ++i) + switch (object.confirmedTutorials[i]) { + default: + case "TUTORIAL_ID_STORY": + case 0: + message.confirmedTutorials[i] = 0; + break; + case "TUTORIAL_ID_TIME_ATTACK": + case 1: + message.confirmedTutorials[i] = 1; + break; + case "TUTORIAL_ID_GHOST": + case 2: + message.confirmedTutorials[i] = 2; + break; + case "TUTORIAL_ID_GHOST_CHALLENGE": + case 3: + message.confirmedTutorials[i] = 3; + break; + case "TUTORIAL_ID_GHOST_LEVEL": + case 4: + message.confirmedTutorials[i] = 4; + break; + case "TUTORIAL_ID_UNUSED_5": + case 5: + message.confirmedTutorials[i] = 5; + break; + case "TUTORIAL_ID_GHOST_SEARCH": + case 6: + message.confirmedTutorials[i] = 6; + break; + case "TUTORIAL_ID_GHOST_COMPETITION": + case 7: + message.confirmedTutorials[i] = 7; + break; + case "TUTORIAL_ID_HP600_CARD": + case 8: + message.confirmedTutorials[i] = 8; + break; + case "TUTORIAL_ID_UNUSED_9": + case 9: + message.confirmedTutorials[i] = 9; + break; + case "TUTORIAL_ID_COMPETITION_QUALIFIED": + case 10: + message.confirmedTutorials[i] = 10; + break; + case "TUTORIAL_ID_COMPETITION_TERMINAL": + case 11: + message.confirmedTutorials[i] = 11; + break; + case "TUTORIAL_ID_COMPETITION_NOTICE": + case 12: + message.confirmedTutorials[i] = 12; + break; + case "TUTORIAL_ID_COMPETITION_FINISHED": + case 13: + message.confirmedTutorials[i] = 13; + break; + case "TUTORIAL_ID_UNUSED_14": + case 14: + message.confirmedTutorials[i] = 14; + break; + case "TUTORIAL_ID_UNUSED_15": + case 15: + message.confirmedTutorials[i] = 15; + break; + case "TUTORIAL_ID_UNUSED_16": + case 16: + message.confirmedTutorials[i] = 16; + break; + case "TUTORIAL_ID_UNUSED_17": + case 17: + message.confirmedTutorials[i] = 17; + break; + case "TUTORIAL_ID_UNUSED_18": + case 18: + message.confirmedTutorials[i] = 18; + break; + case "TUTORIAL_ID_UNUSED_19": + case 19: + message.confirmedTutorials[i] = 19; + break; + case "TUTORIAL_ID_GHOST_STAMP": + case 20: + message.confirmedTutorials[i] = 20; + break; + case "TUTORIAL_ID_GHOST_STAMP_DECLINED": + case 21: + message.confirmedTutorials[i] = 21; + break; + case "TUTORIAL_ID_GHOST_STAMP_FRIENDS": + case 22: + message.confirmedTutorials[i] = 22; + break; + case "TUTORIAL_ID_TERMINAL_SCRATCH": + case 23: + message.confirmedTutorials[i] = 23; + break; + case "TUTORIAL_ID_TURN_SCRATCH_SHEET": + case 24: + message.confirmedTutorials[i] = 24; + break; + case "TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN": + case 25: + message.confirmedTutorials[i] = 25; + break; + case "TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE": + case 26: + message.confirmedTutorials[i] = 26; + break; + case "TUTORIAL_ID_VS_CONTINUE_TICKET": + case 27: + message.confirmedTutorials[i] = 27; + break; + case "TUTORIAL_ID_UNUSED_28": + case 28: + message.confirmedTutorials[i] = 28; + break; + case "TUTORIAL_ID_UNUSED_29": + case 29: + message.confirmedTutorials[i] = 29; + break; + case "TUTORIAL_ID_UNUSED_30": + case 30: + message.confirmedTutorials[i] = 30; + break; + case "TUTORIAL_ID_DRESS_UP": + case 31: + message.confirmedTutorials[i] = 31; + break; + case "TUTORIAL_ID_MULTI_GHOST": + case 32: + message.confirmedTutorials[i] = 32; + break; + case "TUTORIAL_ID_STORY_NEW_FEATURE": + case 33: + message.confirmedTutorials[i] = 33; + break; + case "TUTORIAL_ID_GHOST_NEW_FEATURE": + case 34: + message.confirmedTutorials[i] = 34; + break; + case "TUTORIAL_ID_GHOST_REGION_MAP": + case 35: + message.confirmedTutorials[i] = 35; + break; + } + } + if (object.earnedItems) { + if (!Array.isArray(object.earnedItems)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedItems: array expected"); + message.earnedItems = []; + for (let i = 0; i < object.earnedItems.length; ++i) { + if (typeof object.earnedItems[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedItems: object expected"); + message.earnedItems[i] = $root.wm.protobuf.CarItem.fromObject(object.earnedItems[i]); + } + } + if (object.earnedUserItems) { + if (!Array.isArray(object.earnedUserItems)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedUserItems: array expected"); + message.earnedUserItems = []; + for (let i = 0; i < object.earnedUserItems.length; ++i) { + if (typeof object.earnedUserItems[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.earnedUserItems: object expected"); + message.earnedUserItems[i] = $root.wm.protobuf.UserItem.fromObject(object.earnedUserItems[i]); + } + } + if (object.preservedTitles) { + if (!Array.isArray(object.preservedTitles)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.preservedTitles: array expected"); + message.preservedTitles = []; + for (let i = 0; i < object.preservedTitles.length; ++i) + message.preservedTitles[i] = String(object.preservedTitles[i]); + } + if (object.neighborCars) { + if (!Array.isArray(object.neighborCars)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.neighborCars: array expected"); + message.neighborCars = []; + for (let i = 0; i < object.neighborCars.length; ++i) + message.neighborCars[i] = object.neighborCars[i] >>> 0; + } + if (object.stResult != null) { + if (typeof object.stResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.stResult: object expected"); + message.stResult = $root.wm.protobuf.SaveGameResultRequest.StoryResult.fromObject(object.stResult); + } + if (object.taResult != null) { + if (typeof object.taResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.taResult: object expected"); + message.taResult = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.fromObject(object.taResult); + } + if (object.vsResult != null) { + if (typeof object.vsResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.vsResult: object expected"); + message.vsResult = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.fromObject(object.vsResult); + } + if (object.rgResult != null) { + if (typeof object.rgResult !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.rgResult: object expected"); + message.rgResult = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.fromObject(object.rgResult); + } + return message; + }; + + /** + * Creates a plain object from a SaveGameResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {wm.protobuf.SaveGameResultRequest} message SaveGameResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveGameResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.confirmedTutorials = []; + object.earnedItems = []; + object.earnedUserItems = []; + object.preservedTitles = []; + object.neighborCars = []; + } + if (options.defaults) { + object.carId = 0; + object.gameMode = options.enums === String ? "MODE_STORY" : 1; + object.playedAt = 0; + object.playCount = 0; + object.retired = false; + object.timeup = false; + object.car = null; + object.setting = null; + object.odometer = 0; + object.earnedCustomColor = false; + object.stResult = null; + object.taResult = null; + object.vsResult = null; + object.rgResult = null; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.gameMode != null && message.hasOwnProperty("gameMode")) + object.gameMode = options.enums === String ? $root.wm.protobuf.GameMode[message.gameMode] : message.gameMode; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.playCount != null && message.hasOwnProperty("playCount")) + object.playCount = message.playCount; + if (message.retired != null && message.hasOwnProperty("retired")) + object.retired = message.retired; + if (message.timeup != null && message.hasOwnProperty("timeup")) + object.timeup = message.timeup; + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.setting != null && message.hasOwnProperty("setting")) + object.setting = $root.wm.protobuf.CarSetting.toObject(message.setting, options); + if (message.odometer != null && message.hasOwnProperty("odometer")) + object.odometer = message.odometer; + if (message.earnedCustomColor != null && message.hasOwnProperty("earnedCustomColor")) + object.earnedCustomColor = message.earnedCustomColor; + if (message.confirmedTutorials && message.confirmedTutorials.length) { + object.confirmedTutorials = []; + for (let j = 0; j < message.confirmedTutorials.length; ++j) + object.confirmedTutorials[j] = options.enums === String ? $root.wm.protobuf.TutorialType[message.confirmedTutorials[j]] : message.confirmedTutorials[j]; + } + if (message.earnedItems && message.earnedItems.length) { + object.earnedItems = []; + for (let j = 0; j < message.earnedItems.length; ++j) + object.earnedItems[j] = $root.wm.protobuf.CarItem.toObject(message.earnedItems[j], options); + } + if (message.earnedUserItems && message.earnedUserItems.length) { + object.earnedUserItems = []; + for (let j = 0; j < message.earnedUserItems.length; ++j) + object.earnedUserItems[j] = $root.wm.protobuf.UserItem.toObject(message.earnedUserItems[j], options); + } + if (message.preservedTitles && message.preservedTitles.length) { + object.preservedTitles = []; + for (let j = 0; j < message.preservedTitles.length; ++j) + object.preservedTitles[j] = message.preservedTitles[j]; + } + if (message.neighborCars && message.neighborCars.length) { + object.neighborCars = []; + for (let j = 0; j < message.neighborCars.length; ++j) + object.neighborCars[j] = message.neighborCars[j]; + } + if (message.stResult != null && message.hasOwnProperty("stResult")) + object.stResult = $root.wm.protobuf.SaveGameResultRequest.StoryResult.toObject(message.stResult, options); + if (message.taResult != null && message.hasOwnProperty("taResult")) + object.taResult = $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult.toObject(message.taResult, options); + if (message.vsResult != null && message.hasOwnProperty("vsResult")) + object.vsResult = $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult.toObject(message.vsResult, options); + if (message.rgResult != null && message.hasOwnProperty("rgResult")) + object.rgResult = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.toObject(message.rgResult, options); + return object; + }; + + /** + * Converts this SaveGameResultRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest + * @instance + * @returns {Object.} JSON object + */ + SaveGameResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveGameResultRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveGameResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest"; + }; + + SaveGameResultRequest.StoryResult = (function() { + + /** + * Properties of a StoryResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface IStoryResult + * @property {number} stPlayCount StoryResult stPlayCount + * @property {number} stPlayedStory StoryResult stPlayedStory + * @property {number|null} [tuningPoint] StoryResult tuningPoint + * @property {number|null} [stClearBits] StoryResult stClearBits + * @property {number|null} [stClearDivCount] StoryResult stClearDivCount + * @property {number|null} [stClearCount] StoryResult stClearCount + * @property {number|Long|null} [stLoseBits] StoryResult stLoseBits + * @property {number|null} [stConsecutiveWins] StoryResult stConsecutiveWins + * @property {boolean|null} [stCompleted_100Episodes] StoryResult stCompleted_100Episodes + * @property {boolean|null} [isInsuranceUsed] StoryResult isInsuranceUsed + */ + + /** + * Constructs a new StoryResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a StoryResult. + * @implements IStoryResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult=} [properties] Properties to set + */ + function StoryResult(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoryResult stPlayCount. + * @member {number} stPlayCount + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stPlayCount = 0; + + /** + * StoryResult stPlayedStory. + * @member {number} stPlayedStory + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stPlayedStory = 0; + + /** + * StoryResult tuningPoint. + * @member {number} tuningPoint + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.tuningPoint = 0; + + /** + * StoryResult stClearBits. + * @member {number} stClearBits + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stClearBits = 0; + + /** + * StoryResult stClearDivCount. + * @member {number} stClearDivCount + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stClearDivCount = 0; + + /** + * StoryResult stClearCount. + * @member {number} stClearCount + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stClearCount = 0; + + /** + * StoryResult stLoseBits. + * @member {number|Long} stLoseBits + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stLoseBits = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * StoryResult stConsecutiveWins. + * @member {number} stConsecutiveWins + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stConsecutiveWins = 0; + + /** + * StoryResult stCompleted_100Episodes. + * @member {boolean} stCompleted_100Episodes + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.stCompleted_100Episodes = false; + + /** + * StoryResult isInsuranceUsed. + * @member {boolean} isInsuranceUsed + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + */ + StoryResult.prototype.isInsuranceUsed = false; + + /** + * Creates a new StoryResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult instance + */ + StoryResult.create = function create(properties) { + return new StoryResult(properties); + }; + + /** + * Encodes the specified StoryResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult} message StoryResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.stPlayCount); + if (message.tuningPoint != null && Object.hasOwnProperty.call(message, "tuningPoint")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuningPoint); + if (message.stClearBits != null && Object.hasOwnProperty.call(message, "stClearBits")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stClearBits); + if (message.stClearDivCount != null && Object.hasOwnProperty.call(message, "stClearDivCount")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stClearDivCount); + if (message.stClearCount != null && Object.hasOwnProperty.call(message, "stClearCount")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.stClearCount); + if (message.stLoseBits != null && Object.hasOwnProperty.call(message, "stLoseBits")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.stLoseBits); + if (message.stConsecutiveWins != null && Object.hasOwnProperty.call(message, "stConsecutiveWins")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stConsecutiveWins); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.stPlayedStory); + if (message.stCompleted_100Episodes != null && Object.hasOwnProperty.call(message, "stCompleted_100Episodes")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.stCompleted_100Episodes); + if (message.isInsuranceUsed != null && Object.hasOwnProperty.call(message, "isInsuranceUsed")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.isInsuranceUsed); + return writer; + }; + + /** + * Encodes the specified StoryResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.StoryResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IStoryResult} message StoryResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoryResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoryResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.StoryResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.stPlayCount = reader.uint32(); + break; + } + case 9: { + message.stPlayedStory = reader.uint32(); + break; + } + case 2: { + message.tuningPoint = reader.uint32(); + break; + } + case 3: { + message.stClearBits = reader.uint32(); + break; + } + case 4: { + message.stClearDivCount = reader.uint32(); + break; + } + case 5: { + message.stClearCount = reader.uint32(); + break; + } + case 6: { + message.stLoseBits = reader.uint64(); + break; + } + case 8: { + message.stConsecutiveWins = reader.uint32(); + break; + } + case 10: { + message.stCompleted_100Episodes = reader.bool(); + break; + } + case 11: { + message.isInsuranceUsed = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("stPlayCount")) + throw $util.ProtocolError("missing required 'stPlayCount'", { instance: message }); + if (!message.hasOwnProperty("stPlayedStory")) + throw $util.ProtocolError("missing required 'stPlayedStory'", { instance: message }); + return message; + }; + + /** + * Decodes a StoryResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoryResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoryResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoryResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.stPlayCount)) + return "stPlayCount: integer expected"; + if (!$util.isInteger(message.stPlayedStory)) + return "stPlayedStory: integer expected"; + if (message.tuningPoint != null && message.hasOwnProperty("tuningPoint")) + if (!$util.isInteger(message.tuningPoint)) + return "tuningPoint: integer expected"; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + if (!$util.isInteger(message.stClearBits)) + return "stClearBits: integer expected"; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + if (!$util.isInteger(message.stClearDivCount)) + return "stClearDivCount: integer expected"; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + if (!$util.isInteger(message.stClearCount)) + return "stClearCount: integer expected"; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (!$util.isInteger(message.stLoseBits) && !(message.stLoseBits && $util.isInteger(message.stLoseBits.low) && $util.isInteger(message.stLoseBits.high))) + return "stLoseBits: integer|Long expected"; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + if (!$util.isInteger(message.stConsecutiveWins)) + return "stConsecutiveWins: integer expected"; + if (message.stCompleted_100Episodes != null && message.hasOwnProperty("stCompleted_100Episodes")) + if (typeof message.stCompleted_100Episodes !== "boolean") + return "stCompleted_100Episodes: boolean expected"; + if (message.isInsuranceUsed != null && message.hasOwnProperty("isInsuranceUsed")) + if (typeof message.isInsuranceUsed !== "boolean") + return "isInsuranceUsed: boolean expected"; + return null; + }; + + /** + * Creates a StoryResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.StoryResult} StoryResult + */ + StoryResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.StoryResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.StoryResult(); + if (object.stPlayCount != null) + message.stPlayCount = object.stPlayCount >>> 0; + if (object.stPlayedStory != null) + message.stPlayedStory = object.stPlayedStory >>> 0; + if (object.tuningPoint != null) + message.tuningPoint = object.tuningPoint >>> 0; + if (object.stClearBits != null) + message.stClearBits = object.stClearBits >>> 0; + if (object.stClearDivCount != null) + message.stClearDivCount = object.stClearDivCount >>> 0; + if (object.stClearCount != null) + message.stClearCount = object.stClearCount >>> 0; + if (object.stLoseBits != null) + if ($util.Long) + (message.stLoseBits = $util.Long.fromValue(object.stLoseBits)).unsigned = true; + else if (typeof object.stLoseBits === "string") + message.stLoseBits = parseInt(object.stLoseBits, 10); + else if (typeof object.stLoseBits === "number") + message.stLoseBits = object.stLoseBits; + else if (typeof object.stLoseBits === "object") + message.stLoseBits = new $util.LongBits(object.stLoseBits.low >>> 0, object.stLoseBits.high >>> 0).toNumber(true); + if (object.stConsecutiveWins != null) + message.stConsecutiveWins = object.stConsecutiveWins >>> 0; + if (object.stCompleted_100Episodes != null) + message.stCompleted_100Episodes = Boolean(object.stCompleted_100Episodes); + if (object.isInsuranceUsed != null) + message.isInsuranceUsed = Boolean(object.isInsuranceUsed); + return message; + }; + + /** + * Creates a plain object from a StoryResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.StoryResult} message StoryResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoryResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.stPlayCount = 0; + object.tuningPoint = 0; + object.stClearBits = 0; + object.stClearDivCount = 0; + object.stClearCount = 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.stLoseBits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.stLoseBits = options.longs === String ? "0" : 0; + object.stConsecutiveWins = 0; + object.stPlayedStory = 0; + object.stCompleted_100Episodes = false; + object.isInsuranceUsed = false; + } + if (message.stPlayCount != null && message.hasOwnProperty("stPlayCount")) + object.stPlayCount = message.stPlayCount; + if (message.tuningPoint != null && message.hasOwnProperty("tuningPoint")) + object.tuningPoint = message.tuningPoint; + if (message.stClearBits != null && message.hasOwnProperty("stClearBits")) + object.stClearBits = message.stClearBits; + if (message.stClearDivCount != null && message.hasOwnProperty("stClearDivCount")) + object.stClearDivCount = message.stClearDivCount; + if (message.stClearCount != null && message.hasOwnProperty("stClearCount")) + object.stClearCount = message.stClearCount; + if (message.stLoseBits != null && message.hasOwnProperty("stLoseBits")) + if (typeof message.stLoseBits === "number") + object.stLoseBits = options.longs === String ? String(message.stLoseBits) : message.stLoseBits; + else + object.stLoseBits = options.longs === String ? $util.Long.prototype.toString.call(message.stLoseBits) : options.longs === Number ? new $util.LongBits(message.stLoseBits.low >>> 0, message.stLoseBits.high >>> 0).toNumber(true) : message.stLoseBits; + if (message.stConsecutiveWins != null && message.hasOwnProperty("stConsecutiveWins")) + object.stConsecutiveWins = message.stConsecutiveWins; + if (message.stPlayedStory != null && message.hasOwnProperty("stPlayedStory")) + object.stPlayedStory = message.stPlayedStory; + if (message.stCompleted_100Episodes != null && message.hasOwnProperty("stCompleted_100Episodes")) + object.stCompleted_100Episodes = message.stCompleted_100Episodes; + if (message.isInsuranceUsed != null && message.hasOwnProperty("isInsuranceUsed")) + object.isInsuranceUsed = message.isInsuranceUsed; + return object; + }; + + /** + * Converts this StoryResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @instance + * @returns {Object.} JSON object + */ + StoryResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoryResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.StoryResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.StoryResult"; + }; + + return StoryResult; + })(); + + SaveGameResultRequest.TimeAttackResult = (function() { + + /** + * Properties of a TimeAttackResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface ITimeAttackResult + * @property {number} time TimeAttackResult time + * @property {number} course TimeAttackResult course + * @property {boolean} isMorning TimeAttackResult isMorning + * @property {number} section_1Time TimeAttackResult section_1Time + * @property {number} section_2Time TimeAttackResult section_2Time + * @property {number} section_3Time TimeAttackResult section_3Time + * @property {number} section_4Time TimeAttackResult section_4Time + * @property {number|null} [section_5Time] TimeAttackResult section_5Time + * @property {number|null} [section_6Time] TimeAttackResult section_6Time + * @property {number|null} [section_7Time] TimeAttackResult section_7Time + * @property {number|null} [wholeRank] TimeAttackResult wholeRank + * @property {number|null} [modelRank] TimeAttackResult modelRank + */ + + /** + * Constructs a new TimeAttackResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a TimeAttackResult. + * @implements ITimeAttackResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult=} [properties] Properties to set + */ + function TimeAttackResult(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeAttackResult time. + * @member {number} time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.time = 0; + + /** + * TimeAttackResult course. + * @member {number} course + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.course = 0; + + /** + * TimeAttackResult isMorning. + * @member {boolean} isMorning + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.isMorning = false; + + /** + * TimeAttackResult section_1Time. + * @member {number} section_1Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_1Time = 0; + + /** + * TimeAttackResult section_2Time. + * @member {number} section_2Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_2Time = 0; + + /** + * TimeAttackResult section_3Time. + * @member {number} section_3Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_3Time = 0; + + /** + * TimeAttackResult section_4Time. + * @member {number} section_4Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_4Time = 0; + + /** + * TimeAttackResult section_5Time. + * @member {number} section_5Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_5Time = 0; + + /** + * TimeAttackResult section_6Time. + * @member {number} section_6Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_6Time = 0; + + /** + * TimeAttackResult section_7Time. + * @member {number} section_7Time + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.section_7Time = 0; + + /** + * TimeAttackResult wholeRank. + * @member {number} wholeRank + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.wholeRank = 0; + + /** + * TimeAttackResult modelRank. + * @member {number} modelRank + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + */ + TimeAttackResult.prototype.modelRank = 0; + + /** + * Creates a new TimeAttackResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult instance + */ + TimeAttackResult.create = function create(properties) { + return new TimeAttackResult(properties); + }; + + /** + * Encodes the specified TimeAttackResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult} message TimeAttackResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.time); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.course); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.section_1Time); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.section_2Time); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.section_3Time); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.section_4Time); + if (message.section_5Time != null && Object.hasOwnProperty.call(message, "section_5Time")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.section_5Time); + if (message.section_6Time != null && Object.hasOwnProperty.call(message, "section_6Time")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.section_6Time); + if (message.section_7Time != null && Object.hasOwnProperty.call(message, "section_7Time")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.section_7Time); + if (message.wholeRank != null && Object.hasOwnProperty.call(message, "wholeRank")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.wholeRank); + if (message.modelRank != null && Object.hasOwnProperty.call(message, "modelRank")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.modelRank); + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isMorning); + return writer; + }; + + /** + * Encodes the specified TimeAttackResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.TimeAttackResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.ITimeAttackResult} message TimeAttackResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.time = reader.uint32(); + break; + } + case 2: { + message.course = reader.uint32(); + break; + } + case 12: { + message.isMorning = reader.bool(); + break; + } + case 3: { + message.section_1Time = reader.uint32(); + break; + } + case 4: { + message.section_2Time = reader.uint32(); + break; + } + case 5: { + message.section_3Time = reader.uint32(); + break; + } + case 6: { + message.section_4Time = reader.uint32(); + break; + } + case 7: { + message.section_5Time = reader.uint32(); + break; + } + case 8: { + message.section_6Time = reader.uint32(); + break; + } + case 9: { + message.section_7Time = reader.uint32(); + break; + } + case 10: { + message.wholeRank = reader.uint32(); + break; + } + case 11: { + message.modelRank = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("time")) + throw $util.ProtocolError("missing required 'time'", { instance: message }); + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + if (!message.hasOwnProperty("isMorning")) + throw $util.ProtocolError("missing required 'isMorning'", { instance: message }); + if (!message.hasOwnProperty("section_1Time")) + throw $util.ProtocolError("missing required 'section_1Time'", { instance: message }); + if (!message.hasOwnProperty("section_2Time")) + throw $util.ProtocolError("missing required 'section_2Time'", { instance: message }); + if (!message.hasOwnProperty("section_3Time")) + throw $util.ProtocolError("missing required 'section_3Time'", { instance: message }); + if (!message.hasOwnProperty("section_4Time")) + throw $util.ProtocolError("missing required 'section_4Time'", { instance: message }); + return message; + }; + + /** + * Decodes a TimeAttackResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeAttackResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeAttackResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.time)) + return "time: integer expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + if (typeof message.isMorning !== "boolean") + return "isMorning: boolean expected"; + if (!$util.isInteger(message.section_1Time)) + return "section_1Time: integer expected"; + if (!$util.isInteger(message.section_2Time)) + return "section_2Time: integer expected"; + if (!$util.isInteger(message.section_3Time)) + return "section_3Time: integer expected"; + if (!$util.isInteger(message.section_4Time)) + return "section_4Time: integer expected"; + if (message.section_5Time != null && message.hasOwnProperty("section_5Time")) + if (!$util.isInteger(message.section_5Time)) + return "section_5Time: integer expected"; + if (message.section_6Time != null && message.hasOwnProperty("section_6Time")) + if (!$util.isInteger(message.section_6Time)) + return "section_6Time: integer expected"; + if (message.section_7Time != null && message.hasOwnProperty("section_7Time")) + if (!$util.isInteger(message.section_7Time)) + return "section_7Time: integer expected"; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + if (!$util.isInteger(message.wholeRank)) + return "wholeRank: integer expected"; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + if (!$util.isInteger(message.modelRank)) + return "modelRank: integer expected"; + return null; + }; + + /** + * Creates a TimeAttackResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.TimeAttackResult} TimeAttackResult + */ + TimeAttackResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.TimeAttackResult(); + if (object.time != null) + message.time = object.time >>> 0; + if (object.course != null) + message.course = object.course >>> 0; + if (object.isMorning != null) + message.isMorning = Boolean(object.isMorning); + if (object.section_1Time != null) + message.section_1Time = object.section_1Time >>> 0; + if (object.section_2Time != null) + message.section_2Time = object.section_2Time >>> 0; + if (object.section_3Time != null) + message.section_3Time = object.section_3Time >>> 0; + if (object.section_4Time != null) + message.section_4Time = object.section_4Time >>> 0; + if (object.section_5Time != null) + message.section_5Time = object.section_5Time >>> 0; + if (object.section_6Time != null) + message.section_6Time = object.section_6Time >>> 0; + if (object.section_7Time != null) + message.section_7Time = object.section_7Time >>> 0; + if (object.wholeRank != null) + message.wholeRank = object.wholeRank >>> 0; + if (object.modelRank != null) + message.modelRank = object.modelRank >>> 0; + return message; + }; + + /** + * Creates a plain object from a TimeAttackResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.TimeAttackResult} message TimeAttackResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeAttackResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.time = 0; + object.course = 0; + object.section_1Time = 0; + object.section_2Time = 0; + object.section_3Time = 0; + object.section_4Time = 0; + object.section_5Time = 0; + object.section_6Time = 0; + object.section_7Time = 0; + object.wholeRank = 0; + object.modelRank = 0; + object.isMorning = false; + } + if (message.time != null && message.hasOwnProperty("time")) + object.time = message.time; + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + if (message.section_1Time != null && message.hasOwnProperty("section_1Time")) + object.section_1Time = message.section_1Time; + if (message.section_2Time != null && message.hasOwnProperty("section_2Time")) + object.section_2Time = message.section_2Time; + if (message.section_3Time != null && message.hasOwnProperty("section_3Time")) + object.section_3Time = message.section_3Time; + if (message.section_4Time != null && message.hasOwnProperty("section_4Time")) + object.section_4Time = message.section_4Time; + if (message.section_5Time != null && message.hasOwnProperty("section_5Time")) + object.section_5Time = message.section_5Time; + if (message.section_6Time != null && message.hasOwnProperty("section_6Time")) + object.section_6Time = message.section_6Time; + if (message.section_7Time != null && message.hasOwnProperty("section_7Time")) + object.section_7Time = message.section_7Time; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + object.wholeRank = message.wholeRank; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + object.modelRank = message.modelRank; + if (message.isMorning != null && message.hasOwnProperty("isMorning")) + object.isMorning = message.isMorning; + return object; + }; + + /** + * Converts this TimeAttackResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @instance + * @returns {Object.} JSON object + */ + TimeAttackResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeAttackResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.TimeAttackResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeAttackResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.TimeAttackResult"; + }; + + return TimeAttackResult; + })(); + + SaveGameResultRequest.VersusBattleResult = (function() { + + /** + * Properties of a VersusBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface IVersusBattleResult + * @property {number} result VersusBattleResult result + * @property {boolean} survived VersusBattleResult survived + * @property {Array.|null} [opponentCarId] VersusBattleResult opponentCarId + * @property {number} numOfPlayers VersusBattleResult numOfPlayers + * @property {number} area VersusBattleResult area + * @property {boolean} isMorning VersusBattleResult isMorning + * @property {number} vsPlayCount VersusBattleResult vsPlayCount + * @property {number|null} [vsBurstCount] VersusBattleResult vsBurstCount + * @property {number|null} [vsStarCount] VersusBattleResult vsStarCount + * @property {number|null} [vsCoolOrWild] VersusBattleResult vsCoolOrWild + * @property {number|null} [vsSmoothOrRough] VersusBattleResult vsSmoothOrRough + * @property {number|null} [vsTripleStarMedals] VersusBattleResult vsTripleStarMedals + * @property {number|null} [vsDoubleStarMedals] VersusBattleResult vsDoubleStarMedals + * @property {number|null} [vsSingleStarMedals] VersusBattleResult vsSingleStarMedals + * @property {number|null} [vsPlainMedals] VersusBattleResult vsPlainMedals + */ + + /** + * Constructs a new VersusBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a VersusBattleResult. + * @implements IVersusBattleResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult=} [properties] Properties to set + */ + function VersusBattleResult(properties) { + this.opponentCarId = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersusBattleResult result. + * @member {number} result + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.result = 0; + + /** + * VersusBattleResult survived. + * @member {boolean} survived + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.survived = false; + + /** + * VersusBattleResult opponentCarId. + * @member {Array.} opponentCarId + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.opponentCarId = $util.emptyArray; + + /** + * VersusBattleResult numOfPlayers. + * @member {number} numOfPlayers + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.numOfPlayers = 0; + + /** + * VersusBattleResult area. + * @member {number} area + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.area = 0; + + /** + * VersusBattleResult isMorning. + * @member {boolean} isMorning + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.isMorning = false; + + /** + * VersusBattleResult vsPlayCount. + * @member {number} vsPlayCount + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsPlayCount = 0; + + /** + * VersusBattleResult vsBurstCount. + * @member {number} vsBurstCount + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsBurstCount = 0; + + /** + * VersusBattleResult vsStarCount. + * @member {number} vsStarCount + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsStarCount = 0; + + /** + * VersusBattleResult vsCoolOrWild. + * @member {number} vsCoolOrWild + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsCoolOrWild = 0; + + /** + * VersusBattleResult vsSmoothOrRough. + * @member {number} vsSmoothOrRough + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsSmoothOrRough = 0; + + /** + * VersusBattleResult vsTripleStarMedals. + * @member {number} vsTripleStarMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsTripleStarMedals = 0; + + /** + * VersusBattleResult vsDoubleStarMedals. + * @member {number} vsDoubleStarMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsDoubleStarMedals = 0; + + /** + * VersusBattleResult vsSingleStarMedals. + * @member {number} vsSingleStarMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsSingleStarMedals = 0; + + /** + * VersusBattleResult vsPlainMedals. + * @member {number} vsPlainMedals + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + */ + VersusBattleResult.prototype.vsPlainMedals = 0; + + /** + * Creates a new VersusBattleResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult instance + */ + VersusBattleResult.create = function create(properties) { + return new VersusBattleResult(properties); + }; + + /** + * Encodes the specified VersusBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult} message VersusBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.result); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.survived); + if (message.opponentCarId != null && message.opponentCarId.length) + for (let i = 0; i < message.opponentCarId.length; ++i) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.opponentCarId[i]); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.numOfPlayers); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.vsPlayCount); + if (message.vsBurstCount != null && Object.hasOwnProperty.call(message, "vsBurstCount")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.vsBurstCount); + if (message.vsStarCount != null && Object.hasOwnProperty.call(message, "vsStarCount")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.vsStarCount); + if (message.vsCoolOrWild != null && Object.hasOwnProperty.call(message, "vsCoolOrWild")) + writer.uint32(/* id 9, wireType 0 =*/72).sint32(message.vsCoolOrWild); + if (message.vsSmoothOrRough != null && Object.hasOwnProperty.call(message, "vsSmoothOrRough")) + writer.uint32(/* id 10, wireType 0 =*/80).sint32(message.vsSmoothOrRough); + if (message.vsTripleStarMedals != null && Object.hasOwnProperty.call(message, "vsTripleStarMedals")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.vsTripleStarMedals); + if (message.vsDoubleStarMedals != null && Object.hasOwnProperty.call(message, "vsDoubleStarMedals")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.vsDoubleStarMedals); + if (message.vsSingleStarMedals != null && Object.hasOwnProperty.call(message, "vsSingleStarMedals")) + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.vsSingleStarMedals); + if (message.vsPlainMedals != null && Object.hasOwnProperty.call(message, "vsPlainMedals")) + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.vsPlainMedals); + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.area); + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.isMorning); + return writer; + }; + + /** + * Encodes the specified VersusBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.VersusBattleResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IVersusBattleResult} message VersusBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.uint32(); + break; + } + case 2: { + message.survived = reader.bool(); + break; + } + case 3: { + if (!(message.opponentCarId && message.opponentCarId.length)) + message.opponentCarId = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.opponentCarId.push(reader.uint32()); + } else + message.opponentCarId.push(reader.uint32()); + break; + } + case 5: { + message.numOfPlayers = reader.uint32(); + break; + } + case 17: { + message.area = reader.uint32(); + break; + } + case 18: { + message.isMorning = reader.bool(); + break; + } + case 6: { + message.vsPlayCount = reader.uint32(); + break; + } + case 7: { + message.vsBurstCount = reader.uint32(); + break; + } + case 8: { + message.vsStarCount = reader.uint32(); + break; + } + case 9: { + message.vsCoolOrWild = reader.sint32(); + break; + } + case 10: { + message.vsSmoothOrRough = reader.sint32(); + break; + } + case 11: { + message.vsTripleStarMedals = reader.uint32(); + break; + } + case 12: { + message.vsDoubleStarMedals = reader.uint32(); + break; + } + case 13: { + message.vsSingleStarMedals = reader.uint32(); + break; + } + case 14: { + message.vsPlainMedals = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("survived")) + throw $util.ProtocolError("missing required 'survived'", { instance: message }); + if (!message.hasOwnProperty("numOfPlayers")) + throw $util.ProtocolError("missing required 'numOfPlayers'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("isMorning")) + throw $util.ProtocolError("missing required 'isMorning'", { instance: message }); + if (!message.hasOwnProperty("vsPlayCount")) + throw $util.ProtocolError("missing required 'vsPlayCount'", { instance: message }); + return message; + }; + + /** + * Decodes a VersusBattleResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersusBattleResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersusBattleResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (typeof message.survived !== "boolean") + return "survived: boolean expected"; + if (message.opponentCarId != null && message.hasOwnProperty("opponentCarId")) { + if (!Array.isArray(message.opponentCarId)) + return "opponentCarId: array expected"; + for (let i = 0; i < message.opponentCarId.length; ++i) + if (!$util.isInteger(message.opponentCarId[i])) + return "opponentCarId: integer[] expected"; + } + if (!$util.isInteger(message.numOfPlayers)) + return "numOfPlayers: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (typeof message.isMorning !== "boolean") + return "isMorning: boolean expected"; + if (!$util.isInteger(message.vsPlayCount)) + return "vsPlayCount: integer expected"; + if (message.vsBurstCount != null && message.hasOwnProperty("vsBurstCount")) + if (!$util.isInteger(message.vsBurstCount)) + return "vsBurstCount: integer expected"; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + if (!$util.isInteger(message.vsStarCount)) + return "vsStarCount: integer expected"; + if (message.vsCoolOrWild != null && message.hasOwnProperty("vsCoolOrWild")) + if (!$util.isInteger(message.vsCoolOrWild)) + return "vsCoolOrWild: integer expected"; + if (message.vsSmoothOrRough != null && message.hasOwnProperty("vsSmoothOrRough")) + if (!$util.isInteger(message.vsSmoothOrRough)) + return "vsSmoothOrRough: integer expected"; + if (message.vsTripleStarMedals != null && message.hasOwnProperty("vsTripleStarMedals")) + if (!$util.isInteger(message.vsTripleStarMedals)) + return "vsTripleStarMedals: integer expected"; + if (message.vsDoubleStarMedals != null && message.hasOwnProperty("vsDoubleStarMedals")) + if (!$util.isInteger(message.vsDoubleStarMedals)) + return "vsDoubleStarMedals: integer expected"; + if (message.vsSingleStarMedals != null && message.hasOwnProperty("vsSingleStarMedals")) + if (!$util.isInteger(message.vsSingleStarMedals)) + return "vsSingleStarMedals: integer expected"; + if (message.vsPlainMedals != null && message.hasOwnProperty("vsPlainMedals")) + if (!$util.isInteger(message.vsPlainMedals)) + return "vsPlainMedals: integer expected"; + return null; + }; + + /** + * Creates a VersusBattleResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.VersusBattleResult} VersusBattleResult + */ + VersusBattleResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.VersusBattleResult(); + if (object.result != null) + message.result = object.result >>> 0; + if (object.survived != null) + message.survived = Boolean(object.survived); + if (object.opponentCarId) { + if (!Array.isArray(object.opponentCarId)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.VersusBattleResult.opponentCarId: array expected"); + message.opponentCarId = []; + for (let i = 0; i < object.opponentCarId.length; ++i) + message.opponentCarId[i] = object.opponentCarId[i] >>> 0; + } + if (object.numOfPlayers != null) + message.numOfPlayers = object.numOfPlayers >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.isMorning != null) + message.isMorning = Boolean(object.isMorning); + if (object.vsPlayCount != null) + message.vsPlayCount = object.vsPlayCount >>> 0; + if (object.vsBurstCount != null) + message.vsBurstCount = object.vsBurstCount >>> 0; + if (object.vsStarCount != null) + message.vsStarCount = object.vsStarCount >>> 0; + if (object.vsCoolOrWild != null) + message.vsCoolOrWild = object.vsCoolOrWild | 0; + if (object.vsSmoothOrRough != null) + message.vsSmoothOrRough = object.vsSmoothOrRough | 0; + if (object.vsTripleStarMedals != null) + message.vsTripleStarMedals = object.vsTripleStarMedals >>> 0; + if (object.vsDoubleStarMedals != null) + message.vsDoubleStarMedals = object.vsDoubleStarMedals >>> 0; + if (object.vsSingleStarMedals != null) + message.vsSingleStarMedals = object.vsSingleStarMedals >>> 0; + if (object.vsPlainMedals != null) + message.vsPlainMedals = object.vsPlainMedals >>> 0; + return message; + }; + + /** + * Creates a plain object from a VersusBattleResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.VersusBattleResult} message VersusBattleResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersusBattleResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.opponentCarId = []; + if (options.defaults) { + object.result = 0; + object.survived = false; + object.numOfPlayers = 0; + object.vsPlayCount = 0; + object.vsBurstCount = 0; + object.vsStarCount = 0; + object.vsCoolOrWild = 0; + object.vsSmoothOrRough = 0; + object.vsTripleStarMedals = 0; + object.vsDoubleStarMedals = 0; + object.vsSingleStarMedals = 0; + object.vsPlainMedals = 0; + object.area = 0; + object.isMorning = false; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.survived != null && message.hasOwnProperty("survived")) + object.survived = message.survived; + if (message.opponentCarId && message.opponentCarId.length) { + object.opponentCarId = []; + for (let j = 0; j < message.opponentCarId.length; ++j) + object.opponentCarId[j] = message.opponentCarId[j]; + } + if (message.numOfPlayers != null && message.hasOwnProperty("numOfPlayers")) + object.numOfPlayers = message.numOfPlayers; + if (message.vsPlayCount != null && message.hasOwnProperty("vsPlayCount")) + object.vsPlayCount = message.vsPlayCount; + if (message.vsBurstCount != null && message.hasOwnProperty("vsBurstCount")) + object.vsBurstCount = message.vsBurstCount; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + object.vsStarCount = message.vsStarCount; + if (message.vsCoolOrWild != null && message.hasOwnProperty("vsCoolOrWild")) + object.vsCoolOrWild = message.vsCoolOrWild; + if (message.vsSmoothOrRough != null && message.hasOwnProperty("vsSmoothOrRough")) + object.vsSmoothOrRough = message.vsSmoothOrRough; + if (message.vsTripleStarMedals != null && message.hasOwnProperty("vsTripleStarMedals")) + object.vsTripleStarMedals = message.vsTripleStarMedals; + if (message.vsDoubleStarMedals != null && message.hasOwnProperty("vsDoubleStarMedals")) + object.vsDoubleStarMedals = message.vsDoubleStarMedals; + if (message.vsSingleStarMedals != null && message.hasOwnProperty("vsSingleStarMedals")) + object.vsSingleStarMedals = message.vsSingleStarMedals; + if (message.vsPlainMedals != null && message.hasOwnProperty("vsPlainMedals")) + object.vsPlainMedals = message.vsPlainMedals; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.isMorning != null && message.hasOwnProperty("isMorning")) + object.isMorning = message.isMorning; + return object; + }; + + /** + * Converts this VersusBattleResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @instance + * @returns {Object.} JSON object + */ + VersusBattleResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VersusBattleResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.VersusBattleResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VersusBattleResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.VersusBattleResult"; + }; + + return VersusBattleResult; + })(); + + SaveGameResultRequest.GhostBattleResult = (function() { + + /** + * Properties of a GhostBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @interface IGhostBattleResult + * @property {Array.|null} [opponents] GhostBattleResult opponents + * @property {number} path GhostBattleResult path + * @property {boolean} isMorning GhostBattleResult isMorning + * @property {wm.protobuf.GhostSelectionMethod} selectionMethod GhostBattleResult selectionMethod + * @property {number|null} [stampSheetCount] GhostBattleResult stampSheetCount + * @property {Array.|null} [stampSheet] GhostBattleResult stampSheet + * @property {number|null} [rgStamp] GhostBattleResult rgStamp + * @property {Array.|null} [confirmedTransferredStampTargetCarIds] GhostBattleResult confirmedTransferredStampTargetCarIds + * @property {number} rgPlayCount GhostBattleResult rgPlayCount + * @property {number|null} [dressupLevel] GhostBattleResult dressupLevel + * @property {number|null} [dressupPoint] GhostBattleResult dressupPoint + * @property {Array.|null} [rgRegionMapScore] GhostBattleResult rgRegionMapScore + * @property {number|null} [competitionId] GhostBattleResult competitionId + * @property {number|null} [periodId] GhostBattleResult periodId + * @property {number|null} [brakingPoint] GhostBattleResult brakingPoint + * @property {boolean|null} [acquireCrown] GhostBattleResult acquireCrown + * @property {boolean|null} [acquireAllCrowns] GhostBattleResult acquireAllCrowns + */ + + /** + * Constructs a new GhostBattleResult. + * @memberof wm.protobuf.SaveGameResultRequest + * @classdesc Represents a GhostBattleResult. + * @implements IGhostBattleResult + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult=} [properties] Properties to set + */ + function GhostBattleResult(properties) { + this.opponents = []; + this.stampSheet = []; + this.confirmedTransferredStampTargetCarIds = []; + this.rgRegionMapScore = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleResult opponents. + * @member {Array.} opponents + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.opponents = $util.emptyArray; + + /** + * GhostBattleResult path. + * @member {number} path + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.path = 0; + + /** + * GhostBattleResult isMorning. + * @member {boolean} isMorning + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.isMorning = false; + + /** + * GhostBattleResult selectionMethod. + * @member {wm.protobuf.GhostSelectionMethod} selectionMethod + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.selectionMethod = 1; + + /** + * GhostBattleResult stampSheetCount. + * @member {number} stampSheetCount + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.stampSheetCount = 0; + + /** + * GhostBattleResult stampSheet. + * @member {Array.} stampSheet + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.stampSheet = $util.emptyArray; + + /** + * GhostBattleResult rgStamp. + * @member {number} rgStamp + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.rgStamp = 0; + + /** + * GhostBattleResult confirmedTransferredStampTargetCarIds. + * @member {Array.} confirmedTransferredStampTargetCarIds + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.confirmedTransferredStampTargetCarIds = $util.emptyArray; + + /** + * GhostBattleResult rgPlayCount. + * @member {number} rgPlayCount + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.rgPlayCount = 0; + + /** + * GhostBattleResult dressupLevel. + * @member {number} dressupLevel + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.dressupLevel = 0; + + /** + * GhostBattleResult dressupPoint. + * @member {number} dressupPoint + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.dressupPoint = 0; + + /** + * GhostBattleResult rgRegionMapScore. + * @member {Array.} rgRegionMapScore + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.rgRegionMapScore = $util.emptyArray; + + /** + * GhostBattleResult competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.competitionId = 0; + + /** + * GhostBattleResult periodId. + * @member {number} periodId + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.periodId = 0; + + /** + * GhostBattleResult brakingPoint. + * @member {number} brakingPoint + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.brakingPoint = 0; + + /** + * GhostBattleResult acquireCrown. + * @member {boolean} acquireCrown + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.acquireCrown = false; + + /** + * GhostBattleResult acquireAllCrowns. + * @member {boolean} acquireAllCrowns + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + */ + GhostBattleResult.prototype.acquireAllCrowns = false; + + /** + * Creates a new GhostBattleResult instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult instance + */ + GhostBattleResult.create = function create(properties) { + return new GhostBattleResult(properties); + }; + + /** + * Encodes the specified GhostBattleResult message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult} message GhostBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.opponents != null && message.opponents.length) + for (let i = 0; i < message.opponents.length; ++i) + $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.encode(message.opponents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.path); + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.selectionMethod); + if (message.stampSheetCount != null && Object.hasOwnProperty.call(message, "stampSheetCount")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.stampSheetCount); + if (message.stampSheet != null && message.stampSheet.length) + for (let i = 0; i < message.stampSheet.length; ++i) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.stampSheet[i]); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.rgPlayCount); + if (message.dressupLevel != null && Object.hasOwnProperty.call(message, "dressupLevel")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.dressupLevel); + if (message.dressupPoint != null && Object.hasOwnProperty.call(message, "dressupPoint")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.dressupPoint); + if (message.rgRegionMapScore != null && message.rgRegionMapScore.length) + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.rgRegionMapScore[i]); + if (message.competitionId != null && Object.hasOwnProperty.call(message, "competitionId")) + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.competitionId); + if (message.periodId != null && Object.hasOwnProperty.call(message, "periodId")) + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.periodId); + if (message.brakingPoint != null && Object.hasOwnProperty.call(message, "brakingPoint")) + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.brakingPoint); + if (message.acquireCrown != null && Object.hasOwnProperty.call(message, "acquireCrown")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.acquireCrown); + if (message.acquireAllCrowns != null && Object.hasOwnProperty.call(message, "acquireAllCrowns")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.acquireAllCrowns); + if (message.rgStamp != null && Object.hasOwnProperty.call(message, "rgStamp")) + writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.rgStamp); + if (message.confirmedTransferredStampTargetCarIds != null && message.confirmedTransferredStampTargetCarIds.length) + for (let i = 0; i < message.confirmedTransferredStampTargetCarIds.length; ++i) + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.confirmedTransferredStampTargetCarIds[i]); + writer.uint32(/* id 25, wireType 0 =*/200).bool(message.isMorning); + return writer; + }; + + /** + * Encodes the specified GhostBattleResult message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.IGhostBattleResult} message GhostBattleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.opponents && message.opponents.length)) + message.opponents = []; + message.opponents.push($root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.decode(reader, reader.uint32())); + break; + } + case 3: { + message.path = reader.uint32(); + break; + } + case 25: { + message.isMorning = reader.bool(); + break; + } + case 4: { + message.selectionMethod = reader.int32(); + break; + } + case 5: { + message.stampSheetCount = reader.uint32(); + break; + } + case 6: { + if (!(message.stampSheet && message.stampSheet.length)) + message.stampSheet = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampSheet.push(reader.uint32()); + } else + message.stampSheet.push(reader.uint32()); + break; + } + case 23: { + message.rgStamp = reader.uint32(); + break; + } + case 24: { + if (!(message.confirmedTransferredStampTargetCarIds && message.confirmedTransferredStampTargetCarIds.length)) + message.confirmedTransferredStampTargetCarIds = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.confirmedTransferredStampTargetCarIds.push(reader.uint32()); + } else + message.confirmedTransferredStampTargetCarIds.push(reader.uint32()); + break; + } + case 8: { + message.rgPlayCount = reader.uint32(); + break; + } + case 10: { + message.dressupLevel = reader.uint32(); + break; + } + case 11: { + message.dressupPoint = reader.uint32(); + break; + } + case 14: { + if (!(message.rgRegionMapScore && message.rgRegionMapScore.length)) + message.rgRegionMapScore = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegionMapScore.push(reader.uint32()); + } else + message.rgRegionMapScore.push(reader.uint32()); + break; + } + case 16: { + message.competitionId = reader.uint32(); + break; + } + case 17: { + message.periodId = reader.uint32(); + break; + } + case 18: { + message.brakingPoint = reader.uint32(); + break; + } + case 20: { + message.acquireCrown = reader.bool(); + break; + } + case 21: { + message.acquireAllCrowns = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("isMorning")) + throw $util.ProtocolError("missing required 'isMorning'", { instance: message }); + if (!message.hasOwnProperty("selectionMethod")) + throw $util.ProtocolError("missing required 'selectionMethod'", { instance: message }); + if (!message.hasOwnProperty("rgPlayCount")) + throw $util.ProtocolError("missing required 'rgPlayCount'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleResult message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.opponents != null && message.hasOwnProperty("opponents")) { + if (!Array.isArray(message.opponents)) + return "opponents: array expected"; + for (let i = 0; i < message.opponents.length; ++i) { + let error = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify(message.opponents[i]); + if (error) + return "opponents." + error; + } + } + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (typeof message.isMorning !== "boolean") + return "isMorning: boolean expected"; + switch (message.selectionMethod) { + default: + return "selectionMethod: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + if (!$util.isInteger(message.stampSheetCount)) + return "stampSheetCount: integer expected"; + if (message.stampSheet != null && message.hasOwnProperty("stampSheet")) { + if (!Array.isArray(message.stampSheet)) + return "stampSheet: array expected"; + for (let i = 0; i < message.stampSheet.length; ++i) + if (!$util.isInteger(message.stampSheet[i])) + return "stampSheet: integer[] expected"; + } + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + if (!$util.isInteger(message.rgStamp)) + return "rgStamp: integer expected"; + if (message.confirmedTransferredStampTargetCarIds != null && message.hasOwnProperty("confirmedTransferredStampTargetCarIds")) { + if (!Array.isArray(message.confirmedTransferredStampTargetCarIds)) + return "confirmedTransferredStampTargetCarIds: array expected"; + for (let i = 0; i < message.confirmedTransferredStampTargetCarIds.length; ++i) + if (!$util.isInteger(message.confirmedTransferredStampTargetCarIds[i])) + return "confirmedTransferredStampTargetCarIds: integer[] expected"; + } + if (!$util.isInteger(message.rgPlayCount)) + return "rgPlayCount: integer expected"; + if (message.dressupLevel != null && message.hasOwnProperty("dressupLevel")) + if (!$util.isInteger(message.dressupLevel)) + return "dressupLevel: integer expected"; + if (message.dressupPoint != null && message.hasOwnProperty("dressupPoint")) + if (!$util.isInteger(message.dressupPoint)) + return "dressupPoint: integer expected"; + if (message.rgRegionMapScore != null && message.hasOwnProperty("rgRegionMapScore")) { + if (!Array.isArray(message.rgRegionMapScore)) + return "rgRegionMapScore: array expected"; + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + if (!$util.isInteger(message.rgRegionMapScore[i])) + return "rgRegionMapScore: integer[] expected"; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + if (message.periodId != null && message.hasOwnProperty("periodId")) + if (!$util.isInteger(message.periodId)) + return "periodId: integer expected"; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + if (!$util.isInteger(message.brakingPoint)) + return "brakingPoint: integer expected"; + if (message.acquireCrown != null && message.hasOwnProperty("acquireCrown")) + if (typeof message.acquireCrown !== "boolean") + return "acquireCrown: boolean expected"; + if (message.acquireAllCrowns != null && message.hasOwnProperty("acquireAllCrowns")) + if (typeof message.acquireAllCrowns !== "boolean") + return "acquireAllCrowns: boolean expected"; + return null; + }; + + /** + * Creates a GhostBattleResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult} GhostBattleResult + */ + GhostBattleResult.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult(); + if (object.opponents) { + if (!Array.isArray(object.opponents)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.opponents: array expected"); + message.opponents = []; + for (let i = 0; i < object.opponents.length; ++i) { + if (typeof object.opponents[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.opponents: object expected"); + message.opponents[i] = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.fromObject(object.opponents[i]); + } + } + if (object.path != null) + message.path = object.path >>> 0; + if (object.isMorning != null) + message.isMorning = Boolean(object.isMorning); + switch (object.selectionMethod) { + case "GHOST_SEARCH_BY_REGION": + case 1: + message.selectionMethod = 1; + break; + case "GHOST_SELECT_BY_LEVEL": + case 2: + message.selectionMethod = 2; + break; + case "GHOST_SELECT_CROWN_MATCH": + case 3: + message.selectionMethod = 3; + break; + case "GHOST_SELECT_STAMP_MATCH": + case 4: + message.selectionMethod = 4; + break; + case "GHOST_SELECT_FROM_HISTORY": + case 5: + message.selectionMethod = 5; + break; + case "GHOST_SEARCH_BY_SHOP": + case 6: + message.selectionMethod = 6; + break; + case "GHOST_SEARCH_BY_NAME": + case 7: + message.selectionMethod = 7; + break; + case "GHOST_ACCEPT_CHALLENGER": + case 8: + message.selectionMethod = 8; + break; + case "GHOST_APPOINTMENT": + case 9: + message.selectionMethod = 9; + break; + case "GHOST_DEFAULT_OPPONENT": + case 10: + message.selectionMethod = 10; + break; + case "GHOST_COMPETITION": + case 11: + message.selectionMethod = 11; + break; + case "GHOST_SELECT_FROM_BOOKMARKS": + case 12: + message.selectionMethod = 12; + break; + } + if (object.stampSheetCount != null) + message.stampSheetCount = object.stampSheetCount >>> 0; + if (object.stampSheet) { + if (!Array.isArray(object.stampSheet)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.stampSheet: array expected"); + message.stampSheet = []; + for (let i = 0; i < object.stampSheet.length; ++i) + message.stampSheet[i] = object.stampSheet[i] >>> 0; + } + if (object.rgStamp != null) + message.rgStamp = object.rgStamp >>> 0; + if (object.confirmedTransferredStampTargetCarIds) { + if (!Array.isArray(object.confirmedTransferredStampTargetCarIds)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.confirmedTransferredStampTargetCarIds: array expected"); + message.confirmedTransferredStampTargetCarIds = []; + for (let i = 0; i < object.confirmedTransferredStampTargetCarIds.length; ++i) + message.confirmedTransferredStampTargetCarIds[i] = object.confirmedTransferredStampTargetCarIds[i] >>> 0; + } + if (object.rgPlayCount != null) + message.rgPlayCount = object.rgPlayCount >>> 0; + if (object.dressupLevel != null) + message.dressupLevel = object.dressupLevel >>> 0; + if (object.dressupPoint != null) + message.dressupPoint = object.dressupPoint >>> 0; + if (object.rgRegionMapScore) { + if (!Array.isArray(object.rgRegionMapScore)) + throw TypeError(".wm.protobuf.SaveGameResultRequest.GhostBattleResult.rgRegionMapScore: array expected"); + message.rgRegionMapScore = []; + for (let i = 0; i < object.rgRegionMapScore.length; ++i) + message.rgRegionMapScore[i] = object.rgRegionMapScore[i] >>> 0; + } + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + if (object.periodId != null) + message.periodId = object.periodId >>> 0; + if (object.brakingPoint != null) + message.brakingPoint = object.brakingPoint >>> 0; + if (object.acquireCrown != null) + message.acquireCrown = Boolean(object.acquireCrown); + if (object.acquireAllCrowns != null) + message.acquireAllCrowns = Boolean(object.acquireAllCrowns); + return message; + }; + + /** + * Creates a plain object from a GhostBattleResult message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult} message GhostBattleResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.opponents = []; + object.stampSheet = []; + object.rgRegionMapScore = []; + object.confirmedTransferredStampTargetCarIds = []; + } + if (options.defaults) { + object.path = 0; + object.selectionMethod = options.enums === String ? "GHOST_SEARCH_BY_REGION" : 1; + object.stampSheetCount = 0; + object.rgPlayCount = 0; + object.dressupLevel = 0; + object.dressupPoint = 0; + object.competitionId = 0; + object.periodId = 0; + object.brakingPoint = 0; + object.acquireCrown = false; + object.acquireAllCrowns = false; + object.rgStamp = 0; + object.isMorning = false; + } + if (message.opponents && message.opponents.length) { + object.opponents = []; + for (let j = 0; j < message.opponents.length; ++j) + object.opponents[j] = $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.toObject(message.opponents[j], options); + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.selectionMethod != null && message.hasOwnProperty("selectionMethod")) + object.selectionMethod = options.enums === String ? $root.wm.protobuf.GhostSelectionMethod[message.selectionMethod] : message.selectionMethod; + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + object.stampSheetCount = message.stampSheetCount; + if (message.stampSheet && message.stampSheet.length) { + object.stampSheet = []; + for (let j = 0; j < message.stampSheet.length; ++j) + object.stampSheet[j] = message.stampSheet[j]; + } + if (message.rgPlayCount != null && message.hasOwnProperty("rgPlayCount")) + object.rgPlayCount = message.rgPlayCount; + if (message.dressupLevel != null && message.hasOwnProperty("dressupLevel")) + object.dressupLevel = message.dressupLevel; + if (message.dressupPoint != null && message.hasOwnProperty("dressupPoint")) + object.dressupPoint = message.dressupPoint; + if (message.rgRegionMapScore && message.rgRegionMapScore.length) { + object.rgRegionMapScore = []; + for (let j = 0; j < message.rgRegionMapScore.length; ++j) + object.rgRegionMapScore[j] = message.rgRegionMapScore[j]; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + if (message.periodId != null && message.hasOwnProperty("periodId")) + object.periodId = message.periodId; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + object.brakingPoint = message.brakingPoint; + if (message.acquireCrown != null && message.hasOwnProperty("acquireCrown")) + object.acquireCrown = message.acquireCrown; + if (message.acquireAllCrowns != null && message.hasOwnProperty("acquireAllCrowns")) + object.acquireAllCrowns = message.acquireAllCrowns; + if (message.rgStamp != null && message.hasOwnProperty("rgStamp")) + object.rgStamp = message.rgStamp; + if (message.confirmedTransferredStampTargetCarIds && message.confirmedTransferredStampTargetCarIds.length) { + object.confirmedTransferredStampTargetCarIds = []; + for (let j = 0; j < message.confirmedTransferredStampTargetCarIds.length; ++j) + object.confirmedTransferredStampTargetCarIds[j] = message.confirmedTransferredStampTargetCarIds[j]; + } + if (message.isMorning != null && message.hasOwnProperty("isMorning")) + object.isMorning = message.isMorning; + return object; + }; + + /** + * Converts this GhostBattleResult to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @instance + * @returns {Object.} JSON object + */ + GhostBattleResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleResult + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.GhostBattleResult"; + }; + + GhostBattleResult.GhostBattleOpponent = (function() { + + /** + * Properties of a GhostBattleOpponent. + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @interface IGhostBattleOpponent + * @property {number} result GhostBattleOpponent result + * @property {number} carId GhostBattleOpponent carId + * @property {number} tunePower GhostBattleOpponent tunePower + * @property {number} tuneHandling GhostBattleOpponent tuneHandling + * @property {boolean|null} [receiveStamp] GhostBattleOpponent receiveStamp + */ + + /** + * Constructs a new GhostBattleOpponent. + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult + * @classdesc Represents a GhostBattleOpponent. + * @implements IGhostBattleOpponent + * @constructor + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent=} [properties] Properties to set + */ + function GhostBattleOpponent(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleOpponent result. + * @member {number} result + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.result = 0; + + /** + * GhostBattleOpponent carId. + * @member {number} carId + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.carId = 0; + + /** + * GhostBattleOpponent tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.tunePower = 0; + + /** + * GhostBattleOpponent tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.tuneHandling = 0; + + /** + * GhostBattleOpponent receiveStamp. + * @member {boolean} receiveStamp + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + */ + GhostBattleOpponent.prototype.receiveStamp = false; + + /** + * Creates a new GhostBattleOpponent instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent instance + */ + GhostBattleOpponent.create = function create(properties) { + return new GhostBattleOpponent(properties); + }; + + /** + * Encodes the specified GhostBattleOpponent message. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent} message GhostBattleOpponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleOpponent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).sint32(message.result); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.carId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tunePower); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.tuneHandling); + if (message.receiveStamp != null && Object.hasOwnProperty.call(message, "receiveStamp")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.receiveStamp); + return writer; + }; + + /** + * Encodes the specified GhostBattleOpponent message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.IGhostBattleOpponent} message GhostBattleOpponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleOpponent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleOpponent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.sint32(); + break; + } + case 2: { + message.carId = reader.uint32(); + break; + } + case 3: { + message.tunePower = reader.uint32(); + break; + } + case 4: { + message.tuneHandling = reader.uint32(); + break; + } + case 5: { + message.receiveStamp = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleOpponent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleOpponent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleOpponent message. + * @function verify + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleOpponent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.receiveStamp != null && message.hasOwnProperty("receiveStamp")) + if (typeof message.receiveStamp !== "boolean") + return "receiveStamp: boolean expected"; + return null; + }; + + /** + * Creates a GhostBattleOpponent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} GhostBattleOpponent + */ + GhostBattleOpponent.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent) + return object; + let message = new $root.wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent(); + if (object.result != null) + message.result = object.result | 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.receiveStamp != null) + message.receiveStamp = Boolean(object.receiveStamp); + return message; + }; + + /** + * Creates a plain object from a GhostBattleOpponent message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent} message GhostBattleOpponent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleOpponent.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.result = 0; + object.carId = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.receiveStamp = false; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.receiveStamp != null && message.hasOwnProperty("receiveStamp")) + object.receiveStamp = message.receiveStamp; + return object; + }; + + /** + * Converts this GhostBattleOpponent to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @instance + * @returns {Object.} JSON object + */ + GhostBattleOpponent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleOpponent + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleOpponent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultRequest.GhostBattleResult.GhostBattleOpponent"; + }; + + return GhostBattleOpponent; + })(); + + return GhostBattleResult; + })(); + + return SaveGameResultRequest; + })(); + + protobuf.SaveGameResultResponse = (function() { + + /** + * Properties of a SaveGameResultResponse. + * @memberof wm.protobuf + * @interface ISaveGameResultResponse + * @property {wm.protobuf.ErrorCode} error SaveGameResultResponse error + * @property {number|Long|null} [ghostSessionId] SaveGameResultResponse ghostSessionId + * @property {Array.|null} [availableTickets] SaveGameResultResponse availableTickets + */ + + /** + * Constructs a new SaveGameResultResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveGameResultResponse. + * @implements ISaveGameResultResponse + * @constructor + * @param {wm.protobuf.ISaveGameResultResponse=} [properties] Properties to set + */ + function SaveGameResultResponse(properties) { + this.availableTickets = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveGameResultResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + */ + SaveGameResultResponse.prototype.error = 0; + + /** + * SaveGameResultResponse ghostSessionId. + * @member {number|Long} ghostSessionId + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + */ + SaveGameResultResponse.prototype.ghostSessionId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * SaveGameResultResponse availableTickets. + * @member {Array.} availableTickets + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + */ + SaveGameResultResponse.prototype.availableTickets = $util.emptyArray; + + /** + * Creates a new SaveGameResultResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.ISaveGameResultResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse instance + */ + SaveGameResultResponse.create = function create(properties) { + return new SaveGameResultResponse(properties); + }; + + /** + * Encodes the specified SaveGameResultResponse message. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.ISaveGameResultResponse} message SaveGameResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.ghostSessionId != null && Object.hasOwnProperty.call(message, "ghostSessionId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.ghostSessionId); + if (message.availableTickets != null && message.availableTickets.length) + for (let i = 0; i < message.availableTickets.length; ++i) + $root.wm.protobuf.UserItem.encode(message.availableTickets[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveGameResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveGameResultResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.ISaveGameResultResponse} message SaveGameResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveGameResultResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveGameResultResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.ghostSessionId = reader.uint64(); + break; + } + case 3: { + if (!(message.availableTickets && message.availableTickets.length)) + message.availableTickets = []; + message.availableTickets.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveGameResultResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveGameResultResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveGameResultResponse message. + * @function verify + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveGameResultResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.ghostSessionId != null && message.hasOwnProperty("ghostSessionId")) + if (!$util.isInteger(message.ghostSessionId) && !(message.ghostSessionId && $util.isInteger(message.ghostSessionId.low) && $util.isInteger(message.ghostSessionId.high))) + return "ghostSessionId: integer|Long expected"; + if (message.availableTickets != null && message.hasOwnProperty("availableTickets")) { + if (!Array.isArray(message.availableTickets)) + return "availableTickets: array expected"; + for (let i = 0; i < message.availableTickets.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.availableTickets[i]); + if (error) + return "availableTickets." + error; + } + } + return null; + }; + + /** + * Creates a SaveGameResultResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveGameResultResponse} SaveGameResultResponse + */ + SaveGameResultResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveGameResultResponse) + return object; + let message = new $root.wm.protobuf.SaveGameResultResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.ghostSessionId != null) + if ($util.Long) + (message.ghostSessionId = $util.Long.fromValue(object.ghostSessionId)).unsigned = true; + else if (typeof object.ghostSessionId === "string") + message.ghostSessionId = parseInt(object.ghostSessionId, 10); + else if (typeof object.ghostSessionId === "number") + message.ghostSessionId = object.ghostSessionId; + else if (typeof object.ghostSessionId === "object") + message.ghostSessionId = new $util.LongBits(object.ghostSessionId.low >>> 0, object.ghostSessionId.high >>> 0).toNumber(true); + if (object.availableTickets) { + if (!Array.isArray(object.availableTickets)) + throw TypeError(".wm.protobuf.SaveGameResultResponse.availableTickets: array expected"); + message.availableTickets = []; + for (let i = 0; i < object.availableTickets.length; ++i) { + if (typeof object.availableTickets[i] !== "object") + throw TypeError(".wm.protobuf.SaveGameResultResponse.availableTickets: object expected"); + message.availableTickets[i] = $root.wm.protobuf.UserItem.fromObject(object.availableTickets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SaveGameResultResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {wm.protobuf.SaveGameResultResponse} message SaveGameResultResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveGameResultResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.availableTickets = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.ghostSessionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ghostSessionId = options.longs === String ? "0" : 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.ghostSessionId != null && message.hasOwnProperty("ghostSessionId")) + if (typeof message.ghostSessionId === "number") + object.ghostSessionId = options.longs === String ? String(message.ghostSessionId) : message.ghostSessionId; + else + object.ghostSessionId = options.longs === String ? $util.Long.prototype.toString.call(message.ghostSessionId) : options.longs === Number ? new $util.LongBits(message.ghostSessionId.low >>> 0, message.ghostSessionId.high >>> 0).toNumber(true) : message.ghostSessionId; + if (message.availableTickets && message.availableTickets.length) { + object.availableTickets = []; + for (let j = 0; j < message.availableTickets.length; ++j) + object.availableTickets[j] = $root.wm.protobuf.UserItem.toObject(message.availableTickets[j], options); + } + return object; + }; + + /** + * Converts this SaveGameResultResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveGameResultResponse + * @instance + * @returns {Object.} JSON object + */ + SaveGameResultResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveGameResultResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveGameResultResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveGameResultResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveGameResultResponse"; + }; + + return SaveGameResultResponse; + })(); + + protobuf.SaveChargeRequest = (function() { + + /** + * Properties of a SaveChargeRequest. + * @memberof wm.protobuf + * @interface ISaveChargeRequest + * @property {Array.|null} [chargeLogs] SaveChargeRequest chargeLogs + */ + + /** + * Constructs a new SaveChargeRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveChargeRequest. + * @implements ISaveChargeRequest + * @constructor + * @param {wm.protobuf.ISaveChargeRequest=} [properties] Properties to set + */ + function SaveChargeRequest(properties) { + this.chargeLogs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveChargeRequest chargeLogs. + * @member {Array.} chargeLogs + * @memberof wm.protobuf.SaveChargeRequest + * @instance + */ + SaveChargeRequest.prototype.chargeLogs = $util.emptyArray; + + /** + * Creates a new SaveChargeRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.ISaveChargeRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest instance + */ + SaveChargeRequest.create = function create(properties) { + return new SaveChargeRequest(properties); + }; + + /** + * Encodes the specified SaveChargeRequest message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.ISaveChargeRequest} message SaveChargeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chargeLogs != null && message.chargeLogs.length) + for (let i = 0; i < message.chargeLogs.length; ++i) + $root.wm.protobuf.SaveChargeRequest.ChargeLog.encode(message.chargeLogs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveChargeRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.ISaveChargeRequest} message SaveChargeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveChargeRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.chargeLogs && message.chargeLogs.length)) + message.chargeLogs = []; + message.chargeLogs.push($root.wm.protobuf.SaveChargeRequest.ChargeLog.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SaveChargeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveChargeRequest message. + * @function verify + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveChargeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chargeLogs != null && message.hasOwnProperty("chargeLogs")) { + if (!Array.isArray(message.chargeLogs)) + return "chargeLogs: array expected"; + for (let i = 0; i < message.chargeLogs.length; ++i) { + let error = $root.wm.protobuf.SaveChargeRequest.ChargeLog.verify(message.chargeLogs[i]); + if (error) + return "chargeLogs." + error; + } + } + return null; + }; + + /** + * Creates a SaveChargeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveChargeRequest} SaveChargeRequest + */ + SaveChargeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveChargeRequest) + return object; + let message = new $root.wm.protobuf.SaveChargeRequest(); + if (object.chargeLogs) { + if (!Array.isArray(object.chargeLogs)) + throw TypeError(".wm.protobuf.SaveChargeRequest.chargeLogs: array expected"); + message.chargeLogs = []; + for (let i = 0; i < object.chargeLogs.length; ++i) { + if (typeof object.chargeLogs[i] !== "object") + throw TypeError(".wm.protobuf.SaveChargeRequest.chargeLogs: object expected"); + message.chargeLogs[i] = $root.wm.protobuf.SaveChargeRequest.ChargeLog.fromObject(object.chargeLogs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SaveChargeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {wm.protobuf.SaveChargeRequest} message SaveChargeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveChargeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.chargeLogs = []; + if (message.chargeLogs && message.chargeLogs.length) { + object.chargeLogs = []; + for (let j = 0; j < message.chargeLogs.length; ++j) + object.chargeLogs[j] = $root.wm.protobuf.SaveChargeRequest.ChargeLog.toObject(message.chargeLogs[j], options); + } + return object; + }; + + /** + * Converts this SaveChargeRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveChargeRequest + * @instance + * @returns {Object.} JSON object + */ + SaveChargeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveChargeRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveChargeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveChargeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveChargeRequest"; + }; + + SaveChargeRequest.ChargeLog = (function() { + + /** + * Properties of a ChargeLog. + * @memberof wm.protobuf.SaveChargeRequest + * @interface IChargeLog + * @property {number} datetime ChargeLog datetime + * @property {string} pcbSerial ChargeLog pcbSerial + * @property {string} placeId ChargeLog placeId + * @property {number|null} [userId] ChargeLog userId + */ + + /** + * Constructs a new ChargeLog. + * @memberof wm.protobuf.SaveChargeRequest + * @classdesc Represents a ChargeLog. + * @implements IChargeLog + * @constructor + * @param {wm.protobuf.SaveChargeRequest.IChargeLog=} [properties] Properties to set + */ + function ChargeLog(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChargeLog datetime. + * @member {number} datetime + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.datetime = 0; + + /** + * ChargeLog pcbSerial. + * @member {string} pcbSerial + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.pcbSerial = ""; + + /** + * ChargeLog placeId. + * @member {string} placeId + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.placeId = ""; + + /** + * ChargeLog userId. + * @member {number} userId + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + */ + ChargeLog.prototype.userId = 0; + + /** + * Creates a new ChargeLog instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.IChargeLog=} [properties] Properties to set + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog instance + */ + ChargeLog.create = function create(properties) { + return new ChargeLog(properties); + }; + + /** + * Encodes the specified ChargeLog message. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.IChargeLog} message ChargeLog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChargeLog.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.datetime); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pcbSerial); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.placeId); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified ChargeLog message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeRequest.ChargeLog.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.IChargeLog} message ChargeLog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChargeLog.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChargeLog message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChargeLog.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveChargeRequest.ChargeLog(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datetime = reader.uint32(); + break; + } + case 2: { + message.pcbSerial = reader.string(); + break; + } + case 3: { + message.placeId = reader.string(); + break; + } + case 4: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("datetime")) + throw $util.ProtocolError("missing required 'datetime'", { instance: message }); + if (!message.hasOwnProperty("pcbSerial")) + throw $util.ProtocolError("missing required 'pcbSerial'", { instance: message }); + if (!message.hasOwnProperty("placeId")) + throw $util.ProtocolError("missing required 'placeId'", { instance: message }); + return message; + }; + + /** + * Decodes a ChargeLog message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChargeLog.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChargeLog message. + * @function verify + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChargeLog.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.datetime)) + return "datetime: integer expected"; + if (!$util.isString(message.pcbSerial)) + return "pcbSerial: string expected"; + if (!$util.isString(message.placeId)) + return "placeId: string expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a ChargeLog message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveChargeRequest.ChargeLog} ChargeLog + */ + ChargeLog.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveChargeRequest.ChargeLog) + return object; + let message = new $root.wm.protobuf.SaveChargeRequest.ChargeLog(); + if (object.datetime != null) + message.datetime = object.datetime >>> 0; + if (object.pcbSerial != null) + message.pcbSerial = String(object.pcbSerial); + if (object.placeId != null) + message.placeId = String(object.placeId); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a ChargeLog message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {wm.protobuf.SaveChargeRequest.ChargeLog} message ChargeLog + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChargeLog.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.datetime = 0; + object.pcbSerial = ""; + object.placeId = ""; + object.userId = 0; + } + if (message.datetime != null && message.hasOwnProperty("datetime")) + object.datetime = message.datetime; + if (message.pcbSerial != null && message.hasOwnProperty("pcbSerial")) + object.pcbSerial = message.pcbSerial; + if (message.placeId != null && message.hasOwnProperty("placeId")) + object.placeId = message.placeId; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this ChargeLog to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @instance + * @returns {Object.} JSON object + */ + ChargeLog.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChargeLog + * @function getTypeUrl + * @memberof wm.protobuf.SaveChargeRequest.ChargeLog + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChargeLog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveChargeRequest.ChargeLog"; + }; + + return ChargeLog; + })(); + + return SaveChargeRequest; + })(); + + protobuf.SaveChargeResponse = (function() { + + /** + * Properties of a SaveChargeResponse. + * @memberof wm.protobuf + * @interface ISaveChargeResponse + * @property {wm.protobuf.ErrorCode} error SaveChargeResponse error + */ + + /** + * Constructs a new SaveChargeResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveChargeResponse. + * @implements ISaveChargeResponse + * @constructor + * @param {wm.protobuf.ISaveChargeResponse=} [properties] Properties to set + */ + function SaveChargeResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveChargeResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveChargeResponse + * @instance + */ + SaveChargeResponse.prototype.error = 0; + + /** + * Creates a new SaveChargeResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.ISaveChargeResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse instance + */ + SaveChargeResponse.create = function create(properties) { + return new SaveChargeResponse(properties); + }; + + /** + * Encodes the specified SaveChargeResponse message. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.ISaveChargeResponse} message SaveChargeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveChargeResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveChargeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.ISaveChargeResponse} message SaveChargeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveChargeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveChargeResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveChargeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveChargeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveChargeResponse message. + * @function verify + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveChargeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveChargeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveChargeResponse} SaveChargeResponse + */ + SaveChargeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveChargeResponse) + return object; + let message = new $root.wm.protobuf.SaveChargeResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveChargeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {wm.protobuf.SaveChargeResponse} message SaveChargeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveChargeResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveChargeResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveChargeResponse + * @instance + * @returns {Object.} JSON object + */ + SaveChargeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveChargeResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveChargeResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveChargeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveChargeResponse"; + }; + + return SaveChargeResponse; + })(); + + protobuf.LoadGhostBattleInfoRequest = (function() { + + /** + * Properties of a LoadGhostBattleInfoRequest. + * @memberof wm.protobuf + * @interface ILoadGhostBattleInfoRequest + * @property {number} carId LoadGhostBattleInfoRequest carId + */ + + /** + * Constructs a new LoadGhostBattleInfoRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostBattleInfoRequest. + * @implements ILoadGhostBattleInfoRequest + * @constructor + * @param {wm.protobuf.ILoadGhostBattleInfoRequest=} [properties] Properties to set + */ + function LoadGhostBattleInfoRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostBattleInfoRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @instance + */ + LoadGhostBattleInfoRequest.prototype.carId = 0; + + /** + * Creates a new LoadGhostBattleInfoRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest instance + */ + LoadGhostBattleInfoRequest.create = function create(properties) { + return new LoadGhostBattleInfoRequest(properties); + }; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoRequest} message LoadGhostBattleInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + return writer; + }; + + /** + * Encodes the specified LoadGhostBattleInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoRequest} message LoadGhostBattleInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostBattleInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostBattleInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostBattleInfoRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostBattleInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + return null; + }; + + /** + * Creates a LoadGhostBattleInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostBattleInfoRequest} LoadGhostBattleInfoRequest + */ + LoadGhostBattleInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostBattleInfoRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostBattleInfoRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGhostBattleInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {wm.protobuf.LoadGhostBattleInfoRequest} message LoadGhostBattleInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostBattleInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + return object; + }; + + /** + * Converts this LoadGhostBattleInfoRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostBattleInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostBattleInfoRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostBattleInfoRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostBattleInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostBattleInfoRequest"; + }; + + return LoadGhostBattleInfoRequest; + })(); + + protobuf.LoadGhostBattleInfoResponse = (function() { + + /** + * Properties of a LoadGhostBattleInfoResponse. + * @memberof wm.protobuf + * @interface ILoadGhostBattleInfoResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostBattleInfoResponse error + * @property {Array.|null} [friendCars] LoadGhostBattleInfoResponse friendCars + * @property {Array.|null} [challengers] LoadGhostBattleInfoResponse challengers + * @property {Array.|null} [stampTargetCars] LoadGhostBattleInfoResponse stampTargetCars + * @property {Array.|null} [previousVersionStampTargetCars] LoadGhostBattleInfoResponse previousVersionStampTargetCars + * @property {Array.|null} [bookmarkedCars] LoadGhostBattleInfoResponse bookmarkedCars + * @property {Array.|null} [history] LoadGhostBattleInfoResponse history + * @property {Array.|null} [weakenedCars] LoadGhostBattleInfoResponse weakenedCars + * @property {number} stampSheetCount LoadGhostBattleInfoResponse stampSheetCount + * @property {Array.|null} [stampSheet] LoadGhostBattleInfoResponse stampSheet + * @property {Array.|null} [stampReturnStats] LoadGhostBattleInfoResponse stampReturnStats + */ + + /** + * Constructs a new LoadGhostBattleInfoResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostBattleInfoResponse. + * @implements ILoadGhostBattleInfoResponse + * @constructor + * @param {wm.protobuf.ILoadGhostBattleInfoResponse=} [properties] Properties to set + */ + function LoadGhostBattleInfoResponse(properties) { + this.friendCars = []; + this.challengers = []; + this.stampTargetCars = []; + this.previousVersionStampTargetCars = []; + this.bookmarkedCars = []; + this.history = []; + this.weakenedCars = []; + this.stampSheet = []; + this.stampReturnStats = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostBattleInfoResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.error = 0; + + /** + * LoadGhostBattleInfoResponse friendCars. + * @member {Array.} friendCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.friendCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse challengers. + * @member {Array.} challengers + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.challengers = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse stampTargetCars. + * @member {Array.} stampTargetCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampTargetCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse previousVersionStampTargetCars. + * @member {Array.} previousVersionStampTargetCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.previousVersionStampTargetCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse bookmarkedCars. + * @member {Array.} bookmarkedCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.bookmarkedCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse history. + * @member {Array.} history + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.history = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse weakenedCars. + * @member {Array.} weakenedCars + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.weakenedCars = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse stampSheetCount. + * @member {number} stampSheetCount + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampSheetCount = 0; + + /** + * LoadGhostBattleInfoResponse stampSheet. + * @member {Array.} stampSheet + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampSheet = $util.emptyArray; + + /** + * LoadGhostBattleInfoResponse stampReturnStats. + * @member {Array.} stampReturnStats + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + */ + LoadGhostBattleInfoResponse.prototype.stampReturnStats = $util.emptyArray; + + /** + * Creates a new LoadGhostBattleInfoResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse instance + */ + LoadGhostBattleInfoResponse.create = function create(properties) { + return new LoadGhostBattleInfoResponse(properties); + }; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoResponse} message LoadGhostBattleInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.friendCars != null && message.friendCars.length) + for (let i = 0; i < message.friendCars.length; ++i) + $root.wm.protobuf.FriendCar.encode(message.friendCars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.challengers != null && message.challengers.length) + for (let i = 0; i < message.challengers.length; ++i) + $root.wm.protobuf.ChallengerCar.encode(message.challengers[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.stampTargetCars != null && message.stampTargetCars.length) + for (let i = 0; i < message.stampTargetCars.length; ++i) + $root.wm.protobuf.StampTargetCar.encode(message.stampTargetCars[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.history != null && message.history.length) + for (let i = 0; i < message.history.length; ++i) + $root.wm.protobuf.Car.encode(message.history[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.stampSheetCount); + if (message.stampSheet != null && message.stampSheet.length) + for (let i = 0; i < message.stampSheet.length; ++i) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stampSheet[i]); + if (message.stampReturnStats != null && message.stampReturnStats.length) + for (let i = 0; i < message.stampReturnStats.length; ++i) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.stampReturnStats[i]); + if (message.weakenedCars != null && message.weakenedCars.length) + for (let i = 0; i < message.weakenedCars.length; ++i) + $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.encode(message.weakenedCars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.bookmarkedCars != null && message.bookmarkedCars.length) + for (let i = 0; i < message.bookmarkedCars.length; ++i) + $root.wm.protobuf.BookmarkedCar.encode(message.bookmarkedCars[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.previousVersionStampTargetCars != null && message.previousVersionStampTargetCars.length) + for (let i = 0; i < message.previousVersionStampTargetCars.length; ++i) + $root.wm.protobuf.PreviousVersionStampTargetCar.encode(message.previousVersionStampTargetCars[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostBattleInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostBattleInfoResponse} message LoadGhostBattleInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostBattleInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostBattleInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.friendCars && message.friendCars.length)) + message.friendCars = []; + message.friendCars.push($root.wm.protobuf.FriendCar.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.challengers && message.challengers.length)) + message.challengers = []; + message.challengers.push($root.wm.protobuf.ChallengerCar.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.stampTargetCars && message.stampTargetCars.length)) + message.stampTargetCars = []; + message.stampTargetCars.push($root.wm.protobuf.StampTargetCar.decode(reader, reader.uint32())); + break; + } + case 12: { + if (!(message.previousVersionStampTargetCars && message.previousVersionStampTargetCars.length)) + message.previousVersionStampTargetCars = []; + message.previousVersionStampTargetCars.push($root.wm.protobuf.PreviousVersionStampTargetCar.decode(reader, reader.uint32())); + break; + } + case 11: { + if (!(message.bookmarkedCars && message.bookmarkedCars.length)) + message.bookmarkedCars = []; + message.bookmarkedCars.push($root.wm.protobuf.BookmarkedCar.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.history && message.history.length)) + message.history = []; + message.history.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.weakenedCars && message.weakenedCars.length)) + message.weakenedCars = []; + message.weakenedCars.push($root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.decode(reader, reader.uint32())); + break; + } + case 7: { + message.stampSheetCount = reader.uint32(); + break; + } + case 8: { + if (!(message.stampSheet && message.stampSheet.length)) + message.stampSheet = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampSheet.push(reader.uint32()); + } else + message.stampSheet.push(reader.uint32()); + break; + } + case 9: { + if (!(message.stampReturnStats && message.stampReturnStats.length)) + message.stampReturnStats = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.stampReturnStats.push(reader.uint32()); + } else + message.stampReturnStats.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("stampSheetCount")) + throw $util.ProtocolError("missing required 'stampSheetCount'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostBattleInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostBattleInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostBattleInfoResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostBattleInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.friendCars != null && message.hasOwnProperty("friendCars")) { + if (!Array.isArray(message.friendCars)) + return "friendCars: array expected"; + for (let i = 0; i < message.friendCars.length; ++i) { + let error = $root.wm.protobuf.FriendCar.verify(message.friendCars[i]); + if (error) + return "friendCars." + error; + } + } + if (message.challengers != null && message.hasOwnProperty("challengers")) { + if (!Array.isArray(message.challengers)) + return "challengers: array expected"; + for (let i = 0; i < message.challengers.length; ++i) { + let error = $root.wm.protobuf.ChallengerCar.verify(message.challengers[i]); + if (error) + return "challengers." + error; + } + } + if (message.stampTargetCars != null && message.hasOwnProperty("stampTargetCars")) { + if (!Array.isArray(message.stampTargetCars)) + return "stampTargetCars: array expected"; + for (let i = 0; i < message.stampTargetCars.length; ++i) { + let error = $root.wm.protobuf.StampTargetCar.verify(message.stampTargetCars[i]); + if (error) + return "stampTargetCars." + error; + } + } + if (message.previousVersionStampTargetCars != null && message.hasOwnProperty("previousVersionStampTargetCars")) { + if (!Array.isArray(message.previousVersionStampTargetCars)) + return "previousVersionStampTargetCars: array expected"; + for (let i = 0; i < message.previousVersionStampTargetCars.length; ++i) { + let error = $root.wm.protobuf.PreviousVersionStampTargetCar.verify(message.previousVersionStampTargetCars[i]); + if (error) + return "previousVersionStampTargetCars." + error; + } + } + if (message.bookmarkedCars != null && message.hasOwnProperty("bookmarkedCars")) { + if (!Array.isArray(message.bookmarkedCars)) + return "bookmarkedCars: array expected"; + for (let i = 0; i < message.bookmarkedCars.length; ++i) { + let error = $root.wm.protobuf.BookmarkedCar.verify(message.bookmarkedCars[i]); + if (error) + return "bookmarkedCars." + error; + } + } + if (message.history != null && message.hasOwnProperty("history")) { + if (!Array.isArray(message.history)) + return "history: array expected"; + for (let i = 0; i < message.history.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.history[i]); + if (error) + return "history." + error; + } + } + if (message.weakenedCars != null && message.hasOwnProperty("weakenedCars")) { + if (!Array.isArray(message.weakenedCars)) + return "weakenedCars: array expected"; + for (let i = 0; i < message.weakenedCars.length; ++i) { + let error = $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify(message.weakenedCars[i]); + if (error) + return "weakenedCars." + error; + } + } + if (!$util.isInteger(message.stampSheetCount)) + return "stampSheetCount: integer expected"; + if (message.stampSheet != null && message.hasOwnProperty("stampSheet")) { + if (!Array.isArray(message.stampSheet)) + return "stampSheet: array expected"; + for (let i = 0; i < message.stampSheet.length; ++i) + if (!$util.isInteger(message.stampSheet[i])) + return "stampSheet: integer[] expected"; + } + if (message.stampReturnStats != null && message.hasOwnProperty("stampReturnStats")) { + if (!Array.isArray(message.stampReturnStats)) + return "stampReturnStats: array expected"; + for (let i = 0; i < message.stampReturnStats.length; ++i) + if (!$util.isInteger(message.stampReturnStats[i])) + return "stampReturnStats: integer[] expected"; + } + return null; + }; + + /** + * Creates a LoadGhostBattleInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostBattleInfoResponse} LoadGhostBattleInfoResponse + */ + LoadGhostBattleInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostBattleInfoResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostBattleInfoResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.friendCars) { + if (!Array.isArray(object.friendCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.friendCars: array expected"); + message.friendCars = []; + for (let i = 0; i < object.friendCars.length; ++i) { + if (typeof object.friendCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.friendCars: object expected"); + message.friendCars[i] = $root.wm.protobuf.FriendCar.fromObject(object.friendCars[i]); + } + } + if (object.challengers) { + if (!Array.isArray(object.challengers)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.challengers: array expected"); + message.challengers = []; + for (let i = 0; i < object.challengers.length; ++i) { + if (typeof object.challengers[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.challengers: object expected"); + message.challengers[i] = $root.wm.protobuf.ChallengerCar.fromObject(object.challengers[i]); + } + } + if (object.stampTargetCars) { + if (!Array.isArray(object.stampTargetCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampTargetCars: array expected"); + message.stampTargetCars = []; + for (let i = 0; i < object.stampTargetCars.length; ++i) { + if (typeof object.stampTargetCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampTargetCars: object expected"); + message.stampTargetCars[i] = $root.wm.protobuf.StampTargetCar.fromObject(object.stampTargetCars[i]); + } + } + if (object.previousVersionStampTargetCars) { + if (!Array.isArray(object.previousVersionStampTargetCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.previousVersionStampTargetCars: array expected"); + message.previousVersionStampTargetCars = []; + for (let i = 0; i < object.previousVersionStampTargetCars.length; ++i) { + if (typeof object.previousVersionStampTargetCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.previousVersionStampTargetCars: object expected"); + message.previousVersionStampTargetCars[i] = $root.wm.protobuf.PreviousVersionStampTargetCar.fromObject(object.previousVersionStampTargetCars[i]); + } + } + if (object.bookmarkedCars) { + if (!Array.isArray(object.bookmarkedCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.bookmarkedCars: array expected"); + message.bookmarkedCars = []; + for (let i = 0; i < object.bookmarkedCars.length; ++i) { + if (typeof object.bookmarkedCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.bookmarkedCars: object expected"); + message.bookmarkedCars[i] = $root.wm.protobuf.BookmarkedCar.fromObject(object.bookmarkedCars[i]); + } + } + if (object.history) { + if (!Array.isArray(object.history)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.history: array expected"); + message.history = []; + for (let i = 0; i < object.history.length; ++i) { + if (typeof object.history[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.history: object expected"); + message.history[i] = $root.wm.protobuf.Car.fromObject(object.history[i]); + } + } + if (object.weakenedCars) { + if (!Array.isArray(object.weakenedCars)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.weakenedCars: array expected"); + message.weakenedCars = []; + for (let i = 0; i < object.weakenedCars.length; ++i) { + if (typeof object.weakenedCars[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.weakenedCars: object expected"); + message.weakenedCars[i] = $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.fromObject(object.weakenedCars[i]); + } + } + if (object.stampSheetCount != null) + message.stampSheetCount = object.stampSheetCount >>> 0; + if (object.stampSheet) { + if (!Array.isArray(object.stampSheet)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampSheet: array expected"); + message.stampSheet = []; + for (let i = 0; i < object.stampSheet.length; ++i) + message.stampSheet[i] = object.stampSheet[i] >>> 0; + } + if (object.stampReturnStats) { + if (!Array.isArray(object.stampReturnStats)) + throw TypeError(".wm.protobuf.LoadGhostBattleInfoResponse.stampReturnStats: array expected"); + message.stampReturnStats = []; + for (let i = 0; i < object.stampReturnStats.length; ++i) + message.stampReturnStats[i] = object.stampReturnStats[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostBattleInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse} message LoadGhostBattleInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostBattleInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.friendCars = []; + object.challengers = []; + object.stampTargetCars = []; + object.history = []; + object.stampSheet = []; + object.stampReturnStats = []; + object.weakenedCars = []; + object.bookmarkedCars = []; + object.previousVersionStampTargetCars = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.stampSheetCount = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.friendCars && message.friendCars.length) { + object.friendCars = []; + for (let j = 0; j < message.friendCars.length; ++j) + object.friendCars[j] = $root.wm.protobuf.FriendCar.toObject(message.friendCars[j], options); + } + if (message.challengers && message.challengers.length) { + object.challengers = []; + for (let j = 0; j < message.challengers.length; ++j) + object.challengers[j] = $root.wm.protobuf.ChallengerCar.toObject(message.challengers[j], options); + } + if (message.stampTargetCars && message.stampTargetCars.length) { + object.stampTargetCars = []; + for (let j = 0; j < message.stampTargetCars.length; ++j) + object.stampTargetCars[j] = $root.wm.protobuf.StampTargetCar.toObject(message.stampTargetCars[j], options); + } + if (message.history && message.history.length) { + object.history = []; + for (let j = 0; j < message.history.length; ++j) + object.history[j] = $root.wm.protobuf.Car.toObject(message.history[j], options); + } + if (message.stampSheetCount != null && message.hasOwnProperty("stampSheetCount")) + object.stampSheetCount = message.stampSheetCount; + if (message.stampSheet && message.stampSheet.length) { + object.stampSheet = []; + for (let j = 0; j < message.stampSheet.length; ++j) + object.stampSheet[j] = message.stampSheet[j]; + } + if (message.stampReturnStats && message.stampReturnStats.length) { + object.stampReturnStats = []; + for (let j = 0; j < message.stampReturnStats.length; ++j) + object.stampReturnStats[j] = message.stampReturnStats[j]; + } + if (message.weakenedCars && message.weakenedCars.length) { + object.weakenedCars = []; + for (let j = 0; j < message.weakenedCars.length; ++j) + object.weakenedCars[j] = $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.toObject(message.weakenedCars[j], options); + } + if (message.bookmarkedCars && message.bookmarkedCars.length) { + object.bookmarkedCars = []; + for (let j = 0; j < message.bookmarkedCars.length; ++j) + object.bookmarkedCars[j] = $root.wm.protobuf.BookmarkedCar.toObject(message.bookmarkedCars[j], options); + } + if (message.previousVersionStampTargetCars && message.previousVersionStampTargetCars.length) { + object.previousVersionStampTargetCars = []; + for (let j = 0; j < message.previousVersionStampTargetCars.length; ++j) + object.previousVersionStampTargetCars[j] = $root.wm.protobuf.PreviousVersionStampTargetCar.toObject(message.previousVersionStampTargetCars[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostBattleInfoResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostBattleInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostBattleInfoResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostBattleInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostBattleInfoResponse"; + }; + + LoadGhostBattleInfoResponse.WeakenedCar = (function() { + + /** + * Properties of a WeakenedCar. + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @interface IWeakenedCar + * @property {number} carId WeakenedCar carId + * @property {number} consecutiveLosses WeakenedCar consecutiveLosses + */ + + /** + * Constructs a new WeakenedCar. + * @memberof wm.protobuf.LoadGhostBattleInfoResponse + * @classdesc Represents a WeakenedCar. + * @implements IWeakenedCar + * @constructor + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar=} [properties] Properties to set + */ + function WeakenedCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WeakenedCar carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @instance + */ + WeakenedCar.prototype.carId = 0; + + /** + * WeakenedCar consecutiveLosses. + * @member {number} consecutiveLosses + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @instance + */ + WeakenedCar.prototype.consecutiveLosses = 0; + + /** + * Creates a new WeakenedCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar instance + */ + WeakenedCar.create = function create(properties) { + return new WeakenedCar(properties); + }; + + /** + * Encodes the specified WeakenedCar message. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar} message WeakenedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeakenedCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.consecutiveLosses); + return writer; + }; + + /** + * Encodes the specified WeakenedCar message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.IWeakenedCar} message WeakenedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeakenedCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeakenedCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.consecutiveLosses = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("consecutiveLosses")) + throw $util.ProtocolError("missing required 'consecutiveLosses'", { instance: message }); + return message; + }; + + /** + * Decodes a WeakenedCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeakenedCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WeakenedCar message. + * @function verify + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeakenedCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.consecutiveLosses)) + return "consecutiveLosses: integer expected"; + return null; + }; + + /** + * Creates a WeakenedCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} WeakenedCar + */ + WeakenedCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar) + return object; + let message = new $root.wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.consecutiveLosses != null) + message.consecutiveLosses = object.consecutiveLosses >>> 0; + return message; + }; + + /** + * Creates a plain object from a WeakenedCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar} message WeakenedCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeakenedCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.consecutiveLosses = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.consecutiveLosses != null && message.hasOwnProperty("consecutiveLosses")) + object.consecutiveLosses = message.consecutiveLosses; + return object; + }; + + /** + * Converts this WeakenedCar to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @instance + * @returns {Object.} JSON object + */ + WeakenedCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WeakenedCar + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WeakenedCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostBattleInfoResponse.WeakenedCar"; + }; + + return WeakenedCar; + })(); + + return LoadGhostBattleInfoResponse; + })(); + + protobuf.LoadStampTargetRequest = (function() { + + /** + * Properties of a LoadStampTargetRequest. + * @memberof wm.protobuf + * @interface ILoadStampTargetRequest + * @property {number} carId LoadStampTargetRequest carId + * @property {boolean} needToPromote LoadStampTargetRequest needToPromote + */ + + /** + * Constructs a new LoadStampTargetRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadStampTargetRequest. + * @implements ILoadStampTargetRequest + * @constructor + * @param {wm.protobuf.ILoadStampTargetRequest=} [properties] Properties to set + */ + function LoadStampTargetRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadStampTargetRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadStampTargetRequest + * @instance + */ + LoadStampTargetRequest.prototype.carId = 0; + + /** + * LoadStampTargetRequest needToPromote. + * @member {boolean} needToPromote + * @memberof wm.protobuf.LoadStampTargetRequest + * @instance + */ + LoadStampTargetRequest.prototype.needToPromote = false; + + /** + * Creates a new LoadStampTargetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.ILoadStampTargetRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest instance + */ + LoadStampTargetRequest.create = function create(properties) { + return new LoadStampTargetRequest(properties); + }; + + /** + * Encodes the specified LoadStampTargetRequest message. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.ILoadStampTargetRequest} message LoadStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.needToPromote); + return writer; + }; + + /** + * Encodes the specified LoadStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.ILoadStampTargetRequest} message LoadStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadStampTargetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.needToPromote = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("needToPromote")) + throw $util.ProtocolError("missing required 'needToPromote'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadStampTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadStampTargetRequest message. + * @function verify + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadStampTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (typeof message.needToPromote !== "boolean") + return "needToPromote: boolean expected"; + return null; + }; + + /** + * Creates a LoadStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadStampTargetRequest} LoadStampTargetRequest + */ + LoadStampTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadStampTargetRequest) + return object; + let message = new $root.wm.protobuf.LoadStampTargetRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.needToPromote != null) + message.needToPromote = Boolean(object.needToPromote); + return message; + }; + + /** + * Creates a plain object from a LoadStampTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {wm.protobuf.LoadStampTargetRequest} message LoadStampTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadStampTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.needToPromote = false; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.needToPromote != null && message.hasOwnProperty("needToPromote")) + object.needToPromote = message.needToPromote; + return object; + }; + + /** + * Converts this LoadStampTargetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadStampTargetRequest + * @instance + * @returns {Object.} JSON object + */ + LoadStampTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadStampTargetRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadStampTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadStampTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadStampTargetRequest"; + }; + + return LoadStampTargetRequest; + })(); + + protobuf.LoadStampTargetResponse = (function() { + + /** + * Properties of a LoadStampTargetResponse. + * @memberof wm.protobuf + * @interface ILoadStampTargetResponse + * @property {wm.protobuf.ErrorCode} error LoadStampTargetResponse error + * @property {Array.|null} [cars] LoadStampTargetResponse cars + * @property {Array.|null} [challengers] LoadStampTargetResponse challengers + */ + + /** + * Constructs a new LoadStampTargetResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadStampTargetResponse. + * @implements ILoadStampTargetResponse + * @constructor + * @param {wm.protobuf.ILoadStampTargetResponse=} [properties] Properties to set + */ + function LoadStampTargetResponse(properties) { + this.cars = []; + this.challengers = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadStampTargetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + */ + LoadStampTargetResponse.prototype.error = 0; + + /** + * LoadStampTargetResponse cars. + * @member {Array.} cars + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + */ + LoadStampTargetResponse.prototype.cars = $util.emptyArray; + + /** + * LoadStampTargetResponse challengers. + * @member {Array.} challengers + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + */ + LoadStampTargetResponse.prototype.challengers = $util.emptyArray; + + /** + * Creates a new LoadStampTargetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.ILoadStampTargetResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse instance + */ + LoadStampTargetResponse.create = function create(properties) { + return new LoadStampTargetResponse(properties); + }; + + /** + * Encodes the specified LoadStampTargetResponse message. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.ILoadStampTargetResponse} message LoadStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.StampTargetCar.encode(message.cars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.challengers != null && message.challengers.length) + for (let i = 0; i < message.challengers.length; ++i) + $root.wm.protobuf.ChallengerCar.encode(message.challengers[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadStampTargetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.ILoadStampTargetResponse} message LoadStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadStampTargetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadStampTargetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.StampTargetCar.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.challengers && message.challengers.length)) + message.challengers = []; + message.challengers.push($root.wm.protobuf.ChallengerCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadStampTargetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadStampTargetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadStampTargetResponse message. + * @function verify + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadStampTargetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.StampTargetCar.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + if (message.challengers != null && message.hasOwnProperty("challengers")) { + if (!Array.isArray(message.challengers)) + return "challengers: array expected"; + for (let i = 0; i < message.challengers.length; ++i) { + let error = $root.wm.protobuf.ChallengerCar.verify(message.challengers[i]); + if (error) + return "challengers." + error; + } + } + return null; + }; + + /** + * Creates a LoadStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadStampTargetResponse} LoadStampTargetResponse + */ + LoadStampTargetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadStampTargetResponse) + return object; + let message = new $root.wm.protobuf.LoadStampTargetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.LoadStampTargetResponse.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.LoadStampTargetResponse.cars: object expected"); + message.cars[i] = $root.wm.protobuf.StampTargetCar.fromObject(object.cars[i]); + } + } + if (object.challengers) { + if (!Array.isArray(object.challengers)) + throw TypeError(".wm.protobuf.LoadStampTargetResponse.challengers: array expected"); + message.challengers = []; + for (let i = 0; i < object.challengers.length; ++i) { + if (typeof object.challengers[i] !== "object") + throw TypeError(".wm.protobuf.LoadStampTargetResponse.challengers: object expected"); + message.challengers[i] = $root.wm.protobuf.ChallengerCar.fromObject(object.challengers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadStampTargetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {wm.protobuf.LoadStampTargetResponse} message LoadStampTargetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadStampTargetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.cars = []; + object.challengers = []; + } + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.StampTargetCar.toObject(message.cars[j], options); + } + if (message.challengers && message.challengers.length) { + object.challengers = []; + for (let j = 0; j < message.challengers.length; ++j) + object.challengers[j] = $root.wm.protobuf.ChallengerCar.toObject(message.challengers[j], options); + } + return object; + }; + + /** + * Converts this LoadStampTargetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadStampTargetResponse + * @instance + * @returns {Object.} JSON object + */ + LoadStampTargetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadStampTargetResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadStampTargetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadStampTargetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadStampTargetResponse"; + }; + + return LoadStampTargetResponse; + })(); + + protobuf.LockStampTargetRequest = (function() { + + /** + * Properties of a LockStampTargetRequest. + * @memberof wm.protobuf + * @interface ILockStampTargetRequest + * @property {number} carId LockStampTargetRequest carId + * @property {Array.|null} [targetCars] LockStampTargetRequest targetCars + */ + + /** + * Constructs a new LockStampTargetRequest. + * @memberof wm.protobuf + * @classdesc Represents a LockStampTargetRequest. + * @implements ILockStampTargetRequest + * @constructor + * @param {wm.protobuf.ILockStampTargetRequest=} [properties] Properties to set + */ + function LockStampTargetRequest(properties) { + this.targetCars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LockStampTargetRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LockStampTargetRequest + * @instance + */ + LockStampTargetRequest.prototype.carId = 0; + + /** + * LockStampTargetRequest targetCars. + * @member {Array.} targetCars + * @memberof wm.protobuf.LockStampTargetRequest + * @instance + */ + LockStampTargetRequest.prototype.targetCars = $util.emptyArray; + + /** + * Creates a new LockStampTargetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.ILockStampTargetRequest=} [properties] Properties to set + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest instance + */ + LockStampTargetRequest.create = function create(properties) { + return new LockStampTargetRequest(properties); + }; + + /** + * Encodes the specified LockStampTargetRequest message. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.ILockStampTargetRequest} message LockStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.targetCars != null && message.targetCars.length) + for (let i = 0; i < message.targetCars.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetCars[i]); + return writer; + }; + + /** + * Encodes the specified LockStampTargetRequest message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.ILockStampTargetRequest} message LockStampTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LockStampTargetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + if (!(message.targetCars && message.targetCars.length)) + message.targetCars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targetCars.push(reader.uint32()); + } else + message.targetCars.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LockStampTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LockStampTargetRequest message. + * @function verify + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LockStampTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.targetCars != null && message.hasOwnProperty("targetCars")) { + if (!Array.isArray(message.targetCars)) + return "targetCars: array expected"; + for (let i = 0; i < message.targetCars.length; ++i) + if (!$util.isInteger(message.targetCars[i])) + return "targetCars: integer[] expected"; + } + return null; + }; + + /** + * Creates a LockStampTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LockStampTargetRequest} LockStampTargetRequest + */ + LockStampTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LockStampTargetRequest) + return object; + let message = new $root.wm.protobuf.LockStampTargetRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.targetCars) { + if (!Array.isArray(object.targetCars)) + throw TypeError(".wm.protobuf.LockStampTargetRequest.targetCars: array expected"); + message.targetCars = []; + for (let i = 0; i < object.targetCars.length; ++i) + message.targetCars[i] = object.targetCars[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LockStampTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {wm.protobuf.LockStampTargetRequest} message LockStampTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LockStampTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.targetCars = []; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.targetCars && message.targetCars.length) { + object.targetCars = []; + for (let j = 0; j < message.targetCars.length; ++j) + object.targetCars[j] = message.targetCars[j]; + } + return object; + }; + + /** + * Converts this LockStampTargetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LockStampTargetRequest + * @instance + * @returns {Object.} JSON object + */ + LockStampTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LockStampTargetRequest + * @function getTypeUrl + * @memberof wm.protobuf.LockStampTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LockStampTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LockStampTargetRequest"; + }; + + return LockStampTargetRequest; + })(); + + protobuf.LockStampTargetResponse = (function() { + + /** + * Properties of a LockStampTargetResponse. + * @memberof wm.protobuf + * @interface ILockStampTargetResponse + * @property {wm.protobuf.ErrorCode} error LockStampTargetResponse error + */ + + /** + * Constructs a new LockStampTargetResponse. + * @memberof wm.protobuf + * @classdesc Represents a LockStampTargetResponse. + * @implements ILockStampTargetResponse + * @constructor + * @param {wm.protobuf.ILockStampTargetResponse=} [properties] Properties to set + */ + function LockStampTargetResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LockStampTargetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LockStampTargetResponse + * @instance + */ + LockStampTargetResponse.prototype.error = 0; + + /** + * Creates a new LockStampTargetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.ILockStampTargetResponse=} [properties] Properties to set + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse instance + */ + LockStampTargetResponse.create = function create(properties) { + return new LockStampTargetResponse(properties); + }; + + /** + * Encodes the specified LockStampTargetResponse message. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.ILockStampTargetResponse} message LockStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified LockStampTargetResponse message, length delimited. Does not implicitly {@link wm.protobuf.LockStampTargetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.ILockStampTargetResponse} message LockStampTargetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockStampTargetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LockStampTargetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LockStampTargetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockStampTargetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LockStampTargetResponse message. + * @function verify + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LockStampTargetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a LockStampTargetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LockStampTargetResponse} LockStampTargetResponse + */ + LockStampTargetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LockStampTargetResponse) + return object; + let message = new $root.wm.protobuf.LockStampTargetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a LockStampTargetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {wm.protobuf.LockStampTargetResponse} message LockStampTargetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LockStampTargetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this LockStampTargetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LockStampTargetResponse + * @instance + * @returns {Object.} JSON object + */ + LockStampTargetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LockStampTargetResponse + * @function getTypeUrl + * @memberof wm.protobuf.LockStampTargetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LockStampTargetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LockStampTargetResponse"; + }; + + return LockStampTargetResponse; + })(); + + protobuf.LoadGhostCompetitionInfoRequest = (function() { + + /** + * Properties of a LoadGhostCompetitionInfoRequest. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionInfoRequest + * @property {number} carId LoadGhostCompetitionInfoRequest carId + * @property {number} competitionId LoadGhostCompetitionInfoRequest competitionId + */ + + /** + * Constructs a new LoadGhostCompetitionInfoRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionInfoRequest. + * @implements ILoadGhostCompetitionInfoRequest + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest=} [properties] Properties to set + */ + function LoadGhostCompetitionInfoRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionInfoRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @instance + */ + LoadGhostCompetitionInfoRequest.prototype.carId = 0; + + /** + * LoadGhostCompetitionInfoRequest competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @instance + */ + LoadGhostCompetitionInfoRequest.prototype.competitionId = 0; + + /** + * Creates a new LoadGhostCompetitionInfoRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest instance + */ + LoadGhostCompetitionInfoRequest.create = function create(properties) { + return new LoadGhostCompetitionInfoRequest(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest} message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.competitionId); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoRequest} message LoadGhostCompetitionInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.competitionId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionInfoRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + return null; + }; + + /** + * Creates a LoadGhostCompetitionInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionInfoRequest} LoadGhostCompetitionInfoRequest + */ + LoadGhostCompetitionInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionInfoRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionInfoRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {wm.protobuf.LoadGhostCompetitionInfoRequest} message LoadGhostCompetitionInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.competitionId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + return object; + }; + + /** + * Converts this LoadGhostCompetitionInfoRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionInfoRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionInfoRequest"; + }; + + return LoadGhostCompetitionInfoRequest; + })(); + + protobuf.LoadGhostCompetitionInfoResponse = (function() { + + /** + * Properties of a LoadGhostCompetitionInfoResponse. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionInfoResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostCompetitionInfoResponse error + * @property {number|null} [periodId] LoadGhostCompetitionInfoResponse periodId + * @property {boolean} closed LoadGhostCompetitionInfoResponse closed + * @property {number|null} [brakingPoint] LoadGhostCompetitionInfoResponse brakingPoint + * @property {boolean|null} [qualified] LoadGhostCompetitionInfoResponse qualified + * @property {Array.|null} [topResults] LoadGhostCompetitionInfoResponse topResults + * @property {number|null} [result] LoadGhostCompetitionInfoResponse result + * @property {number|null} [rank] LoadGhostCompetitionInfoResponse rank + * @property {Array.|null} [parameters1] LoadGhostCompetitionInfoResponse parameters1 + * @property {boolean|null} [parameters2] LoadGhostCompetitionInfoResponse parameters2 + */ + + /** + * Constructs a new LoadGhostCompetitionInfoResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionInfoResponse. + * @implements ILoadGhostCompetitionInfoResponse + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse=} [properties] Properties to set + */ + function LoadGhostCompetitionInfoResponse(properties) { + this.topResults = []; + this.parameters1 = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionInfoResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.error = 0; + + /** + * LoadGhostCompetitionInfoResponse periodId. + * @member {number} periodId + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.periodId = 0; + + /** + * LoadGhostCompetitionInfoResponse closed. + * @member {boolean} closed + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.closed = false; + + /** + * LoadGhostCompetitionInfoResponse brakingPoint. + * @member {number} brakingPoint + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.brakingPoint = 0; + + /** + * LoadGhostCompetitionInfoResponse qualified. + * @member {boolean} qualified + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.qualified = false; + + /** + * LoadGhostCompetitionInfoResponse topResults. + * @member {Array.} topResults + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.topResults = $util.emptyArray; + + /** + * LoadGhostCompetitionInfoResponse result. + * @member {number} result + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.result = 0; + + /** + * LoadGhostCompetitionInfoResponse rank. + * @member {number} rank + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.rank = 0; + + /** + * LoadGhostCompetitionInfoResponse parameters1. + * @member {Array.} parameters1 + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.parameters1 = $util.emptyArray; + + /** + * LoadGhostCompetitionInfoResponse parameters2. + * @member {boolean} parameters2 + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + */ + LoadGhostCompetitionInfoResponse.prototype.parameters2 = false; + + /** + * Creates a new LoadGhostCompetitionInfoResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse instance + */ + LoadGhostCompetitionInfoResponse.create = function create(properties) { + return new LoadGhostCompetitionInfoResponse(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse} message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.periodId != null && Object.hasOwnProperty.call(message, "periodId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.periodId); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.closed); + if (message.brakingPoint != null && Object.hasOwnProperty.call(message, "brakingPoint")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.brakingPoint); + if (message.qualified != null && Object.hasOwnProperty.call(message, "qualified")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.qualified); + if (message.topResults != null && message.topResults.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (let i = 0; i < message.topResults.length; ++i) + writer.sint32(message.topResults[i]); + writer.ldelim(); + } + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 7, wireType 0 =*/56).sint32(message.result); + if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.rank); + if (message.parameters1 != null && message.parameters1.length) + for (let i = 0; i < message.parameters1.length; ++i) + writer.uint32(/* id 9, wireType 5 =*/77).float(message.parameters1[i]); + if (message.parameters2 != null && Object.hasOwnProperty.call(message, "parameters2")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.parameters2); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionInfoResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionInfoResponse} message LoadGhostCompetitionInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.periodId = reader.uint32(); + break; + } + case 3: { + message.closed = reader.bool(); + break; + } + case 4: { + message.brakingPoint = reader.uint32(); + break; + } + case 5: { + message.qualified = reader.bool(); + break; + } + case 6: { + if (!(message.topResults && message.topResults.length)) + message.topResults = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.topResults.push(reader.sint32()); + } else + message.topResults.push(reader.sint32()); + break; + } + case 7: { + message.result = reader.sint32(); + break; + } + case 8: { + message.rank = reader.uint32(); + break; + } + case 9: { + if (!(message.parameters1 && message.parameters1.length)) + message.parameters1 = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.parameters1.push(reader.float()); + } else + message.parameters1.push(reader.float()); + break; + } + case 10: { + message.parameters2 = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("closed")) + throw $util.ProtocolError("missing required 'closed'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionInfoResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.periodId != null && message.hasOwnProperty("periodId")) + if (!$util.isInteger(message.periodId)) + return "periodId: integer expected"; + if (typeof message.closed !== "boolean") + return "closed: boolean expected"; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + if (!$util.isInteger(message.brakingPoint)) + return "brakingPoint: integer expected"; + if (message.qualified != null && message.hasOwnProperty("qualified")) + if (typeof message.qualified !== "boolean") + return "qualified: boolean expected"; + if (message.topResults != null && message.hasOwnProperty("topResults")) { + if (!Array.isArray(message.topResults)) + return "topResults: array expected"; + for (let i = 0; i < message.topResults.length; ++i) + if (!$util.isInteger(message.topResults[i])) + return "topResults: integer[] expected"; + } + if (message.result != null && message.hasOwnProperty("result")) + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (message.rank != null && message.hasOwnProperty("rank")) + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (message.parameters1 != null && message.hasOwnProperty("parameters1")) { + if (!Array.isArray(message.parameters1)) + return "parameters1: array expected"; + for (let i = 0; i < message.parameters1.length; ++i) + if (typeof message.parameters1[i] !== "number") + return "parameters1: number[] expected"; + } + if (message.parameters2 != null && message.hasOwnProperty("parameters2")) + if (typeof message.parameters2 !== "boolean") + return "parameters2: boolean expected"; + return null; + }; + + /** + * Creates a LoadGhostCompetitionInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionInfoResponse} LoadGhostCompetitionInfoResponse + */ + LoadGhostCompetitionInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionInfoResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionInfoResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.periodId != null) + message.periodId = object.periodId >>> 0; + if (object.closed != null) + message.closed = Boolean(object.closed); + if (object.brakingPoint != null) + message.brakingPoint = object.brakingPoint >>> 0; + if (object.qualified != null) + message.qualified = Boolean(object.qualified); + if (object.topResults) { + if (!Array.isArray(object.topResults)) + throw TypeError(".wm.protobuf.LoadGhostCompetitionInfoResponse.topResults: array expected"); + message.topResults = []; + for (let i = 0; i < object.topResults.length; ++i) + message.topResults[i] = object.topResults[i] | 0; + } + if (object.result != null) + message.result = object.result | 0; + if (object.rank != null) + message.rank = object.rank >>> 0; + if (object.parameters1) { + if (!Array.isArray(object.parameters1)) + throw TypeError(".wm.protobuf.LoadGhostCompetitionInfoResponse.parameters1: array expected"); + message.parameters1 = []; + for (let i = 0; i < object.parameters1.length; ++i) + message.parameters1[i] = Number(object.parameters1[i]); + } + if (object.parameters2 != null) + message.parameters2 = Boolean(object.parameters2); + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {wm.protobuf.LoadGhostCompetitionInfoResponse} message LoadGhostCompetitionInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.topResults = []; + object.parameters1 = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.periodId = 0; + object.closed = false; + object.brakingPoint = 0; + object.qualified = false; + object.result = 0; + object.rank = 0; + object.parameters2 = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.periodId != null && message.hasOwnProperty("periodId")) + object.periodId = message.periodId; + if (message.closed != null && message.hasOwnProperty("closed")) + object.closed = message.closed; + if (message.brakingPoint != null && message.hasOwnProperty("brakingPoint")) + object.brakingPoint = message.brakingPoint; + if (message.qualified != null && message.hasOwnProperty("qualified")) + object.qualified = message.qualified; + if (message.topResults && message.topResults.length) { + object.topResults = []; + for (let j = 0; j < message.topResults.length; ++j) + object.topResults[j] = message.topResults[j]; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.parameters1 && message.parameters1.length) { + object.parameters1 = []; + for (let j = 0; j < message.parameters1.length; ++j) + object.parameters1[j] = options.json && !isFinite(message.parameters1[j]) ? String(message.parameters1[j]) : message.parameters1[j]; + } + if (message.parameters2 != null && message.hasOwnProperty("parameters2")) + object.parameters2 = message.parameters2; + return object; + }; + + /** + * Converts this LoadGhostCompetitionInfoResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionInfoResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionInfoResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionInfoResponse"; + }; + + return LoadGhostCompetitionInfoResponse; + })(); + + protobuf.LoadTimeAttackRecordRequest = (function() { + + /** + * Properties of a LoadTimeAttackRecordRequest. + * @memberof wm.protobuf + * @interface ILoadTimeAttackRecordRequest + * @property {number|null} [carId] LoadTimeAttackRecordRequest carId + * @property {number} model LoadTimeAttackRecordRequest model + * @property {number} course LoadTimeAttackRecordRequest course + */ + + /** + * Constructs a new LoadTimeAttackRecordRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadTimeAttackRecordRequest. + * @implements ILoadTimeAttackRecordRequest + * @constructor + * @param {wm.protobuf.ILoadTimeAttackRecordRequest=} [properties] Properties to set + */ + function LoadTimeAttackRecordRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTimeAttackRecordRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + */ + LoadTimeAttackRecordRequest.prototype.carId = 0; + + /** + * LoadTimeAttackRecordRequest model. + * @member {number} model + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + */ + LoadTimeAttackRecordRequest.prototype.model = 0; + + /** + * LoadTimeAttackRecordRequest course. + * @member {number} course + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + */ + LoadTimeAttackRecordRequest.prototype.course = 0; + + /** + * Creates a new LoadTimeAttackRecordRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest instance + */ + LoadTimeAttackRecordRequest.create = function create(properties) { + return new LoadTimeAttackRecordRequest(properties); + }; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordRequest} message LoadTimeAttackRecordRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.model); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.course); + return writer; + }; + + /** + * Encodes the specified LoadTimeAttackRecordRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordRequest} message LoadTimeAttackRecordRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTimeAttackRecordRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.model = reader.uint32(); + break; + } + case 3: { + message.course = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("model")) + throw $util.ProtocolError("missing required 'model'", { instance: message }); + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTimeAttackRecordRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTimeAttackRecordRequest message. + * @function verify + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTimeAttackRecordRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.model)) + return "model: integer expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + return null; + }; + + /** + * Creates a LoadTimeAttackRecordRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTimeAttackRecordRequest} LoadTimeAttackRecordRequest + */ + LoadTimeAttackRecordRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTimeAttackRecordRequest) + return object; + let message = new $root.wm.protobuf.LoadTimeAttackRecordRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.model != null) + message.model = object.model >>> 0; + if (object.course != null) + message.course = object.course >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadTimeAttackRecordRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {wm.protobuf.LoadTimeAttackRecordRequest} message LoadTimeAttackRecordRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTimeAttackRecordRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.model = 0; + object.course = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + return object; + }; + + /** + * Converts this LoadTimeAttackRecordRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @instance + * @returns {Object.} JSON object + */ + LoadTimeAttackRecordRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTimeAttackRecordRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadTimeAttackRecordRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTimeAttackRecordRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTimeAttackRecordRequest"; + }; + + return LoadTimeAttackRecordRequest; + })(); + + protobuf.LoadTimeAttackRecordResponse = (function() { + + /** + * Properties of a LoadTimeAttackRecordResponse. + * @memberof wm.protobuf + * @interface ILoadTimeAttackRecordResponse + * @property {wm.protobuf.ErrorCode} error LoadTimeAttackRecordResponse error + * @property {Array.|null} [wholeRanking] LoadTimeAttackRecordResponse wholeRanking + * @property {Array.|null} [modelRanking] LoadTimeAttackRecordResponse modelRanking + * @property {number|null} [personalBestTime] LoadTimeAttackRecordResponse personalBestTime + * @property {number|null} [pbSection_1Time] LoadTimeAttackRecordResponse pbSection_1Time + * @property {number|null} [pbSection_2Time] LoadTimeAttackRecordResponse pbSection_2Time + * @property {number|null} [pbSection_3Time] LoadTimeAttackRecordResponse pbSection_3Time + * @property {number|null} [pbSection_4Time] LoadTimeAttackRecordResponse pbSection_4Time + * @property {number|null} [pbSection_5Time] LoadTimeAttackRecordResponse pbSection_5Time + * @property {number|null} [pbSection_6Time] LoadTimeAttackRecordResponse pbSection_6Time + * @property {number|null} [pbSection_7Time] LoadTimeAttackRecordResponse pbSection_7Time + */ + + /** + * Constructs a new LoadTimeAttackRecordResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadTimeAttackRecordResponse. + * @implements ILoadTimeAttackRecordResponse + * @constructor + * @param {wm.protobuf.ILoadTimeAttackRecordResponse=} [properties] Properties to set + */ + function LoadTimeAttackRecordResponse(properties) { + this.wholeRanking = []; + this.modelRanking = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTimeAttackRecordResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.error = 0; + + /** + * LoadTimeAttackRecordResponse wholeRanking. + * @member {Array.} wholeRanking + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.wholeRanking = $util.emptyArray; + + /** + * LoadTimeAttackRecordResponse modelRanking. + * @member {Array.} modelRanking + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.modelRanking = $util.emptyArray; + + /** + * LoadTimeAttackRecordResponse personalBestTime. + * @member {number} personalBestTime + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.personalBestTime = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_1Time. + * @member {number} pbSection_1Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_1Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_2Time. + * @member {number} pbSection_2Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_2Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_3Time. + * @member {number} pbSection_3Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_3Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_4Time. + * @member {number} pbSection_4Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_4Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_5Time. + * @member {number} pbSection_5Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_5Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_6Time. + * @member {number} pbSection_6Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_6Time = 0; + + /** + * LoadTimeAttackRecordResponse pbSection_7Time. + * @member {number} pbSection_7Time + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + */ + LoadTimeAttackRecordResponse.prototype.pbSection_7Time = 0; + + /** + * Creates a new LoadTimeAttackRecordResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse instance + */ + LoadTimeAttackRecordResponse.create = function create(properties) { + return new LoadTimeAttackRecordResponse(properties); + }; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordResponse} message LoadTimeAttackRecordResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.wholeRanking != null && message.wholeRanking.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (let i = 0; i < message.wholeRanking.length; ++i) + writer.uint32(message.wholeRanking[i]); + writer.ldelim(); + } + if (message.modelRanking != null && message.modelRanking.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (let i = 0; i < message.modelRanking.length; ++i) + writer.uint32(message.modelRanking[i]); + writer.ldelim(); + } + if (message.personalBestTime != null && Object.hasOwnProperty.call(message, "personalBestTime")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.personalBestTime); + if (message.pbSection_1Time != null && Object.hasOwnProperty.call(message, "pbSection_1Time")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.pbSection_1Time); + if (message.pbSection_2Time != null && Object.hasOwnProperty.call(message, "pbSection_2Time")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.pbSection_2Time); + if (message.pbSection_3Time != null && Object.hasOwnProperty.call(message, "pbSection_3Time")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.pbSection_3Time); + if (message.pbSection_4Time != null && Object.hasOwnProperty.call(message, "pbSection_4Time")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.pbSection_4Time); + if (message.pbSection_5Time != null && Object.hasOwnProperty.call(message, "pbSection_5Time")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.pbSection_5Time); + if (message.pbSection_6Time != null && Object.hasOwnProperty.call(message, "pbSection_6Time")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.pbSection_6Time); + if (message.pbSection_7Time != null && Object.hasOwnProperty.call(message, "pbSection_7Time")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.pbSection_7Time); + return writer; + }; + + /** + * Encodes the specified LoadTimeAttackRecordResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTimeAttackRecordResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.ILoadTimeAttackRecordResponse} message LoadTimeAttackRecordResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTimeAttackRecordResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTimeAttackRecordResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.wholeRanking && message.wholeRanking.length)) + message.wholeRanking = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.wholeRanking.push(reader.uint32()); + } else + message.wholeRanking.push(reader.uint32()); + break; + } + case 3: { + if (!(message.modelRanking && message.modelRanking.length)) + message.modelRanking = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.modelRanking.push(reader.uint32()); + } else + message.modelRanking.push(reader.uint32()); + break; + } + case 4: { + message.personalBestTime = reader.uint32(); + break; + } + case 5: { + message.pbSection_1Time = reader.uint32(); + break; + } + case 6: { + message.pbSection_2Time = reader.uint32(); + break; + } + case 7: { + message.pbSection_3Time = reader.uint32(); + break; + } + case 8: { + message.pbSection_4Time = reader.uint32(); + break; + } + case 9: { + message.pbSection_5Time = reader.uint32(); + break; + } + case 10: { + message.pbSection_6Time = reader.uint32(); + break; + } + case 11: { + message.pbSection_7Time = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTimeAttackRecordResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTimeAttackRecordResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTimeAttackRecordResponse message. + * @function verify + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTimeAttackRecordResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.wholeRanking != null && message.hasOwnProperty("wholeRanking")) { + if (!Array.isArray(message.wholeRanking)) + return "wholeRanking: array expected"; + for (let i = 0; i < message.wholeRanking.length; ++i) + if (!$util.isInteger(message.wholeRanking[i])) + return "wholeRanking: integer[] expected"; + } + if (message.modelRanking != null && message.hasOwnProperty("modelRanking")) { + if (!Array.isArray(message.modelRanking)) + return "modelRanking: array expected"; + for (let i = 0; i < message.modelRanking.length; ++i) + if (!$util.isInteger(message.modelRanking[i])) + return "modelRanking: integer[] expected"; + } + if (message.personalBestTime != null && message.hasOwnProperty("personalBestTime")) + if (!$util.isInteger(message.personalBestTime)) + return "personalBestTime: integer expected"; + if (message.pbSection_1Time != null && message.hasOwnProperty("pbSection_1Time")) + if (!$util.isInteger(message.pbSection_1Time)) + return "pbSection_1Time: integer expected"; + if (message.pbSection_2Time != null && message.hasOwnProperty("pbSection_2Time")) + if (!$util.isInteger(message.pbSection_2Time)) + return "pbSection_2Time: integer expected"; + if (message.pbSection_3Time != null && message.hasOwnProperty("pbSection_3Time")) + if (!$util.isInteger(message.pbSection_3Time)) + return "pbSection_3Time: integer expected"; + if (message.pbSection_4Time != null && message.hasOwnProperty("pbSection_4Time")) + if (!$util.isInteger(message.pbSection_4Time)) + return "pbSection_4Time: integer expected"; + if (message.pbSection_5Time != null && message.hasOwnProperty("pbSection_5Time")) + if (!$util.isInteger(message.pbSection_5Time)) + return "pbSection_5Time: integer expected"; + if (message.pbSection_6Time != null && message.hasOwnProperty("pbSection_6Time")) + if (!$util.isInteger(message.pbSection_6Time)) + return "pbSection_6Time: integer expected"; + if (message.pbSection_7Time != null && message.hasOwnProperty("pbSection_7Time")) + if (!$util.isInteger(message.pbSection_7Time)) + return "pbSection_7Time: integer expected"; + return null; + }; + + /** + * Creates a LoadTimeAttackRecordResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTimeAttackRecordResponse} LoadTimeAttackRecordResponse + */ + LoadTimeAttackRecordResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTimeAttackRecordResponse) + return object; + let message = new $root.wm.protobuf.LoadTimeAttackRecordResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.wholeRanking) { + if (!Array.isArray(object.wholeRanking)) + throw TypeError(".wm.protobuf.LoadTimeAttackRecordResponse.wholeRanking: array expected"); + message.wholeRanking = []; + for (let i = 0; i < object.wholeRanking.length; ++i) + message.wholeRanking[i] = object.wholeRanking[i] >>> 0; + } + if (object.modelRanking) { + if (!Array.isArray(object.modelRanking)) + throw TypeError(".wm.protobuf.LoadTimeAttackRecordResponse.modelRanking: array expected"); + message.modelRanking = []; + for (let i = 0; i < object.modelRanking.length; ++i) + message.modelRanking[i] = object.modelRanking[i] >>> 0; + } + if (object.personalBestTime != null) + message.personalBestTime = object.personalBestTime >>> 0; + if (object.pbSection_1Time != null) + message.pbSection_1Time = object.pbSection_1Time >>> 0; + if (object.pbSection_2Time != null) + message.pbSection_2Time = object.pbSection_2Time >>> 0; + if (object.pbSection_3Time != null) + message.pbSection_3Time = object.pbSection_3Time >>> 0; + if (object.pbSection_4Time != null) + message.pbSection_4Time = object.pbSection_4Time >>> 0; + if (object.pbSection_5Time != null) + message.pbSection_5Time = object.pbSection_5Time >>> 0; + if (object.pbSection_6Time != null) + message.pbSection_6Time = object.pbSection_6Time >>> 0; + if (object.pbSection_7Time != null) + message.pbSection_7Time = object.pbSection_7Time >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadTimeAttackRecordResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {wm.protobuf.LoadTimeAttackRecordResponse} message LoadTimeAttackRecordResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTimeAttackRecordResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.wholeRanking = []; + object.modelRanking = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.personalBestTime = 0; + object.pbSection_1Time = 0; + object.pbSection_2Time = 0; + object.pbSection_3Time = 0; + object.pbSection_4Time = 0; + object.pbSection_5Time = 0; + object.pbSection_6Time = 0; + object.pbSection_7Time = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.wholeRanking && message.wholeRanking.length) { + object.wholeRanking = []; + for (let j = 0; j < message.wholeRanking.length; ++j) + object.wholeRanking[j] = message.wholeRanking[j]; + } + if (message.modelRanking && message.modelRanking.length) { + object.modelRanking = []; + for (let j = 0; j < message.modelRanking.length; ++j) + object.modelRanking[j] = message.modelRanking[j]; + } + if (message.personalBestTime != null && message.hasOwnProperty("personalBestTime")) + object.personalBestTime = message.personalBestTime; + if (message.pbSection_1Time != null && message.hasOwnProperty("pbSection_1Time")) + object.pbSection_1Time = message.pbSection_1Time; + if (message.pbSection_2Time != null && message.hasOwnProperty("pbSection_2Time")) + object.pbSection_2Time = message.pbSection_2Time; + if (message.pbSection_3Time != null && message.hasOwnProperty("pbSection_3Time")) + object.pbSection_3Time = message.pbSection_3Time; + if (message.pbSection_4Time != null && message.hasOwnProperty("pbSection_4Time")) + object.pbSection_4Time = message.pbSection_4Time; + if (message.pbSection_5Time != null && message.hasOwnProperty("pbSection_5Time")) + object.pbSection_5Time = message.pbSection_5Time; + if (message.pbSection_6Time != null && message.hasOwnProperty("pbSection_6Time")) + object.pbSection_6Time = message.pbSection_6Time; + if (message.pbSection_7Time != null && message.hasOwnProperty("pbSection_7Time")) + object.pbSection_7Time = message.pbSection_7Time; + return object; + }; + + /** + * Converts this LoadTimeAttackRecordResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @instance + * @returns {Object.} JSON object + */ + LoadTimeAttackRecordResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTimeAttackRecordResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadTimeAttackRecordResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTimeAttackRecordResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTimeAttackRecordResponse"; + }; + + return LoadTimeAttackRecordResponse; + })(); + + protobuf.SaveTerminalResultRequest = (function() { + + /** + * Properties of a SaveTerminalResultRequest. + * @memberof wm.protobuf + * @interface ISaveTerminalResultRequest + * @property {number} userId SaveTerminalResultRequest userId + * @property {number} timestamp SaveTerminalResultRequest timestamp + * @property {Array.|null} [carOrder] SaveTerminalResultRequest carOrder + * @property {Array.|null} [confirmedTutorials] SaveTerminalResultRequest confirmedTutorials + * @property {boolean|null} [garageMenuEntered] SaveTerminalResultRequest garageMenuEntered + */ + + /** + * Constructs a new SaveTerminalResultRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveTerminalResultRequest. + * @implements ISaveTerminalResultRequest + * @constructor + * @param {wm.protobuf.ISaveTerminalResultRequest=} [properties] Properties to set + */ + function SaveTerminalResultRequest(properties) { + this.carOrder = []; + this.confirmedTutorials = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveTerminalResultRequest userId. + * @member {number} userId + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.userId = 0; + + /** + * SaveTerminalResultRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.timestamp = 0; + + /** + * SaveTerminalResultRequest carOrder. + * @member {Array.} carOrder + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.carOrder = $util.emptyArray; + + /** + * SaveTerminalResultRequest confirmedTutorials. + * @member {Array.} confirmedTutorials + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.confirmedTutorials = $util.emptyArray; + + /** + * SaveTerminalResultRequest garageMenuEntered. + * @member {boolean} garageMenuEntered + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + */ + SaveTerminalResultRequest.prototype.garageMenuEntered = false; + + /** + * Creates a new SaveTerminalResultRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.ISaveTerminalResultRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest instance + */ + SaveTerminalResultRequest.create = function create(properties) { + return new SaveTerminalResultRequest(properties); + }; + + /** + * Encodes the specified SaveTerminalResultRequest message. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.ISaveTerminalResultRequest} message SaveTerminalResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.timestamp); + if (message.carOrder != null && message.carOrder.length) + for (let i = 0; i < message.carOrder.length; ++i) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.carOrder[i]); + if (message.confirmedTutorials != null && message.confirmedTutorials.length) + for (let i = 0; i < message.confirmedTutorials.length; ++i) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.confirmedTutorials[i]); + if (message.garageMenuEntered != null && Object.hasOwnProperty.call(message, "garageMenuEntered")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.garageMenuEntered); + return writer; + }; + + /** + * Encodes the specified SaveTerminalResultRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.ISaveTerminalResultRequest} message SaveTerminalResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveTerminalResultRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.timestamp = reader.uint32(); + break; + } + case 3: { + if (!(message.carOrder && message.carOrder.length)) + message.carOrder = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.carOrder.push(reader.uint32()); + } else + message.carOrder.push(reader.uint32()); + break; + } + case 5: { + if (!(message.confirmedTutorials && message.confirmedTutorials.length)) + message.confirmedTutorials = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.confirmedTutorials.push(reader.int32()); + } else + message.confirmedTutorials.push(reader.int32()); + break; + } + case 8: { + message.garageMenuEntered = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveTerminalResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveTerminalResultRequest message. + * @function verify + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveTerminalResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (message.carOrder != null && message.hasOwnProperty("carOrder")) { + if (!Array.isArray(message.carOrder)) + return "carOrder: array expected"; + for (let i = 0; i < message.carOrder.length; ++i) + if (!$util.isInteger(message.carOrder[i])) + return "carOrder: integer[] expected"; + } + if (message.confirmedTutorials != null && message.hasOwnProperty("confirmedTutorials")) { + if (!Array.isArray(message.confirmedTutorials)) + return "confirmedTutorials: array expected"; + for (let i = 0; i < message.confirmedTutorials.length; ++i) + switch (message.confirmedTutorials[i]) { + default: + return "confirmedTutorials: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + break; + } + } + if (message.garageMenuEntered != null && message.hasOwnProperty("garageMenuEntered")) + if (typeof message.garageMenuEntered !== "boolean") + return "garageMenuEntered: boolean expected"; + return null; + }; + + /** + * Creates a SaveTerminalResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveTerminalResultRequest} SaveTerminalResultRequest + */ + SaveTerminalResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveTerminalResultRequest) + return object; + let message = new $root.wm.protobuf.SaveTerminalResultRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.carOrder) { + if (!Array.isArray(object.carOrder)) + throw TypeError(".wm.protobuf.SaveTerminalResultRequest.carOrder: array expected"); + message.carOrder = []; + for (let i = 0; i < object.carOrder.length; ++i) + message.carOrder[i] = object.carOrder[i] >>> 0; + } + if (object.confirmedTutorials) { + if (!Array.isArray(object.confirmedTutorials)) + throw TypeError(".wm.protobuf.SaveTerminalResultRequest.confirmedTutorials: array expected"); + message.confirmedTutorials = []; + for (let i = 0; i < object.confirmedTutorials.length; ++i) + switch (object.confirmedTutorials[i]) { + default: + case "TUTORIAL_ID_STORY": + case 0: + message.confirmedTutorials[i] = 0; + break; + case "TUTORIAL_ID_TIME_ATTACK": + case 1: + message.confirmedTutorials[i] = 1; + break; + case "TUTORIAL_ID_GHOST": + case 2: + message.confirmedTutorials[i] = 2; + break; + case "TUTORIAL_ID_GHOST_CHALLENGE": + case 3: + message.confirmedTutorials[i] = 3; + break; + case "TUTORIAL_ID_GHOST_LEVEL": + case 4: + message.confirmedTutorials[i] = 4; + break; + case "TUTORIAL_ID_UNUSED_5": + case 5: + message.confirmedTutorials[i] = 5; + break; + case "TUTORIAL_ID_GHOST_SEARCH": + case 6: + message.confirmedTutorials[i] = 6; + break; + case "TUTORIAL_ID_GHOST_COMPETITION": + case 7: + message.confirmedTutorials[i] = 7; + break; + case "TUTORIAL_ID_HP600_CARD": + case 8: + message.confirmedTutorials[i] = 8; + break; + case "TUTORIAL_ID_UNUSED_9": + case 9: + message.confirmedTutorials[i] = 9; + break; + case "TUTORIAL_ID_COMPETITION_QUALIFIED": + case 10: + message.confirmedTutorials[i] = 10; + break; + case "TUTORIAL_ID_COMPETITION_TERMINAL": + case 11: + message.confirmedTutorials[i] = 11; + break; + case "TUTORIAL_ID_COMPETITION_NOTICE": + case 12: + message.confirmedTutorials[i] = 12; + break; + case "TUTORIAL_ID_COMPETITION_FINISHED": + case 13: + message.confirmedTutorials[i] = 13; + break; + case "TUTORIAL_ID_UNUSED_14": + case 14: + message.confirmedTutorials[i] = 14; + break; + case "TUTORIAL_ID_UNUSED_15": + case 15: + message.confirmedTutorials[i] = 15; + break; + case "TUTORIAL_ID_UNUSED_16": + case 16: + message.confirmedTutorials[i] = 16; + break; + case "TUTORIAL_ID_UNUSED_17": + case 17: + message.confirmedTutorials[i] = 17; + break; + case "TUTORIAL_ID_UNUSED_18": + case 18: + message.confirmedTutorials[i] = 18; + break; + case "TUTORIAL_ID_UNUSED_19": + case 19: + message.confirmedTutorials[i] = 19; + break; + case "TUTORIAL_ID_GHOST_STAMP": + case 20: + message.confirmedTutorials[i] = 20; + break; + case "TUTORIAL_ID_GHOST_STAMP_DECLINED": + case 21: + message.confirmedTutorials[i] = 21; + break; + case "TUTORIAL_ID_GHOST_STAMP_FRIENDS": + case 22: + message.confirmedTutorials[i] = 22; + break; + case "TUTORIAL_ID_TERMINAL_SCRATCH": + case 23: + message.confirmedTutorials[i] = 23; + break; + case "TUTORIAL_ID_TURN_SCRATCH_SHEET": + case 24: + message.confirmedTutorials[i] = 24; + break; + case "TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN": + case 25: + message.confirmedTutorials[i] = 25; + break; + case "TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE": + case 26: + message.confirmedTutorials[i] = 26; + break; + case "TUTORIAL_ID_VS_CONTINUE_TICKET": + case 27: + message.confirmedTutorials[i] = 27; + break; + case "TUTORIAL_ID_UNUSED_28": + case 28: + message.confirmedTutorials[i] = 28; + break; + case "TUTORIAL_ID_UNUSED_29": + case 29: + message.confirmedTutorials[i] = 29; + break; + case "TUTORIAL_ID_UNUSED_30": + case 30: + message.confirmedTutorials[i] = 30; + break; + case "TUTORIAL_ID_DRESS_UP": + case 31: + message.confirmedTutorials[i] = 31; + break; + case "TUTORIAL_ID_MULTI_GHOST": + case 32: + message.confirmedTutorials[i] = 32; + break; + case "TUTORIAL_ID_STORY_NEW_FEATURE": + case 33: + message.confirmedTutorials[i] = 33; + break; + case "TUTORIAL_ID_GHOST_NEW_FEATURE": + case 34: + message.confirmedTutorials[i] = 34; + break; + case "TUTORIAL_ID_GHOST_REGION_MAP": + case 35: + message.confirmedTutorials[i] = 35; + break; + } + } + if (object.garageMenuEntered != null) + message.garageMenuEntered = Boolean(object.garageMenuEntered); + return message; + }; + + /** + * Creates a plain object from a SaveTerminalResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {wm.protobuf.SaveTerminalResultRequest} message SaveTerminalResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveTerminalResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.carOrder = []; + object.confirmedTutorials = []; + } + if (options.defaults) { + object.userId = 0; + object.timestamp = 0; + object.garageMenuEntered = false; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + if (message.carOrder && message.carOrder.length) { + object.carOrder = []; + for (let j = 0; j < message.carOrder.length; ++j) + object.carOrder[j] = message.carOrder[j]; + } + if (message.confirmedTutorials && message.confirmedTutorials.length) { + object.confirmedTutorials = []; + for (let j = 0; j < message.confirmedTutorials.length; ++j) + object.confirmedTutorials[j] = options.enums === String ? $root.wm.protobuf.TutorialType[message.confirmedTutorials[j]] : message.confirmedTutorials[j]; + } + if (message.garageMenuEntered != null && message.hasOwnProperty("garageMenuEntered")) + object.garageMenuEntered = message.garageMenuEntered; + return object; + }; + + /** + * Converts this SaveTerminalResultRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveTerminalResultRequest + * @instance + * @returns {Object.} JSON object + */ + SaveTerminalResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveTerminalResultRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveTerminalResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveTerminalResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveTerminalResultRequest"; + }; + + return SaveTerminalResultRequest; + })(); + + protobuf.SaveTerminalResultResponse = (function() { + + /** + * Properties of a SaveTerminalResultResponse. + * @memberof wm.protobuf + * @interface ISaveTerminalResultResponse + * @property {wm.protobuf.ErrorCode} error SaveTerminalResultResponse error + */ + + /** + * Constructs a new SaveTerminalResultResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveTerminalResultResponse. + * @implements ISaveTerminalResultResponse + * @constructor + * @param {wm.protobuf.ISaveTerminalResultResponse=} [properties] Properties to set + */ + function SaveTerminalResultResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveTerminalResultResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveTerminalResultResponse + * @instance + */ + SaveTerminalResultResponse.prototype.error = 0; + + /** + * Creates a new SaveTerminalResultResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.ISaveTerminalResultResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse instance + */ + SaveTerminalResultResponse.create = function create(properties) { + return new SaveTerminalResultResponse(properties); + }; + + /** + * Encodes the specified SaveTerminalResultResponse message. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.ISaveTerminalResultResponse} message SaveTerminalResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveTerminalResultResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveTerminalResultResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.ISaveTerminalResultResponse} message SaveTerminalResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveTerminalResultResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveTerminalResultResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveTerminalResultResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveTerminalResultResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveTerminalResultResponse message. + * @function verify + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveTerminalResultResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveTerminalResultResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveTerminalResultResponse} SaveTerminalResultResponse + */ + SaveTerminalResultResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveTerminalResultResponse) + return object; + let message = new $root.wm.protobuf.SaveTerminalResultResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveTerminalResultResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {wm.protobuf.SaveTerminalResultResponse} message SaveTerminalResultResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveTerminalResultResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveTerminalResultResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveTerminalResultResponse + * @instance + * @returns {Object.} JSON object + */ + SaveTerminalResultResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveTerminalResultResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveTerminalResultResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveTerminalResultResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveTerminalResultResponse"; + }; + + return SaveTerminalResultResponse; + })(); + + protobuf.PingRequest = (function() { + + /** + * Properties of a PingRequest. + * @memberof wm.protobuf + * @interface IPingRequest + * @property {number|null} [ping] PingRequest ping + */ + + /** + * Constructs a new PingRequest. + * @memberof wm.protobuf + * @classdesc Represents a PingRequest. + * @implements IPingRequest + * @constructor + * @param {wm.protobuf.IPingRequest=} [properties] Properties to set + */ + function PingRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PingRequest ping. + * @member {number} ping + * @memberof wm.protobuf.PingRequest + * @instance + */ + PingRequest.prototype.ping = 0; + + /** + * Creates a new PingRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.IPingRequest=} [properties] Properties to set + * @returns {wm.protobuf.PingRequest} PingRequest instance + */ + PingRequest.create = function create(properties) { + return new PingRequest(properties); + }; + + /** + * Encodes the specified PingRequest message. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.IPingRequest} message PingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ping != null && Object.hasOwnProperty.call(message, "ping")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.ping); + return writer; + }; + + /** + * Encodes the specified PingRequest message, length delimited. Does not implicitly {@link wm.protobuf.PingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.IPingRequest} message PingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PingRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PingRequest} PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PingRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ping = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PingRequest} PingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PingRequest message. + * @function verify + * @memberof wm.protobuf.PingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ping != null && message.hasOwnProperty("ping")) + if (!$util.isInteger(message.ping)) + return "ping: integer expected"; + return null; + }; + + /** + * Creates a PingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PingRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PingRequest} PingRequest + */ + PingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PingRequest) + return object; + let message = new $root.wm.protobuf.PingRequest(); + if (object.ping != null) + message.ping = object.ping >>> 0; + return message; + }; + + /** + * Creates a plain object from a PingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PingRequest + * @static + * @param {wm.protobuf.PingRequest} message PingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.ping = 0; + if (message.ping != null && message.hasOwnProperty("ping")) + object.ping = message.ping; + return object; + }; + + /** + * Converts this PingRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.PingRequest + * @instance + * @returns {Object.} JSON object + */ + PingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PingRequest + * @function getTypeUrl + * @memberof wm.protobuf.PingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PingRequest"; + }; + + return PingRequest; + })(); + + protobuf.PingResponse = (function() { + + /** + * Properties of a PingResponse. + * @memberof wm.protobuf + * @interface IPingResponse + * @property {wm.protobuf.ErrorCode} error PingResponse error + * @property {number} pong PingResponse pong + */ + + /** + * Constructs a new PingResponse. + * @memberof wm.protobuf + * @classdesc Represents a PingResponse. + * @implements IPingResponse + * @constructor + * @param {wm.protobuf.IPingResponse=} [properties] Properties to set + */ + function PingResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PingResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.PingResponse + * @instance + */ + PingResponse.prototype.error = 0; + + /** + * PingResponse pong. + * @member {number} pong + * @memberof wm.protobuf.PingResponse + * @instance + */ + PingResponse.prototype.pong = 0; + + /** + * Creates a new PingResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.IPingResponse=} [properties] Properties to set + * @returns {wm.protobuf.PingResponse} PingResponse instance + */ + PingResponse.create = function create(properties) { + return new PingResponse(properties); + }; + + /** + * Encodes the specified PingResponse message. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.IPingResponse} message PingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.pong); + return writer; + }; + + /** + * Encodes the specified PingResponse message, length delimited. Does not implicitly {@link wm.protobuf.PingResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.IPingResponse} message PingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PingResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PingResponse} PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PingResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.pong = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("pong")) + throw $util.ProtocolError("missing required 'pong'", { instance: message }); + return message; + }; + + /** + * Decodes a PingResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PingResponse} PingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PingResponse message. + * @function verify + * @memberof wm.protobuf.PingResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PingResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.pong)) + return "pong: integer expected"; + return null; + }; + + /** + * Creates a PingResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PingResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PingResponse} PingResponse + */ + PingResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PingResponse) + return object; + let message = new $root.wm.protobuf.PingResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.pong != null) + message.pong = object.pong >>> 0; + return message; + }; + + /** + * Creates a plain object from a PingResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PingResponse + * @static + * @param {wm.protobuf.PingResponse} message PingResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PingResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.pong = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.pong != null && message.hasOwnProperty("pong")) + object.pong = message.pong; + return object; + }; + + /** + * Converts this PingResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.PingResponse + * @instance + * @returns {Object.} JSON object + */ + PingResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PingResponse + * @function getTypeUrl + * @memberof wm.protobuf.PingResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PingResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PingResponse"; + }; + + return PingResponse; + })(); + + protobuf.LoadTerminalInformationRequest = (function() { + + /** + * Properties of a LoadTerminalInformationRequest. + * @memberof wm.protobuf + * @interface ILoadTerminalInformationRequest + * @property {number} userId LoadTerminalInformationRequest userId + */ + + /** + * Constructs a new LoadTerminalInformationRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadTerminalInformationRequest. + * @implements ILoadTerminalInformationRequest + * @constructor + * @param {wm.protobuf.ILoadTerminalInformationRequest=} [properties] Properties to set + */ + function LoadTerminalInformationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTerminalInformationRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @instance + */ + LoadTerminalInformationRequest.prototype.userId = 0; + + /** + * Creates a new LoadTerminalInformationRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.ILoadTerminalInformationRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest instance + */ + LoadTerminalInformationRequest.create = function create(properties) { + return new LoadTerminalInformationRequest(properties); + }; + + /** + * Encodes the specified LoadTerminalInformationRequest message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.ILoadTerminalInformationRequest} message LoadTerminalInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadTerminalInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.ILoadTerminalInformationRequest} message LoadTerminalInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTerminalInformationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTerminalInformationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTerminalInformationRequest message. + * @function verify + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTerminalInformationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadTerminalInformationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTerminalInformationRequest} LoadTerminalInformationRequest + */ + LoadTerminalInformationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTerminalInformationRequest) + return object; + let message = new $root.wm.protobuf.LoadTerminalInformationRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadTerminalInformationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {wm.protobuf.LoadTerminalInformationRequest} message LoadTerminalInformationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTerminalInformationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadTerminalInformationRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @instance + * @returns {Object.} JSON object + */ + LoadTerminalInformationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTerminalInformationRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadTerminalInformationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTerminalInformationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTerminalInformationRequest"; + }; + + return LoadTerminalInformationRequest; + })(); + + protobuf.LoadTerminalInformationResponse = (function() { + + /** + * Properties of a LoadTerminalInformationResponse. + * @memberof wm.protobuf + * @interface ILoadTerminalInformationResponse + * @property {wm.protobuf.ErrorCode} error LoadTerminalInformationResponse error + * @property {boolean} prizeReceivable LoadTerminalInformationResponse prizeReceivable + * @property {Array.|null} [noticeEntries] LoadTerminalInformationResponse noticeEntries + * @property {Array.|null} [noticeMessage] LoadTerminalInformationResponse noticeMessage + * @property {Array.|null} [noticeWindow] LoadTerminalInformationResponse noticeWindow + * @property {Array.|null} [noticeWindowMessage] LoadTerminalInformationResponse noticeWindowMessage + * @property {wm.protobuf.ITransferNotice} transferNotice LoadTerminalInformationResponse transferNotice + * @property {boolean} announceFeature LoadTerminalInformationResponse announceFeature + * @property {boolean} freeScratched LoadTerminalInformationResponse freeScratched + * @property {Array.|null} [restrictedModels] LoadTerminalInformationResponse restrictedModels + */ + + /** + * Constructs a new LoadTerminalInformationResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadTerminalInformationResponse. + * @implements ILoadTerminalInformationResponse + * @constructor + * @param {wm.protobuf.ILoadTerminalInformationResponse=} [properties] Properties to set + */ + function LoadTerminalInformationResponse(properties) { + this.noticeEntries = []; + this.noticeMessage = []; + this.noticeWindow = []; + this.noticeWindowMessage = []; + this.restrictedModels = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadTerminalInformationResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.error = 0; + + /** + * LoadTerminalInformationResponse prizeReceivable. + * @member {boolean} prizeReceivable + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.prizeReceivable = false; + + /** + * LoadTerminalInformationResponse noticeEntries. + * @member {Array.} noticeEntries + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeEntries = $util.emptyArray; + + /** + * LoadTerminalInformationResponse noticeMessage. + * @member {Array.} noticeMessage + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeMessage = $util.emptyArray; + + /** + * LoadTerminalInformationResponse noticeWindow. + * @member {Array.} noticeWindow + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeWindow = $util.emptyArray; + + /** + * LoadTerminalInformationResponse noticeWindowMessage. + * @member {Array.} noticeWindowMessage + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.noticeWindowMessage = $util.emptyArray; + + /** + * LoadTerminalInformationResponse transferNotice. + * @member {wm.protobuf.ITransferNotice} transferNotice + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.transferNotice = null; + + /** + * LoadTerminalInformationResponse announceFeature. + * @member {boolean} announceFeature + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.announceFeature = false; + + /** + * LoadTerminalInformationResponse freeScratched. + * @member {boolean} freeScratched + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.freeScratched = false; + + /** + * LoadTerminalInformationResponse restrictedModels. + * @member {Array.} restrictedModels + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + */ + LoadTerminalInformationResponse.prototype.restrictedModels = $util.emptyArray; + + /** + * Creates a new LoadTerminalInformationResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.ILoadTerminalInformationResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse instance + */ + LoadTerminalInformationResponse.create = function create(properties) { + return new LoadTerminalInformationResponse(properties); + }; + + /** + * Encodes the specified LoadTerminalInformationResponse message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.ILoadTerminalInformationResponse} message LoadTerminalInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.restrictedModels != null && message.restrictedModels.length) + for (let i = 0; i < message.restrictedModels.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.restrictedModels[i]); + if (message.noticeEntries != null && message.noticeEntries.length) + for (let i = 0; i < message.noticeEntries.length; ++i) + $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.encode(message.noticeEntries[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.noticeMessage != null && message.noticeMessage.length) + for (let i = 0; i < message.noticeMessage.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.noticeMessage[i]); + if (message.noticeWindow != null && message.noticeWindow.length) + for (let i = 0; i < message.noticeWindow.length; ++i) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.noticeWindow[i]); + if (message.noticeWindowMessage != null && message.noticeWindowMessage.length) + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.noticeWindowMessage[i]); + $root.wm.protobuf.TransferNotice.encode(message.transferNotice, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.announceFeature); + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.prizeReceivable); + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.freeScratched); + return writer; + }; + + /** + * Encodes the specified LoadTerminalInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.ILoadTerminalInformationResponse} message LoadTerminalInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadTerminalInformationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTerminalInformationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 17: { + message.prizeReceivable = reader.bool(); + break; + } + case 10: { + if (!(message.noticeEntries && message.noticeEntries.length)) + message.noticeEntries = []; + message.noticeEntries.push($root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.decode(reader, reader.uint32())); + break; + } + case 11: { + if (!(message.noticeMessage && message.noticeMessage.length)) + message.noticeMessage = []; + message.noticeMessage.push(reader.string()); + break; + } + case 12: { + if (!(message.noticeWindow && message.noticeWindow.length)) + message.noticeWindow = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.noticeWindow.push(reader.int32()); + } else + message.noticeWindow.push(reader.int32()); + break; + } + case 13: { + if (!(message.noticeWindowMessage && message.noticeWindowMessage.length)) + message.noticeWindowMessage = []; + message.noticeWindowMessage.push(reader.string()); + break; + } + case 14: { + message.transferNotice = $root.wm.protobuf.TransferNotice.decode(reader, reader.uint32()); + break; + } + case 16: { + message.announceFeature = reader.bool(); + break; + } + case 18: { + message.freeScratched = reader.bool(); + break; + } + case 2: { + if (!(message.restrictedModels && message.restrictedModels.length)) + message.restrictedModels = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedModels.push(reader.uint32()); + } else + message.restrictedModels.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("prizeReceivable")) + throw $util.ProtocolError("missing required 'prizeReceivable'", { instance: message }); + if (!message.hasOwnProperty("transferNotice")) + throw $util.ProtocolError("missing required 'transferNotice'", { instance: message }); + if (!message.hasOwnProperty("announceFeature")) + throw $util.ProtocolError("missing required 'announceFeature'", { instance: message }); + if (!message.hasOwnProperty("freeScratched")) + throw $util.ProtocolError("missing required 'freeScratched'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadTerminalInformationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadTerminalInformationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadTerminalInformationResponse message. + * @function verify + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadTerminalInformationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (typeof message.prizeReceivable !== "boolean") + return "prizeReceivable: boolean expected"; + if (message.noticeEntries != null && message.hasOwnProperty("noticeEntries")) { + if (!Array.isArray(message.noticeEntries)) + return "noticeEntries: array expected"; + for (let i = 0; i < message.noticeEntries.length; ++i) { + let error = $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify(message.noticeEntries[i]); + if (error) + return "noticeEntries." + error; + } + } + if (message.noticeMessage != null && message.hasOwnProperty("noticeMessage")) { + if (!Array.isArray(message.noticeMessage)) + return "noticeMessage: array expected"; + for (let i = 0; i < message.noticeMessage.length; ++i) + if (!$util.isString(message.noticeMessage[i])) + return "noticeMessage: string[] expected"; + } + if (message.noticeWindow != null && message.hasOwnProperty("noticeWindow")) { + if (!Array.isArray(message.noticeWindow)) + return "noticeWindow: array expected"; + for (let i = 0; i < message.noticeWindow.length; ++i) + switch (message.noticeWindow[i]) { + default: + return "noticeWindow: enum value[] expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + } + if (message.noticeWindowMessage != null && message.hasOwnProperty("noticeWindowMessage")) { + if (!Array.isArray(message.noticeWindowMessage)) + return "noticeWindowMessage: array expected"; + for (let i = 0; i < message.noticeWindowMessage.length; ++i) + if (!$util.isString(message.noticeWindowMessage[i])) + return "noticeWindowMessage: string[] expected"; + } + { + let error = $root.wm.protobuf.TransferNotice.verify(message.transferNotice); + if (error) + return "transferNotice." + error; + } + if (typeof message.announceFeature !== "boolean") + return "announceFeature: boolean expected"; + if (typeof message.freeScratched !== "boolean") + return "freeScratched: boolean expected"; + if (message.restrictedModels != null && message.hasOwnProperty("restrictedModels")) { + if (!Array.isArray(message.restrictedModels)) + return "restrictedModels: array expected"; + for (let i = 0; i < message.restrictedModels.length; ++i) + if (!$util.isInteger(message.restrictedModels[i])) + return "restrictedModels: integer[] expected"; + } + return null; + }; + + /** + * Creates a LoadTerminalInformationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTerminalInformationResponse} LoadTerminalInformationResponse + */ + LoadTerminalInformationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTerminalInformationResponse) + return object; + let message = new $root.wm.protobuf.LoadTerminalInformationResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.prizeReceivable != null) + message.prizeReceivable = Boolean(object.prizeReceivable); + if (object.noticeEntries) { + if (!Array.isArray(object.noticeEntries)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeEntries: array expected"); + message.noticeEntries = []; + for (let i = 0; i < object.noticeEntries.length; ++i) { + if (typeof object.noticeEntries[i] !== "object") + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeEntries: object expected"); + message.noticeEntries[i] = $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.fromObject(object.noticeEntries[i]); + } + } + if (object.noticeMessage) { + if (!Array.isArray(object.noticeMessage)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeMessage: array expected"); + message.noticeMessage = []; + for (let i = 0; i < object.noticeMessage.length; ++i) + message.noticeMessage[i] = String(object.noticeMessage[i]); + } + if (object.noticeWindow) { + if (!Array.isArray(object.noticeWindow)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeWindow: array expected"); + message.noticeWindow = []; + for (let i = 0; i < object.noticeWindow.length; ++i) + switch (object.noticeWindow[i]) { + default: + case "NOTICE_UNUSED_1": + case 1: + message.noticeWindow[i] = 1; + break; + case "NOTICE_UNUSED_2": + case 2: + message.noticeWindow[i] = 2; + break; + case "NOTICE_UNUSED_3": + case 3: + message.noticeWindow[i] = 3; + break; + case "NOTICE_UNUSED_4": + case 4: + message.noticeWindow[i] = 4; + break; + case "NOTICE_UNUSED_5": + case 5: + message.noticeWindow[i] = 5; + break; + case "NOTICE_UNUSED_6": + case 6: + message.noticeWindow[i] = 6; + break; + case "NOTICE_UNUSED_7": + case 7: + message.noticeWindow[i] = 7; + break; + case "NOTICE_UNUSED_8": + case 8: + message.noticeWindow[i] = 8; + break; + case "NOTICE_UNUSED_9": + case 9: + message.noticeWindow[i] = 9; + break; + case "NOTICE_UNUSED_10": + case 10: + message.noticeWindow[i] = 10; + break; + case "NOTICE_UNUSED_11": + case 11: + message.noticeWindow[i] = 11; + break; + case "NOTICE_UNUSED_12": + case 12: + message.noticeWindow[i] = 12; + break; + } + } + if (object.noticeWindowMessage) { + if (!Array.isArray(object.noticeWindowMessage)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.noticeWindowMessage: array expected"); + message.noticeWindowMessage = []; + for (let i = 0; i < object.noticeWindowMessage.length; ++i) + message.noticeWindowMessage[i] = String(object.noticeWindowMessage[i]); + } + if (object.transferNotice != null) { + if (typeof object.transferNotice !== "object") + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.transferNotice: object expected"); + message.transferNotice = $root.wm.protobuf.TransferNotice.fromObject(object.transferNotice); + } + if (object.announceFeature != null) + message.announceFeature = Boolean(object.announceFeature); + if (object.freeScratched != null) + message.freeScratched = Boolean(object.freeScratched); + if (object.restrictedModels) { + if (!Array.isArray(object.restrictedModels)) + throw TypeError(".wm.protobuf.LoadTerminalInformationResponse.restrictedModels: array expected"); + message.restrictedModels = []; + for (let i = 0; i < object.restrictedModels.length; ++i) + message.restrictedModels[i] = object.restrictedModels[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a LoadTerminalInformationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse} message LoadTerminalInformationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadTerminalInformationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.restrictedModels = []; + object.noticeEntries = []; + object.noticeMessage = []; + object.noticeWindow = []; + object.noticeWindowMessage = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.transferNotice = null; + object.announceFeature = false; + object.prizeReceivable = false; + object.freeScratched = false; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.restrictedModels && message.restrictedModels.length) { + object.restrictedModels = []; + for (let j = 0; j < message.restrictedModels.length; ++j) + object.restrictedModels[j] = message.restrictedModels[j]; + } + if (message.noticeEntries && message.noticeEntries.length) { + object.noticeEntries = []; + for (let j = 0; j < message.noticeEntries.length; ++j) + object.noticeEntries[j] = $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.toObject(message.noticeEntries[j], options); + } + if (message.noticeMessage && message.noticeMessage.length) { + object.noticeMessage = []; + for (let j = 0; j < message.noticeMessage.length; ++j) + object.noticeMessage[j] = message.noticeMessage[j]; + } + if (message.noticeWindow && message.noticeWindow.length) { + object.noticeWindow = []; + for (let j = 0; j < message.noticeWindow.length; ++j) + object.noticeWindow[j] = options.enums === String ? $root.wm.protobuf.NoticeEntry[message.noticeWindow[j]] : message.noticeWindow[j]; + } + if (message.noticeWindowMessage && message.noticeWindowMessage.length) { + object.noticeWindowMessage = []; + for (let j = 0; j < message.noticeWindowMessage.length; ++j) + object.noticeWindowMessage[j] = message.noticeWindowMessage[j]; + } + if (message.transferNotice != null && message.hasOwnProperty("transferNotice")) + object.transferNotice = $root.wm.protobuf.TransferNotice.toObject(message.transferNotice, options); + if (message.announceFeature != null && message.hasOwnProperty("announceFeature")) + object.announceFeature = message.announceFeature; + if (message.prizeReceivable != null && message.hasOwnProperty("prizeReceivable")) + object.prizeReceivable = message.prizeReceivable; + if (message.freeScratched != null && message.hasOwnProperty("freeScratched")) + object.freeScratched = message.freeScratched; + return object; + }; + + /** + * Converts this LoadTerminalInformationResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @instance + * @returns {Object.} JSON object + */ + LoadTerminalInformationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadTerminalInformationResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadTerminalInformationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTerminalInformationResponse"; + }; + + LoadTerminalInformationResponse.TerminalNotice = (function() { + + /** + * Properties of a TerminalNotice. + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @interface ITerminalNotice + * @property {wm.protobuf.NoticeEntry} noticeType TerminalNotice noticeType + * @property {string|null} [field_1] TerminalNotice field_1 + * @property {number|null} [field_2] TerminalNotice field_2 + * @property {number|null} [field_3] TerminalNotice field_3 + */ + + /** + * Constructs a new TerminalNotice. + * @memberof wm.protobuf.LoadTerminalInformationResponse + * @classdesc Represents a TerminalNotice. + * @implements ITerminalNotice + * @constructor + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice=} [properties] Properties to set + */ + function TerminalNotice(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerminalNotice noticeType. + * @member {wm.protobuf.NoticeEntry} noticeType + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.noticeType = 1; + + /** + * TerminalNotice field_1. + * @member {string} field_1 + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.field_1 = ""; + + /** + * TerminalNotice field_2. + * @member {number} field_2 + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.field_2 = 0; + + /** + * TerminalNotice field_3. + * @member {number} field_3 + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + */ + TerminalNotice.prototype.field_3 = 0; + + /** + * Creates a new TerminalNotice instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice=} [properties] Properties to set + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice instance + */ + TerminalNotice.create = function create(properties) { + return new TerminalNotice(properties); + }; + + /** + * Encodes the specified TerminalNotice message. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice} message TerminalNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalNotice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.noticeType); + if (message.field_1 != null && Object.hasOwnProperty.call(message, "field_1")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.field_1); + if (message.field_2 != null && Object.hasOwnProperty.call(message, "field_2")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.field_2); + if (message.field_3 != null && Object.hasOwnProperty.call(message, "field_3")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.field_3); + return writer; + }; + + /** + * Encodes the specified TerminalNotice message, length delimited. Does not implicitly {@link wm.protobuf.LoadTerminalInformationResponse.TerminalNotice.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.ITerminalNotice} message TerminalNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalNotice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalNotice.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.noticeType = reader.int32(); + break; + } + case 2: { + message.field_1 = reader.string(); + break; + } + case 3: { + message.field_2 = reader.uint32(); + break; + } + case 4: { + message.field_3 = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("noticeType")) + throw $util.ProtocolError("missing required 'noticeType'", { instance: message }); + return message; + }; + + /** + * Decodes a TerminalNotice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalNotice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerminalNotice message. + * @function verify + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerminalNotice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.noticeType) { + default: + return "noticeType: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + if (message.field_1 != null && message.hasOwnProperty("field_1")) + if (!$util.isString(message.field_1)) + return "field_1: string expected"; + if (message.field_2 != null && message.hasOwnProperty("field_2")) + if (!$util.isInteger(message.field_2)) + return "field_2: integer expected"; + if (message.field_3 != null && message.hasOwnProperty("field_3")) + if (!$util.isInteger(message.field_3)) + return "field_3: integer expected"; + return null; + }; + + /** + * Creates a TerminalNotice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} TerminalNotice + */ + TerminalNotice.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice) + return object; + let message = new $root.wm.protobuf.LoadTerminalInformationResponse.TerminalNotice(); + switch (object.noticeType) { + case "NOTICE_UNUSED_1": + case 1: + message.noticeType = 1; + break; + case "NOTICE_UNUSED_2": + case 2: + message.noticeType = 2; + break; + case "NOTICE_UNUSED_3": + case 3: + message.noticeType = 3; + break; + case "NOTICE_UNUSED_4": + case 4: + message.noticeType = 4; + break; + case "NOTICE_UNUSED_5": + case 5: + message.noticeType = 5; + break; + case "NOTICE_UNUSED_6": + case 6: + message.noticeType = 6; + break; + case "NOTICE_UNUSED_7": + case 7: + message.noticeType = 7; + break; + case "NOTICE_UNUSED_8": + case 8: + message.noticeType = 8; + break; + case "NOTICE_UNUSED_9": + case 9: + message.noticeType = 9; + break; + case "NOTICE_UNUSED_10": + case 10: + message.noticeType = 10; + break; + case "NOTICE_UNUSED_11": + case 11: + message.noticeType = 11; + break; + case "NOTICE_UNUSED_12": + case 12: + message.noticeType = 12; + break; + } + if (object.field_1 != null) + message.field_1 = String(object.field_1); + if (object.field_2 != null) + message.field_2 = object.field_2 >>> 0; + if (object.field_3 != null) + message.field_3 = object.field_3 >>> 0; + return message; + }; + + /** + * Creates a plain object from a TerminalNotice message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {wm.protobuf.LoadTerminalInformationResponse.TerminalNotice} message TerminalNotice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerminalNotice.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.noticeType = options.enums === String ? "NOTICE_UNUSED_1" : 1; + object.field_1 = ""; + object.field_2 = 0; + object.field_3 = 0; + } + if (message.noticeType != null && message.hasOwnProperty("noticeType")) + object.noticeType = options.enums === String ? $root.wm.protobuf.NoticeEntry[message.noticeType] : message.noticeType; + if (message.field_1 != null && message.hasOwnProperty("field_1")) + object.field_1 = message.field_1; + if (message.field_2 != null && message.hasOwnProperty("field_2")) + object.field_2 = message.field_2; + if (message.field_3 != null && message.hasOwnProperty("field_3")) + object.field_3 = message.field_3; + return object; + }; + + /** + * Converts this TerminalNotice to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @instance + * @returns {Object.} JSON object + */ + TerminalNotice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerminalNotice + * @function getTypeUrl + * @memberof wm.protobuf.LoadTerminalInformationResponse.TerminalNotice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerminalNotice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadTerminalInformationResponse.TerminalNotice"; + }; + + return TerminalNotice; + })(); + + return LoadTerminalInformationResponse; + })(); + + protobuf.CreateUserRequest = (function() { + + /** + * Properties of a CreateUserRequest. + * @memberof wm.protobuf + * @interface ICreateUserRequest + * @property {number|null} [banapassportAmId] CreateUserRequest banapassportAmId + * @property {string|null} [cardChipId] CreateUserRequest cardChipId + * @property {string|null} [accessCode] CreateUserRequest accessCode + * @property {number|null} [cardTypeCode] CreateUserRequest cardTypeCode + * @property {number|null} [cardRegionCode] CreateUserRequest cardRegionCode + * @property {wm.protobuf.DeviceType|null} [device] CreateUserRequest device + * @property {number} timestamp CreateUserRequest timestamp + */ + + /** + * Constructs a new CreateUserRequest. + * @memberof wm.protobuf + * @classdesc Represents a CreateUserRequest. + * @implements ICreateUserRequest + * @constructor + * @param {wm.protobuf.ICreateUserRequest=} [properties] Properties to set + */ + function CreateUserRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserRequest banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.banapassportAmId = 0; + + /** + * CreateUserRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.cardChipId = ""; + + /** + * CreateUserRequest accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.accessCode = ""; + + /** + * CreateUserRequest cardTypeCode. + * @member {number} cardTypeCode + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.cardTypeCode = 0; + + /** + * CreateUserRequest cardRegionCode. + * @member {number} cardRegionCode + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.cardRegionCode = 0; + + /** + * CreateUserRequest device. + * @member {wm.protobuf.DeviceType} device + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.device = 0; + + /** + * CreateUserRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.CreateUserRequest + * @instance + */ + CreateUserRequest.prototype.timestamp = 0; + + /** + * Creates a new CreateUserRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.ICreateUserRequest=} [properties] Properties to set + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest instance + */ + CreateUserRequest.create = function create(properties) { + return new CreateUserRequest(properties); + }; + + /** + * Encodes the specified CreateUserRequest message. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.ICreateUserRequest} message CreateUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.banapassportAmId); + if (message.cardChipId != null && Object.hasOwnProperty.call(message, "cardChipId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cardChipId); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.accessCode); + if (message.cardTypeCode != null && Object.hasOwnProperty.call(message, "cardTypeCode")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cardTypeCode); + if (message.cardRegionCode != null && Object.hasOwnProperty.call(message, "cardRegionCode")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.cardRegionCode); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.device); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified CreateUserRequest message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.ICreateUserRequest} message CreateUserRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateUserRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.banapassportAmId = reader.uint32(); + break; + } + case 2: { + message.cardChipId = reader.string(); + break; + } + case 3: { + message.accessCode = reader.string(); + break; + } + case 4: { + message.cardTypeCode = reader.uint32(); + break; + } + case 5: { + message.cardRegionCode = reader.uint32(); + break; + } + case 6: { + message.device = reader.int32(); + break; + } + case 7: { + message.timestamp = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateUserRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserRequest message. + * @function verify + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + if (!$util.isInteger(message.cardTypeCode)) + return "cardTypeCode: integer expected"; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + if (!$util.isInteger(message.cardRegionCode)) + return "cardRegionCode: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + switch (message.device) { + default: + return "device: enum value expected"; + case 0: + case 1: + break; + } + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + return null; + }; + + /** + * Creates a CreateUserRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateUserRequest} CreateUserRequest + */ + CreateUserRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateUserRequest) + return object; + let message = new $root.wm.protobuf.CreateUserRequest(); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.cardTypeCode != null) + message.cardTypeCode = object.cardTypeCode >>> 0; + if (object.cardRegionCode != null) + message.cardRegionCode = object.cardRegionCode >>> 0; + switch (object.device) { + case "DEVICE_CARD": + case 0: + message.device = 0; + break; + case "DEVICE_PHONE": + case 1: + message.device = 1; + break; + } + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateUserRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {wm.protobuf.CreateUserRequest} message CreateUserRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.banapassportAmId = 0; + object.cardChipId = ""; + object.accessCode = ""; + object.cardTypeCode = 0; + object.cardRegionCode = 0; + object.device = options.enums === String ? "DEVICE_CARD" : 0; + object.timestamp = 0; + } + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.cardTypeCode != null && message.hasOwnProperty("cardTypeCode")) + object.cardTypeCode = message.cardTypeCode; + if (message.cardRegionCode != null && message.hasOwnProperty("cardRegionCode")) + object.cardRegionCode = message.cardRegionCode; + if (message.device != null && message.hasOwnProperty("device")) + object.device = options.enums === String ? $root.wm.protobuf.DeviceType[message.device] : message.device; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this CreateUserRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateUserRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUserRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserRequest + * @function getTypeUrl + * @memberof wm.protobuf.CreateUserRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateUserRequest"; + }; + + return CreateUserRequest; + })(); + + protobuf.CreateUserResponse = (function() { + + /** + * Properties of a CreateUserResponse. + * @memberof wm.protobuf + * @interface ICreateUserResponse + * @property {wm.protobuf.ErrorCode} error CreateUserResponse error + * @property {string|null} [accessCode] CreateUserResponse accessCode + * @property {number|null} [banapassportAmId] CreateUserResponse banapassportAmId + * @property {number|null} [mbid] CreateUserResponse mbid + * @property {number} userId CreateUserResponse userId + */ + + /** + * Constructs a new CreateUserResponse. + * @memberof wm.protobuf + * @classdesc Represents a CreateUserResponse. + * @implements ICreateUserResponse + * @constructor + * @param {wm.protobuf.ICreateUserResponse=} [properties] Properties to set + */ + function CreateUserResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.error = 0; + + /** + * CreateUserResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.accessCode = ""; + + /** + * CreateUserResponse banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.banapassportAmId = 0; + + /** + * CreateUserResponse mbid. + * @member {number} mbid + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.mbid = 0; + + /** + * CreateUserResponse userId. + * @member {number} userId + * @memberof wm.protobuf.CreateUserResponse + * @instance + */ + CreateUserResponse.prototype.userId = 0; + + /** + * Creates a new CreateUserResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.ICreateUserResponse=} [properties] Properties to set + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse instance + */ + CreateUserResponse.create = function create(properties) { + return new CreateUserResponse(properties); + }; + + /** + * Encodes the specified CreateUserResponse message. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.ICreateUserResponse} message CreateUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.accessCode != null && Object.hasOwnProperty.call(message, "accessCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + if (message.banapassportAmId != null && Object.hasOwnProperty.call(message, "banapassportAmId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.banapassportAmId); + if (message.mbid != null && Object.hasOwnProperty.call(message, "mbid")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mbid); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified CreateUserResponse message, length delimited. Does not implicitly {@link wm.protobuf.CreateUserResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.ICreateUserResponse} message CreateUserResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CreateUserResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + case 3: { + message.banapassportAmId = reader.uint32(); + break; + } + case 4: { + message.mbid = reader.uint32(); + break; + } + case 5: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a CreateUserResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserResponse message. + * @function verify + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + if (message.mbid != null && message.hasOwnProperty("mbid")) + if (!$util.isInteger(message.mbid)) + return "mbid: integer expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a CreateUserResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CreateUserResponse} CreateUserResponse + */ + CreateUserResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CreateUserResponse) + return object; + let message = new $root.wm.protobuf.CreateUserResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + if (object.mbid != null) + message.mbid = object.mbid >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a CreateUserResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {wm.protobuf.CreateUserResponse} message CreateUserResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.accessCode = ""; + object.banapassportAmId = 0; + object.mbid = 0; + object.userId = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + if (message.mbid != null && message.hasOwnProperty("mbid")) + object.mbid = message.mbid; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this CreateUserResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.CreateUserResponse + * @instance + * @returns {Object.} JSON object + */ + CreateUserResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserResponse + * @function getTypeUrl + * @memberof wm.protobuf.CreateUserResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CreateUserResponse"; + }; + + return CreateUserResponse; + })(); + + protobuf.AskAccessCodeRequest = (function() { + + /** + * Properties of an AskAccessCodeRequest. + * @memberof wm.protobuf + * @interface IAskAccessCodeRequest + * @property {string} cardChipId AskAccessCodeRequest cardChipId + */ + + /** + * Constructs a new AskAccessCodeRequest. + * @memberof wm.protobuf + * @classdesc Represents an AskAccessCodeRequest. + * @implements IAskAccessCodeRequest + * @constructor + * @param {wm.protobuf.IAskAccessCodeRequest=} [properties] Properties to set + */ + function AskAccessCodeRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AskAccessCodeRequest cardChipId. + * @member {string} cardChipId + * @memberof wm.protobuf.AskAccessCodeRequest + * @instance + */ + AskAccessCodeRequest.prototype.cardChipId = ""; + + /** + * Creates a new AskAccessCodeRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.IAskAccessCodeRequest=} [properties] Properties to set + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest instance + */ + AskAccessCodeRequest.create = function create(properties) { + return new AskAccessCodeRequest(properties); + }; + + /** + * Encodes the specified AskAccessCodeRequest message. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.IAskAccessCodeRequest} message AskAccessCodeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cardChipId); + return writer; + }; + + /** + * Encodes the specified AskAccessCodeRequest message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.IAskAccessCodeRequest} message AskAccessCodeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.AskAccessCodeRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cardChipId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("cardChipId")) + throw $util.ProtocolError("missing required 'cardChipId'", { instance: message }); + return message; + }; + + /** + * Decodes an AskAccessCodeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AskAccessCodeRequest message. + * @function verify + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AskAccessCodeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.cardChipId)) + return "cardChipId: string expected"; + return null; + }; + + /** + * Creates an AskAccessCodeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.AskAccessCodeRequest} AskAccessCodeRequest + */ + AskAccessCodeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.AskAccessCodeRequest) + return object; + let message = new $root.wm.protobuf.AskAccessCodeRequest(); + if (object.cardChipId != null) + message.cardChipId = String(object.cardChipId); + return message; + }; + + /** + * Creates a plain object from an AskAccessCodeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {wm.protobuf.AskAccessCodeRequest} message AskAccessCodeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AskAccessCodeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.cardChipId = ""; + if (message.cardChipId != null && message.hasOwnProperty("cardChipId")) + object.cardChipId = message.cardChipId; + return object; + }; + + /** + * Converts this AskAccessCodeRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.AskAccessCodeRequest + * @instance + * @returns {Object.} JSON object + */ + AskAccessCodeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AskAccessCodeRequest + * @function getTypeUrl + * @memberof wm.protobuf.AskAccessCodeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AskAccessCodeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.AskAccessCodeRequest"; + }; + + return AskAccessCodeRequest; + })(); + + protobuf.AskAccessCodeResponse = (function() { + + /** + * Properties of an AskAccessCodeResponse. + * @memberof wm.protobuf + * @interface IAskAccessCodeResponse + * @property {wm.protobuf.ErrorCode} error AskAccessCodeResponse error + * @property {string} accessCode AskAccessCodeResponse accessCode + */ + + /** + * Constructs a new AskAccessCodeResponse. + * @memberof wm.protobuf + * @classdesc Represents an AskAccessCodeResponse. + * @implements IAskAccessCodeResponse + * @constructor + * @param {wm.protobuf.IAskAccessCodeResponse=} [properties] Properties to set + */ + function AskAccessCodeResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AskAccessCodeResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.AskAccessCodeResponse + * @instance + */ + AskAccessCodeResponse.prototype.error = 0; + + /** + * AskAccessCodeResponse accessCode. + * @member {string} accessCode + * @memberof wm.protobuf.AskAccessCodeResponse + * @instance + */ + AskAccessCodeResponse.prototype.accessCode = ""; + + /** + * Creates a new AskAccessCodeResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.IAskAccessCodeResponse=} [properties] Properties to set + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse instance + */ + AskAccessCodeResponse.create = function create(properties) { + return new AskAccessCodeResponse(properties); + }; + + /** + * Encodes the specified AskAccessCodeResponse message. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.IAskAccessCodeResponse} message AskAccessCodeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessCode); + return writer; + }; + + /** + * Encodes the specified AskAccessCodeResponse message, length delimited. Does not implicitly {@link wm.protobuf.AskAccessCodeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.IAskAccessCodeResponse} message AskAccessCodeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AskAccessCodeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.AskAccessCodeResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.accessCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("accessCode")) + throw $util.ProtocolError("missing required 'accessCode'", { instance: message }); + return message; + }; + + /** + * Decodes an AskAccessCodeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AskAccessCodeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AskAccessCodeResponse message. + * @function verify + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AskAccessCodeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isString(message.accessCode)) + return "accessCode: string expected"; + return null; + }; + + /** + * Creates an AskAccessCodeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.AskAccessCodeResponse} AskAccessCodeResponse + */ + AskAccessCodeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.AskAccessCodeResponse) + return object; + let message = new $root.wm.protobuf.AskAccessCodeResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.accessCode != null) + message.accessCode = String(object.accessCode); + return message; + }; + + /** + * Creates a plain object from an AskAccessCodeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {wm.protobuf.AskAccessCodeResponse} message AskAccessCodeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AskAccessCodeResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.accessCode = ""; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.accessCode != null && message.hasOwnProperty("accessCode")) + object.accessCode = message.accessCode; + return object; + }; + + /** + * Converts this AskAccessCodeResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.AskAccessCodeResponse + * @instance + * @returns {Object.} JSON object + */ + AskAccessCodeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AskAccessCodeResponse + * @function getTypeUrl + * @memberof wm.protobuf.AskAccessCodeResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AskAccessCodeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.AskAccessCodeResponse"; + }; + + return AskAccessCodeResponse; + })(); + + protobuf.RegisterOpponentGhostRequest = (function() { + + /** + * Properties of a RegisterOpponentGhostRequest. + * @memberof wm.protobuf + * @interface IRegisterOpponentGhostRequest + * @property {number} carId RegisterOpponentGhostRequest carId + * @property {number} specialGhostId RegisterOpponentGhostRequest specialGhostId + */ + + /** + * Constructs a new RegisterOpponentGhostRequest. + * @memberof wm.protobuf + * @classdesc Represents a RegisterOpponentGhostRequest. + * @implements IRegisterOpponentGhostRequest + * @constructor + * @param {wm.protobuf.IRegisterOpponentGhostRequest=} [properties] Properties to set + */ + function RegisterOpponentGhostRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterOpponentGhostRequest carId. + * @member {number} carId + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @instance + */ + RegisterOpponentGhostRequest.prototype.carId = 0; + + /** + * RegisterOpponentGhostRequest specialGhostId. + * @member {number} specialGhostId + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @instance + */ + RegisterOpponentGhostRequest.prototype.specialGhostId = 0; + + /** + * Creates a new RegisterOpponentGhostRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.IRegisterOpponentGhostRequest=} [properties] Properties to set + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest instance + */ + RegisterOpponentGhostRequest.create = function create(properties) { + return new RegisterOpponentGhostRequest(properties); + }; + + /** + * Encodes the specified RegisterOpponentGhostRequest message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.IRegisterOpponentGhostRequest} message RegisterOpponentGhostRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.specialGhostId); + return writer; + }; + + /** + * Encodes the specified RegisterOpponentGhostRequest message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.IRegisterOpponentGhostRequest} message RegisterOpponentGhostRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterOpponentGhostRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.specialGhostId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("specialGhostId")) + throw $util.ProtocolError("missing required 'specialGhostId'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterOpponentGhostRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterOpponentGhostRequest message. + * @function verify + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterOpponentGhostRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.specialGhostId)) + return "specialGhostId: integer expected"; + return null; + }; + + /** + * Creates a RegisterOpponentGhostRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterOpponentGhostRequest} RegisterOpponentGhostRequest + */ + RegisterOpponentGhostRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterOpponentGhostRequest) + return object; + let message = new $root.wm.protobuf.RegisterOpponentGhostRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.specialGhostId != null) + message.specialGhostId = object.specialGhostId >>> 0; + return message; + }; + + /** + * Creates a plain object from a RegisterOpponentGhostRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {wm.protobuf.RegisterOpponentGhostRequest} message RegisterOpponentGhostRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterOpponentGhostRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.specialGhostId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.specialGhostId != null && message.hasOwnProperty("specialGhostId")) + object.specialGhostId = message.specialGhostId; + return object; + }; + + /** + * Converts this RegisterOpponentGhostRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @instance + * @returns {Object.} JSON object + */ + RegisterOpponentGhostRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterOpponentGhostRequest + * @function getTypeUrl + * @memberof wm.protobuf.RegisterOpponentGhostRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterOpponentGhostRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterOpponentGhostRequest"; + }; + + return RegisterOpponentGhostRequest; + })(); + + protobuf.RegisterOpponentGhostResponse = (function() { + + /** + * Properties of a RegisterOpponentGhostResponse. + * @memberof wm.protobuf + * @interface IRegisterOpponentGhostResponse + * @property {wm.protobuf.ErrorCode} error RegisterOpponentGhostResponse error + */ + + /** + * Constructs a new RegisterOpponentGhostResponse. + * @memberof wm.protobuf + * @classdesc Represents a RegisterOpponentGhostResponse. + * @implements IRegisterOpponentGhostResponse + * @constructor + * @param {wm.protobuf.IRegisterOpponentGhostResponse=} [properties] Properties to set + */ + function RegisterOpponentGhostResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegisterOpponentGhostResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @instance + */ + RegisterOpponentGhostResponse.prototype.error = 0; + + /** + * Creates a new RegisterOpponentGhostResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.IRegisterOpponentGhostResponse=} [properties] Properties to set + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse instance + */ + RegisterOpponentGhostResponse.create = function create(properties) { + return new RegisterOpponentGhostResponse(properties); + }; + + /** + * Encodes the specified RegisterOpponentGhostResponse message. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.IRegisterOpponentGhostResponse} message RegisterOpponentGhostResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified RegisterOpponentGhostResponse message, length delimited. Does not implicitly {@link wm.protobuf.RegisterOpponentGhostResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.IRegisterOpponentGhostResponse} message RegisterOpponentGhostResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegisterOpponentGhostResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.RegisterOpponentGhostResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a RegisterOpponentGhostResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegisterOpponentGhostResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegisterOpponentGhostResponse message. + * @function verify + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegisterOpponentGhostResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a RegisterOpponentGhostResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.RegisterOpponentGhostResponse} RegisterOpponentGhostResponse + */ + RegisterOpponentGhostResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.RegisterOpponentGhostResponse) + return object; + let message = new $root.wm.protobuf.RegisterOpponentGhostResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a RegisterOpponentGhostResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {wm.protobuf.RegisterOpponentGhostResponse} message RegisterOpponentGhostResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegisterOpponentGhostResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this RegisterOpponentGhostResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @instance + * @returns {Object.} JSON object + */ + RegisterOpponentGhostResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegisterOpponentGhostResponse + * @function getTypeUrl + * @memberof wm.protobuf.RegisterOpponentGhostResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegisterOpponentGhostResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.RegisterOpponentGhostResponse"; + }; + + return RegisterOpponentGhostResponse; + })(); + + protobuf.GrantCarRightRequest = (function() { + + /** + * Properties of a GrantCarRightRequest. + * @memberof wm.protobuf + * @interface IGrantCarRightRequest + * @property {number} userId GrantCarRightRequest userId + * @property {number} targetUserId GrantCarRightRequest targetUserId + * @property {number} timestamp GrantCarRightRequest timestamp + */ + + /** + * Constructs a new GrantCarRightRequest. + * @memberof wm.protobuf + * @classdesc Represents a GrantCarRightRequest. + * @implements IGrantCarRightRequest + * @constructor + * @param {wm.protobuf.IGrantCarRightRequest=} [properties] Properties to set + */ + function GrantCarRightRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GrantCarRightRequest userId. + * @member {number} userId + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + */ + GrantCarRightRequest.prototype.userId = 0; + + /** + * GrantCarRightRequest targetUserId. + * @member {number} targetUserId + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + */ + GrantCarRightRequest.prototype.targetUserId = 0; + + /** + * GrantCarRightRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + */ + GrantCarRightRequest.prototype.timestamp = 0; + + /** + * Creates a new GrantCarRightRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.IGrantCarRightRequest=} [properties] Properties to set + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest instance + */ + GrantCarRightRequest.create = function create(properties) { + return new GrantCarRightRequest(properties); + }; + + /** + * Encodes the specified GrantCarRightRequest message. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.IGrantCarRightRequest} message GrantCarRightRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetUserId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified GrantCarRightRequest message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.IGrantCarRightRequest} message GrantCarRightRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GrantCarRightRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.targetUserId = reader.uint32(); + break; + } + case 3: { + message.timestamp = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("targetUserId")) + throw $util.ProtocolError("missing required 'targetUserId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + return message; + }; + + /** + * Decodes a GrantCarRightRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GrantCarRightRequest message. + * @function verify + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GrantCarRightRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.targetUserId)) + return "targetUserId: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + return null; + }; + + /** + * Creates a GrantCarRightRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GrantCarRightRequest} GrantCarRightRequest + */ + GrantCarRightRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GrantCarRightRequest) + return object; + let message = new $root.wm.protobuf.GrantCarRightRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.targetUserId != null) + message.targetUserId = object.targetUserId >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + return message; + }; + + /** + * Creates a plain object from a GrantCarRightRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {wm.protobuf.GrantCarRightRequest} message GrantCarRightRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GrantCarRightRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.targetUserId = 0; + object.timestamp = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.targetUserId != null && message.hasOwnProperty("targetUserId")) + object.targetUserId = message.targetUserId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this GrantCarRightRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.GrantCarRightRequest + * @instance + * @returns {Object.} JSON object + */ + GrantCarRightRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GrantCarRightRequest + * @function getTypeUrl + * @memberof wm.protobuf.GrantCarRightRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GrantCarRightRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GrantCarRightRequest"; + }; + + return GrantCarRightRequest; + })(); + + protobuf.GrantCarRightResponse = (function() { + + /** + * Properties of a GrantCarRightResponse. + * @memberof wm.protobuf + * @interface IGrantCarRightResponse + * @property {wm.protobuf.ErrorCode} error GrantCarRightResponse error + */ + + /** + * Constructs a new GrantCarRightResponse. + * @memberof wm.protobuf + * @classdesc Represents a GrantCarRightResponse. + * @implements IGrantCarRightResponse + * @constructor + * @param {wm.protobuf.IGrantCarRightResponse=} [properties] Properties to set + */ + function GrantCarRightResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GrantCarRightResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.GrantCarRightResponse + * @instance + */ + GrantCarRightResponse.prototype.error = 0; + + /** + * Creates a new GrantCarRightResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.IGrantCarRightResponse=} [properties] Properties to set + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse instance + */ + GrantCarRightResponse.create = function create(properties) { + return new GrantCarRightResponse(properties); + }; + + /** + * Encodes the specified GrantCarRightResponse message. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.IGrantCarRightResponse} message GrantCarRightResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified GrantCarRightResponse message, length delimited. Does not implicitly {@link wm.protobuf.GrantCarRightResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.IGrantCarRightResponse} message GrantCarRightResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrantCarRightResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GrantCarRightResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a GrantCarRightResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrantCarRightResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GrantCarRightResponse message. + * @function verify + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GrantCarRightResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a GrantCarRightResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GrantCarRightResponse} GrantCarRightResponse + */ + GrantCarRightResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GrantCarRightResponse) + return object; + let message = new $root.wm.protobuf.GrantCarRightResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a GrantCarRightResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {wm.protobuf.GrantCarRightResponse} message GrantCarRightResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GrantCarRightResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this GrantCarRightResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.GrantCarRightResponse + * @instance + * @returns {Object.} JSON object + */ + GrantCarRightResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GrantCarRightResponse + * @function getTypeUrl + * @memberof wm.protobuf.GrantCarRightResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GrantCarRightResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GrantCarRightResponse"; + }; + + return GrantCarRightResponse; + })(); + + protobuf.LoadGhostCompetitionRankingRequest = (function() { + + /** + * Properties of a LoadGhostCompetitionRankingRequest. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionRankingRequest + * @property {number} carId LoadGhostCompetitionRankingRequest carId + * @property {number} competitionId LoadGhostCompetitionRankingRequest competitionId + */ + + /** + * Constructs a new LoadGhostCompetitionRankingRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionRankingRequest. + * @implements ILoadGhostCompetitionRankingRequest + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest=} [properties] Properties to set + */ + function LoadGhostCompetitionRankingRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionRankingRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @instance + */ + LoadGhostCompetitionRankingRequest.prototype.carId = 0; + + /** + * LoadGhostCompetitionRankingRequest competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @instance + */ + LoadGhostCompetitionRankingRequest.prototype.competitionId = 0; + + /** + * Creates a new LoadGhostCompetitionRankingRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest instance + */ + LoadGhostCompetitionRankingRequest.create = function create(properties) { + return new LoadGhostCompetitionRankingRequest(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest} message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.competitionId); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingRequest} message LoadGhostCompetitionRankingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionRankingRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.competitionId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionRankingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionRankingRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionRankingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + return null; + }; + + /** + * Creates a LoadGhostCompetitionRankingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionRankingRequest} LoadGhostCompetitionRankingRequest + */ + LoadGhostCompetitionRankingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionRankingRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionRankingRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingRequest} message LoadGhostCompetitionRankingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionRankingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.competitionId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + return object; + }; + + /** + * Converts this LoadGhostCompetitionRankingRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionRankingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionRankingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionRankingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionRankingRequest"; + }; + + return LoadGhostCompetitionRankingRequest; + })(); + + protobuf.LoadGhostCompetitionRankingResponse = (function() { + + /** + * Properties of a LoadGhostCompetitionRankingResponse. + * @memberof wm.protobuf + * @interface ILoadGhostCompetitionRankingResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostCompetitionRankingResponse error + * @property {number|null} [periodId] LoadGhostCompetitionRankingResponse periodId + * @property {number} numOfParticipants LoadGhostCompetitionRankingResponse numOfParticipants + * @property {wm.protobuf.IGhostCompetitionSchedule|null} [competitionSchedule] LoadGhostCompetitionRankingResponse competitionSchedule + * @property {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null} [ownRecord] LoadGhostCompetitionRankingResponse ownRecord + * @property {Array.|null} [topRecords] LoadGhostCompetitionRankingResponse topRecords + */ + + /** + * Constructs a new LoadGhostCompetitionRankingResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostCompetitionRankingResponse. + * @implements ILoadGhostCompetitionRankingResponse + * @constructor + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse=} [properties] Properties to set + */ + function LoadGhostCompetitionRankingResponse(properties) { + this.topRecords = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostCompetitionRankingResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.error = 0; + + /** + * LoadGhostCompetitionRankingResponse periodId. + * @member {number} periodId + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.periodId = 0; + + /** + * LoadGhostCompetitionRankingResponse numOfParticipants. + * @member {number} numOfParticipants + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.numOfParticipants = 0; + + /** + * LoadGhostCompetitionRankingResponse competitionSchedule. + * @member {wm.protobuf.IGhostCompetitionSchedule|null|undefined} competitionSchedule + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.competitionSchedule = null; + + /** + * LoadGhostCompetitionRankingResponse ownRecord. + * @member {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry|null|undefined} ownRecord + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.ownRecord = null; + + /** + * LoadGhostCompetitionRankingResponse topRecords. + * @member {Array.} topRecords + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + */ + LoadGhostCompetitionRankingResponse.prototype.topRecords = $util.emptyArray; + + /** + * Creates a new LoadGhostCompetitionRankingResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse instance + */ + LoadGhostCompetitionRankingResponse.create = function create(properties) { + return new LoadGhostCompetitionRankingResponse(properties); + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse} message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.periodId != null && Object.hasOwnProperty.call(message, "periodId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.periodId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.numOfParticipants); + if (message.competitionSchedule != null && Object.hasOwnProperty.call(message, "competitionSchedule")) + $root.wm.protobuf.GhostCompetitionSchedule.encode(message.competitionSchedule, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.ownRecord != null && Object.hasOwnProperty.call(message, "ownRecord")) + $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.encode(message.ownRecord, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.topRecords != null && message.topRecords.length) + for (let i = 0; i < message.topRecords.length; ++i) + $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.encode(message.topRecords[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostCompetitionRankingResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.ILoadGhostCompetitionRankingResponse} message LoadGhostCompetitionRankingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostCompetitionRankingResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.periodId = reader.uint32(); + break; + } + case 3: { + message.numOfParticipants = reader.uint32(); + break; + } + case 4: { + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.decode(reader, reader.uint32()); + break; + } + case 5: { + message.ownRecord = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.topRecords && message.topRecords.length)) + message.topRecords = []; + message.topRecords.push($root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("numOfParticipants")) + throw $util.ProtocolError("missing required 'numOfParticipants'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostCompetitionRankingResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostCompetitionRankingResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostCompetitionRankingResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostCompetitionRankingResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.periodId != null && message.hasOwnProperty("periodId")) + if (!$util.isInteger(message.periodId)) + return "periodId: integer expected"; + if (!$util.isInteger(message.numOfParticipants)) + return "numOfParticipants: integer expected"; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) { + let error = $root.wm.protobuf.GhostCompetitionSchedule.verify(message.competitionSchedule); + if (error) + return "competitionSchedule." + error; + } + if (message.ownRecord != null && message.hasOwnProperty("ownRecord")) { + let error = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify(message.ownRecord); + if (error) + return "ownRecord." + error; + } + if (message.topRecords != null && message.hasOwnProperty("topRecords")) { + if (!Array.isArray(message.topRecords)) + return "topRecords: array expected"; + for (let i = 0; i < message.topRecords.length; ++i) { + let error = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify(message.topRecords[i]); + if (error) + return "topRecords." + error; + } + } + return null; + }; + + /** + * Creates a LoadGhostCompetitionRankingResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse} LoadGhostCompetitionRankingResponse + */ + LoadGhostCompetitionRankingResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionRankingResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.periodId != null) + message.periodId = object.periodId >>> 0; + if (object.numOfParticipants != null) + message.numOfParticipants = object.numOfParticipants >>> 0; + if (object.competitionSchedule != null) { + if (typeof object.competitionSchedule !== "object") + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.competitionSchedule: object expected"); + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.fromObject(object.competitionSchedule); + } + if (object.ownRecord != null) { + if (typeof object.ownRecord !== "object") + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.ownRecord: object expected"); + message.ownRecord = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.fromObject(object.ownRecord); + } + if (object.topRecords) { + if (!Array.isArray(object.topRecords)) + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.topRecords: array expected"); + message.topRecords = []; + for (let i = 0; i < object.topRecords.length; ++i) { + if (typeof object.topRecords[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostCompetitionRankingResponse.topRecords: object expected"); + message.topRecords[i] = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.fromObject(object.topRecords[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostCompetitionRankingResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse} message LoadGhostCompetitionRankingResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostCompetitionRankingResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.topRecords = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.periodId = 0; + object.numOfParticipants = 0; + object.competitionSchedule = null; + object.ownRecord = null; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.periodId != null && message.hasOwnProperty("periodId")) + object.periodId = message.periodId; + if (message.numOfParticipants != null && message.hasOwnProperty("numOfParticipants")) + object.numOfParticipants = message.numOfParticipants; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) + object.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.toObject(message.competitionSchedule, options); + if (message.ownRecord != null && message.hasOwnProperty("ownRecord")) + object.ownRecord = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.toObject(message.ownRecord, options); + if (message.topRecords && message.topRecords.length) { + object.topRecords = []; + for (let j = 0; j < message.topRecords.length; ++j) + object.topRecords[j] = $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.toObject(message.topRecords[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostCompetitionRankingResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostCompetitionRankingResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostCompetitionRankingResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostCompetitionRankingResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionRankingResponse"; + }; + + LoadGhostCompetitionRankingResponse.Entry = (function() { + + /** + * Properties of an Entry. + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @interface IEntry + * @property {number} rank Entry rank + * @property {number} result Entry result + * @property {number} carId Entry carId + * @property {string} name Entry name + * @property {number} regionId Entry regionId + * @property {number} model Entry model + * @property {number} visualModel Entry visualModel + * @property {number} defaultColor Entry defaultColor + * @property {string} title Entry title + * @property {number} level Entry level + * @property {string|null} [windowStickerString] Entry windowStickerString + * @property {string} playedShopName Entry playedShopName + * @property {number} playedAt Entry playedAt + */ + + /** + * Constructs a new Entry. + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse + * @classdesc Represents an Entry. + * @implements IEntry + * @constructor + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry=} [properties] Properties to set + */ + function Entry(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entry rank. + * @member {number} rank + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.rank = 0; + + /** + * Entry result. + * @member {number} result + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.result = 0; + + /** + * Entry carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.carId = 0; + + /** + * Entry name. + * @member {string} name + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.name = ""; + + /** + * Entry regionId. + * @member {number} regionId + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.regionId = 0; + + /** + * Entry model. + * @member {number} model + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.model = 0; + + /** + * Entry visualModel. + * @member {number} visualModel + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.visualModel = 0; + + /** + * Entry defaultColor. + * @member {number} defaultColor + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.defaultColor = 0; + + /** + * Entry title. + * @member {string} title + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.title = ""; + + /** + * Entry level. + * @member {number} level + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.level = 0; + + /** + * Entry windowStickerString. + * @member {string} windowStickerString + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.windowStickerString = ""; + + /** + * Entry playedShopName. + * @member {string} playedShopName + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.playedShopName = ""; + + /** + * Entry playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + */ + Entry.prototype.playedAt = 0; + + /** + * Creates a new Entry instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry instance + */ + Entry.create = function create(properties) { + return new Entry(properties); + }; + + /** + * Encodes the specified Entry message. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rank); + writer.uint32(/* id 2, wireType 0 =*/16).sint32(message.result); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.carId); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.regionId); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.model); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.visualModel); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.defaultColor); + writer.uint32(/* id 10, wireType 2 =*/82).string(message.title); + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.level); + if (message.windowStickerString != null && Object.hasOwnProperty.call(message, "windowStickerString")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.windowStickerString); + writer.uint32(/* id 13, wireType 2 =*/106).string(message.playedShopName); + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.playedAt); + return writer; + }; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostCompetitionRankingResponse.Entry.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rank = reader.uint32(); + break; + } + case 2: { + message.result = reader.sint32(); + break; + } + case 3: { + message.carId = reader.uint32(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + case 5: { + message.regionId = reader.uint32(); + break; + } + case 6: { + message.model = reader.uint32(); + break; + } + case 7: { + message.visualModel = reader.uint32(); + break; + } + case 8: { + message.defaultColor = reader.uint32(); + break; + } + case 10: { + message.title = reader.string(); + break; + } + case 11: { + message.level = reader.uint32(); + break; + } + case 12: { + message.windowStickerString = reader.string(); + break; + } + case 13: { + message.playedShopName = reader.string(); + break; + } + case 14: { + message.playedAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("rank")) + throw $util.ProtocolError("missing required 'rank'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("name")) + throw $util.ProtocolError("missing required 'name'", { instance: message }); + if (!message.hasOwnProperty("regionId")) + throw $util.ProtocolError("missing required 'regionId'", { instance: message }); + if (!message.hasOwnProperty("model")) + throw $util.ProtocolError("missing required 'model'", { instance: message }); + if (!message.hasOwnProperty("visualModel")) + throw $util.ProtocolError("missing required 'visualModel'", { instance: message }); + if (!message.hasOwnProperty("defaultColor")) + throw $util.ProtocolError("missing required 'defaultColor'", { instance: message }); + if (!message.hasOwnProperty("title")) + throw $util.ProtocolError("missing required 'title'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + if (!message.hasOwnProperty("playedShopName")) + throw $util.ProtocolError("missing required 'playedShopName'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + return message; + }; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entry message. + * @function verify + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isString(message.name)) + return "name: string expected"; + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (!$util.isInteger(message.model)) + return "model: integer expected"; + if (!$util.isInteger(message.visualModel)) + return "visualModel: integer expected"; + if (!$util.isInteger(message.defaultColor)) + return "defaultColor: integer expected"; + if (!$util.isString(message.title)) + return "title: string expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + if (!$util.isString(message.windowStickerString)) + return "windowStickerString: string expected"; + if (!$util.isString(message.playedShopName)) + return "playedShopName: string expected"; + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + return null; + }; + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} Entry + */ + Entry.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry) + return object; + let message = new $root.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry(); + if (object.rank != null) + message.rank = object.rank >>> 0; + if (object.result != null) + message.result = object.result | 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.model != null) + message.model = object.model >>> 0; + if (object.visualModel != null) + message.visualModel = object.visualModel >>> 0; + if (object.defaultColor != null) + message.defaultColor = object.defaultColor >>> 0; + if (object.title != null) + message.title = String(object.title); + if (object.level != null) + message.level = object.level >>> 0; + if (object.windowStickerString != null) + message.windowStickerString = String(object.windowStickerString); + if (object.playedShopName != null) + message.playedShopName = String(object.playedShopName); + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + return message; + }; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {wm.protobuf.LoadGhostCompetitionRankingResponse.Entry} message Entry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.rank = 0; + object.result = 0; + object.carId = 0; + object.name = ""; + object.regionId = 0; + object.model = 0; + object.visualModel = 0; + object.defaultColor = 0; + object.title = ""; + object.level = 0; + object.windowStickerString = ""; + object.playedShopName = ""; + object.playedAt = 0; + } + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.visualModel != null && message.hasOwnProperty("visualModel")) + object.visualModel = message.visualModel; + if (message.defaultColor != null && message.hasOwnProperty("defaultColor")) + object.defaultColor = message.defaultColor; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + object.windowStickerString = message.windowStickerString; + if (message.playedShopName != null && message.hasOwnProperty("playedShopName")) + object.playedShopName = message.playedShopName; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + return object; + }; + + /** + * Converts this Entry to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @instance + * @returns {Object.} JSON object + */ + Entry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entry + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostCompetitionRankingResponse.Entry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostCompetitionRankingResponse.Entry"; + }; + + return Entry; + })(); + + return LoadGhostCompetitionRankingResponse; + })(); + + protobuf.LoadUnreceivedUserItemsRequest = (function() { + + /** + * Properties of a LoadUnreceivedUserItemsRequest. + * @memberof wm.protobuf + * @interface ILoadUnreceivedUserItemsRequest + * @property {number} userId LoadUnreceivedUserItemsRequest userId + */ + + /** + * Constructs a new LoadUnreceivedUserItemsRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadUnreceivedUserItemsRequest. + * @implements ILoadUnreceivedUserItemsRequest + * @constructor + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest=} [properties] Properties to set + */ + function LoadUnreceivedUserItemsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUnreceivedUserItemsRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @instance + */ + LoadUnreceivedUserItemsRequest.prototype.userId = 0; + + /** + * Creates a new LoadUnreceivedUserItemsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest instance + */ + LoadUnreceivedUserItemsRequest.create = function create(properties) { + return new LoadUnreceivedUserItemsRequest(properties); + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest} message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsRequest} message LoadUnreceivedUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUnreceivedUserItemsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUnreceivedUserItemsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUnreceivedUserItemsRequest message. + * @function verify + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUnreceivedUserItemsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadUnreceivedUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUnreceivedUserItemsRequest} LoadUnreceivedUserItemsRequest + */ + LoadUnreceivedUserItemsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUnreceivedUserItemsRequest) + return object; + let message = new $root.wm.protobuf.LoadUnreceivedUserItemsRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {wm.protobuf.LoadUnreceivedUserItemsRequest} message LoadUnreceivedUserItemsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUnreceivedUserItemsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadUnreceivedUserItemsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @instance + * @returns {Object.} JSON object + */ + LoadUnreceivedUserItemsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadUnreceivedUserItemsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUnreceivedUserItemsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUnreceivedUserItemsRequest"; + }; + + return LoadUnreceivedUserItemsRequest; + })(); + + protobuf.LoadUnreceivedUserItemsResponse = (function() { + + /** + * Properties of a LoadUnreceivedUserItemsResponse. + * @memberof wm.protobuf + * @interface ILoadUnreceivedUserItemsResponse + * @property {wm.protobuf.ErrorCode} error LoadUnreceivedUserItemsResponse error + * @property {Array.|null} [ownedUserItems] LoadUnreceivedUserItemsResponse ownedUserItems + */ + + /** + * Constructs a new LoadUnreceivedUserItemsResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadUnreceivedUserItemsResponse. + * @implements ILoadUnreceivedUserItemsResponse + * @constructor + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse=} [properties] Properties to set + */ + function LoadUnreceivedUserItemsResponse(properties) { + this.ownedUserItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadUnreceivedUserItemsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @instance + */ + LoadUnreceivedUserItemsResponse.prototype.error = 0; + + /** + * LoadUnreceivedUserItemsResponse ownedUserItems. + * @member {Array.} ownedUserItems + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @instance + */ + LoadUnreceivedUserItemsResponse.prototype.ownedUserItems = $util.emptyArray; + + /** + * Creates a new LoadUnreceivedUserItemsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse instance + */ + LoadUnreceivedUserItemsResponse.create = function create(properties) { + return new LoadUnreceivedUserItemsResponse(properties); + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse} message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.ownedUserItems != null && message.ownedUserItems.length) + for (let i = 0; i < message.ownedUserItems.length; ++i) + $root.wm.protobuf.UserItem.encode(message.ownedUserItems[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadUnreceivedUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadUnreceivedUserItemsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.ILoadUnreceivedUserItemsResponse} message LoadUnreceivedUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadUnreceivedUserItemsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadUnreceivedUserItemsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 7: { + if (!(message.ownedUserItems && message.ownedUserItems.length)) + message.ownedUserItems = []; + message.ownedUserItems.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadUnreceivedUserItemsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadUnreceivedUserItemsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadUnreceivedUserItemsResponse message. + * @function verify + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadUnreceivedUserItemsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.ownedUserItems != null && message.hasOwnProperty("ownedUserItems")) { + if (!Array.isArray(message.ownedUserItems)) + return "ownedUserItems: array expected"; + for (let i = 0; i < message.ownedUserItems.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.ownedUserItems[i]); + if (error) + return "ownedUserItems." + error; + } + } + return null; + }; + + /** + * Creates a LoadUnreceivedUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadUnreceivedUserItemsResponse} LoadUnreceivedUserItemsResponse + */ + LoadUnreceivedUserItemsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadUnreceivedUserItemsResponse) + return object; + let message = new $root.wm.protobuf.LoadUnreceivedUserItemsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.ownedUserItems) { + if (!Array.isArray(object.ownedUserItems)) + throw TypeError(".wm.protobuf.LoadUnreceivedUserItemsResponse.ownedUserItems: array expected"); + message.ownedUserItems = []; + for (let i = 0; i < object.ownedUserItems.length; ++i) { + if (typeof object.ownedUserItems[i] !== "object") + throw TypeError(".wm.protobuf.LoadUnreceivedUserItemsResponse.ownedUserItems: object expected"); + message.ownedUserItems[i] = $root.wm.protobuf.UserItem.fromObject(object.ownedUserItems[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadUnreceivedUserItemsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {wm.protobuf.LoadUnreceivedUserItemsResponse} message LoadUnreceivedUserItemsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadUnreceivedUserItemsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.ownedUserItems = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.ownedUserItems && message.ownedUserItems.length) { + object.ownedUserItems = []; + for (let j = 0; j < message.ownedUserItems.length; ++j) + object.ownedUserItems[j] = $root.wm.protobuf.UserItem.toObject(message.ownedUserItems[j], options); + } + return object; + }; + + /** + * Converts this LoadUnreceivedUserItemsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @instance + * @returns {Object.} JSON object + */ + LoadUnreceivedUserItemsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadUnreceivedUserItemsResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadUnreceivedUserItemsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadUnreceivedUserItemsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadUnreceivedUserItemsResponse"; + }; + + return LoadUnreceivedUserItemsResponse; + })(); + + protobuf.LoadBookmarksRequest = (function() { + + /** + * Properties of a LoadBookmarksRequest. + * @memberof wm.protobuf + * @interface ILoadBookmarksRequest + * @property {number} userId LoadBookmarksRequest userId + */ + + /** + * Constructs a new LoadBookmarksRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadBookmarksRequest. + * @implements ILoadBookmarksRequest + * @constructor + * @param {wm.protobuf.ILoadBookmarksRequest=} [properties] Properties to set + */ + function LoadBookmarksRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBookmarksRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadBookmarksRequest + * @instance + */ + LoadBookmarksRequest.prototype.userId = 0; + + /** + * Creates a new LoadBookmarksRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.ILoadBookmarksRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest instance + */ + LoadBookmarksRequest.create = function create(properties) { + return new LoadBookmarksRequest(properties); + }; + + /** + * Encodes the specified LoadBookmarksRequest message. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.ILoadBookmarksRequest} message LoadBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.ILoadBookmarksRequest} message LoadBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadBookmarksRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadBookmarksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBookmarksRequest message. + * @function verify + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBookmarksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadBookmarksRequest} LoadBookmarksRequest + */ + LoadBookmarksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadBookmarksRequest) + return object; + let message = new $root.wm.protobuf.LoadBookmarksRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadBookmarksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {wm.protobuf.LoadBookmarksRequest} message LoadBookmarksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBookmarksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadBookmarksRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadBookmarksRequest + * @instance + * @returns {Object.} JSON object + */ + LoadBookmarksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBookmarksRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadBookmarksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBookmarksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadBookmarksRequest"; + }; + + return LoadBookmarksRequest; + })(); + + protobuf.LoadBookmarksResponse = (function() { + + /** + * Properties of a LoadBookmarksResponse. + * @memberof wm.protobuf + * @interface ILoadBookmarksResponse + * @property {wm.protobuf.ErrorCode} error LoadBookmarksResponse error + * @property {Array.|null} [cars] LoadBookmarksResponse cars + */ + + /** + * Constructs a new LoadBookmarksResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadBookmarksResponse. + * @implements ILoadBookmarksResponse + * @constructor + * @param {wm.protobuf.ILoadBookmarksResponse=} [properties] Properties to set + */ + function LoadBookmarksResponse(properties) { + this.cars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBookmarksResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadBookmarksResponse + * @instance + */ + LoadBookmarksResponse.prototype.error = 0; + + /** + * LoadBookmarksResponse cars. + * @member {Array.} cars + * @memberof wm.protobuf.LoadBookmarksResponse + * @instance + */ + LoadBookmarksResponse.prototype.cars = $util.emptyArray; + + /** + * Creates a new LoadBookmarksResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.ILoadBookmarksResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse instance + */ + LoadBookmarksResponse.create = function create(properties) { + return new LoadBookmarksResponse(properties); + }; + + /** + * Encodes the specified LoadBookmarksResponse message. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.ILoadBookmarksResponse} message LoadBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.Car.encode(message.cars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadBookmarksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.ILoadBookmarksResponse} message LoadBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBookmarksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadBookmarksResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadBookmarksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBookmarksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBookmarksResponse message. + * @function verify + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBookmarksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + return null; + }; + + /** + * Creates a LoadBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadBookmarksResponse} LoadBookmarksResponse + */ + LoadBookmarksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadBookmarksResponse) + return object; + let message = new $root.wm.protobuf.LoadBookmarksResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.LoadBookmarksResponse.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.LoadBookmarksResponse.cars: object expected"); + message.cars[i] = $root.wm.protobuf.Car.fromObject(object.cars[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadBookmarksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {wm.protobuf.LoadBookmarksResponse} message LoadBookmarksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBookmarksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cars = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.Car.toObject(message.cars[j], options); + } + return object; + }; + + /** + * Converts this LoadBookmarksResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadBookmarksResponse + * @instance + * @returns {Object.} JSON object + */ + LoadBookmarksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBookmarksResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadBookmarksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBookmarksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadBookmarksResponse"; + }; + + return LoadBookmarksResponse; + })(); + + protobuf.SaveBookmarksRequest = (function() { + + /** + * Properties of a SaveBookmarksRequest. + * @memberof wm.protobuf + * @interface ISaveBookmarksRequest + * @property {number} userId SaveBookmarksRequest userId + * @property {Array.|null} [cars] SaveBookmarksRequest cars + */ + + /** + * Constructs a new SaveBookmarksRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveBookmarksRequest. + * @implements ISaveBookmarksRequest + * @constructor + * @param {wm.protobuf.ISaveBookmarksRequest=} [properties] Properties to set + */ + function SaveBookmarksRequest(properties) { + this.cars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveBookmarksRequest userId. + * @member {number} userId + * @memberof wm.protobuf.SaveBookmarksRequest + * @instance + */ + SaveBookmarksRequest.prototype.userId = 0; + + /** + * SaveBookmarksRequest cars. + * @member {Array.} cars + * @memberof wm.protobuf.SaveBookmarksRequest + * @instance + */ + SaveBookmarksRequest.prototype.cars = $util.emptyArray; + + /** + * Creates a new SaveBookmarksRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.ISaveBookmarksRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest instance + */ + SaveBookmarksRequest.create = function create(properties) { + return new SaveBookmarksRequest(properties); + }; + + /** + * Encodes the specified SaveBookmarksRequest message. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.ISaveBookmarksRequest} message SaveBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.cars[i]); + return writer; + }; + + /** + * Encodes the specified SaveBookmarksRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.ISaveBookmarksRequest} message SaveBookmarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveBookmarksRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.cars.push(reader.uint32()); + } else + message.cars.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveBookmarksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveBookmarksRequest message. + * @function verify + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveBookmarksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) + if (!$util.isInteger(message.cars[i])) + return "cars: integer[] expected"; + } + return null; + }; + + /** + * Creates a SaveBookmarksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveBookmarksRequest} SaveBookmarksRequest + */ + SaveBookmarksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveBookmarksRequest) + return object; + let message = new $root.wm.protobuf.SaveBookmarksRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.SaveBookmarksRequest.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) + message.cars[i] = object.cars[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a SaveBookmarksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {wm.protobuf.SaveBookmarksRequest} message SaveBookmarksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveBookmarksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cars = []; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = message.cars[j]; + } + return object; + }; + + /** + * Converts this SaveBookmarksRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveBookmarksRequest + * @instance + * @returns {Object.} JSON object + */ + SaveBookmarksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveBookmarksRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveBookmarksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveBookmarksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveBookmarksRequest"; + }; + + return SaveBookmarksRequest; + })(); + + protobuf.SaveBookmarksResponse = (function() { + + /** + * Properties of a SaveBookmarksResponse. + * @memberof wm.protobuf + * @interface ISaveBookmarksResponse + * @property {wm.protobuf.ErrorCode} error SaveBookmarksResponse error + */ + + /** + * Constructs a new SaveBookmarksResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveBookmarksResponse. + * @implements ISaveBookmarksResponse + * @constructor + * @param {wm.protobuf.ISaveBookmarksResponse=} [properties] Properties to set + */ + function SaveBookmarksResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveBookmarksResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveBookmarksResponse + * @instance + */ + SaveBookmarksResponse.prototype.error = 0; + + /** + * Creates a new SaveBookmarksResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.ISaveBookmarksResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse instance + */ + SaveBookmarksResponse.create = function create(properties) { + return new SaveBookmarksResponse(properties); + }; + + /** + * Encodes the specified SaveBookmarksResponse message. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.ISaveBookmarksResponse} message SaveBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveBookmarksResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveBookmarksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.ISaveBookmarksResponse} message SaveBookmarksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveBookmarksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveBookmarksResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveBookmarksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveBookmarksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveBookmarksResponse message. + * @function verify + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveBookmarksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveBookmarksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveBookmarksResponse} SaveBookmarksResponse + */ + SaveBookmarksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveBookmarksResponse) + return object; + let message = new $root.wm.protobuf.SaveBookmarksResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveBookmarksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {wm.protobuf.SaveBookmarksResponse} message SaveBookmarksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveBookmarksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveBookmarksResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveBookmarksResponse + * @instance + * @returns {Object.} JSON object + */ + SaveBookmarksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveBookmarksResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveBookmarksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveBookmarksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveBookmarksResponse"; + }; + + return SaveBookmarksResponse; + })(); + + protobuf.StartTransferRequest = (function() { + + /** + * Properties of a StartTransferRequest. + * @memberof wm.protobuf + * @interface IStartTransferRequest + * @property {number} banapassportAmId StartTransferRequest banapassportAmId + */ + + /** + * Constructs a new StartTransferRequest. + * @memberof wm.protobuf + * @classdesc Represents a StartTransferRequest. + * @implements IStartTransferRequest + * @constructor + * @param {wm.protobuf.IStartTransferRequest=} [properties] Properties to set + */ + function StartTransferRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StartTransferRequest banapassportAmId. + * @member {number} banapassportAmId + * @memberof wm.protobuf.StartTransferRequest + * @instance + */ + StartTransferRequest.prototype.banapassportAmId = 0; + + /** + * Creates a new StartTransferRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.IStartTransferRequest=} [properties] Properties to set + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest instance + */ + StartTransferRequest.create = function create(properties) { + return new StartTransferRequest(properties); + }; + + /** + * Encodes the specified StartTransferRequest message. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.IStartTransferRequest} message StartTransferRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.banapassportAmId); + return writer; + }; + + /** + * Encodes the specified StartTransferRequest message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.IStartTransferRequest} message StartTransferRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.StartTransferRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.banapassportAmId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("banapassportAmId")) + throw $util.ProtocolError("missing required 'banapassportAmId'", { instance: message }); + return message; + }; + + /** + * Decodes a StartTransferRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartTransferRequest message. + * @function verify + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartTransferRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.banapassportAmId)) + return "banapassportAmId: integer expected"; + return null; + }; + + /** + * Creates a StartTransferRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.StartTransferRequest} StartTransferRequest + */ + StartTransferRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.StartTransferRequest) + return object; + let message = new $root.wm.protobuf.StartTransferRequest(); + if (object.banapassportAmId != null) + message.banapassportAmId = object.banapassportAmId >>> 0; + return message; + }; + + /** + * Creates a plain object from a StartTransferRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {wm.protobuf.StartTransferRequest} message StartTransferRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartTransferRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.banapassportAmId = 0; + if (message.banapassportAmId != null && message.hasOwnProperty("banapassportAmId")) + object.banapassportAmId = message.banapassportAmId; + return object; + }; + + /** + * Converts this StartTransferRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.StartTransferRequest + * @instance + * @returns {Object.} JSON object + */ + StartTransferRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StartTransferRequest + * @function getTypeUrl + * @memberof wm.protobuf.StartTransferRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartTransferRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.StartTransferRequest"; + }; + + return StartTransferRequest; + })(); + + protobuf.StartTransferResponse = (function() { + + /** + * Properties of a StartTransferResponse. + * @memberof wm.protobuf + * @interface IStartTransferResponse + * @property {wm.protobuf.ErrorCode} error StartTransferResponse error + * @property {number} userId StartTransferResponse userId + * @property {number|null} [pollingInterval] StartTransferResponse pollingInterval + */ + + /** + * Constructs a new StartTransferResponse. + * @memberof wm.protobuf + * @classdesc Represents a StartTransferResponse. + * @implements IStartTransferResponse + * @constructor + * @param {wm.protobuf.IStartTransferResponse=} [properties] Properties to set + */ + function StartTransferResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StartTransferResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.StartTransferResponse + * @instance + */ + StartTransferResponse.prototype.error = 0; + + /** + * StartTransferResponse userId. + * @member {number} userId + * @memberof wm.protobuf.StartTransferResponse + * @instance + */ + StartTransferResponse.prototype.userId = 0; + + /** + * StartTransferResponse pollingInterval. + * @member {number} pollingInterval + * @memberof wm.protobuf.StartTransferResponse + * @instance + */ + StartTransferResponse.prototype.pollingInterval = 0; + + /** + * Creates a new StartTransferResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.IStartTransferResponse=} [properties] Properties to set + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse instance + */ + StartTransferResponse.create = function create(properties) { + return new StartTransferResponse(properties); + }; + + /** + * Encodes the specified StartTransferResponse message. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.IStartTransferResponse} message StartTransferResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.userId); + if (message.pollingInterval != null && Object.hasOwnProperty.call(message, "pollingInterval")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.pollingInterval); + return writer; + }; + + /** + * Encodes the specified StartTransferResponse message, length delimited. Does not implicitly {@link wm.protobuf.StartTransferResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.IStartTransferResponse} message StartTransferResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartTransferResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.StartTransferResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.userId = reader.uint32(); + break; + } + case 3: { + message.pollingInterval = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a StartTransferResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartTransferResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartTransferResponse message. + * @function verify + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartTransferResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.pollingInterval != null && message.hasOwnProperty("pollingInterval")) + if (!$util.isInteger(message.pollingInterval)) + return "pollingInterval: integer expected"; + return null; + }; + + /** + * Creates a StartTransferResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.StartTransferResponse} StartTransferResponse + */ + StartTransferResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.StartTransferResponse) + return object; + let message = new $root.wm.protobuf.StartTransferResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.pollingInterval != null) + message.pollingInterval = object.pollingInterval >>> 0; + return message; + }; + + /** + * Creates a plain object from a StartTransferResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {wm.protobuf.StartTransferResponse} message StartTransferResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartTransferResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.userId = 0; + object.pollingInterval = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.pollingInterval != null && message.hasOwnProperty("pollingInterval")) + object.pollingInterval = message.pollingInterval; + return object; + }; + + /** + * Converts this StartTransferResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.StartTransferResponse + * @instance + * @returns {Object.} JSON object + */ + StartTransferResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StartTransferResponse + * @function getTypeUrl + * @memberof wm.protobuf.StartTransferResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartTransferResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.StartTransferResponse"; + }; + + return StartTransferResponse; + })(); + + protobuf.SaveScreenshotRequest = (function() { + + /** + * Properties of a SaveScreenshotRequest. + * @memberof wm.protobuf + * @interface ISaveScreenshotRequest + * @property {number} carId SaveScreenshotRequest carId + * @property {number} timestamp SaveScreenshotRequest timestamp + * @property {number|null} [playedAt] SaveScreenshotRequest playedAt + * @property {boolean|null} [transparent] SaveScreenshotRequest transparent + * @property {wm.protobuf.ScreenshotType} imageType SaveScreenshotRequest imageType + * @property {Uint8Array|null} [image] SaveScreenshotRequest image + * @property {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null} [ghostMetadata] SaveScreenshotRequest ghostMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null} [versusMetadata] SaveScreenshotRequest versusMetadata + * @property {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null} [terminalMetadata] SaveScreenshotRequest terminalMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null} [acquiringVsStarMetadata] SaveScreenshotRequest acquiringVsStarMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null} [acquiringAuraMotifMetadata] SaveScreenshotRequest acquiringAuraMotifMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null} [ghostRegionMapMetadata] SaveScreenshotRequest ghostRegionMapMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null} [acquiringCrownMetadata] SaveScreenshotRequest acquiringCrownMetadata + * @property {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null} [competitionResultMetadata] SaveScreenshotRequest competitionResultMetadata + * @property {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null} [timeAttackResultMetadata] SaveScreenshotRequest timeAttackResultMetadata + * @property {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null} [levelUpMetadata] SaveScreenshotRequest levelUpMetadata + */ + + /** + * Constructs a new SaveScreenshotRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveScreenshotRequest. + * @implements ISaveScreenshotRequest + * @constructor + * @param {wm.protobuf.ISaveScreenshotRequest=} [properties] Properties to set + */ + function SaveScreenshotRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScreenshotRequest carId. + * @member {number} carId + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.carId = 0; + + /** + * SaveScreenshotRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.timestamp = 0; + + /** + * SaveScreenshotRequest playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.playedAt = 0; + + /** + * SaveScreenshotRequest transparent. + * @member {boolean} transparent + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.transparent = false; + + /** + * SaveScreenshotRequest imageType. + * @member {wm.protobuf.ScreenshotType} imageType + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.imageType = 1; + + /** + * SaveScreenshotRequest image. + * @member {Uint8Array} image + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.image = $util.newBuffer([]); + + /** + * SaveScreenshotRequest ghostMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata|null|undefined} ghostMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.ghostMetadata = null; + + /** + * SaveScreenshotRequest versusMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata|null|undefined} versusMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.versusMetadata = null; + + /** + * SaveScreenshotRequest terminalMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata|null|undefined} terminalMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.terminalMetadata = null; + + /** + * SaveScreenshotRequest acquiringVsStarMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata|null|undefined} acquiringVsStarMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.acquiringVsStarMetadata = null; + + /** + * SaveScreenshotRequest acquiringAuraMotifMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata|null|undefined} acquiringAuraMotifMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.acquiringAuraMotifMetadata = null; + + /** + * SaveScreenshotRequest ghostRegionMapMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata|null|undefined} ghostRegionMapMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.ghostRegionMapMetadata = null; + + /** + * SaveScreenshotRequest acquiringCrownMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata|null|undefined} acquiringCrownMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.acquiringCrownMetadata = null; + + /** + * SaveScreenshotRequest competitionResultMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata|null|undefined} competitionResultMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.competitionResultMetadata = null; + + /** + * SaveScreenshotRequest timeAttackResultMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata|null|undefined} timeAttackResultMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.timeAttackResultMetadata = null; + + /** + * SaveScreenshotRequest levelUpMetadata. + * @member {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata|null|undefined} levelUpMetadata + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + */ + SaveScreenshotRequest.prototype.levelUpMetadata = null; + + /** + * Creates a new SaveScreenshotRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.ISaveScreenshotRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest instance + */ + SaveScreenshotRequest.create = function create(properties) { + return new SaveScreenshotRequest(properties); + }; + + /** + * Encodes the specified SaveScreenshotRequest message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.ISaveScreenshotRequest} message SaveScreenshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.timestamp); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.imageType); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.image); + if (message.ghostMetadata != null && Object.hasOwnProperty.call(message, "ghostMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.encode(message.ghostMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.versusMetadata != null && Object.hasOwnProperty.call(message, "versusMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.encode(message.versusMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.terminalMetadata != null && Object.hasOwnProperty.call(message, "terminalMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.encode(message.terminalMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.transparent != null && Object.hasOwnProperty.call(message, "transparent")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.transparent); + if (message.playedAt != null && Object.hasOwnProperty.call(message, "playedAt")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.playedAt); + if (message.acquiringVsStarMetadata != null && Object.hasOwnProperty.call(message, "acquiringVsStarMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.encode(message.acquiringVsStarMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.acquiringAuraMotifMetadata != null && Object.hasOwnProperty.call(message, "acquiringAuraMotifMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.encode(message.acquiringAuraMotifMetadata, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.ghostRegionMapMetadata != null && Object.hasOwnProperty.call(message, "ghostRegionMapMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.encode(message.ghostRegionMapMetadata, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.acquiringCrownMetadata != null && Object.hasOwnProperty.call(message, "acquiringCrownMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.encode(message.acquiringCrownMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.competitionResultMetadata != null && Object.hasOwnProperty.call(message, "competitionResultMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.encode(message.competitionResultMetadata, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.timeAttackResultMetadata != null && Object.hasOwnProperty.call(message, "timeAttackResultMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.encode(message.timeAttackResultMetadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.levelUpMetadata != null && Object.hasOwnProperty.call(message, "levelUpMetadata")) + $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.encode(message.levelUpMetadata, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveScreenshotRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.ISaveScreenshotRequest} message SaveScreenshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.timestamp = reader.uint32(); + break; + } + case 9: { + message.playedAt = reader.uint32(); + break; + } + case 8: { + message.transparent = reader.bool(); + break; + } + case 3: { + message.imageType = reader.int32(); + break; + } + case 4: { + message.image = reader.bytes(); + break; + } + case 5: { + message.ghostMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.decode(reader, reader.uint32()); + break; + } + case 6: { + message.versusMetadata = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.decode(reader, reader.uint32()); + break; + } + case 7: { + message.terminalMetadata = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.decode(reader, reader.uint32()); + break; + } + case 10: { + message.acquiringVsStarMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.decode(reader, reader.uint32()); + break; + } + case 11: { + message.acquiringAuraMotifMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.decode(reader, reader.uint32()); + break; + } + case 12: { + message.ghostRegionMapMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.decode(reader, reader.uint32()); + break; + } + case 13: { + message.acquiringCrownMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.decode(reader, reader.uint32()); + break; + } + case 14: { + message.competitionResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.decode(reader, reader.uint32()); + break; + } + case 15: { + message.timeAttackResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.decode(reader, reader.uint32()); + break; + } + case 16: { + message.levelUpMetadata = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + if (!message.hasOwnProperty("imageType")) + throw $util.ProtocolError("missing required 'imageType'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScreenshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScreenshotRequest message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScreenshotRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (message.transparent != null && message.hasOwnProperty("transparent")) + if (typeof message.transparent !== "boolean") + return "transparent: boolean expected"; + switch (message.imageType) { + default: + return "imageType: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + if (message.image != null && message.hasOwnProperty("image")) + if (!(message.image && typeof message.image.length === "number" || $util.isString(message.image))) + return "image: buffer expected"; + if (message.ghostMetadata != null && message.hasOwnProperty("ghostMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify(message.ghostMetadata); + if (error) + return "ghostMetadata." + error; + } + if (message.versusMetadata != null && message.hasOwnProperty("versusMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify(message.versusMetadata); + if (error) + return "versusMetadata." + error; + } + if (message.terminalMetadata != null && message.hasOwnProperty("terminalMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify(message.terminalMetadata); + if (error) + return "terminalMetadata." + error; + } + if (message.acquiringVsStarMetadata != null && message.hasOwnProperty("acquiringVsStarMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify(message.acquiringVsStarMetadata); + if (error) + return "acquiringVsStarMetadata." + error; + } + if (message.acquiringAuraMotifMetadata != null && message.hasOwnProperty("acquiringAuraMotifMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify(message.acquiringAuraMotifMetadata); + if (error) + return "acquiringAuraMotifMetadata." + error; + } + if (message.ghostRegionMapMetadata != null && message.hasOwnProperty("ghostRegionMapMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify(message.ghostRegionMapMetadata); + if (error) + return "ghostRegionMapMetadata." + error; + } + if (message.acquiringCrownMetadata != null && message.hasOwnProperty("acquiringCrownMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify(message.acquiringCrownMetadata); + if (error) + return "acquiringCrownMetadata." + error; + } + if (message.competitionResultMetadata != null && message.hasOwnProperty("competitionResultMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify(message.competitionResultMetadata); + if (error) + return "competitionResultMetadata." + error; + } + if (message.timeAttackResultMetadata != null && message.hasOwnProperty("timeAttackResultMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify(message.timeAttackResultMetadata); + if (error) + return "timeAttackResultMetadata." + error; + } + if (message.levelUpMetadata != null && message.hasOwnProperty("levelUpMetadata")) { + let error = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify(message.levelUpMetadata); + if (error) + return "levelUpMetadata." + error; + } + return null; + }; + + /** + * Creates a SaveScreenshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest} SaveScreenshotRequest + */ + SaveScreenshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.transparent != null) + message.transparent = Boolean(object.transparent); + switch (object.imageType) { + case "SS_GHOST_BATTLE": + case 1: + message.imageType = 1; + break; + case "SS_VERSUS_BATTLE": + case 2: + message.imageType = 2; + break; + case "SS_TERMINAL": + case 3: + message.imageType = 3; + break; + case "SS_ACQUIRING_VERSUS_STAR": + case 4: + message.imageType = 4; + break; + case "SS_ACQUIRING_AURA_MOTIF": + case 5: + message.imageType = 5; + break; + case "SS_GHOST_REGION_MAP": + case 6: + message.imageType = 6; + break; + case "SS_ACQUIRING_CROWN": + case 7: + message.imageType = 7; + break; + case "SS_GHOST_COMPETITION_RESULT": + case 8: + message.imageType = 8; + break; + case "SS_TIME_ATTACK_RESULT": + case 9: + message.imageType = 9; + break; + case "SS_LEVEL_UP": + case 10: + message.imageType = 10; + break; + } + if (object.image != null) + if (typeof object.image === "string") + $util.base64.decode(object.image, message.image = $util.newBuffer($util.base64.length(object.image)), 0); + else if (object.image.length >= 0) + message.image = object.image; + if (object.ghostMetadata != null) { + if (typeof object.ghostMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.ghostMetadata: object expected"); + message.ghostMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.fromObject(object.ghostMetadata); + } + if (object.versusMetadata != null) { + if (typeof object.versusMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.versusMetadata: object expected"); + message.versusMetadata = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.fromObject(object.versusMetadata); + } + if (object.terminalMetadata != null) { + if (typeof object.terminalMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.terminalMetadata: object expected"); + message.terminalMetadata = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.fromObject(object.terminalMetadata); + } + if (object.acquiringVsStarMetadata != null) { + if (typeof object.acquiringVsStarMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.acquiringVsStarMetadata: object expected"); + message.acquiringVsStarMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.fromObject(object.acquiringVsStarMetadata); + } + if (object.acquiringAuraMotifMetadata != null) { + if (typeof object.acquiringAuraMotifMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.acquiringAuraMotifMetadata: object expected"); + message.acquiringAuraMotifMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.fromObject(object.acquiringAuraMotifMetadata); + } + if (object.ghostRegionMapMetadata != null) { + if (typeof object.ghostRegionMapMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.ghostRegionMapMetadata: object expected"); + message.ghostRegionMapMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.fromObject(object.ghostRegionMapMetadata); + } + if (object.acquiringCrownMetadata != null) { + if (typeof object.acquiringCrownMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.acquiringCrownMetadata: object expected"); + message.acquiringCrownMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.fromObject(object.acquiringCrownMetadata); + } + if (object.competitionResultMetadata != null) { + if (typeof object.competitionResultMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.competitionResultMetadata: object expected"); + message.competitionResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.fromObject(object.competitionResultMetadata); + } + if (object.timeAttackResultMetadata != null) { + if (typeof object.timeAttackResultMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.timeAttackResultMetadata: object expected"); + message.timeAttackResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.fromObject(object.timeAttackResultMetadata); + } + if (object.levelUpMetadata != null) { + if (typeof object.levelUpMetadata !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.levelUpMetadata: object expected"); + message.levelUpMetadata = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.fromObject(object.levelUpMetadata); + } + return message; + }; + + /** + * Creates a plain object from a SaveScreenshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {wm.protobuf.SaveScreenshotRequest} message SaveScreenshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScreenshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.timestamp = 0; + object.imageType = options.enums === String ? "SS_GHOST_BATTLE" : 1; + if (options.bytes === String) + object.image = ""; + else { + object.image = []; + if (options.bytes !== Array) + object.image = $util.newBuffer(object.image); + } + object.ghostMetadata = null; + object.versusMetadata = null; + object.terminalMetadata = null; + object.transparent = false; + object.playedAt = 0; + object.acquiringVsStarMetadata = null; + object.acquiringAuraMotifMetadata = null; + object.ghostRegionMapMetadata = null; + object.acquiringCrownMetadata = null; + object.competitionResultMetadata = null; + object.timeAttackResultMetadata = null; + object.levelUpMetadata = null; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + if (message.imageType != null && message.hasOwnProperty("imageType")) + object.imageType = options.enums === String ? $root.wm.protobuf.ScreenshotType[message.imageType] : message.imageType; + if (message.image != null && message.hasOwnProperty("image")) + object.image = options.bytes === String ? $util.base64.encode(message.image, 0, message.image.length) : options.bytes === Array ? Array.prototype.slice.call(message.image) : message.image; + if (message.ghostMetadata != null && message.hasOwnProperty("ghostMetadata")) + object.ghostMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.toObject(message.ghostMetadata, options); + if (message.versusMetadata != null && message.hasOwnProperty("versusMetadata")) + object.versusMetadata = $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.toObject(message.versusMetadata, options); + if (message.terminalMetadata != null && message.hasOwnProperty("terminalMetadata")) + object.terminalMetadata = $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata.toObject(message.terminalMetadata, options); + if (message.transparent != null && message.hasOwnProperty("transparent")) + object.transparent = message.transparent; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.acquiringVsStarMetadata != null && message.hasOwnProperty("acquiringVsStarMetadata")) + object.acquiringVsStarMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.toObject(message.acquiringVsStarMetadata, options); + if (message.acquiringAuraMotifMetadata != null && message.hasOwnProperty("acquiringAuraMotifMetadata")) + object.acquiringAuraMotifMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.toObject(message.acquiringAuraMotifMetadata, options); + if (message.ghostRegionMapMetadata != null && message.hasOwnProperty("ghostRegionMapMetadata")) + object.ghostRegionMapMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.toObject(message.ghostRegionMapMetadata, options); + if (message.acquiringCrownMetadata != null && message.hasOwnProperty("acquiringCrownMetadata")) + object.acquiringCrownMetadata = $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.toObject(message.acquiringCrownMetadata, options); + if (message.competitionResultMetadata != null && message.hasOwnProperty("competitionResultMetadata")) + object.competitionResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.toObject(message.competitionResultMetadata, options); + if (message.timeAttackResultMetadata != null && message.hasOwnProperty("timeAttackResultMetadata")) + object.timeAttackResultMetadata = $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.toObject(message.timeAttackResultMetadata, options); + if (message.levelUpMetadata != null && message.hasOwnProperty("levelUpMetadata")) + object.levelUpMetadata = $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.toObject(message.levelUpMetadata, options); + return object; + }; + + /** + * Converts this SaveScreenshotRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest + * @instance + * @returns {Object.} JSON object + */ + SaveScreenshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScreenshotRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScreenshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest"; + }; + + SaveScreenshotRequest.GhostBattleMetadata = (function() { + + /** + * Properties of a GhostBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IGhostBattleMetadata + * @property {number} tunePower GhostBattleMetadata tunePower + * @property {number} tuneHandling GhostBattleMetadata tuneHandling + * @property {number} area GhostBattleMetadata area + * @property {number} stampReturnCount GhostBattleMetadata stampReturnCount + * @property {Array.|null} [opponents] GhostBattleMetadata opponents + */ + + /** + * Constructs a new GhostBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a GhostBattleMetadata. + * @implements IGhostBattleMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata=} [properties] Properties to set + */ + function GhostBattleMetadata(properties) { + this.opponents = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostBattleMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.tunePower = 0; + + /** + * GhostBattleMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.tuneHandling = 0; + + /** + * GhostBattleMetadata area. + * @member {number} area + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.area = 0; + + /** + * GhostBattleMetadata stampReturnCount. + * @member {number} stampReturnCount + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.stampReturnCount = 0; + + /** + * GhostBattleMetadata opponents. + * @member {Array.} opponents + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + */ + GhostBattleMetadata.prototype.opponents = $util.emptyArray; + + /** + * Creates a new GhostBattleMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata instance + */ + GhostBattleMetadata.create = function create(properties) { + return new GhostBattleMetadata(properties); + }; + + /** + * Encodes the specified GhostBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata} message GhostBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stampReturnCount); + if (message.opponents != null && message.opponents.length) + for (let i = 0; i < message.opponents.length; ++i) + $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.encode(message.opponents[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostBattleMetadata} message GhostBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostBattleMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + case 4: { + message.stampReturnCount = reader.uint32(); + break; + } + case 6: { + if (!(message.opponents && message.opponents.length)) + message.opponents = []; + message.opponents.push($root.wm.protobuf.SaveScreenshotRequest.OpponentCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("stampReturnCount")) + throw $util.ProtocolError("missing required 'stampReturnCount'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostBattleMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostBattleMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostBattleMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostBattleMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.stampReturnCount)) + return "stampReturnCount: integer expected"; + if (message.opponents != null && message.hasOwnProperty("opponents")) { + if (!Array.isArray(message.opponents)) + return "opponents: array expected"; + for (let i = 0; i < message.opponents.length; ++i) { + let error = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.verify(message.opponents[i]); + if (error) + return "opponents." + error; + } + } + return null; + }; + + /** + * Creates a GhostBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} GhostBattleMetadata + */ + GhostBattleMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.stampReturnCount != null) + message.stampReturnCount = object.stampReturnCount >>> 0; + if (object.opponents) { + if (!Array.isArray(object.opponents)) + throw TypeError(".wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.opponents: array expected"); + message.opponents = []; + for (let i = 0; i < object.opponents.length; ++i) { + if (typeof object.opponents[i] !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata.opponents: object expected"); + message.opponents[i] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.fromObject(object.opponents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GhostBattleMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata} message GhostBattleMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostBattleMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.opponents = []; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.area = 0; + object.stampReturnCount = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.stampReturnCount != null && message.hasOwnProperty("stampReturnCount")) + object.stampReturnCount = message.stampReturnCount; + if (message.opponents && message.opponents.length) { + object.opponents = []; + for (let j = 0; j < message.opponents.length; ++j) + object.opponents[j] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.toObject(message.opponents[j], options); + } + return object; + }; + + /** + * Converts this GhostBattleMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @instance + * @returns {Object.} JSON object + */ + GhostBattleMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostBattleMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostBattleMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.GhostBattleMetadata"; + }; + + return GhostBattleMetadata; + })(); + + SaveScreenshotRequest.VersusBattleMetadata = (function() { + + /** + * Properties of a VersusBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IVersusBattleMetadata + * @property {number} tunePower VersusBattleMetadata tunePower + * @property {number} tuneHandling VersusBattleMetadata tuneHandling + * @property {number} area VersusBattleMetadata area + * @property {Array.|null} [opponents] VersusBattleMetadata opponents + */ + + /** + * Constructs a new VersusBattleMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a VersusBattleMetadata. + * @implements IVersusBattleMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata=} [properties] Properties to set + */ + function VersusBattleMetadata(properties) { + this.opponents = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersusBattleMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.tunePower = 0; + + /** + * VersusBattleMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.tuneHandling = 0; + + /** + * VersusBattleMetadata area. + * @member {number} area + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.area = 0; + + /** + * VersusBattleMetadata opponents. + * @member {Array.} opponents + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + */ + VersusBattleMetadata.prototype.opponents = $util.emptyArray; + + /** + * Creates a new VersusBattleMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata instance + */ + VersusBattleMetadata.create = function create(properties) { + return new VersusBattleMetadata(properties); + }; + + /** + * Encodes the specified VersusBattleMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata} message VersusBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + if (message.opponents != null && message.opponents.length) + for (let i = 0; i < message.opponents.length; ++i) + $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.encode(message.opponents[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VersusBattleMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IVersusBattleMetadata} message VersusBattleMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersusBattleMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + case 4: { + if (!(message.opponents && message.opponents.length)) + message.opponents = []; + message.opponents.push($root.wm.protobuf.SaveScreenshotRequest.OpponentCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes a VersusBattleMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersusBattleMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersusBattleMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersusBattleMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (message.opponents != null && message.hasOwnProperty("opponents")) { + if (!Array.isArray(message.opponents)) + return "opponents: array expected"; + for (let i = 0; i < message.opponents.length; ++i) { + let error = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.verify(message.opponents[i]); + if (error) + return "opponents." + error; + } + } + return null; + }; + + /** + * Creates a VersusBattleMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} VersusBattleMetadata + */ + VersusBattleMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.opponents) { + if (!Array.isArray(object.opponents)) + throw TypeError(".wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.opponents: array expected"); + message.opponents = []; + for (let i = 0; i < object.opponents.length; ++i) { + if (typeof object.opponents[i] !== "object") + throw TypeError(".wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata.opponents: object expected"); + message.opponents[i] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.fromObject(object.opponents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a VersusBattleMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata} message VersusBattleMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersusBattleMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.opponents = []; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.area = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.opponents && message.opponents.length) { + object.opponents = []; + for (let j = 0; j < message.opponents.length; ++j) + object.opponents[j] = $root.wm.protobuf.SaveScreenshotRequest.OpponentCar.toObject(message.opponents[j], options); + } + return object; + }; + + /** + * Converts this VersusBattleMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @instance + * @returns {Object.} JSON object + */ + VersusBattleMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VersusBattleMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VersusBattleMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.VersusBattleMetadata"; + }; + + return VersusBattleMetadata; + })(); + + SaveScreenshotRequest.TerminalMetadata = (function() { + + /** + * Properties of a TerminalMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface ITerminalMetadata + * @property {number} tunePower TerminalMetadata tunePower + * @property {number} tuneHandling TerminalMetadata tuneHandling + * @property {string} name TerminalMetadata name + * @property {string} title TerminalMetadata title + * @property {number} level TerminalMetadata level + */ + + /** + * Constructs a new TerminalMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a TerminalMetadata. + * @implements ITerminalMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata=} [properties] Properties to set + */ + function TerminalMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerminalMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.tunePower = 0; + + /** + * TerminalMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.tuneHandling = 0; + + /** + * TerminalMetadata name. + * @member {string} name + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.name = ""; + + /** + * TerminalMetadata title. + * @member {string} title + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.title = ""; + + /** + * TerminalMetadata level. + * @member {number} level + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + */ + TerminalMetadata.prototype.level = 0; + + /** + * Creates a new TerminalMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata instance + */ + TerminalMetadata.create = function create(properties) { + return new TerminalMetadata(properties); + }; + + /** + * Encodes the specified TerminalMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata} message TerminalMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.title); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.level); + return writer; + }; + + /** + * Encodes the specified TerminalMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TerminalMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITerminalMetadata} message TerminalMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerminalMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + case 4: { + message.title = reader.string(); + break; + } + case 5: { + message.level = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("name")) + throw $util.ProtocolError("missing required 'name'", { instance: message }); + if (!message.hasOwnProperty("title")) + throw $util.ProtocolError("missing required 'title'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + return message; + }; + + /** + * Decodes a TerminalMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerminalMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerminalMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerminalMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isString(message.name)) + return "name: string expected"; + if (!$util.isString(message.title)) + return "title: string expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + return null; + }; + + /** + * Creates a TerminalMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} TerminalMetadata + */ + TerminalMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.TerminalMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.title != null) + message.title = String(object.title); + if (object.level != null) + message.level = object.level >>> 0; + return message; + }; + + /** + * Creates a plain object from a TerminalMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.TerminalMetadata} message TerminalMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerminalMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.name = ""; + object.title = ""; + object.level = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + return object; + }; + + /** + * Converts this TerminalMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @instance + * @returns {Object.} JSON object + */ + TerminalMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerminalMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.TerminalMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerminalMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.TerminalMetadata"; + }; + + return TerminalMetadata; + })(); + + SaveScreenshotRequest.AcquiringVersusStarMetadata = (function() { + + /** + * Properties of an AcquiringVersusStarMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IAcquiringVersusStarMetadata + * @property {number} tunePower AcquiringVersusStarMetadata tunePower + * @property {number} tuneHandling AcquiringVersusStarMetadata tuneHandling + * @property {number} vsStarCount AcquiringVersusStarMetadata vsStarCount + */ + + /** + * Constructs a new AcquiringVersusStarMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an AcquiringVersusStarMetadata. + * @implements IAcquiringVersusStarMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata=} [properties] Properties to set + */ + function AcquiringVersusStarMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcquiringVersusStarMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + */ + AcquiringVersusStarMetadata.prototype.tunePower = 0; + + /** + * AcquiringVersusStarMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + */ + AcquiringVersusStarMetadata.prototype.tuneHandling = 0; + + /** + * AcquiringVersusStarMetadata vsStarCount. + * @member {number} vsStarCount + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + */ + AcquiringVersusStarMetadata.prototype.vsStarCount = 0; + + /** + * Creates a new AcquiringVersusStarMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata instance + */ + AcquiringVersusStarMetadata.create = function create(properties) { + return new AcquiringVersusStarMetadata(properties); + }; + + /** + * Encodes the specified AcquiringVersusStarMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata} message AcquiringVersusStarMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringVersusStarMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.vsStarCount); + return writer; + }; + + /** + * Encodes the specified AcquiringVersusStarMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringVersusStarMetadata} message AcquiringVersusStarMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringVersusStarMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringVersusStarMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.vsStarCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("vsStarCount")) + throw $util.ProtocolError("missing required 'vsStarCount'", { instance: message }); + return message; + }; + + /** + * Decodes an AcquiringVersusStarMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringVersusStarMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcquiringVersusStarMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcquiringVersusStarMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.vsStarCount)) + return "vsStarCount: integer expected"; + return null; + }; + + /** + * Creates an AcquiringVersusStarMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} AcquiringVersusStarMetadata + */ + AcquiringVersusStarMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.vsStarCount != null) + message.vsStarCount = object.vsStarCount >>> 0; + return message; + }; + + /** + * Creates a plain object from an AcquiringVersusStarMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata} message AcquiringVersusStarMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcquiringVersusStarMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.vsStarCount = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.vsStarCount != null && message.hasOwnProperty("vsStarCount")) + object.vsStarCount = message.vsStarCount; + return object; + }; + + /** + * Converts this AcquiringVersusStarMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @instance + * @returns {Object.} JSON object + */ + AcquiringVersusStarMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcquiringVersusStarMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcquiringVersusStarMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.AcquiringVersusStarMetadata"; + }; + + return AcquiringVersusStarMetadata; + })(); + + SaveScreenshotRequest.AcquiringAuraMotifMetadata = (function() { + + /** + * Properties of an AcquiringAuraMotifMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IAcquiringAuraMotifMetadata + * @property {number} tunePower AcquiringAuraMotifMetadata tunePower + * @property {number} tuneHandling AcquiringAuraMotifMetadata tuneHandling + * @property {number} auraMotif AcquiringAuraMotifMetadata auraMotif + */ + + /** + * Constructs a new AcquiringAuraMotifMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an AcquiringAuraMotifMetadata. + * @implements IAcquiringAuraMotifMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata=} [properties] Properties to set + */ + function AcquiringAuraMotifMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcquiringAuraMotifMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + */ + AcquiringAuraMotifMetadata.prototype.tunePower = 0; + + /** + * AcquiringAuraMotifMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + */ + AcquiringAuraMotifMetadata.prototype.tuneHandling = 0; + + /** + * AcquiringAuraMotifMetadata auraMotif. + * @member {number} auraMotif + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + */ + AcquiringAuraMotifMetadata.prototype.auraMotif = 0; + + /** + * Creates a new AcquiringAuraMotifMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata instance + */ + AcquiringAuraMotifMetadata.create = function create(properties) { + return new AcquiringAuraMotifMetadata(properties); + }; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata} message AcquiringAuraMotifMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringAuraMotifMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.auraMotif); + return writer; + }; + + /** + * Encodes the specified AcquiringAuraMotifMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringAuraMotifMetadata} message AcquiringAuraMotifMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringAuraMotifMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringAuraMotifMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.auraMotif = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("auraMotif")) + throw $util.ProtocolError("missing required 'auraMotif'", { instance: message }); + return message; + }; + + /** + * Decodes an AcquiringAuraMotifMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringAuraMotifMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcquiringAuraMotifMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcquiringAuraMotifMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.auraMotif)) + return "auraMotif: integer expected"; + return null; + }; + + /** + * Creates an AcquiringAuraMotifMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} AcquiringAuraMotifMetadata + */ + AcquiringAuraMotifMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.auraMotif != null) + message.auraMotif = object.auraMotif >>> 0; + return message; + }; + + /** + * Creates a plain object from an AcquiringAuraMotifMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata} message AcquiringAuraMotifMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcquiringAuraMotifMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.auraMotif = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.auraMotif != null && message.hasOwnProperty("auraMotif")) + object.auraMotif = message.auraMotif; + return object; + }; + + /** + * Converts this AcquiringAuraMotifMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @instance + * @returns {Object.} JSON object + */ + AcquiringAuraMotifMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcquiringAuraMotifMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcquiringAuraMotifMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.AcquiringAuraMotifMetadata"; + }; + + return AcquiringAuraMotifMetadata; + })(); + + SaveScreenshotRequest.GhostRegionMapMetadata = (function() { + + /** + * Properties of a GhostRegionMapMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IGhostRegionMapMetadata + * @property {number} tunePower GhostRegionMapMetadata tunePower + * @property {number} tuneHandling GhostRegionMapMetadata tuneHandling + * @property {number} rgScore GhostRegionMapMetadata rgScore + * @property {Array.|null} [rgRegionMapScore] GhostRegionMapMetadata rgRegionMapScore + */ + + /** + * Constructs a new GhostRegionMapMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a GhostRegionMapMetadata. + * @implements IGhostRegionMapMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata=} [properties] Properties to set + */ + function GhostRegionMapMetadata(properties) { + this.rgRegionMapScore = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostRegionMapMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.tunePower = 0; + + /** + * GhostRegionMapMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.tuneHandling = 0; + + /** + * GhostRegionMapMetadata rgScore. + * @member {number} rgScore + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.rgScore = 0; + + /** + * GhostRegionMapMetadata rgRegionMapScore. + * @member {Array.} rgRegionMapScore + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + */ + GhostRegionMapMetadata.prototype.rgRegionMapScore = $util.emptyArray; + + /** + * Creates a new GhostRegionMapMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata instance + */ + GhostRegionMapMetadata.create = function create(properties) { + return new GhostRegionMapMetadata(properties); + }; + + /** + * Encodes the specified GhostRegionMapMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata} message GhostRegionMapMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostRegionMapMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rgScore); + if (message.rgRegionMapScore != null && message.rgRegionMapScore.length) + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.rgRegionMapScore[i]); + return writer; + }; + + /** + * Encodes the specified GhostRegionMapMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostRegionMapMetadata} message GhostRegionMapMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostRegionMapMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostRegionMapMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.rgScore = reader.uint32(); + break; + } + case 4: { + if (!(message.rgRegionMapScore && message.rgRegionMapScore.length)) + message.rgRegionMapScore = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.rgRegionMapScore.push(reader.uint32()); + } else + message.rgRegionMapScore.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("rgScore")) + throw $util.ProtocolError("missing required 'rgScore'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostRegionMapMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostRegionMapMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostRegionMapMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostRegionMapMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.rgScore)) + return "rgScore: integer expected"; + if (message.rgRegionMapScore != null && message.hasOwnProperty("rgRegionMapScore")) { + if (!Array.isArray(message.rgRegionMapScore)) + return "rgRegionMapScore: array expected"; + for (let i = 0; i < message.rgRegionMapScore.length; ++i) + if (!$util.isInteger(message.rgRegionMapScore[i])) + return "rgRegionMapScore: integer[] expected"; + } + return null; + }; + + /** + * Creates a GhostRegionMapMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} GhostRegionMapMetadata + */ + GhostRegionMapMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.rgScore != null) + message.rgScore = object.rgScore >>> 0; + if (object.rgRegionMapScore) { + if (!Array.isArray(object.rgRegionMapScore)) + throw TypeError(".wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata.rgRegionMapScore: array expected"); + message.rgRegionMapScore = []; + for (let i = 0; i < object.rgRegionMapScore.length; ++i) + message.rgRegionMapScore[i] = object.rgRegionMapScore[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a GhostRegionMapMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata} message GhostRegionMapMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostRegionMapMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.rgRegionMapScore = []; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.rgScore = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.rgScore != null && message.hasOwnProperty("rgScore")) + object.rgScore = message.rgScore; + if (message.rgRegionMapScore && message.rgRegionMapScore.length) { + object.rgRegionMapScore = []; + for (let j = 0; j < message.rgRegionMapScore.length; ++j) + object.rgRegionMapScore[j] = message.rgRegionMapScore[j]; + } + return object; + }; + + /** + * Converts this GhostRegionMapMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @instance + * @returns {Object.} JSON object + */ + GhostRegionMapMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostRegionMapMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostRegionMapMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.GhostRegionMapMetadata"; + }; + + return GhostRegionMapMetadata; + })(); + + SaveScreenshotRequest.AcquiringCrownMetadata = (function() { + + /** + * Properties of an AcquiringCrownMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IAcquiringCrownMetadata + * @property {number} tunePower AcquiringCrownMetadata tunePower + * @property {number} tuneHandling AcquiringCrownMetadata tuneHandling + * @property {number} area AcquiringCrownMetadata area + */ + + /** + * Constructs a new AcquiringCrownMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an AcquiringCrownMetadata. + * @implements IAcquiringCrownMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata=} [properties] Properties to set + */ + function AcquiringCrownMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcquiringCrownMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + */ + AcquiringCrownMetadata.prototype.tunePower = 0; + + /** + * AcquiringCrownMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + */ + AcquiringCrownMetadata.prototype.tuneHandling = 0; + + /** + * AcquiringCrownMetadata area. + * @member {number} area + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + */ + AcquiringCrownMetadata.prototype.area = 0; + + /** + * Creates a new AcquiringCrownMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata instance + */ + AcquiringCrownMetadata.create = function create(properties) { + return new AcquiringCrownMetadata(properties); + }; + + /** + * Encodes the specified AcquiringCrownMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata} message AcquiringCrownMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringCrownMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + return writer; + }; + + /** + * Encodes the specified AcquiringCrownMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IAcquiringCrownMetadata} message AcquiringCrownMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcquiringCrownMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringCrownMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes an AcquiringCrownMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcquiringCrownMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcquiringCrownMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcquiringCrownMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + return null; + }; + + /** + * Creates an AcquiringCrownMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} AcquiringCrownMetadata + */ + AcquiringCrownMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + return message; + }; + + /** + * Creates a plain object from an AcquiringCrownMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata} message AcquiringCrownMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcquiringCrownMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.area = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + return object; + }; + + /** + * Converts this AcquiringCrownMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @instance + * @returns {Object.} JSON object + */ + AcquiringCrownMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcquiringCrownMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcquiringCrownMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.AcquiringCrownMetadata"; + }; + + return AcquiringCrownMetadata; + })(); + + SaveScreenshotRequest.GhostCompetitionResultMetadata = (function() { + + /** + * Properties of a GhostCompetitionResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IGhostCompetitionResultMetadata + * @property {number} tunePower GhostCompetitionResultMetadata tunePower + * @property {number} tuneHandling GhostCompetitionResultMetadata tuneHandling + * @property {number|null} [rank] GhostCompetitionResultMetadata rank + * @property {number} result GhostCompetitionResultMetadata result + */ + + /** + * Constructs a new GhostCompetitionResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a GhostCompetitionResultMetadata. + * @implements IGhostCompetitionResultMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata=} [properties] Properties to set + */ + function GhostCompetitionResultMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionResultMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.tunePower = 0; + + /** + * GhostCompetitionResultMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.tuneHandling = 0; + + /** + * GhostCompetitionResultMetadata rank. + * @member {number} rank + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.rank = 0; + + /** + * GhostCompetitionResultMetadata result. + * @member {number} result + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + */ + GhostCompetitionResultMetadata.prototype.result = 0; + + /** + * Creates a new GhostCompetitionResultMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata instance + */ + GhostCompetitionResultMetadata.create = function create(properties) { + return new GhostCompetitionResultMetadata(properties); + }; + + /** + * Encodes the specified GhostCompetitionResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata} message GhostCompetitionResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionResultMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rank); + writer.uint32(/* id 4, wireType 0 =*/32).sint32(message.result); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IGhostCompetitionResultMetadata} message GhostCompetitionResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionResultMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionResultMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.rank = reader.uint32(); + break; + } + case 4: { + message.result = reader.sint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionResultMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionResultMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionResultMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionResultMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.rank != null && message.hasOwnProperty("rank")) + if (!$util.isInteger(message.rank)) + return "rank: integer expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + return null; + }; + + /** + * Creates a GhostCompetitionResultMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} GhostCompetitionResultMetadata + */ + GhostCompetitionResultMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.rank != null) + message.rank = object.rank >>> 0; + if (object.result != null) + message.result = object.result | 0; + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionResultMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata} message GhostCompetitionResultMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionResultMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.rank = 0; + object.result = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = message.rank; + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + return object; + }; + + /** + * Converts this GhostCompetitionResultMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionResultMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionResultMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionResultMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.GhostCompetitionResultMetadata"; + }; + + return GhostCompetitionResultMetadata; + })(); + + SaveScreenshotRequest.TimeAttackResultMetadata = (function() { + + /** + * Properties of a TimeAttackResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface ITimeAttackResultMetadata + * @property {number} tunePower TimeAttackResultMetadata tunePower + * @property {number} tuneHandling TimeAttackResultMetadata tuneHandling + * @property {number} course TimeAttackResultMetadata course + * @property {number|null} [wholeRank] TimeAttackResultMetadata wholeRank + * @property {number|null} [modelRank] TimeAttackResultMetadata modelRank + */ + + /** + * Constructs a new TimeAttackResultMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a TimeAttackResultMetadata. + * @implements ITimeAttackResultMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata=} [properties] Properties to set + */ + function TimeAttackResultMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeAttackResultMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.tunePower = 0; + + /** + * TimeAttackResultMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.tuneHandling = 0; + + /** + * TimeAttackResultMetadata course. + * @member {number} course + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.course = 0; + + /** + * TimeAttackResultMetadata wholeRank. + * @member {number} wholeRank + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.wholeRank = 0; + + /** + * TimeAttackResultMetadata modelRank. + * @member {number} modelRank + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + */ + TimeAttackResultMetadata.prototype.modelRank = 0; + + /** + * Creates a new TimeAttackResultMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata instance + */ + TimeAttackResultMetadata.create = function create(properties) { + return new TimeAttackResultMetadata(properties); + }; + + /** + * Encodes the specified TimeAttackResultMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata} message TimeAttackResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResultMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tunePower); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tuneHandling); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.course); + if (message.wholeRank != null && Object.hasOwnProperty.call(message, "wholeRank")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.wholeRank); + if (message.modelRank != null && Object.hasOwnProperty.call(message, "modelRank")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.modelRank); + return writer; + }; + + /** + * Encodes the specified TimeAttackResultMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ITimeAttackResultMetadata} message TimeAttackResultMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeAttackResultMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResultMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tunePower = reader.uint32(); + break; + } + case 2: { + message.tuneHandling = reader.uint32(); + break; + } + case 3: { + message.course = reader.uint32(); + break; + } + case 4: { + message.wholeRank = reader.uint32(); + break; + } + case 5: { + message.modelRank = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("course")) + throw $util.ProtocolError("missing required 'course'", { instance: message }); + return message; + }; + + /** + * Decodes a TimeAttackResultMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeAttackResultMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeAttackResultMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeAttackResultMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.course)) + return "course: integer expected"; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + if (!$util.isInteger(message.wholeRank)) + return "wholeRank: integer expected"; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + if (!$util.isInteger(message.modelRank)) + return "modelRank: integer expected"; + return null; + }; + + /** + * Creates a TimeAttackResultMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} TimeAttackResultMetadata + */ + TimeAttackResultMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.course != null) + message.course = object.course >>> 0; + if (object.wholeRank != null) + message.wholeRank = object.wholeRank >>> 0; + if (object.modelRank != null) + message.modelRank = object.modelRank >>> 0; + return message; + }; + + /** + * Creates a plain object from a TimeAttackResultMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata} message TimeAttackResultMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeAttackResultMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tunePower = 0; + object.tuneHandling = 0; + object.course = 0; + object.wholeRank = 0; + object.modelRank = 0; + } + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.course != null && message.hasOwnProperty("course")) + object.course = message.course; + if (message.wholeRank != null && message.hasOwnProperty("wholeRank")) + object.wholeRank = message.wholeRank; + if (message.modelRank != null && message.hasOwnProperty("modelRank")) + object.modelRank = message.modelRank; + return object; + }; + + /** + * Converts this TimeAttackResultMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @instance + * @returns {Object.} JSON object + */ + TimeAttackResultMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeAttackResultMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeAttackResultMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.TimeAttackResultMetadata"; + }; + + return TimeAttackResultMetadata; + })(); + + SaveScreenshotRequest.LevelUpMetadata = (function() { + + /** + * Properties of a LevelUpMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface ILevelUpMetadata + * @property {number} tunePower LevelUpMetadata tunePower + * @property {number} tuneHandling LevelUpMetadata tuneHandling + * @property {number} level LevelUpMetadata level + */ + + /** + * Constructs a new LevelUpMetadata. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents a LevelUpMetadata. + * @implements ILevelUpMetadata + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata=} [properties] Properties to set + */ + function LevelUpMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LevelUpMetadata tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + */ + LevelUpMetadata.prototype.tunePower = 0; + + /** + * LevelUpMetadata tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + */ + LevelUpMetadata.prototype.tuneHandling = 0; + + /** + * LevelUpMetadata level. + * @member {number} level + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + */ + LevelUpMetadata.prototype.level = 0; + + /** + * Creates a new LevelUpMetadata instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata instance + */ + LevelUpMetadata.create = function create(properties) { + return new LevelUpMetadata(properties); + }; + + /** + * Encodes the specified LevelUpMetadata message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata} message LevelUpMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LevelUpMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.level); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tunePower); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuneHandling); + return writer; + }; + + /** + * Encodes the specified LevelUpMetadata message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.LevelUpMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.ILevelUpMetadata} message LevelUpMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LevelUpMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LevelUpMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.tunePower = reader.uint32(); + break; + } + case 3: { + message.tuneHandling = reader.uint32(); + break; + } + case 1: { + message.level = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + return message; + }; + + /** + * Decodes a LevelUpMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LevelUpMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LevelUpMetadata message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LevelUpMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + return null; + }; + + /** + * Creates a LevelUpMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} LevelUpMetadata + */ + LevelUpMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.LevelUpMetadata(); + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.level != null) + message.level = object.level >>> 0; + return message; + }; + + /** + * Creates a plain object from a LevelUpMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {wm.protobuf.SaveScreenshotRequest.LevelUpMetadata} message LevelUpMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LevelUpMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.level = 0; + object.tunePower = 0; + object.tuneHandling = 0; + } + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + return object; + }; + + /** + * Converts this LevelUpMetadata to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @instance + * @returns {Object.} JSON object + */ + LevelUpMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LevelUpMetadata + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.LevelUpMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LevelUpMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.LevelUpMetadata"; + }; + + return LevelUpMetadata; + })(); + + SaveScreenshotRequest.OpponentCar = (function() { + + /** + * Properties of an OpponentCar. + * @memberof wm.protobuf.SaveScreenshotRequest + * @interface IOpponentCar + * @property {number|null} [carId] OpponentCar carId + * @property {number} tunePower OpponentCar tunePower + * @property {number} tuneHandling OpponentCar tuneHandling + */ + + /** + * Constructs a new OpponentCar. + * @memberof wm.protobuf.SaveScreenshotRequest + * @classdesc Represents an OpponentCar. + * @implements IOpponentCar + * @constructor + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar=} [properties] Properties to set + */ + function OpponentCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OpponentCar carId. + * @member {number} carId + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + */ + OpponentCar.prototype.carId = 0; + + /** + * OpponentCar tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + */ + OpponentCar.prototype.tunePower = 0; + + /** + * OpponentCar tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + */ + OpponentCar.prototype.tuneHandling = 0; + + /** + * Creates a new OpponentCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar instance + */ + OpponentCar.create = function create(properties) { + return new OpponentCar(properties); + }; + + /** + * Encodes the specified OpponentCar message. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar} message OpponentCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpponentCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tunePower); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuneHandling); + return writer; + }; + + /** + * Encodes the specified OpponentCar message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotRequest.OpponentCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.IOpponentCar} message OpponentCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpponentCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OpponentCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpponentCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotRequest.OpponentCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.tunePower = reader.uint32(); + break; + } + case 3: { + message.tuneHandling = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes an OpponentCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpponentCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpponentCar message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpponentCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + return null; + }; + + /** + * Creates an OpponentCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotRequest.OpponentCar} OpponentCar + */ + OpponentCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotRequest.OpponentCar) + return object; + let message = new $root.wm.protobuf.SaveScreenshotRequest.OpponentCar(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + return message; + }; + + /** + * Creates a plain object from an OpponentCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {wm.protobuf.SaveScreenshotRequest.OpponentCar} message OpponentCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpponentCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.tunePower = 0; + object.tuneHandling = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + return object; + }; + + /** + * Converts this OpponentCar to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @instance + * @returns {Object.} JSON object + */ + OpponentCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpponentCar + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotRequest.OpponentCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpponentCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotRequest.OpponentCar"; + }; + + return OpponentCar; + })(); + + return SaveScreenshotRequest; + })(); + + protobuf.SaveScreenshotResponse = (function() { + + /** + * Properties of a SaveScreenshotResponse. + * @memberof wm.protobuf + * @interface ISaveScreenshotResponse + * @property {wm.protobuf.ErrorCode} error SaveScreenshotResponse error + */ + + /** + * Constructs a new SaveScreenshotResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveScreenshotResponse. + * @implements ISaveScreenshotResponse + * @constructor + * @param {wm.protobuf.ISaveScreenshotResponse=} [properties] Properties to set + */ + function SaveScreenshotResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScreenshotResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveScreenshotResponse + * @instance + */ + SaveScreenshotResponse.prototype.error = 0; + + /** + * Creates a new SaveScreenshotResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.ISaveScreenshotResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse instance + */ + SaveScreenshotResponse.create = function create(properties) { + return new SaveScreenshotResponse(properties); + }; + + /** + * Encodes the specified SaveScreenshotResponse message. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.ISaveScreenshotResponse} message SaveScreenshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SaveScreenshotResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScreenshotResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.ISaveScreenshotResponse} message SaveScreenshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScreenshotResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScreenshotResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScreenshotResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScreenshotResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScreenshotResponse message. + * @function verify + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScreenshotResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SaveScreenshotResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScreenshotResponse} SaveScreenshotResponse + */ + SaveScreenshotResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScreenshotResponse) + return object; + let message = new $root.wm.protobuf.SaveScreenshotResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SaveScreenshotResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {wm.protobuf.SaveScreenshotResponse} message SaveScreenshotResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScreenshotResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SaveScreenshotResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScreenshotResponse + * @instance + * @returns {Object.} JSON object + */ + SaveScreenshotResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScreenshotResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveScreenshotResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScreenshotResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScreenshotResponse"; + }; + + return SaveScreenshotResponse; + })(); + + protobuf.SubmitClientLogRequest = (function() { + + /** + * Properties of a SubmitClientLogRequest. + * @memberof wm.protobuf + * @interface ISubmitClientLogRequest + * @property {Uint8Array} data SubmitClientLogRequest data + * @property {number} modifiedAt SubmitClientLogRequest modifiedAt + * @property {wm.protobuf.ClientLogType} logType SubmitClientLogRequest logType + */ + + /** + * Constructs a new SubmitClientLogRequest. + * @memberof wm.protobuf + * @classdesc Represents a SubmitClientLogRequest. + * @implements ISubmitClientLogRequest + * @constructor + * @param {wm.protobuf.ISubmitClientLogRequest=} [properties] Properties to set + */ + function SubmitClientLogRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubmitClientLogRequest data. + * @member {Uint8Array} data + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + */ + SubmitClientLogRequest.prototype.data = $util.newBuffer([]); + + /** + * SubmitClientLogRequest modifiedAt. + * @member {number} modifiedAt + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + */ + SubmitClientLogRequest.prototype.modifiedAt = 0; + + /** + * SubmitClientLogRequest logType. + * @member {wm.protobuf.ClientLogType} logType + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + */ + SubmitClientLogRequest.prototype.logType = 0; + + /** + * Creates a new SubmitClientLogRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.ISubmitClientLogRequest=} [properties] Properties to set + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest instance + */ + SubmitClientLogRequest.create = function create(properties) { + return new SubmitClientLogRequest(properties); + }; + + /** + * Encodes the specified SubmitClientLogRequest message. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.ISubmitClientLogRequest} message SubmitClientLogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.modifiedAt); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.logType); + return writer; + }; + + /** + * Encodes the specified SubmitClientLogRequest message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.ISubmitClientLogRequest} message SubmitClientLogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SubmitClientLogRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.data = reader.bytes(); + break; + } + case 2: { + message.modifiedAt = reader.uint32(); + break; + } + case 3: { + message.logType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("data")) + throw $util.ProtocolError("missing required 'data'", { instance: message }); + if (!message.hasOwnProperty("modifiedAt")) + throw $util.ProtocolError("missing required 'modifiedAt'", { instance: message }); + if (!message.hasOwnProperty("logType")) + throw $util.ProtocolError("missing required 'logType'", { instance: message }); + return message; + }; + + /** + * Decodes a SubmitClientLogRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubmitClientLogRequest message. + * @function verify + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubmitClientLogRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (!$util.isInteger(message.modifiedAt)) + return "modifiedAt: integer expected"; + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a SubmitClientLogRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SubmitClientLogRequest} SubmitClientLogRequest + */ + SubmitClientLogRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SubmitClientLogRequest) + return object; + let message = new $root.wm.protobuf.SubmitClientLogRequest(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + if (object.modifiedAt != null) + message.modifiedAt = object.modifiedAt >>> 0; + switch (object.logType) { + case "LOG_LOAD_REPORT": + case 0: + message.logType = 0; + break; + case "LOG_ERROR": + case 1: + message.logType = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a SubmitClientLogRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {wm.protobuf.SubmitClientLogRequest} message SubmitClientLogRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubmitClientLogRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.modifiedAt = 0; + object.logType = options.enums === String ? "LOG_LOAD_REPORT" : 0; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.modifiedAt != null && message.hasOwnProperty("modifiedAt")) + object.modifiedAt = message.modifiedAt; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = options.enums === String ? $root.wm.protobuf.ClientLogType[message.logType] : message.logType; + return object; + }; + + /** + * Converts this SubmitClientLogRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SubmitClientLogRequest + * @instance + * @returns {Object.} JSON object + */ + SubmitClientLogRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SubmitClientLogRequest + * @function getTypeUrl + * @memberof wm.protobuf.SubmitClientLogRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubmitClientLogRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SubmitClientLogRequest"; + }; + + return SubmitClientLogRequest; + })(); + + protobuf.SubmitClientLogResponse = (function() { + + /** + * Properties of a SubmitClientLogResponse. + * @memberof wm.protobuf + * @interface ISubmitClientLogResponse + * @property {wm.protobuf.ErrorCode} error SubmitClientLogResponse error + */ + + /** + * Constructs a new SubmitClientLogResponse. + * @memberof wm.protobuf + * @classdesc Represents a SubmitClientLogResponse. + * @implements ISubmitClientLogResponse + * @constructor + * @param {wm.protobuf.ISubmitClientLogResponse=} [properties] Properties to set + */ + function SubmitClientLogResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubmitClientLogResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SubmitClientLogResponse + * @instance + */ + SubmitClientLogResponse.prototype.error = 0; + + /** + * Creates a new SubmitClientLogResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.ISubmitClientLogResponse=} [properties] Properties to set + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse instance + */ + SubmitClientLogResponse.create = function create(properties) { + return new SubmitClientLogResponse(properties); + }; + + /** + * Encodes the specified SubmitClientLogResponse message. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.ISubmitClientLogResponse} message SubmitClientLogResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified SubmitClientLogResponse message, length delimited. Does not implicitly {@link wm.protobuf.SubmitClientLogResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.ISubmitClientLogResponse} message SubmitClientLogResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitClientLogResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SubmitClientLogResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a SubmitClientLogResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitClientLogResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubmitClientLogResponse message. + * @function verify + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubmitClientLogResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a SubmitClientLogResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SubmitClientLogResponse} SubmitClientLogResponse + */ + SubmitClientLogResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SubmitClientLogResponse) + return object; + let message = new $root.wm.protobuf.SubmitClientLogResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a SubmitClientLogResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {wm.protobuf.SubmitClientLogResponse} message SubmitClientLogResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubmitClientLogResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this SubmitClientLogResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SubmitClientLogResponse + * @instance + * @returns {Object.} JSON object + */ + SubmitClientLogResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SubmitClientLogResponse + * @function getTypeUrl + * @memberof wm.protobuf.SubmitClientLogResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubmitClientLogResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SubmitClientLogResponse"; + }; + + return SubmitClientLogResponse; + })(); + + protobuf.LoadScratchInformationRequest = (function() { + + /** + * Properties of a LoadScratchInformationRequest. + * @memberof wm.protobuf + * @interface ILoadScratchInformationRequest + * @property {number} userId LoadScratchInformationRequest userId + */ + + /** + * Constructs a new LoadScratchInformationRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadScratchInformationRequest. + * @implements ILoadScratchInformationRequest + * @constructor + * @param {wm.protobuf.ILoadScratchInformationRequest=} [properties] Properties to set + */ + function LoadScratchInformationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadScratchInformationRequest userId. + * @member {number} userId + * @memberof wm.protobuf.LoadScratchInformationRequest + * @instance + */ + LoadScratchInformationRequest.prototype.userId = 0; + + /** + * Creates a new LoadScratchInformationRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.ILoadScratchInformationRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest instance + */ + LoadScratchInformationRequest.create = function create(properties) { + return new LoadScratchInformationRequest(properties); + }; + + /** + * Encodes the specified LoadScratchInformationRequest message. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.ILoadScratchInformationRequest} message LoadScratchInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + return writer; + }; + + /** + * Encodes the specified LoadScratchInformationRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.ILoadScratchInformationRequest} message LoadScratchInformationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadScratchInformationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadScratchInformationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadScratchInformationRequest message. + * @function verify + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadScratchInformationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a LoadScratchInformationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadScratchInformationRequest} LoadScratchInformationRequest + */ + LoadScratchInformationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadScratchInformationRequest) + return object; + let message = new $root.wm.protobuf.LoadScratchInformationRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadScratchInformationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {wm.protobuf.LoadScratchInformationRequest} message LoadScratchInformationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadScratchInformationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this LoadScratchInformationRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadScratchInformationRequest + * @instance + * @returns {Object.} JSON object + */ + LoadScratchInformationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadScratchInformationRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadScratchInformationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadScratchInformationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadScratchInformationRequest"; + }; + + return LoadScratchInformationRequest; + })(); + + protobuf.LoadScratchInformationResponse = (function() { + + /** + * Properties of a LoadScratchInformationResponse. + * @memberof wm.protobuf + * @interface ILoadScratchInformationResponse + * @property {wm.protobuf.ErrorCode} error LoadScratchInformationResponse error + * @property {Array.|null} [scratchSheets] LoadScratchInformationResponse scratchSheets + * @property {number} currentSheet LoadScratchInformationResponse currentSheet + * @property {number} numOfScratched LoadScratchInformationResponse numOfScratched + * @property {Array.|null} [ownedUserItems] LoadScratchInformationResponse ownedUserItems + */ + + /** + * Constructs a new LoadScratchInformationResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadScratchInformationResponse. + * @implements ILoadScratchInformationResponse + * @constructor + * @param {wm.protobuf.ILoadScratchInformationResponse=} [properties] Properties to set + */ + function LoadScratchInformationResponse(properties) { + this.scratchSheets = []; + this.ownedUserItems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadScratchInformationResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.error = 0; + + /** + * LoadScratchInformationResponse scratchSheets. + * @member {Array.} scratchSheets + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.scratchSheets = $util.emptyArray; + + /** + * LoadScratchInformationResponse currentSheet. + * @member {number} currentSheet + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.currentSheet = 0; + + /** + * LoadScratchInformationResponse numOfScratched. + * @member {number} numOfScratched + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.numOfScratched = 0; + + /** + * LoadScratchInformationResponse ownedUserItems. + * @member {Array.} ownedUserItems + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + */ + LoadScratchInformationResponse.prototype.ownedUserItems = $util.emptyArray; + + /** + * Creates a new LoadScratchInformationResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.ILoadScratchInformationResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse instance + */ + LoadScratchInformationResponse.create = function create(properties) { + return new LoadScratchInformationResponse(properties); + }; + + /** + * Encodes the specified LoadScratchInformationResponse message. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.ILoadScratchInformationResponse} message LoadScratchInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.scratchSheets != null && message.scratchSheets.length) + for (let i = 0; i < message.scratchSheets.length; ++i) + $root.wm.protobuf.ScratchSheet.encode(message.scratchSheets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.currentSheet); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.numOfScratched); + if (message.ownedUserItems != null && message.ownedUserItems.length) + for (let i = 0; i < message.ownedUserItems.length; ++i) + $root.wm.protobuf.UserItem.encode(message.ownedUserItems[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadScratchInformationResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadScratchInformationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.ILoadScratchInformationResponse} message LoadScratchInformationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadScratchInformationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadScratchInformationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.scratchSheets && message.scratchSheets.length)) + message.scratchSheets = []; + message.scratchSheets.push($root.wm.protobuf.ScratchSheet.decode(reader, reader.uint32())); + break; + } + case 3: { + message.currentSheet = reader.uint32(); + break; + } + case 4: { + message.numOfScratched = reader.uint32(); + break; + } + case 5: { + if (!(message.ownedUserItems && message.ownedUserItems.length)) + message.ownedUserItems = []; + message.ownedUserItems.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("currentSheet")) + throw $util.ProtocolError("missing required 'currentSheet'", { instance: message }); + if (!message.hasOwnProperty("numOfScratched")) + throw $util.ProtocolError("missing required 'numOfScratched'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadScratchInformationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadScratchInformationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadScratchInformationResponse message. + * @function verify + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadScratchInformationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.scratchSheets != null && message.hasOwnProperty("scratchSheets")) { + if (!Array.isArray(message.scratchSheets)) + return "scratchSheets: array expected"; + for (let i = 0; i < message.scratchSheets.length; ++i) { + let error = $root.wm.protobuf.ScratchSheet.verify(message.scratchSheets[i]); + if (error) + return "scratchSheets." + error; + } + } + if (!$util.isInteger(message.currentSheet)) + return "currentSheet: integer expected"; + if (!$util.isInteger(message.numOfScratched)) + return "numOfScratched: integer expected"; + if (message.ownedUserItems != null && message.hasOwnProperty("ownedUserItems")) { + if (!Array.isArray(message.ownedUserItems)) + return "ownedUserItems: array expected"; + for (let i = 0; i < message.ownedUserItems.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.ownedUserItems[i]); + if (error) + return "ownedUserItems." + error; + } + } + return null; + }; + + /** + * Creates a LoadScratchInformationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadScratchInformationResponse} LoadScratchInformationResponse + */ + LoadScratchInformationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadScratchInformationResponse) + return object; + let message = new $root.wm.protobuf.LoadScratchInformationResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.scratchSheets) { + if (!Array.isArray(object.scratchSheets)) + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.scratchSheets: array expected"); + message.scratchSheets = []; + for (let i = 0; i < object.scratchSheets.length; ++i) { + if (typeof object.scratchSheets[i] !== "object") + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.scratchSheets: object expected"); + message.scratchSheets[i] = $root.wm.protobuf.ScratchSheet.fromObject(object.scratchSheets[i]); + } + } + if (object.currentSheet != null) + message.currentSheet = object.currentSheet >>> 0; + if (object.numOfScratched != null) + message.numOfScratched = object.numOfScratched >>> 0; + if (object.ownedUserItems) { + if (!Array.isArray(object.ownedUserItems)) + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.ownedUserItems: array expected"); + message.ownedUserItems = []; + for (let i = 0; i < object.ownedUserItems.length; ++i) { + if (typeof object.ownedUserItems[i] !== "object") + throw TypeError(".wm.protobuf.LoadScratchInformationResponse.ownedUserItems: object expected"); + message.ownedUserItems[i] = $root.wm.protobuf.UserItem.fromObject(object.ownedUserItems[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadScratchInformationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {wm.protobuf.LoadScratchInformationResponse} message LoadScratchInformationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadScratchInformationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.scratchSheets = []; + object.ownedUserItems = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.currentSheet = 0; + object.numOfScratched = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.scratchSheets && message.scratchSheets.length) { + object.scratchSheets = []; + for (let j = 0; j < message.scratchSheets.length; ++j) + object.scratchSheets[j] = $root.wm.protobuf.ScratchSheet.toObject(message.scratchSheets[j], options); + } + if (message.currentSheet != null && message.hasOwnProperty("currentSheet")) + object.currentSheet = message.currentSheet; + if (message.numOfScratched != null && message.hasOwnProperty("numOfScratched")) + object.numOfScratched = message.numOfScratched; + if (message.ownedUserItems && message.ownedUserItems.length) { + object.ownedUserItems = []; + for (let j = 0; j < message.ownedUserItems.length; ++j) + object.ownedUserItems[j] = $root.wm.protobuf.UserItem.toObject(message.ownedUserItems[j], options); + } + return object; + }; + + /** + * Converts this LoadScratchInformationResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadScratchInformationResponse + * @instance + * @returns {Object.} JSON object + */ + LoadScratchInformationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadScratchInformationResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadScratchInformationResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadScratchInformationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadScratchInformationResponse"; + }; + + return LoadScratchInformationResponse; + })(); + + protobuf.SaveScratchSheetRequest = (function() { + + /** + * Properties of a SaveScratchSheetRequest. + * @memberof wm.protobuf + * @interface ISaveScratchSheetRequest + * @property {number} timestamp SaveScratchSheetRequest timestamp + * @property {number} targetSheet SaveScratchSheetRequest targetSheet + * @property {number} targetSquare SaveScratchSheetRequest targetSquare + * @property {number} userId SaveScratchSheetRequest userId + */ + + /** + * Constructs a new SaveScratchSheetRequest. + * @memberof wm.protobuf + * @classdesc Represents a SaveScratchSheetRequest. + * @implements ISaveScratchSheetRequest + * @constructor + * @param {wm.protobuf.ISaveScratchSheetRequest=} [properties] Properties to set + */ + function SaveScratchSheetRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScratchSheetRequest timestamp. + * @member {number} timestamp + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.timestamp = 0; + + /** + * SaveScratchSheetRequest targetSheet. + * @member {number} targetSheet + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.targetSheet = 0; + + /** + * SaveScratchSheetRequest targetSquare. + * @member {number} targetSquare + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.targetSquare = 0; + + /** + * SaveScratchSheetRequest userId. + * @member {number} userId + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + */ + SaveScratchSheetRequest.prototype.userId = 0; + + /** + * Creates a new SaveScratchSheetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.ISaveScratchSheetRequest=} [properties] Properties to set + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest instance + */ + SaveScratchSheetRequest.create = function create(properties) { + return new SaveScratchSheetRequest(properties); + }; + + /** + * Encodes the specified SaveScratchSheetRequest message. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.ISaveScratchSheetRequest} message SaveScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.targetSheet); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetSquare); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.userId); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.timestamp); + return writer; + }; + + /** + * Encodes the specified SaveScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.ISaveScratchSheetRequest} message SaveScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScratchSheetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + message.timestamp = reader.uint32(); + break; + } + case 1: { + message.targetSheet = reader.uint32(); + break; + } + case 2: { + message.targetSquare = reader.uint32(); + break; + } + case 3: { + message.userId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("timestamp")) + throw $util.ProtocolError("missing required 'timestamp'", { instance: message }); + if (!message.hasOwnProperty("targetSheet")) + throw $util.ProtocolError("missing required 'targetSheet'", { instance: message }); + if (!message.hasOwnProperty("targetSquare")) + throw $util.ProtocolError("missing required 'targetSquare'", { instance: message }); + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScratchSheetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScratchSheetRequest message. + * @function verify + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScratchSheetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.timestamp)) + return "timestamp: integer expected"; + if (!$util.isInteger(message.targetSheet)) + return "targetSheet: integer expected"; + if (!$util.isInteger(message.targetSquare)) + return "targetSquare: integer expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + return null; + }; + + /** + * Creates a SaveScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScratchSheetRequest} SaveScratchSheetRequest + */ + SaveScratchSheetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScratchSheetRequest) + return object; + let message = new $root.wm.protobuf.SaveScratchSheetRequest(); + if (object.timestamp != null) + message.timestamp = object.timestamp >>> 0; + if (object.targetSheet != null) + message.targetSheet = object.targetSheet >>> 0; + if (object.targetSquare != null) + message.targetSquare = object.targetSquare >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + return message; + }; + + /** + * Creates a plain object from a SaveScratchSheetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {wm.protobuf.SaveScratchSheetRequest} message SaveScratchSheetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScratchSheetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.targetSheet = 0; + object.targetSquare = 0; + object.userId = 0; + object.timestamp = 0; + } + if (message.targetSheet != null && message.hasOwnProperty("targetSheet")) + object.targetSheet = message.targetSheet; + if (message.targetSquare != null && message.hasOwnProperty("targetSquare")) + object.targetSquare = message.targetSquare; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this SaveScratchSheetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScratchSheetRequest + * @instance + * @returns {Object.} JSON object + */ + SaveScratchSheetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScratchSheetRequest + * @function getTypeUrl + * @memberof wm.protobuf.SaveScratchSheetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScratchSheetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScratchSheetRequest"; + }; + + return SaveScratchSheetRequest; + })(); + + protobuf.SaveScratchSheetResponse = (function() { + + /** + * Properties of a SaveScratchSheetResponse. + * @memberof wm.protobuf + * @interface ISaveScratchSheetResponse + * @property {wm.protobuf.ErrorCode} error SaveScratchSheetResponse error + * @property {Array.|null} [scratchSheets] SaveScratchSheetResponse scratchSheets + * @property {number} currentSheet SaveScratchSheetResponse currentSheet + * @property {number} numOfScratched SaveScratchSheetResponse numOfScratched + * @property {wm.protobuf.IUserItem|null} [earnedItem] SaveScratchSheetResponse earnedItem + */ + + /** + * Constructs a new SaveScratchSheetResponse. + * @memberof wm.protobuf + * @classdesc Represents a SaveScratchSheetResponse. + * @implements ISaveScratchSheetResponse + * @constructor + * @param {wm.protobuf.ISaveScratchSheetResponse=} [properties] Properties to set + */ + function SaveScratchSheetResponse(properties) { + this.scratchSheets = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveScratchSheetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.error = 0; + + /** + * SaveScratchSheetResponse scratchSheets. + * @member {Array.} scratchSheets + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.scratchSheets = $util.emptyArray; + + /** + * SaveScratchSheetResponse currentSheet. + * @member {number} currentSheet + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.currentSheet = 0; + + /** + * SaveScratchSheetResponse numOfScratched. + * @member {number} numOfScratched + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.numOfScratched = 0; + + /** + * SaveScratchSheetResponse earnedItem. + * @member {wm.protobuf.IUserItem|null|undefined} earnedItem + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + */ + SaveScratchSheetResponse.prototype.earnedItem = null; + + /** + * Creates a new SaveScratchSheetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.ISaveScratchSheetResponse=} [properties] Properties to set + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse instance + */ + SaveScratchSheetResponse.create = function create(properties) { + return new SaveScratchSheetResponse(properties); + }; + + /** + * Encodes the specified SaveScratchSheetResponse message. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.ISaveScratchSheetResponse} message SaveScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.scratchSheets != null && message.scratchSheets.length) + for (let i = 0; i < message.scratchSheets.length; ++i) + $root.wm.protobuf.ScratchSheet.encode(message.scratchSheets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.currentSheet); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.numOfScratched); + if (message.earnedItem != null && Object.hasOwnProperty.call(message, "earnedItem")) + $root.wm.protobuf.UserItem.encode(message.earnedItem, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.SaveScratchSheetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.ISaveScratchSheetResponse} message SaveScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveScratchSheetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SaveScratchSheetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.scratchSheets && message.scratchSheets.length)) + message.scratchSheets = []; + message.scratchSheets.push($root.wm.protobuf.ScratchSheet.decode(reader, reader.uint32())); + break; + } + case 3: { + message.currentSheet = reader.uint32(); + break; + } + case 4: { + message.numOfScratched = reader.uint32(); + break; + } + case 5: { + message.earnedItem = $root.wm.protobuf.UserItem.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("currentSheet")) + throw $util.ProtocolError("missing required 'currentSheet'", { instance: message }); + if (!message.hasOwnProperty("numOfScratched")) + throw $util.ProtocolError("missing required 'numOfScratched'", { instance: message }); + return message; + }; + + /** + * Decodes a SaveScratchSheetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveScratchSheetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveScratchSheetResponse message. + * @function verify + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveScratchSheetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.scratchSheets != null && message.hasOwnProperty("scratchSheets")) { + if (!Array.isArray(message.scratchSheets)) + return "scratchSheets: array expected"; + for (let i = 0; i < message.scratchSheets.length; ++i) { + let error = $root.wm.protobuf.ScratchSheet.verify(message.scratchSheets[i]); + if (error) + return "scratchSheets." + error; + } + } + if (!$util.isInteger(message.currentSheet)) + return "currentSheet: integer expected"; + if (!$util.isInteger(message.numOfScratched)) + return "numOfScratched: integer expected"; + if (message.earnedItem != null && message.hasOwnProperty("earnedItem")) { + let error = $root.wm.protobuf.UserItem.verify(message.earnedItem); + if (error) + return "earnedItem." + error; + } + return null; + }; + + /** + * Creates a SaveScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SaveScratchSheetResponse} SaveScratchSheetResponse + */ + SaveScratchSheetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SaveScratchSheetResponse) + return object; + let message = new $root.wm.protobuf.SaveScratchSheetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.scratchSheets) { + if (!Array.isArray(object.scratchSheets)) + throw TypeError(".wm.protobuf.SaveScratchSheetResponse.scratchSheets: array expected"); + message.scratchSheets = []; + for (let i = 0; i < object.scratchSheets.length; ++i) { + if (typeof object.scratchSheets[i] !== "object") + throw TypeError(".wm.protobuf.SaveScratchSheetResponse.scratchSheets: object expected"); + message.scratchSheets[i] = $root.wm.protobuf.ScratchSheet.fromObject(object.scratchSheets[i]); + } + } + if (object.currentSheet != null) + message.currentSheet = object.currentSheet >>> 0; + if (object.numOfScratched != null) + message.numOfScratched = object.numOfScratched >>> 0; + if (object.earnedItem != null) { + if (typeof object.earnedItem !== "object") + throw TypeError(".wm.protobuf.SaveScratchSheetResponse.earnedItem: object expected"); + message.earnedItem = $root.wm.protobuf.UserItem.fromObject(object.earnedItem); + } + return message; + }; + + /** + * Creates a plain object from a SaveScratchSheetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {wm.protobuf.SaveScratchSheetResponse} message SaveScratchSheetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveScratchSheetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.scratchSheets = []; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.currentSheet = 0; + object.numOfScratched = 0; + object.earnedItem = null; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.scratchSheets && message.scratchSheets.length) { + object.scratchSheets = []; + for (let j = 0; j < message.scratchSheets.length; ++j) + object.scratchSheets[j] = $root.wm.protobuf.ScratchSheet.toObject(message.scratchSheets[j], options); + } + if (message.currentSheet != null && message.hasOwnProperty("currentSheet")) + object.currentSheet = message.currentSheet; + if (message.numOfScratched != null && message.hasOwnProperty("numOfScratched")) + object.numOfScratched = message.numOfScratched; + if (message.earnedItem != null && message.hasOwnProperty("earnedItem")) + object.earnedItem = $root.wm.protobuf.UserItem.toObject(message.earnedItem, options); + return object; + }; + + /** + * Converts this SaveScratchSheetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SaveScratchSheetResponse + * @instance + * @returns {Object.} JSON object + */ + SaveScratchSheetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveScratchSheetResponse + * @function getTypeUrl + * @memberof wm.protobuf.SaveScratchSheetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveScratchSheetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SaveScratchSheetResponse"; + }; + + return SaveScratchSheetResponse; + })(); + + protobuf.TurnScratchSheetRequest = (function() { + + /** + * Properties of a TurnScratchSheetRequest. + * @memberof wm.protobuf + * @interface ITurnScratchSheetRequest + * @property {number} userId TurnScratchSheetRequest userId + * @property {number} targetSheet TurnScratchSheetRequest targetSheet + */ + + /** + * Constructs a new TurnScratchSheetRequest. + * @memberof wm.protobuf + * @classdesc Represents a TurnScratchSheetRequest. + * @implements ITurnScratchSheetRequest + * @constructor + * @param {wm.protobuf.ITurnScratchSheetRequest=} [properties] Properties to set + */ + function TurnScratchSheetRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TurnScratchSheetRequest userId. + * @member {number} userId + * @memberof wm.protobuf.TurnScratchSheetRequest + * @instance + */ + TurnScratchSheetRequest.prototype.userId = 0; + + /** + * TurnScratchSheetRequest targetSheet. + * @member {number} targetSheet + * @memberof wm.protobuf.TurnScratchSheetRequest + * @instance + */ + TurnScratchSheetRequest.prototype.targetSheet = 0; + + /** + * Creates a new TurnScratchSheetRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.ITurnScratchSheetRequest=} [properties] Properties to set + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest instance + */ + TurnScratchSheetRequest.create = function create(properties) { + return new TurnScratchSheetRequest(properties); + }; + + /** + * Encodes the specified TurnScratchSheetRequest message. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.ITurnScratchSheetRequest} message TurnScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetSheet); + return writer; + }; + + /** + * Encodes the specified TurnScratchSheetRequest message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.ITurnScratchSheetRequest} message TurnScratchSheetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TurnScratchSheetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.targetSheet = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("targetSheet")) + throw $util.ProtocolError("missing required 'targetSheet'", { instance: message }); + return message; + }; + + /** + * Decodes a TurnScratchSheetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TurnScratchSheetRequest message. + * @function verify + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TurnScratchSheetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.targetSheet)) + return "targetSheet: integer expected"; + return null; + }; + + /** + * Creates a TurnScratchSheetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TurnScratchSheetRequest} TurnScratchSheetRequest + */ + TurnScratchSheetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TurnScratchSheetRequest) + return object; + let message = new $root.wm.protobuf.TurnScratchSheetRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.targetSheet != null) + message.targetSheet = object.targetSheet >>> 0; + return message; + }; + + /** + * Creates a plain object from a TurnScratchSheetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {wm.protobuf.TurnScratchSheetRequest} message TurnScratchSheetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TurnScratchSheetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.targetSheet = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.targetSheet != null && message.hasOwnProperty("targetSheet")) + object.targetSheet = message.targetSheet; + return object; + }; + + /** + * Converts this TurnScratchSheetRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.TurnScratchSheetRequest + * @instance + * @returns {Object.} JSON object + */ + TurnScratchSheetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TurnScratchSheetRequest + * @function getTypeUrl + * @memberof wm.protobuf.TurnScratchSheetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TurnScratchSheetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TurnScratchSheetRequest"; + }; + + return TurnScratchSheetRequest; + })(); + + protobuf.TurnScratchSheetResponse = (function() { + + /** + * Properties of a TurnScratchSheetResponse. + * @memberof wm.protobuf + * @interface ITurnScratchSheetResponse + * @property {wm.protobuf.ErrorCode} error TurnScratchSheetResponse error + */ + + /** + * Constructs a new TurnScratchSheetResponse. + * @memberof wm.protobuf + * @classdesc Represents a TurnScratchSheetResponse. + * @implements ITurnScratchSheetResponse + * @constructor + * @param {wm.protobuf.ITurnScratchSheetResponse=} [properties] Properties to set + */ + function TurnScratchSheetResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TurnScratchSheetResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.TurnScratchSheetResponse + * @instance + */ + TurnScratchSheetResponse.prototype.error = 0; + + /** + * Creates a new TurnScratchSheetResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.ITurnScratchSheetResponse=} [properties] Properties to set + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse instance + */ + TurnScratchSheetResponse.create = function create(properties) { + return new TurnScratchSheetResponse(properties); + }; + + /** + * Encodes the specified TurnScratchSheetResponse message. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.ITurnScratchSheetResponse} message TurnScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified TurnScratchSheetResponse message, length delimited. Does not implicitly {@link wm.protobuf.TurnScratchSheetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.ITurnScratchSheetResponse} message TurnScratchSheetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TurnScratchSheetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TurnScratchSheetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a TurnScratchSheetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TurnScratchSheetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TurnScratchSheetResponse message. + * @function verify + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TurnScratchSheetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a TurnScratchSheetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TurnScratchSheetResponse} TurnScratchSheetResponse + */ + TurnScratchSheetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TurnScratchSheetResponse) + return object; + let message = new $root.wm.protobuf.TurnScratchSheetResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a TurnScratchSheetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {wm.protobuf.TurnScratchSheetResponse} message TurnScratchSheetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TurnScratchSheetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this TurnScratchSheetResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.TurnScratchSheetResponse + * @instance + * @returns {Object.} JSON object + */ + TurnScratchSheetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TurnScratchSheetResponse + * @function getTypeUrl + * @memberof wm.protobuf.TurnScratchSheetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TurnScratchSheetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TurnScratchSheetResponse"; + }; + + return TurnScratchSheetResponse; + })(); + + protobuf.CheckItemReceivableCarsRequest = (function() { + + /** + * Properties of a CheckItemReceivableCarsRequest. + * @memberof wm.protobuf + * @interface ICheckItemReceivableCarsRequest + * @property {number} userId CheckItemReceivableCarsRequest userId + * @property {Array.|null} [itemsToBeEarned] CheckItemReceivableCarsRequest itemsToBeEarned + */ + + /** + * Constructs a new CheckItemReceivableCarsRequest. + * @memberof wm.protobuf + * @classdesc Represents a CheckItemReceivableCarsRequest. + * @implements ICheckItemReceivableCarsRequest + * @constructor + * @param {wm.protobuf.ICheckItemReceivableCarsRequest=} [properties] Properties to set + */ + function CheckItemReceivableCarsRequest(properties) { + this.itemsToBeEarned = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckItemReceivableCarsRequest userId. + * @member {number} userId + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @instance + */ + CheckItemReceivableCarsRequest.prototype.userId = 0; + + /** + * CheckItemReceivableCarsRequest itemsToBeEarned. + * @member {Array.} itemsToBeEarned + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @instance + */ + CheckItemReceivableCarsRequest.prototype.itemsToBeEarned = $util.emptyArray; + + /** + * Creates a new CheckItemReceivableCarsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsRequest=} [properties] Properties to set + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest instance + */ + CheckItemReceivableCarsRequest.create = function create(properties) { + return new CheckItemReceivableCarsRequest(properties); + }; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsRequest} message CheckItemReceivableCarsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + if (message.itemsToBeEarned != null && message.itemsToBeEarned.length) + for (let i = 0; i < message.itemsToBeEarned.length; ++i) + $root.wm.protobuf.UserItem.encode(message.itemsToBeEarned[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CheckItemReceivableCarsRequest message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsRequest} message CheckItemReceivableCarsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CheckItemReceivableCarsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + if (!(message.itemsToBeEarned && message.itemsToBeEarned.length)) + message.itemsToBeEarned = []; + message.itemsToBeEarned.push($root.wm.protobuf.UserItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + return message; + }; + + /** + * Decodes a CheckItemReceivableCarsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckItemReceivableCarsRequest message. + * @function verify + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckItemReceivableCarsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.itemsToBeEarned != null && message.hasOwnProperty("itemsToBeEarned")) { + if (!Array.isArray(message.itemsToBeEarned)) + return "itemsToBeEarned: array expected"; + for (let i = 0; i < message.itemsToBeEarned.length; ++i) { + let error = $root.wm.protobuf.UserItem.verify(message.itemsToBeEarned[i]); + if (error) + return "itemsToBeEarned." + error; + } + } + return null; + }; + + /** + * Creates a CheckItemReceivableCarsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CheckItemReceivableCarsRequest} CheckItemReceivableCarsRequest + */ + CheckItemReceivableCarsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CheckItemReceivableCarsRequest) + return object; + let message = new $root.wm.protobuf.CheckItemReceivableCarsRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.itemsToBeEarned) { + if (!Array.isArray(object.itemsToBeEarned)) + throw TypeError(".wm.protobuf.CheckItemReceivableCarsRequest.itemsToBeEarned: array expected"); + message.itemsToBeEarned = []; + for (let i = 0; i < object.itemsToBeEarned.length; ++i) { + if (typeof object.itemsToBeEarned[i] !== "object") + throw TypeError(".wm.protobuf.CheckItemReceivableCarsRequest.itemsToBeEarned: object expected"); + message.itemsToBeEarned[i] = $root.wm.protobuf.UserItem.fromObject(object.itemsToBeEarned[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CheckItemReceivableCarsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {wm.protobuf.CheckItemReceivableCarsRequest} message CheckItemReceivableCarsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckItemReceivableCarsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.itemsToBeEarned = []; + if (options.defaults) + object.userId = 0; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.itemsToBeEarned && message.itemsToBeEarned.length) { + object.itemsToBeEarned = []; + for (let j = 0; j < message.itemsToBeEarned.length; ++j) + object.itemsToBeEarned[j] = $root.wm.protobuf.UserItem.toObject(message.itemsToBeEarned[j], options); + } + return object; + }; + + /** + * Converts this CheckItemReceivableCarsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @instance + * @returns {Object.} JSON object + */ + CheckItemReceivableCarsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckItemReceivableCarsRequest + * @function getTypeUrl + * @memberof wm.protobuf.CheckItemReceivableCarsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckItemReceivableCarsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CheckItemReceivableCarsRequest"; + }; + + return CheckItemReceivableCarsRequest; + })(); + + protobuf.CheckItemReceivableCarsResponse = (function() { + + /** + * Properties of a CheckItemReceivableCarsResponse. + * @memberof wm.protobuf + * @interface ICheckItemReceivableCarsResponse + * @property {wm.protobuf.ErrorCode} error CheckItemReceivableCarsResponse error + * @property {Array.|null} [carIds] CheckItemReceivableCarsResponse carIds + */ + + /** + * Constructs a new CheckItemReceivableCarsResponse. + * @memberof wm.protobuf + * @classdesc Represents a CheckItemReceivableCarsResponse. + * @implements ICheckItemReceivableCarsResponse + * @constructor + * @param {wm.protobuf.ICheckItemReceivableCarsResponse=} [properties] Properties to set + */ + function CheckItemReceivableCarsResponse(properties) { + this.carIds = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckItemReceivableCarsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @instance + */ + CheckItemReceivableCarsResponse.prototype.error = 0; + + /** + * CheckItemReceivableCarsResponse carIds. + * @member {Array.} carIds + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @instance + */ + CheckItemReceivableCarsResponse.prototype.carIds = $util.emptyArray; + + /** + * Creates a new CheckItemReceivableCarsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsResponse=} [properties] Properties to set + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse instance + */ + CheckItemReceivableCarsResponse.create = function create(properties) { + return new CheckItemReceivableCarsResponse(properties); + }; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsResponse} message CheckItemReceivableCarsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.carIds != null && message.carIds.length) + for (let i = 0; i < message.carIds.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.carIds[i]); + return writer; + }; + + /** + * Encodes the specified CheckItemReceivableCarsResponse message, length delimited. Does not implicitly {@link wm.protobuf.CheckItemReceivableCarsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.ICheckItemReceivableCarsResponse} message CheckItemReceivableCarsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckItemReceivableCarsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CheckItemReceivableCarsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.carIds && message.carIds.length)) + message.carIds = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.carIds.push(reader.uint32()); + } else + message.carIds.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a CheckItemReceivableCarsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckItemReceivableCarsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckItemReceivableCarsResponse message. + * @function verify + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckItemReceivableCarsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.carIds != null && message.hasOwnProperty("carIds")) { + if (!Array.isArray(message.carIds)) + return "carIds: array expected"; + for (let i = 0; i < message.carIds.length; ++i) + if (!$util.isInteger(message.carIds[i])) + return "carIds: integer[] expected"; + } + return null; + }; + + /** + * Creates a CheckItemReceivableCarsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CheckItemReceivableCarsResponse} CheckItemReceivableCarsResponse + */ + CheckItemReceivableCarsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CheckItemReceivableCarsResponse) + return object; + let message = new $root.wm.protobuf.CheckItemReceivableCarsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.carIds) { + if (!Array.isArray(object.carIds)) + throw TypeError(".wm.protobuf.CheckItemReceivableCarsResponse.carIds: array expected"); + message.carIds = []; + for (let i = 0; i < object.carIds.length; ++i) + message.carIds[i] = object.carIds[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a CheckItemReceivableCarsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {wm.protobuf.CheckItemReceivableCarsResponse} message CheckItemReceivableCarsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckItemReceivableCarsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.carIds = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.carIds && message.carIds.length) { + object.carIds = []; + for (let j = 0; j < message.carIds.length; ++j) + object.carIds[j] = message.carIds[j]; + } + return object; + }; + + /** + * Converts this CheckItemReceivableCarsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @instance + * @returns {Object.} JSON object + */ + CheckItemReceivableCarsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckItemReceivableCarsResponse + * @function getTypeUrl + * @memberof wm.protobuf.CheckItemReceivableCarsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckItemReceivableCarsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CheckItemReceivableCarsResponse"; + }; + + return CheckItemReceivableCarsResponse; + })(); + + protobuf.ReceiveUserItemsRequest = (function() { + + /** + * Properties of a ReceiveUserItemsRequest. + * @memberof wm.protobuf + * @interface IReceiveUserItemsRequest + * @property {number} carId ReceiveUserItemsRequest carId + * @property {Array.|null} [targetItemIds] ReceiveUserItemsRequest targetItemIds + */ + + /** + * Constructs a new ReceiveUserItemsRequest. + * @memberof wm.protobuf + * @classdesc Represents a ReceiveUserItemsRequest. + * @implements IReceiveUserItemsRequest + * @constructor + * @param {wm.protobuf.IReceiveUserItemsRequest=} [properties] Properties to set + */ + function ReceiveUserItemsRequest(properties) { + this.targetItemIds = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReceiveUserItemsRequest carId. + * @member {number} carId + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @instance + */ + ReceiveUserItemsRequest.prototype.carId = 0; + + /** + * ReceiveUserItemsRequest targetItemIds. + * @member {Array.} targetItemIds + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @instance + */ + ReceiveUserItemsRequest.prototype.targetItemIds = $util.emptyArray; + + /** + * Creates a new ReceiveUserItemsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.IReceiveUserItemsRequest=} [properties] Properties to set + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest instance + */ + ReceiveUserItemsRequest.create = function create(properties) { + return new ReceiveUserItemsRequest(properties); + }; + + /** + * Encodes the specified ReceiveUserItemsRequest message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.IReceiveUserItemsRequest} message ReceiveUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.targetItemIds != null && message.targetItemIds.length) + for (let i = 0; i < message.targetItemIds.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.targetItemIds[i]); + return writer; + }; + + /** + * Encodes the specified ReceiveUserItemsRequest message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.IReceiveUserItemsRequest} message ReceiveUserItemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ReceiveUserItemsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + if (!(message.targetItemIds && message.targetItemIds.length)) + message.targetItemIds = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targetItemIds.push(reader.uint32()); + } else + message.targetItemIds.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a ReceiveUserItemsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReceiveUserItemsRequest message. + * @function verify + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReceiveUserItemsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.targetItemIds != null && message.hasOwnProperty("targetItemIds")) { + if (!Array.isArray(message.targetItemIds)) + return "targetItemIds: array expected"; + for (let i = 0; i < message.targetItemIds.length; ++i) + if (!$util.isInteger(message.targetItemIds[i])) + return "targetItemIds: integer[] expected"; + } + return null; + }; + + /** + * Creates a ReceiveUserItemsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ReceiveUserItemsRequest} ReceiveUserItemsRequest + */ + ReceiveUserItemsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ReceiveUserItemsRequest) + return object; + let message = new $root.wm.protobuf.ReceiveUserItemsRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.targetItemIds) { + if (!Array.isArray(object.targetItemIds)) + throw TypeError(".wm.protobuf.ReceiveUserItemsRequest.targetItemIds: array expected"); + message.targetItemIds = []; + for (let i = 0; i < object.targetItemIds.length; ++i) + message.targetItemIds[i] = object.targetItemIds[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from a ReceiveUserItemsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {wm.protobuf.ReceiveUserItemsRequest} message ReceiveUserItemsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReceiveUserItemsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.targetItemIds = []; + if (options.defaults) + object.carId = 0; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.targetItemIds && message.targetItemIds.length) { + object.targetItemIds = []; + for (let j = 0; j < message.targetItemIds.length; ++j) + object.targetItemIds[j] = message.targetItemIds[j]; + } + return object; + }; + + /** + * Converts this ReceiveUserItemsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @instance + * @returns {Object.} JSON object + */ + ReceiveUserItemsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReceiveUserItemsRequest + * @function getTypeUrl + * @memberof wm.protobuf.ReceiveUserItemsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReceiveUserItemsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ReceiveUserItemsRequest"; + }; + + return ReceiveUserItemsRequest; + })(); + + protobuf.ReceiveUserItemsResponse = (function() { + + /** + * Properties of a ReceiveUserItemsResponse. + * @memberof wm.protobuf + * @interface IReceiveUserItemsResponse + * @property {wm.protobuf.ErrorCode} error ReceiveUserItemsResponse error + */ + + /** + * Constructs a new ReceiveUserItemsResponse. + * @memberof wm.protobuf + * @classdesc Represents a ReceiveUserItemsResponse. + * @implements IReceiveUserItemsResponse + * @constructor + * @param {wm.protobuf.IReceiveUserItemsResponse=} [properties] Properties to set + */ + function ReceiveUserItemsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReceiveUserItemsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @instance + */ + ReceiveUserItemsResponse.prototype.error = 0; + + /** + * Creates a new ReceiveUserItemsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.IReceiveUserItemsResponse=} [properties] Properties to set + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse instance + */ + ReceiveUserItemsResponse.create = function create(properties) { + return new ReceiveUserItemsResponse(properties); + }; + + /** + * Encodes the specified ReceiveUserItemsResponse message. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.IReceiveUserItemsResponse} message ReceiveUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified ReceiveUserItemsResponse message, length delimited. Does not implicitly {@link wm.protobuf.ReceiveUserItemsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.IReceiveUserItemsResponse} message ReceiveUserItemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveUserItemsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ReceiveUserItemsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a ReceiveUserItemsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveUserItemsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReceiveUserItemsResponse message. + * @function verify + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReceiveUserItemsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a ReceiveUserItemsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ReceiveUserItemsResponse} ReceiveUserItemsResponse + */ + ReceiveUserItemsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ReceiveUserItemsResponse) + return object; + let message = new $root.wm.protobuf.ReceiveUserItemsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a ReceiveUserItemsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {wm.protobuf.ReceiveUserItemsResponse} message ReceiveUserItemsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReceiveUserItemsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this ReceiveUserItemsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @instance + * @returns {Object.} JSON object + */ + ReceiveUserItemsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReceiveUserItemsResponse + * @function getTypeUrl + * @memberof wm.protobuf.ReceiveUserItemsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReceiveUserItemsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ReceiveUserItemsResponse"; + }; + + return ReceiveUserItemsResponse; + })(); + + protobuf.UpdateEventModeSerialRequest = (function() { + + /** + * Properties of an UpdateEventModeSerialRequest. + * @memberof wm.protobuf + * @interface IUpdateEventModeSerialRequest + * @property {string|null} [eventModeSerial] UpdateEventModeSerialRequest eventModeSerial + */ + + /** + * Constructs a new UpdateEventModeSerialRequest. + * @memberof wm.protobuf + * @classdesc Represents an UpdateEventModeSerialRequest. + * @implements IUpdateEventModeSerialRequest + * @constructor + * @param {wm.protobuf.IUpdateEventModeSerialRequest=} [properties] Properties to set + */ + function UpdateEventModeSerialRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEventModeSerialRequest eventModeSerial. + * @member {string} eventModeSerial + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @instance + */ + UpdateEventModeSerialRequest.prototype.eventModeSerial = ""; + + /** + * Creates a new UpdateEventModeSerialRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.IUpdateEventModeSerialRequest=} [properties] Properties to set + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest instance + */ + UpdateEventModeSerialRequest.create = function create(properties) { + return new UpdateEventModeSerialRequest(properties); + }; + + /** + * Encodes the specified UpdateEventModeSerialRequest message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.IUpdateEventModeSerialRequest} message UpdateEventModeSerialRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventModeSerial != null && Object.hasOwnProperty.call(message, "eventModeSerial")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventModeSerial); + return writer; + }; + + /** + * Encodes the specified UpdateEventModeSerialRequest message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.IUpdateEventModeSerialRequest} message UpdateEventModeSerialRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateEventModeSerialRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.eventModeSerial = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateEventModeSerialRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEventModeSerialRequest message. + * @function verify + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEventModeSerialRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + if (!$util.isString(message.eventModeSerial)) + return "eventModeSerial: string expected"; + return null; + }; + + /** + * Creates an UpdateEventModeSerialRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateEventModeSerialRequest} UpdateEventModeSerialRequest + */ + UpdateEventModeSerialRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateEventModeSerialRequest) + return object; + let message = new $root.wm.protobuf.UpdateEventModeSerialRequest(); + if (object.eventModeSerial != null) + message.eventModeSerial = String(object.eventModeSerial); + return message; + }; + + /** + * Creates a plain object from an UpdateEventModeSerialRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {wm.protobuf.UpdateEventModeSerialRequest} message UpdateEventModeSerialRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEventModeSerialRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.eventModeSerial = ""; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + object.eventModeSerial = message.eventModeSerial; + return object; + }; + + /** + * Converts this UpdateEventModeSerialRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEventModeSerialRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEventModeSerialRequest + * @function getTypeUrl + * @memberof wm.protobuf.UpdateEventModeSerialRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEventModeSerialRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateEventModeSerialRequest"; + }; + + return UpdateEventModeSerialRequest; + })(); + + protobuf.UpdateEventModeSerialResponse = (function() { + + /** + * Properties of an UpdateEventModeSerialResponse. + * @memberof wm.protobuf + * @interface IUpdateEventModeSerialResponse + * @property {wm.protobuf.ErrorCode} error UpdateEventModeSerialResponse error + * @property {wm.protobuf.EventModeSerialErrorCode} serialError UpdateEventModeSerialResponse serialError + * @property {string|null} [eventModeSerial] UpdateEventModeSerialResponse eventModeSerial + * @property {number|null} [startAt] UpdateEventModeSerialResponse startAt + * @property {number|null} [endAt] UpdateEventModeSerialResponse endAt + */ + + /** + * Constructs a new UpdateEventModeSerialResponse. + * @memberof wm.protobuf + * @classdesc Represents an UpdateEventModeSerialResponse. + * @implements IUpdateEventModeSerialResponse + * @constructor + * @param {wm.protobuf.IUpdateEventModeSerialResponse=} [properties] Properties to set + */ + function UpdateEventModeSerialResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEventModeSerialResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.error = 0; + + /** + * UpdateEventModeSerialResponse serialError. + * @member {wm.protobuf.EventModeSerialErrorCode} serialError + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.serialError = 0; + + /** + * UpdateEventModeSerialResponse eventModeSerial. + * @member {string} eventModeSerial + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.eventModeSerial = ""; + + /** + * UpdateEventModeSerialResponse startAt. + * @member {number} startAt + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.startAt = 0; + + /** + * UpdateEventModeSerialResponse endAt. + * @member {number} endAt + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + */ + UpdateEventModeSerialResponse.prototype.endAt = 0; + + /** + * Creates a new UpdateEventModeSerialResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.IUpdateEventModeSerialResponse=} [properties] Properties to set + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse instance + */ + UpdateEventModeSerialResponse.create = function create(properties) { + return new UpdateEventModeSerialResponse(properties); + }; + + /** + * Encodes the specified UpdateEventModeSerialResponse message. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.IUpdateEventModeSerialResponse} message UpdateEventModeSerialResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.eventModeSerial != null && Object.hasOwnProperty.call(message, "eventModeSerial")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.eventModeSerial); + if (message.endAt != null && Object.hasOwnProperty.call(message, "endAt")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.endAt); + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.serialError); + if (message.startAt != null && Object.hasOwnProperty.call(message, "startAt")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.startAt); + return writer; + }; + + /** + * Encodes the specified UpdateEventModeSerialResponse message, length delimited. Does not implicitly {@link wm.protobuf.UpdateEventModeSerialResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.IUpdateEventModeSerialResponse} message UpdateEventModeSerialResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventModeSerialResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UpdateEventModeSerialResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 4: { + message.serialError = reader.int32(); + break; + } + case 2: { + message.eventModeSerial = reader.string(); + break; + } + case 5: { + message.startAt = reader.uint32(); + break; + } + case 3: { + message.endAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("serialError")) + throw $util.ProtocolError("missing required 'serialError'", { instance: message }); + return message; + }; + + /** + * Decodes an UpdateEventModeSerialResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventModeSerialResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEventModeSerialResponse message. + * @function verify + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEventModeSerialResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + switch (message.serialError) { + default: + return "serialError: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + if (!$util.isString(message.eventModeSerial)) + return "eventModeSerial: string expected"; + if (message.startAt != null && message.hasOwnProperty("startAt")) + if (!$util.isInteger(message.startAt)) + return "startAt: integer expected"; + if (message.endAt != null && message.hasOwnProperty("endAt")) + if (!$util.isInteger(message.endAt)) + return "endAt: integer expected"; + return null; + }; + + /** + * Creates an UpdateEventModeSerialResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UpdateEventModeSerialResponse} UpdateEventModeSerialResponse + */ + UpdateEventModeSerialResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UpdateEventModeSerialResponse) + return object; + let message = new $root.wm.protobuf.UpdateEventModeSerialResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + switch (object.serialError) { + case "SERIAL_SUCCESS": + case 0: + message.serialError = 0; + break; + case "SERIAL_ATTEMPT_TO_CHANGE": + case 1: + message.serialError = 1; + break; + case "SERIAL_NO_INPUT": + case 2: + message.serialError = 2; + break; + case "SERIAL_INVALID": + case 3: + message.serialError = 3; + break; + case "SERIAL_EXPIRED": + case 4: + message.serialError = 4; + break; + case "SERIAL_OTHER_PLACE": + case 5: + message.serialError = 5; + break; + } + if (object.eventModeSerial != null) + message.eventModeSerial = String(object.eventModeSerial); + if (object.startAt != null) + message.startAt = object.startAt >>> 0; + if (object.endAt != null) + message.endAt = object.endAt >>> 0; + return message; + }; + + /** + * Creates a plain object from an UpdateEventModeSerialResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {wm.protobuf.UpdateEventModeSerialResponse} message UpdateEventModeSerialResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEventModeSerialResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.eventModeSerial = ""; + object.endAt = 0; + object.serialError = options.enums === String ? "SERIAL_SUCCESS" : 0; + object.startAt = 0; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.eventModeSerial != null && message.hasOwnProperty("eventModeSerial")) + object.eventModeSerial = message.eventModeSerial; + if (message.endAt != null && message.hasOwnProperty("endAt")) + object.endAt = message.endAt; + if (message.serialError != null && message.hasOwnProperty("serialError")) + object.serialError = options.enums === String ? $root.wm.protobuf.EventModeSerialErrorCode[message.serialError] : message.serialError; + if (message.startAt != null && message.hasOwnProperty("startAt")) + object.startAt = message.startAt; + return object; + }; + + /** + * Converts this UpdateEventModeSerialResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @instance + * @returns {Object.} JSON object + */ + UpdateEventModeSerialResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEventModeSerialResponse + * @function getTypeUrl + * @memberof wm.protobuf.UpdateEventModeSerialResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEventModeSerialResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UpdateEventModeSerialResponse"; + }; + + return UpdateEventModeSerialResponse; + })(); + + protobuf.ParticipateInInviteFriendCampaignRequest = (function() { + + /** + * Properties of a ParticipateInInviteFriendCampaignRequest. + * @memberof wm.protobuf + * @interface IParticipateInInviteFriendCampaignRequest + * @property {number} invitingUserId ParticipateInInviteFriendCampaignRequest invitingUserId + * @property {number} invitedUserId ParticipateInInviteFriendCampaignRequest invitedUserId + * @property {number} sourceCarId ParticipateInInviteFriendCampaignRequest sourceCarId + * @property {boolean} transmission ParticipateInInviteFriendCampaignRequest transmission + */ + + /** + * Constructs a new ParticipateInInviteFriendCampaignRequest. + * @memberof wm.protobuf + * @classdesc Represents a ParticipateInInviteFriendCampaignRequest. + * @implements IParticipateInInviteFriendCampaignRequest + * @constructor + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest=} [properties] Properties to set + */ + function ParticipateInInviteFriendCampaignRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParticipateInInviteFriendCampaignRequest invitingUserId. + * @member {number} invitingUserId + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.invitingUserId = 0; + + /** + * ParticipateInInviteFriendCampaignRequest invitedUserId. + * @member {number} invitedUserId + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.invitedUserId = 0; + + /** + * ParticipateInInviteFriendCampaignRequest sourceCarId. + * @member {number} sourceCarId + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.sourceCarId = 0; + + /** + * ParticipateInInviteFriendCampaignRequest transmission. + * @member {boolean} transmission + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + */ + ParticipateInInviteFriendCampaignRequest.prototype.transmission = false; + + /** + * Creates a new ParticipateInInviteFriendCampaignRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest=} [properties] Properties to set + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest instance + */ + ParticipateInInviteFriendCampaignRequest.create = function create(properties) { + return new ParticipateInInviteFriendCampaignRequest(properties); + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest} message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.invitingUserId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.invitedUserId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.sourceCarId); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.transmission); + return writer; + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignRequest message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignRequest} message ParticipateInInviteFriendCampaignRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.invitingUserId = reader.uint32(); + break; + } + case 2: { + message.invitedUserId = reader.uint32(); + break; + } + case 3: { + message.sourceCarId = reader.uint32(); + break; + } + case 4: { + message.transmission = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("invitingUserId")) + throw $util.ProtocolError("missing required 'invitingUserId'", { instance: message }); + if (!message.hasOwnProperty("invitedUserId")) + throw $util.ProtocolError("missing required 'invitedUserId'", { instance: message }); + if (!message.hasOwnProperty("sourceCarId")) + throw $util.ProtocolError("missing required 'sourceCarId'", { instance: message }); + if (!message.hasOwnProperty("transmission")) + throw $util.ProtocolError("missing required 'transmission'", { instance: message }); + return message; + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParticipateInInviteFriendCampaignRequest message. + * @function verify + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParticipateInInviteFriendCampaignRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.invitingUserId)) + return "invitingUserId: integer expected"; + if (!$util.isInteger(message.invitedUserId)) + return "invitedUserId: integer expected"; + if (!$util.isInteger(message.sourceCarId)) + return "sourceCarId: integer expected"; + if (typeof message.transmission !== "boolean") + return "transmission: boolean expected"; + return null; + }; + + /** + * Creates a ParticipateInInviteFriendCampaignRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignRequest} ParticipateInInviteFriendCampaignRequest + */ + ParticipateInInviteFriendCampaignRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ParticipateInInviteFriendCampaignRequest) + return object; + let message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignRequest(); + if (object.invitingUserId != null) + message.invitingUserId = object.invitingUserId >>> 0; + if (object.invitedUserId != null) + message.invitedUserId = object.invitedUserId >>> 0; + if (object.sourceCarId != null) + message.sourceCarId = object.sourceCarId >>> 0; + if (object.transmission != null) + message.transmission = Boolean(object.transmission); + return message; + }; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {wm.protobuf.ParticipateInInviteFriendCampaignRequest} message ParticipateInInviteFriendCampaignRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParticipateInInviteFriendCampaignRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.invitingUserId = 0; + object.invitedUserId = 0; + object.sourceCarId = 0; + object.transmission = false; + } + if (message.invitingUserId != null && message.hasOwnProperty("invitingUserId")) + object.invitingUserId = message.invitingUserId; + if (message.invitedUserId != null && message.hasOwnProperty("invitedUserId")) + object.invitedUserId = message.invitedUserId; + if (message.sourceCarId != null && message.hasOwnProperty("sourceCarId")) + object.sourceCarId = message.sourceCarId; + if (message.transmission != null && message.hasOwnProperty("transmission")) + object.transmission = message.transmission; + return object; + }; + + /** + * Converts this ParticipateInInviteFriendCampaignRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @instance + * @returns {Object.} JSON object + */ + ParticipateInInviteFriendCampaignRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignRequest + * @function getTypeUrl + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParticipateInInviteFriendCampaignRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ParticipateInInviteFriendCampaignRequest"; + }; + + return ParticipateInInviteFriendCampaignRequest; + })(); + + protobuf.ParticipateInInviteFriendCampaignResponse = (function() { + + /** + * Properties of a ParticipateInInviteFriendCampaignResponse. + * @memberof wm.protobuf + * @interface IParticipateInInviteFriendCampaignResponse + * @property {wm.protobuf.ErrorCode} error ParticipateInInviteFriendCampaignResponse error + */ + + /** + * Constructs a new ParticipateInInviteFriendCampaignResponse. + * @memberof wm.protobuf + * @classdesc Represents a ParticipateInInviteFriendCampaignResponse. + * @implements IParticipateInInviteFriendCampaignResponse + * @constructor + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse=} [properties] Properties to set + */ + function ParticipateInInviteFriendCampaignResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParticipateInInviteFriendCampaignResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @instance + */ + ParticipateInInviteFriendCampaignResponse.prototype.error = 0; + + /** + * Creates a new ParticipateInInviteFriendCampaignResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse=} [properties] Properties to set + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse instance + */ + ParticipateInInviteFriendCampaignResponse.create = function create(properties) { + return new ParticipateInInviteFriendCampaignResponse(properties); + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse} message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified ParticipateInInviteFriendCampaignResponse message, length delimited. Does not implicitly {@link wm.protobuf.ParticipateInInviteFriendCampaignResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.IParticipateInInviteFriendCampaignResponse} message ParticipateInInviteFriendCampaignResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParticipateInInviteFriendCampaignResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a ParticipateInInviteFriendCampaignResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParticipateInInviteFriendCampaignResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParticipateInInviteFriendCampaignResponse message. + * @function verify + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParticipateInInviteFriendCampaignResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a ParticipateInInviteFriendCampaignResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ParticipateInInviteFriendCampaignResponse} ParticipateInInviteFriendCampaignResponse + */ + ParticipateInInviteFriendCampaignResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ParticipateInInviteFriendCampaignResponse) + return object; + let message = new $root.wm.protobuf.ParticipateInInviteFriendCampaignResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a ParticipateInInviteFriendCampaignResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {wm.protobuf.ParticipateInInviteFriendCampaignResponse} message ParticipateInInviteFriendCampaignResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParticipateInInviteFriendCampaignResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this ParticipateInInviteFriendCampaignResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @instance + * @returns {Object.} JSON object + */ + ParticipateInInviteFriendCampaignResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParticipateInInviteFriendCampaignResponse + * @function getTypeUrl + * @memberof wm.protobuf.ParticipateInInviteFriendCampaignResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParticipateInInviteFriendCampaignResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ParticipateInInviteFriendCampaignResponse"; + }; + + return ParticipateInInviteFriendCampaignResponse; + })(); + + protobuf.ConsumeUserItemRequest = (function() { + + /** + * Properties of a ConsumeUserItemRequest. + * @memberof wm.protobuf + * @interface IConsumeUserItemRequest + * @property {number} userId ConsumeUserItemRequest userId + * @property {number} carId ConsumeUserItemRequest carId + * @property {number} userItemId ConsumeUserItemRequest userItemId + */ + + /** + * Constructs a new ConsumeUserItemRequest. + * @memberof wm.protobuf + * @classdesc Represents a ConsumeUserItemRequest. + * @implements IConsumeUserItemRequest + * @constructor + * @param {wm.protobuf.IConsumeUserItemRequest=} [properties] Properties to set + */ + function ConsumeUserItemRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsumeUserItemRequest userId. + * @member {number} userId + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + */ + ConsumeUserItemRequest.prototype.userId = 0; + + /** + * ConsumeUserItemRequest carId. + * @member {number} carId + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + */ + ConsumeUserItemRequest.prototype.carId = 0; + + /** + * ConsumeUserItemRequest userItemId. + * @member {number} userItemId + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + */ + ConsumeUserItemRequest.prototype.userItemId = 0; + + /** + * Creates a new ConsumeUserItemRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.IConsumeUserItemRequest=} [properties] Properties to set + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest instance + */ + ConsumeUserItemRequest.create = function create(properties) { + return new ConsumeUserItemRequest(properties); + }; + + /** + * Encodes the specified ConsumeUserItemRequest message. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.IConsumeUserItemRequest} message ConsumeUserItemRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.userId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.carId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.userItemId); + return writer; + }; + + /** + * Encodes the specified ConsumeUserItemRequest message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.IConsumeUserItemRequest} message ConsumeUserItemRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ConsumeUserItemRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.uint32(); + break; + } + case 2: { + message.carId = reader.uint32(); + break; + } + case 3: { + message.userItemId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("userId")) + throw $util.ProtocolError("missing required 'userId'", { instance: message }); + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("userItemId")) + throw $util.ProtocolError("missing required 'userItemId'", { instance: message }); + return message; + }; + + /** + * Decodes a ConsumeUserItemRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsumeUserItemRequest message. + * @function verify + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsumeUserItemRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.userItemId)) + return "userItemId: integer expected"; + return null; + }; + + /** + * Creates a ConsumeUserItemRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ConsumeUserItemRequest} ConsumeUserItemRequest + */ + ConsumeUserItemRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ConsumeUserItemRequest) + return object; + let message = new $root.wm.protobuf.ConsumeUserItemRequest(); + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.userItemId != null) + message.userItemId = object.userItemId >>> 0; + return message; + }; + + /** + * Creates a plain object from a ConsumeUserItemRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {wm.protobuf.ConsumeUserItemRequest} message ConsumeUserItemRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsumeUserItemRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.userId = 0; + object.carId = 0; + object.userItemId = 0; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + object.userItemId = message.userItemId; + return object; + }; + + /** + * Converts this ConsumeUserItemRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.ConsumeUserItemRequest + * @instance + * @returns {Object.} JSON object + */ + ConsumeUserItemRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConsumeUserItemRequest + * @function getTypeUrl + * @memberof wm.protobuf.ConsumeUserItemRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConsumeUserItemRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ConsumeUserItemRequest"; + }; + + return ConsumeUserItemRequest; + })(); + + protobuf.ConsumeUserItemResponse = (function() { + + /** + * Properties of a ConsumeUserItemResponse. + * @memberof wm.protobuf + * @interface IConsumeUserItemResponse + * @property {wm.protobuf.ErrorCode} error ConsumeUserItemResponse error + */ + + /** + * Constructs a new ConsumeUserItemResponse. + * @memberof wm.protobuf + * @classdesc Represents a ConsumeUserItemResponse. + * @implements IConsumeUserItemResponse + * @constructor + * @param {wm.protobuf.IConsumeUserItemResponse=} [properties] Properties to set + */ + function ConsumeUserItemResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsumeUserItemResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.ConsumeUserItemResponse + * @instance + */ + ConsumeUserItemResponse.prototype.error = 0; + + /** + * Creates a new ConsumeUserItemResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.IConsumeUserItemResponse=} [properties] Properties to set + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse instance + */ + ConsumeUserItemResponse.create = function create(properties) { + return new ConsumeUserItemResponse(properties); + }; + + /** + * Encodes the specified ConsumeUserItemResponse message. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.IConsumeUserItemResponse} message ConsumeUserItemResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + return writer; + }; + + /** + * Encodes the specified ConsumeUserItemResponse message, length delimited. Does not implicitly {@link wm.protobuf.ConsumeUserItemResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.IConsumeUserItemResponse} message ConsumeUserItemResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumeUserItemResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ConsumeUserItemResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a ConsumeUserItemResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumeUserItemResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsumeUserItemResponse message. + * @function verify + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsumeUserItemResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a ConsumeUserItemResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ConsumeUserItemResponse} ConsumeUserItemResponse + */ + ConsumeUserItemResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ConsumeUserItemResponse) + return object; + let message = new $root.wm.protobuf.ConsumeUserItemResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a ConsumeUserItemResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {wm.protobuf.ConsumeUserItemResponse} message ConsumeUserItemResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsumeUserItemResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + return object; + }; + + /** + * Converts this ConsumeUserItemResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.ConsumeUserItemResponse + * @instance + * @returns {Object.} JSON object + */ + ConsumeUserItemResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConsumeUserItemResponse + * @function getTypeUrl + * @memberof wm.protobuf.ConsumeUserItemResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConsumeUserItemResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ConsumeUserItemResponse"; + }; + + return ConsumeUserItemResponse; + })(); + + protobuf.SearchCarsByLevelRequest = (function() { + + /** + * Properties of a SearchCarsByLevelRequest. + * @memberof wm.protobuf + * @interface ISearchCarsByLevelRequest + * @property {number} carId SearchCarsByLevelRequest carId + * @property {number} ghostLevel SearchCarsByLevelRequest ghostLevel + * @property {number} area SearchCarsByLevelRequest area + * @property {number|null} [regionId] SearchCarsByLevelRequest regionId + */ + + /** + * Constructs a new SearchCarsByLevelRequest. + * @memberof wm.protobuf + * @classdesc Represents a SearchCarsByLevelRequest. + * @implements ISearchCarsByLevelRequest + * @constructor + * @param {wm.protobuf.ISearchCarsByLevelRequest=} [properties] Properties to set + */ + function SearchCarsByLevelRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchCarsByLevelRequest carId. + * @member {number} carId + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.carId = 0; + + /** + * SearchCarsByLevelRequest ghostLevel. + * @member {number} ghostLevel + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.ghostLevel = 0; + + /** + * SearchCarsByLevelRequest area. + * @member {number} area + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.area = 0; + + /** + * SearchCarsByLevelRequest regionId. + * @member {number} regionId + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + */ + SearchCarsByLevelRequest.prototype.regionId = 0; + + /** + * Creates a new SearchCarsByLevelRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.ISearchCarsByLevelRequest=} [properties] Properties to set + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest instance + */ + SearchCarsByLevelRequest.create = function create(properties) { + return new SearchCarsByLevelRequest(properties); + }; + + /** + * Encodes the specified SearchCarsByLevelRequest message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.ISearchCarsByLevelRequest} message SearchCarsByLevelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ghostLevel); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.area); + if (message.regionId != null && Object.hasOwnProperty.call(message, "regionId")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.regionId); + return writer; + }; + + /** + * Encodes the specified SearchCarsByLevelRequest message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.ISearchCarsByLevelRequest} message SearchCarsByLevelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SearchCarsByLevelRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.ghostLevel = reader.uint32(); + break; + } + case 3: { + message.area = reader.uint32(); + break; + } + case 4: { + message.regionId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("ghostLevel")) + throw $util.ProtocolError("missing required 'ghostLevel'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes a SearchCarsByLevelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchCarsByLevelRequest message. + * @function verify + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchCarsByLevelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.ghostLevel)) + return "ghostLevel: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (message.regionId != null && message.hasOwnProperty("regionId")) + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + return null; + }; + + /** + * Creates a SearchCarsByLevelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SearchCarsByLevelRequest} SearchCarsByLevelRequest + */ + SearchCarsByLevelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SearchCarsByLevelRequest) + return object; + let message = new $root.wm.protobuf.SearchCarsByLevelRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.ghostLevel != null) + message.ghostLevel = object.ghostLevel >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + return message; + }; + + /** + * Creates a plain object from a SearchCarsByLevelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {wm.protobuf.SearchCarsByLevelRequest} message SearchCarsByLevelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchCarsByLevelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.ghostLevel = 0; + object.area = 0; + object.regionId = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.ghostLevel != null && message.hasOwnProperty("ghostLevel")) + object.ghostLevel = message.ghostLevel; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + return object; + }; + + /** + * Converts this SearchCarsByLevelRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @instance + * @returns {Object.} JSON object + */ + SearchCarsByLevelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchCarsByLevelRequest + * @function getTypeUrl + * @memberof wm.protobuf.SearchCarsByLevelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchCarsByLevelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SearchCarsByLevelRequest"; + }; + + return SearchCarsByLevelRequest; + })(); + + protobuf.SearchCarsByLevelResponse = (function() { + + /** + * Properties of a SearchCarsByLevelResponse. + * @memberof wm.protobuf + * @interface ISearchCarsByLevelResponse + * @property {wm.protobuf.ErrorCode} error SearchCarsByLevelResponse error + * @property {number} ramp SearchCarsByLevelResponse ramp + * @property {number} path SearchCarsByLevelResponse path + * @property {Array.|null} [ghosts] SearchCarsByLevelResponse ghosts + * @property {wm.protobuf.PathSelectionMethod} selectionMethod SearchCarsByLevelResponse selectionMethod + * @property {Array.|null} [rates] SearchCarsByLevelResponse rates + */ + + /** + * Constructs a new SearchCarsByLevelResponse. + * @memberof wm.protobuf + * @classdesc Represents a SearchCarsByLevelResponse. + * @implements ISearchCarsByLevelResponse + * @constructor + * @param {wm.protobuf.ISearchCarsByLevelResponse=} [properties] Properties to set + */ + function SearchCarsByLevelResponse(properties) { + this.ghosts = []; + this.rates = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchCarsByLevelResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.error = 0; + + /** + * SearchCarsByLevelResponse ramp. + * @member {number} ramp + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.ramp = 0; + + /** + * SearchCarsByLevelResponse path. + * @member {number} path + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.path = 0; + + /** + * SearchCarsByLevelResponse ghosts. + * @member {Array.} ghosts + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.ghosts = $util.emptyArray; + + /** + * SearchCarsByLevelResponse selectionMethod. + * @member {wm.protobuf.PathSelectionMethod} selectionMethod + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.selectionMethod = 1; + + /** + * SearchCarsByLevelResponse rates. + * @member {Array.} rates + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + */ + SearchCarsByLevelResponse.prototype.rates = $util.emptyArray; + + /** + * Creates a new SearchCarsByLevelResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.ISearchCarsByLevelResponse=} [properties] Properties to set + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse instance + */ + SearchCarsByLevelResponse.create = function create(properties) { + return new SearchCarsByLevelResponse(properties); + }; + + /** + * Encodes the specified SearchCarsByLevelResponse message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.ISearchCarsByLevelResponse} message SearchCarsByLevelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ramp); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.path); + if (message.ghosts != null && message.ghosts.length) + for (let i = 0; i < message.ghosts.length; ++i) + $root.wm.protobuf.GhostCar.encode(message.ghosts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.selectionMethod); + if (message.rates != null && message.rates.length) + for (let i = 0; i < message.rates.length; ++i) + $root.wm.protobuf.SearchCarsByLevelResponse.Rate.encode(message.rates[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchCarsByLevelResponse message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.ISearchCarsByLevelResponse} message SearchCarsByLevelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCarsByLevelResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SearchCarsByLevelResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + message.ramp = reader.uint32(); + break; + } + case 3: { + message.path = reader.uint32(); + break; + } + case 4: { + if (!(message.ghosts && message.ghosts.length)) + message.ghosts = []; + message.ghosts.push($root.wm.protobuf.GhostCar.decode(reader, reader.uint32())); + break; + } + case 5: { + message.selectionMethod = reader.int32(); + break; + } + case 6: { + if (!(message.rates && message.rates.length)) + message.rates = []; + message.rates.push($root.wm.protobuf.SearchCarsByLevelResponse.Rate.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + if (!message.hasOwnProperty("ramp")) + throw $util.ProtocolError("missing required 'ramp'", { instance: message }); + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("selectionMethod")) + throw $util.ProtocolError("missing required 'selectionMethod'", { instance: message }); + return message; + }; + + /** + * Decodes a SearchCarsByLevelResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCarsByLevelResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchCarsByLevelResponse message. + * @function verify + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchCarsByLevelResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.ghosts != null && message.hasOwnProperty("ghosts")) { + if (!Array.isArray(message.ghosts)) + return "ghosts: array expected"; + for (let i = 0; i < message.ghosts.length; ++i) { + let error = $root.wm.protobuf.GhostCar.verify(message.ghosts[i]); + if (error) + return "ghosts." + error; + } + } + switch (message.selectionMethod) { + default: + return "selectionMethod: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.rates != null && message.hasOwnProperty("rates")) { + if (!Array.isArray(message.rates)) + return "rates: array expected"; + for (let i = 0; i < message.rates.length; ++i) { + let error = $root.wm.protobuf.SearchCarsByLevelResponse.Rate.verify(message.rates[i]); + if (error) + return "rates." + error; + } + } + return null; + }; + + /** + * Creates a SearchCarsByLevelResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SearchCarsByLevelResponse} SearchCarsByLevelResponse + */ + SearchCarsByLevelResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SearchCarsByLevelResponse) + return object; + let message = new $root.wm.protobuf.SearchCarsByLevelResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.ghosts) { + if (!Array.isArray(object.ghosts)) + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.ghosts: array expected"); + message.ghosts = []; + for (let i = 0; i < object.ghosts.length; ++i) { + if (typeof object.ghosts[i] !== "object") + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.ghosts: object expected"); + message.ghosts[i] = $root.wm.protobuf.GhostCar.fromObject(object.ghosts[i]); + } + } + switch (object.selectionMethod) { + case "PATH_NEW": + case 1: + message.selectionMethod = 1; + break; + case "PATH_PLAIN": + case 2: + message.selectionMethod = 2; + break; + case "PATH_FRIEND": + case 3: + message.selectionMethod = 3; + break; + case "PATH_NORMAL": + case 4: + message.selectionMethod = 4; + break; + case "PATH_CHALLENGER": + case 5: + message.selectionMethod = 5; + break; + } + if (object.rates) { + if (!Array.isArray(object.rates)) + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.rates: array expected"); + message.rates = []; + for (let i = 0; i < object.rates.length; ++i) { + if (typeof object.rates[i] !== "object") + throw TypeError(".wm.protobuf.SearchCarsByLevelResponse.rates: object expected"); + message.rates[i] = $root.wm.protobuf.SearchCarsByLevelResponse.Rate.fromObject(object.rates[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SearchCarsByLevelResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse} message SearchCarsByLevelResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchCarsByLevelResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.ghosts = []; + object.rates = []; + } + if (options.defaults) { + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + object.ramp = 0; + object.path = 0; + object.selectionMethod = options.enums === String ? "PATH_NEW" : 1; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.ghosts && message.ghosts.length) { + object.ghosts = []; + for (let j = 0; j < message.ghosts.length; ++j) + object.ghosts[j] = $root.wm.protobuf.GhostCar.toObject(message.ghosts[j], options); + } + if (message.selectionMethod != null && message.hasOwnProperty("selectionMethod")) + object.selectionMethod = options.enums === String ? $root.wm.protobuf.PathSelectionMethod[message.selectionMethod] : message.selectionMethod; + if (message.rates && message.rates.length) { + object.rates = []; + for (let j = 0; j < message.rates.length; ++j) + object.rates[j] = $root.wm.protobuf.SearchCarsByLevelResponse.Rate.toObject(message.rates[j], options); + } + return object; + }; + + /** + * Converts this SearchCarsByLevelResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @instance + * @returns {Object.} JSON object + */ + SearchCarsByLevelResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchCarsByLevelResponse + * @function getTypeUrl + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchCarsByLevelResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SearchCarsByLevelResponse"; + }; + + SearchCarsByLevelResponse.Rate = (function() { + + /** + * Properties of a Rate. + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @interface IRate + * @property {number} carId Rate carId + * @property {wm.protobuf.GhostRateType} type Rate type + * @property {number|null} [rate] Rate rate + */ + + /** + * Constructs a new Rate. + * @memberof wm.protobuf.SearchCarsByLevelResponse + * @classdesc Represents a Rate. + * @implements IRate + * @constructor + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate=} [properties] Properties to set + */ + function Rate(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Rate carId. + * @member {number} carId + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + */ + Rate.prototype.carId = 0; + + /** + * Rate type. + * @member {wm.protobuf.GhostRateType} type + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + */ + Rate.prototype.type = 1; + + /** + * Rate rate. + * @member {number} rate + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + */ + Rate.prototype.rate = 0; + + /** + * Creates a new Rate instance using the specified properties. + * @function create + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate=} [properties] Properties to set + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate instance + */ + Rate.create = function create(properties) { + return new Rate(properties); + }; + + /** + * Encodes the specified Rate message. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate} message Rate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.rate != null && Object.hasOwnProperty.call(message, "rate")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rate); + return writer; + }; + + /** + * Encodes the specified Rate message, length delimited. Does not implicitly {@link wm.protobuf.SearchCarsByLevelResponse.Rate.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.IRate} message Rate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Rate message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SearchCarsByLevelResponse.Rate(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.rate = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("type")) + throw $util.ProtocolError("missing required 'type'", { instance: message }); + return message; + }; + + /** + * Decodes a Rate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Rate message. + * @function verify + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.rate != null && message.hasOwnProperty("rate")) + if (!$util.isInteger(message.rate)) + return "rate: integer expected"; + return null; + }; + + /** + * Creates a Rate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SearchCarsByLevelResponse.Rate} Rate + */ + Rate.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SearchCarsByLevelResponse.Rate) + return object; + let message = new $root.wm.protobuf.SearchCarsByLevelResponse.Rate(); + if (object.carId != null) + message.carId = object.carId >>> 0; + switch (object.type) { + case "GHOST_RATE_UNKNOWN": + case 1: + message.type = 1; + break; + case "GHOST_RATE_INVALID": + case 2: + message.type = 2; + break; + case "GHOST_RATE_VALID": + case 3: + message.type = 3; + break; + } + if (object.rate != null) + message.rate = object.rate >>> 0; + return message; + }; + + /** + * Creates a plain object from a Rate message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {wm.protobuf.SearchCarsByLevelResponse.Rate} message Rate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rate.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.type = options.enums === String ? "GHOST_RATE_UNKNOWN" : 1; + object.rate = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.wm.protobuf.GhostRateType[message.type] : message.type; + if (message.rate != null && message.hasOwnProperty("rate")) + object.rate = message.rate; + return object; + }; + + /** + * Converts this Rate to JSON. + * @function toJSON + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @instance + * @returns {Object.} JSON object + */ + Rate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Rate + * @function getTypeUrl + * @memberof wm.protobuf.SearchCarsByLevelResponse.Rate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Rate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SearchCarsByLevelResponse.Rate"; + }; + + return Rate; + })(); + + return SearchCarsByLevelResponse; + })(); + + protobuf.LoadPathsAndTuningsRequest = (function() { + + /** + * Properties of a LoadPathsAndTuningsRequest. + * @memberof wm.protobuf + * @interface ILoadPathsAndTuningsRequest + * @property {number} carId LoadPathsAndTuningsRequest carId + * @property {Array.|null} [selectedCars] LoadPathsAndTuningsRequest selectedCars + * @property {boolean|null} [returnImmediately] LoadPathsAndTuningsRequest returnImmediately + * @property {number|null} [stampTargetArea] LoadPathsAndTuningsRequest stampTargetArea + */ + + /** + * Constructs a new LoadPathsAndTuningsRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadPathsAndTuningsRequest. + * @implements ILoadPathsAndTuningsRequest + * @constructor + * @param {wm.protobuf.ILoadPathsAndTuningsRequest=} [properties] Properties to set + */ + function LoadPathsAndTuningsRequest(properties) { + this.selectedCars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadPathsAndTuningsRequest carId. + * @member {number} carId + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.carId = 0; + + /** + * LoadPathsAndTuningsRequest selectedCars. + * @member {Array.} selectedCars + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.selectedCars = $util.emptyArray; + + /** + * LoadPathsAndTuningsRequest returnImmediately. + * @member {boolean} returnImmediately + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.returnImmediately = false; + + /** + * LoadPathsAndTuningsRequest stampTargetArea. + * @member {number} stampTargetArea + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + */ + LoadPathsAndTuningsRequest.prototype.stampTargetArea = 0; + + /** + * Creates a new LoadPathsAndTuningsRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest instance + */ + LoadPathsAndTuningsRequest.create = function create(properties) { + return new LoadPathsAndTuningsRequest(properties); + }; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsRequest} message LoadPathsAndTuningsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.selectedCars != null && message.selectedCars.length) + for (let i = 0; i < message.selectedCars.length; ++i) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.selectedCars[i]); + if (message.returnImmediately != null && Object.hasOwnProperty.call(message, "returnImmediately")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.returnImmediately); + if (message.stampTargetArea != null && Object.hasOwnProperty.call(message, "stampTargetArea")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stampTargetArea); + return writer; + }; + + /** + * Encodes the specified LoadPathsAndTuningsRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsRequest} message LoadPathsAndTuningsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadPathsAndTuningsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + if (!(message.selectedCars && message.selectedCars.length)) + message.selectedCars = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.selectedCars.push(reader.uint32()); + } else + message.selectedCars.push(reader.uint32()); + break; + } + case 3: { + message.returnImmediately = reader.bool(); + break; + } + case 4: { + message.stampTargetArea = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadPathsAndTuningsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadPathsAndTuningsRequest message. + * @function verify + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadPathsAndTuningsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.selectedCars != null && message.hasOwnProperty("selectedCars")) { + if (!Array.isArray(message.selectedCars)) + return "selectedCars: array expected"; + for (let i = 0; i < message.selectedCars.length; ++i) + if (!$util.isInteger(message.selectedCars[i])) + return "selectedCars: integer[] expected"; + } + if (message.returnImmediately != null && message.hasOwnProperty("returnImmediately")) + if (typeof message.returnImmediately !== "boolean") + return "returnImmediately: boolean expected"; + if (message.stampTargetArea != null && message.hasOwnProperty("stampTargetArea")) + if (!$util.isInteger(message.stampTargetArea)) + return "stampTargetArea: integer expected"; + return null; + }; + + /** + * Creates a LoadPathsAndTuningsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadPathsAndTuningsRequest} LoadPathsAndTuningsRequest + */ + LoadPathsAndTuningsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadPathsAndTuningsRequest) + return object; + let message = new $root.wm.protobuf.LoadPathsAndTuningsRequest(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.selectedCars) { + if (!Array.isArray(object.selectedCars)) + throw TypeError(".wm.protobuf.LoadPathsAndTuningsRequest.selectedCars: array expected"); + message.selectedCars = []; + for (let i = 0; i < object.selectedCars.length; ++i) + message.selectedCars[i] = object.selectedCars[i] >>> 0; + } + if (object.returnImmediately != null) + message.returnImmediately = Boolean(object.returnImmediately); + if (object.stampTargetArea != null) + message.stampTargetArea = object.stampTargetArea >>> 0; + return message; + }; + + /** + * Creates a plain object from a LoadPathsAndTuningsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {wm.protobuf.LoadPathsAndTuningsRequest} message LoadPathsAndTuningsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadPathsAndTuningsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.selectedCars = []; + if (options.defaults) { + object.carId = 0; + object.returnImmediately = false; + object.stampTargetArea = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.selectedCars && message.selectedCars.length) { + object.selectedCars = []; + for (let j = 0; j < message.selectedCars.length; ++j) + object.selectedCars[j] = message.selectedCars[j]; + } + if (message.returnImmediately != null && message.hasOwnProperty("returnImmediately")) + object.returnImmediately = message.returnImmediately; + if (message.stampTargetArea != null && message.hasOwnProperty("stampTargetArea")) + object.stampTargetArea = message.stampTargetArea; + return object; + }; + + /** + * Converts this LoadPathsAndTuningsRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @instance + * @returns {Object.} JSON object + */ + LoadPathsAndTuningsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadPathsAndTuningsRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadPathsAndTuningsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadPathsAndTuningsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadPathsAndTuningsRequest"; + }; + + return LoadPathsAndTuningsRequest; + })(); + + protobuf.LoadPathsAndTuningsResponse = (function() { + + /** + * Properties of a LoadPathsAndTuningsResponse. + * @memberof wm.protobuf + * @interface ILoadPathsAndTuningsResponse + * @property {wm.protobuf.ErrorCode} error LoadPathsAndTuningsResponse error + * @property {Array.|null} [data] LoadPathsAndTuningsResponse data + */ + + /** + * Constructs a new LoadPathsAndTuningsResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadPathsAndTuningsResponse. + * @implements ILoadPathsAndTuningsResponse + * @constructor + * @param {wm.protobuf.ILoadPathsAndTuningsResponse=} [properties] Properties to set + */ + function LoadPathsAndTuningsResponse(properties) { + this.data = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadPathsAndTuningsResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @instance + */ + LoadPathsAndTuningsResponse.prototype.error = 0; + + /** + * LoadPathsAndTuningsResponse data. + * @member {Array.} data + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @instance + */ + LoadPathsAndTuningsResponse.prototype.data = $util.emptyArray; + + /** + * Creates a new LoadPathsAndTuningsResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse instance + */ + LoadPathsAndTuningsResponse.create = function create(properties) { + return new LoadPathsAndTuningsResponse(properties); + }; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsResponse} message LoadPathsAndTuningsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.data != null && message.data.length) + for (let i = 0; i < message.data.length; ++i) + $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.encode(message.data[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadPathsAndTuningsResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.ILoadPathsAndTuningsResponse} message LoadPathsAndTuningsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadPathsAndTuningsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadPathsAndTuningsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.data && message.data.length)) + message.data = []; + message.data.push($root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadPathsAndTuningsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadPathsAndTuningsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadPathsAndTuningsResponse message. + * @function verify + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadPathsAndTuningsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.data != null && message.hasOwnProperty("data")) { + if (!Array.isArray(message.data)) + return "data: array expected"; + for (let i = 0; i < message.data.length; ++i) { + let error = $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify(message.data[i]); + if (error) + return "data." + error; + } + } + return null; + }; + + /** + * Creates a LoadPathsAndTuningsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadPathsAndTuningsResponse} LoadPathsAndTuningsResponse + */ + LoadPathsAndTuningsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadPathsAndTuningsResponse) + return object; + let message = new $root.wm.protobuf.LoadPathsAndTuningsResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.data) { + if (!Array.isArray(object.data)) + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.data: array expected"); + message.data = []; + for (let i = 0; i < object.data.length; ++i) { + if (typeof object.data[i] !== "object") + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.data: object expected"); + message.data[i] = $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.fromObject(object.data[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadPathsAndTuningsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse} message LoadPathsAndTuningsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadPathsAndTuningsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.data = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.data && message.data.length) { + object.data = []; + for (let j = 0; j < message.data.length; ++j) + object.data[j] = $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.toObject(message.data[j], options); + } + return object; + }; + + /** + * Converts this LoadPathsAndTuningsResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @instance + * @returns {Object.} JSON object + */ + LoadPathsAndTuningsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadPathsAndTuningsResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadPathsAndTuningsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadPathsAndTuningsResponse"; + }; + + LoadPathsAndTuningsResponse.CarTuningsByPath = (function() { + + /** + * Properties of a CarTuningsByPath. + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @interface ICarTuningsByPath + * @property {number} area CarTuningsByPath area + * @property {number} ramp CarTuningsByPath ramp + * @property {number} path CarTuningsByPath path + * @property {Array.|null} [carTunings] CarTuningsByPath carTunings + * @property {wm.protobuf.PathSelectionMethod} selectionMethod CarTuningsByPath selectionMethod + */ + + /** + * Constructs a new CarTuningsByPath. + * @memberof wm.protobuf.LoadPathsAndTuningsResponse + * @classdesc Represents a CarTuningsByPath. + * @implements ICarTuningsByPath + * @constructor + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath=} [properties] Properties to set + */ + function CarTuningsByPath(properties) { + this.carTunings = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarTuningsByPath area. + * @member {number} area + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.area = 0; + + /** + * CarTuningsByPath ramp. + * @member {number} ramp + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.ramp = 0; + + /** + * CarTuningsByPath path. + * @member {number} path + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.path = 0; + + /** + * CarTuningsByPath carTunings. + * @member {Array.} carTunings + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.carTunings = $util.emptyArray; + + /** + * CarTuningsByPath selectionMethod. + * @member {wm.protobuf.PathSelectionMethod} selectionMethod + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + */ + CarTuningsByPath.prototype.selectionMethod = 1; + + /** + * Creates a new CarTuningsByPath instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath=} [properties] Properties to set + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath instance + */ + CarTuningsByPath.create = function create(properties) { + return new CarTuningsByPath(properties); + }; + + /** + * Encodes the specified CarTuningsByPath message. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath} message CarTuningsByPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuningsByPath.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.area); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ramp); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.path); + if (message.carTunings != null && message.carTunings.length) + for (let i = 0; i < message.carTunings.length; ++i) + $root.wm.protobuf.CarTuning.encode(message.carTunings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.selectionMethod); + return writer; + }; + + /** + * Encodes the specified CarTuningsByPath message, length delimited. Does not implicitly {@link wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.ICarTuningsByPath} message CarTuningsByPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuningsByPath.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuningsByPath.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.area = reader.uint32(); + break; + } + case 2: { + message.ramp = reader.uint32(); + break; + } + case 3: { + message.path = reader.uint32(); + break; + } + case 4: { + if (!(message.carTunings && message.carTunings.length)) + message.carTunings = []; + message.carTunings.push($root.wm.protobuf.CarTuning.decode(reader, reader.uint32())); + break; + } + case 5: { + message.selectionMethod = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("ramp")) + throw $util.ProtocolError("missing required 'ramp'", { instance: message }); + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("selectionMethod")) + throw $util.ProtocolError("missing required 'selectionMethod'", { instance: message }); + return message; + }; + + /** + * Decodes a CarTuningsByPath message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuningsByPath.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarTuningsByPath message. + * @function verify + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarTuningsByPath.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.carTunings != null && message.hasOwnProperty("carTunings")) { + if (!Array.isArray(message.carTunings)) + return "carTunings: array expected"; + for (let i = 0; i < message.carTunings.length; ++i) { + let error = $root.wm.protobuf.CarTuning.verify(message.carTunings[i]); + if (error) + return "carTunings." + error; + } + } + switch (message.selectionMethod) { + default: + return "selectionMethod: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a CarTuningsByPath message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} CarTuningsByPath + */ + CarTuningsByPath.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath) + return object; + let message = new $root.wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath(); + if (object.area != null) + message.area = object.area >>> 0; + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.carTunings) { + if (!Array.isArray(object.carTunings)) + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.carTunings: array expected"); + message.carTunings = []; + for (let i = 0; i < object.carTunings.length; ++i) { + if (typeof object.carTunings[i] !== "object") + throw TypeError(".wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath.carTunings: object expected"); + message.carTunings[i] = $root.wm.protobuf.CarTuning.fromObject(object.carTunings[i]); + } + } + switch (object.selectionMethod) { + case "PATH_NEW": + case 1: + message.selectionMethod = 1; + break; + case "PATH_PLAIN": + case 2: + message.selectionMethod = 2; + break; + case "PATH_FRIEND": + case 3: + message.selectionMethod = 3; + break; + case "PATH_NORMAL": + case 4: + message.selectionMethod = 4; + break; + case "PATH_CHALLENGER": + case 5: + message.selectionMethod = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a CarTuningsByPath message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath} message CarTuningsByPath + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarTuningsByPath.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.carTunings = []; + if (options.defaults) { + object.area = 0; + object.ramp = 0; + object.path = 0; + object.selectionMethod = options.enums === String ? "PATH_NEW" : 1; + } + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.carTunings && message.carTunings.length) { + object.carTunings = []; + for (let j = 0; j < message.carTunings.length; ++j) + object.carTunings[j] = $root.wm.protobuf.CarTuning.toObject(message.carTunings[j], options); + } + if (message.selectionMethod != null && message.hasOwnProperty("selectionMethod")) + object.selectionMethod = options.enums === String ? $root.wm.protobuf.PathSelectionMethod[message.selectionMethod] : message.selectionMethod; + return object; + }; + + /** + * Converts this CarTuningsByPath to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @instance + * @returns {Object.} JSON object + */ + CarTuningsByPath.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarTuningsByPath + * @function getTypeUrl + * @memberof wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarTuningsByPath.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadPathsAndTuningsResponse.CarTuningsByPath"; + }; + + return CarTuningsByPath; + })(); + + return LoadPathsAndTuningsResponse; + })(); + + protobuf.LoadGhostDriveDataRequest = (function() { + + /** + * Properties of a LoadGhostDriveDataRequest. + * @memberof wm.protobuf + * @interface ILoadGhostDriveDataRequest + * @property {number} path LoadGhostDriveDataRequest path + * @property {Array.|null} [carTunings] LoadGhostDriveDataRequest carTunings + */ + + /** + * Constructs a new LoadGhostDriveDataRequest. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostDriveDataRequest. + * @implements ILoadGhostDriveDataRequest + * @constructor + * @param {wm.protobuf.ILoadGhostDriveDataRequest=} [properties] Properties to set + */ + function LoadGhostDriveDataRequest(properties) { + this.carTunings = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostDriveDataRequest path. + * @member {number} path + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @instance + */ + LoadGhostDriveDataRequest.prototype.path = 0; + + /** + * LoadGhostDriveDataRequest carTunings. + * @member {Array.} carTunings + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @instance + */ + LoadGhostDriveDataRequest.prototype.carTunings = $util.emptyArray; + + /** + * Creates a new LoadGhostDriveDataRequest instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.ILoadGhostDriveDataRequest=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest instance + */ + LoadGhostDriveDataRequest.create = function create(properties) { + return new LoadGhostDriveDataRequest(properties); + }; + + /** + * Encodes the specified LoadGhostDriveDataRequest message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.ILoadGhostDriveDataRequest} message LoadGhostDriveDataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.path); + if (message.carTunings != null && message.carTunings.length) + for (let i = 0; i < message.carTunings.length; ++i) + $root.wm.protobuf.CarTuning.encode(message.carTunings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostDriveDataRequest message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.ILoadGhostDriveDataRequest} message LoadGhostDriveDataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostDriveDataRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.path = reader.uint32(); + break; + } + case 2: { + if (!(message.carTunings && message.carTunings.length)) + message.carTunings = []; + message.carTunings.push($root.wm.protobuf.CarTuning.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostDriveDataRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostDriveDataRequest message. + * @function verify + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostDriveDataRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.carTunings != null && message.hasOwnProperty("carTunings")) { + if (!Array.isArray(message.carTunings)) + return "carTunings: array expected"; + for (let i = 0; i < message.carTunings.length; ++i) { + let error = $root.wm.protobuf.CarTuning.verify(message.carTunings[i]); + if (error) + return "carTunings." + error; + } + } + return null; + }; + + /** + * Creates a LoadGhostDriveDataRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostDriveDataRequest} LoadGhostDriveDataRequest + */ + LoadGhostDriveDataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostDriveDataRequest) + return object; + let message = new $root.wm.protobuf.LoadGhostDriveDataRequest(); + if (object.path != null) + message.path = object.path >>> 0; + if (object.carTunings) { + if (!Array.isArray(object.carTunings)) + throw TypeError(".wm.protobuf.LoadGhostDriveDataRequest.carTunings: array expected"); + message.carTunings = []; + for (let i = 0; i < object.carTunings.length; ++i) { + if (typeof object.carTunings[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataRequest.carTunings: object expected"); + message.carTunings[i] = $root.wm.protobuf.CarTuning.fromObject(object.carTunings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostDriveDataRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {wm.protobuf.LoadGhostDriveDataRequest} message LoadGhostDriveDataRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostDriveDataRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.carTunings = []; + if (options.defaults) + object.path = 0; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.carTunings && message.carTunings.length) { + object.carTunings = []; + for (let j = 0; j < message.carTunings.length; ++j) + object.carTunings[j] = $root.wm.protobuf.CarTuning.toObject(message.carTunings[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostDriveDataRequest to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @instance + * @returns {Object.} JSON object + */ + LoadGhostDriveDataRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostDriveDataRequest + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostDriveDataRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostDriveDataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostDriveDataRequest"; + }; + + return LoadGhostDriveDataRequest; + })(); + + protobuf.LoadGhostDriveDataResponse = (function() { + + /** + * Properties of a LoadGhostDriveDataResponse. + * @memberof wm.protobuf + * @interface ILoadGhostDriveDataResponse + * @property {wm.protobuf.ErrorCode} error LoadGhostDriveDataResponse error + * @property {Array.|null} [data] LoadGhostDriveDataResponse data + */ + + /** + * Constructs a new LoadGhostDriveDataResponse. + * @memberof wm.protobuf + * @classdesc Represents a LoadGhostDriveDataResponse. + * @implements ILoadGhostDriveDataResponse + * @constructor + * @param {wm.protobuf.ILoadGhostDriveDataResponse=} [properties] Properties to set + */ + function LoadGhostDriveDataResponse(properties) { + this.data = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadGhostDriveDataResponse error. + * @member {wm.protobuf.ErrorCode} error + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @instance + */ + LoadGhostDriveDataResponse.prototype.error = 0; + + /** + * LoadGhostDriveDataResponse data. + * @member {Array.} data + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @instance + */ + LoadGhostDriveDataResponse.prototype.data = $util.emptyArray; + + /** + * Creates a new LoadGhostDriveDataResponse instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.ILoadGhostDriveDataResponse=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse instance + */ + LoadGhostDriveDataResponse.create = function create(properties) { + return new LoadGhostDriveDataResponse(properties); + }; + + /** + * Encodes the specified LoadGhostDriveDataResponse message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.ILoadGhostDriveDataResponse} message LoadGhostDriveDataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.error); + if (message.data != null && message.data.length) + for (let i = 0; i < message.data.length; ++i) + $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.encode(message.data[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoadGhostDriveDataResponse message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.ILoadGhostDriveDataResponse} message LoadGhostDriveDataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadGhostDriveDataResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostDriveDataResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.int32(); + break; + } + case 2: { + if (!(message.data && message.data.length)) + message.data = []; + message.data.push($root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("error")) + throw $util.ProtocolError("missing required 'error'", { instance: message }); + return message; + }; + + /** + * Decodes a LoadGhostDriveDataResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadGhostDriveDataResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadGhostDriveDataResponse message. + * @function verify + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadGhostDriveDataResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.error) { + default: + return "error: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + break; + } + if (message.data != null && message.hasOwnProperty("data")) { + if (!Array.isArray(message.data)) + return "data: array expected"; + for (let i = 0; i < message.data.length; ++i) { + let error = $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify(message.data[i]); + if (error) + return "data." + error; + } + } + return null; + }; + + /** + * Creates a LoadGhostDriveDataResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostDriveDataResponse} LoadGhostDriveDataResponse + */ + LoadGhostDriveDataResponse.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostDriveDataResponse) + return object; + let message = new $root.wm.protobuf.LoadGhostDriveDataResponse(); + switch (object.error) { + case "ERR_SUCCESS": + case 0: + message.error = 0; + break; + case "ERR_REQUEST": + case 1: + message.error = 1; + break; + case "ERR_NOT_FOUND": + case 2: + message.error = 2; + break; + case "ERR_ID_SERVER": + case 3: + message.error = 3; + break; + case "ERR_ID_BANNED": + case 4: + message.error = 4; + break; + case "ERR_USER_LOCKED": + case 5: + message.error = 5; + break; + case "ERR_USER_VERSION": + case 6: + message.error = 6; + break; + case "ERR_NAME_CONFLICTED": + case 7: + message.error = 7; + break; + case "ERR_FORBIDDEN": + case 9: + message.error = 9; + break; + case "ERR_USER_SUCCEEDED": + case 11: + message.error = 11; + break; + case "ERR_BEING_TRANSFERRED": + case 12: + message.error = 12; + break; + case "ERR_SCRATCH_LOCKED": + case 13: + message.error = 13; + break; + } + if (object.data) { + if (!Array.isArray(object.data)) + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.data: array expected"); + message.data = []; + for (let i = 0; i < object.data.length; ++i) { + if (typeof object.data[i] !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.data: object expected"); + message.data[i] = $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.fromObject(object.data[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoadGhostDriveDataResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse} message LoadGhostDriveDataResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadGhostDriveDataResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.data = []; + if (options.defaults) + object.error = options.enums === String ? "ERR_SUCCESS" : 0; + if (message.error != null && message.hasOwnProperty("error")) + object.error = options.enums === String ? $root.wm.protobuf.ErrorCode[message.error] : message.error; + if (message.data && message.data.length) { + object.data = []; + for (let j = 0; j < message.data.length; ++j) + object.data[j] = $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.toObject(message.data[j], options); + } + return object; + }; + + /** + * Converts this LoadGhostDriveDataResponse to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @instance + * @returns {Object.} JSON object + */ + LoadGhostDriveDataResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadGhostDriveDataResponse + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadGhostDriveDataResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostDriveDataResponse"; + }; + + LoadGhostDriveDataResponse.GhostDriveData = (function() { + + /** + * Properties of a GhostDriveData. + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @interface IGhostDriveData + * @property {number} carId GhostDriveData carId + * @property {wm.protobuf.GhostType} type GhostDriveData type + * @property {wm.protobuf.IBinaryData|null} [driveData] GhostDriveData driveData + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByUser] GhostDriveData trendBinaryByUser + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByCar] GhostDriveData trendBinaryByCar + * @property {wm.protobuf.IBinaryData|null} [trendBinaryByArea] GhostDriveData trendBinaryByArea + */ + + /** + * Constructs a new GhostDriveData. + * @memberof wm.protobuf.LoadGhostDriveDataResponse + * @classdesc Represents a GhostDriveData. + * @implements IGhostDriveData + * @constructor + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData=} [properties] Properties to set + */ + function GhostDriveData(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostDriveData carId. + * @member {number} carId + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.carId = 0; + + /** + * GhostDriveData type. + * @member {wm.protobuf.GhostType} type + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.type = 1; + + /** + * GhostDriveData driveData. + * @member {wm.protobuf.IBinaryData|null|undefined} driveData + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.driveData = null; + + /** + * GhostDriveData trendBinaryByUser. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByUser + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.trendBinaryByUser = null; + + /** + * GhostDriveData trendBinaryByCar. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByCar + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.trendBinaryByCar = null; + + /** + * GhostDriveData trendBinaryByArea. + * @member {wm.protobuf.IBinaryData|null|undefined} trendBinaryByArea + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + */ + GhostDriveData.prototype.trendBinaryByArea = null; + + /** + * Creates a new GhostDriveData instance using the specified properties. + * @function create + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData=} [properties] Properties to set + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData instance + */ + GhostDriveData.create = function create(properties) { + return new GhostDriveData(properties); + }; + + /** + * Encodes the specified GhostDriveData message. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData} message GhostDriveData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostDriveData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.driveData != null && Object.hasOwnProperty.call(message, "driveData")) + $root.wm.protobuf.BinaryData.encode(message.driveData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.trendBinaryByUser != null && Object.hasOwnProperty.call(message, "trendBinaryByUser")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByUser, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.trendBinaryByCar != null && Object.hasOwnProperty.call(message, "trendBinaryByCar")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByCar, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.trendBinaryByArea != null && Object.hasOwnProperty.call(message, "trendBinaryByArea")) + $root.wm.protobuf.BinaryData.encode(message.trendBinaryByArea, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostDriveData message, length delimited. Does not implicitly {@link wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.IGhostDriveData} message GhostDriveData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostDriveData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostDriveData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.driveData = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 4: { + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 5: { + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + case 6: { + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("type")) + throw $util.ProtocolError("missing required 'type'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostDriveData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostDriveData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostDriveData message. + * @function verify + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostDriveData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.driveData != null && message.hasOwnProperty("driveData")) { + let error = $root.wm.protobuf.BinaryData.verify(message.driveData); + if (error) + return "driveData." + error; + } + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByUser); + if (error) + return "trendBinaryByUser." + error; + } + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByCar); + if (error) + return "trendBinaryByCar." + error; + } + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) { + let error = $root.wm.protobuf.BinaryData.verify(message.trendBinaryByArea); + if (error) + return "trendBinaryByArea." + error; + } + return null; + }; + + /** + * Creates a GhostDriveData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} GhostDriveData + */ + GhostDriveData.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData) + return object; + let message = new $root.wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData(); + if (object.carId != null) + message.carId = object.carId >>> 0; + switch (object.type) { + case "GHOST_NORMAL": + case 1: + message.type = 1; + break; + case "GHOST_PINCH_RUNNER": + case 2: + message.type = 2; + break; + case "GHOST_DEFAULT": + case 3: + message.type = 3; + break; + } + if (object.driveData != null) { + if (typeof object.driveData !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.driveData: object expected"); + message.driveData = $root.wm.protobuf.BinaryData.fromObject(object.driveData); + } + if (object.trendBinaryByUser != null) { + if (typeof object.trendBinaryByUser !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.trendBinaryByUser: object expected"); + message.trendBinaryByUser = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByUser); + } + if (object.trendBinaryByCar != null) { + if (typeof object.trendBinaryByCar !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.trendBinaryByCar: object expected"); + message.trendBinaryByCar = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByCar); + } + if (object.trendBinaryByArea != null) { + if (typeof object.trendBinaryByArea !== "object") + throw TypeError(".wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData.trendBinaryByArea: object expected"); + message.trendBinaryByArea = $root.wm.protobuf.BinaryData.fromObject(object.trendBinaryByArea); + } + return message; + }; + + /** + * Creates a plain object from a GhostDriveData message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData} message GhostDriveData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostDriveData.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.type = options.enums === String ? "GHOST_NORMAL" : 1; + object.driveData = null; + object.trendBinaryByUser = null; + object.trendBinaryByCar = null; + object.trendBinaryByArea = null; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.wm.protobuf.GhostType[message.type] : message.type; + if (message.driveData != null && message.hasOwnProperty("driveData")) + object.driveData = $root.wm.protobuf.BinaryData.toObject(message.driveData, options); + if (message.trendBinaryByUser != null && message.hasOwnProperty("trendBinaryByUser")) + object.trendBinaryByUser = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByUser, options); + if (message.trendBinaryByCar != null && message.hasOwnProperty("trendBinaryByCar")) + object.trendBinaryByCar = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByCar, options); + if (message.trendBinaryByArea != null && message.hasOwnProperty("trendBinaryByArea")) + object.trendBinaryByArea = $root.wm.protobuf.BinaryData.toObject(message.trendBinaryByArea, options); + return object; + }; + + /** + * Converts this GhostDriveData to JSON. + * @function toJSON + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @instance + * @returns {Object.} JSON object + */ + GhostDriveData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostDriveData + * @function getTypeUrl + * @memberof wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostDriveData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.LoadGhostDriveDataResponse.GhostDriveData"; + }; + + return GhostDriveData; + })(); + + return LoadGhostDriveDataResponse; + })(); + + protobuf.Car = (function() { + + /** + * Properties of a Car. + * @memberof wm.protobuf + * @interface ICar + * @property {number|null} [carId] Car carId + * @property {number|null} [userId] Car userId + * @property {number|null} [regionId] Car regionId + * @property {string|null} [name] Car name + * @property {number|null} [manufacturer] Car manufacturer + * @property {number|null} [model] Car model + * @property {number|null} [visualModel] Car visualModel + * @property {number|null} [defaultColor] Car defaultColor + * @property {number} customColor Car customColor + * @property {number} wheel Car wheel + * @property {number} wheelColor Car wheelColor + * @property {number} aero Car aero + * @property {number} bonnet Car bonnet + * @property {number} wing Car wing + * @property {wm.protobuf.IGTWing|null} [gtWing] Car gtWing + * @property {number} mirror Car mirror + * @property {number} neon Car neon + * @property {number} trunk Car trunk + * @property {number} plate Car plate + * @property {number} plateColor Car plateColor + * @property {number} plateNumber Car plateNumber + * @property {number} tunePower Car tunePower + * @property {number} tuneHandling Car tuneHandling + * @property {string} title Car title + * @property {number} level Car level + * @property {boolean|null} [windowSticker] Car windowSticker + * @property {string|null} [windowStickerString] Car windowStickerString + * @property {number|null} [windowStickerFont] Car windowStickerFont + * @property {number|null} [windowDecoration] Car windowDecoration + * @property {number|null} [rivalMarker] Car rivalMarker + * @property {number|null} [lastPlayedAt] Car lastPlayedAt + * @property {wm.protobuf.IPlace|null} [lastPlayedPlace] Car lastPlayedPlace + * @property {number|null} [aura] Car aura + * @property {number|null} [auraMotif] Car auraMotif + * @property {number|null} [ghostLevel] Car ghostLevel + * @property {string|null} [country] Car country + * @property {string|null} [searchCode] Car searchCode + */ + + /** + * Constructs a new Car. + * @memberof wm.protobuf + * @classdesc Represents a Car. + * @implements ICar + * @constructor + * @param {wm.protobuf.ICar=} [properties] Properties to set + */ + function Car(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Car carId. + * @member {number} carId + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.carId = 0; + + /** + * Car userId. + * @member {number} userId + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.userId = 0; + + /** + * Car regionId. + * @member {number} regionId + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.regionId = 0; + + /** + * Car name. + * @member {string} name + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.name = ""; + + /** + * Car manufacturer. + * @member {number} manufacturer + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.manufacturer = 0; + + /** + * Car model. + * @member {number} model + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.model = 0; + + /** + * Car visualModel. + * @member {number} visualModel + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.visualModel = 0; + + /** + * Car defaultColor. + * @member {number} defaultColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.defaultColor = 0; + + /** + * Car customColor. + * @member {number} customColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.customColor = 0; + + /** + * Car wheel. + * @member {number} wheel + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.wheel = 0; + + /** + * Car wheelColor. + * @member {number} wheelColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.wheelColor = 0; + + /** + * Car aero. + * @member {number} aero + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.aero = 0; + + /** + * Car bonnet. + * @member {number} bonnet + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.bonnet = 0; + + /** + * Car wing. + * @member {number} wing + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.wing = 0; + + /** + * Car gtWing. + * @member {wm.protobuf.IGTWing|null|undefined} gtWing + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.gtWing = null; + + /** + * Car mirror. + * @member {number} mirror + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.mirror = 0; + + /** + * Car neon. + * @member {number} neon + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.neon = 0; + + /** + * Car trunk. + * @member {number} trunk + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.trunk = 0; + + /** + * Car plate. + * @member {number} plate + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.plate = 0; + + /** + * Car plateColor. + * @member {number} plateColor + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.plateColor = 0; + + /** + * Car plateNumber. + * @member {number} plateNumber + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.plateNumber = 0; + + /** + * Car tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.tunePower = 0; + + /** + * Car tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.tuneHandling = 0; + + /** + * Car title. + * @member {string} title + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.title = ""; + + /** + * Car level. + * @member {number} level + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.level = 0; + + /** + * Car windowSticker. + * @member {boolean} windowSticker + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowSticker = false; + + /** + * Car windowStickerString. + * @member {string} windowStickerString + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowStickerString = ""; + + /** + * Car windowStickerFont. + * @member {number} windowStickerFont + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowStickerFont = 0; + + /** + * Car windowDecoration. + * @member {number} windowDecoration + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.windowDecoration = 0; + + /** + * Car rivalMarker. + * @member {number} rivalMarker + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.rivalMarker = 0; + + /** + * Car lastPlayedAt. + * @member {number} lastPlayedAt + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.lastPlayedAt = 0; + + /** + * Car lastPlayedPlace. + * @member {wm.protobuf.IPlace|null|undefined} lastPlayedPlace + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.lastPlayedPlace = null; + + /** + * Car aura. + * @member {number} aura + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.aura = 0; + + /** + * Car auraMotif. + * @member {number} auraMotif + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.auraMotif = 0; + + /** + * Car ghostLevel. + * @member {number} ghostLevel + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.ghostLevel = 0; + + /** + * Car country. + * @member {string} country + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.country = ""; + + /** + * Car searchCode. + * @member {string} searchCode + * @memberof wm.protobuf.Car + * @instance + */ + Car.prototype.searchCode = ""; + + /** + * Creates a new Car instance using the specified properties. + * @function create + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.ICar=} [properties] Properties to set + * @returns {wm.protobuf.Car} Car instance + */ + Car.create = function create(properties) { + return new Car(properties); + }; + + /** + * Encodes the specified Car message. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.ICar} message Car message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Car.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.userId); + if (message.regionId != null && Object.hasOwnProperty.call(message, "regionId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.regionId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + if (message.manufacturer != null && Object.hasOwnProperty.call(message, "manufacturer")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.manufacturer); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.model); + if (message.visualModel != null && Object.hasOwnProperty.call(message, "visualModel")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.visualModel); + if (message.defaultColor != null && Object.hasOwnProperty.call(message, "defaultColor")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.defaultColor); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.customColor); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.wheel); + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.wheelColor); + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.aero); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.bonnet); + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.wing); + if (message.gtWing != null && Object.hasOwnProperty.call(message, "gtWing")) + $root.wm.protobuf.GTWing.encode(message.gtWing, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.mirror); + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.neon); + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.trunk); + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.plate); + writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.plateColor); + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.plateNumber); + writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.tunePower); + writer.uint32(/* id 32, wireType 0 =*/256).uint32(message.tuneHandling); + writer.uint32(/* id 33, wireType 2 =*/266).string(message.title); + writer.uint32(/* id 34, wireType 0 =*/272).uint32(message.level); + if (message.windowSticker != null && Object.hasOwnProperty.call(message, "windowSticker")) + writer.uint32(/* id 35, wireType 0 =*/280).bool(message.windowSticker); + if (message.windowStickerString != null && Object.hasOwnProperty.call(message, "windowStickerString")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.windowStickerString); + if (message.windowStickerFont != null && Object.hasOwnProperty.call(message, "windowStickerFont")) + writer.uint32(/* id 38, wireType 0 =*/304).uint32(message.windowStickerFont); + if (message.windowDecoration != null && Object.hasOwnProperty.call(message, "windowDecoration")) + writer.uint32(/* id 39, wireType 0 =*/312).uint32(message.windowDecoration); + if (message.rivalMarker != null && Object.hasOwnProperty.call(message, "rivalMarker")) + writer.uint32(/* id 41, wireType 0 =*/328).uint32(message.rivalMarker); + if (message.lastPlayedAt != null && Object.hasOwnProperty.call(message, "lastPlayedAt")) + writer.uint32(/* id 45, wireType 0 =*/360).uint32(message.lastPlayedAt); + if (message.lastPlayedPlace != null && Object.hasOwnProperty.call(message, "lastPlayedPlace")) + $root.wm.protobuf.Place.encode(message.lastPlayedPlace, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + if (message.aura != null && Object.hasOwnProperty.call(message, "aura")) + writer.uint32(/* id 47, wireType 0 =*/376).uint32(message.aura); + if (message.auraMotif != null && Object.hasOwnProperty.call(message, "auraMotif")) + writer.uint32(/* id 48, wireType 0 =*/384).uint32(message.auraMotif); + if (message.ghostLevel != null && Object.hasOwnProperty.call(message, "ghostLevel")) + writer.uint32(/* id 49, wireType 0 =*/392).uint32(message.ghostLevel); + if (message.country != null && Object.hasOwnProperty.call(message, "country")) + writer.uint32(/* id 50, wireType 2 =*/402).string(message.country); + if (message.searchCode != null && Object.hasOwnProperty.call(message, "searchCode")) + writer.uint32(/* id 51, wireType 2 =*/410).string(message.searchCode); + return writer; + }; + + /** + * Encodes the specified Car message, length delimited. Does not implicitly {@link wm.protobuf.Car.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.ICar} message Car message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Car.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Car message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Car + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Car} Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Car.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Car(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.userId = reader.uint32(); + break; + } + case 3: { + message.regionId = reader.uint32(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + case 5: { + message.manufacturer = reader.uint32(); + break; + } + case 6: { + message.model = reader.uint32(); + break; + } + case 7: { + message.visualModel = reader.uint32(); + break; + } + case 8: { + message.defaultColor = reader.uint32(); + break; + } + case 9: { + message.customColor = reader.uint32(); + break; + } + case 10: { + message.wheel = reader.uint32(); + break; + } + case 11: { + message.wheelColor = reader.uint32(); + break; + } + case 12: { + message.aero = reader.uint32(); + break; + } + case 13: { + message.bonnet = reader.uint32(); + break; + } + case 14: { + message.wing = reader.uint32(); + break; + } + case 15: { + message.gtWing = $root.wm.protobuf.GTWing.decode(reader, reader.uint32()); + break; + } + case 16: { + message.mirror = reader.uint32(); + break; + } + case 24: { + message.neon = reader.uint32(); + break; + } + case 25: { + message.trunk = reader.uint32(); + break; + } + case 26: { + message.plate = reader.uint32(); + break; + } + case 27: { + message.plateColor = reader.uint32(); + break; + } + case 28: { + message.plateNumber = reader.uint32(); + break; + } + case 31: { + message.tunePower = reader.uint32(); + break; + } + case 32: { + message.tuneHandling = reader.uint32(); + break; + } + case 33: { + message.title = reader.string(); + break; + } + case 34: { + message.level = reader.uint32(); + break; + } + case 35: { + message.windowSticker = reader.bool(); + break; + } + case 37: { + message.windowStickerString = reader.string(); + break; + } + case 38: { + message.windowStickerFont = reader.uint32(); + break; + } + case 39: { + message.windowDecoration = reader.uint32(); + break; + } + case 41: { + message.rivalMarker = reader.uint32(); + break; + } + case 45: { + message.lastPlayedAt = reader.uint32(); + break; + } + case 46: { + message.lastPlayedPlace = $root.wm.protobuf.Place.decode(reader, reader.uint32()); + break; + } + case 47: { + message.aura = reader.uint32(); + break; + } + case 48: { + message.auraMotif = reader.uint32(); + break; + } + case 49: { + message.ghostLevel = reader.uint32(); + break; + } + case 50: { + message.country = reader.string(); + break; + } + case 51: { + message.searchCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("customColor")) + throw $util.ProtocolError("missing required 'customColor'", { instance: message }); + if (!message.hasOwnProperty("wheel")) + throw $util.ProtocolError("missing required 'wheel'", { instance: message }); + if (!message.hasOwnProperty("wheelColor")) + throw $util.ProtocolError("missing required 'wheelColor'", { instance: message }); + if (!message.hasOwnProperty("aero")) + throw $util.ProtocolError("missing required 'aero'", { instance: message }); + if (!message.hasOwnProperty("bonnet")) + throw $util.ProtocolError("missing required 'bonnet'", { instance: message }); + if (!message.hasOwnProperty("wing")) + throw $util.ProtocolError("missing required 'wing'", { instance: message }); + if (!message.hasOwnProperty("mirror")) + throw $util.ProtocolError("missing required 'mirror'", { instance: message }); + if (!message.hasOwnProperty("neon")) + throw $util.ProtocolError("missing required 'neon'", { instance: message }); + if (!message.hasOwnProperty("trunk")) + throw $util.ProtocolError("missing required 'trunk'", { instance: message }); + if (!message.hasOwnProperty("plate")) + throw $util.ProtocolError("missing required 'plate'", { instance: message }); + if (!message.hasOwnProperty("plateColor")) + throw $util.ProtocolError("missing required 'plateColor'", { instance: message }); + if (!message.hasOwnProperty("plateNumber")) + throw $util.ProtocolError("missing required 'plateNumber'", { instance: message }); + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + if (!message.hasOwnProperty("title")) + throw $util.ProtocolError("missing required 'title'", { instance: message }); + if (!message.hasOwnProperty("level")) + throw $util.ProtocolError("missing required 'level'", { instance: message }); + return message; + }; + + /** + * Decodes a Car message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Car + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Car} Car + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Car.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Car message. + * @function verify + * @memberof wm.protobuf.Car + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Car.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId)) + return "userId: integer expected"; + if (message.regionId != null && message.hasOwnProperty("regionId")) + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + if (!$util.isInteger(message.manufacturer)) + return "manufacturer: integer expected"; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isInteger(message.model)) + return "model: integer expected"; + if (message.visualModel != null && message.hasOwnProperty("visualModel")) + if (!$util.isInteger(message.visualModel)) + return "visualModel: integer expected"; + if (message.defaultColor != null && message.hasOwnProperty("defaultColor")) + if (!$util.isInteger(message.defaultColor)) + return "defaultColor: integer expected"; + if (!$util.isInteger(message.customColor)) + return "customColor: integer expected"; + if (!$util.isInteger(message.wheel)) + return "wheel: integer expected"; + if (!$util.isInteger(message.wheelColor)) + return "wheelColor: integer expected"; + if (!$util.isInteger(message.aero)) + return "aero: integer expected"; + if (!$util.isInteger(message.bonnet)) + return "bonnet: integer expected"; + if (!$util.isInteger(message.wing)) + return "wing: integer expected"; + if (message.gtWing != null && message.hasOwnProperty("gtWing")) { + let error = $root.wm.protobuf.GTWing.verify(message.gtWing); + if (error) + return "gtWing." + error; + } + if (!$util.isInteger(message.mirror)) + return "mirror: integer expected"; + if (!$util.isInteger(message.neon)) + return "neon: integer expected"; + if (!$util.isInteger(message.trunk)) + return "trunk: integer expected"; + if (!$util.isInteger(message.plate)) + return "plate: integer expected"; + if (!$util.isInteger(message.plateColor)) + return "plateColor: integer expected"; + if (!$util.isInteger(message.plateNumber)) + return "plateNumber: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (!$util.isString(message.title)) + return "title: string expected"; + if (!$util.isInteger(message.level)) + return "level: integer expected"; + if (message.windowSticker != null && message.hasOwnProperty("windowSticker")) + if (typeof message.windowSticker !== "boolean") + return "windowSticker: boolean expected"; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + if (!$util.isString(message.windowStickerString)) + return "windowStickerString: string expected"; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + if (!$util.isInteger(message.windowStickerFont)) + return "windowStickerFont: integer expected"; + if (message.windowDecoration != null && message.hasOwnProperty("windowDecoration")) + if (!$util.isInteger(message.windowDecoration)) + return "windowDecoration: integer expected"; + if (message.rivalMarker != null && message.hasOwnProperty("rivalMarker")) + if (!$util.isInteger(message.rivalMarker)) + return "rivalMarker: integer expected"; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + if (!$util.isInteger(message.lastPlayedAt)) + return "lastPlayedAt: integer expected"; + if (message.lastPlayedPlace != null && message.hasOwnProperty("lastPlayedPlace")) { + let error = $root.wm.protobuf.Place.verify(message.lastPlayedPlace); + if (error) + return "lastPlayedPlace." + error; + } + if (message.aura != null && message.hasOwnProperty("aura")) + if (!$util.isInteger(message.aura)) + return "aura: integer expected"; + if (message.auraMotif != null && message.hasOwnProperty("auraMotif")) + if (!$util.isInteger(message.auraMotif)) + return "auraMotif: integer expected"; + if (message.ghostLevel != null && message.hasOwnProperty("ghostLevel")) + if (!$util.isInteger(message.ghostLevel)) + return "ghostLevel: integer expected"; + if (message.country != null && message.hasOwnProperty("country")) + if (!$util.isString(message.country)) + return "country: string expected"; + if (message.searchCode != null && message.hasOwnProperty("searchCode")) + if (!$util.isString(message.searchCode)) + return "searchCode: string expected"; + return null; + }; + + /** + * Creates a Car message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Car + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Car} Car + */ + Car.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Car) + return object; + let message = new $root.wm.protobuf.Car(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.userId != null) + message.userId = object.userId >>> 0; + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.manufacturer != null) + message.manufacturer = object.manufacturer >>> 0; + if (object.model != null) + message.model = object.model >>> 0; + if (object.visualModel != null) + message.visualModel = object.visualModel >>> 0; + if (object.defaultColor != null) + message.defaultColor = object.defaultColor >>> 0; + if (object.customColor != null) + message.customColor = object.customColor >>> 0; + if (object.wheel != null) + message.wheel = object.wheel >>> 0; + if (object.wheelColor != null) + message.wheelColor = object.wheelColor >>> 0; + if (object.aero != null) + message.aero = object.aero >>> 0; + if (object.bonnet != null) + message.bonnet = object.bonnet >>> 0; + if (object.wing != null) + message.wing = object.wing >>> 0; + if (object.gtWing != null) { + if (typeof object.gtWing !== "object") + throw TypeError(".wm.protobuf.Car.gtWing: object expected"); + message.gtWing = $root.wm.protobuf.GTWing.fromObject(object.gtWing); + } + if (object.mirror != null) + message.mirror = object.mirror >>> 0; + if (object.neon != null) + message.neon = object.neon >>> 0; + if (object.trunk != null) + message.trunk = object.trunk >>> 0; + if (object.plate != null) + message.plate = object.plate >>> 0; + if (object.plateColor != null) + message.plateColor = object.plateColor >>> 0; + if (object.plateNumber != null) + message.plateNumber = object.plateNumber >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.title != null) + message.title = String(object.title); + if (object.level != null) + message.level = object.level >>> 0; + if (object.windowSticker != null) + message.windowSticker = Boolean(object.windowSticker); + if (object.windowStickerString != null) + message.windowStickerString = String(object.windowStickerString); + if (object.windowStickerFont != null) + message.windowStickerFont = object.windowStickerFont >>> 0; + if (object.windowDecoration != null) + message.windowDecoration = object.windowDecoration >>> 0; + if (object.rivalMarker != null) + message.rivalMarker = object.rivalMarker >>> 0; + if (object.lastPlayedAt != null) + message.lastPlayedAt = object.lastPlayedAt >>> 0; + if (object.lastPlayedPlace != null) { + if (typeof object.lastPlayedPlace !== "object") + throw TypeError(".wm.protobuf.Car.lastPlayedPlace: object expected"); + message.lastPlayedPlace = $root.wm.protobuf.Place.fromObject(object.lastPlayedPlace); + } + if (object.aura != null) + message.aura = object.aura >>> 0; + if (object.auraMotif != null) + message.auraMotif = object.auraMotif >>> 0; + if (object.ghostLevel != null) + message.ghostLevel = object.ghostLevel >>> 0; + if (object.country != null) + message.country = String(object.country); + if (object.searchCode != null) + message.searchCode = String(object.searchCode); + return message; + }; + + /** + * Creates a plain object from a Car message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Car + * @static + * @param {wm.protobuf.Car} message Car + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Car.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.userId = 0; + object.regionId = 0; + object.name = ""; + object.manufacturer = 0; + object.model = 0; + object.visualModel = 0; + object.defaultColor = 0; + object.customColor = 0; + object.wheel = 0; + object.wheelColor = 0; + object.aero = 0; + object.bonnet = 0; + object.wing = 0; + object.gtWing = null; + object.mirror = 0; + object.neon = 0; + object.trunk = 0; + object.plate = 0; + object.plateColor = 0; + object.plateNumber = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.title = ""; + object.level = 0; + object.windowSticker = false; + object.windowStickerString = ""; + object.windowStickerFont = 0; + object.windowDecoration = 0; + object.rivalMarker = 0; + object.lastPlayedAt = 0; + object.lastPlayedPlace = null; + object.aura = 0; + object.auraMotif = 0; + object.ghostLevel = 0; + object.country = ""; + object.searchCode = ""; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + object.manufacturer = message.manufacturer; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.visualModel != null && message.hasOwnProperty("visualModel")) + object.visualModel = message.visualModel; + if (message.defaultColor != null && message.hasOwnProperty("defaultColor")) + object.defaultColor = message.defaultColor; + if (message.customColor != null && message.hasOwnProperty("customColor")) + object.customColor = message.customColor; + if (message.wheel != null && message.hasOwnProperty("wheel")) + object.wheel = message.wheel; + if (message.wheelColor != null && message.hasOwnProperty("wheelColor")) + object.wheelColor = message.wheelColor; + if (message.aero != null && message.hasOwnProperty("aero")) + object.aero = message.aero; + if (message.bonnet != null && message.hasOwnProperty("bonnet")) + object.bonnet = message.bonnet; + if (message.wing != null && message.hasOwnProperty("wing")) + object.wing = message.wing; + if (message.gtWing != null && message.hasOwnProperty("gtWing")) + object.gtWing = $root.wm.protobuf.GTWing.toObject(message.gtWing, options); + if (message.mirror != null && message.hasOwnProperty("mirror")) + object.mirror = message.mirror; + if (message.neon != null && message.hasOwnProperty("neon")) + object.neon = message.neon; + if (message.trunk != null && message.hasOwnProperty("trunk")) + object.trunk = message.trunk; + if (message.plate != null && message.hasOwnProperty("plate")) + object.plate = message.plate; + if (message.plateColor != null && message.hasOwnProperty("plateColor")) + object.plateColor = message.plateColor; + if (message.plateNumber != null && message.hasOwnProperty("plateNumber")) + object.plateNumber = message.plateNumber; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.level != null && message.hasOwnProperty("level")) + object.level = message.level; + if (message.windowSticker != null && message.hasOwnProperty("windowSticker")) + object.windowSticker = message.windowSticker; + if (message.windowStickerString != null && message.hasOwnProperty("windowStickerString")) + object.windowStickerString = message.windowStickerString; + if (message.windowStickerFont != null && message.hasOwnProperty("windowStickerFont")) + object.windowStickerFont = message.windowStickerFont; + if (message.windowDecoration != null && message.hasOwnProperty("windowDecoration")) + object.windowDecoration = message.windowDecoration; + if (message.rivalMarker != null && message.hasOwnProperty("rivalMarker")) + object.rivalMarker = message.rivalMarker; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + object.lastPlayedAt = message.lastPlayedAt; + if (message.lastPlayedPlace != null && message.hasOwnProperty("lastPlayedPlace")) + object.lastPlayedPlace = $root.wm.protobuf.Place.toObject(message.lastPlayedPlace, options); + if (message.aura != null && message.hasOwnProperty("aura")) + object.aura = message.aura; + if (message.auraMotif != null && message.hasOwnProperty("auraMotif")) + object.auraMotif = message.auraMotif; + if (message.ghostLevel != null && message.hasOwnProperty("ghostLevel")) + object.ghostLevel = message.ghostLevel; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + if (message.searchCode != null && message.hasOwnProperty("searchCode")) + object.searchCode = message.searchCode; + return object; + }; + + /** + * Converts this Car to JSON. + * @function toJSON + * @memberof wm.protobuf.Car + * @instance + * @returns {Object.} JSON object + */ + Car.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Car + * @function getTypeUrl + * @memberof wm.protobuf.Car + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Car.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Car"; + }; + + return Car; + })(); + + protobuf.CarSetting = (function() { + + /** + * Properties of a CarSetting. + * @memberof wm.protobuf + * @interface ICarSetting + * @property {number|null} [carId] CarSetting carId + * @property {boolean} view CarSetting view + * @property {boolean} transmission CarSetting transmission + * @property {boolean} retire CarSetting retire + * @property {number} meter CarSetting meter + * @property {boolean} navigationMap CarSetting navigationMap + * @property {number} volume CarSetting volume + * @property {number} bgm CarSetting bgm + * @property {number} nameplate CarSetting nameplate + * @property {number} nameplateColor CarSetting nameplateColor + * @property {number} terminalBackground CarSetting terminalBackground + */ + + /** + * Constructs a new CarSetting. + * @memberof wm.protobuf + * @classdesc Represents a CarSetting. + * @implements ICarSetting + * @constructor + * @param {wm.protobuf.ICarSetting=} [properties] Properties to set + */ + function CarSetting(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarSetting carId. + * @member {number} carId + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.carId = 0; + + /** + * CarSetting view. + * @member {boolean} view + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.view = false; + + /** + * CarSetting transmission. + * @member {boolean} transmission + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.transmission = false; + + /** + * CarSetting retire. + * @member {boolean} retire + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.retire = false; + + /** + * CarSetting meter. + * @member {number} meter + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.meter = 0; + + /** + * CarSetting navigationMap. + * @member {boolean} navigationMap + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.navigationMap = false; + + /** + * CarSetting volume. + * @member {number} volume + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.volume = 0; + + /** + * CarSetting bgm. + * @member {number} bgm + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.bgm = 0; + + /** + * CarSetting nameplate. + * @member {number} nameplate + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.nameplate = 0; + + /** + * CarSetting nameplateColor. + * @member {number} nameplateColor + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.nameplateColor = 0; + + /** + * CarSetting terminalBackground. + * @member {number} terminalBackground + * @memberof wm.protobuf.CarSetting + * @instance + */ + CarSetting.prototype.terminalBackground = 0; + + /** + * Creates a new CarSetting instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.ICarSetting=} [properties] Properties to set + * @returns {wm.protobuf.CarSetting} CarSetting instance + */ + CarSetting.create = function create(properties) { + return new CarSetting(properties); + }; + + /** + * Encodes the specified CarSetting message. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.ICarSetting} message CarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.carId != null && Object.hasOwnProperty.call(message, "carId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.view); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.transmission); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.retire); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.meter); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.navigationMap); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.volume); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.bgm); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.nameplate); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.nameplateColor); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.terminalBackground); + return writer; + }; + + /** + * Encodes the specified CarSetting message, length delimited. Does not implicitly {@link wm.protobuf.CarSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.ICarSetting} message CarSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarSetting message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarSetting} CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarSetting(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.view = reader.bool(); + break; + } + case 3: { + message.transmission = reader.bool(); + break; + } + case 4: { + message.retire = reader.bool(); + break; + } + case 5: { + message.meter = reader.uint32(); + break; + } + case 6: { + message.navigationMap = reader.bool(); + break; + } + case 7: { + message.volume = reader.uint32(); + break; + } + case 8: { + message.bgm = reader.uint32(); + break; + } + case 9: { + message.nameplate = reader.uint32(); + break; + } + case 10: { + message.nameplateColor = reader.uint32(); + break; + } + case 13: { + message.terminalBackground = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("view")) + throw $util.ProtocolError("missing required 'view'", { instance: message }); + if (!message.hasOwnProperty("transmission")) + throw $util.ProtocolError("missing required 'transmission'", { instance: message }); + if (!message.hasOwnProperty("retire")) + throw $util.ProtocolError("missing required 'retire'", { instance: message }); + if (!message.hasOwnProperty("meter")) + throw $util.ProtocolError("missing required 'meter'", { instance: message }); + if (!message.hasOwnProperty("navigationMap")) + throw $util.ProtocolError("missing required 'navigationMap'", { instance: message }); + if (!message.hasOwnProperty("volume")) + throw $util.ProtocolError("missing required 'volume'", { instance: message }); + if (!message.hasOwnProperty("bgm")) + throw $util.ProtocolError("missing required 'bgm'", { instance: message }); + if (!message.hasOwnProperty("nameplate")) + throw $util.ProtocolError("missing required 'nameplate'", { instance: message }); + if (!message.hasOwnProperty("nameplateColor")) + throw $util.ProtocolError("missing required 'nameplateColor'", { instance: message }); + if (!message.hasOwnProperty("terminalBackground")) + throw $util.ProtocolError("missing required 'terminalBackground'", { instance: message }); + return message; + }; + + /** + * Decodes a CarSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarSetting} CarSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarSetting message. + * @function verify + * @memberof wm.protobuf.CarSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.carId != null && message.hasOwnProperty("carId")) + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (typeof message.view !== "boolean") + return "view: boolean expected"; + if (typeof message.transmission !== "boolean") + return "transmission: boolean expected"; + if (typeof message.retire !== "boolean") + return "retire: boolean expected"; + if (!$util.isInteger(message.meter)) + return "meter: integer expected"; + if (typeof message.navigationMap !== "boolean") + return "navigationMap: boolean expected"; + if (!$util.isInteger(message.volume)) + return "volume: integer expected"; + if (!$util.isInteger(message.bgm)) + return "bgm: integer expected"; + if (!$util.isInteger(message.nameplate)) + return "nameplate: integer expected"; + if (!$util.isInteger(message.nameplateColor)) + return "nameplateColor: integer expected"; + if (!$util.isInteger(message.terminalBackground)) + return "terminalBackground: integer expected"; + return null; + }; + + /** + * Creates a CarSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarSetting + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarSetting} CarSetting + */ + CarSetting.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarSetting) + return object; + let message = new $root.wm.protobuf.CarSetting(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.view != null) + message.view = Boolean(object.view); + if (object.transmission != null) + message.transmission = Boolean(object.transmission); + if (object.retire != null) + message.retire = Boolean(object.retire); + if (object.meter != null) + message.meter = object.meter >>> 0; + if (object.navigationMap != null) + message.navigationMap = Boolean(object.navigationMap); + if (object.volume != null) + message.volume = object.volume >>> 0; + if (object.bgm != null) + message.bgm = object.bgm >>> 0; + if (object.nameplate != null) + message.nameplate = object.nameplate >>> 0; + if (object.nameplateColor != null) + message.nameplateColor = object.nameplateColor >>> 0; + if (object.terminalBackground != null) + message.terminalBackground = object.terminalBackground >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarSetting + * @static + * @param {wm.protobuf.CarSetting} message CarSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.view = false; + object.transmission = false; + object.retire = false; + object.meter = 0; + object.navigationMap = false; + object.volume = 0; + object.bgm = 0; + object.nameplate = 0; + object.nameplateColor = 0; + object.terminalBackground = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.view != null && message.hasOwnProperty("view")) + object.view = message.view; + if (message.transmission != null && message.hasOwnProperty("transmission")) + object.transmission = message.transmission; + if (message.retire != null && message.hasOwnProperty("retire")) + object.retire = message.retire; + if (message.meter != null && message.hasOwnProperty("meter")) + object.meter = message.meter; + if (message.navigationMap != null && message.hasOwnProperty("navigationMap")) + object.navigationMap = message.navigationMap; + if (message.volume != null && message.hasOwnProperty("volume")) + object.volume = message.volume; + if (message.bgm != null && message.hasOwnProperty("bgm")) + object.bgm = message.bgm; + if (message.nameplate != null && message.hasOwnProperty("nameplate")) + object.nameplate = message.nameplate; + if (message.nameplateColor != null && message.hasOwnProperty("nameplateColor")) + object.nameplateColor = message.nameplateColor; + if (message.terminalBackground != null && message.hasOwnProperty("terminalBackground")) + object.terminalBackground = message.terminalBackground; + return object; + }; + + /** + * Converts this CarSetting to JSON. + * @function toJSON + * @memberof wm.protobuf.CarSetting + * @instance + * @returns {Object.} JSON object + */ + CarSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarSetting + * @function getTypeUrl + * @memberof wm.protobuf.CarSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarSetting"; + }; + + return CarSetting; + })(); + + protobuf.GTWing = (function() { + + /** + * Properties of a GTWing. + * @memberof wm.protobuf + * @interface IGTWing + * @property {number} pillar GTWing pillar + * @property {number} pillarMaterial GTWing pillarMaterial + * @property {number} mainWing GTWing mainWing + * @property {number} mainWingColor GTWing mainWingColor + * @property {number} wingTip GTWing wingTip + * @property {number} material GTWing material + */ + + /** + * Constructs a new GTWing. + * @memberof wm.protobuf + * @classdesc Represents a GTWing. + * @implements IGTWing + * @constructor + * @param {wm.protobuf.IGTWing=} [properties] Properties to set + */ + function GTWing(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GTWing pillar. + * @member {number} pillar + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.pillar = 0; + + /** + * GTWing pillarMaterial. + * @member {number} pillarMaterial + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.pillarMaterial = 0; + + /** + * GTWing mainWing. + * @member {number} mainWing + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.mainWing = 0; + + /** + * GTWing mainWingColor. + * @member {number} mainWingColor + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.mainWingColor = 0; + + /** + * GTWing wingTip. + * @member {number} wingTip + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.wingTip = 0; + + /** + * GTWing material. + * @member {number} material + * @memberof wm.protobuf.GTWing + * @instance + */ + GTWing.prototype.material = 0; + + /** + * Creates a new GTWing instance using the specified properties. + * @function create + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.IGTWing=} [properties] Properties to set + * @returns {wm.protobuf.GTWing} GTWing instance + */ + GTWing.create = function create(properties) { + return new GTWing(properties); + }; + + /** + * Encodes the specified GTWing message. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.IGTWing} message GTWing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GTWing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.pillar); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.pillarMaterial); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.mainWing); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mainWingColor); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.wingTip); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.material); + return writer; + }; + + /** + * Encodes the specified GTWing message, length delimited. Does not implicitly {@link wm.protobuf.GTWing.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.IGTWing} message GTWing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GTWing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GTWing message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GTWing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GTWing} GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GTWing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GTWing(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pillar = reader.uint32(); + break; + } + case 2: { + message.pillarMaterial = reader.uint32(); + break; + } + case 3: { + message.mainWing = reader.uint32(); + break; + } + case 4: { + message.mainWingColor = reader.uint32(); + break; + } + case 5: { + message.wingTip = reader.uint32(); + break; + } + case 6: { + message.material = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("pillar")) + throw $util.ProtocolError("missing required 'pillar'", { instance: message }); + if (!message.hasOwnProperty("pillarMaterial")) + throw $util.ProtocolError("missing required 'pillarMaterial'", { instance: message }); + if (!message.hasOwnProperty("mainWing")) + throw $util.ProtocolError("missing required 'mainWing'", { instance: message }); + if (!message.hasOwnProperty("mainWingColor")) + throw $util.ProtocolError("missing required 'mainWingColor'", { instance: message }); + if (!message.hasOwnProperty("wingTip")) + throw $util.ProtocolError("missing required 'wingTip'", { instance: message }); + if (!message.hasOwnProperty("material")) + throw $util.ProtocolError("missing required 'material'", { instance: message }); + return message; + }; + + /** + * Decodes a GTWing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GTWing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GTWing} GTWing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GTWing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GTWing message. + * @function verify + * @memberof wm.protobuf.GTWing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GTWing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.pillar)) + return "pillar: integer expected"; + if (!$util.isInteger(message.pillarMaterial)) + return "pillarMaterial: integer expected"; + if (!$util.isInteger(message.mainWing)) + return "mainWing: integer expected"; + if (!$util.isInteger(message.mainWingColor)) + return "mainWingColor: integer expected"; + if (!$util.isInteger(message.wingTip)) + return "wingTip: integer expected"; + if (!$util.isInteger(message.material)) + return "material: integer expected"; + return null; + }; + + /** + * Creates a GTWing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GTWing + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GTWing} GTWing + */ + GTWing.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GTWing) + return object; + let message = new $root.wm.protobuf.GTWing(); + if (object.pillar != null) + message.pillar = object.pillar >>> 0; + if (object.pillarMaterial != null) + message.pillarMaterial = object.pillarMaterial >>> 0; + if (object.mainWing != null) + message.mainWing = object.mainWing >>> 0; + if (object.mainWingColor != null) + message.mainWingColor = object.mainWingColor >>> 0; + if (object.wingTip != null) + message.wingTip = object.wingTip >>> 0; + if (object.material != null) + message.material = object.material >>> 0; + return message; + }; + + /** + * Creates a plain object from a GTWing message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GTWing + * @static + * @param {wm.protobuf.GTWing} message GTWing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GTWing.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.pillar = 0; + object.pillarMaterial = 0; + object.mainWing = 0; + object.mainWingColor = 0; + object.wingTip = 0; + object.material = 0; + } + if (message.pillar != null && message.hasOwnProperty("pillar")) + object.pillar = message.pillar; + if (message.pillarMaterial != null && message.hasOwnProperty("pillarMaterial")) + object.pillarMaterial = message.pillarMaterial; + if (message.mainWing != null && message.hasOwnProperty("mainWing")) + object.mainWing = message.mainWing; + if (message.mainWingColor != null && message.hasOwnProperty("mainWingColor")) + object.mainWingColor = message.mainWingColor; + if (message.wingTip != null && message.hasOwnProperty("wingTip")) + object.wingTip = message.wingTip; + if (message.material != null && message.hasOwnProperty("material")) + object.material = message.material; + return object; + }; + + /** + * Converts this GTWing to JSON. + * @function toJSON + * @memberof wm.protobuf.GTWing + * @instance + * @returns {Object.} JSON object + */ + GTWing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GTWing + * @function getTypeUrl + * @memberof wm.protobuf.GTWing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GTWing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GTWing"; + }; + + return GTWing; + })(); + + protobuf.CarItem = (function() { + + /** + * Properties of a CarItem. + * @memberof wm.protobuf + * @interface ICarItem + * @property {wm.protobuf.ItemCategory} category CarItem category + * @property {number} itemId CarItem itemId + * @property {number|null} [amount] CarItem amount + */ + + /** + * Constructs a new CarItem. + * @memberof wm.protobuf + * @classdesc Represents a CarItem. + * @implements ICarItem + * @constructor + * @param {wm.protobuf.ICarItem=} [properties] Properties to set + */ + function CarItem(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarItem category. + * @member {wm.protobuf.ItemCategory} category + * @memberof wm.protobuf.CarItem + * @instance + */ + CarItem.prototype.category = 1; + + /** + * CarItem itemId. + * @member {number} itemId + * @memberof wm.protobuf.CarItem + * @instance + */ + CarItem.prototype.itemId = 0; + + /** + * CarItem amount. + * @member {number} amount + * @memberof wm.protobuf.CarItem + * @instance + */ + CarItem.prototype.amount = 0; + + /** + * Creates a new CarItem instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.ICarItem=} [properties] Properties to set + * @returns {wm.protobuf.CarItem} CarItem instance + */ + CarItem.create = function create(properties) { + return new CarItem(properties); + }; + + /** + * Encodes the specified CarItem message. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.ICarItem} message CarItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.itemId); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.amount); + return writer; + }; + + /** + * Encodes the specified CarItem message, length delimited. Does not implicitly {@link wm.protobuf.CarItem.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.ICarItem} message CarItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarItem message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarItem} CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarItem(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.itemId = reader.uint32(); + break; + } + case 3: { + message.amount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("category")) + throw $util.ProtocolError("missing required 'category'", { instance: message }); + if (!message.hasOwnProperty("itemId")) + throw $util.ProtocolError("missing required 'itemId'", { instance: message }); + return message; + }; + + /** + * Decodes a CarItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarItem} CarItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarItem message. + * @function verify + * @memberof wm.protobuf.CarItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.category) { + default: + return "category: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + case 10: + case 12: + case 14: + case 15: + case 16: + case 17: + case 19: + case 22: + case 24: + case 25: + case 26: + case 27: + case 28: + case 201: + case 202: + case 203: + case 300: + case 301: + break; + } + if (!$util.isInteger(message.itemId)) + return "itemId: integer expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isInteger(message.amount)) + return "amount: integer expected"; + return null; + }; + + /** + * Creates a CarItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarItem + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarItem} CarItem + */ + CarItem.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarItem) + return object; + let message = new $root.wm.protobuf.CarItem(); + switch (object.category) { + case "CAT_CUSTOM_COLOR": + case 1: + message.category = 1; + break; + case "CAT_WHEEL": + case 2: + message.category = 2; + break; + case "CAT_AERO": + case 3: + message.category = 3; + break; + case "CAT_BONNET": + case 4: + message.category = 4; + break; + case "CAT_WING": + case 5: + message.category = 5; + break; + case "CAT_MIRROR": + case 6: + message.category = 6; + break; + case "CAT_NEON": + case 8: + message.category = 8; + break; + case "CAT_TRUNK": + case 9: + message.category = 9; + break; + case "CAT_NUMBER_PLATE": + case 10: + message.category = 10; + break; + case "CAT_GT_WING": + case 12: + message.category = 12; + break; + case "CAT_AURA_MOTIF": + case 14: + message.category = 14; + break; + case "CAT_METER": + case 15: + message.category = 15; + break; + case "CAT_BGM": + case 16: + message.category = 16; + break; + case "CAT_NAME_PLATE": + case 17: + message.category = 17; + break; + case "CAT_NUMBER": + case 19: + message.category = 19; + break; + case "CAT_BGM_TRACK": + case 22: + message.category = 22; + break; + case "CAT_WINDOW_STICKER_FONT": + case 24: + message.category = 24; + break; + case "CAT_WINDOW_DECORATION": + case 25: + message.category = 25; + break; + case "CAT_RIVAL_MARKER": + case 26: + message.category = 26; + break; + case "CAT_STAMP": + case 27: + message.category = 27; + break; + case "CAT_TERMINAL_BACKGROUND": + case 28: + message.category = 28; + break; + case "CAT_CAR_TICKET": + case 201: + message.category = 201; + break; + case "CAT_CONSUMPTION_ITEM": + case 202: + message.category = 202; + break; + case "CAT_CAR_TICKET_FREE": + case 203: + message.category = 203; + break; + case "CAT_AERO_FULLSET": + case 300: + message.category = 300; + break; + case "CAT_AERO_LIMITED": + case 301: + message.category = 301; + break; + } + if (object.itemId != null) + message.itemId = object.itemId >>> 0; + if (object.amount != null) + message.amount = object.amount >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarItem message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarItem + * @static + * @param {wm.protobuf.CarItem} message CarItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.category = options.enums === String ? "CAT_CUSTOM_COLOR" : 1; + object.itemId = 0; + object.amount = 0; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.wm.protobuf.ItemCategory[message.category] : message.category; + if (message.itemId != null && message.hasOwnProperty("itemId")) + object.itemId = message.itemId; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this CarItem to JSON. + * @function toJSON + * @memberof wm.protobuf.CarItem + * @instance + * @returns {Object.} JSON object + */ + CarItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarItem + * @function getTypeUrl + * @memberof wm.protobuf.CarItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarItem"; + }; + + return CarItem; + })(); + + protobuf.CopiedCar = (function() { + + /** + * Properties of a CopiedCar. + * @memberof wm.protobuf + * @interface ICopiedCar + * @property {wm.protobuf.ICar} car CopiedCar car + * @property {number} remainingPlayCounts CopiedCar remainingPlayCounts + */ + + /** + * Constructs a new CopiedCar. + * @memberof wm.protobuf + * @classdesc Represents a CopiedCar. + * @implements ICopiedCar + * @constructor + * @param {wm.protobuf.ICopiedCar=} [properties] Properties to set + */ + function CopiedCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CopiedCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.CopiedCar + * @instance + */ + CopiedCar.prototype.car = null; + + /** + * CopiedCar remainingPlayCounts. + * @member {number} remainingPlayCounts + * @memberof wm.protobuf.CopiedCar + * @instance + */ + CopiedCar.prototype.remainingPlayCounts = 0; + + /** + * Creates a new CopiedCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.ICopiedCar=} [properties] Properties to set + * @returns {wm.protobuf.CopiedCar} CopiedCar instance + */ + CopiedCar.create = function create(properties) { + return new CopiedCar(properties); + }; + + /** + * Encodes the specified CopiedCar message. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.ICopiedCar} message CopiedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopiedCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.remainingPlayCounts); + return writer; + }; + + /** + * Encodes the specified CopiedCar message, length delimited. Does not implicitly {@link wm.protobuf.CopiedCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.ICopiedCar} message CopiedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopiedCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CopiedCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CopiedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CopiedCar} CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopiedCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CopiedCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.remainingPlayCounts = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("remainingPlayCounts")) + throw $util.ProtocolError("missing required 'remainingPlayCounts'", { instance: message }); + return message; + }; + + /** + * Decodes a CopiedCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CopiedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CopiedCar} CopiedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopiedCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CopiedCar message. + * @function verify + * @memberof wm.protobuf.CopiedCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CopiedCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.remainingPlayCounts)) + return "remainingPlayCounts: integer expected"; + return null; + }; + + /** + * Creates a CopiedCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CopiedCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CopiedCar} CopiedCar + */ + CopiedCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CopiedCar) + return object; + let message = new $root.wm.protobuf.CopiedCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.CopiedCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.remainingPlayCounts != null) + message.remainingPlayCounts = object.remainingPlayCounts >>> 0; + return message; + }; + + /** + * Creates a plain object from a CopiedCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CopiedCar + * @static + * @param {wm.protobuf.CopiedCar} message CopiedCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CopiedCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.remainingPlayCounts = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.remainingPlayCounts != null && message.hasOwnProperty("remainingPlayCounts")) + object.remainingPlayCounts = message.remainingPlayCounts; + return object; + }; + + /** + * Converts this CopiedCar to JSON. + * @function toJSON + * @memberof wm.protobuf.CopiedCar + * @instance + * @returns {Object.} JSON object + */ + CopiedCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CopiedCar + * @function getTypeUrl + * @memberof wm.protobuf.CopiedCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CopiedCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CopiedCar"; + }; + + return CopiedCar; + })(); + + protobuf.FriendCar = (function() { + + /** + * Properties of a FriendCar. + * @memberof wm.protobuf + * @interface IFriendCar + * @property {wm.protobuf.ICar} car FriendCar car + * @property {number|null} [friendshipLevel] FriendCar friendshipLevel + * @property {boolean} nonhuman FriendCar nonhuman + */ + + /** + * Constructs a new FriendCar. + * @memberof wm.protobuf + * @classdesc Represents a FriendCar. + * @implements IFriendCar + * @constructor + * @param {wm.protobuf.IFriendCar=} [properties] Properties to set + */ + function FriendCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FriendCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.FriendCar + * @instance + */ + FriendCar.prototype.car = null; + + /** + * FriendCar friendshipLevel. + * @member {number} friendshipLevel + * @memberof wm.protobuf.FriendCar + * @instance + */ + FriendCar.prototype.friendshipLevel = 0; + + /** + * FriendCar nonhuman. + * @member {boolean} nonhuman + * @memberof wm.protobuf.FriendCar + * @instance + */ + FriendCar.prototype.nonhuman = false; + + /** + * Creates a new FriendCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.IFriendCar=} [properties] Properties to set + * @returns {wm.protobuf.FriendCar} FriendCar instance + */ + FriendCar.create = function create(properties) { + return new FriendCar(properties); + }; + + /** + * Encodes the specified FriendCar message. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.IFriendCar} message FriendCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FriendCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.friendshipLevel != null && Object.hasOwnProperty.call(message, "friendshipLevel")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.friendshipLevel); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.nonhuman); + return writer; + }; + + /** + * Encodes the specified FriendCar message, length delimited. Does not implicitly {@link wm.protobuf.FriendCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.IFriendCar} message FriendCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FriendCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FriendCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.FriendCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.FriendCar} FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FriendCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.FriendCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.friendshipLevel = reader.uint32(); + break; + } + case 3: { + message.nonhuman = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("nonhuman")) + throw $util.ProtocolError("missing required 'nonhuman'", { instance: message }); + return message; + }; + + /** + * Decodes a FriendCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.FriendCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.FriendCar} FriendCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FriendCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FriendCar message. + * @function verify + * @memberof wm.protobuf.FriendCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FriendCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.friendshipLevel != null && message.hasOwnProperty("friendshipLevel")) + if (!$util.isInteger(message.friendshipLevel)) + return "friendshipLevel: integer expected"; + if (typeof message.nonhuman !== "boolean") + return "nonhuman: boolean expected"; + return null; + }; + + /** + * Creates a FriendCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.FriendCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.FriendCar} FriendCar + */ + FriendCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.FriendCar) + return object; + let message = new $root.wm.protobuf.FriendCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.FriendCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.friendshipLevel != null) + message.friendshipLevel = object.friendshipLevel >>> 0; + if (object.nonhuman != null) + message.nonhuman = Boolean(object.nonhuman); + return message; + }; + + /** + * Creates a plain object from a FriendCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.FriendCar + * @static + * @param {wm.protobuf.FriendCar} message FriendCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FriendCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.friendshipLevel = 0; + object.nonhuman = false; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.friendshipLevel != null && message.hasOwnProperty("friendshipLevel")) + object.friendshipLevel = message.friendshipLevel; + if (message.nonhuman != null && message.hasOwnProperty("nonhuman")) + object.nonhuman = message.nonhuman; + return object; + }; + + /** + * Converts this FriendCar to JSON. + * @function toJSON + * @memberof wm.protobuf.FriendCar + * @instance + * @returns {Object.} JSON object + */ + FriendCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FriendCar + * @function getTypeUrl + * @memberof wm.protobuf.FriendCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FriendCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.FriendCar"; + }; + + return FriendCar; + })(); + + protobuf.ChallengerCar = (function() { + + /** + * Properties of a ChallengerCar. + * @memberof wm.protobuf + * @interface IChallengerCar + * @property {wm.protobuf.ICar} car ChallengerCar car + * @property {number} stamp ChallengerCar stamp + * @property {number} result ChallengerCar result + * @property {number} area ChallengerCar area + */ + + /** + * Constructs a new ChallengerCar. + * @memberof wm.protobuf + * @classdesc Represents a ChallengerCar. + * @implements IChallengerCar + * @constructor + * @param {wm.protobuf.IChallengerCar=} [properties] Properties to set + */ + function ChallengerCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChallengerCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.car = null; + + /** + * ChallengerCar stamp. + * @member {number} stamp + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.stamp = 0; + + /** + * ChallengerCar result. + * @member {number} result + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.result = 0; + + /** + * ChallengerCar area. + * @member {number} area + * @memberof wm.protobuf.ChallengerCar + * @instance + */ + ChallengerCar.prototype.area = 0; + + /** + * Creates a new ChallengerCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.IChallengerCar=} [properties] Properties to set + * @returns {wm.protobuf.ChallengerCar} ChallengerCar instance + */ + ChallengerCar.create = function create(properties) { + return new ChallengerCar(properties); + }; + + /** + * Encodes the specified ChallengerCar message. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.IChallengerCar} message ChallengerCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChallengerCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stamp); + writer.uint32(/* id 4, wireType 0 =*/32).sint32(message.result); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.area); + return writer; + }; + + /** + * Encodes the specified ChallengerCar message, length delimited. Does not implicitly {@link wm.protobuf.ChallengerCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.IChallengerCar} message ChallengerCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChallengerCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ChallengerCar} ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChallengerCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ChallengerCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 3: { + message.stamp = reader.uint32(); + break; + } + case 4: { + message.result = reader.sint32(); + break; + } + case 5: { + message.area = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("stamp")) + throw $util.ProtocolError("missing required 'stamp'", { instance: message }); + if (!message.hasOwnProperty("result")) + throw $util.ProtocolError("missing required 'result'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + return message; + }; + + /** + * Decodes a ChallengerCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ChallengerCar} ChallengerCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChallengerCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChallengerCar message. + * @function verify + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChallengerCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.stamp)) + return "stamp: integer expected"; + if (!$util.isInteger(message.result)) + return "result: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + return null; + }; + + /** + * Creates a ChallengerCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ChallengerCar} ChallengerCar + */ + ChallengerCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ChallengerCar) + return object; + let message = new $root.wm.protobuf.ChallengerCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.ChallengerCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.stamp != null) + message.stamp = object.stamp >>> 0; + if (object.result != null) + message.result = object.result | 0; + if (object.area != null) + message.area = object.area >>> 0; + return message; + }; + + /** + * Creates a plain object from a ChallengerCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {wm.protobuf.ChallengerCar} message ChallengerCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChallengerCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.stamp = 0; + object.result = 0; + object.area = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.stamp != null && message.hasOwnProperty("stamp")) + object.stamp = message.stamp; + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + return object; + }; + + /** + * Converts this ChallengerCar to JSON. + * @function toJSON + * @memberof wm.protobuf.ChallengerCar + * @instance + * @returns {Object.} JSON object + */ + ChallengerCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChallengerCar + * @function getTypeUrl + * @memberof wm.protobuf.ChallengerCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChallengerCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ChallengerCar"; + }; + + return ChallengerCar; + })(); + + protobuf.StampTargetCar = (function() { + + /** + * Properties of a StampTargetCar. + * @memberof wm.protobuf + * @interface IStampTargetCar + * @property {wm.protobuf.ICar} car StampTargetCar car + * @property {number} returnCount StampTargetCar returnCount + * @property {boolean} locked StampTargetCar locked + * @property {boolean} recommended StampTargetCar recommended + */ + + /** + * Constructs a new StampTargetCar. + * @memberof wm.protobuf + * @classdesc Represents a StampTargetCar. + * @implements IStampTargetCar + * @constructor + * @param {wm.protobuf.IStampTargetCar=} [properties] Properties to set + */ + function StampTargetCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StampTargetCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.car = null; + + /** + * StampTargetCar returnCount. + * @member {number} returnCount + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.returnCount = 0; + + /** + * StampTargetCar locked. + * @member {boolean} locked + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.locked = false; + + /** + * StampTargetCar recommended. + * @member {boolean} recommended + * @memberof wm.protobuf.StampTargetCar + * @instance + */ + StampTargetCar.prototype.recommended = false; + + /** + * Creates a new StampTargetCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.IStampTargetCar=} [properties] Properties to set + * @returns {wm.protobuf.StampTargetCar} StampTargetCar instance + */ + StampTargetCar.create = function create(properties) { + return new StampTargetCar(properties); + }; + + /** + * Encodes the specified StampTargetCar message. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.IStampTargetCar} message StampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StampTargetCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.returnCount); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.locked); + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.recommended); + return writer; + }; + + /** + * Encodes the specified StampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.StampTargetCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.IStampTargetCar} message StampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StampTargetCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.StampTargetCar} StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StampTargetCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.StampTargetCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.returnCount = reader.uint32(); + break; + } + case 3: { + message.locked = reader.bool(); + break; + } + case 4: { + message.recommended = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("returnCount")) + throw $util.ProtocolError("missing required 'returnCount'", { instance: message }); + if (!message.hasOwnProperty("locked")) + throw $util.ProtocolError("missing required 'locked'", { instance: message }); + if (!message.hasOwnProperty("recommended")) + throw $util.ProtocolError("missing required 'recommended'", { instance: message }); + return message; + }; + + /** + * Decodes a StampTargetCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.StampTargetCar} StampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StampTargetCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StampTargetCar message. + * @function verify + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StampTargetCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.returnCount)) + return "returnCount: integer expected"; + if (typeof message.locked !== "boolean") + return "locked: boolean expected"; + if (typeof message.recommended !== "boolean") + return "recommended: boolean expected"; + return null; + }; + + /** + * Creates a StampTargetCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.StampTargetCar} StampTargetCar + */ + StampTargetCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.StampTargetCar) + return object; + let message = new $root.wm.protobuf.StampTargetCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.StampTargetCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.returnCount != null) + message.returnCount = object.returnCount >>> 0; + if (object.locked != null) + message.locked = Boolean(object.locked); + if (object.recommended != null) + message.recommended = Boolean(object.recommended); + return message; + }; + + /** + * Creates a plain object from a StampTargetCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {wm.protobuf.StampTargetCar} message StampTargetCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StampTargetCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.returnCount = 0; + object.locked = false; + object.recommended = false; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.returnCount != null && message.hasOwnProperty("returnCount")) + object.returnCount = message.returnCount; + if (message.locked != null && message.hasOwnProperty("locked")) + object.locked = message.locked; + if (message.recommended != null && message.hasOwnProperty("recommended")) + object.recommended = message.recommended; + return object; + }; + + /** + * Converts this StampTargetCar to JSON. + * @function toJSON + * @memberof wm.protobuf.StampTargetCar + * @instance + * @returns {Object.} JSON object + */ + StampTargetCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StampTargetCar + * @function getTypeUrl + * @memberof wm.protobuf.StampTargetCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StampTargetCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.StampTargetCar"; + }; + + return StampTargetCar; + })(); + + protobuf.BookmarkedCar = (function() { + + /** + * Properties of a BookmarkedCar. + * @memberof wm.protobuf + * @interface IBookmarkedCar + * @property {wm.protobuf.ICar} car BookmarkedCar car + * @property {number} returnCount BookmarkedCar returnCount + */ + + /** + * Constructs a new BookmarkedCar. + * @memberof wm.protobuf + * @classdesc Represents a BookmarkedCar. + * @implements IBookmarkedCar + * @constructor + * @param {wm.protobuf.IBookmarkedCar=} [properties] Properties to set + */ + function BookmarkedCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BookmarkedCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.BookmarkedCar + * @instance + */ + BookmarkedCar.prototype.car = null; + + /** + * BookmarkedCar returnCount. + * @member {number} returnCount + * @memberof wm.protobuf.BookmarkedCar + * @instance + */ + BookmarkedCar.prototype.returnCount = 0; + + /** + * Creates a new BookmarkedCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.IBookmarkedCar=} [properties] Properties to set + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar instance + */ + BookmarkedCar.create = function create(properties) { + return new BookmarkedCar(properties); + }; + + /** + * Encodes the specified BookmarkedCar message. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.IBookmarkedCar} message BookmarkedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BookmarkedCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.returnCount); + return writer; + }; + + /** + * Encodes the specified BookmarkedCar message, length delimited. Does not implicitly {@link wm.protobuf.BookmarkedCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.IBookmarkedCar} message BookmarkedCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BookmarkedCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BookmarkedCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.BookmarkedCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.returnCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("returnCount")) + throw $util.ProtocolError("missing required 'returnCount'", { instance: message }); + return message; + }; + + /** + * Decodes a BookmarkedCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BookmarkedCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BookmarkedCar message. + * @function verify + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BookmarkedCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.returnCount)) + return "returnCount: integer expected"; + return null; + }; + + /** + * Creates a BookmarkedCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.BookmarkedCar} BookmarkedCar + */ + BookmarkedCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.BookmarkedCar) + return object; + let message = new $root.wm.protobuf.BookmarkedCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.BookmarkedCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.returnCount != null) + message.returnCount = object.returnCount >>> 0; + return message; + }; + + /** + * Creates a plain object from a BookmarkedCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {wm.protobuf.BookmarkedCar} message BookmarkedCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BookmarkedCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.returnCount = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.returnCount != null && message.hasOwnProperty("returnCount")) + object.returnCount = message.returnCount; + return object; + }; + + /** + * Converts this BookmarkedCar to JSON. + * @function toJSON + * @memberof wm.protobuf.BookmarkedCar + * @instance + * @returns {Object.} JSON object + */ + BookmarkedCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BookmarkedCar + * @function getTypeUrl + * @memberof wm.protobuf.BookmarkedCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BookmarkedCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.BookmarkedCar"; + }; + + return BookmarkedCar; + })(); + + protobuf.PreviousVersionStampTargetCar = (function() { + + /** + * Properties of a PreviousVersionStampTargetCar. + * @memberof wm.protobuf + * @interface IPreviousVersionStampTargetCar + * @property {wm.protobuf.ICar} car PreviousVersionStampTargetCar car + * @property {number} returnCount PreviousVersionStampTargetCar returnCount + * @property {number|null} [currentCarId] PreviousVersionStampTargetCar currentCarId + */ + + /** + * Constructs a new PreviousVersionStampTargetCar. + * @memberof wm.protobuf + * @classdesc Represents a PreviousVersionStampTargetCar. + * @implements IPreviousVersionStampTargetCar + * @constructor + * @param {wm.protobuf.IPreviousVersionStampTargetCar=} [properties] Properties to set + */ + function PreviousVersionStampTargetCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PreviousVersionStampTargetCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + */ + PreviousVersionStampTargetCar.prototype.car = null; + + /** + * PreviousVersionStampTargetCar returnCount. + * @member {number} returnCount + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + */ + PreviousVersionStampTargetCar.prototype.returnCount = 0; + + /** + * PreviousVersionStampTargetCar currentCarId. + * @member {number} currentCarId + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + */ + PreviousVersionStampTargetCar.prototype.currentCarId = 0; + + /** + * Creates a new PreviousVersionStampTargetCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.IPreviousVersionStampTargetCar=} [properties] Properties to set + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar instance + */ + PreviousVersionStampTargetCar.create = function create(properties) { + return new PreviousVersionStampTargetCar(properties); + }; + + /** + * Encodes the specified PreviousVersionStampTargetCar message. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.IPreviousVersionStampTargetCar} message PreviousVersionStampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviousVersionStampTargetCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.currentCarId != null && Object.hasOwnProperty.call(message, "currentCarId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.currentCarId); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.returnCount); + return writer; + }; + + /** + * Encodes the specified PreviousVersionStampTargetCar message, length delimited. Does not implicitly {@link wm.protobuf.PreviousVersionStampTargetCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.IPreviousVersionStampTargetCar} message PreviousVersionStampTargetCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviousVersionStampTargetCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviousVersionStampTargetCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PreviousVersionStampTargetCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 3: { + message.returnCount = reader.uint32(); + break; + } + case 2: { + message.currentCarId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + if (!message.hasOwnProperty("returnCount")) + throw $util.ProtocolError("missing required 'returnCount'", { instance: message }); + return message; + }; + + /** + * Decodes a PreviousVersionStampTargetCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviousVersionStampTargetCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PreviousVersionStampTargetCar message. + * @function verify + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreviousVersionStampTargetCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (!$util.isInteger(message.returnCount)) + return "returnCount: integer expected"; + if (message.currentCarId != null && message.hasOwnProperty("currentCarId")) + if (!$util.isInteger(message.currentCarId)) + return "currentCarId: integer expected"; + return null; + }; + + /** + * Creates a PreviousVersionStampTargetCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PreviousVersionStampTargetCar} PreviousVersionStampTargetCar + */ + PreviousVersionStampTargetCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PreviousVersionStampTargetCar) + return object; + let message = new $root.wm.protobuf.PreviousVersionStampTargetCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.PreviousVersionStampTargetCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.returnCount != null) + message.returnCount = object.returnCount >>> 0; + if (object.currentCarId != null) + message.currentCarId = object.currentCarId >>> 0; + return message; + }; + + /** + * Creates a plain object from a PreviousVersionStampTargetCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {wm.protobuf.PreviousVersionStampTargetCar} message PreviousVersionStampTargetCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreviousVersionStampTargetCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.currentCarId = 0; + object.returnCount = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.currentCarId != null && message.hasOwnProperty("currentCarId")) + object.currentCarId = message.currentCarId; + if (message.returnCount != null && message.hasOwnProperty("returnCount")) + object.returnCount = message.returnCount; + return object; + }; + + /** + * Converts this PreviousVersionStampTargetCar to JSON. + * @function toJSON + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @instance + * @returns {Object.} JSON object + */ + PreviousVersionStampTargetCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PreviousVersionStampTargetCar + * @function getTypeUrl + * @memberof wm.protobuf.PreviousVersionStampTargetCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PreviousVersionStampTargetCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PreviousVersionStampTargetCar"; + }; + + return PreviousVersionStampTargetCar; + })(); + + protobuf.GhostCar = (function() { + + /** + * Properties of a GhostCar. + * @memberof wm.protobuf + * @interface IGhostCar + * @property {wm.protobuf.ICar} car GhostCar car + * @property {number|null} [area] GhostCar area + * @property {number|null} [ramp] GhostCar ramp + * @property {number|null} [path] GhostCar path + * @property {boolean|null} [nonhuman] GhostCar nonhuman + * @property {wm.protobuf.GhostType|null} [type] GhostCar type + * @property {number|Long|null} [trailId] GhostCar trailId + */ + + /** + * Constructs a new GhostCar. + * @memberof wm.protobuf + * @classdesc Represents a GhostCar. + * @implements IGhostCar + * @constructor + * @param {wm.protobuf.IGhostCar=} [properties] Properties to set + */ + function GhostCar(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCar car. + * @member {wm.protobuf.ICar} car + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.car = null; + + /** + * GhostCar area. + * @member {number} area + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.area = 0; + + /** + * GhostCar ramp. + * @member {number} ramp + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.ramp = 0; + + /** + * GhostCar path. + * @member {number} path + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.path = 0; + + /** + * GhostCar nonhuman. + * @member {boolean} nonhuman + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.nonhuman = false; + + /** + * GhostCar type. + * @member {wm.protobuf.GhostType} type + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.type = 1; + + /** + * GhostCar trailId. + * @member {number|Long} trailId + * @memberof wm.protobuf.GhostCar + * @instance + */ + GhostCar.prototype.trailId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new GhostCar instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.IGhostCar=} [properties] Properties to set + * @returns {wm.protobuf.GhostCar} GhostCar instance + */ + GhostCar.create = function create(properties) { + return new GhostCar(properties); + }; + + /** + * Encodes the specified GhostCar message. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.IGhostCar} message GhostCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + $root.wm.protobuf.Car.encode(message.car, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.area != null && Object.hasOwnProperty.call(message, "area")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.area); + if (message.ramp != null && Object.hasOwnProperty.call(message, "ramp")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.ramp); + if (message.nonhuman != null && Object.hasOwnProperty.call(message, "nonhuman")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.nonhuman); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.type); + if (message.trailId != null && Object.hasOwnProperty.call(message, "trailId")) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.trailId); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.path); + return writer; + }; + + /** + * Encodes the specified GhostCar message, length delimited. Does not implicitly {@link wm.protobuf.GhostCar.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.IGhostCar} message GhostCar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCar message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCar} GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCar(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.car = $root.wm.protobuf.Car.decode(reader, reader.uint32()); + break; + } + case 2: { + message.area = reader.uint32(); + break; + } + case 3: { + message.ramp = reader.uint32(); + break; + } + case 8: { + message.path = reader.uint32(); + break; + } + case 4: { + message.nonhuman = reader.bool(); + break; + } + case 6: { + message.type = reader.int32(); + break; + } + case 7: { + message.trailId = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("car")) + throw $util.ProtocolError("missing required 'car'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCar} GhostCar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCar message. + * @function verify + * @memberof wm.protobuf.GhostCar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + { + let error = $root.wm.protobuf.Car.verify(message.car); + if (error) + return "car." + error; + } + if (message.area != null && message.hasOwnProperty("area")) + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (message.ramp != null && message.hasOwnProperty("ramp")) + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (message.nonhuman != null && message.hasOwnProperty("nonhuman")) + if (typeof message.nonhuman !== "boolean") + return "nonhuman: boolean expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.trailId != null && message.hasOwnProperty("trailId")) + if (!$util.isInteger(message.trailId) && !(message.trailId && $util.isInteger(message.trailId.low) && $util.isInteger(message.trailId.high))) + return "trailId: integer|Long expected"; + return null; + }; + + /** + * Creates a GhostCar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCar + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCar} GhostCar + */ + GhostCar.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCar) + return object; + let message = new $root.wm.protobuf.GhostCar(); + if (object.car != null) { + if (typeof object.car !== "object") + throw TypeError(".wm.protobuf.GhostCar.car: object expected"); + message.car = $root.wm.protobuf.Car.fromObject(object.car); + } + if (object.area != null) + message.area = object.area >>> 0; + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.nonhuman != null) + message.nonhuman = Boolean(object.nonhuman); + switch (object.type) { + case "GHOST_NORMAL": + case 1: + message.type = 1; + break; + case "GHOST_PINCH_RUNNER": + case 2: + message.type = 2; + break; + case "GHOST_DEFAULT": + case 3: + message.type = 3; + break; + } + if (object.trailId != null) + if ($util.Long) + (message.trailId = $util.Long.fromValue(object.trailId)).unsigned = true; + else if (typeof object.trailId === "string") + message.trailId = parseInt(object.trailId, 10); + else if (typeof object.trailId === "number") + message.trailId = object.trailId; + else if (typeof object.trailId === "object") + message.trailId = new $util.LongBits(object.trailId.low >>> 0, object.trailId.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a GhostCar message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCar + * @static + * @param {wm.protobuf.GhostCar} message GhostCar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCar.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.car = null; + object.area = 0; + object.ramp = 0; + object.nonhuman = false; + object.type = options.enums === String ? "GHOST_NORMAL" : 1; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.trailId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trailId = options.longs === String ? "0" : 0; + object.path = 0; + } + if (message.car != null && message.hasOwnProperty("car")) + object.car = $root.wm.protobuf.Car.toObject(message.car, options); + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.nonhuman != null && message.hasOwnProperty("nonhuman")) + object.nonhuman = message.nonhuman; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.wm.protobuf.GhostType[message.type] : message.type; + if (message.trailId != null && message.hasOwnProperty("trailId")) + if (typeof message.trailId === "number") + object.trailId = options.longs === String ? String(message.trailId) : message.trailId; + else + object.trailId = options.longs === String ? $util.Long.prototype.toString.call(message.trailId) : options.longs === Number ? new $util.LongBits(message.trailId.low >>> 0, message.trailId.high >>> 0).toNumber(true) : message.trailId; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this GhostCar to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCar + * @instance + * @returns {Object.} JSON object + */ + GhostCar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCar + * @function getTypeUrl + * @memberof wm.protobuf.GhostCar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCar"; + }; + + return GhostCar; + })(); + + protobuf.Place = (function() { + + /** + * Properties of a Place. + * @memberof wm.protobuf + * @interface IPlace + * @property {string} placeId Place placeId + * @property {string} shopName Place shopName + * @property {number} regionId Place regionId + * @property {string} country Place country + */ + + /** + * Constructs a new Place. + * @memberof wm.protobuf + * @classdesc Represents a Place. + * @implements IPlace + * @constructor + * @param {wm.protobuf.IPlace=} [properties] Properties to set + */ + function Place(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Place placeId. + * @member {string} placeId + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.placeId = ""; + + /** + * Place shopName. + * @member {string} shopName + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.shopName = ""; + + /** + * Place regionId. + * @member {number} regionId + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.regionId = 0; + + /** + * Place country. + * @member {string} country + * @memberof wm.protobuf.Place + * @instance + */ + Place.prototype.country = ""; + + /** + * Creates a new Place instance using the specified properties. + * @function create + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.IPlace=} [properties] Properties to set + * @returns {wm.protobuf.Place} Place instance + */ + Place.create = function create(properties) { + return new Place(properties); + }; + + /** + * Encodes the specified Place message. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.IPlace} message Place message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Place.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.placeId); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shopName); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.regionId); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.country); + return writer; + }; + + /** + * Encodes the specified Place message, length delimited. Does not implicitly {@link wm.protobuf.Place.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.IPlace} message Place message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Place.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Place message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.Place + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.Place} Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Place.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.Place(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.placeId = reader.string(); + break; + } + case 2: { + message.shopName = reader.string(); + break; + } + case 3: { + message.regionId = reader.uint32(); + break; + } + case 4: { + message.country = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("placeId")) + throw $util.ProtocolError("missing required 'placeId'", { instance: message }); + if (!message.hasOwnProperty("shopName")) + throw $util.ProtocolError("missing required 'shopName'", { instance: message }); + if (!message.hasOwnProperty("regionId")) + throw $util.ProtocolError("missing required 'regionId'", { instance: message }); + if (!message.hasOwnProperty("country")) + throw $util.ProtocolError("missing required 'country'", { instance: message }); + return message; + }; + + /** + * Decodes a Place message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.Place + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.Place} Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Place.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Place message. + * @function verify + * @memberof wm.protobuf.Place + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Place.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.placeId)) + return "placeId: string expected"; + if (!$util.isString(message.shopName)) + return "shopName: string expected"; + if (!$util.isInteger(message.regionId)) + return "regionId: integer expected"; + if (!$util.isString(message.country)) + return "country: string expected"; + return null; + }; + + /** + * Creates a Place message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.Place + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.Place} Place + */ + Place.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.Place) + return object; + let message = new $root.wm.protobuf.Place(); + if (object.placeId != null) + message.placeId = String(object.placeId); + if (object.shopName != null) + message.shopName = String(object.shopName); + if (object.regionId != null) + message.regionId = object.regionId >>> 0; + if (object.country != null) + message.country = String(object.country); + return message; + }; + + /** + * Creates a plain object from a Place message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.Place + * @static + * @param {wm.protobuf.Place} message Place + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Place.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.placeId = ""; + object.shopName = ""; + object.regionId = 0; + object.country = ""; + } + if (message.placeId != null && message.hasOwnProperty("placeId")) + object.placeId = message.placeId; + if (message.shopName != null && message.hasOwnProperty("shopName")) + object.shopName = message.shopName; + if (message.regionId != null && message.hasOwnProperty("regionId")) + object.regionId = message.regionId; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + return object; + }; + + /** + * Converts this Place to JSON. + * @function toJSON + * @memberof wm.protobuf.Place + * @instance + * @returns {Object.} JSON object + */ + Place.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Place + * @function getTypeUrl + * @memberof wm.protobuf.Place + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Place.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.Place"; + }; + + return Place; + })(); + + protobuf.SystemSetting = (function() { + + /** + * Properties of a SystemSetting. + * @memberof wm.protobuf + * @interface ISystemSetting + * @property {number} mCoinChute SystemSetting mCoinChute + * @property {number} mBuyCardCost SystemSetting mBuyCardCost + * @property {number} mGameCost SystemSetting mGameCost + * @property {number} mContinueCost SystemSetting mContinueCost + * @property {number} mFullCourseCost SystemSetting mFullCourseCost + * @property {boolean} mFreePlay SystemSetting mFreePlay + * @property {number|null} [mPcbId] SystemSetting mPcbId + * @property {boolean} mIcCardRw SystemSetting mIcCardRw + * @property {boolean} mIcCardVender SystemSetting mIcCardVender + * @property {boolean|null} [mMgCardRw] SystemSetting mMgCardRw + * @property {boolean|null} [mForceFeedback] SystemSetting mForceFeedback + * @property {boolean} mWinsAndRemains SystemSetting mWinsAndRemains + * @property {number} mEventMode SystemSetting mEventMode + * @property {boolean} mEventModeDist SystemSetting mEventModeDist + * @property {number} mCloseType SystemSetting mCloseType + * @property {number} mCloseSun SystemSetting mCloseSun + * @property {number} mCloseMon SystemSetting mCloseMon + * @property {number} mCloseTue SystemSetting mCloseTue + * @property {number} mCloseWed SystemSetting mCloseWed + * @property {number} mCloseThu SystemSetting mCloseThu + * @property {number} mCloseFri SystemSetting mCloseFri + * @property {number} mCloseSat SystemSetting mCloseSat + * @property {number} mCloseDay SystemSetting mCloseDay + * @property {boolean|null} [mTouchPanel] SystemSetting mTouchPanel + * @property {number} mGameVol SystemSetting mGameVol + * @property {number} mAttractVol SystemSetting mAttractVol + * @property {number|null} [mCalibHandleCenter] SystemSetting mCalibHandleCenter + * @property {number|null} [mCalibAccelCenter] SystemSetting mCalibAccelCenter + * @property {number|null} [mCalibBrakeCenter] SystemSetting mCalibBrakeCenter + * @property {number|null} [mCalibTouchLeft] SystemSetting mCalibTouchLeft + * @property {number|null} [mCalibTouchRight] SystemSetting mCalibTouchRight + * @property {number|null} [mCalibTouchTop] SystemSetting mCalibTouchTop + * @property {number|null} [mCalibTouchBottom] SystemSetting mCalibTouchBottom + */ + + /** + * Constructs a new SystemSetting. + * @memberof wm.protobuf + * @classdesc Represents a SystemSetting. + * @implements ISystemSetting + * @constructor + * @param {wm.protobuf.ISystemSetting=} [properties] Properties to set + */ + function SystemSetting(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SystemSetting mCoinChute. + * @member {number} mCoinChute + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCoinChute = 0; + + /** + * SystemSetting mBuyCardCost. + * @member {number} mBuyCardCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mBuyCardCost = 0; + + /** + * SystemSetting mGameCost. + * @member {number} mGameCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mGameCost = 0; + + /** + * SystemSetting mContinueCost. + * @member {number} mContinueCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mContinueCost = 0; + + /** + * SystemSetting mFullCourseCost. + * @member {number} mFullCourseCost + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mFullCourseCost = 0; + + /** + * SystemSetting mFreePlay. + * @member {boolean} mFreePlay + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mFreePlay = false; + + /** + * SystemSetting mPcbId. + * @member {number} mPcbId + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mPcbId = 0; + + /** + * SystemSetting mIcCardRw. + * @member {boolean} mIcCardRw + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mIcCardRw = false; + + /** + * SystemSetting mIcCardVender. + * @member {boolean} mIcCardVender + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mIcCardVender = false; + + /** + * SystemSetting mMgCardRw. + * @member {boolean} mMgCardRw + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mMgCardRw = false; + + /** + * SystemSetting mForceFeedback. + * @member {boolean} mForceFeedback + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mForceFeedback = false; + + /** + * SystemSetting mWinsAndRemains. + * @member {boolean} mWinsAndRemains + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mWinsAndRemains = false; + + /** + * SystemSetting mEventMode. + * @member {number} mEventMode + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mEventMode = 0; + + /** + * SystemSetting mEventModeDist. + * @member {boolean} mEventModeDist + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mEventModeDist = false; + + /** + * SystemSetting mCloseType. + * @member {number} mCloseType + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseType = 0; + + /** + * SystemSetting mCloseSun. + * @member {number} mCloseSun + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseSun = 0; + + /** + * SystemSetting mCloseMon. + * @member {number} mCloseMon + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseMon = 0; + + /** + * SystemSetting mCloseTue. + * @member {number} mCloseTue + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseTue = 0; + + /** + * SystemSetting mCloseWed. + * @member {number} mCloseWed + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseWed = 0; + + /** + * SystemSetting mCloseThu. + * @member {number} mCloseThu + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseThu = 0; + + /** + * SystemSetting mCloseFri. + * @member {number} mCloseFri + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseFri = 0; + + /** + * SystemSetting mCloseSat. + * @member {number} mCloseSat + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseSat = 0; + + /** + * SystemSetting mCloseDay. + * @member {number} mCloseDay + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCloseDay = 0; + + /** + * SystemSetting mTouchPanel. + * @member {boolean} mTouchPanel + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mTouchPanel = false; + + /** + * SystemSetting mGameVol. + * @member {number} mGameVol + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mGameVol = 0; + + /** + * SystemSetting mAttractVol. + * @member {number} mAttractVol + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mAttractVol = 0; + + /** + * SystemSetting mCalibHandleCenter. + * @member {number} mCalibHandleCenter + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibHandleCenter = 0; + + /** + * SystemSetting mCalibAccelCenter. + * @member {number} mCalibAccelCenter + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibAccelCenter = 0; + + /** + * SystemSetting mCalibBrakeCenter. + * @member {number} mCalibBrakeCenter + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibBrakeCenter = 0; + + /** + * SystemSetting mCalibTouchLeft. + * @member {number} mCalibTouchLeft + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchLeft = 0; + + /** + * SystemSetting mCalibTouchRight. + * @member {number} mCalibTouchRight + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchRight = 0; + + /** + * SystemSetting mCalibTouchTop. + * @member {number} mCalibTouchTop + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchTop = 0; + + /** + * SystemSetting mCalibTouchBottom. + * @member {number} mCalibTouchBottom + * @memberof wm.protobuf.SystemSetting + * @instance + */ + SystemSetting.prototype.mCalibTouchBottom = 0; + + /** + * Creates a new SystemSetting instance using the specified properties. + * @function create + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.ISystemSetting=} [properties] Properties to set + * @returns {wm.protobuf.SystemSetting} SystemSetting instance + */ + SystemSetting.create = function create(properties) { + return new SystemSetting(properties); + }; + + /** + * Encodes the specified SystemSetting message. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.ISystemSetting} message SystemSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.mCoinChute); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.mBuyCardCost); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.mGameCost); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mContinueCost); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.mFullCourseCost); + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.mFreePlay); + if (message.mPcbId != null && Object.hasOwnProperty.call(message, "mPcbId")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.mPcbId); + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.mIcCardRw); + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.mIcCardVender); + if (message.mMgCardRw != null && Object.hasOwnProperty.call(message, "mMgCardRw")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.mMgCardRw); + if (message.mForceFeedback != null && Object.hasOwnProperty.call(message, "mForceFeedback")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.mForceFeedback); + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.mWinsAndRemains); + writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.mEventMode); + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.mEventModeDist); + writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.mCloseType); + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.mCloseSun); + writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.mCloseMon); + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.mCloseTue); + writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.mCloseWed); + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.mCloseThu); + writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.mCloseFri); + writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.mCloseSat); + writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.mCloseDay); + if (message.mTouchPanel != null && Object.hasOwnProperty.call(message, "mTouchPanel")) + writer.uint32(/* id 24, wireType 0 =*/192).bool(message.mTouchPanel); + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.mGameVol); + writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.mAttractVol); + if (message.mCalibHandleCenter != null && Object.hasOwnProperty.call(message, "mCalibHandleCenter")) + writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.mCalibHandleCenter); + if (message.mCalibAccelCenter != null && Object.hasOwnProperty.call(message, "mCalibAccelCenter")) + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.mCalibAccelCenter); + if (message.mCalibBrakeCenter != null && Object.hasOwnProperty.call(message, "mCalibBrakeCenter")) + writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.mCalibBrakeCenter); + if (message.mCalibTouchLeft != null && Object.hasOwnProperty.call(message, "mCalibTouchLeft")) + writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.mCalibTouchLeft); + if (message.mCalibTouchRight != null && Object.hasOwnProperty.call(message, "mCalibTouchRight")) + writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.mCalibTouchRight); + if (message.mCalibTouchTop != null && Object.hasOwnProperty.call(message, "mCalibTouchTop")) + writer.uint32(/* id 32, wireType 0 =*/256).uint32(message.mCalibTouchTop); + if (message.mCalibTouchBottom != null && Object.hasOwnProperty.call(message, "mCalibTouchBottom")) + writer.uint32(/* id 33, wireType 0 =*/264).uint32(message.mCalibTouchBottom); + return writer; + }; + + /** + * Encodes the specified SystemSetting message, length delimited. Does not implicitly {@link wm.protobuf.SystemSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.ISystemSetting} message SystemSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SystemSetting message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.SystemSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.SystemSetting} SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.SystemSetting(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mCoinChute = reader.uint32(); + break; + } + case 2: { + message.mBuyCardCost = reader.uint32(); + break; + } + case 3: { + message.mGameCost = reader.uint32(); + break; + } + case 4: { + message.mContinueCost = reader.uint32(); + break; + } + case 5: { + message.mFullCourseCost = reader.uint32(); + break; + } + case 6: { + message.mFreePlay = reader.bool(); + break; + } + case 7: { + message.mPcbId = reader.uint32(); + break; + } + case 8: { + message.mIcCardRw = reader.bool(); + break; + } + case 9: { + message.mIcCardVender = reader.bool(); + break; + } + case 10: { + message.mMgCardRw = reader.bool(); + break; + } + case 11: { + message.mForceFeedback = reader.bool(); + break; + } + case 12: { + message.mWinsAndRemains = reader.bool(); + break; + } + case 13: { + message.mEventMode = reader.uint32(); + break; + } + case 14: { + message.mEventModeDist = reader.bool(); + break; + } + case 15: { + message.mCloseType = reader.uint32(); + break; + } + case 16: { + message.mCloseSun = reader.uint32(); + break; + } + case 17: { + message.mCloseMon = reader.uint32(); + break; + } + case 18: { + message.mCloseTue = reader.uint32(); + break; + } + case 19: { + message.mCloseWed = reader.uint32(); + break; + } + case 20: { + message.mCloseThu = reader.uint32(); + break; + } + case 21: { + message.mCloseFri = reader.uint32(); + break; + } + case 22: { + message.mCloseSat = reader.uint32(); + break; + } + case 23: { + message.mCloseDay = reader.uint32(); + break; + } + case 24: { + message.mTouchPanel = reader.bool(); + break; + } + case 25: { + message.mGameVol = reader.uint32(); + break; + } + case 26: { + message.mAttractVol = reader.uint32(); + break; + } + case 27: { + message.mCalibHandleCenter = reader.uint32(); + break; + } + case 28: { + message.mCalibAccelCenter = reader.uint32(); + break; + } + case 29: { + message.mCalibBrakeCenter = reader.uint32(); + break; + } + case 30: { + message.mCalibTouchLeft = reader.uint32(); + break; + } + case 31: { + message.mCalibTouchRight = reader.uint32(); + break; + } + case 32: { + message.mCalibTouchTop = reader.uint32(); + break; + } + case 33: { + message.mCalibTouchBottom = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("mCoinChute")) + throw $util.ProtocolError("missing required 'mCoinChute'", { instance: message }); + if (!message.hasOwnProperty("mBuyCardCost")) + throw $util.ProtocolError("missing required 'mBuyCardCost'", { instance: message }); + if (!message.hasOwnProperty("mGameCost")) + throw $util.ProtocolError("missing required 'mGameCost'", { instance: message }); + if (!message.hasOwnProperty("mContinueCost")) + throw $util.ProtocolError("missing required 'mContinueCost'", { instance: message }); + if (!message.hasOwnProperty("mFullCourseCost")) + throw $util.ProtocolError("missing required 'mFullCourseCost'", { instance: message }); + if (!message.hasOwnProperty("mFreePlay")) + throw $util.ProtocolError("missing required 'mFreePlay'", { instance: message }); + if (!message.hasOwnProperty("mIcCardRw")) + throw $util.ProtocolError("missing required 'mIcCardRw'", { instance: message }); + if (!message.hasOwnProperty("mIcCardVender")) + throw $util.ProtocolError("missing required 'mIcCardVender'", { instance: message }); + if (!message.hasOwnProperty("mWinsAndRemains")) + throw $util.ProtocolError("missing required 'mWinsAndRemains'", { instance: message }); + if (!message.hasOwnProperty("mEventMode")) + throw $util.ProtocolError("missing required 'mEventMode'", { instance: message }); + if (!message.hasOwnProperty("mEventModeDist")) + throw $util.ProtocolError("missing required 'mEventModeDist'", { instance: message }); + if (!message.hasOwnProperty("mCloseType")) + throw $util.ProtocolError("missing required 'mCloseType'", { instance: message }); + if (!message.hasOwnProperty("mCloseSun")) + throw $util.ProtocolError("missing required 'mCloseSun'", { instance: message }); + if (!message.hasOwnProperty("mCloseMon")) + throw $util.ProtocolError("missing required 'mCloseMon'", { instance: message }); + if (!message.hasOwnProperty("mCloseTue")) + throw $util.ProtocolError("missing required 'mCloseTue'", { instance: message }); + if (!message.hasOwnProperty("mCloseWed")) + throw $util.ProtocolError("missing required 'mCloseWed'", { instance: message }); + if (!message.hasOwnProperty("mCloseThu")) + throw $util.ProtocolError("missing required 'mCloseThu'", { instance: message }); + if (!message.hasOwnProperty("mCloseFri")) + throw $util.ProtocolError("missing required 'mCloseFri'", { instance: message }); + if (!message.hasOwnProperty("mCloseSat")) + throw $util.ProtocolError("missing required 'mCloseSat'", { instance: message }); + if (!message.hasOwnProperty("mCloseDay")) + throw $util.ProtocolError("missing required 'mCloseDay'", { instance: message }); + if (!message.hasOwnProperty("mGameVol")) + throw $util.ProtocolError("missing required 'mGameVol'", { instance: message }); + if (!message.hasOwnProperty("mAttractVol")) + throw $util.ProtocolError("missing required 'mAttractVol'", { instance: message }); + return message; + }; + + /** + * Decodes a SystemSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.SystemSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.SystemSetting} SystemSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SystemSetting message. + * @function verify + * @memberof wm.protobuf.SystemSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SystemSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.mCoinChute)) + return "mCoinChute: integer expected"; + if (!$util.isInteger(message.mBuyCardCost)) + return "mBuyCardCost: integer expected"; + if (!$util.isInteger(message.mGameCost)) + return "mGameCost: integer expected"; + if (!$util.isInteger(message.mContinueCost)) + return "mContinueCost: integer expected"; + if (!$util.isInteger(message.mFullCourseCost)) + return "mFullCourseCost: integer expected"; + if (typeof message.mFreePlay !== "boolean") + return "mFreePlay: boolean expected"; + if (message.mPcbId != null && message.hasOwnProperty("mPcbId")) + if (!$util.isInteger(message.mPcbId)) + return "mPcbId: integer expected"; + if (typeof message.mIcCardRw !== "boolean") + return "mIcCardRw: boolean expected"; + if (typeof message.mIcCardVender !== "boolean") + return "mIcCardVender: boolean expected"; + if (message.mMgCardRw != null && message.hasOwnProperty("mMgCardRw")) + if (typeof message.mMgCardRw !== "boolean") + return "mMgCardRw: boolean expected"; + if (message.mForceFeedback != null && message.hasOwnProperty("mForceFeedback")) + if (typeof message.mForceFeedback !== "boolean") + return "mForceFeedback: boolean expected"; + if (typeof message.mWinsAndRemains !== "boolean") + return "mWinsAndRemains: boolean expected"; + if (!$util.isInteger(message.mEventMode)) + return "mEventMode: integer expected"; + if (typeof message.mEventModeDist !== "boolean") + return "mEventModeDist: boolean expected"; + if (!$util.isInteger(message.mCloseType)) + return "mCloseType: integer expected"; + if (!$util.isInteger(message.mCloseSun)) + return "mCloseSun: integer expected"; + if (!$util.isInteger(message.mCloseMon)) + return "mCloseMon: integer expected"; + if (!$util.isInteger(message.mCloseTue)) + return "mCloseTue: integer expected"; + if (!$util.isInteger(message.mCloseWed)) + return "mCloseWed: integer expected"; + if (!$util.isInteger(message.mCloseThu)) + return "mCloseThu: integer expected"; + if (!$util.isInteger(message.mCloseFri)) + return "mCloseFri: integer expected"; + if (!$util.isInteger(message.mCloseSat)) + return "mCloseSat: integer expected"; + if (!$util.isInteger(message.mCloseDay)) + return "mCloseDay: integer expected"; + if (message.mTouchPanel != null && message.hasOwnProperty("mTouchPanel")) + if (typeof message.mTouchPanel !== "boolean") + return "mTouchPanel: boolean expected"; + if (!$util.isInteger(message.mGameVol)) + return "mGameVol: integer expected"; + if (!$util.isInteger(message.mAttractVol)) + return "mAttractVol: integer expected"; + if (message.mCalibHandleCenter != null && message.hasOwnProperty("mCalibHandleCenter")) + if (!$util.isInteger(message.mCalibHandleCenter)) + return "mCalibHandleCenter: integer expected"; + if (message.mCalibAccelCenter != null && message.hasOwnProperty("mCalibAccelCenter")) + if (!$util.isInteger(message.mCalibAccelCenter)) + return "mCalibAccelCenter: integer expected"; + if (message.mCalibBrakeCenter != null && message.hasOwnProperty("mCalibBrakeCenter")) + if (!$util.isInteger(message.mCalibBrakeCenter)) + return "mCalibBrakeCenter: integer expected"; + if (message.mCalibTouchLeft != null && message.hasOwnProperty("mCalibTouchLeft")) + if (!$util.isInteger(message.mCalibTouchLeft)) + return "mCalibTouchLeft: integer expected"; + if (message.mCalibTouchRight != null && message.hasOwnProperty("mCalibTouchRight")) + if (!$util.isInteger(message.mCalibTouchRight)) + return "mCalibTouchRight: integer expected"; + if (message.mCalibTouchTop != null && message.hasOwnProperty("mCalibTouchTop")) + if (!$util.isInteger(message.mCalibTouchTop)) + return "mCalibTouchTop: integer expected"; + if (message.mCalibTouchBottom != null && message.hasOwnProperty("mCalibTouchBottom")) + if (!$util.isInteger(message.mCalibTouchBottom)) + return "mCalibTouchBottom: integer expected"; + return null; + }; + + /** + * Creates a SystemSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.SystemSetting + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.SystemSetting} SystemSetting + */ + SystemSetting.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.SystemSetting) + return object; + let message = new $root.wm.protobuf.SystemSetting(); + if (object.mCoinChute != null) + message.mCoinChute = object.mCoinChute >>> 0; + if (object.mBuyCardCost != null) + message.mBuyCardCost = object.mBuyCardCost >>> 0; + if (object.mGameCost != null) + message.mGameCost = object.mGameCost >>> 0; + if (object.mContinueCost != null) + message.mContinueCost = object.mContinueCost >>> 0; + if (object.mFullCourseCost != null) + message.mFullCourseCost = object.mFullCourseCost >>> 0; + if (object.mFreePlay != null) + message.mFreePlay = Boolean(object.mFreePlay); + if (object.mPcbId != null) + message.mPcbId = object.mPcbId >>> 0; + if (object.mIcCardRw != null) + message.mIcCardRw = Boolean(object.mIcCardRw); + if (object.mIcCardVender != null) + message.mIcCardVender = Boolean(object.mIcCardVender); + if (object.mMgCardRw != null) + message.mMgCardRw = Boolean(object.mMgCardRw); + if (object.mForceFeedback != null) + message.mForceFeedback = Boolean(object.mForceFeedback); + if (object.mWinsAndRemains != null) + message.mWinsAndRemains = Boolean(object.mWinsAndRemains); + if (object.mEventMode != null) + message.mEventMode = object.mEventMode >>> 0; + if (object.mEventModeDist != null) + message.mEventModeDist = Boolean(object.mEventModeDist); + if (object.mCloseType != null) + message.mCloseType = object.mCloseType >>> 0; + if (object.mCloseSun != null) + message.mCloseSun = object.mCloseSun >>> 0; + if (object.mCloseMon != null) + message.mCloseMon = object.mCloseMon >>> 0; + if (object.mCloseTue != null) + message.mCloseTue = object.mCloseTue >>> 0; + if (object.mCloseWed != null) + message.mCloseWed = object.mCloseWed >>> 0; + if (object.mCloseThu != null) + message.mCloseThu = object.mCloseThu >>> 0; + if (object.mCloseFri != null) + message.mCloseFri = object.mCloseFri >>> 0; + if (object.mCloseSat != null) + message.mCloseSat = object.mCloseSat >>> 0; + if (object.mCloseDay != null) + message.mCloseDay = object.mCloseDay >>> 0; + if (object.mTouchPanel != null) + message.mTouchPanel = Boolean(object.mTouchPanel); + if (object.mGameVol != null) + message.mGameVol = object.mGameVol >>> 0; + if (object.mAttractVol != null) + message.mAttractVol = object.mAttractVol >>> 0; + if (object.mCalibHandleCenter != null) + message.mCalibHandleCenter = object.mCalibHandleCenter >>> 0; + if (object.mCalibAccelCenter != null) + message.mCalibAccelCenter = object.mCalibAccelCenter >>> 0; + if (object.mCalibBrakeCenter != null) + message.mCalibBrakeCenter = object.mCalibBrakeCenter >>> 0; + if (object.mCalibTouchLeft != null) + message.mCalibTouchLeft = object.mCalibTouchLeft >>> 0; + if (object.mCalibTouchRight != null) + message.mCalibTouchRight = object.mCalibTouchRight >>> 0; + if (object.mCalibTouchTop != null) + message.mCalibTouchTop = object.mCalibTouchTop >>> 0; + if (object.mCalibTouchBottom != null) + message.mCalibTouchBottom = object.mCalibTouchBottom >>> 0; + return message; + }; + + /** + * Creates a plain object from a SystemSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.SystemSetting + * @static + * @param {wm.protobuf.SystemSetting} message SystemSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SystemSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.mCoinChute = 0; + object.mBuyCardCost = 0; + object.mGameCost = 0; + object.mContinueCost = 0; + object.mFullCourseCost = 0; + object.mFreePlay = false; + object.mPcbId = 0; + object.mIcCardRw = false; + object.mIcCardVender = false; + object.mMgCardRw = false; + object.mForceFeedback = false; + object.mWinsAndRemains = false; + object.mEventMode = 0; + object.mEventModeDist = false; + object.mCloseType = 0; + object.mCloseSun = 0; + object.mCloseMon = 0; + object.mCloseTue = 0; + object.mCloseWed = 0; + object.mCloseThu = 0; + object.mCloseFri = 0; + object.mCloseSat = 0; + object.mCloseDay = 0; + object.mTouchPanel = false; + object.mGameVol = 0; + object.mAttractVol = 0; + object.mCalibHandleCenter = 0; + object.mCalibAccelCenter = 0; + object.mCalibBrakeCenter = 0; + object.mCalibTouchLeft = 0; + object.mCalibTouchRight = 0; + object.mCalibTouchTop = 0; + object.mCalibTouchBottom = 0; + } + if (message.mCoinChute != null && message.hasOwnProperty("mCoinChute")) + object.mCoinChute = message.mCoinChute; + if (message.mBuyCardCost != null && message.hasOwnProperty("mBuyCardCost")) + object.mBuyCardCost = message.mBuyCardCost; + if (message.mGameCost != null && message.hasOwnProperty("mGameCost")) + object.mGameCost = message.mGameCost; + if (message.mContinueCost != null && message.hasOwnProperty("mContinueCost")) + object.mContinueCost = message.mContinueCost; + if (message.mFullCourseCost != null && message.hasOwnProperty("mFullCourseCost")) + object.mFullCourseCost = message.mFullCourseCost; + if (message.mFreePlay != null && message.hasOwnProperty("mFreePlay")) + object.mFreePlay = message.mFreePlay; + if (message.mPcbId != null && message.hasOwnProperty("mPcbId")) + object.mPcbId = message.mPcbId; + if (message.mIcCardRw != null && message.hasOwnProperty("mIcCardRw")) + object.mIcCardRw = message.mIcCardRw; + if (message.mIcCardVender != null && message.hasOwnProperty("mIcCardVender")) + object.mIcCardVender = message.mIcCardVender; + if (message.mMgCardRw != null && message.hasOwnProperty("mMgCardRw")) + object.mMgCardRw = message.mMgCardRw; + if (message.mForceFeedback != null && message.hasOwnProperty("mForceFeedback")) + object.mForceFeedback = message.mForceFeedback; + if (message.mWinsAndRemains != null && message.hasOwnProperty("mWinsAndRemains")) + object.mWinsAndRemains = message.mWinsAndRemains; + if (message.mEventMode != null && message.hasOwnProperty("mEventMode")) + object.mEventMode = message.mEventMode; + if (message.mEventModeDist != null && message.hasOwnProperty("mEventModeDist")) + object.mEventModeDist = message.mEventModeDist; + if (message.mCloseType != null && message.hasOwnProperty("mCloseType")) + object.mCloseType = message.mCloseType; + if (message.mCloseSun != null && message.hasOwnProperty("mCloseSun")) + object.mCloseSun = message.mCloseSun; + if (message.mCloseMon != null && message.hasOwnProperty("mCloseMon")) + object.mCloseMon = message.mCloseMon; + if (message.mCloseTue != null && message.hasOwnProperty("mCloseTue")) + object.mCloseTue = message.mCloseTue; + if (message.mCloseWed != null && message.hasOwnProperty("mCloseWed")) + object.mCloseWed = message.mCloseWed; + if (message.mCloseThu != null && message.hasOwnProperty("mCloseThu")) + object.mCloseThu = message.mCloseThu; + if (message.mCloseFri != null && message.hasOwnProperty("mCloseFri")) + object.mCloseFri = message.mCloseFri; + if (message.mCloseSat != null && message.hasOwnProperty("mCloseSat")) + object.mCloseSat = message.mCloseSat; + if (message.mCloseDay != null && message.hasOwnProperty("mCloseDay")) + object.mCloseDay = message.mCloseDay; + if (message.mTouchPanel != null && message.hasOwnProperty("mTouchPanel")) + object.mTouchPanel = message.mTouchPanel; + if (message.mGameVol != null && message.hasOwnProperty("mGameVol")) + object.mGameVol = message.mGameVol; + if (message.mAttractVol != null && message.hasOwnProperty("mAttractVol")) + object.mAttractVol = message.mAttractVol; + if (message.mCalibHandleCenter != null && message.hasOwnProperty("mCalibHandleCenter")) + object.mCalibHandleCenter = message.mCalibHandleCenter; + if (message.mCalibAccelCenter != null && message.hasOwnProperty("mCalibAccelCenter")) + object.mCalibAccelCenter = message.mCalibAccelCenter; + if (message.mCalibBrakeCenter != null && message.hasOwnProperty("mCalibBrakeCenter")) + object.mCalibBrakeCenter = message.mCalibBrakeCenter; + if (message.mCalibTouchLeft != null && message.hasOwnProperty("mCalibTouchLeft")) + object.mCalibTouchLeft = message.mCalibTouchLeft; + if (message.mCalibTouchRight != null && message.hasOwnProperty("mCalibTouchRight")) + object.mCalibTouchRight = message.mCalibTouchRight; + if (message.mCalibTouchTop != null && message.hasOwnProperty("mCalibTouchTop")) + object.mCalibTouchTop = message.mCalibTouchTop; + if (message.mCalibTouchBottom != null && message.hasOwnProperty("mCalibTouchBottom")) + object.mCalibTouchBottom = message.mCalibTouchBottom; + return object; + }; + + /** + * Converts this SystemSetting to JSON. + * @function toJSON + * @memberof wm.protobuf.SystemSetting + * @instance + * @returns {Object.} JSON object + */ + SystemSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SystemSetting + * @function getTypeUrl + * @memberof wm.protobuf.SystemSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SystemSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.SystemSetting"; + }; + + return SystemSetting; + })(); + + protobuf.GhostCompetitionSchedule = (function() { + + /** + * Properties of a GhostCompetitionSchedule. + * @memberof wm.protobuf + * @interface IGhostCompetitionSchedule + * @property {number} competitionId GhostCompetitionSchedule competitionId + * @property {number} qualifyingPeriodStartAt GhostCompetitionSchedule qualifyingPeriodStartAt + * @property {number} qualifyingPeriodCloseAt GhostCompetitionSchedule qualifyingPeriodCloseAt + * @property {number} competitionStartAt GhostCompetitionSchedule competitionStartAt + * @property {number} competitionCloseAt GhostCompetitionSchedule competitionCloseAt + * @property {number} competitionEndAt GhostCompetitionSchedule competitionEndAt + * @property {number} lengthOfPeriod GhostCompetitionSchedule lengthOfPeriod + * @property {number} lengthOfInterval GhostCompetitionSchedule lengthOfInterval + * @property {number} area GhostCompetitionSchedule area + * @property {number} minigamePatternId GhostCompetitionSchedule minigamePatternId + */ + + /** + * Constructs a new GhostCompetitionSchedule. + * @memberof wm.protobuf + * @classdesc Represents a GhostCompetitionSchedule. + * @implements IGhostCompetitionSchedule + * @constructor + * @param {wm.protobuf.IGhostCompetitionSchedule=} [properties] Properties to set + */ + function GhostCompetitionSchedule(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionSchedule competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionId = 0; + + /** + * GhostCompetitionSchedule qualifyingPeriodStartAt. + * @member {number} qualifyingPeriodStartAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.qualifyingPeriodStartAt = 0; + + /** + * GhostCompetitionSchedule qualifyingPeriodCloseAt. + * @member {number} qualifyingPeriodCloseAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.qualifyingPeriodCloseAt = 0; + + /** + * GhostCompetitionSchedule competitionStartAt. + * @member {number} competitionStartAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionStartAt = 0; + + /** + * GhostCompetitionSchedule competitionCloseAt. + * @member {number} competitionCloseAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionCloseAt = 0; + + /** + * GhostCompetitionSchedule competitionEndAt. + * @member {number} competitionEndAt + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.competitionEndAt = 0; + + /** + * GhostCompetitionSchedule lengthOfPeriod. + * @member {number} lengthOfPeriod + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.lengthOfPeriod = 0; + + /** + * GhostCompetitionSchedule lengthOfInterval. + * @member {number} lengthOfInterval + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.lengthOfInterval = 0; + + /** + * GhostCompetitionSchedule area. + * @member {number} area + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.area = 0; + + /** + * GhostCompetitionSchedule minigamePatternId. + * @member {number} minigamePatternId + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + */ + GhostCompetitionSchedule.prototype.minigamePatternId = 0; + + /** + * Creates a new GhostCompetitionSchedule instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.IGhostCompetitionSchedule=} [properties] Properties to set + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule instance + */ + GhostCompetitionSchedule.create = function create(properties) { + return new GhostCompetitionSchedule(properties); + }; + + /** + * Encodes the specified GhostCompetitionSchedule message. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.IGhostCompetitionSchedule} message GhostCompetitionSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.competitionId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.qualifyingPeriodStartAt); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.qualifyingPeriodCloseAt); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.competitionStartAt); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.competitionCloseAt); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.competitionEndAt); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.lengthOfPeriod); + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.lengthOfInterval); + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.area); + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.minigamePatternId); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionSchedule message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.IGhostCompetitionSchedule} message GhostCompetitionSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionSchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCompetitionSchedule(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.competitionId = reader.uint32(); + break; + } + case 2: { + message.qualifyingPeriodStartAt = reader.uint32(); + break; + } + case 3: { + message.qualifyingPeriodCloseAt = reader.uint32(); + break; + } + case 4: { + message.competitionStartAt = reader.uint32(); + break; + } + case 5: { + message.competitionCloseAt = reader.uint32(); + break; + } + case 6: { + message.competitionEndAt = reader.uint32(); + break; + } + case 7: { + message.lengthOfPeriod = reader.uint32(); + break; + } + case 8: { + message.lengthOfInterval = reader.uint32(); + break; + } + case 9: { + message.area = reader.uint32(); + break; + } + case 10: { + message.minigamePatternId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + if (!message.hasOwnProperty("qualifyingPeriodStartAt")) + throw $util.ProtocolError("missing required 'qualifyingPeriodStartAt'", { instance: message }); + if (!message.hasOwnProperty("qualifyingPeriodCloseAt")) + throw $util.ProtocolError("missing required 'qualifyingPeriodCloseAt'", { instance: message }); + if (!message.hasOwnProperty("competitionStartAt")) + throw $util.ProtocolError("missing required 'competitionStartAt'", { instance: message }); + if (!message.hasOwnProperty("competitionCloseAt")) + throw $util.ProtocolError("missing required 'competitionCloseAt'", { instance: message }); + if (!message.hasOwnProperty("competitionEndAt")) + throw $util.ProtocolError("missing required 'competitionEndAt'", { instance: message }); + if (!message.hasOwnProperty("lengthOfPeriod")) + throw $util.ProtocolError("missing required 'lengthOfPeriod'", { instance: message }); + if (!message.hasOwnProperty("lengthOfInterval")) + throw $util.ProtocolError("missing required 'lengthOfInterval'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("minigamePatternId")) + throw $util.ProtocolError("missing required 'minigamePatternId'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionSchedule message. + * @function verify + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + if (!$util.isInteger(message.qualifyingPeriodStartAt)) + return "qualifyingPeriodStartAt: integer expected"; + if (!$util.isInteger(message.qualifyingPeriodCloseAt)) + return "qualifyingPeriodCloseAt: integer expected"; + if (!$util.isInteger(message.competitionStartAt)) + return "competitionStartAt: integer expected"; + if (!$util.isInteger(message.competitionCloseAt)) + return "competitionCloseAt: integer expected"; + if (!$util.isInteger(message.competitionEndAt)) + return "competitionEndAt: integer expected"; + if (!$util.isInteger(message.lengthOfPeriod)) + return "lengthOfPeriod: integer expected"; + if (!$util.isInteger(message.lengthOfInterval)) + return "lengthOfInterval: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.minigamePatternId)) + return "minigamePatternId: integer expected"; + return null; + }; + + /** + * Creates a GhostCompetitionSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCompetitionSchedule} GhostCompetitionSchedule + */ + GhostCompetitionSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCompetitionSchedule) + return object; + let message = new $root.wm.protobuf.GhostCompetitionSchedule(); + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + if (object.qualifyingPeriodStartAt != null) + message.qualifyingPeriodStartAt = object.qualifyingPeriodStartAt >>> 0; + if (object.qualifyingPeriodCloseAt != null) + message.qualifyingPeriodCloseAt = object.qualifyingPeriodCloseAt >>> 0; + if (object.competitionStartAt != null) + message.competitionStartAt = object.competitionStartAt >>> 0; + if (object.competitionCloseAt != null) + message.competitionCloseAt = object.competitionCloseAt >>> 0; + if (object.competitionEndAt != null) + message.competitionEndAt = object.competitionEndAt >>> 0; + if (object.lengthOfPeriod != null) + message.lengthOfPeriod = object.lengthOfPeriod >>> 0; + if (object.lengthOfInterval != null) + message.lengthOfInterval = object.lengthOfInterval >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.minigamePatternId != null) + message.minigamePatternId = object.minigamePatternId >>> 0; + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {wm.protobuf.GhostCompetitionSchedule} message GhostCompetitionSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.competitionId = 0; + object.qualifyingPeriodStartAt = 0; + object.qualifyingPeriodCloseAt = 0; + object.competitionStartAt = 0; + object.competitionCloseAt = 0; + object.competitionEndAt = 0; + object.lengthOfPeriod = 0; + object.lengthOfInterval = 0; + object.area = 0; + object.minigamePatternId = 0; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + if (message.qualifyingPeriodStartAt != null && message.hasOwnProperty("qualifyingPeriodStartAt")) + object.qualifyingPeriodStartAt = message.qualifyingPeriodStartAt; + if (message.qualifyingPeriodCloseAt != null && message.hasOwnProperty("qualifyingPeriodCloseAt")) + object.qualifyingPeriodCloseAt = message.qualifyingPeriodCloseAt; + if (message.competitionStartAt != null && message.hasOwnProperty("competitionStartAt")) + object.competitionStartAt = message.competitionStartAt; + if (message.competitionCloseAt != null && message.hasOwnProperty("competitionCloseAt")) + object.competitionCloseAt = message.competitionCloseAt; + if (message.competitionEndAt != null && message.hasOwnProperty("competitionEndAt")) + object.competitionEndAt = message.competitionEndAt; + if (message.lengthOfPeriod != null && message.hasOwnProperty("lengthOfPeriod")) + object.lengthOfPeriod = message.lengthOfPeriod; + if (message.lengthOfInterval != null && message.hasOwnProperty("lengthOfInterval")) + object.lengthOfInterval = message.lengthOfInterval; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.minigamePatternId != null && message.hasOwnProperty("minigamePatternId")) + object.minigamePatternId = message.minigamePatternId; + return object; + }; + + /** + * Converts this GhostCompetitionSchedule to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCompetitionSchedule + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionSchedule + * @function getTypeUrl + * @memberof wm.protobuf.GhostCompetitionSchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCompetitionSchedule"; + }; + + return GhostCompetitionSchedule; + })(); + + protobuf.GhostCompetitionParameter = (function() { + + /** + * Properties of a GhostCompetitionParameter. + * @memberof wm.protobuf + * @interface IGhostCompetitionParameter + * @property {Array.|null} [parameters1] GhostCompetitionParameter parameters1 + * @property {boolean} parameters2 GhostCompetitionParameter parameters2 + */ + + /** + * Constructs a new GhostCompetitionParameter. + * @memberof wm.protobuf + * @classdesc Represents a GhostCompetitionParameter. + * @implements IGhostCompetitionParameter + * @constructor + * @param {wm.protobuf.IGhostCompetitionParameter=} [properties] Properties to set + */ + function GhostCompetitionParameter(properties) { + this.parameters1 = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionParameter parameters1. + * @member {Array.} parameters1 + * @memberof wm.protobuf.GhostCompetitionParameter + * @instance + */ + GhostCompetitionParameter.prototype.parameters1 = $util.emptyArray; + + /** + * GhostCompetitionParameter parameters2. + * @member {boolean} parameters2 + * @memberof wm.protobuf.GhostCompetitionParameter + * @instance + */ + GhostCompetitionParameter.prototype.parameters2 = false; + + /** + * Creates a new GhostCompetitionParameter instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.IGhostCompetitionParameter=} [properties] Properties to set + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter instance + */ + GhostCompetitionParameter.create = function create(properties) { + return new GhostCompetitionParameter(properties); + }; + + /** + * Encodes the specified GhostCompetitionParameter message. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.IGhostCompetitionParameter} message GhostCompetitionParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionParameter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameters1 != null && message.parameters1.length) + for (let i = 0; i < message.parameters1.length; ++i) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.parameters1[i]); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.parameters2); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionParameter message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionParameter.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.IGhostCompetitionParameter} message GhostCompetitionParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionParameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionParameter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCompetitionParameter(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.parameters1 && message.parameters1.length)) + message.parameters1 = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.parameters1.push(reader.float()); + } else + message.parameters1.push(reader.float()); + break; + } + case 2: { + message.parameters2 = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("parameters2")) + throw $util.ProtocolError("missing required 'parameters2'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionParameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionParameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionParameter message. + * @function verify + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionParameter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameters1 != null && message.hasOwnProperty("parameters1")) { + if (!Array.isArray(message.parameters1)) + return "parameters1: array expected"; + for (let i = 0; i < message.parameters1.length; ++i) + if (typeof message.parameters1[i] !== "number") + return "parameters1: number[] expected"; + } + if (typeof message.parameters2 !== "boolean") + return "parameters2: boolean expected"; + return null; + }; + + /** + * Creates a GhostCompetitionParameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCompetitionParameter} GhostCompetitionParameter + */ + GhostCompetitionParameter.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCompetitionParameter) + return object; + let message = new $root.wm.protobuf.GhostCompetitionParameter(); + if (object.parameters1) { + if (!Array.isArray(object.parameters1)) + throw TypeError(".wm.protobuf.GhostCompetitionParameter.parameters1: array expected"); + message.parameters1 = []; + for (let i = 0; i < object.parameters1.length; ++i) + message.parameters1[i] = Number(object.parameters1[i]); + } + if (object.parameters2 != null) + message.parameters2 = Boolean(object.parameters2); + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionParameter message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {wm.protobuf.GhostCompetitionParameter} message GhostCompetitionParameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionParameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.parameters1 = []; + if (options.defaults) + object.parameters2 = false; + if (message.parameters1 && message.parameters1.length) { + object.parameters1 = []; + for (let j = 0; j < message.parameters1.length; ++j) + object.parameters1[j] = options.json && !isFinite(message.parameters1[j]) ? String(message.parameters1[j]) : message.parameters1[j]; + } + if (message.parameters2 != null && message.hasOwnProperty("parameters2")) + object.parameters2 = message.parameters2; + return object; + }; + + /** + * Converts this GhostCompetitionParameter to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCompetitionParameter + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionParameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionParameter + * @function getTypeUrl + * @memberof wm.protobuf.GhostCompetitionParameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCompetitionParameter"; + }; + + return GhostCompetitionParameter; + })(); + + protobuf.TransferNotice = (function() { + + /** + * Properties of a TransferNotice. + * @memberof wm.protobuf + * @interface ITransferNotice + * @property {boolean} needToSeeTransferred TransferNotice needToSeeTransferred + * @property {number|null} [totalMaxiGold] TransferNotice totalMaxiGold + * @property {number|null} [numOfPorscheCars] TransferNotice numOfPorscheCars + * @property {Array.|null} [porscheModels] TransferNotice porscheModels + * @property {boolean|null} [hasR35] TransferNotice hasR35 + */ + + /** + * Constructs a new TransferNotice. + * @memberof wm.protobuf + * @classdesc Represents a TransferNotice. + * @implements ITransferNotice + * @constructor + * @param {wm.protobuf.ITransferNotice=} [properties] Properties to set + */ + function TransferNotice(properties) { + this.porscheModels = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransferNotice needToSeeTransferred. + * @member {boolean} needToSeeTransferred + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.needToSeeTransferred = false; + + /** + * TransferNotice totalMaxiGold. + * @member {number} totalMaxiGold + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.totalMaxiGold = 0; + + /** + * TransferNotice numOfPorscheCars. + * @member {number} numOfPorscheCars + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.numOfPorscheCars = 0; + + /** + * TransferNotice porscheModels. + * @member {Array.} porscheModels + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.porscheModels = $util.emptyArray; + + /** + * TransferNotice hasR35. + * @member {boolean} hasR35 + * @memberof wm.protobuf.TransferNotice + * @instance + */ + TransferNotice.prototype.hasR35 = false; + + /** + * Creates a new TransferNotice instance using the specified properties. + * @function create + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.ITransferNotice=} [properties] Properties to set + * @returns {wm.protobuf.TransferNotice} TransferNotice instance + */ + TransferNotice.create = function create(properties) { + return new TransferNotice(properties); + }; + + /** + * Encodes the specified TransferNotice message. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.ITransferNotice} message TransferNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferNotice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.needToSeeTransferred); + if (message.totalMaxiGold != null && Object.hasOwnProperty.call(message, "totalMaxiGold")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.totalMaxiGold); + if (message.numOfPorscheCars != null && Object.hasOwnProperty.call(message, "numOfPorscheCars")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.numOfPorscheCars); + if (message.porscheModels != null && message.porscheModels.length) + for (let i = 0; i < message.porscheModels.length; ++i) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.porscheModels[i]); + if (message.hasR35 != null && Object.hasOwnProperty.call(message, "hasR35")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.hasR35); + return writer; + }; + + /** + * Encodes the specified TransferNotice message, length delimited. Does not implicitly {@link wm.protobuf.TransferNotice.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.ITransferNotice} message TransferNotice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferNotice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransferNotice message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.TransferNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.TransferNotice} TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferNotice.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.TransferNotice(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.needToSeeTransferred = reader.bool(); + break; + } + case 2: { + message.totalMaxiGold = reader.uint32(); + break; + } + case 3: { + message.numOfPorscheCars = reader.uint32(); + break; + } + case 4: { + if (!(message.porscheModels && message.porscheModels.length)) + message.porscheModels = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.porscheModels.push(reader.uint32()); + } else + message.porscheModels.push(reader.uint32()); + break; + } + case 5: { + message.hasR35 = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("needToSeeTransferred")) + throw $util.ProtocolError("missing required 'needToSeeTransferred'", { instance: message }); + return message; + }; + + /** + * Decodes a TransferNotice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.TransferNotice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.TransferNotice} TransferNotice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferNotice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransferNotice message. + * @function verify + * @memberof wm.protobuf.TransferNotice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransferNotice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (typeof message.needToSeeTransferred !== "boolean") + return "needToSeeTransferred: boolean expected"; + if (message.totalMaxiGold != null && message.hasOwnProperty("totalMaxiGold")) + if (!$util.isInteger(message.totalMaxiGold)) + return "totalMaxiGold: integer expected"; + if (message.numOfPorscheCars != null && message.hasOwnProperty("numOfPorscheCars")) + if (!$util.isInteger(message.numOfPorscheCars)) + return "numOfPorscheCars: integer expected"; + if (message.porscheModels != null && message.hasOwnProperty("porscheModels")) { + if (!Array.isArray(message.porscheModels)) + return "porscheModels: array expected"; + for (let i = 0; i < message.porscheModels.length; ++i) + if (!$util.isInteger(message.porscheModels[i])) + return "porscheModels: integer[] expected"; + } + if (message.hasR35 != null && message.hasOwnProperty("hasR35")) + if (typeof message.hasR35 !== "boolean") + return "hasR35: boolean expected"; + return null; + }; + + /** + * Creates a TransferNotice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.TransferNotice + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.TransferNotice} TransferNotice + */ + TransferNotice.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.TransferNotice) + return object; + let message = new $root.wm.protobuf.TransferNotice(); + if (object.needToSeeTransferred != null) + message.needToSeeTransferred = Boolean(object.needToSeeTransferred); + if (object.totalMaxiGold != null) + message.totalMaxiGold = object.totalMaxiGold >>> 0; + if (object.numOfPorscheCars != null) + message.numOfPorscheCars = object.numOfPorscheCars >>> 0; + if (object.porscheModels) { + if (!Array.isArray(object.porscheModels)) + throw TypeError(".wm.protobuf.TransferNotice.porscheModels: array expected"); + message.porscheModels = []; + for (let i = 0; i < object.porscheModels.length; ++i) + message.porscheModels[i] = object.porscheModels[i] >>> 0; + } + if (object.hasR35 != null) + message.hasR35 = Boolean(object.hasR35); + return message; + }; + + /** + * Creates a plain object from a TransferNotice message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.TransferNotice + * @static + * @param {wm.protobuf.TransferNotice} message TransferNotice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransferNotice.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.porscheModels = []; + if (options.defaults) { + object.needToSeeTransferred = false; + object.totalMaxiGold = 0; + object.numOfPorscheCars = 0; + object.hasR35 = false; + } + if (message.needToSeeTransferred != null && message.hasOwnProperty("needToSeeTransferred")) + object.needToSeeTransferred = message.needToSeeTransferred; + if (message.totalMaxiGold != null && message.hasOwnProperty("totalMaxiGold")) + object.totalMaxiGold = message.totalMaxiGold; + if (message.numOfPorscheCars != null && message.hasOwnProperty("numOfPorscheCars")) + object.numOfPorscheCars = message.numOfPorscheCars; + if (message.porscheModels && message.porscheModels.length) { + object.porscheModels = []; + for (let j = 0; j < message.porscheModels.length; ++j) + object.porscheModels[j] = message.porscheModels[j]; + } + if (message.hasR35 != null && message.hasOwnProperty("hasR35")) + object.hasR35 = message.hasR35; + return object; + }; + + /** + * Converts this TransferNotice to JSON. + * @function toJSON + * @memberof wm.protobuf.TransferNotice + * @instance + * @returns {Object.} JSON object + */ + TransferNotice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransferNotice + * @function getTypeUrl + * @memberof wm.protobuf.TransferNotice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransferNotice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.TransferNotice"; + }; + + return TransferNotice; + })(); + + protobuf.GameFeatureVersion = (function() { + + /** + * Properties of a GameFeatureVersion. + * @memberof wm.protobuf + * @interface IGameFeatureVersion + * @property {number} version GameFeatureVersion version + * @property {number} year GameFeatureVersion year + * @property {number} month GameFeatureVersion month + * @property {number} pluses GameFeatureVersion pluses + * @property {number} releaseAt GameFeatureVersion releaseAt + */ + + /** + * Constructs a new GameFeatureVersion. + * @memberof wm.protobuf + * @classdesc Represents a GameFeatureVersion. + * @implements IGameFeatureVersion + * @constructor + * @param {wm.protobuf.IGameFeatureVersion=} [properties] Properties to set + */ + function GameFeatureVersion(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GameFeatureVersion version. + * @member {number} version + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.version = 0; + + /** + * GameFeatureVersion year. + * @member {number} year + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.year = 0; + + /** + * GameFeatureVersion month. + * @member {number} month + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.month = 0; + + /** + * GameFeatureVersion pluses. + * @member {number} pluses + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.pluses = 0; + + /** + * GameFeatureVersion releaseAt. + * @member {number} releaseAt + * @memberof wm.protobuf.GameFeatureVersion + * @instance + */ + GameFeatureVersion.prototype.releaseAt = 0; + + /** + * Creates a new GameFeatureVersion instance using the specified properties. + * @function create + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.IGameFeatureVersion=} [properties] Properties to set + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion instance + */ + GameFeatureVersion.create = function create(properties) { + return new GameFeatureVersion(properties); + }; + + /** + * Encodes the specified GameFeatureVersion message. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.IGameFeatureVersion} message GameFeatureVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GameFeatureVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.version); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.year); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.month); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.pluses); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.releaseAt); + return writer; + }; + + /** + * Encodes the specified GameFeatureVersion message, length delimited. Does not implicitly {@link wm.protobuf.GameFeatureVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.IGameFeatureVersion} message GameFeatureVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GameFeatureVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GameFeatureVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GameFeatureVersion(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.uint32(); + break; + } + case 2: { + message.year = reader.uint32(); + break; + } + case 3: { + message.month = reader.uint32(); + break; + } + case 4: { + message.pluses = reader.uint32(); + break; + } + case 5: { + message.releaseAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("version")) + throw $util.ProtocolError("missing required 'version'", { instance: message }); + if (!message.hasOwnProperty("year")) + throw $util.ProtocolError("missing required 'year'", { instance: message }); + if (!message.hasOwnProperty("month")) + throw $util.ProtocolError("missing required 'month'", { instance: message }); + if (!message.hasOwnProperty("pluses")) + throw $util.ProtocolError("missing required 'pluses'", { instance: message }); + if (!message.hasOwnProperty("releaseAt")) + throw $util.ProtocolError("missing required 'releaseAt'", { instance: message }); + return message; + }; + + /** + * Decodes a GameFeatureVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GameFeatureVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GameFeatureVersion message. + * @function verify + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GameFeatureVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (!$util.isInteger(message.pluses)) + return "pluses: integer expected"; + if (!$util.isInteger(message.releaseAt)) + return "releaseAt: integer expected"; + return null; + }; + + /** + * Creates a GameFeatureVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GameFeatureVersion} GameFeatureVersion + */ + GameFeatureVersion.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GameFeatureVersion) + return object; + let message = new $root.wm.protobuf.GameFeatureVersion(); + if (object.version != null) + message.version = object.version >>> 0; + if (object.year != null) + message.year = object.year >>> 0; + if (object.month != null) + message.month = object.month >>> 0; + if (object.pluses != null) + message.pluses = object.pluses >>> 0; + if (object.releaseAt != null) + message.releaseAt = object.releaseAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a GameFeatureVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {wm.protobuf.GameFeatureVersion} message GameFeatureVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GameFeatureVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.version = 0; + object.year = 0; + object.month = 0; + object.pluses = 0; + object.releaseAt = 0; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.pluses != null && message.hasOwnProperty("pluses")) + object.pluses = message.pluses; + if (message.releaseAt != null && message.hasOwnProperty("releaseAt")) + object.releaseAt = message.releaseAt; + return object; + }; + + /** + * Converts this GameFeatureVersion to JSON. + * @function toJSON + * @memberof wm.protobuf.GameFeatureVersion + * @instance + * @returns {Object.} JSON object + */ + GameFeatureVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GameFeatureVersion + * @function getTypeUrl + * @memberof wm.protobuf.GameFeatureVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GameFeatureVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GameFeatureVersion"; + }; + + return GameFeatureVersion; + })(); + + protobuf.ScratchSheet = (function() { + + /** + * Properties of a ScratchSheet. + * @memberof wm.protobuf + * @interface IScratchSheet + * @property {Array.|null} [squares] ScratchSheet squares + */ + + /** + * Constructs a new ScratchSheet. + * @memberof wm.protobuf + * @classdesc Represents a ScratchSheet. + * @implements IScratchSheet + * @constructor + * @param {wm.protobuf.IScratchSheet=} [properties] Properties to set + */ + function ScratchSheet(properties) { + this.squares = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ScratchSheet squares. + * @member {Array.} squares + * @memberof wm.protobuf.ScratchSheet + * @instance + */ + ScratchSheet.prototype.squares = $util.emptyArray; + + /** + * Creates a new ScratchSheet instance using the specified properties. + * @function create + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.IScratchSheet=} [properties] Properties to set + * @returns {wm.protobuf.ScratchSheet} ScratchSheet instance + */ + ScratchSheet.create = function create(properties) { + return new ScratchSheet(properties); + }; + + /** + * Encodes the specified ScratchSheet message. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.IScratchSheet} message ScratchSheet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSheet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.squares != null && message.squares.length) + for (let i = 0; i < message.squares.length; ++i) + $root.wm.protobuf.ScratchSheet.ScratchSquare.encode(message.squares[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ScratchSheet message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.IScratchSheet} message ScratchSheet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSheet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ScratchSheet} ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSheet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ScratchSheet(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.squares && message.squares.length)) + message.squares = []; + message.squares.push($root.wm.protobuf.ScratchSheet.ScratchSquare.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScratchSheet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ScratchSheet} ScratchSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSheet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScratchSheet message. + * @function verify + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScratchSheet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.squares != null && message.hasOwnProperty("squares")) { + if (!Array.isArray(message.squares)) + return "squares: array expected"; + for (let i = 0; i < message.squares.length; ++i) { + let error = $root.wm.protobuf.ScratchSheet.ScratchSquare.verify(message.squares[i]); + if (error) + return "squares." + error; + } + } + return null; + }; + + /** + * Creates a ScratchSheet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ScratchSheet} ScratchSheet + */ + ScratchSheet.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ScratchSheet) + return object; + let message = new $root.wm.protobuf.ScratchSheet(); + if (object.squares) { + if (!Array.isArray(object.squares)) + throw TypeError(".wm.protobuf.ScratchSheet.squares: array expected"); + message.squares = []; + for (let i = 0; i < object.squares.length; ++i) { + if (typeof object.squares[i] !== "object") + throw TypeError(".wm.protobuf.ScratchSheet.squares: object expected"); + message.squares[i] = $root.wm.protobuf.ScratchSheet.ScratchSquare.fromObject(object.squares[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ScratchSheet message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {wm.protobuf.ScratchSheet} message ScratchSheet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScratchSheet.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.squares = []; + if (message.squares && message.squares.length) { + object.squares = []; + for (let j = 0; j < message.squares.length; ++j) + object.squares[j] = $root.wm.protobuf.ScratchSheet.ScratchSquare.toObject(message.squares[j], options); + } + return object; + }; + + /** + * Converts this ScratchSheet to JSON. + * @function toJSON + * @memberof wm.protobuf.ScratchSheet + * @instance + * @returns {Object.} JSON object + */ + ScratchSheet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScratchSheet + * @function getTypeUrl + * @memberof wm.protobuf.ScratchSheet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScratchSheet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ScratchSheet"; + }; + + ScratchSheet.ScratchSquare = (function() { + + /** + * Properties of a ScratchSquare. + * @memberof wm.protobuf.ScratchSheet + * @interface IScratchSquare + * @property {wm.protobuf.ItemCategory} category ScratchSquare category + * @property {number} itemId ScratchSquare itemId + * @property {boolean} earned ScratchSquare earned + */ + + /** + * Constructs a new ScratchSquare. + * @memberof wm.protobuf.ScratchSheet + * @classdesc Represents a ScratchSquare. + * @implements IScratchSquare + * @constructor + * @param {wm.protobuf.ScratchSheet.IScratchSquare=} [properties] Properties to set + */ + function ScratchSquare(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ScratchSquare category. + * @member {wm.protobuf.ItemCategory} category + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + */ + ScratchSquare.prototype.category = 1; + + /** + * ScratchSquare itemId. + * @member {number} itemId + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + */ + ScratchSquare.prototype.itemId = 0; + + /** + * ScratchSquare earned. + * @member {boolean} earned + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + */ + ScratchSquare.prototype.earned = false; + + /** + * Creates a new ScratchSquare instance using the specified properties. + * @function create + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.IScratchSquare=} [properties] Properties to set + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare instance + */ + ScratchSquare.create = function create(properties) { + return new ScratchSquare(properties); + }; + + /** + * Encodes the specified ScratchSquare message. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.IScratchSquare} message ScratchSquare message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSquare.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.itemId); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.earned); + return writer; + }; + + /** + * Encodes the specified ScratchSquare message, length delimited. Does not implicitly {@link wm.protobuf.ScratchSheet.ScratchSquare.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.IScratchSquare} message ScratchSquare message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScratchSquare.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSquare.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.ScratchSheet.ScratchSquare(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.itemId = reader.uint32(); + break; + } + case 3: { + message.earned = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("category")) + throw $util.ProtocolError("missing required 'category'", { instance: message }); + if (!message.hasOwnProperty("itemId")) + throw $util.ProtocolError("missing required 'itemId'", { instance: message }); + if (!message.hasOwnProperty("earned")) + throw $util.ProtocolError("missing required 'earned'", { instance: message }); + return message; + }; + + /** + * Decodes a ScratchSquare message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScratchSquare.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScratchSquare message. + * @function verify + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScratchSquare.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.category) { + default: + return "category: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + case 10: + case 12: + case 14: + case 15: + case 16: + case 17: + case 19: + case 22: + case 24: + case 25: + case 26: + case 27: + case 28: + case 201: + case 202: + case 203: + case 300: + case 301: + break; + } + if (!$util.isInteger(message.itemId)) + return "itemId: integer expected"; + if (typeof message.earned !== "boolean") + return "earned: boolean expected"; + return null; + }; + + /** + * Creates a ScratchSquare message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.ScratchSheet.ScratchSquare} ScratchSquare + */ + ScratchSquare.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.ScratchSheet.ScratchSquare) + return object; + let message = new $root.wm.protobuf.ScratchSheet.ScratchSquare(); + switch (object.category) { + case "CAT_CUSTOM_COLOR": + case 1: + message.category = 1; + break; + case "CAT_WHEEL": + case 2: + message.category = 2; + break; + case "CAT_AERO": + case 3: + message.category = 3; + break; + case "CAT_BONNET": + case 4: + message.category = 4; + break; + case "CAT_WING": + case 5: + message.category = 5; + break; + case "CAT_MIRROR": + case 6: + message.category = 6; + break; + case "CAT_NEON": + case 8: + message.category = 8; + break; + case "CAT_TRUNK": + case 9: + message.category = 9; + break; + case "CAT_NUMBER_PLATE": + case 10: + message.category = 10; + break; + case "CAT_GT_WING": + case 12: + message.category = 12; + break; + case "CAT_AURA_MOTIF": + case 14: + message.category = 14; + break; + case "CAT_METER": + case 15: + message.category = 15; + break; + case "CAT_BGM": + case 16: + message.category = 16; + break; + case "CAT_NAME_PLATE": + case 17: + message.category = 17; + break; + case "CAT_NUMBER": + case 19: + message.category = 19; + break; + case "CAT_BGM_TRACK": + case 22: + message.category = 22; + break; + case "CAT_WINDOW_STICKER_FONT": + case 24: + message.category = 24; + break; + case "CAT_WINDOW_DECORATION": + case 25: + message.category = 25; + break; + case "CAT_RIVAL_MARKER": + case 26: + message.category = 26; + break; + case "CAT_STAMP": + case 27: + message.category = 27; + break; + case "CAT_TERMINAL_BACKGROUND": + case 28: + message.category = 28; + break; + case "CAT_CAR_TICKET": + case 201: + message.category = 201; + break; + case "CAT_CONSUMPTION_ITEM": + case 202: + message.category = 202; + break; + case "CAT_CAR_TICKET_FREE": + case 203: + message.category = 203; + break; + case "CAT_AERO_FULLSET": + case 300: + message.category = 300; + break; + case "CAT_AERO_LIMITED": + case 301: + message.category = 301; + break; + } + if (object.itemId != null) + message.itemId = object.itemId >>> 0; + if (object.earned != null) + message.earned = Boolean(object.earned); + return message; + }; + + /** + * Creates a plain object from a ScratchSquare message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {wm.protobuf.ScratchSheet.ScratchSquare} message ScratchSquare + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScratchSquare.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.category = options.enums === String ? "CAT_CUSTOM_COLOR" : 1; + object.itemId = 0; + object.earned = false; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.wm.protobuf.ItemCategory[message.category] : message.category; + if (message.itemId != null && message.hasOwnProperty("itemId")) + object.itemId = message.itemId; + if (message.earned != null && message.hasOwnProperty("earned")) + object.earned = message.earned; + return object; + }; + + /** + * Converts this ScratchSquare to JSON. + * @function toJSON + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @instance + * @returns {Object.} JSON object + */ + ScratchSquare.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScratchSquare + * @function getTypeUrl + * @memberof wm.protobuf.ScratchSheet.ScratchSquare + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScratchSquare.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.ScratchSheet.ScratchSquare"; + }; + + return ScratchSquare; + })(); + + return ScratchSheet; + })(); + + protobuf.UserItem = (function() { + + /** + * Properties of a UserItem. + * @memberof wm.protobuf + * @interface IUserItem + * @property {wm.protobuf.ItemCategory} category UserItem category + * @property {number} itemId UserItem itemId + * @property {number|null} [userItemId] UserItem userItemId + * @property {number|null} [earnedAt] UserItem earnedAt + * @property {number|null} [expireAt] UserItem expireAt + */ + + /** + * Constructs a new UserItem. + * @memberof wm.protobuf + * @classdesc Represents a UserItem. + * @implements IUserItem + * @constructor + * @param {wm.protobuf.IUserItem=} [properties] Properties to set + */ + function UserItem(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserItem category. + * @member {wm.protobuf.ItemCategory} category + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.category = 1; + + /** + * UserItem itemId. + * @member {number} itemId + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.itemId = 0; + + /** + * UserItem userItemId. + * @member {number} userItemId + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.userItemId = 0; + + /** + * UserItem earnedAt. + * @member {number} earnedAt + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.earnedAt = 0; + + /** + * UserItem expireAt. + * @member {number} expireAt + * @memberof wm.protobuf.UserItem + * @instance + */ + UserItem.prototype.expireAt = 0; + + /** + * Creates a new UserItem instance using the specified properties. + * @function create + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.IUserItem=} [properties] Properties to set + * @returns {wm.protobuf.UserItem} UserItem instance + */ + UserItem.create = function create(properties) { + return new UserItem(properties); + }; + + /** + * Encodes the specified UserItem message. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.IUserItem} message UserItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.itemId); + if (message.userItemId != null && Object.hasOwnProperty.call(message, "userItemId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.userItemId); + if (message.earnedAt != null && Object.hasOwnProperty.call(message, "earnedAt")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.earnedAt); + if (message.expireAt != null && Object.hasOwnProperty.call(message, "expireAt")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.expireAt); + return writer; + }; + + /** + * Encodes the specified UserItem message, length delimited. Does not implicitly {@link wm.protobuf.UserItem.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.IUserItem} message UserItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserItem message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.UserItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.UserItem} UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.UserItem(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.itemId = reader.uint32(); + break; + } + case 3: { + message.userItemId = reader.uint32(); + break; + } + case 4: { + message.earnedAt = reader.uint32(); + break; + } + case 5: { + message.expireAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("category")) + throw $util.ProtocolError("missing required 'category'", { instance: message }); + if (!message.hasOwnProperty("itemId")) + throw $util.ProtocolError("missing required 'itemId'", { instance: message }); + return message; + }; + + /** + * Decodes a UserItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.UserItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.UserItem} UserItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserItem message. + * @function verify + * @memberof wm.protobuf.UserItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.category) { + default: + return "category: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + case 10: + case 12: + case 14: + case 15: + case 16: + case 17: + case 19: + case 22: + case 24: + case 25: + case 26: + case 27: + case 28: + case 201: + case 202: + case 203: + case 300: + case 301: + break; + } + if (!$util.isInteger(message.itemId)) + return "itemId: integer expected"; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + if (!$util.isInteger(message.userItemId)) + return "userItemId: integer expected"; + if (message.earnedAt != null && message.hasOwnProperty("earnedAt")) + if (!$util.isInteger(message.earnedAt)) + return "earnedAt: integer expected"; + if (message.expireAt != null && message.hasOwnProperty("expireAt")) + if (!$util.isInteger(message.expireAt)) + return "expireAt: integer expected"; + return null; + }; + + /** + * Creates a UserItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.UserItem + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.UserItem} UserItem + */ + UserItem.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.UserItem) + return object; + let message = new $root.wm.protobuf.UserItem(); + switch (object.category) { + case "CAT_CUSTOM_COLOR": + case 1: + message.category = 1; + break; + case "CAT_WHEEL": + case 2: + message.category = 2; + break; + case "CAT_AERO": + case 3: + message.category = 3; + break; + case "CAT_BONNET": + case 4: + message.category = 4; + break; + case "CAT_WING": + case 5: + message.category = 5; + break; + case "CAT_MIRROR": + case 6: + message.category = 6; + break; + case "CAT_NEON": + case 8: + message.category = 8; + break; + case "CAT_TRUNK": + case 9: + message.category = 9; + break; + case "CAT_NUMBER_PLATE": + case 10: + message.category = 10; + break; + case "CAT_GT_WING": + case 12: + message.category = 12; + break; + case "CAT_AURA_MOTIF": + case 14: + message.category = 14; + break; + case "CAT_METER": + case 15: + message.category = 15; + break; + case "CAT_BGM": + case 16: + message.category = 16; + break; + case "CAT_NAME_PLATE": + case 17: + message.category = 17; + break; + case "CAT_NUMBER": + case 19: + message.category = 19; + break; + case "CAT_BGM_TRACK": + case 22: + message.category = 22; + break; + case "CAT_WINDOW_STICKER_FONT": + case 24: + message.category = 24; + break; + case "CAT_WINDOW_DECORATION": + case 25: + message.category = 25; + break; + case "CAT_RIVAL_MARKER": + case 26: + message.category = 26; + break; + case "CAT_STAMP": + case 27: + message.category = 27; + break; + case "CAT_TERMINAL_BACKGROUND": + case 28: + message.category = 28; + break; + case "CAT_CAR_TICKET": + case 201: + message.category = 201; + break; + case "CAT_CONSUMPTION_ITEM": + case 202: + message.category = 202; + break; + case "CAT_CAR_TICKET_FREE": + case 203: + message.category = 203; + break; + case "CAT_AERO_FULLSET": + case 300: + message.category = 300; + break; + case "CAT_AERO_LIMITED": + case 301: + message.category = 301; + break; + } + if (object.itemId != null) + message.itemId = object.itemId >>> 0; + if (object.userItemId != null) + message.userItemId = object.userItemId >>> 0; + if (object.earnedAt != null) + message.earnedAt = object.earnedAt >>> 0; + if (object.expireAt != null) + message.expireAt = object.expireAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a UserItem message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.UserItem + * @static + * @param {wm.protobuf.UserItem} message UserItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.category = options.enums === String ? "CAT_CUSTOM_COLOR" : 1; + object.itemId = 0; + object.userItemId = 0; + object.earnedAt = 0; + object.expireAt = 0; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.wm.protobuf.ItemCategory[message.category] : message.category; + if (message.itemId != null && message.hasOwnProperty("itemId")) + object.itemId = message.itemId; + if (message.userItemId != null && message.hasOwnProperty("userItemId")) + object.userItemId = message.userItemId; + if (message.earnedAt != null && message.hasOwnProperty("earnedAt")) + object.earnedAt = message.earnedAt; + if (message.expireAt != null && message.hasOwnProperty("expireAt")) + object.expireAt = message.expireAt; + return object; + }; + + /** + * Converts this UserItem to JSON. + * @function toJSON + * @memberof wm.protobuf.UserItem + * @instance + * @returns {Object.} JSON object + */ + UserItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserItem + * @function getTypeUrl + * @memberof wm.protobuf.UserItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.UserItem"; + }; + + return UserItem; + })(); + + protobuf.InviteFriendCampaignSchedule = (function() { + + /** + * Properties of an InviteFriendCampaignSchedule. + * @memberof wm.protobuf + * @interface IInviteFriendCampaignSchedule + * @property {number} campaignId InviteFriendCampaignSchedule campaignId + * @property {number} startAt InviteFriendCampaignSchedule startAt + * @property {number} endAt InviteFriendCampaignSchedule endAt + * @property {number} couponUnreceivableAt InviteFriendCampaignSchedule couponUnreceivableAt + */ + + /** + * Constructs a new InviteFriendCampaignSchedule. + * @memberof wm.protobuf + * @classdesc Represents an InviteFriendCampaignSchedule. + * @implements IInviteFriendCampaignSchedule + * @constructor + * @param {wm.protobuf.IInviteFriendCampaignSchedule=} [properties] Properties to set + */ + function InviteFriendCampaignSchedule(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InviteFriendCampaignSchedule campaignId. + * @member {number} campaignId + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.campaignId = 0; + + /** + * InviteFriendCampaignSchedule startAt. + * @member {number} startAt + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.startAt = 0; + + /** + * InviteFriendCampaignSchedule endAt. + * @member {number} endAt + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.endAt = 0; + + /** + * InviteFriendCampaignSchedule couponUnreceivableAt. + * @member {number} couponUnreceivableAt + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + */ + InviteFriendCampaignSchedule.prototype.couponUnreceivableAt = 0; + + /** + * Creates a new InviteFriendCampaignSchedule instance using the specified properties. + * @function create + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.IInviteFriendCampaignSchedule=} [properties] Properties to set + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule instance + */ + InviteFriendCampaignSchedule.create = function create(properties) { + return new InviteFriendCampaignSchedule(properties); + }; + + /** + * Encodes the specified InviteFriendCampaignSchedule message. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.IInviteFriendCampaignSchedule} message InviteFriendCampaignSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InviteFriendCampaignSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.campaignId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.startAt); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.endAt); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.couponUnreceivableAt); + return writer; + }; + + /** + * Encodes the specified InviteFriendCampaignSchedule message, length delimited. Does not implicitly {@link wm.protobuf.InviteFriendCampaignSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.IInviteFriendCampaignSchedule} message InviteFriendCampaignSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InviteFriendCampaignSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InviteFriendCampaignSchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.InviteFriendCampaignSchedule(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.campaignId = reader.uint32(); + break; + } + case 2: { + message.startAt = reader.uint32(); + break; + } + case 3: { + message.endAt = reader.uint32(); + break; + } + case 4: { + message.couponUnreceivableAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("campaignId")) + throw $util.ProtocolError("missing required 'campaignId'", { instance: message }); + if (!message.hasOwnProperty("startAt")) + throw $util.ProtocolError("missing required 'startAt'", { instance: message }); + if (!message.hasOwnProperty("endAt")) + throw $util.ProtocolError("missing required 'endAt'", { instance: message }); + if (!message.hasOwnProperty("couponUnreceivableAt")) + throw $util.ProtocolError("missing required 'couponUnreceivableAt'", { instance: message }); + return message; + }; + + /** + * Decodes an InviteFriendCampaignSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InviteFriendCampaignSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InviteFriendCampaignSchedule message. + * @function verify + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InviteFriendCampaignSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.campaignId)) + return "campaignId: integer expected"; + if (!$util.isInteger(message.startAt)) + return "startAt: integer expected"; + if (!$util.isInteger(message.endAt)) + return "endAt: integer expected"; + if (!$util.isInteger(message.couponUnreceivableAt)) + return "couponUnreceivableAt: integer expected"; + return null; + }; + + /** + * Creates an InviteFriendCampaignSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.InviteFriendCampaignSchedule} InviteFriendCampaignSchedule + */ + InviteFriendCampaignSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.InviteFriendCampaignSchedule) + return object; + let message = new $root.wm.protobuf.InviteFriendCampaignSchedule(); + if (object.campaignId != null) + message.campaignId = object.campaignId >>> 0; + if (object.startAt != null) + message.startAt = object.startAt >>> 0; + if (object.endAt != null) + message.endAt = object.endAt >>> 0; + if (object.couponUnreceivableAt != null) + message.couponUnreceivableAt = object.couponUnreceivableAt >>> 0; + return message; + }; + + /** + * Creates a plain object from an InviteFriendCampaignSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {wm.protobuf.InviteFriendCampaignSchedule} message InviteFriendCampaignSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InviteFriendCampaignSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.campaignId = 0; + object.startAt = 0; + object.endAt = 0; + object.couponUnreceivableAt = 0; + } + if (message.campaignId != null && message.hasOwnProperty("campaignId")) + object.campaignId = message.campaignId; + if (message.startAt != null && message.hasOwnProperty("startAt")) + object.startAt = message.startAt; + if (message.endAt != null && message.hasOwnProperty("endAt")) + object.endAt = message.endAt; + if (message.couponUnreceivableAt != null && message.hasOwnProperty("couponUnreceivableAt")) + object.couponUnreceivableAt = message.couponUnreceivableAt; + return object; + }; + + /** + * Converts this InviteFriendCampaignSchedule to JSON. + * @function toJSON + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @instance + * @returns {Object.} JSON object + */ + InviteFriendCampaignSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InviteFriendCampaignSchedule + * @function getTypeUrl + * @memberof wm.protobuf.InviteFriendCampaignSchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InviteFriendCampaignSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.InviteFriendCampaignSchedule"; + }; + + return InviteFriendCampaignSchedule; + })(); + + protobuf.CarTuning = (function() { + + /** + * Properties of a CarTuning. + * @memberof wm.protobuf + * @interface ICarTuning + * @property {number} carId CarTuning carId + * @property {number} tunePower CarTuning tunePower + * @property {number} tuneHandling CarTuning tuneHandling + * @property {number|null} [lastPlayedAt] CarTuning lastPlayedAt + */ + + /** + * Constructs a new CarTuning. + * @memberof wm.protobuf + * @classdesc Represents a CarTuning. + * @implements ICarTuning + * @constructor + * @param {wm.protobuf.ICarTuning=} [properties] Properties to set + */ + function CarTuning(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarTuning carId. + * @member {number} carId + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.carId = 0; + + /** + * CarTuning tunePower. + * @member {number} tunePower + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.tunePower = 0; + + /** + * CarTuning tuneHandling. + * @member {number} tuneHandling + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.tuneHandling = 0; + + /** + * CarTuning lastPlayedAt. + * @member {number} lastPlayedAt + * @memberof wm.protobuf.CarTuning + * @instance + */ + CarTuning.prototype.lastPlayedAt = 0; + + /** + * Creates a new CarTuning instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.ICarTuning=} [properties] Properties to set + * @returns {wm.protobuf.CarTuning} CarTuning instance + */ + CarTuning.create = function create(properties) { + return new CarTuning(properties); + }; + + /** + * Encodes the specified CarTuning message. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.ICarTuning} message CarTuning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.tunePower); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tuneHandling); + if (message.lastPlayedAt != null && Object.hasOwnProperty.call(message, "lastPlayedAt")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.lastPlayedAt); + return writer; + }; + + /** + * Encodes the specified CarTuning message, length delimited. Does not implicitly {@link wm.protobuf.CarTuning.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.ICarTuning} message CarTuning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarTuning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarTuning message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarTuning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarTuning} CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarTuning(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.tunePower = reader.uint32(); + break; + } + case 3: { + message.tuneHandling = reader.uint32(); + break; + } + case 4: { + message.lastPlayedAt = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("tunePower")) + throw $util.ProtocolError("missing required 'tunePower'", { instance: message }); + if (!message.hasOwnProperty("tuneHandling")) + throw $util.ProtocolError("missing required 'tuneHandling'", { instance: message }); + return message; + }; + + /** + * Decodes a CarTuning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarTuning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarTuning} CarTuning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarTuning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarTuning message. + * @function verify + * @memberof wm.protobuf.CarTuning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarTuning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.tunePower)) + return "tunePower: integer expected"; + if (!$util.isInteger(message.tuneHandling)) + return "tuneHandling: integer expected"; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + if (!$util.isInteger(message.lastPlayedAt)) + return "lastPlayedAt: integer expected"; + return null; + }; + + /** + * Creates a CarTuning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarTuning + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarTuning} CarTuning + */ + CarTuning.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarTuning) + return object; + let message = new $root.wm.protobuf.CarTuning(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.tunePower != null) + message.tunePower = object.tunePower >>> 0; + if (object.tuneHandling != null) + message.tuneHandling = object.tuneHandling >>> 0; + if (object.lastPlayedAt != null) + message.lastPlayedAt = object.lastPlayedAt >>> 0; + return message; + }; + + /** + * Creates a plain object from a CarTuning message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarTuning + * @static + * @param {wm.protobuf.CarTuning} message CarTuning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarTuning.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.tunePower = 0; + object.tuneHandling = 0; + object.lastPlayedAt = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.tunePower != null && message.hasOwnProperty("tunePower")) + object.tunePower = message.tunePower; + if (message.tuneHandling != null && message.hasOwnProperty("tuneHandling")) + object.tuneHandling = message.tuneHandling; + if (message.lastPlayedAt != null && message.hasOwnProperty("lastPlayedAt")) + object.lastPlayedAt = message.lastPlayedAt; + return object; + }; + + /** + * Converts this CarTuning to JSON. + * @function toJSON + * @memberof wm.protobuf.CarTuning + * @instance + * @returns {Object.} JSON object + */ + CarTuning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarTuning + * @function getTypeUrl + * @memberof wm.protobuf.CarTuning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarTuning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarTuning"; + }; + + return CarTuning; + })(); + + protobuf.BinaryData = (function() { + + /** + * Properties of a BinaryData. + * @memberof wm.protobuf + * @interface IBinaryData + * @property {Uint8Array} data BinaryData data + * @property {number} mergeSerial BinaryData mergeSerial + */ + + /** + * Constructs a new BinaryData. + * @memberof wm.protobuf + * @classdesc Represents a BinaryData. + * @implements IBinaryData + * @constructor + * @param {wm.protobuf.IBinaryData=} [properties] Properties to set + */ + function BinaryData(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BinaryData data. + * @member {Uint8Array} data + * @memberof wm.protobuf.BinaryData + * @instance + */ + BinaryData.prototype.data = $util.newBuffer([]); + + /** + * BinaryData mergeSerial. + * @member {number} mergeSerial + * @memberof wm.protobuf.BinaryData + * @instance + */ + BinaryData.prototype.mergeSerial = 0; + + /** + * Creates a new BinaryData instance using the specified properties. + * @function create + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.IBinaryData=} [properties] Properties to set + * @returns {wm.protobuf.BinaryData} BinaryData instance + */ + BinaryData.create = function create(properties) { + return new BinaryData(properties); + }; + + /** + * Encodes the specified BinaryData message. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.IBinaryData} message BinaryData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + writer.uint32(/* id 2, wireType 0 =*/16).sint32(message.mergeSerial); + return writer; + }; + + /** + * Encodes the specified BinaryData message, length delimited. Does not implicitly {@link wm.protobuf.BinaryData.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.IBinaryData} message BinaryData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BinaryData message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.BinaryData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.BinaryData} BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.BinaryData(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.data = reader.bytes(); + break; + } + case 2: { + message.mergeSerial = reader.sint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("data")) + throw $util.ProtocolError("missing required 'data'", { instance: message }); + if (!message.hasOwnProperty("mergeSerial")) + throw $util.ProtocolError("missing required 'mergeSerial'", { instance: message }); + return message; + }; + + /** + * Decodes a BinaryData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.BinaryData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.BinaryData} BinaryData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BinaryData message. + * @function verify + * @memberof wm.protobuf.BinaryData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BinaryData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (!$util.isInteger(message.mergeSerial)) + return "mergeSerial: integer expected"; + return null; + }; + + /** + * Creates a BinaryData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.BinaryData + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.BinaryData} BinaryData + */ + BinaryData.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.BinaryData) + return object; + let message = new $root.wm.protobuf.BinaryData(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + if (object.mergeSerial != null) + message.mergeSerial = object.mergeSerial | 0; + return message; + }; + + /** + * Creates a plain object from a BinaryData message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.BinaryData + * @static + * @param {wm.protobuf.BinaryData} message BinaryData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BinaryData.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.mergeSerial = 0; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.mergeSerial != null && message.hasOwnProperty("mergeSerial")) + object.mergeSerial = message.mergeSerial; + return object; + }; + + /** + * Converts this BinaryData to JSON. + * @function toJSON + * @memberof wm.protobuf.BinaryData + * @instance + * @returns {Object.} JSON object + */ + BinaryData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BinaryData + * @function getTypeUrl + * @memberof wm.protobuf.BinaryData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BinaryData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.BinaryData"; + }; + + return BinaryData; + })(); + + protobuf.GhostTrail = (function() { + + /** + * Properties of a GhostTrail. + * @memberof wm.protobuf + * @interface IGhostTrail + * @property {number} carId GhostTrail carId + * @property {number} area GhostTrail area + * @property {number} ramp GhostTrail ramp + * @property {number} path GhostTrail path + * @property {number} playedAt GhostTrail playedAt + * @property {wm.protobuf.IPlace|null} [playedPlace] GhostTrail playedPlace + * @property {Uint8Array} trail GhostTrail trail + */ + + /** + * Constructs a new GhostTrail. + * @memberof wm.protobuf + * @classdesc Represents a GhostTrail. + * @implements IGhostTrail + * @constructor + * @param {wm.protobuf.IGhostTrail=} [properties] Properties to set + */ + function GhostTrail(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostTrail carId. + * @member {number} carId + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.carId = 0; + + /** + * GhostTrail area. + * @member {number} area + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.area = 0; + + /** + * GhostTrail ramp. + * @member {number} ramp + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.ramp = 0; + + /** + * GhostTrail path. + * @member {number} path + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.path = 0; + + /** + * GhostTrail playedAt. + * @member {number} playedAt + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.playedAt = 0; + + /** + * GhostTrail playedPlace. + * @member {wm.protobuf.IPlace|null|undefined} playedPlace + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.playedPlace = null; + + /** + * GhostTrail trail. + * @member {Uint8Array} trail + * @memberof wm.protobuf.GhostTrail + * @instance + */ + GhostTrail.prototype.trail = $util.newBuffer([]); + + /** + * Creates a new GhostTrail instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.IGhostTrail=} [properties] Properties to set + * @returns {wm.protobuf.GhostTrail} GhostTrail instance + */ + GhostTrail.create = function create(properties) { + return new GhostTrail(properties); + }; + + /** + * Encodes the specified GhostTrail message. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.IGhostTrail} message GhostTrail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostTrail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.carId); + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.area); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.ramp); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.playedAt); + if (message.playedPlace != null && Object.hasOwnProperty.call(message, "playedPlace")) + $root.wm.protobuf.Place.encode(message.playedPlace, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.trail); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.path); + return writer; + }; + + /** + * Encodes the specified GhostTrail message, length delimited. Does not implicitly {@link wm.protobuf.GhostTrail.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.IGhostTrail} message GhostTrail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostTrail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostTrail message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostTrail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostTrail} GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostTrail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostTrail(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.carId = reader.uint32(); + break; + } + case 2: { + message.area = reader.uint32(); + break; + } + case 3: { + message.ramp = reader.uint32(); + break; + } + case 7: { + message.path = reader.uint32(); + break; + } + case 4: { + message.playedAt = reader.uint32(); + break; + } + case 5: { + message.playedPlace = $root.wm.protobuf.Place.decode(reader, reader.uint32()); + break; + } + case 6: { + message.trail = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("carId")) + throw $util.ProtocolError("missing required 'carId'", { instance: message }); + if (!message.hasOwnProperty("area")) + throw $util.ProtocolError("missing required 'area'", { instance: message }); + if (!message.hasOwnProperty("ramp")) + throw $util.ProtocolError("missing required 'ramp'", { instance: message }); + if (!message.hasOwnProperty("path")) + throw $util.ProtocolError("missing required 'path'", { instance: message }); + if (!message.hasOwnProperty("playedAt")) + throw $util.ProtocolError("missing required 'playedAt'", { instance: message }); + if (!message.hasOwnProperty("trail")) + throw $util.ProtocolError("missing required 'trail'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostTrail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostTrail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostTrail} GhostTrail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostTrail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostTrail message. + * @function verify + * @memberof wm.protobuf.GhostTrail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostTrail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.carId)) + return "carId: integer expected"; + if (!$util.isInteger(message.area)) + return "area: integer expected"; + if (!$util.isInteger(message.ramp)) + return "ramp: integer expected"; + if (!$util.isInteger(message.path)) + return "path: integer expected"; + if (!$util.isInteger(message.playedAt)) + return "playedAt: integer expected"; + if (message.playedPlace != null && message.hasOwnProperty("playedPlace")) { + let error = $root.wm.protobuf.Place.verify(message.playedPlace); + if (error) + return "playedPlace." + error; + } + if (!(message.trail && typeof message.trail.length === "number" || $util.isString(message.trail))) + return "trail: buffer expected"; + return null; + }; + + /** + * Creates a GhostTrail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostTrail + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostTrail} GhostTrail + */ + GhostTrail.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostTrail) + return object; + let message = new $root.wm.protobuf.GhostTrail(); + if (object.carId != null) + message.carId = object.carId >>> 0; + if (object.area != null) + message.area = object.area >>> 0; + if (object.ramp != null) + message.ramp = object.ramp >>> 0; + if (object.path != null) + message.path = object.path >>> 0; + if (object.playedAt != null) + message.playedAt = object.playedAt >>> 0; + if (object.playedPlace != null) { + if (typeof object.playedPlace !== "object") + throw TypeError(".wm.protobuf.GhostTrail.playedPlace: object expected"); + message.playedPlace = $root.wm.protobuf.Place.fromObject(object.playedPlace); + } + if (object.trail != null) + if (typeof object.trail === "string") + $util.base64.decode(object.trail, message.trail = $util.newBuffer($util.base64.length(object.trail)), 0); + else if (object.trail.length >= 0) + message.trail = object.trail; + return message; + }; + + /** + * Creates a plain object from a GhostTrail message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostTrail + * @static + * @param {wm.protobuf.GhostTrail} message GhostTrail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostTrail.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.carId = 0; + object.area = 0; + object.ramp = 0; + object.playedAt = 0; + object.playedPlace = null; + if (options.bytes === String) + object.trail = ""; + else { + object.trail = []; + if (options.bytes !== Array) + object.trail = $util.newBuffer(object.trail); + } + object.path = 0; + } + if (message.carId != null && message.hasOwnProperty("carId")) + object.carId = message.carId; + if (message.area != null && message.hasOwnProperty("area")) + object.area = message.area; + if (message.ramp != null && message.hasOwnProperty("ramp")) + object.ramp = message.ramp; + if (message.playedAt != null && message.hasOwnProperty("playedAt")) + object.playedAt = message.playedAt; + if (message.playedPlace != null && message.hasOwnProperty("playedPlace")) + object.playedPlace = $root.wm.protobuf.Place.toObject(message.playedPlace, options); + if (message.trail != null && message.hasOwnProperty("trail")) + object.trail = options.bytes === String ? $util.base64.encode(message.trail, 0, message.trail.length) : options.bytes === Array ? Array.prototype.slice.call(message.trail) : message.trail; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this GhostTrail to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostTrail + * @instance + * @returns {Object.} JSON object + */ + GhostTrail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostTrail + * @function getTypeUrl + * @memberof wm.protobuf.GhostTrail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostTrail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostTrail"; + }; + + return GhostTrail; + })(); + + protobuf.PlaceList = (function() { + + /** + * Properties of a PlaceList. + * @memberof wm.protobuf + * @interface IPlaceList + * @property {Array.|null} [places] PlaceList places + */ + + /** + * Constructs a new PlaceList. + * @memberof wm.protobuf + * @classdesc Represents a PlaceList. + * @implements IPlaceList + * @constructor + * @param {wm.protobuf.IPlaceList=} [properties] Properties to set + */ + function PlaceList(properties) { + this.places = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlaceList places. + * @member {Array.} places + * @memberof wm.protobuf.PlaceList + * @instance + */ + PlaceList.prototype.places = $util.emptyArray; + + /** + * Creates a new PlaceList instance using the specified properties. + * @function create + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.IPlaceList=} [properties] Properties to set + * @returns {wm.protobuf.PlaceList} PlaceList instance + */ + PlaceList.create = function create(properties) { + return new PlaceList(properties); + }; + + /** + * Encodes the specified PlaceList message. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.IPlaceList} message PlaceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.places != null && message.places.length) + for (let i = 0; i < message.places.length; ++i) + $root.wm.protobuf.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PlaceList message, length delimited. Does not implicitly {@link wm.protobuf.PlaceList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.IPlaceList} message PlaceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlaceList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.PlaceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.PlaceList} PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.PlaceList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.places && message.places.length)) + message.places = []; + message.places.push($root.wm.protobuf.Place.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlaceList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.PlaceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.PlaceList} PlaceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlaceList message. + * @function verify + * @memberof wm.protobuf.PlaceList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlaceList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.places != null && message.hasOwnProperty("places")) { + if (!Array.isArray(message.places)) + return "places: array expected"; + for (let i = 0; i < message.places.length; ++i) { + let error = $root.wm.protobuf.Place.verify(message.places[i]); + if (error) + return "places." + error; + } + } + return null; + }; + + /** + * Creates a PlaceList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.PlaceList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.PlaceList} PlaceList + */ + PlaceList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.PlaceList) + return object; + let message = new $root.wm.protobuf.PlaceList(); + if (object.places) { + if (!Array.isArray(object.places)) + throw TypeError(".wm.protobuf.PlaceList.places: array expected"); + message.places = []; + for (let i = 0; i < object.places.length; ++i) { + if (typeof object.places[i] !== "object") + throw TypeError(".wm.protobuf.PlaceList.places: object expected"); + message.places[i] = $root.wm.protobuf.Place.fromObject(object.places[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PlaceList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.PlaceList + * @static + * @param {wm.protobuf.PlaceList} message PlaceList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlaceList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.places = []; + if (message.places && message.places.length) { + object.places = []; + for (let j = 0; j < message.places.length; ++j) + object.places[j] = $root.wm.protobuf.Place.toObject(message.places[j], options); + } + return object; + }; + + /** + * Converts this PlaceList to JSON. + * @function toJSON + * @memberof wm.protobuf.PlaceList + * @instance + * @returns {Object.} JSON object + */ + PlaceList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlaceList + * @function getTypeUrl + * @memberof wm.protobuf.PlaceList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaceList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.PlaceList"; + }; + + return PlaceList; + })(); + + protobuf.GhostList = (function() { + + /** + * Properties of a GhostList. + * @memberof wm.protobuf + * @interface IGhostList + * @property {Array.|null} [ghosts] GhostList ghosts + */ + + /** + * Constructs a new GhostList. + * @memberof wm.protobuf + * @classdesc Represents a GhostList. + * @implements IGhostList + * @constructor + * @param {wm.protobuf.IGhostList=} [properties] Properties to set + */ + function GhostList(properties) { + this.ghosts = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostList ghosts. + * @member {Array.} ghosts + * @memberof wm.protobuf.GhostList + * @instance + */ + GhostList.prototype.ghosts = $util.emptyArray; + + /** + * Creates a new GhostList instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.IGhostList=} [properties] Properties to set + * @returns {wm.protobuf.GhostList} GhostList instance + */ + GhostList.create = function create(properties) { + return new GhostList(properties); + }; + + /** + * Encodes the specified GhostList message. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.IGhostList} message GhostList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ghosts != null && message.ghosts.length) + for (let i = 0; i < message.ghosts.length; ++i) + $root.wm.protobuf.GhostCar.encode(message.ghosts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostList message, length delimited. Does not implicitly {@link wm.protobuf.GhostList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.IGhostList} message GhostList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostList} GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.ghosts && message.ghosts.length)) + message.ghosts = []; + message.ghosts.push($root.wm.protobuf.GhostCar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GhostList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostList} GhostList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostList message. + * @function verify + * @memberof wm.protobuf.GhostList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ghosts != null && message.hasOwnProperty("ghosts")) { + if (!Array.isArray(message.ghosts)) + return "ghosts: array expected"; + for (let i = 0; i < message.ghosts.length; ++i) { + let error = $root.wm.protobuf.GhostCar.verify(message.ghosts[i]); + if (error) + return "ghosts." + error; + } + } + return null; + }; + + /** + * Creates a GhostList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostList} GhostList + */ + GhostList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostList) + return object; + let message = new $root.wm.protobuf.GhostList(); + if (object.ghosts) { + if (!Array.isArray(object.ghosts)) + throw TypeError(".wm.protobuf.GhostList.ghosts: array expected"); + message.ghosts = []; + for (let i = 0; i < object.ghosts.length; ++i) { + if (typeof object.ghosts[i] !== "object") + throw TypeError(".wm.protobuf.GhostList.ghosts: object expected"); + message.ghosts[i] = $root.wm.protobuf.GhostCar.fromObject(object.ghosts[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GhostList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostList + * @static + * @param {wm.protobuf.GhostList} message GhostList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.ghosts = []; + if (message.ghosts && message.ghosts.length) { + object.ghosts = []; + for (let j = 0; j < message.ghosts.length; ++j) + object.ghosts[j] = $root.wm.protobuf.GhostCar.toObject(message.ghosts[j], options); + } + return object; + }; + + /** + * Converts this GhostList to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostList + * @instance + * @returns {Object.} JSON object + */ + GhostList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostList + * @function getTypeUrl + * @memberof wm.protobuf.GhostList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostList"; + }; + + return GhostList; + })(); + + protobuf.CarSummary = (function() { + + /** + * Properties of a CarSummary. + * @memberof wm.protobuf + * @interface ICarSummary + * @property {number} hitCount CarSummary hitCount + * @property {Array.|null} [cars] CarSummary cars + */ + + /** + * Constructs a new CarSummary. + * @memberof wm.protobuf + * @classdesc Represents a CarSummary. + * @implements ICarSummary + * @constructor + * @param {wm.protobuf.ICarSummary=} [properties] Properties to set + */ + function CarSummary(properties) { + this.cars = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CarSummary hitCount. + * @member {number} hitCount + * @memberof wm.protobuf.CarSummary + * @instance + */ + CarSummary.prototype.hitCount = 0; + + /** + * CarSummary cars. + * @member {Array.} cars + * @memberof wm.protobuf.CarSummary + * @instance + */ + CarSummary.prototype.cars = $util.emptyArray; + + /** + * Creates a new CarSummary instance using the specified properties. + * @function create + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.ICarSummary=} [properties] Properties to set + * @returns {wm.protobuf.CarSummary} CarSummary instance + */ + CarSummary.create = function create(properties) { + return new CarSummary(properties); + }; + + /** + * Encodes the specified CarSummary message. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.ICarSummary} message CarSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.hitCount); + if (message.cars != null && message.cars.length) + for (let i = 0; i < message.cars.length; ++i) + $root.wm.protobuf.Car.encode(message.cars[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CarSummary message, length delimited. Does not implicitly {@link wm.protobuf.CarSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.ICarSummary} message CarSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarSummary message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.CarSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.CarSummary} CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.CarSummary(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hitCount = reader.uint32(); + break; + } + case 2: { + if (!(message.cars && message.cars.length)) + message.cars = []; + message.cars.push($root.wm.protobuf.Car.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("hitCount")) + throw $util.ProtocolError("missing required 'hitCount'", { instance: message }); + return message; + }; + + /** + * Decodes a CarSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.CarSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.CarSummary} CarSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarSummary message. + * @function verify + * @memberof wm.protobuf.CarSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.hitCount)) + return "hitCount: integer expected"; + if (message.cars != null && message.hasOwnProperty("cars")) { + if (!Array.isArray(message.cars)) + return "cars: array expected"; + for (let i = 0; i < message.cars.length; ++i) { + let error = $root.wm.protobuf.Car.verify(message.cars[i]); + if (error) + return "cars." + error; + } + } + return null; + }; + + /** + * Creates a CarSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.CarSummary + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.CarSummary} CarSummary + */ + CarSummary.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.CarSummary) + return object; + let message = new $root.wm.protobuf.CarSummary(); + if (object.hitCount != null) + message.hitCount = object.hitCount >>> 0; + if (object.cars) { + if (!Array.isArray(object.cars)) + throw TypeError(".wm.protobuf.CarSummary.cars: array expected"); + message.cars = []; + for (let i = 0; i < object.cars.length; ++i) { + if (typeof object.cars[i] !== "object") + throw TypeError(".wm.protobuf.CarSummary.cars: object expected"); + message.cars[i] = $root.wm.protobuf.Car.fromObject(object.cars[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CarSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.CarSummary + * @static + * @param {wm.protobuf.CarSummary} message CarSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cars = []; + if (options.defaults) + object.hitCount = 0; + if (message.hitCount != null && message.hasOwnProperty("hitCount")) + object.hitCount = message.hitCount; + if (message.cars && message.cars.length) { + object.cars = []; + for (let j = 0; j < message.cars.length; ++j) + object.cars[j] = $root.wm.protobuf.Car.toObject(message.cars[j], options); + } + return object; + }; + + /** + * Converts this CarSummary to JSON. + * @function toJSON + * @memberof wm.protobuf.CarSummary + * @instance + * @returns {Object.} JSON object + */ + CarSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarSummary + * @function getTypeUrl + * @memberof wm.protobuf.CarSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.CarSummary"; + }; + + return CarSummary; + })(); + + protobuf.FileList = (function() { + + /** + * Properties of a FileList. + * @memberof wm.protobuf + * @interface IFileList + * @property {Array.|null} [files] FileList files + * @property {number|null} [interval] FileList interval + */ + + /** + * Constructs a new FileList. + * @memberof wm.protobuf + * @classdesc Represents a FileList. + * @implements IFileList + * @constructor + * @param {wm.protobuf.IFileList=} [properties] Properties to set + */ + function FileList(properties) { + this.files = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileList files. + * @member {Array.} files + * @memberof wm.protobuf.FileList + * @instance + */ + FileList.prototype.files = $util.emptyArray; + + /** + * FileList interval. + * @member {number} interval + * @memberof wm.protobuf.FileList + * @instance + */ + FileList.prototype.interval = 0; + + /** + * Creates a new FileList instance using the specified properties. + * @function create + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.IFileList=} [properties] Properties to set + * @returns {wm.protobuf.FileList} FileList instance + */ + FileList.create = function create(properties) { + return new FileList(properties); + }; + + /** + * Encodes the specified FileList message. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.IFileList} message FileList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.files != null && message.files.length) + for (let i = 0; i < message.files.length; ++i) + $root.wm.protobuf.FileList.FileInfo.encode(message.files[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.interval); + return writer; + }; + + /** + * Encodes the specified FileList message, length delimited. Does not implicitly {@link wm.protobuf.FileList.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.IFileList} message FileList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileList message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.FileList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.FileList} FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.FileList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.files && message.files.length)) + message.files = []; + message.files.push($root.wm.protobuf.FileList.FileInfo.decode(reader, reader.uint32())); + break; + } + case 2: { + message.interval = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.FileList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.FileList} FileList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileList message. + * @function verify + * @memberof wm.protobuf.FileList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.files != null && message.hasOwnProperty("files")) { + if (!Array.isArray(message.files)) + return "files: array expected"; + for (let i = 0; i < message.files.length; ++i) { + let error = $root.wm.protobuf.FileList.FileInfo.verify(message.files[i]); + if (error) + return "files." + error; + } + } + if (message.interval != null && message.hasOwnProperty("interval")) + if (!$util.isInteger(message.interval)) + return "interval: integer expected"; + return null; + }; + + /** + * Creates a FileList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.FileList + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.FileList} FileList + */ + FileList.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.FileList) + return object; + let message = new $root.wm.protobuf.FileList(); + if (object.files) { + if (!Array.isArray(object.files)) + throw TypeError(".wm.protobuf.FileList.files: array expected"); + message.files = []; + for (let i = 0; i < object.files.length; ++i) { + if (typeof object.files[i] !== "object") + throw TypeError(".wm.protobuf.FileList.files: object expected"); + message.files[i] = $root.wm.protobuf.FileList.FileInfo.fromObject(object.files[i]); + } + } + if (object.interval != null) + message.interval = object.interval >>> 0; + return message; + }; + + /** + * Creates a plain object from a FileList message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.FileList + * @static + * @param {wm.protobuf.FileList} message FileList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.files = []; + if (options.defaults) + object.interval = 0; + if (message.files && message.files.length) { + object.files = []; + for (let j = 0; j < message.files.length; ++j) + object.files[j] = $root.wm.protobuf.FileList.FileInfo.toObject(message.files[j], options); + } + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = message.interval; + return object; + }; + + /** + * Converts this FileList to JSON. + * @function toJSON + * @memberof wm.protobuf.FileList + * @instance + * @returns {Object.} JSON object + */ + FileList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileList + * @function getTypeUrl + * @memberof wm.protobuf.FileList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.FileList"; + }; + + FileList.FileInfo = (function() { + + /** + * Properties of a FileInfo. + * @memberof wm.protobuf.FileList + * @interface IFileInfo + * @property {number} fileId FileInfo fileId + * @property {wm.protobuf.FileType} fileType FileInfo fileType + * @property {number} fileSize FileInfo fileSize + * @property {string} url FileInfo url + * @property {Uint8Array} sha1sum FileInfo sha1sum + * @property {number} notBefore FileInfo notBefore + * @property {number} notAfter FileInfo notAfter + */ + + /** + * Constructs a new FileInfo. + * @memberof wm.protobuf.FileList + * @classdesc Represents a FileInfo. + * @implements IFileInfo + * @constructor + * @param {wm.protobuf.FileList.IFileInfo=} [properties] Properties to set + */ + function FileInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileInfo fileId. + * @member {number} fileId + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.fileId = 0; + + /** + * FileInfo fileType. + * @member {wm.protobuf.FileType} fileType + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.fileType = 1; + + /** + * FileInfo fileSize. + * @member {number} fileSize + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.fileSize = 0; + + /** + * FileInfo url. + * @member {string} url + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.url = ""; + + /** + * FileInfo sha1sum. + * @member {Uint8Array} sha1sum + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.sha1sum = $util.newBuffer([]); + + /** + * FileInfo notBefore. + * @member {number} notBefore + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.notBefore = 0; + + /** + * FileInfo notAfter. + * @member {number} notAfter + * @memberof wm.protobuf.FileList.FileInfo + * @instance + */ + FileInfo.prototype.notAfter = 0; + + /** + * Creates a new FileInfo instance using the specified properties. + * @function create + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.IFileInfo=} [properties] Properties to set + * @returns {wm.protobuf.FileList.FileInfo} FileInfo instance + */ + FileInfo.create = function create(properties) { + return new FileInfo(properties); + }; + + /** + * Encodes the specified FileInfo message. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.IFileInfo} message FileInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.fileId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.fileType); + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.fileSize); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.url); + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.sha1sum); + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.notBefore); + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.notAfter); + return writer; + }; + + /** + * Encodes the specified FileInfo message, length delimited. Does not implicitly {@link wm.protobuf.FileList.FileInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.IFileInfo} message FileInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileInfo message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.FileList.FileInfo} FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.FileList.FileInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fileId = reader.uint32(); + break; + } + case 2: { + message.fileType = reader.int32(); + break; + } + case 3: { + message.fileSize = reader.uint32(); + break; + } + case 4: { + message.url = reader.string(); + break; + } + case 5: { + message.sha1sum = reader.bytes(); + break; + } + case 6: { + message.notBefore = reader.uint32(); + break; + } + case 7: { + message.notAfter = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("fileId")) + throw $util.ProtocolError("missing required 'fileId'", { instance: message }); + if (!message.hasOwnProperty("fileType")) + throw $util.ProtocolError("missing required 'fileType'", { instance: message }); + if (!message.hasOwnProperty("fileSize")) + throw $util.ProtocolError("missing required 'fileSize'", { instance: message }); + if (!message.hasOwnProperty("url")) + throw $util.ProtocolError("missing required 'url'", { instance: message }); + if (!message.hasOwnProperty("sha1sum")) + throw $util.ProtocolError("missing required 'sha1sum'", { instance: message }); + if (!message.hasOwnProperty("notBefore")) + throw $util.ProtocolError("missing required 'notBefore'", { instance: message }); + if (!message.hasOwnProperty("notAfter")) + throw $util.ProtocolError("missing required 'notAfter'", { instance: message }); + return message; + }; + + /** + * Decodes a FileInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.FileList.FileInfo} FileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileInfo message. + * @function verify + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.fileId)) + return "fileId: integer expected"; + switch (message.fileType) { + default: + return "fileType: enum value expected"; + case 1: + case 4: + case 6: + break; + } + if (!$util.isInteger(message.fileSize)) + return "fileSize: integer expected"; + if (!$util.isString(message.url)) + return "url: string expected"; + if (!(message.sha1sum && typeof message.sha1sum.length === "number" || $util.isString(message.sha1sum))) + return "sha1sum: buffer expected"; + if (!$util.isInteger(message.notBefore)) + return "notBefore: integer expected"; + if (!$util.isInteger(message.notAfter)) + return "notAfter: integer expected"; + return null; + }; + + /** + * Creates a FileInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.FileList.FileInfo} FileInfo + */ + FileInfo.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.FileList.FileInfo) + return object; + let message = new $root.wm.protobuf.FileList.FileInfo(); + if (object.fileId != null) + message.fileId = object.fileId >>> 0; + switch (object.fileType) { + case "FILE_PROMOTION_ANNOUNCEMENT": + case 1: + message.fileType = 1; + break; + case "FILE_FEATURE_ANNOUNCEMENT": + case 4: + message.fileType = 4; + break; + case "FILE_SPAPP_ANNOUNCEMENT": + case 6: + message.fileType = 6; + break; + } + if (object.fileSize != null) + message.fileSize = object.fileSize >>> 0; + if (object.url != null) + message.url = String(object.url); + if (object.sha1sum != null) + if (typeof object.sha1sum === "string") + $util.base64.decode(object.sha1sum, message.sha1sum = $util.newBuffer($util.base64.length(object.sha1sum)), 0); + else if (object.sha1sum.length >= 0) + message.sha1sum = object.sha1sum; + if (object.notBefore != null) + message.notBefore = object.notBefore >>> 0; + if (object.notAfter != null) + message.notAfter = object.notAfter >>> 0; + return message; + }; + + /** + * Creates a plain object from a FileInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {wm.protobuf.FileList.FileInfo} message FileInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.fileId = 0; + object.fileType = options.enums === String ? "FILE_PROMOTION_ANNOUNCEMENT" : 1; + object.fileSize = 0; + object.url = ""; + if (options.bytes === String) + object.sha1sum = ""; + else { + object.sha1sum = []; + if (options.bytes !== Array) + object.sha1sum = $util.newBuffer(object.sha1sum); + } + object.notBefore = 0; + object.notAfter = 0; + } + if (message.fileId != null && message.hasOwnProperty("fileId")) + object.fileId = message.fileId; + if (message.fileType != null && message.hasOwnProperty("fileType")) + object.fileType = options.enums === String ? $root.wm.protobuf.FileType[message.fileType] : message.fileType; + if (message.fileSize != null && message.hasOwnProperty("fileSize")) + object.fileSize = message.fileSize; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.sha1sum != null && message.hasOwnProperty("sha1sum")) + object.sha1sum = options.bytes === String ? $util.base64.encode(message.sha1sum, 0, message.sha1sum.length) : options.bytes === Array ? Array.prototype.slice.call(message.sha1sum) : message.sha1sum; + if (message.notBefore != null && message.hasOwnProperty("notBefore")) + object.notBefore = message.notBefore; + if (message.notAfter != null && message.hasOwnProperty("notAfter")) + object.notAfter = message.notAfter; + return object; + }; + + /** + * Converts this FileInfo to JSON. + * @function toJSON + * @memberof wm.protobuf.FileList.FileInfo + * @instance + * @returns {Object.} JSON object + */ + FileInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileInfo + * @function getTypeUrl + * @memberof wm.protobuf.FileList.FileInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.FileList.FileInfo"; + }; + + return FileInfo; + })(); + + return FileList; + })(); + + protobuf.GhostCompetitionTarget = (function() { + + /** + * Properties of a GhostCompetitionTarget. + * @memberof wm.protobuf + * @interface IGhostCompetitionTarget + * @property {number} competitionId GhostCompetitionTarget competitionId + * @property {number|null} [specialGhostId] GhostCompetitionTarget specialGhostId + * @property {wm.protobuf.IGhostCar} ghostCar GhostCompetitionTarget ghostCar + * @property {number|Long} trailId GhostCompetitionTarget trailId + * @property {number} updatedAt GhostCompetitionTarget updatedAt + * @property {wm.protobuf.IGhostCompetitionSchedule|null} [competitionSchedule] GhostCompetitionTarget competitionSchedule + */ + + /** + * Constructs a new GhostCompetitionTarget. + * @memberof wm.protobuf + * @classdesc Represents a GhostCompetitionTarget. + * @implements IGhostCompetitionTarget + * @constructor + * @param {wm.protobuf.IGhostCompetitionTarget=} [properties] Properties to set + */ + function GhostCompetitionTarget(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GhostCompetitionTarget competitionId. + * @member {number} competitionId + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.competitionId = 0; + + /** + * GhostCompetitionTarget specialGhostId. + * @member {number} specialGhostId + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.specialGhostId = 0; + + /** + * GhostCompetitionTarget ghostCar. + * @member {wm.protobuf.IGhostCar} ghostCar + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.ghostCar = null; + + /** + * GhostCompetitionTarget trailId. + * @member {number|Long} trailId + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.trailId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GhostCompetitionTarget updatedAt. + * @member {number} updatedAt + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.updatedAt = 0; + + /** + * GhostCompetitionTarget competitionSchedule. + * @member {wm.protobuf.IGhostCompetitionSchedule|null|undefined} competitionSchedule + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + */ + GhostCompetitionTarget.prototype.competitionSchedule = null; + + /** + * Creates a new GhostCompetitionTarget instance using the specified properties. + * @function create + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.IGhostCompetitionTarget=} [properties] Properties to set + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget instance + */ + GhostCompetitionTarget.create = function create(properties) { + return new GhostCompetitionTarget(properties); + }; + + /** + * Encodes the specified GhostCompetitionTarget message. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @function encode + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.IGhostCompetitionTarget} message GhostCompetitionTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionTarget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.competitionId); + if (message.specialGhostId != null && Object.hasOwnProperty.call(message, "specialGhostId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.specialGhostId); + $root.wm.protobuf.GhostCar.encode(message.ghostCar, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.trailId); + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.updatedAt); + if (message.competitionSchedule != null && Object.hasOwnProperty.call(message, "competitionSchedule")) + $root.wm.protobuf.GhostCompetitionSchedule.encode(message.competitionSchedule, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GhostCompetitionTarget message, length delimited. Does not implicitly {@link wm.protobuf.GhostCompetitionTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.IGhostCompetitionTarget} message GhostCompetitionTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GhostCompetitionTarget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer. + * @function decode + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionTarget.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.wm.protobuf.GhostCompetitionTarget(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.competitionId = reader.uint32(); + break; + } + case 2: { + message.specialGhostId = reader.uint32(); + break; + } + case 3: { + message.ghostCar = $root.wm.protobuf.GhostCar.decode(reader, reader.uint32()); + break; + } + case 4: { + message.trailId = reader.uint64(); + break; + } + case 5: { + message.updatedAt = reader.uint32(); + break; + } + case 6: { + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("competitionId")) + throw $util.ProtocolError("missing required 'competitionId'", { instance: message }); + if (!message.hasOwnProperty("ghostCar")) + throw $util.ProtocolError("missing required 'ghostCar'", { instance: message }); + if (!message.hasOwnProperty("trailId")) + throw $util.ProtocolError("missing required 'trailId'", { instance: message }); + if (!message.hasOwnProperty("updatedAt")) + throw $util.ProtocolError("missing required 'updatedAt'", { instance: message }); + return message; + }; + + /** + * Decodes a GhostCompetitionTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GhostCompetitionTarget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GhostCompetitionTarget message. + * @function verify + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GhostCompetitionTarget.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.competitionId)) + return "competitionId: integer expected"; + if (message.specialGhostId != null && message.hasOwnProperty("specialGhostId")) + if (!$util.isInteger(message.specialGhostId)) + return "specialGhostId: integer expected"; + { + let error = $root.wm.protobuf.GhostCar.verify(message.ghostCar); + if (error) + return "ghostCar." + error; + } + if (!$util.isInteger(message.trailId) && !(message.trailId && $util.isInteger(message.trailId.low) && $util.isInteger(message.trailId.high))) + return "trailId: integer|Long expected"; + if (!$util.isInteger(message.updatedAt)) + return "updatedAt: integer expected"; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) { + let error = $root.wm.protobuf.GhostCompetitionSchedule.verify(message.competitionSchedule); + if (error) + return "competitionSchedule." + error; + } + return null; + }; + + /** + * Creates a GhostCompetitionTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {Object.} object Plain object + * @returns {wm.protobuf.GhostCompetitionTarget} GhostCompetitionTarget + */ + GhostCompetitionTarget.fromObject = function fromObject(object) { + if (object instanceof $root.wm.protobuf.GhostCompetitionTarget) + return object; + let message = new $root.wm.protobuf.GhostCompetitionTarget(); + if (object.competitionId != null) + message.competitionId = object.competitionId >>> 0; + if (object.specialGhostId != null) + message.specialGhostId = object.specialGhostId >>> 0; + if (object.ghostCar != null) { + if (typeof object.ghostCar !== "object") + throw TypeError(".wm.protobuf.GhostCompetitionTarget.ghostCar: object expected"); + message.ghostCar = $root.wm.protobuf.GhostCar.fromObject(object.ghostCar); + } + if (object.trailId != null) + if ($util.Long) + (message.trailId = $util.Long.fromValue(object.trailId)).unsigned = true; + else if (typeof object.trailId === "string") + message.trailId = parseInt(object.trailId, 10); + else if (typeof object.trailId === "number") + message.trailId = object.trailId; + else if (typeof object.trailId === "object") + message.trailId = new $util.LongBits(object.trailId.low >>> 0, object.trailId.high >>> 0).toNumber(true); + if (object.updatedAt != null) + message.updatedAt = object.updatedAt >>> 0; + if (object.competitionSchedule != null) { + if (typeof object.competitionSchedule !== "object") + throw TypeError(".wm.protobuf.GhostCompetitionTarget.competitionSchedule: object expected"); + message.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.fromObject(object.competitionSchedule); + } + return message; + }; + + /** + * Creates a plain object from a GhostCompetitionTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {wm.protobuf.GhostCompetitionTarget} message GhostCompetitionTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GhostCompetitionTarget.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.competitionId = 0; + object.specialGhostId = 0; + object.ghostCar = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.trailId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trailId = options.longs === String ? "0" : 0; + object.updatedAt = 0; + object.competitionSchedule = null; + } + if (message.competitionId != null && message.hasOwnProperty("competitionId")) + object.competitionId = message.competitionId; + if (message.specialGhostId != null && message.hasOwnProperty("specialGhostId")) + object.specialGhostId = message.specialGhostId; + if (message.ghostCar != null && message.hasOwnProperty("ghostCar")) + object.ghostCar = $root.wm.protobuf.GhostCar.toObject(message.ghostCar, options); + if (message.trailId != null && message.hasOwnProperty("trailId")) + if (typeof message.trailId === "number") + object.trailId = options.longs === String ? String(message.trailId) : message.trailId; + else + object.trailId = options.longs === String ? $util.Long.prototype.toString.call(message.trailId) : options.longs === Number ? new $util.LongBits(message.trailId.low >>> 0, message.trailId.high >>> 0).toNumber(true) : message.trailId; + if (message.updatedAt != null && message.hasOwnProperty("updatedAt")) + object.updatedAt = message.updatedAt; + if (message.competitionSchedule != null && message.hasOwnProperty("competitionSchedule")) + object.competitionSchedule = $root.wm.protobuf.GhostCompetitionSchedule.toObject(message.competitionSchedule, options); + return object; + }; + + /** + * Converts this GhostCompetitionTarget to JSON. + * @function toJSON + * @memberof wm.protobuf.GhostCompetitionTarget + * @instance + * @returns {Object.} JSON object + */ + GhostCompetitionTarget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GhostCompetitionTarget + * @function getTypeUrl + * @memberof wm.protobuf.GhostCompetitionTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GhostCompetitionTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/wm.protobuf.GhostCompetitionTarget"; + }; + + return GhostCompetitionTarget; + })(); + + /** + * SystemConstant enum. + * @name wm.protobuf.SystemConstant + * @enum {number} + * @property {number} PROTOBUF_MESSAGE_REVISION=8053 PROTOBUF_MESSAGE_REVISION value + */ + protobuf.SystemConstant = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[8053] = "PROTOBUF_MESSAGE_REVISION"] = 8053; + return values; + })(); + + /** + * ErrorCode enum. + * @name wm.protobuf.ErrorCode + * @enum {number} + * @property {number} ERR_SUCCESS=0 ERR_SUCCESS value + * @property {number} ERR_REQUEST=1 ERR_REQUEST value + * @property {number} ERR_NOT_FOUND=2 ERR_NOT_FOUND value + * @property {number} ERR_ID_SERVER=3 ERR_ID_SERVER value + * @property {number} ERR_ID_BANNED=4 ERR_ID_BANNED value + * @property {number} ERR_USER_LOCKED=5 ERR_USER_LOCKED value + * @property {number} ERR_USER_VERSION=6 ERR_USER_VERSION value + * @property {number} ERR_NAME_CONFLICTED=7 ERR_NAME_CONFLICTED value + * @property {number} ERR_FORBIDDEN=9 ERR_FORBIDDEN value + * @property {number} ERR_USER_SUCCEEDED=11 ERR_USER_SUCCEEDED value + * @property {number} ERR_BEING_TRANSFERRED=12 ERR_BEING_TRANSFERRED value + * @property {number} ERR_SCRATCH_LOCKED=13 ERR_SCRATCH_LOCKED value + */ + protobuf.ErrorCode = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ERR_SUCCESS"] = 0; + values[valuesById[1] = "ERR_REQUEST"] = 1; + values[valuesById[2] = "ERR_NOT_FOUND"] = 2; + values[valuesById[3] = "ERR_ID_SERVER"] = 3; + values[valuesById[4] = "ERR_ID_BANNED"] = 4; + values[valuesById[5] = "ERR_USER_LOCKED"] = 5; + values[valuesById[6] = "ERR_USER_VERSION"] = 6; + values[valuesById[7] = "ERR_NAME_CONFLICTED"] = 7; + values[valuesById[9] = "ERR_FORBIDDEN"] = 9; + values[valuesById[11] = "ERR_USER_SUCCEEDED"] = 11; + values[valuesById[12] = "ERR_BEING_TRANSFERRED"] = 12; + values[valuesById[13] = "ERR_SCRATCH_LOCKED"] = 13; + return values; + })(); + + /** + * LineType enum. + * @name wm.protobuf.LineType + * @enum {number} + * @property {number} L_UNKNOWN=0 L_UNKNOWN value + * @property {number} L_MOBILE=1 L_MOBILE value + * @property {number} L_ISDN=2 L_ISDN value + * @property {number} L_BFLETS=3 L_BFLETS value + * @property {number} L_ADSL=4 L_ADSL value + * @property {number} L_WIRED=5 L_WIRED value + */ + protobuf.LineType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "L_UNKNOWN"] = 0; + values[valuesById[1] = "L_MOBILE"] = 1; + values[valuesById[2] = "L_ISDN"] = 2; + values[valuesById[3] = "L_BFLETS"] = 3; + values[valuesById[4] = "L_ADSL"] = 4; + values[valuesById[5] = "L_WIRED"] = 5; + return values; + })(); + + /** + * TerminalType enum. + * @name wm.protobuf.TerminalType + * @enum {number} + * @property {number} T_DRIVE=0 T_DRIVE value + * @property {number} T_TERMINAL=1 T_TERMINAL value + */ + protobuf.TerminalType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "T_DRIVE"] = 0; + values[valuesById[1] = "T_TERMINAL"] = 1; + return values; + })(); + + /** + * DeviceType enum. + * @name wm.protobuf.DeviceType + * @enum {number} + * @property {number} DEVICE_CARD=0 DEVICE_CARD value + * @property {number} DEVICE_PHONE=1 DEVICE_PHONE value + */ + protobuf.DeviceType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEVICE_CARD"] = 0; + values[valuesById[1] = "DEVICE_PHONE"] = 1; + return values; + })(); + + /** + * ItemCategory enum. + * @name wm.protobuf.ItemCategory + * @enum {number} + * @property {number} CAT_CUSTOM_COLOR=1 CAT_CUSTOM_COLOR value + * @property {number} CAT_WHEEL=2 CAT_WHEEL value + * @property {number} CAT_AERO=3 CAT_AERO value + * @property {number} CAT_BONNET=4 CAT_BONNET value + * @property {number} CAT_WING=5 CAT_WING value + * @property {number} CAT_MIRROR=6 CAT_MIRROR value + * @property {number} CAT_NEON=8 CAT_NEON value + * @property {number} CAT_TRUNK=9 CAT_TRUNK value + * @property {number} CAT_NUMBER_PLATE=10 CAT_NUMBER_PLATE value + * @property {number} CAT_GT_WING=12 CAT_GT_WING value + * @property {number} CAT_AURA_MOTIF=14 CAT_AURA_MOTIF value + * @property {number} CAT_METER=15 CAT_METER value + * @property {number} CAT_BGM=16 CAT_BGM value + * @property {number} CAT_NAME_PLATE=17 CAT_NAME_PLATE value + * @property {number} CAT_NUMBER=19 CAT_NUMBER value + * @property {number} CAT_BGM_TRACK=22 CAT_BGM_TRACK value + * @property {number} CAT_WINDOW_STICKER_FONT=24 CAT_WINDOW_STICKER_FONT value + * @property {number} CAT_WINDOW_DECORATION=25 CAT_WINDOW_DECORATION value + * @property {number} CAT_RIVAL_MARKER=26 CAT_RIVAL_MARKER value + * @property {number} CAT_STAMP=27 CAT_STAMP value + * @property {number} CAT_TERMINAL_BACKGROUND=28 CAT_TERMINAL_BACKGROUND value + * @property {number} CAT_CAR_TICKET=201 CAT_CAR_TICKET value + * @property {number} CAT_CONSUMPTION_ITEM=202 CAT_CONSUMPTION_ITEM value + * @property {number} CAT_CAR_TICKET_FREE=203 CAT_CAR_TICKET_FREE value + * @property {number} CAT_AERO_FULLSET=300 CAT_AERO_FULLSET value + * @property {number} CAT_AERO_LIMITED=301 CAT_AERO_LIMITED value + */ + protobuf.ItemCategory = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "CAT_CUSTOM_COLOR"] = 1; + values[valuesById[2] = "CAT_WHEEL"] = 2; + values[valuesById[3] = "CAT_AERO"] = 3; + values[valuesById[4] = "CAT_BONNET"] = 4; + values[valuesById[5] = "CAT_WING"] = 5; + values[valuesById[6] = "CAT_MIRROR"] = 6; + values[valuesById[8] = "CAT_NEON"] = 8; + values[valuesById[9] = "CAT_TRUNK"] = 9; + values[valuesById[10] = "CAT_NUMBER_PLATE"] = 10; + values[valuesById[12] = "CAT_GT_WING"] = 12; + values[valuesById[14] = "CAT_AURA_MOTIF"] = 14; + values[valuesById[15] = "CAT_METER"] = 15; + values[valuesById[16] = "CAT_BGM"] = 16; + values[valuesById[17] = "CAT_NAME_PLATE"] = 17; + values[valuesById[19] = "CAT_NUMBER"] = 19; + values[valuesById[22] = "CAT_BGM_TRACK"] = 22; + values[valuesById[24] = "CAT_WINDOW_STICKER_FONT"] = 24; + values[valuesById[25] = "CAT_WINDOW_DECORATION"] = 25; + values[valuesById[26] = "CAT_RIVAL_MARKER"] = 26; + values[valuesById[27] = "CAT_STAMP"] = 27; + values[valuesById[28] = "CAT_TERMINAL_BACKGROUND"] = 28; + values[valuesById[201] = "CAT_CAR_TICKET"] = 201; + values[valuesById[202] = "CAT_CONSUMPTION_ITEM"] = 202; + values[valuesById[203] = "CAT_CAR_TICKET_FREE"] = 203; + values[valuesById[300] = "CAT_AERO_FULLSET"] = 300; + values[valuesById[301] = "CAT_AERO_LIMITED"] = 301; + return values; + })(); + + /** + * TutorialType enum. + * @name wm.protobuf.TutorialType + * @enum {number} + * @property {number} TUTORIAL_ID_STORY=0 TUTORIAL_ID_STORY value + * @property {number} TUTORIAL_ID_TIME_ATTACK=1 TUTORIAL_ID_TIME_ATTACK value + * @property {number} TUTORIAL_ID_GHOST=2 TUTORIAL_ID_GHOST value + * @property {number} TUTORIAL_ID_GHOST_CHALLENGE=3 TUTORIAL_ID_GHOST_CHALLENGE value + * @property {number} TUTORIAL_ID_GHOST_LEVEL=4 TUTORIAL_ID_GHOST_LEVEL value + * @property {number} TUTORIAL_ID_UNUSED_5=5 TUTORIAL_ID_UNUSED_5 value + * @property {number} TUTORIAL_ID_GHOST_SEARCH=6 TUTORIAL_ID_GHOST_SEARCH value + * @property {number} TUTORIAL_ID_GHOST_COMPETITION=7 TUTORIAL_ID_GHOST_COMPETITION value + * @property {number} TUTORIAL_ID_HP600_CARD=8 TUTORIAL_ID_HP600_CARD value + * @property {number} TUTORIAL_ID_UNUSED_9=9 TUTORIAL_ID_UNUSED_9 value + * @property {number} TUTORIAL_ID_COMPETITION_QUALIFIED=10 TUTORIAL_ID_COMPETITION_QUALIFIED value + * @property {number} TUTORIAL_ID_COMPETITION_TERMINAL=11 TUTORIAL_ID_COMPETITION_TERMINAL value + * @property {number} TUTORIAL_ID_COMPETITION_NOTICE=12 TUTORIAL_ID_COMPETITION_NOTICE value + * @property {number} TUTORIAL_ID_COMPETITION_FINISHED=13 TUTORIAL_ID_COMPETITION_FINISHED value + * @property {number} TUTORIAL_ID_UNUSED_14=14 TUTORIAL_ID_UNUSED_14 value + * @property {number} TUTORIAL_ID_UNUSED_15=15 TUTORIAL_ID_UNUSED_15 value + * @property {number} TUTORIAL_ID_UNUSED_16=16 TUTORIAL_ID_UNUSED_16 value + * @property {number} TUTORIAL_ID_UNUSED_17=17 TUTORIAL_ID_UNUSED_17 value + * @property {number} TUTORIAL_ID_UNUSED_18=18 TUTORIAL_ID_UNUSED_18 value + * @property {number} TUTORIAL_ID_UNUSED_19=19 TUTORIAL_ID_UNUSED_19 value + * @property {number} TUTORIAL_ID_GHOST_STAMP=20 TUTORIAL_ID_GHOST_STAMP value + * @property {number} TUTORIAL_ID_GHOST_STAMP_DECLINED=21 TUTORIAL_ID_GHOST_STAMP_DECLINED value + * @property {number} TUTORIAL_ID_GHOST_STAMP_FRIENDS=22 TUTORIAL_ID_GHOST_STAMP_FRIENDS value + * @property {number} TUTORIAL_ID_TERMINAL_SCRATCH=23 TUTORIAL_ID_TERMINAL_SCRATCH value + * @property {number} TUTORIAL_ID_TURN_SCRATCH_SHEET=24 TUTORIAL_ID_TURN_SCRATCH_SHEET value + * @property {number} TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN=25 TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN value + * @property {number} TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE=26 TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE value + * @property {number} TUTORIAL_ID_VS_CONTINUE_TICKET=27 TUTORIAL_ID_VS_CONTINUE_TICKET value + * @property {number} TUTORIAL_ID_UNUSED_28=28 TUTORIAL_ID_UNUSED_28 value + * @property {number} TUTORIAL_ID_UNUSED_29=29 TUTORIAL_ID_UNUSED_29 value + * @property {number} TUTORIAL_ID_UNUSED_30=30 TUTORIAL_ID_UNUSED_30 value + * @property {number} TUTORIAL_ID_DRESS_UP=31 TUTORIAL_ID_DRESS_UP value + * @property {number} TUTORIAL_ID_MULTI_GHOST=32 TUTORIAL_ID_MULTI_GHOST value + * @property {number} TUTORIAL_ID_STORY_NEW_FEATURE=33 TUTORIAL_ID_STORY_NEW_FEATURE value + * @property {number} TUTORIAL_ID_GHOST_NEW_FEATURE=34 TUTORIAL_ID_GHOST_NEW_FEATURE value + * @property {number} TUTORIAL_ID_GHOST_REGION_MAP=35 TUTORIAL_ID_GHOST_REGION_MAP value + */ + protobuf.TutorialType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TUTORIAL_ID_STORY"] = 0; + values[valuesById[1] = "TUTORIAL_ID_TIME_ATTACK"] = 1; + values[valuesById[2] = "TUTORIAL_ID_GHOST"] = 2; + values[valuesById[3] = "TUTORIAL_ID_GHOST_CHALLENGE"] = 3; + values[valuesById[4] = "TUTORIAL_ID_GHOST_LEVEL"] = 4; + values[valuesById[5] = "TUTORIAL_ID_UNUSED_5"] = 5; + values[valuesById[6] = "TUTORIAL_ID_GHOST_SEARCH"] = 6; + values[valuesById[7] = "TUTORIAL_ID_GHOST_COMPETITION"] = 7; + values[valuesById[8] = "TUTORIAL_ID_HP600_CARD"] = 8; + values[valuesById[9] = "TUTORIAL_ID_UNUSED_9"] = 9; + values[valuesById[10] = "TUTORIAL_ID_COMPETITION_QUALIFIED"] = 10; + values[valuesById[11] = "TUTORIAL_ID_COMPETITION_TERMINAL"] = 11; + values[valuesById[12] = "TUTORIAL_ID_COMPETITION_NOTICE"] = 12; + values[valuesById[13] = "TUTORIAL_ID_COMPETITION_FINISHED"] = 13; + values[valuesById[14] = "TUTORIAL_ID_UNUSED_14"] = 14; + values[valuesById[15] = "TUTORIAL_ID_UNUSED_15"] = 15; + values[valuesById[16] = "TUTORIAL_ID_UNUSED_16"] = 16; + values[valuesById[17] = "TUTORIAL_ID_UNUSED_17"] = 17; + values[valuesById[18] = "TUTORIAL_ID_UNUSED_18"] = 18; + values[valuesById[19] = "TUTORIAL_ID_UNUSED_19"] = 19; + values[valuesById[20] = "TUTORIAL_ID_GHOST_STAMP"] = 20; + values[valuesById[21] = "TUTORIAL_ID_GHOST_STAMP_DECLINED"] = 21; + values[valuesById[22] = "TUTORIAL_ID_GHOST_STAMP_FRIENDS"] = 22; + values[valuesById[23] = "TUTORIAL_ID_TERMINAL_SCRATCH"] = 23; + values[valuesById[24] = "TUTORIAL_ID_TURN_SCRATCH_SHEET"] = 24; + values[valuesById[25] = "TUTORIAL_ID_INVITE_FRIEND_CAMPAIGN"] = 25; + values[valuesById[26] = "TUTORIAL_ID_CAR_COUPON_FULL_TUNED_RECEIVABLE"] = 26; + values[valuesById[27] = "TUTORIAL_ID_VS_CONTINUE_TICKET"] = 27; + values[valuesById[28] = "TUTORIAL_ID_UNUSED_28"] = 28; + values[valuesById[29] = "TUTORIAL_ID_UNUSED_29"] = 29; + values[valuesById[30] = "TUTORIAL_ID_UNUSED_30"] = 30; + values[valuesById[31] = "TUTORIAL_ID_DRESS_UP"] = 31; + values[valuesById[32] = "TUTORIAL_ID_MULTI_GHOST"] = 32; + values[valuesById[33] = "TUTORIAL_ID_STORY_NEW_FEATURE"] = 33; + values[valuesById[34] = "TUTORIAL_ID_GHOST_NEW_FEATURE"] = 34; + values[valuesById[35] = "TUTORIAL_ID_GHOST_REGION_MAP"] = 35; + return values; + })(); + + /** + * GameMode enum. + * @name wm.protobuf.GameMode + * @enum {number} + * @property {number} MODE_STORY=1 MODE_STORY value + * @property {number} MODE_TIME_ATTACK=2 MODE_TIME_ATTACK value + * @property {number} MODE_VS_BATTLE=3 MODE_VS_BATTLE value + * @property {number} MODE_GHOST_BATTLE=4 MODE_GHOST_BATTLE value + * @property {number} MODE_EVENT=5 MODE_EVENT value + */ + protobuf.GameMode = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "MODE_STORY"] = 1; + values[valuesById[2] = "MODE_TIME_ATTACK"] = 2; + values[valuesById[3] = "MODE_VS_BATTLE"] = 3; + values[valuesById[4] = "MODE_GHOST_BATTLE"] = 4; + values[valuesById[5] = "MODE_EVENT"] = 5; + return values; + })(); + + /** + * GhostType enum. + * @name wm.protobuf.GhostType + * @enum {number} + * @property {number} GHOST_NORMAL=1 GHOST_NORMAL value + * @property {number} GHOST_PINCH_RUNNER=2 GHOST_PINCH_RUNNER value + * @property {number} GHOST_DEFAULT=3 GHOST_DEFAULT value + */ + protobuf.GhostType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "GHOST_NORMAL"] = 1; + values[valuesById[2] = "GHOST_PINCH_RUNNER"] = 2; + values[valuesById[3] = "GHOST_DEFAULT"] = 3; + return values; + })(); + + /** + * GhostSelectionMethod enum. + * @name wm.protobuf.GhostSelectionMethod + * @enum {number} + * @property {number} GHOST_SEARCH_BY_REGION=1 GHOST_SEARCH_BY_REGION value + * @property {number} GHOST_SELECT_BY_LEVEL=2 GHOST_SELECT_BY_LEVEL value + * @property {number} GHOST_SELECT_CROWN_MATCH=3 GHOST_SELECT_CROWN_MATCH value + * @property {number} GHOST_SELECT_STAMP_MATCH=4 GHOST_SELECT_STAMP_MATCH value + * @property {number} GHOST_SELECT_FROM_HISTORY=5 GHOST_SELECT_FROM_HISTORY value + * @property {number} GHOST_SEARCH_BY_SHOP=6 GHOST_SEARCH_BY_SHOP value + * @property {number} GHOST_SEARCH_BY_NAME=7 GHOST_SEARCH_BY_NAME value + * @property {number} GHOST_ACCEPT_CHALLENGER=8 GHOST_ACCEPT_CHALLENGER value + * @property {number} GHOST_APPOINTMENT=9 GHOST_APPOINTMENT value + * @property {number} GHOST_DEFAULT_OPPONENT=10 GHOST_DEFAULT_OPPONENT value + * @property {number} GHOST_COMPETITION=11 GHOST_COMPETITION value + * @property {number} GHOST_SELECT_FROM_BOOKMARKS=12 GHOST_SELECT_FROM_BOOKMARKS value + */ + protobuf.GhostSelectionMethod = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "GHOST_SEARCH_BY_REGION"] = 1; + values[valuesById[2] = "GHOST_SELECT_BY_LEVEL"] = 2; + values[valuesById[3] = "GHOST_SELECT_CROWN_MATCH"] = 3; + values[valuesById[4] = "GHOST_SELECT_STAMP_MATCH"] = 4; + values[valuesById[5] = "GHOST_SELECT_FROM_HISTORY"] = 5; + values[valuesById[6] = "GHOST_SEARCH_BY_SHOP"] = 6; + values[valuesById[7] = "GHOST_SEARCH_BY_NAME"] = 7; + values[valuesById[8] = "GHOST_ACCEPT_CHALLENGER"] = 8; + values[valuesById[9] = "GHOST_APPOINTMENT"] = 9; + values[valuesById[10] = "GHOST_DEFAULT_OPPONENT"] = 10; + values[valuesById[11] = "GHOST_COMPETITION"] = 11; + values[valuesById[12] = "GHOST_SELECT_FROM_BOOKMARKS"] = 12; + return values; + })(); + + /** + * GhostRateType enum. + * @name wm.protobuf.GhostRateType + * @enum {number} + * @property {number} GHOST_RATE_UNKNOWN=1 GHOST_RATE_UNKNOWN value + * @property {number} GHOST_RATE_INVALID=2 GHOST_RATE_INVALID value + * @property {number} GHOST_RATE_VALID=3 GHOST_RATE_VALID value + */ + protobuf.GhostRateType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "GHOST_RATE_UNKNOWN"] = 1; + values[valuesById[2] = "GHOST_RATE_INVALID"] = 2; + values[valuesById[3] = "GHOST_RATE_VALID"] = 3; + return values; + })(); + + /** + * PathSelectionMethod enum. + * @name wm.protobuf.PathSelectionMethod + * @enum {number} + * @property {number} PATH_NEW=1 PATH_NEW value + * @property {number} PATH_PLAIN=2 PATH_PLAIN value + * @property {number} PATH_FRIEND=3 PATH_FRIEND value + * @property {number} PATH_NORMAL=4 PATH_NORMAL value + * @property {number} PATH_CHALLENGER=5 PATH_CHALLENGER value + */ + protobuf.PathSelectionMethod = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "PATH_NEW"] = 1; + values[valuesById[2] = "PATH_PLAIN"] = 2; + values[valuesById[3] = "PATH_FRIEND"] = 3; + values[valuesById[4] = "PATH_NORMAL"] = 4; + values[valuesById[5] = "PATH_CHALLENGER"] = 5; + return values; + })(); + + /** + * NoticeEntry enum. + * @name wm.protobuf.NoticeEntry + * @enum {number} + * @property {number} NOTICE_UNUSED_1=1 NOTICE_UNUSED_1 value + * @property {number} NOTICE_UNUSED_2=2 NOTICE_UNUSED_2 value + * @property {number} NOTICE_UNUSED_3=3 NOTICE_UNUSED_3 value + * @property {number} NOTICE_UNUSED_4=4 NOTICE_UNUSED_4 value + * @property {number} NOTICE_UNUSED_5=5 NOTICE_UNUSED_5 value + * @property {number} NOTICE_UNUSED_6=6 NOTICE_UNUSED_6 value + * @property {number} NOTICE_UNUSED_7=7 NOTICE_UNUSED_7 value + * @property {number} NOTICE_UNUSED_8=8 NOTICE_UNUSED_8 value + * @property {number} NOTICE_UNUSED_9=9 NOTICE_UNUSED_9 value + * @property {number} NOTICE_UNUSED_10=10 NOTICE_UNUSED_10 value + * @property {number} NOTICE_UNUSED_11=11 NOTICE_UNUSED_11 value + * @property {number} NOTICE_UNUSED_12=12 NOTICE_UNUSED_12 value + */ + protobuf.NoticeEntry = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "NOTICE_UNUSED_1"] = 1; + values[valuesById[2] = "NOTICE_UNUSED_2"] = 2; + values[valuesById[3] = "NOTICE_UNUSED_3"] = 3; + values[valuesById[4] = "NOTICE_UNUSED_4"] = 4; + values[valuesById[5] = "NOTICE_UNUSED_5"] = 5; + values[valuesById[6] = "NOTICE_UNUSED_6"] = 6; + values[valuesById[7] = "NOTICE_UNUSED_7"] = 7; + values[valuesById[8] = "NOTICE_UNUSED_8"] = 8; + values[valuesById[9] = "NOTICE_UNUSED_9"] = 9; + values[valuesById[10] = "NOTICE_UNUSED_10"] = 10; + values[valuesById[11] = "NOTICE_UNUSED_11"] = 11; + values[valuesById[12] = "NOTICE_UNUSED_12"] = 12; + return values; + })(); + + /** + * FileType enum. + * @name wm.protobuf.FileType + * @enum {number} + * @property {number} FILE_PROMOTION_ANNOUNCEMENT=1 FILE_PROMOTION_ANNOUNCEMENT value + * @property {number} FILE_FEATURE_ANNOUNCEMENT=4 FILE_FEATURE_ANNOUNCEMENT value + * @property {number} FILE_SPAPP_ANNOUNCEMENT=6 FILE_SPAPP_ANNOUNCEMENT value + */ + protobuf.FileType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "FILE_PROMOTION_ANNOUNCEMENT"] = 1; + values[valuesById[4] = "FILE_FEATURE_ANNOUNCEMENT"] = 4; + values[valuesById[6] = "FILE_SPAPP_ANNOUNCEMENT"] = 6; + return values; + })(); + + /** + * GhostCompetitionParticipantState enum. + * @name wm.protobuf.GhostCompetitionParticipantState + * @enum {number} + * @property {number} COMPETITION_NOT_PARTICIPATED=1 COMPETITION_NOT_PARTICIPATED value + * @property {number} COMPETITION_QUALIFIED=2 COMPETITION_QUALIFIED value + * @property {number} COMPETITION_PARTICIPATED=3 COMPETITION_PARTICIPATED value + * @property {number} COMPETITION_WON=4 COMPETITION_WON value + */ + protobuf.GhostCompetitionParticipantState = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "COMPETITION_NOT_PARTICIPATED"] = 1; + values[valuesById[2] = "COMPETITION_QUALIFIED"] = 2; + values[valuesById[3] = "COMPETITION_PARTICIPATED"] = 3; + values[valuesById[4] = "COMPETITION_WON"] = 4; + return values; + })(); + + /** + * ScreenshotType enum. + * @name wm.protobuf.ScreenshotType + * @enum {number} + * @property {number} SS_GHOST_BATTLE=1 SS_GHOST_BATTLE value + * @property {number} SS_VERSUS_BATTLE=2 SS_VERSUS_BATTLE value + * @property {number} SS_TERMINAL=3 SS_TERMINAL value + * @property {number} SS_ACQUIRING_VERSUS_STAR=4 SS_ACQUIRING_VERSUS_STAR value + * @property {number} SS_ACQUIRING_AURA_MOTIF=5 SS_ACQUIRING_AURA_MOTIF value + * @property {number} SS_GHOST_REGION_MAP=6 SS_GHOST_REGION_MAP value + * @property {number} SS_ACQUIRING_CROWN=7 SS_ACQUIRING_CROWN value + * @property {number} SS_GHOST_COMPETITION_RESULT=8 SS_GHOST_COMPETITION_RESULT value + * @property {number} SS_TIME_ATTACK_RESULT=9 SS_TIME_ATTACK_RESULT value + * @property {number} SS_LEVEL_UP=10 SS_LEVEL_UP value + */ + protobuf.ScreenshotType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SS_GHOST_BATTLE"] = 1; + values[valuesById[2] = "SS_VERSUS_BATTLE"] = 2; + values[valuesById[3] = "SS_TERMINAL"] = 3; + values[valuesById[4] = "SS_ACQUIRING_VERSUS_STAR"] = 4; + values[valuesById[5] = "SS_ACQUIRING_AURA_MOTIF"] = 5; + values[valuesById[6] = "SS_GHOST_REGION_MAP"] = 6; + values[valuesById[7] = "SS_ACQUIRING_CROWN"] = 7; + values[valuesById[8] = "SS_GHOST_COMPETITION_RESULT"] = 8; + values[valuesById[9] = "SS_TIME_ATTACK_RESULT"] = 9; + values[valuesById[10] = "SS_LEVEL_UP"] = 10; + return values; + })(); + + /** + * TransferState enum. + * @name wm.protobuf.TransferState + * @enum {number} + * @property {number} NOT_REGISTERED=0 NOT_REGISTERED value + * @property {number} NEW_REGISTRATION=1 NEW_REGISTRATION value + * @property {number} TRANSFER_REQUIRED=2 TRANSFER_REQUIRED value + * @property {number} TRANSFERRING=3 TRANSFERRING value + * @property {number} TRANSFERRED=4 TRANSFERRED value + */ + protobuf.TransferState = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NOT_REGISTERED"] = 0; + values[valuesById[1] = "NEW_REGISTRATION"] = 1; + values[valuesById[2] = "TRANSFER_REQUIRED"] = 2; + values[valuesById[3] = "TRANSFERRING"] = 3; + values[valuesById[4] = "TRANSFERRED"] = 4; + return values; + })(); + + /** + * EventModeSerialErrorCode enum. + * @name wm.protobuf.EventModeSerialErrorCode + * @enum {number} + * @property {number} SERIAL_SUCCESS=0 SERIAL_SUCCESS value + * @property {number} SERIAL_ATTEMPT_TO_CHANGE=1 SERIAL_ATTEMPT_TO_CHANGE value + * @property {number} SERIAL_NO_INPUT=2 SERIAL_NO_INPUT value + * @property {number} SERIAL_INVALID=3 SERIAL_INVALID value + * @property {number} SERIAL_EXPIRED=4 SERIAL_EXPIRED value + * @property {number} SERIAL_OTHER_PLACE=5 SERIAL_OTHER_PLACE value + */ + protobuf.EventModeSerialErrorCode = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERIAL_SUCCESS"] = 0; + values[valuesById[1] = "SERIAL_ATTEMPT_TO_CHANGE"] = 1; + values[valuesById[2] = "SERIAL_NO_INPUT"] = 2; + values[valuesById[3] = "SERIAL_INVALID"] = 3; + values[valuesById[4] = "SERIAL_EXPIRED"] = 4; + values[valuesById[5] = "SERIAL_OTHER_PLACE"] = 5; + return values; + })(); + + /** + * ClientLogType enum. + * @name wm.protobuf.ClientLogType + * @enum {number} + * @property {number} LOG_LOAD_REPORT=0 LOG_LOAD_REPORT value + * @property {number} LOG_ERROR=1 LOG_ERROR value + */ + protobuf.ClientLogType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_LOAD_REPORT"] = 0; + values[valuesById[1] = "LOG_ERROR"] = 1; + return values; + })(); + + /** + * SmartphoneAppState enum. + * @name wm.protobuf.SmartphoneAppState + * @enum {number} + * @property {number} SPAPP_UNREGISTERED=0 SPAPP_UNREGISTERED value + * @property {number} SPAPP_KTID=1 SPAPP_KTID value + * @property {number} SPAPP_BNID=2 SPAPP_BNID value + */ + protobuf.SmartphoneAppState = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPAPP_UNREGISTERED"] = 0; + values[valuesById[1] = "SPAPP_KTID"] = 1; + values[valuesById[2] = "SPAPP_BNID"] = 2; + return values; + })(); + + return protobuf; + })(); + + return wm; +})(); + +export { $root as default };